Interface CheckCash
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutableCheckCash
The
CheckCash transaction attempts to redeem a Check object in the ledger to receive up to the amount
authorized by the corresponding CheckCreate transaction. Only the Destination address of a Check can cash
it with a CheckCash transaction. Cashing a check this way is similar to executing a Payment initiated by
the destination.
Since the funds for a check are not guaranteed, redeeming a Check can fail because the sender does not have a high enough balance or because there is not enough liquidity to deliver the funds. If this happens, the Check remains in the ledger and the destination can try to cash it again later, or for a different amount.
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionamount()Redeem the Check for exactly this amount, if possible.static ImmutableCheckCash.Builderbuilder()Construct a builder for this class.checkId()The ID of the Check ledger object to cash, as a 64-character hexadecimal string.Redeem the Check for at least this amount and for as much as possible.default TransactionFlagsflags()Set ofTransactionFlagss for thisCheckCash, which only allows thetfFullyCanonicalSigflag, which is deprecated.default voidEnsure that eitheramount()ordeliverMin()is present, but not both.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
ImmutableCheckCash.Builder.
-
flags
Set ofTransactionFlagss for thisCheckCash, 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.
-
checkId
Hash256 checkId()The ID of the Check ledger object to cash, as a 64-character hexadecimal string.- Returns:
- A
Hash256containing the Check ID.
-
amount
Optional<CurrencyAmount> amount()Redeem the Check for exactly this amount, if possible. The currency must match that of theCheckCreate.sendMax()SendMax of the correspondingCheckCreatetransaction. You must provide either this field ordeliverMin().- Returns:
- An
Optionalof typeCurrencyAmountcontaining the check amount.
-
deliverMin
Optional<CurrencyAmount> deliverMin()Redeem the Check for at least this amount and for as much as possible. The currency must match that of theCheckCreate.sendMax()SendMax of the correspondingCheckCreatetransaction. You must provide either this field oramount().- Returns:
- An
Optionalof typeCurrencyAmountcontaining the minimum delivery amount for this check.
-
validateOnlyOneAmountSet
@Check default void validateOnlyOneAmountSet()Ensure that eitheramount()ordeliverMin()is present, but not both.
-