add example with multiple filters to readme.

This commit is contained in:
fiatjaf 2021-02-23 00:20:15 -03:00
parent b7e33c512c
commit 2d2d9863d1
1 changed files with 5 additions and 0 deletions

View File

@ -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: {}})