Relay class

Represents an individual relay and manages communications to it.

Constructors

Relay(String url, {WriteAccess access = WriteAccess.readOnly, dynamic onError(String)?, RelayInfoProvider? relayInfoProvider})
Creates a Relay object.

Properties

access WriteAccess
Relay read/write access configuration
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
info RelayInfo
NIP-11 relay information
getter/setter pair
isConnected bool
Relay connection status. true if disconnected.
no setter
onError ↔ dynamic Function(String)?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
Relay's URL
final

Methods

connect() Future<bool>
disconnect() Future<void>
listen(Function? callback) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(List message) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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