-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, it is inefficient to fetch events related to the events that are fetched in a streaming manner (via allEventsIterator etc.) using nostr-fetch because we must wait until all events are fetched and then query related events and we can't run these fetches concurrently.
Introducing the concept of "subfetch" may resolve this issue.
API sketch:
NostrFetcher.subfetch<T>(stream: AsyncIterable<T>, deriveFilters: (v: T) => Filter[]): AsyncIterable<NostrEvent>
where:
streamis stream of things, usuallyNostrEventbut we have no reason to limit the type of items.deriveFiltersis a function that derivesFilters from each item from thestream.
Considerations:
- How to batch and merge filters?
- If we request events by
ids, we don't have to wait responses from all relays.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request