|
rippled
|
Base class for all transaction wrapper types. More...
#include <TransactionBase.h>
Inherited by xrpl::transactions::AMMBid, xrpl::transactions::AMMClawback, xrpl::transactions::AMMCreate, xrpl::transactions::AMMDelete, xrpl::transactions::AMMDeposit, xrpl::transactions::AMMVote, xrpl::transactions::AMMWithdraw, xrpl::transactions::AccountDelete, xrpl::transactions::AccountSet, xrpl::transactions::Batch, xrpl::transactions::CheckCancel, xrpl::transactions::CheckCash, xrpl::transactions::CheckCreate, xrpl::transactions::Clawback, xrpl::transactions::CredentialAccept, xrpl::transactions::CredentialCreate, xrpl::transactions::CredentialDelete, xrpl::transactions::DIDDelete, xrpl::transactions::DIDSet, xrpl::transactions::DelegateSet, xrpl::transactions::DepositPreauth, xrpl::transactions::EnableAmendment, xrpl::transactions::EscrowCancel, xrpl::transactions::EscrowCreate, xrpl::transactions::EscrowFinish, xrpl::transactions::LedgerStateFix, xrpl::transactions::LoanBrokerCoverClawback, xrpl::transactions::LoanBrokerCoverDeposit, xrpl::transactions::LoanBrokerCoverWithdraw, xrpl::transactions::LoanBrokerDelete, xrpl::transactions::LoanBrokerSet, xrpl::transactions::LoanDelete, xrpl::transactions::LoanManage, xrpl::transactions::LoanPay, xrpl::transactions::LoanSet, xrpl::transactions::MPTokenAuthorize, xrpl::transactions::MPTokenIssuanceCreate, xrpl::transactions::MPTokenIssuanceDestroy, xrpl::transactions::MPTokenIssuanceSet, xrpl::transactions::NFTokenAcceptOffer, xrpl::transactions::NFTokenBurn, xrpl::transactions::NFTokenCancelOffer, xrpl::transactions::NFTokenCreateOffer, xrpl::transactions::NFTokenMint, xrpl::transactions::NFTokenModify, xrpl::transactions::OfferCancel, xrpl::transactions::OfferCreate, xrpl::transactions::OracleDelete, xrpl::transactions::OracleSet, xrpl::transactions::Payment, xrpl::transactions::PaymentChannelClaim, xrpl::transactions::PaymentChannelCreate, xrpl::transactions::PaymentChannelFund, xrpl::transactions::PermissionedDomainDelete, xrpl::transactions::PermissionedDomainSet, xrpl::transactions::SetFee, xrpl::transactions::SetRegularKey, xrpl::transactions::SignerListSet, xrpl::transactions::TicketCreate, xrpl::transactions::TrustSet, xrpl::transactions::UNLModify, xrpl::transactions::VaultClawback, xrpl::transactions::VaultCreate, xrpl::transactions::VaultDelete, xrpl::transactions::VaultDeposit, xrpl::transactions::VaultSet, xrpl::transactions::VaultWithdraw, xrpl::transactions::XChainAccountCreateCommit, xrpl::transactions::XChainAddAccountCreateAttestation, xrpl::transactions::XChainAddClaimAttestation, xrpl::transactions::XChainClaim, xrpl::transactions::XChainCommit, xrpl::transactions::XChainCreateBridge, xrpl::transactions::XChainCreateClaimID, and xrpl::transactions::XChainModifyBridge.

Public Member Functions | |
| TransactionBase (std::shared_ptr< STTx const > tx) | |
| Construct a transaction wrapper from an existing STTx object. | |
| bool | validate (std::string &reason) const |
| Validate the transaction. | |
| xrpl::TxType | getTransactionType () const |
| Get the transaction type. | |
| AccountID | getAccount () const |
| Get the account initiating the transaction (sfAccount). | |
| std::uint32_t | getSequence () const |
| Get the sequence number of the transaction (sfSequence). | |
| STAmount | getFee () const |
| Get the transaction fee (sfFee). | |
| Blob | getSigningPubKey () const |
| Get the signing public key (sfSigningPubKey). | |
| std::optional< uint32_t > | getFlags () const |
| Get the transaction flags (sfFlags). | |
| bool | hasFlags () const |
| Check if the transaction has flags set. | |
| std::optional< uint32_t > | getSourceTag () const |
| Get the source tag (sfSourceTag). | |
| bool | hasSourceTag () const |
| Check if the transaction has a source tag. | |
| std::optional< uint256 > | getPreviousTxnID () const |
| Get the previous transaction ID (sfPreviousTxnID). | |
| bool | hasPreviousTxnID () const |
| Check if the transaction has a previous transaction ID. | |
| std::optional< uint32_t > | getLastLedgerSequence () const |
| Get the last ledger sequence (sfLastLedgerSequence). | |
| bool | hasLastLedgerSequence () const |
| Check if the transaction has a last ledger sequence. | |
| std::optional< uint256 > | getAccountTxnID () const |
| Get the account transaction ID (sfAccountTxnID). | |
| bool | hasAccountTxnID () const |
| Check if the transaction has an account transaction ID. | |
| std::optional< uint32_t > | getOperationLimit () const |
| Get the operation limit (sfOperationLimit). | |
| bool | hasOperationLimit () const |
| Check if the transaction has an operation limit. | |
| std::optional< std::reference_wrapper< STArray const > > | getMemos () const |
| Get the memos array (sfMemos). | |
| bool | hasMemos () const |
| Check if the transaction has memos. | |
| std::optional< uint32_t > | getTicketSequence () const |
| Get the ticket sequence (sfTicketSequence). | |
| bool | hasTicketSequence () const |
| Check if the transaction has a ticket sequence. | |
| std::optional< Blob > | getTxnSignature () const |
| Get the transaction signature (sfTxnSignature). | |
| bool | hasTxnSignature () const |
| Check if the transaction has a transaction signature. | |
| std::optional< std::reference_wrapper< STArray const > > | getSigners () const |
| Get the signers array (sfSigners). | |
| bool | hasSigners () const |
| Check if the transaction has signers. | |
| std::optional< uint32_t > | getNetworkID () const |
| Get the network ID (sfNetworkID). | |
| bool | hasNetworkID () const |
| Check if the transaction has a network ID. | |
| std::optional< AccountID > | getDelegate () const |
| Get the delegate account (sfDelegate). | |
| bool | hasDelegate () const |
| Check if the transaction has a delegate account. | |
| std::shared_ptr< STTx const > | getSTTx () const |
| Get the underlying STTx object. | |
Protected Attributes | |
| std::shared_ptr< STTx const > | tx_ |
| The underlying transaction object being wrapped. | |
Base class for all transaction wrapper types.
Provides type-safe read-only accessors for common transaction fields. This is an immutable wrapper around STTx. Use the corresponding Builder classes to construct new transactions.
Definition at line 24 of file TransactionBase.h.
|
explicit |
Construct a transaction wrapper from an existing STTx object.
| tx | The underlying transaction object to wrap |
Definition at line 31 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::validate | ( | std::string & | reason | ) | const |
Validate the transaction.
Definition at line 41 of file TransactionBase.h.
| xrpl::TxType xrpl::transactions::TransactionBase::getTransactionType | ( | ) | const |
Get the transaction type.
Definition at line 66 of file TransactionBase.h.
| AccountID xrpl::transactions::TransactionBase::getAccount | ( | ) | const |
Get the account initiating the transaction (sfAccount).
This field is REQUIRED for all transactions.
Definition at line 79 of file TransactionBase.h.
| std::uint32_t xrpl::transactions::TransactionBase::getSequence | ( | ) | const |
Get the sequence number of the transaction (sfSequence).
This field is REQUIRED for all transactions.
Definition at line 92 of file TransactionBase.h.
| STAmount xrpl::transactions::TransactionBase::getFee | ( | ) | const |
Get the transaction fee (sfFee).
This field is REQUIRED for all transactions.
Definition at line 105 of file TransactionBase.h.
| Blob xrpl::transactions::TransactionBase::getSigningPubKey | ( | ) | const |
Get the signing public key (sfSigningPubKey).
This field is REQUIRED for all transactions.
Definition at line 118 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getFlags | ( | ) | const |
Get the transaction flags (sfFlags).
This field is OPTIONAL.
Definition at line 131 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasFlags | ( | ) | const |
Check if the transaction has flags set.
Definition at line 144 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getSourceTag | ( | ) | const |
Get the source tag (sfSourceTag).
This field is OPTIONAL and used to identify the source of a payment.
Definition at line 157 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasSourceTag | ( | ) | const |
Check if the transaction has a source tag.
Definition at line 170 of file TransactionBase.h.
| std::optional< uint256 > xrpl::transactions::TransactionBase::getPreviousTxnID | ( | ) | const |
Get the previous transaction ID (sfPreviousTxnID).
This field is OPTIONAL and used for transaction chaining.
Definition at line 183 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasPreviousTxnID | ( | ) | const |
Check if the transaction has a previous transaction ID.
Definition at line 196 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getLastLedgerSequence | ( | ) | const |
Get the last ledger sequence (sfLastLedgerSequence).
This field is OPTIONAL and specifies the latest ledger sequence in which this transaction can be included.
Definition at line 210 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasLastLedgerSequence | ( | ) | const |
Check if the transaction has a last ledger sequence.
Definition at line 223 of file TransactionBase.h.
| std::optional< uint256 > xrpl::transactions::TransactionBase::getAccountTxnID | ( | ) | const |
Get the account transaction ID (sfAccountTxnID).
This field is OPTIONAL and used to track transaction sequences.
Definition at line 236 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasAccountTxnID | ( | ) | const |
Check if the transaction has an account transaction ID.
Definition at line 249 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getOperationLimit | ( | ) | const |
Get the operation limit (sfOperationLimit).
This field is OPTIONAL and limits the number of operations in a transaction.
Definition at line 262 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasOperationLimit | ( | ) | const |
Check if the transaction has an operation limit.
Definition at line 275 of file TransactionBase.h.
| std::optional< std::reference_wrapper< STArray const > > xrpl::transactions::TransactionBase::getMemos | ( | ) | const |
Get the memos array (sfMemos).
This field is OPTIONAL and contains arbitrary data attached to the transaction.
Definition at line 289 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasMemos | ( | ) | const |
Check if the transaction has memos.
Definition at line 302 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getTicketSequence | ( | ) | const |
Get the ticket sequence (sfTicketSequence).
This field is OPTIONAL and used when consuming a ticket instead of a sequence number.
Definition at line 315 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasTicketSequence | ( | ) | const |
Check if the transaction has a ticket sequence.
Definition at line 328 of file TransactionBase.h.
| std::optional< Blob > xrpl::transactions::TransactionBase::getTxnSignature | ( | ) | const |
Get the transaction signature (sfTxnSignature).
This field is OPTIONAL and contains the signature for single-signed transactions.
Definition at line 341 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasTxnSignature | ( | ) | const |
Check if the transaction has a transaction signature.
Definition at line 354 of file TransactionBase.h.
| std::optional< std::reference_wrapper< STArray const > > xrpl::transactions::TransactionBase::getSigners | ( | ) | const |
Get the signers array (sfSigners).
This field is OPTIONAL and contains the list of signers for multi-signed transactions.
Definition at line 368 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasSigners | ( | ) | const |
Check if the transaction has signers.
Definition at line 381 of file TransactionBase.h.
| std::optional< uint32_t > xrpl::transactions::TransactionBase::getNetworkID | ( | ) | const |
Get the network ID (sfNetworkID).
This field is OPTIONAL and identifies the network this transaction is intended for.
Definition at line 394 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasNetworkID | ( | ) | const |
Check if the transaction has a network ID.
Definition at line 407 of file TransactionBase.h.
| std::optional< AccountID > xrpl::transactions::TransactionBase::getDelegate | ( | ) | const |
Get the delegate account (sfDelegate).
This field is OPTIONAL and specifies a delegate account for the transaction.
Definition at line 420 of file TransactionBase.h.
| bool xrpl::transactions::TransactionBase::hasDelegate | ( | ) | const |
Check if the transaction has a delegate account.
Definition at line 433 of file TransactionBase.h.
| std::shared_ptr< STTx const > xrpl::transactions::TransactionBase::getSTTx | ( | ) | const |
Get the underlying STTx object.
Provides direct access to the wrapped transaction object for cases where the type-safe accessors are insufficient.
Definition at line 447 of file TransactionBase.h.
|
protected |
The underlying transaction object being wrapped.
Definition at line 454 of file TransactionBase.h.