Optional
opts: NDKSubscriptionOptionsOptional
relaySet: NDKRelaySetOptional
subId: stringRelays that have sent an EOSE.
Events that have been seen by the subscription, with the time they were first seen.
Events that have been seen by the subscription per relay.
Readonly
filtersReadonly
optsReadonly
poolOptional
relayTracks the filters as they are executed on each relay
Optional
relayReadonly
skipReadonly
skipOptional
Readonly
subGenerated using TypeDoc
Represents a subscription to an NDK event stream.
Emits
event Emitted when an event is received by the subscription.
Emits
event:dup Emitted when a duplicate event is received by the subscription.
Emits
eose - Emitted when all relays have reached the end of the event stream.
Emits
close - Emitted when the subscription is closed.
Example
Description
Subscriptions are created using NDK.subscribe.
Event validation
By defaults, subscriptions will validate events to comply with the minimal requirement of each known NIP. This can be disabled by setting the
skipValidation
option totrue
.Example