Interface EscrowFinish
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutableEscrowFinish
With the TokenEscrow amendment enabled, this transaction can finish escrows containing:
- XRP (as before)
- IOU tokens (trustline-based tokens)
- MPT tokens (Multi-Purpose Tokens)
Note: The transfer rate or transfer fee is locked at escrow creation time and applied during settlement, even if the issuer changes the rate after the escrow was created.
-
Field Summary
FieldsFields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Construct a builder for this class.static XrpCurrencyAmountcomputeFee(XrpCurrencyAmount currentLedgerBaseFeeDrops, com.ripple.cryptoconditions.Fulfillment<?> fulfillment) Compute the fee for the suppliedfulfillment.Optional<com.ripple.cryptoconditions.Condition> Hex value matching the previously-supplied PREIMAGE-SHA-256 crypto-condition of the held payment.The raw, hex-encoded PREIMAGE-SHA-256 crypto-condition of the escrow.Set of Credentials to authorize a deposit made by this transaction.default TransactionFlagsflags()Set ofTransactionFlagss for thisEscrowFinish, which only allows thetfFullyCanonicalSigflag, which is deprecated.Optional<com.ripple.cryptoconditions.Fulfillment<?>> Hex value of the PREIMAGE-SHA-256 crypto-condition fulfillment matching the held payment'scondition().The raw, hex-encoded value of the PREIMAGE-SHA-256 crypto-condition fulfillment matching the held payment'scondition().default EscrowFinishNormalization method to try to getcondition()andconditionRawValue()to match.default EscrowFinishNormalization method to try to getfulfillment()andfulfillmentRawValue()to match.com.google.common.primitives.UnsignedIntegerTheTransaction.sequence()of the transaction that created the escrow to cancel.owner()Addressof the source account that funded the escrow payment.default voidValidatecredentialIds()has less than or equal to 8 credentials.default voidValidatecredentialIds()are unique.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
-
Field Details
-
logger
static final org.slf4j.Logger logger
-
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutableEscrowFinish.Builder.
-
computeFee
static XrpCurrencyAmount computeFee(XrpCurrencyAmount currentLedgerBaseFeeDrops, com.ripple.cryptoconditions.Fulfillment<?> fulfillment) Compute the fee for the suppliedfulfillment. The minimum transaction cost to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction contains a fulfillment, the transaction cost is 330 drops of XRP plus another 10 drops for every 16 bytes in size of the preimage.- Parameters:
currentLedgerBaseFeeDrops- The number of drops that the ledger demands at present.fulfillment- TheFulfillmentthat is being presented to the ledger for computation purposes.- Returns:
- An
XrpCurrencyAmountrepresenting the computed fee. - See Also:
-
flags
Set ofTransactionFlagss for thisEscrowFinish, 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.
-
owner
Address owner()Addressof the source account that funded the escrow payment.- Returns:
- The
Addressof the source account.
-
offerSequence
com.google.common.primitives.UnsignedInteger offerSequence()TheTransaction.sequence()of the transaction that created the escrow to cancel.- Returns:
- An
UnsignedIntegerrepresenting the sequence number.
-
condition
Optional<com.ripple.cryptoconditions.Condition> condition()Hex value matching the previously-supplied PREIMAGE-SHA-256 crypto-condition of the held payment.If this field is empty, developers should check if
conditionRawValue()is also empty. IfconditionRawValue()is present, it means that the"Condition"field of the transaction was not a well-formed crypto-condition but was still present in a transaction on ledger.- Returns:
- An
Optionalof typeConditioncontaining the escrow condition.
-
conditionRawValue
The raw, hex-encoded PREIMAGE-SHA-256 crypto-condition of the escrow.Developers should prefer setting
condition()and leaving this field empty when constructing a newEscrowFinish. This field is used to serialize and deserialize the"Condition"field in JSON, the XRPL will sometimes include anEscrowFinishin its ledger even if the crypto condition is malformed. Without this field, xrpl4j would fail to deserialize those transactions, ascondition()is typed as aCondition, which tries to decode the condition from DER.Note that a similar field does not exist on
EscrowCreate,EscrowObject, orMetaEscrowObjectbecauseEscrowCreates with malformed conditions will never be included in a ledger by the XRPL. Because of this fact, anEscrowObjectandMetaEscrowObjectwill also never contain a malformed crypto condition. -
fulfillment
Optional<com.ripple.cryptoconditions.Fulfillment<?>> fulfillment()Hex value of the PREIMAGE-SHA-256 crypto-condition fulfillment matching the held payment'scondition().If this field is empty, developers should check if
fulfillmentRawValue()is also empty. IffulfillmentRawValue()is present, it means that the"Fulfillment"field of the transaction was not a well-formed crypto-condition fulfillment but was still present in a transaction on ledger.- Returns:
- An
Optionalof typeFulfillmentcontaining the fulfillment for the escrow's condition.
-
fulfillmentRawValue
The raw, hex-encoded value of the PREIMAGE-SHA-256 crypto-condition fulfillment matching the held payment'scondition().Developers should prefer setting
fulfillment()and leaving this field empty when constructing a newEscrowFinish. This field is used to serialize and deserialize the"Fulfillment"field in JSON, the XRPL will sometimes include anEscrowFinishin its ledger even if the crypto fulfillment is malformed. Without this field, xrpl4j would fail to deserialize those transactions, asfulfillment()is typed as aFulfillment, which tries to decode the fulfillment from DER. -
credentialIds
Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger.- Returns:
- A list of type
Hash256.
-
validateCredentialIdsLength
@Check default void validateCredentialIdsLength()ValidatecredentialIds()has less than or equal to 8 credentials. -
validateUniqueCredentialIds
@Check default void validateUniqueCredentialIds()ValidatecredentialIds()are unique. -
normalizeCondition
Normalization method to try to getcondition()andconditionRawValue()to match.If neither field is present, there is nothing to do.
If both fields are present, there is nothing to do, but we will check that
condition()'s underlying value equalsconditionRawValue().If
condition()is present butconditionRawValue()is empty, we setconditionRawValue()to the underlying value ofcondition().If
condition()is empty andconditionRawValue()is present, we will setcondition()to theConditionrepresenting the raw condition value, or leavecondition()empty ifconditionRawValue()is a malformedCondition.- Returns:
- A normalized
EscrowFinish.
-
normalizeFulfillment
Normalization method to try to getfulfillment()andfulfillmentRawValue()to match.If neither field is present, there is nothing to do.
If both fields are present, there is nothing to do, but we will check that
fulfillment()'s underlying value equalsfulfillmentRawValue().If
fulfillment()is present butfulfillmentRawValue()is empty, we setfulfillmentRawValue()to the underlying value offulfillment().If
fulfillment()is empty andfulfillmentRawValue()is present, we will setfulfillment()to theFulfillmentrepresenting the raw fulfillment value, or leavefulfillment()empty iffulfillmentRawValue()is a malformedFulfillment.- Returns:
- A normalized
EscrowFinish.
-