EscrowCreate constructor
EscrowCreate({
- required String account,
- required BigInt amount,
- required String destination,
- List<
XRPLMemo> ? memos = const [], - int? ticketSequance,
- DateTime? cancelAfterTime,
- DateTime? finishAfterTime,
- String? condition,
- String? destinationTag,
- String signingPubKey = "",
- int? sequence,
- String? fee,
- int? lastLedgerSequence,
amount
Amount of XRP, in drops, to deduct from the sender's balance and set aside in escrow
destination
The address that should receive the escrowed XRP when the time or condition is met
cancelAfter when this escrow expires.
This value is immutable; the funds can only be returned the sender after
this time.
finishAfter when the escrowed XRP can be released to the recipient. This value is immutable; the funds cannot move until this time is reached.
condition
Hex value representing a
PREIMAGE-SHA-256 crypto-condition
The funds can only be delivered to the recipient if this condition is
fulfilled.
Implementation
EscrowCreate({
required super.account,
required this.amount,
required this.destination,
super.memos,
super.ticketSequance,
DateTime? cancelAfterTime,
DateTime? finishAfterTime,
this.condition,
this.destinationTag,
/// required super.transactionType,
super.signingPubKey,
super.sequence,
super.fee,
super.lastLedgerSequence,
}) : assert(() {
if (cancelAfterTime != null &&
finishAfterTime != null &&
finishAfterTime.millisecondsSinceEpoch >=
cancelAfterTime.millisecondsSinceEpoch) {
return false;
}
return true;
}(), "The finish_after time must be before the cancel_after time."),
super(transactionType: XRPLTransactionType.ESCROW_CREATE) {
if (cancelAfterTime != null) {
cancelAfter = datetimeToRippleTime(cancelAfterTime);
} else {
cancelAfter = null;
}
if (finishAfterTime != null) {
finishAfter = datetimeToRippleTime(finishAfterTime);
} else {
finishAfter = null;
}
}