Open melvincarvalho opened 1 year ago
I see you specified the API, but it is mostly what NIP-01 already specifies (with the exception of the OK message and COUNT message, that is another NIP), do you think I should include on this readme anyway?
Completely up to you. It was mostly auto generated code to try and understand the steps to take, because that was unclear. I dont know how much of that readme makes sense, or even is useful ... hopefully some!
What do you think about this new beginning?
The goal of this tool is to behave as a public relay; think of the chosen topic as a public relay, where you can send and receive notes from your peers!
npm -g hyper-nostr
hyper-nostr [port [...starting topics]]
(default 3000)ws://localhost:[port]/[topic]
in your Nostr client (I am using nostr
as a topic to make some kind of generic swarm)Hyper-Nostr is a distributed nostr relay that syncs your relay storage and real time events through the Hyperswarm, linearizes the databases with Autobase, and uses a Hyperbeedee database (loosely based on MongoDB).
The hyperswarm and cores management was highly abstracted thanks to Hyper SDK.
@melvincarvalho @Ruulul see the other issues related to this titled Cook Book
. This needs a nice big shiny readme 🤩 so many people start to use this!
just leaving this boilerplate here, not sure how accurate it is:
Hyper-Nostr Relay
Hyper-Nostr Relay is a WebSocket-based relay server for creating and managing distributed swarms using the Hyper SDK. It allows you to send and receive events in a decentralized manner with ease.
Features
graceful-goodbye
moduleGetting Started
To get started, you can run the Hyper-Nostr Relay server with the desired port and an optional list of starting topics:
For example:
WebSocket API
Clients can connect to the Hyper-Nostr Relay server using WebSockets and send messages with the following structure:
['EVENT', value]
: Send an event with the given value['REQ', value, ...rest]
: Request events matching the given filters (specified inrest
)['CLOSE', value]
: Close the subscription with the given value['COUNT', value, ...rest]
: Request the count of events matching the given filters (specified inrest
)Upon receiving messages from clients, the server will respond with appropriate messages:
['OK', eventId, true, '']
: Acknowledgment of a sent event['EVENT', value, event]
: Event data matching a subscription['EOSE', value]
: End of a subscription's event stream['COUNT', value, { count: eventCount }]
: Count of events matching the given filters['NOTICE', 'Unrecognized event']
: Notification of an unrecognized event typeLicense
?