Interface EscrowCreate
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutableEscrowCreate
Sequester XRP, IOU tokens, or MPT tokens until the escrow process either finishes or is canceled.
With the TokenEscrow amendment enabled, escrows can hold:
- XRP (as before)
- IOU tokens (trustline-based tokens) - requires issuer to enable
lsfAllowTrustLineLockingflag - MPT tokens (Multi-Purpose Tokens) - requires
lsfMPTCanEscrowandlsfMPTCanTransferflags
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionamount()Amount of tokens to deduct from the sender's balance and escrow.builder()Construct a builder for this class.Optional<com.google.common.primitives.UnsignedLong> The time, in seconds since the Ripple Epoch, when this escrow expires.default voidcheck()Validate cancelAfter, finishAfter, and condition fields.Optional<com.ripple.cryptoconditions.Condition> Hex value representing a PREIMAGE-SHA-256 crypto-condition.Address to receive escrowed tokens.Optional<com.google.common.primitives.UnsignedInteger> Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address.Optional<com.google.common.primitives.UnsignedLong> The time, in seconds since the Ripple Epoch, when the escrowed tokens can be released to the recipient.default TransactionFlagsflags()Set ofTransactionFlagss for thisEscrowCreate, which only allows thetfFullyCanonicalSigflag, which is deprecated.Methods inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
account, accountTransactionId, delegate, fee, lastLedgerSequence, memos, networkId, sequence, signers, signingPublicKey, sourceTag, ticketSequence, transactionFlags, transactionSignature, transactionType, unknownFields, validateDelegateNotSameAsAccount
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutableEscrowCreate.Builder.
-
flags
Set ofTransactionFlagss for thisEscrowCreate, which only allows thetfFullyCanonicalSigflag, which is deprecated.The value of the flags cannot be set manually, but exists for JSON serialization/deserialization only and for proper signature computation in rippled.
- Returns:
- Always
TransactionFlags.EMPTY.
-
amount
CurrencyAmount amount()Amount of tokens to deduct from the sender's balance and escrow. Once escrowed, the tokens can either go to thedestination()address (after thefinishAfter()time) or returned to the sender (after thecancelAfter()time).Can be one of:
XrpCurrencyAmount- XRP in dropsIssuedCurrencyAmount- IOU tokens (requires issuer'slsfAllowTrustLineLockingflag)MptCurrencyAmount- MPT tokens (requireslsfMPTCanEscrowandlsfMPTCanTransferflags)
- Returns:
- A
CurrencyAmountrepresenting the amount of the escrow.
-
destination
Address destination()Address to receive escrowed tokens.- Returns:
- The
Addressof the destination account.
-
destinationTag
Optional<com.google.common.primitives.UnsignedInteger> destinationTag()Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the tag of the destination account.
-
cancelAfter
Optional<com.google.common.primitives.UnsignedLong> cancelAfter()The time, in seconds since the Ripple Epoch, when this escrow expires.This value is immutable - the tokens can only be returned to the sender after this time.
- Returns:
- An
Optionalof typeUnsignedLongrepresenting the cancel after time.
-
finishAfter
Optional<com.google.common.primitives.UnsignedLong> finishAfter()The time, in seconds since the Ripple Epoch, when the escrowed tokens can be released to the recipient.This value is immutable - the tokens cannot move until this time is reached.
- Returns:
- An
Optionalof typeUnsignedLongrepresenting the finish after time.
-
condition
Optional<com.ripple.cryptoconditions.Condition> condition()Hex value representing a PREIMAGE-SHA-256 crypto-condition. The tokens can only be delivered to the recipient if this condition is fulfilled.- Returns:
- An
Optionalof typeConditioncontaining the escrow condition.
-
check
@Check default void check()Validate cancelAfter, finishAfter, and condition fields.
-