ApplyDeferredSpendCommand class

The network has the transaction txid: the wallet's UTXOs it spends are spent, and its outputs the wallet holds pending become available.

The aggregate decides both from its own state. It journals a recording whole, so it knows every wallet output of a transaction from the moment the recording is accepted; the read model shows them one event at a time and, for a moment, a transaction row without its outputs.

The inputs are those of rawHex (which must be txid) and the ones the wallet recorded txid as spending; the aggregate keeps no raw transactions, so without rawHex only the recorded ones are spent. An input that is not the wallet's, is spent already, or is not this transaction's to spend (UtxoLedger.spendableBy) is left as it is. An output already available or spent is left alone, so the command may be sent for every report of the transaction: one that finds the spend applied journals nothing.

Inheritance

Constructors

ApplyDeferredSpendCommand({required String walletId, required String txid, String? rawHex, String? commandId, DateTime? timestamp, Map<String, dynamic>? metadata})

Properties

commandId → String
Unique identifier for this command Used for deduplication and tracing
no setterinherited
commandType → String
Command type identifier for logging and debugging
no setteroverride
correlationId → String
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
metadata → Map<String, dynamic>
finalinherited
payload → dynamic
Override payload to return the command itself for LocalMessage compatibility
no setterinherited
persistableMetadata → Map<String, dynamic>
metadata as it is persisted: transient ActorRef entries removed.
no setterinherited
rawHex → String?
The transaction, when the sender has it.
final
replyTo → ActorRef?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender → ActorRef?
finalinherited
timestamp → DateTime
finalinherited
txid → String
final
typeName → String
Stable identity of this command type in storage.
no setterinherited
walletId → String
finalinherited

Methods

getValidationErrors() → List<String>
Get validation errors Override in subclasses to provide specific error messages
inherited
isValid() → bool
Validate the command 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 command to CBOR bytes
inherited
toMap() → Map<String, dynamic>
Convert command to a map for serialization.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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