RecordPaymentCommand class

Client records a payment with pre-built and pre-signed payment TX

Note: TX building and signing are delegated to WalletManager. The payment transaction and signature must be obtained before creating this command.

This command triggers:

  1. Validation (channel open, balance sufficient, sequence incrementing)
  2. PaymentRecordedEvent emission
Inheritance

Constructors

RecordPaymentCommand({required String channelId, required BigInt amountSats, required int sequenceNumber, required String paymentTxHex, required String paymentTxId, required String clientSignatureHex, required BigInt newClientBalanceSats, required BigInt newServerBalanceSats, String? purpose, String? invoiceId, String? commandId, DateTime? timestamp, Map<String, dynamic>? metadata})

Properties

amountSats BigInt
final
channelId String
finalinherited
clientSignatureHex String
final
commandId String
Unique identifier for this command Used for deduplication and tracing
no setterinherited
commandType String
no setteroverride
correlationId String
finalinherited
hashCode int
The hash code for this object.
no setterinherited
invoiceId String?
final
metadata Map<String, dynamic>
finalinherited
newClientBalanceSats BigInt
final
newServerBalanceSats BigInt
final
payload → dynamic
Override payload to return the command itself for LocalMessage compatibility
no setterinherited
paymentTxHex String
final
paymentTxId String
final
purpose String?
final
replyTo → ActorRef?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sender → ActorRef?
finalinherited
sequenceNumber int
final
timestamp DateTime
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 Override in subclasses to include command-specific data
inherited
toString() String
A string representation of this object.
inherited

Operators

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