RelayDeliveryTarget class
Persisted relay-specific broadcast target.
NDK stores one record per (eventId, relayUrl) pair instead of keeping a
mutable list inside an event record. This makes concurrent updates safer and
allows retries, acknowledgements, and failures to be tracked independently.
Constructors
- RelayDeliveryTarget({required String eventId, required String relayUrl, required RelayDeliveryReason reason, RelayDeliveryState state = RelayDeliveryState.pending, int attemptCount = 0, int? lastAttemptAt, int? nextRetryAt, String? lastError, String? lastOkMessage, String? authCanonical})
-
const
-
RelayDeliveryTarget.fromJson(Map<
String, dynamic> json) -
factory
Properties
- attemptCount → int
-
final
- authCanonical → String?
-
canonical form of the RelayAuth this event goes to this relay under, see
RelayAuth.canonical. It lives here rather than on the event, because the same event may be published to two relays under two identities. A signer cannot be persisted, so only the intent is: the account behind a pubkey is resolved again on retry.final - eventId → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
Stable primary key used by cache backends.
no setter
- lastAttemptAt → int?
-
final
- lastError → String?
-
final
- lastOkMessage → String?
-
final
- nextRetryAt → int?
-
final
- reason → RelayDeliveryReason
-
final
- relayUrl → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → RelayDeliveryState
-
final
Methods
-
copyWith(
{String? eventId, String? relayUrl, RelayDeliveryReason? reason, RelayDeliveryState? state, int? attemptCount, Object? lastAttemptAt = _noChange, Object? nextRetryAt = _noChange, Object? lastError = _noChange, Object? lastOkMessage = _noChange, Object? authCanonical = _noChange}) → RelayDeliveryTarget -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
keyPrefixFor(
String eventId) → String -
What key of every target of
eventIdstarts with, so a caller keyed by key can find them all without spelling the format out again.