Interface EscrowCreate

All Superinterfaces:
Transaction
All Known Implementing Classes:
ImmutableEscrowCreate

@Immutable public interface EscrowCreate extends Transaction
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 lsfAllowTrustLineLocking flag
  • MPT tokens (Multi-Purpose Tokens) - requires lsfMPTCanEscrow and lsfMPTCanTransfer flags
  • Method Details

    • builder

      Construct a builder for this class.
      Returns:
      An ImmutableEscrowCreate.Builder.
    • flags

      @Default default TransactionFlags flags()
      Set of TransactionFlagss for this EscrowCreate, which only allows the tfFullyCanonicalSig flag, 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 the destination() address (after the finishAfter() time) or returned to the sender (after the cancelAfter() time).

      Can be one of:

      Returns:
      A CurrencyAmount representing the amount of the escrow.
    • destination

      Address destination()
      Address to receive escrowed tokens.
      Returns:
      The Address of 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 Optional of type UnsignedInteger representing 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 Optional of type UnsignedLong representing 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 Optional of type UnsignedLong representing 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 Optional of type Condition containing the escrow condition.
    • check

      @Check default void check()
      Validate cancelAfter, finishAfter, and condition fields.