OldRelayManager class

Constructors

OldRelayManager({required NostrTransportFactory nostrTransportFactory, List<String>? bootstrapRelays, GlobalState? globalState})

Properties

allowReconnectRelays bool
getter/setter pair
blockedRelays List<String>
getter/setter pair
blockedRelaysCount int
no setter
bootstrapRelays List<String>
getter/setter pair
eventFilters List<EventFilter>
getter/setter pair
eventVerifier EventVerifier
getter/setter pair
globalState GlobalState
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
nostrTransportFactory NostrTransportFactory
final
relays Map<String, Relay>
Global relay registry by url
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seedRelaysConnected → dynamic
no setter
transports Map<String, NostrTransport>
Global transport registry by url
getter/setter pair

Methods

allConnectedRelays(List<String> pubKeys) Map<String, List<PubkeyMapping>>
broadcastEvent(Nip01Event event, Iterable<String> relays, EventSigner signer) Future<void>
broadcastSignedEvent(Nip01Event event, String url) Future<void>
closeAllTransports() Future<void>
closeIfAllEventsVerified(RelayRequestState request, RequestState state, String url) → void
closeSubscription(String subscriptionId) → void
closeTransport(dynamic url) Future<void>
connect({Iterable<String> urls = DEFAULT_BOOTSTRAP_RELAYS}) Future<void>
This will initialize the manager with bootstrap relays. If you don't give any, will use some predefined
connectRelay(String dirtyUrl, {int connectTimeout = DEFAULT_WEB_SOCKET_CONNECT_TIMEOUT}) Future<bool>
Connect a new relay
filterEvent(Nip01Event event) bool
getConnectedRelays(Iterable<String> urls) List<Relay>
getRelay(String url) Relay?
getRelayInfo(String url) Future<RelayInfo?>
handleEOSE(List eventJson, String url) → void
handleIncomingEvent(List eventJson, String url, dynamic message) → void
isRelayConnected(String url) bool
isRelayConnecting(String url) bool
isWebSocketOpen(String url) bool
logActiveRequests() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reconnectRelay(String url, {bool force = false}) Future<bool>
reconnectRelays(Iterable<String> urls) Future<void>
removeInFlightRequest(RequestState state) → void
removeInFlightRequestById(String id) Future<void>
send(String url, dynamic data) → void
sendCloseToRelay(String url, String id) → void
startListeningToSocket(String url) → void
toString() String
A string representation of this object.
inherited

Operators

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