Whether the relay pool is available and connected.
true if the relay pool can handle requests
Publish an event to relays.
The event to publish
Nothing, or a promise that settles when the publish request completes
OptionalpublishExecute a publish against the supplied, pre-approved destinations.
OptionalselectSelect relay URLs appropriate for publishing. When omitted, publishing
uses selectRelayTier([]) for backwards-compatible selection.
Array of relay URLs
Select relay URLs appropriate for the given filters.
NIP-01 filter objects
Array of relay URLs
Subscribe to events matching filters. Returns handle with unsubscribe().
NIP-01 filter objects
Receives matching events or 'EOSE' plus optional observed relay URLs
OptionalrelayUrls: string[]Relay URLs the subscription must use: the request's own hint when
fromHint is true, otherwise the host tier selected for filters
OptionalfromHint: booleanTrue when relayUrls came from an explicit relay hint on the
request, which bypasses host relay selection
Handle to cancel the subscription
Options for creating a relay pool service.
Example