Broadcast class
class for low level nostr broadcasts / publish
wraps the engines to inject singer
Constructors
- Broadcast({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)
specificRelaysdisables inbox/outbox (gossip) and broadcasts to the relays specified. Useful for NostrWalletConnect
customSignerif you want to use a different signer than the one from currently logged in user in Accounts
considerDonePercentthe percentage (0.0, 1.0) of relays that need to respond with "OK" for the broadcast to be considered done (overrides the default value)
timeoutthe timeout for the broadcast (overrides the default timeout)
returnsa NdkBroadcastResponse object containing the result => success per relay -
broadcastDeletion(
{required String eventId, Iterable< String> ? customRelays, EventSigner? customSigner}) → NdkBroadcastResponse -
request a deletion of an event
eventIdevent you want to delete
customRelaysrelay URls to send the deletion request to specific relays
customSignerif 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