Interface Payment
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutablePayment
A Payment transaction represents a transfer of value from one account to another. (Depending on the path taken, this
can involve additional exchanges of value, which occur atomically.) This transaction type can be used for several
types of payments, including direct XRP-to-XRP payments, creating or redeeming issued currency, cross-currency
payments, partial payments, and currency conversions on the XRPL Decentralized Exchange.
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionamount()The amount of currency to deliver.static ImmutablePayment.Builderbuilder()Construct a builder for this class.Set of Credentials to authorize a deposit made by this transaction.Minimum amount of destination currency thisPaymentshould deliver.The uniqueAddressof the account receiving the payment.Optional<com.google.common.primitives.UnsignedInteger> ArbitraryUnsignedIntegertag that identifies the reason for the payment to the destination, or a hosted recipient to pay.domainId()The permissioned domain the sender intends to use.default PaymentFlagsflags()Set ofPaymentFlagss for thisPayment, which have been properly combined to yield aPaymentFlagsobject containing theLongrepresentation of the set bits.Arbitrary 256-bit hash representing a specific reason or identifier for this payment.paths()sendMax()Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and slippage.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
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutablePayment.Builder.
-
flags
Set ofPaymentFlagss for thisPayment, which have been properly combined to yield aPaymentFlagsobject containing theLongrepresentation of the set bits.The value of the flags can either be set manually, or constructed using
PaymentFlags.Builder.- Returns:
- The
PaymentFlagsfor this transaction.
-
amount
CurrencyAmount amount()The amount of currency to deliver. If thePaymentFlags.tfPartialPayment()flag is set, deliver up to this amount instead.- Returns:
- A
CurrencyAmountrepresenting the amount of a specified currency to deliver.
-
destination
Address destination()The uniqueAddressof the account receiving the payment. Maybe be empty for an AccountSet or other transaction that is not a payment.- Returns:
- The
Addressof the payment destination account.
-
destinationTag
Optional<com.google.common.primitives.UnsignedInteger> destinationTag()ArbitraryUnsignedIntegertag that identifies the reason for the payment to the destination, or a hosted recipient to pay.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the tag of the destination account.
-
invoiceId
Arbitrary 256-bit hash representing a specific reason or identifier for this payment. -
paths
-
sendMax
Optional<CurrencyAmount> sendMax()Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and slippage. Does not include the XRP destroyed as a cost for submitting the transaction.Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments.
- Returns:
- An
Optionalof typeCurrencyAmount. - See Also:
-
deliverMin
Optional<CurrencyAmount> deliverMin()Minimum amount of destination currency thisPaymentshould deliver. Only valid if this thePaymentFlags.tfPartialPayment()* flag is set.- Returns:
- An
Optionalof typeCurrencyAmount.
-
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.
-
domainId
The permissioned domain the sender intends to use. Both the sender and destination must be part of this domain.- Returns:
- An optionally-present
Hash256representing DomainID.
-
validateCredentialIdsLength
@Check default void validateCredentialIdsLength()ValidatecredentialIds()has less than or equal to 8 credentials. -
validateUniqueCredentialIds
@Check default void validateUniqueCredentialIds()ValidatecredentialIds()are unique.
-