TransactionSpendDeferredEvent class

A recorded outgoing transaction's spend is deferred: the wallet holds its inputs until the network settles it (bead libspiffy-7p2).

Each held input becomes reserved by txid with no expiry, so reservation expiry, CleanupExpiredReservationsCommand and higher-priority reservations cannot release or take it. The hold ends when the network reports the transaction (the inputs are spent), when ARC reports it definitively failed (DeferredTransactionFailedEvent) or when the user cancels it (DeferredTransactionCancelledEvent).

Journaled with the TransactionRecordedEvent of a deferSpend recording, or later with inferred true for a record journaled before holds existed, or with reactivated true when a cancelled deferred payment is recorded again (bead libspiffy-4r0).

Inheritance

Constructors

TransactionSpendDeferredEvent({required String walletId, required String txid, required List<Map<String, dynamic>> heldInputs, List<String> recipientAddresses = const [], String paymentAmount = '0', int fee = 0, String? invoiceId, String? purpose, bool inferred = false, bool reactivated = false, String? supersedes, DateTime? deadline, DateTime? recordedAt, String? eventId, DateTime? timestamp, int? version, Map<String, dynamic>? metadata})

Properties

aggregateId → String
The ID of the aggregate this event belongs to
no setterinherited
aggregateType → String
The type of aggregate this event belongs to
no setterinherited
correlationId → String
The correlation ID of the message.
no setterinherited
deadline → DateTime?
When the wallet reclaims the payment by itself if it is still outstanding (bead libspiffy-8442); null for never, and for every hold journaled before deadlines existed.
final
eventId → String
Unique identifier for this event Used for deduplication and correlation
no setterinherited
fee → int
final
hashCode → int
The hash code for this object.
no setterinherited
heldInputs → List<Map<String, dynamic>>
The inputs held ({'utxoKey': 'txid:vout', 'satoshis': '1000'}): the wallet's unspent UTXOs the transaction spends that no other deferred payment already holds.
final
heldUtxoKeys → List<String>
txid:vout of every held input.
no setter
inferred → bool
True when inferred from an older journal (see class doc).
final
invoiceId → String?
final
metadata → Map<String, dynamic>
Additional metadata for the event Can include correlation IDs, causation IDs, user context, etc.
no setterinherited
paymentAmount → String
final
persistableMetadata → Map<String, dynamic>
metadata as it is persisted: transient ActorRef entries removed.
no setterinherited
purpose → String?
final
reactivated → bool
True when the same transaction, a cancelled deferred payment, was recorded again with a deferred spend: the payment is outstanding again and holds heldInputs. The cancellation stays in the journal before it (bead libspiffy-4r0).
final
recipientAddresses → List<String>
final
recordedAt → DateTime
When the transaction was recorded (the record's time for an inferred hold; otherwise the event time).
final
replyTo → ActorRef?
The actor to reply to, if a live ActorRef was placed in metadata['replyTo'].
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supersedes → String?
The deferred payment whose hold on these inputs this one takes over: the payment being reclaimed by this self-spend (bead libspiffy-87a). Null for every other hold, and for every hold journaled before reclaims existed, so the rule "the first hold wins" is unchanged everywhere else.
final
timestamp → DateTime
Timestamp when the event occurred
no setterinherited
txid → String
final
typeName → String
Stable identity of this event type in storage.
no setter
version → int
Version/sequence number of this event within its aggregate Used for ordering and optimistic concurrency control
no setterinherited
walletId → String
ID of the wallet this event belongs to (same as aggregateId)
no setterinherited

Methods

getEventData() → Map<String, dynamic>
Implementation of SerializableEvent.getEventData
inherited
getValidationErrors() → List<String>
Get validation errors Override in subclasses to provide specific error messages
inherited
getWalletEventData() → Map<String, dynamic>
Wallet-specific event data (to be implemented by concrete events)
override
isValid() → bool
Validate the event Override in subclasses for custom validation
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCbor() → List<int>
Serialize event to CBOR bytes
inherited
toMap() → Map<String, dynamic>
Convert event to a map for serialization Override in subclasses to include event-specific data
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromMap(Map<String, dynamic> map) → TransactionSpendDeferredEvent
Create event from a map during deserialization This is a factory method that should be implemented by concrete event classes

Constants

stableTypeName → const String