Broadcast class
class for low level nostr broadcasts / publish
wraps the engines to inject singer
Constructors
- Broadcast.new({required GlobalState globalState, required CacheManager cacheManager, required NetworkEngine networkEngine, required Accounts accounts, required double considerDonePercent, required Duration timeout})
- creates a new Broadcast instance
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
broadcast(
{required Nip01Event nostrEvent, Iterable< String> ? specificRelays, EventSigner? customSigner, double? considerDonePercent, Duration? timeout}) → NdkBroadcastResponse -
low level nostr broadcast using inbox/outbox (gossip)
specificRelays
disables inbox/outbox (gossip) and broadcasts to the relays specified. Useful for NostrWalletConnect
customSigner
if you want to use a different signer than the one from currently logged in user in Accounts
considerDonePercent
the percentage (0.0, 1.0) of relays that need to respond with "OK" for the broadcast to be considered done (overrides the default value)
timeout
the timeout for the broadcast (overrides the default timeout)
returns
a NdkBroadcastResponse object containing the result => success per relay -
broadcastDeletion(
{required String eventId, Iterable< String> ? customRelays, EventSigner? customSigner}) → NdkBroadcastResponse -
request a deletion of an event
eventId
event you want to delete
customRelays
relay URls to send the deletion request to specific relays
customSigner
if you want to use a different signer than the default specified in NdkConfig -
broadcastReaction(
{required String eventId, Iterable< String> ? customRelays, String reaction = "+"}) → NdkBroadcastResponse -
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