Optional
authPolicy: NDKAuthPolicyOptional
ndk: defaultOptional
authReadonly
debugOptional
lowestThe lowest validation ratio this relay can reach.
Readonly
scoresOptional
targetCurrent validation ratio this relay is targeting.
Whether this relay is trusted.
Trusted relay's events do not get their signature verified.
Readonly
urlOptional
validationThe current validation ratio this relay has achieved.
Publishes an event to the relay with an optional timeout.
If the relay is not connected, the event will be published when the relay connects, unless the timeout is reached before the relay connects.
The event to publish
The timeout for the publish operation in milliseconds
A promise that resolves when the event has been published or rejects if the operation times out
Queues or executes the subscription of a specific set of filters within this relay.
NDKSubscription this filters belong to.
Filters to execute
Static
default
The NDKRelay class represents a connection to a relay.
Emits
NDKRelay#connect
Emits
NDKRelay#ready
Emits
NDKRelay#disconnect
Emits
NDKRelay#notice
Emits
NDKRelay#event
Emits
NDKRelay#published when an event is published to the relay
Emits
NDKRelay#publish:failed when an event fails to publish to the relay
Emits
NDKRelay#eose when the relay has reached the end of stored events
Emits
NDKRelay#auth when the relay requires authentication
Emits
NDKRelay#authed when the relay has authenticated
Emits
NDKRelay#delayed-connect when the relay will wait before reconnecting