Interface Transaction
-
- All Known Subinterfaces:
AccountDelete
,AccountSet
,CheckCancel
,CheckCash
,CheckCreate
,DepositPreAuth
,EscrowCancel
,EscrowCreate
,EscrowFinish
,OfferCancel
,OfferCreate
,Payment
,PaymentChannelClaim
,PaymentChannelCreate
,PaymentChannelFund
,SetRegularKey
,SignerListSet
,TrustSet
- All Known Implementing Classes:
ImmutableAccountDelete
,ImmutableAccountSet
,ImmutableCheckCancel
,ImmutableCheckCash
,ImmutableCheckCreate
,ImmutableDepositPreAuth
,ImmutableEscrowCancel
,ImmutableEscrowCreate
,ImmutableEscrowFinish
,ImmutableOfferCancel
,ImmutableOfferCreate
,ImmutablePayment
,ImmutablePaymentChannelClaim
,ImmutablePaymentChannelCreate
,ImmutablePaymentChannelFund
,ImmutableSetRegularKey
,ImmutableSignerListSet
,ImmutableTrustSet
public interface Transaction
Provides an abstract interface for all concrete XRPL transactions.
-
-
Field Summary
Fields Modifier and Type Field Description static long
RIPPLE_EPOCH
static com.google.common.collect.BiMap<Class<? extends Transaction>,TransactionType>
typeMap
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Address
account()
The uniqueAddress
of the account that initiated this transaction.Optional<Hash256>
accountTransactionId()
Hash value identifying another transaction.Optional<com.google.common.primitives.UnsignedLong>
closeDate()
The approximate close time (using Ripple Epoch) of the ledger containing this transaction.default Optional<ZonedDateTime>
closeDateHuman()
The approximate close time in UTC offset.static XrpCurrencyAmount
computeMultiSigFee(XrpCurrencyAmount currentLedgerFeeDrops, SignerListObject signerList)
Computes the fee necessary for a multisigned transaction.XrpCurrencyAmount
fee()
TheString
representation of an integer amount of XRP, in drops, to be destroyed as a cost for distributing this Payment transaction to the network.Optional<Hash256>
hash()
The transaction hash of this transaction.Optional<com.google.common.primitives.UnsignedInteger>
lastLedgerSequence()
Highest ledger index this transaction can appear in.Optional<LedgerIndex>
ledgerIndex()
The index of the ledger that this transaction was included in.List<MemoWrapper>
memos()
Additional arbitrary information used to identify thisTransaction
.com.google.common.primitives.UnsignedInteger
sequence()
The sequence number of the account submitting theTransaction
.List<SignerWrapper>
signers()
Array ofSignerWrapper
s that represent a multi-signature which authorizes thisTransaction
.Optional<String>
signingPublicKey()
Hex representation of the public key that corresponds to the private key used to sign this transaction.Optional<com.google.common.primitives.UnsignedInteger>
sourceTag()
ArbitraryUnsignedInteger
used to identify the reason for thisTransaction
, or a sender on whose behalf thisTransaction
is made.Optional<String>
transactionSignature()
The signature that verifies this transaction as originating from the account it says it is from.default TransactionType
transactionType()
The type of transaction.
-
-
-
Field Detail
-
RIPPLE_EPOCH
static final long RIPPLE_EPOCH
- See Also:
- Constant Field Values
-
typeMap
static final com.google.common.collect.BiMap<Class<? extends Transaction>,TransactionType> typeMap
-
-
Method Detail
-
computeMultiSigFee
static XrpCurrencyAmount computeMultiSigFee(XrpCurrencyAmount currentLedgerFeeDrops, SignerListObject signerList)
Computes the fee necessary for a multisigned transaction.The transaction cost of a multisigned transaction must be at least
(N + 1) * (the normal transaction cost)
, whereN
is the number of signatures provided.- Parameters:
currentLedgerFeeDrops
- The current ledger fee, represented as anXrpCurrencyAmount
.signerList
- TheSignerListObject
containing the signers of the transaction.- Returns:
- An
XrpCurrencyAmount
representing the multisig fee.
-
account
Address account()
The uniqueAddress
of the account that initiated this transaction.- Returns:
- The
Address
of the account submitting this transaction.
-
transactionType
default TransactionType transactionType()
The type of transaction.- Returns:
- A
TransactionType
.
-
fee
XrpCurrencyAmount fee()
TheString
representation 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
XrpCurrencyAmount
representing the transaction cost. - See Also:
- "https://xrpl.org/transaction-common-fields.html#auto-fillable-fields"
-
sequence
com.google.common.primitives.UnsignedInteger sequence()
The sequence number of the account submitting theTransaction
. ATransaction
is 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
UnsignedInteger
representing the sequence of the transaction. - See Also:
- "https://xrpl.org/transaction-common-fields.html#auto-fillable-fields"
-
accountTransactionId
Optional<Hash256> accountTransactionId()
Hash value identifying another transaction. If provided, thisTransaction
is 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
Optional
of typeUnsignedInteger
representing the last ledger sequence.
-
memos
List<MemoWrapper> memos()
Additional arbitrary information used to identify thisTransaction
.- Returns:
- A
List
ofMemoWrapper
s.
-
signers
List<SignerWrapper> signers()
Array ofSignerWrapper
s that represent a multi-signature which authorizes thisTransaction
.- Returns:
- A
List
ofSignerWrapper
s.
-
sourceTag
Optional<com.google.common.primitives.UnsignedInteger> sourceTag()
ArbitraryUnsignedInteger
used to identify the reason for thisTransaction
, or a sender on whose behalf thisTransaction
is made.- Returns:
- An
Optional
UnsignedInteger
representing the source account's tag.
-
signingPublicKey
Optional<String> signingPublicKey()
Hex representation of the public key that corresponds to the private key used to sign this transaction. If an empty string, indicates a multi-signature is present in thesigners()
field instead.This field is automatically added when signing this
Transaction
.
-
transactionSignature
Optional<String> 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
.
-
closeDate
Optional<com.google.common.primitives.UnsignedLong> closeDate()
The approximate close time (using Ripple Epoch) of the ledger containing this transaction. This is an undocumented field.- Returns:
- An optionally-present
UnsignedLong
.
-
closeDateHuman
@Auxiliary default Optional<ZonedDateTime> closeDateHuman()
The approximate close time in UTC offset. This is derived from undocumented field.- Returns:
- An optionally-present
ZonedDateTime
.
-
hash
Optional<Hash256> hash()
The transaction hash of this transaction. Only present in responses toaccount_tx
rippled calls.- Returns:
- An optionally present
Hash256
containing the transaction hash.
-
ledgerIndex
Optional<LedgerIndex> ledgerIndex()
The index of the ledger that this transaction was included in. Only present in responses toaccount_tx
rippled calls.- Returns:
- An optionally-present
LedgerIndex
.
-
-