JitEngine class

Just In Time Network Engine This engine is responsible for handling all nostr network requests

Implemented types
Mixed-in types

Constructors

JitEngine({EventSigner? eventSigner, required RelayManager relayManagerLight, required CacheManager cache, required List<String> ignoreRelays, required GlobalState globalState})
Creates a new JIT engine.

Properties

cache CacheManager
cache manager for caching events
getter/setter pair
eventSigner EventSigner?
event signer for signing events
getter/setter pair
globalState GlobalState
global state of the ndk
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ignoreRelays List<String>
relays to ignore
getter/setter pair
relayManagerLight RelayManager
manager for all relays
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeSubscription(String id) Future<void>
close a relay subscription, the relay connection will be kept open and closed automatically (garbage collected)
override
handleEventBroadcast({required Nip01Event nostrEvent, required EventSigner? signer, required Stream<List<RelayBroadcastResponse>> doneStream, Iterable<String>? specificRelays}) NdkBroadcastResponse
broadcasts given event using inbox/outbox (gossip) if explicit relays are given they are used instead nostrEvent event to publish explicitRelays used instead of gossip if set
override
handleRequest(RequestState requestState) → void
If you request anything from the nostr network put it here and the relay jit manager will try to find the right relay and use it if no relay is found the request will be blasted to all connected relays (on start seed Relays)
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMessage(Nip01Event event, RequestState requestState) → void
add to response stream
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

doesRelayCoverPubkey(RelayConnectivity<JitEngineRelayConnectivityData> relay, String pubkey, ReadWriteMarker direction) bool
checks if relay covers given pubkey in given direction