PaymentChannelCreate constructor

PaymentChannelCreate({
  1. required String account,
  2. required BigInt amount,
  3. required String destination,
  4. required int settleDelay,
  5. required String publicKey,
  6. List<XRPLMemo>? memos = const [],
  7. int? ticketSequance,
  8. DateTime? cancelAfterTime,
  9. int? destinationTag,
  10. String signingPubKey = "",
  11. int? sequence,
  12. String? fee,
  13. int? lastLedgerSequence,
})

amount The amount of XRP, in drops, to set aside in this channel. destination can receive XRP from this channel, also known as the "destination address" of the channel. Cannot be the same as the sender. settleDelay The amount of time, in seconds, the source address must wait between requesting to close the channel and fully closing it. publicKey The public key of the key pair that the source will use to authorize claims against this channel, as hexadecimal. This can be any valid secp256k1 or Ed25519 public key. cancelAfterTime An immutable expiration time for the channel. The channel can be closed sooner than this but cannot remain open later than this time.

Implementation

PaymentChannelCreate({
  required super.account,
  required this.amount,
  required this.destination,
  required this.settleDelay,
  required this.publicKey,
  super.memos,
  super.ticketSequance,
  DateTime? cancelAfterTime,
  this.destinationTag,
  super.signingPubKey,
  super.sequence,
  super.fee,
  super.lastLedgerSequence,
}) : super(transactionType: XRPLTransactionType.PAYMENT_CHANNEL_CREATE) {
  if (cancelAfterTime != null) {
    cancelAfter = datetimeToRippleTime(cancelAfterTime);
  } else {
    cancelAfter = null;
  }
}