Skip to content

Commit

Permalink
README.md:
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyMcMillan committed Feb 2, 2024
1 parent 6de4f93 commit a714b20
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
```
$ gnostr-query -i 64301469f8104bbc06cbd4c3992b38862f9be20c8238afbf3cac72b962ce6e35 | gnostr-cat wss://nos.lol
```


# Hyper-Nostr Relay
## Support me!
- Sats: https://getalby.com/p/v_142857
Expand Down Expand Up @@ -48,10 +54,10 @@ const sdk = SDK.create({
})
goodbye(_ => sdk.close())

const {
const {
subscriptions, // a Map<subscriptionId: string, { filters: Filter[], socket: WebSocket, receivedEvents: Set<id: Number> }> object
sendEvent, // (event: Event) => document: Object | Error | void; to send an Nostr Event to the peers and the local database.
queryEvents, // (filters: Filter[]) => Promise<Event[]>; to query the database for the events that match the list of filters
queryEvents, // (filters: Filter[]) => Promise<Event[]>; to query the database for the events that match the list of filters
sendQueryToSubscription, // (sub: Subscription, key: subscriptionId, opts: { hasLimit: Boolean }) => Promise<void> // Write the events to the socket; internally includes each id on receivedEvents and dont send duplicated events
update // () => Promise<void>; manually sync the databases in the background
} = await createSwarm(sdk, theTopic)
Expand Down

0 comments on commit a714b20

Please sign in to comment.