Interface Transaction
- All Known Subinterfaces:
AccountDelete,AccountSet,AmmBid,AmmClawback,AmmCreate,AmmDelete,AmmDeposit,AmmVote,AmmWithdraw,Batch,CheckCancel,CheckCash,CheckCreate,Clawback,CredentialAccept,CredentialCreate,CredentialDelete,DelegateSet,DepositPreAuth,DidDelete,DidSet,EnableAmendment,EscrowCancel,EscrowCreate,EscrowFinish,MpTokenAuthorize,MpTokenIssuanceCreate,MpTokenIssuanceDestroy,MpTokenIssuanceSet,NfTokenAcceptOffer,NfTokenBurn,NfTokenCancelOffer,NfTokenCreateOffer,NfTokenMint,OfferCancel,OfferCreate,OracleDelete,OracleSet,Payment,PaymentChannelClaim,PaymentChannelCreate,PaymentChannelFund,PermissionedDomainDelete,PermissionedDomainSet,SetFee,SetRegularKey,SignerListSet,TicketCreate,TrustSet,UnknownTransaction,UnlModify,XChainAccountCreateCommit,XChainAddAccountCreateAttestation,XChainAddClaimAttestation,XChainClaim,XChainCommit,XChainCreateBridge,XChainCreateClaimId,XChainModifyBridge
- All Known Implementing Classes:
ImmutableAccountDelete,ImmutableAccountSet,ImmutableAmmBid,ImmutableAmmClawback,ImmutableAmmCreate,ImmutableAmmDelete,ImmutableAmmDeposit,ImmutableAmmVote,ImmutableAmmWithdraw,ImmutableBatch,ImmutableCheckCancel,ImmutableCheckCash,ImmutableCheckCreate,ImmutableClawback,ImmutableCredentialAccept,ImmutableCredentialCreate,ImmutableCredentialDelete,ImmutableDelegateSet,ImmutableDepositPreAuth,ImmutableDidDelete,ImmutableDidSet,ImmutableEnableAmendment,ImmutableEscrowCancel,ImmutableEscrowCreate,ImmutableEscrowFinish,ImmutableMpTokenAuthorize,ImmutableMpTokenIssuanceCreate,ImmutableMpTokenIssuanceDestroy,ImmutableMpTokenIssuanceSet,ImmutableNfTokenAcceptOffer,ImmutableNfTokenBurn,ImmutableNfTokenCancelOffer,ImmutableNfTokenCreateOffer,ImmutableNfTokenMint,ImmutableOfferCancel,ImmutableOfferCreate,ImmutableOracleDelete,ImmutableOracleSet,ImmutablePayment,ImmutablePaymentChannelClaim,ImmutablePaymentChannelCreate,ImmutablePaymentChannelFund,ImmutablePermissionedDomainDelete,ImmutablePermissionedDomainSet,ImmutableSetFee,ImmutableSetRegularKey,ImmutableSignerListSet,ImmutableTicketCreate,ImmutableTrustSet,ImmutableUnknownTransaction,ImmutableUnlModify,ImmutableXChainAccountCreateCommit,ImmutableXChainAddAccountCreateAttestation,ImmutableXChainAddClaimAttestation,ImmutableXChainClaim,ImmutableXChainCommit,ImmutableXChainCreateBridge,ImmutableXChainCreateClaimId,ImmutableXChainModifyBridge
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.collect.BiMap<Class<? extends Transaction>, TransactionType> A bidirectional map of immutable transaction types to their correspondingTransactionType. -
Method Summary
Modifier and TypeMethodDescriptionaccount()The uniqueAddressof the account that initiated this transaction.Hash value identifying another transaction.delegate()The delegate account that is sending the transaction on behalf of theaccount().fee()TheStringrepresentation of an integer amount of XRP, in drops, to be destroyed as a cost for distributing this Payment transaction to the network.Optional<com.google.common.primitives.UnsignedInteger> Highest ledger index this transaction can appear in.memos()Additional arbitrary information used to identify thisTransaction.default com.google.common.primitives.UnsignedIntegersequence()The sequence number of the account submitting theTransaction.signers()Array ofSignerWrappers that represent a multi-signature which authorizes thisTransaction.default PublicKeyThePublicKeythat corresponds to the private key used to sign this transaction.Optional<com.google.common.primitives.UnsignedInteger> ArbitraryUnsignedIntegerused to identify the reason for thisTransaction, or a sender on whose behalf thisTransactionis made.Optional<com.google.common.primitives.UnsignedInteger> The sequence number of theTicketObjectto use in place of asequence()number.default TransactionFlagsGet the transaction flags polymorphically.The signature that verifies this transaction as originating from the account it says it is from.default TransactionTypeThe type of transaction.default voidValidate that thedelegate()field is not the same as theaccount()field.
-
Field Details
-
typeMap
A bidirectional map of immutable transaction types to their correspondingTransactionType.This is useful for polymorphic Jackson deserialization.
-
-
Method Details
-
account
Address account()The uniqueAddressof the account that initiated this transaction.- Returns:
- The
Addressof the account submitting this transaction.
-
transactionType
The type of transaction.- Returns:
- A
TransactionType.
-
fee
XrpCurrencyAmount fee()TheStringrepresentation of an integer amount of XRP, in drops, to be destroyed as a cost for distributing this Payment transaction to the network.This field is auto-fillable
- Returns:
- An
XrpCurrencyAmountrepresenting the transaction cost. - See Also:
-
sequence
@Default default com.google.common.primitives.UnsignedInteger sequence()The sequence number of the account submitting theTransaction. ATransactionis only valid if the Sequence number is exactly 1 greater than the previous transaction from the same account.This field is auto-fillable
- Returns:
- An
UnsignedIntegerrepresenting the sequence of the transaction. - See Also:
-
ticketSequence
Optional<com.google.common.primitives.UnsignedInteger> ticketSequence()The sequence number of theTicketObjectto use in place of asequence()number. If this is provided,sequence()must be 0. Cannot be used withaccountTransactionId().- Returns:
- An
UnsignedIntegerrepresenting the ticket sequence of the transaction.
-
accountTransactionId
Hash value identifying another transaction. If provided, thisTransactionis only valid if the sending account's previously-sent transaction matches the provided hash. -
lastLedgerSequence
Optional<com.google.common.primitives.UnsignedInteger> lastLedgerSequence()Highest ledger index this transaction can appear in. Specifying this field places a strict upper limit on how long the transaction can wait to be validated or rejected.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the last ledger sequence.
-
memos
List<MemoWrapper> memos()Additional arbitrary information used to identify thisTransaction.- Returns:
- A
ListofMemoWrappers.
-
signers
List<SignerWrapper> signers()Array ofSignerWrappers that represent a multi-signature which authorizes thisTransaction.- Returns:
- A
ListofSignerWrappers.
-
sourceTag
Optional<com.google.common.primitives.UnsignedInteger> sourceTag()ArbitraryUnsignedIntegerused to identify the reason for thisTransaction, or a sender on whose behalf thisTransactionis made.- Returns:
- An
OptionalUnsignedIntegerrepresenting the source account's tag.
-
signingPublicKey
ThePublicKeythat corresponds to the private key used to sign this transaction. If an empty string, iePublicKey.MULTI_SIGN_PUBLIC_KEY, indicates a multi-signature is present in thesigners()field instead.- Returns:
- A
PublicKeycontaining the public key of the account submitting the transaction, orPublicKey.MULTI_SIGN_PUBLIC_KEYif the transaction is multi-signed.
-
transactionSignature
The signature that verifies this transaction as originating from the account it says it is from.This field is automatically added when signing this
Transaction. -
networkId
-
delegate
The delegate account that is sending the transaction on behalf of theaccount().The way the
Delegatefield works is somewhat akin toRegularKey. Theaccount()field is the delegating account, theDelegatefield is the delegate, and thesigningPublicKey()andtransactionSignature()are based on the delegate's keys.If a
Delegatehas multisign enabled, they can also use that multisign setup on their delegated transactions.The delegate will pay the fees on the transaction, to prevent a delegate from draining an account's XRP via fees. Only the
account()'s sequence number is incremented, not theDelegate's.This field is part of the Permission Delegation feature (XLS-75).
-
validateDelegateNotSameAsAccount
@Check default void validateDelegateNotSameAsAccount()Validate that thedelegate()field is not the same as theaccount()field. -
unknownFields
-
transactionFlags
Get the transaction flags polymorphically. Each transaction type implements its own flags() method with a specific return type.- Returns:
- The
TransactionFlagsfor this transaction type.
-