rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
xrpl::transactions::XChainClaim Class Reference

Transaction: XChainClaim. More...

#include <XChainClaim.h>

Inheritance diagram for xrpl::transactions::XChainClaim:
Inheritance graph
[legend]
Collaboration diagram for xrpl::transactions::XChainClaim:
Collaboration graph
[legend]

Public Member Functions

 XChainClaim (std::shared_ptr< STTx const > tx)
 Construct a XChainClaim transaction wrapper from an existing STTx object.
 
SF_XCHAIN_BRIDGE::type::value_type getXChainBridge () const
 Get sfXChainBridge (soeREQUIRED)
 
SF_UINT64::type::value_type getXChainClaimID () const
 Get sfXChainClaimID (soeREQUIRED)
 
SF_ACCOUNT::type::value_type getDestination () const
 Get sfDestination (soeREQUIRED)
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getDestinationTag () const
 Get sfDestinationTag (soeOPTIONAL)
 
bool hasDestinationTag () const
 Check if sfDestinationTag is present.
 
SF_AMOUNT::type::value_type getAmount () const
 Get sfAmount (soeREQUIRED)
 
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< uint256getPreviousTxnID () 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< uint256getAccountTxnID () 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< BlobgetTxnSignature () 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< AccountIDgetDelegate () 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.
 

Static Public Attributes

static constexpr xrpl::TxType txType = ttXCHAIN_CLAIM
 

Protected Attributes

std::shared_ptr< STTx const > tx_
 The underlying transaction object being wrapped.
 

Detailed Description

Transaction: XChainClaim.

Type: ttXCHAIN_CLAIM (43) Delegable: Delegation::delegable Amendment: featureXChainBridge Privileges: noPriv

Immutable wrapper around STTx providing type-safe field access. Use XChainClaimBuilder to construct new transactions.

Definition at line 29 of file XChainClaim.h.

Constructor & Destructor Documentation

◆ XChainClaim()

xrpl::transactions::XChainClaim::XChainClaim ( std::shared_ptr< STTx const >  tx)
explicit

Construct a XChainClaim transaction wrapper from an existing STTx object.

Exceptions
std::runtime_errorif the transaction type doesn't match.

Definition at line 38 of file XChainClaim.h.

Member Function Documentation

◆ getXChainBridge()

SF_XCHAIN_BRIDGE::type::value_type xrpl::transactions::XChainClaim::getXChainBridge ( ) const

Get sfXChainBridge (soeREQUIRED)

Returns
The field value.

Definition at line 56 of file XChainClaim.h.

◆ getXChainClaimID()

SF_UINT64::type::value_type xrpl::transactions::XChainClaim::getXChainClaimID ( ) const

Get sfXChainClaimID (soeREQUIRED)

Returns
The field value.

Definition at line 67 of file XChainClaim.h.

◆ getDestination()

SF_ACCOUNT::type::value_type xrpl::transactions::XChainClaim::getDestination ( ) const

Get sfDestination (soeREQUIRED)

Returns
The field value.

Definition at line 78 of file XChainClaim.h.

◆ getDestinationTag()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::transactions::XChainClaim::getDestinationTag ( ) const

Get sfDestinationTag (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 89 of file XChainClaim.h.

◆ hasDestinationTag()

bool xrpl::transactions::XChainClaim::hasDestinationTag ( ) const

Check if sfDestinationTag is present.

Returns
True if the field is present, false otherwise.

Definition at line 104 of file XChainClaim.h.

◆ getAmount()

SF_AMOUNT::type::value_type xrpl::transactions::XChainClaim::getAmount ( ) const

Get sfAmount (soeREQUIRED)

Returns
The field value.

Definition at line 115 of file XChainClaim.h.

◆ validate()

bool xrpl::transactions::TransactionBase::validate ( std::string reason) const
inherited

Validate the transaction.

Returns
true if validation passes, false otherwise

Definition at line 41 of file TransactionBase.h.

◆ getTransactionType()

xrpl::TxType xrpl::transactions::TransactionBase::getTransactionType ( ) const
inherited

Get the transaction type.

Returns
The type of this transaction

Definition at line 66 of file TransactionBase.h.

◆ getAccount()

AccountID xrpl::transactions::TransactionBase::getAccount ( ) const
inherited

Get the account initiating the transaction (sfAccount).

This field is REQUIRED for all transactions.

Returns
The account ID of the transaction sender

Definition at line 79 of file TransactionBase.h.

◆ getSequence()

std::uint32_t xrpl::transactions::TransactionBase::getSequence ( ) const
inherited

Get the sequence number of the transaction (sfSequence).

This field is REQUIRED for all transactions.

Returns
The sequence number

Definition at line 92 of file TransactionBase.h.

◆ getFee()

STAmount xrpl::transactions::TransactionBase::getFee ( ) const
inherited

Get the transaction fee (sfFee).

This field is REQUIRED for all transactions.

Returns
The fee amount

Definition at line 105 of file TransactionBase.h.

◆ getSigningPubKey()

Blob xrpl::transactions::TransactionBase::getSigningPubKey ( ) const
inherited

Get the signing public key (sfSigningPubKey).

This field is REQUIRED for all transactions.

Returns
The public key used for signing as a blob

Definition at line 118 of file TransactionBase.h.

◆ getFlags()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getFlags ( ) const
inherited

Get the transaction flags (sfFlags).

This field is OPTIONAL.

Returns
The flags value if present, std::nullopt otherwise

Definition at line 131 of file TransactionBase.h.

◆ hasFlags()

bool xrpl::transactions::TransactionBase::hasFlags ( ) const
inherited

Check if the transaction has flags set.

Returns
true if sfFlags is present, false otherwise

Definition at line 144 of file TransactionBase.h.

◆ getSourceTag()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getSourceTag ( ) const
inherited

Get the source tag (sfSourceTag).

This field is OPTIONAL and used to identify the source of a payment.

Returns
The source tag value if present, std::nullopt otherwise

Definition at line 157 of file TransactionBase.h.

◆ hasSourceTag()

bool xrpl::transactions::TransactionBase::hasSourceTag ( ) const
inherited

Check if the transaction has a source tag.

Returns
true if sfSourceTag is present, false otherwise

Definition at line 170 of file TransactionBase.h.

◆ getPreviousTxnID()

std::optional< uint256 > xrpl::transactions::TransactionBase::getPreviousTxnID ( ) const
inherited

Get the previous transaction ID (sfPreviousTxnID).

This field is OPTIONAL and used for transaction chaining.

Returns
The previous transaction ID if present, std::nullopt otherwise

Definition at line 183 of file TransactionBase.h.

◆ hasPreviousTxnID()

bool xrpl::transactions::TransactionBase::hasPreviousTxnID ( ) const
inherited

Check if the transaction has a previous transaction ID.

Returns
true if sfPreviousTxnID is present, false otherwise

Definition at line 196 of file TransactionBase.h.

◆ getLastLedgerSequence()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getLastLedgerSequence ( ) const
inherited

Get the last ledger sequence (sfLastLedgerSequence).

This field is OPTIONAL and specifies the latest ledger sequence in which this transaction can be included.

Returns
The last ledger sequence if present, std::nullopt otherwise

Definition at line 210 of file TransactionBase.h.

◆ hasLastLedgerSequence()

bool xrpl::transactions::TransactionBase::hasLastLedgerSequence ( ) const
inherited

Check if the transaction has a last ledger sequence.

Returns
true if sfLastLedgerSequence is present, false otherwise

Definition at line 223 of file TransactionBase.h.

◆ getAccountTxnID()

std::optional< uint256 > xrpl::transactions::TransactionBase::getAccountTxnID ( ) const
inherited

Get the account transaction ID (sfAccountTxnID).

This field is OPTIONAL and used to track transaction sequences.

Returns
The account transaction ID if present, std::nullopt otherwise

Definition at line 236 of file TransactionBase.h.

◆ hasAccountTxnID()

bool xrpl::transactions::TransactionBase::hasAccountTxnID ( ) const
inherited

Check if the transaction has an account transaction ID.

Returns
true if sfAccountTxnID is present, false otherwise

Definition at line 249 of file TransactionBase.h.

◆ getOperationLimit()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getOperationLimit ( ) const
inherited

Get the operation limit (sfOperationLimit).

This field is OPTIONAL and limits the number of operations in a transaction.

Returns
The operation limit if present, std::nullopt otherwise

Definition at line 262 of file TransactionBase.h.

◆ hasOperationLimit()

bool xrpl::transactions::TransactionBase::hasOperationLimit ( ) const
inherited

Check if the transaction has an operation limit.

Returns
true if sfOperationLimit is present, false otherwise

Definition at line 275 of file TransactionBase.h.

◆ getMemos()

std::optional< std::reference_wrapper< STArray const > > xrpl::transactions::TransactionBase::getMemos ( ) const
inherited

Get the memos array (sfMemos).

This field is OPTIONAL and contains arbitrary data attached to the transaction.

Note
This is an untyped field (STArray).
Returns
A reference wrapper to the memos array if present, std::nullopt otherwise

Definition at line 289 of file TransactionBase.h.

◆ hasMemos()

bool xrpl::transactions::TransactionBase::hasMemos ( ) const
inherited

Check if the transaction has memos.

Returns
true if sfMemos is present, false otherwise

Definition at line 302 of file TransactionBase.h.

◆ getTicketSequence()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getTicketSequence ( ) const
inherited

Get the ticket sequence (sfTicketSequence).

This field is OPTIONAL and used when consuming a ticket instead of a sequence number.

Returns
The ticket sequence if present, std::nullopt otherwise

Definition at line 315 of file TransactionBase.h.

◆ hasTicketSequence()

bool xrpl::transactions::TransactionBase::hasTicketSequence ( ) const
inherited

Check if the transaction has a ticket sequence.

Returns
true if sfTicketSequence is present, false otherwise

Definition at line 328 of file TransactionBase.h.

◆ getTxnSignature()

std::optional< Blob > xrpl::transactions::TransactionBase::getTxnSignature ( ) const
inherited

Get the transaction signature (sfTxnSignature).

This field is OPTIONAL and contains the signature for single-signed transactions.

Returns
The transaction signature as a blob if present, std::nullopt otherwise

Definition at line 341 of file TransactionBase.h.

◆ hasTxnSignature()

bool xrpl::transactions::TransactionBase::hasTxnSignature ( ) const
inherited

Check if the transaction has a transaction signature.

Returns
true if sfTxnSignature is present, false otherwise

Definition at line 354 of file TransactionBase.h.

◆ getSigners()

std::optional< std::reference_wrapper< STArray const > > xrpl::transactions::TransactionBase::getSigners ( ) const
inherited

Get the signers array (sfSigners).

This field is OPTIONAL and contains the list of signers for multi-signed transactions.

Note
This is an untyped field (STArray).
Returns
A reference wrapper to the signers array if present, std::nullopt otherwise

Definition at line 368 of file TransactionBase.h.

◆ hasSigners()

bool xrpl::transactions::TransactionBase::hasSigners ( ) const
inherited

Check if the transaction has signers.

Returns
true if sfSigners is present, false otherwise

Definition at line 381 of file TransactionBase.h.

◆ getNetworkID()

std::optional< uint32_t > xrpl::transactions::TransactionBase::getNetworkID ( ) const
inherited

Get the network ID (sfNetworkID).

This field is OPTIONAL and identifies the network this transaction is intended for.

Returns
The network ID if present, std::nullopt otherwise

Definition at line 394 of file TransactionBase.h.

◆ hasNetworkID()

bool xrpl::transactions::TransactionBase::hasNetworkID ( ) const
inherited

Check if the transaction has a network ID.

Returns
true if sfNetworkID is present, false otherwise

Definition at line 407 of file TransactionBase.h.

◆ getDelegate()

std::optional< AccountID > xrpl::transactions::TransactionBase::getDelegate ( ) const
inherited

Get the delegate account (sfDelegate).

This field is OPTIONAL and specifies a delegate account for the transaction.

Returns
The delegate account ID if present, std::nullopt otherwise

Definition at line 420 of file TransactionBase.h.

◆ hasDelegate()

bool xrpl::transactions::TransactionBase::hasDelegate ( ) const
inherited

Check if the transaction has a delegate account.

Returns
true if sfDelegate is present, false otherwise

Definition at line 433 of file TransactionBase.h.

◆ getSTTx()

std::shared_ptr< STTx const > xrpl::transactions::TransactionBase::getSTTx ( ) const
inherited

Get the underlying STTx object.

Provides direct access to the wrapped transaction object for cases where the type-safe accessors are insufficient.

Returns
A constant reference to the underlying STTx object

Definition at line 447 of file TransactionBase.h.

Member Data Documentation

◆ txType

constexpr xrpl::TxType xrpl::transactions::XChainClaim::txType = ttXCHAIN_CLAIM
staticconstexpr

Definition at line 32 of file XChainClaim.h.

◆ tx_

std::shared_ptr<STTx const> xrpl::transactions::TransactionBase::tx_
protectedinherited

The underlying transaction object being wrapped.

Definition at line 454 of file TransactionBase.h.