NostrRelaysBase class abstract

Implementers

Constructors

NostrRelaysBase()

Properties

eventsRegistry Map<String, NostrEvent>
no setter
hashCode int
The hash code for this object.
no setterinherited
relaysList List<String>?
getter/setter pair
relaysWebSocketsRegistry Map<String, WebSocket>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeEventsSubscription(String subscriptionId) → void
freeAllResources() Future<void>
init({required List<String> relaysUrl, void onRelayListening(String relayUrl, dynamic receivedData, WebSocket? relayWebSocket)?, void onRelayConnectionError(String relayUrl, Object? error, WebSocket? relayWebSocket)?, void onRelayConnectionDone(String relayUrl, WebSocket? relayWebSocket)?, bool lazyListeningToRelays = false, bool retryOnError = false, bool retryOnClose = false}) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reconnectToRelays({required void onRelayListening(String relayUrl, dynamic receivedData, WebSocket? relayWebSocket)?, required void onRelayConnectionError(String relayUrl, Object? error, WebSocket? relayWebSocket)?, required void onRelayConnectionDone(String relayUrl, WebSocket? relayWebSocket)?, required bool retryOnError, required bool retryOnClose, required bool shouldReconnectToRelayOnNotice, required Duration connectionTimeout, required bool ignoreConnectionException, required bool lazyListeningToRelays, bool relayUnregistered = true}) Future<void>
relayInformationsDocumentNip11({required String relayUrl, bool throwExceptionIfExists}) Future<RelayInformations?>
sendCountEventToRelays(NostrCountEvent countEvent, {required void onCountResponse(NostrCountResponse NostrCountResponse)}) → void
sendCountEventToRelaysAsync(NostrCountEvent countEvent, {required Duration timeout}) Future<NostrCountResponse>
sendEventToRelays(NostrEvent event, {required void onOk(NostrEventOkCommand ok)}) → void
sendEventToRelaysAsync(NostrEvent event, {required Duration timeout, void onOk(NostrEventOkCommand ok)?}) Future<NostrEventOkCommand>
startEventsSubscription({required NostrRequest request, void onEose(NostrRequestEoseCommand ease)?}) NostrEventsStream
startEventsSubscriptionAsync({required NostrRequest request, required Duration timeout, void onEose(NostrRequestEoseCommand ease)?, bool useConsistentSubscriptionIdBasedOnRequestData = false, bool shouldThrowErrorOnTimeoutWithoutEose = true}) Future<List<NostrEvent>>
startListeningToRelay({required String relay, required void onRelayListening(String relayUrl, dynamic receivedData, WebSocket? relayWebSocket)?, required void onRelayConnectionError(String relayUrl, Object? error, WebSocket? relayWebSocket)?, required void onRelayConnectionDone(String relayUrl, WebSocket? relayWebSocket)?, required bool retryOnError, required bool retryOnClose, required bool shouldReconnectToRelayOnNotice, required Duration connectionTimeout, required bool ignoreConnectionException, required bool lazyListeningToRelays}) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited