mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
add example with multiple filters to readme.
This commit is contained in:
@@ -28,6 +28,11 @@ pool.sub({cb:(event, relay) => {...}, filter: {authors: ['<hex1>', '<hex2>', ...
|
||||
|
||||
// get specific event
|
||||
pool.sub({cb: (event, relay) => {...}, filter: {id: '<hex>'}})
|
||||
// or get a specific event plus all the events that reference it in the 'e' tag
|
||||
pool.sub({
|
||||
cb: (event, relay) => {...},
|
||||
filter: [{id: '<hex>'}, {'#e': '<hex>'}]
|
||||
})
|
||||
|
||||
// get all events
|
||||
pool.sub({cb: (event, relay) => {...}, filter: {}})
|
||||
|
||||
Reference in New Issue
Block a user