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

Transaction: PaymentChannelCreate. More...

#include <PaymentChannelCreate.h>

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

Public Member Functions

 PaymentChannelCreate (std::shared_ptr< STTx const > tx)
 Construct a PaymentChannelCreate transaction wrapper from an existing STTx object.
 
SF_ACCOUNT::type::value_type getDestination () const
 Get sfDestination (soeREQUIRED)
 
SF_AMOUNT::type::value_type getAmount () const
 Get sfAmount (soeREQUIRED)
 
SF_UINT32::type::value_type getSettleDelay () const
 Get sfSettleDelay (soeREQUIRED)
 
SF_VL::type::value_type getPublicKey () const
 Get sfPublicKey (soeREQUIRED)
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getCancelAfter () const
 Get sfCancelAfter (soeOPTIONAL)
 
bool hasCancelAfter () const
 Check if sfCancelAfter is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getDestinationTag () const
 Get sfDestinationTag (soeOPTIONAL)
 
bool hasDestinationTag () const
 Check if sfDestinationTag is present.
 
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 = ttPAYCHAN_CREATE
 

Protected Attributes

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

Detailed Description

Transaction: PaymentChannelCreate.

Type: ttPAYCHAN_CREATE (13) Delegable: Delegation::delegable Amendment: uint256{} Privileges: noPriv

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

Definition at line 29 of file protocol_autogen/transactions/PaymentChannelCreate.h.

Constructor & Destructor Documentation

◆ PaymentChannelCreate()

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

Construct a PaymentChannelCreate transaction wrapper from an existing STTx object.

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

Definition at line 38 of file protocol_autogen/transactions/PaymentChannelCreate.h.

Member Function Documentation

◆ getDestination()

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

Get sfDestination (soeREQUIRED)

Returns
The field value.

Definition at line 56 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ getAmount()

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

Get sfAmount (soeREQUIRED)

Returns
The field value.

Definition at line 67 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ getSettleDelay()

SF_UINT32::type::value_type xrpl::transactions::PaymentChannelCreate::getSettleDelay ( ) const

Get sfSettleDelay (soeREQUIRED)

Returns
The field value.

Definition at line 78 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ getPublicKey()

SF_VL::type::value_type xrpl::transactions::PaymentChannelCreate::getPublicKey ( ) const

Get sfPublicKey (soeREQUIRED)

Returns
The field value.

Definition at line 89 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ getCancelAfter()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::transactions::PaymentChannelCreate::getCancelAfter ( ) const

Get sfCancelAfter (soeOPTIONAL)

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

Definition at line 100 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ hasCancelAfter()

bool xrpl::transactions::PaymentChannelCreate::hasCancelAfter ( ) const

Check if sfCancelAfter is present.

Returns
True if the field is present, false otherwise.

Definition at line 115 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ getDestinationTag()

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

Get sfDestinationTag (soeOPTIONAL)

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

Definition at line 126 of file protocol_autogen/transactions/PaymentChannelCreate.h.

◆ hasDestinationTag()

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

Check if sfDestinationTag is present.

Returns
True if the field is present, false otherwise.

Definition at line 141 of file protocol_autogen/transactions/PaymentChannelCreate.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::PaymentChannelCreate::txType = ttPAYCHAN_CREATE
staticconstexpr

◆ 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.