NdkRequest class

Ndk request

Constructors

NdkRequest.query(String id, {String? name, required Duration? timeoutDuration, dynamic timeoutCallback()?, dynamic timeoutCallbackUserFacing()?, required List<Filter> filters, int desiredCoverage = 2, bool closeOnEOSE = true, RelaySet? relaySet, Iterable<String>? explicitRelays, bool cacheRead = true, bool cacheWrite = true})
query
NdkRequest.subscription(String id, {String? name, required List<Filter> filters, int desiredCoverage = 2, bool closeOnEOSE = false, RelaySet? relaySet, Iterable<String>? explicitRelays, bool cacheRead = true, bool cacheWrite = true})
subscription

Properties

cacheRead bool
use cache for read?
getter/setter pair
cacheWrite bool
use cache for write
getter/setter pair
closeOnEOSE bool
should it close on receiving EOSE?
getter/setter pair
desiredCoverage int
desired coverage
final
explicitRelays Iterable<String>?
when specified only these relays are used and inbox/outbox get ignored
getter/setter pair
filters List<Filter>
filters
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
nostr id
getter/setter pair
name String?
request name (for better debugging / logging
getter/setter pair
relaySet RelaySet?
optional RelaySet for outbox/inbox pre-calculated
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeoutCallback ↔ dynamic Function()?
define a callback that gets called when the timeout is triggered
mostly used for internal err handling (e.g. other usecases)
getter/setter pair
timeoutCallbackUserFacing ↔ dynamic Function()?
user facing timeout callback
do not touch only pass it through
getter/setter pair
timeoutDuration Duration?
timeout duration, closes all streams
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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