DeriveType42DestinationCommand class

Derives a type-42 destination for paying the holder of anchor key anchorPublicKey (beads libspiffy-zxkd, libspiffy-fdal): the wallet's next payer key B (m/3'/1'/n', never used twice) and invoiceNumber give C = A + HMAC-SHA256(ECDH(b, A), invoiceNumber)·G.

anchorContext is the context the recipient published its anchor for, when the payer has it; it is passed through into the hand-off unchecked (the payer cannot check it), and the recipient's wallet checks it gives A. Without an invoiceNumber a BRC-29 one is made up with a random derivation prefix and suffix. The destination is journaled (Type42DestinationDerivedEvent) so the payer key is not reused and the hand-off can be given again.

Inheritance

Constructors

DeriveType42DestinationCommand({required String walletId, required String anchorPublicKey, List<int>? anchorContext, String? invoiceNumber, String? commandId, DateTime? timestamp, Map<String, dynamic>? metadata})

Properties

anchorContext → List<int>?
final
anchorPublicKey → String
final
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
invoiceNumber → String?
final
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
replyTo → ActorRef?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender → ActorRef?
finalinherited
timestamp → DateTime
finalinherited
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