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

Builder for LoanPay transactions. More...

#include <LoanPay.h>

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

Public Member Functions

 LoanPayBuilder (SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT256::type::value_type > const &loanID, std::decay_t< typename SF_AMOUNT::type::value_type > const &amount, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
 Construct a new LoanPayBuilder with required fields.
 
 LoanPayBuilder (std::shared_ptr< STTx const > tx)
 Construct a LoanPayBuilder from an existing STTx object.
 
LoanPayBuildersetLoanID (std::decay_t< typename SF_UINT256::type::value_type > const &value)
 Transaction-specific field setters.
 
LoanPayBuildersetAmount (std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
 Set sfAmount (soeREQUIRED)
 
LoanPay build (PublicKey const &publicKey, SecretKey const &secretKey)
 Build and return the LoanPay wrapper.
 
LoanPayBuildersetAccount (AccountID const &value)
 Set the account that is sending the transaction.
 
LoanPayBuildersetFee (STAmount const &value)
 Set the transaction fee.
 
LoanPayBuildersetSequence (std::uint32_t const &value)
 Set the sequence number.
 
LoanPayBuildersetTicketSequence (std::uint32_t const &value)
 Set the ticket sequence to use for this transaction.
 
LoanPayBuildersetFlags (std::uint32_t const &value)
 Set transaction flags.
 
LoanPayBuildersetSourceTag (std::uint32_t const &value)
 Set the source tag.
 
LoanPayBuildersetLastLedgerSequence (std::uint32_t const &value)
 Set the last ledger sequence.
 
LoanPayBuildersetAccountTxnID (uint256 const &value)
 Set the account transaction ID.
 
LoanPayBuildersetPreviousTxnID (uint256 const &value)
 Set the previous transaction ID.
 
LoanPayBuildersetOperationLimit (std::uint32_t const &value)
 Set the operation limit.
 
LoanPayBuildersetMemos (STArray const &value)
 Set the memos array.
 
LoanPayBuildersetSigners (STArray const &value)
 Set the signers array for multi-signing.
 
LoanPayBuildersetNetworkID (std::uint32_t const &value)
 Set the network ID.
 
LoanPayBuildersetDelegate (AccountID const &value)
 Set the delegate account for delegated transactions.
 
STObject const & getSTObject () const
 Get the underlying STObject.
 

Protected Member Functions

LoanPayBuildersign (PublicKey const &publicKey, SecretKey const &secretKey)
 Sign the transaction with the given keys.
 

Protected Attributes

STObject object_
 

Detailed Description

Builder for LoanPay transactions.

Provides a fluent interface for constructing transactions with method chaining. Uses Json::Value internally for flexible transaction construction. Inherits common field setters from TransactionBuilderBase.

Definition at line 81 of file protocol_autogen/transactions/LoanPay.h.

Constructor & Destructor Documentation

◆ LoanPayBuilder() [1/2]

xrpl::transactions::LoanPayBuilder::LoanPayBuilder ( SF_ACCOUNT::type::value_type  account,
std::decay_t< typename SF_UINT256::type::value_type > const &  loanID,
std::decay_t< typename SF_AMOUNT::type::value_type > const &  amount,
std::optional< SF_UINT32::type::value_type >  sequence = std::nullopt,
std::optional< SF_AMOUNT::type::value_type >  fee = std::nullopt 
)

Construct a new LoanPayBuilder with required fields.

Parameters
accountThe account initiating the transaction.
loanIDThe sfLoanID field value.
amountThe sfAmount field value.
sequenceOptional sequence number for the transaction.
feeOptional fee for the transaction.

Definition at line 92 of file protocol_autogen/transactions/LoanPay.h.

◆ LoanPayBuilder() [2/2]

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

Construct a LoanPayBuilder from an existing STTx object.

Parameters
txThe existing transaction to copy from.
Exceptions
std::runtime_errorif the transaction type doesn't match.

Definition at line 107 of file protocol_autogen/transactions/LoanPay.h.

Member Function Documentation

◆ setLoanID()

LoanPayBuilder & xrpl::transactions::LoanPayBuilder::setLoanID ( std::decay_t< typename SF_UINT256::type::value_type > const &  value)

Transaction-specific field setters.

Set sfLoanID (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 123 of file protocol_autogen/transactions/LoanPay.h.

◆ setAmount()

LoanPayBuilder & xrpl::transactions::LoanPayBuilder::setAmount ( std::decay_t< typename SF_AMOUNT::type::value_type > const &  value)

Set sfAmount (soeREQUIRED)

Note
This field supports MPT (Multi-Purpose Token) amounts.
Returns
Reference to this builder for method chaining.

Definition at line 135 of file protocol_autogen/transactions/LoanPay.h.

◆ build()

LoanPay xrpl::transactions::LoanPayBuilder::build ( PublicKey const &  publicKey,
SecretKey const &  secretKey 
)

Build and return the LoanPay wrapper.

Parameters
publicKeyThe public key for signing.
secretKeyThe secret key for signing.
Returns
The constructed transaction wrapper.

Definition at line 148 of file protocol_autogen/transactions/LoanPay.h.

◆ setAccount()

Set the account that is sending the transaction.

Parameters
valueAccount address (typically as a string)
Returns
Reference to the derived builder for method chaining.

Definition at line 62 of file TransactionBuilderBase.h.

◆ setFee()

Set the transaction fee.

Parameters
valueFee in drops (typically as a string or number)
Returns
Reference to the derived builder for method chaining.

Definition at line 74 of file TransactionBuilderBase.h.

◆ setSequence()

Set the sequence number.

Parameters
valueSequence number
Returns
Reference to the derived builder for method chaining.

Definition at line 86 of file TransactionBuilderBase.h.

◆ setTicketSequence()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::setTicketSequence ( std::uint32_t const &  value)
inherited

Set the ticket sequence to use for this transaction.

When using a ticket, the regular sequence number is set to 0.

Parameters
valueTicket sequence number
Returns
Reference to the derived builder for method chaining.

Definition at line 99 of file TransactionBuilderBase.h.

◆ setFlags()

Set transaction flags.

Parameters
valueFlags value
Returns
Reference to the derived builder for method chaining.

Definition at line 112 of file TransactionBuilderBase.h.

◆ setSourceTag()

Set the source tag.

Parameters
valueSource tag
Returns
Reference to the derived builder for method chaining.

Definition at line 124 of file TransactionBuilderBase.h.

◆ setLastLedgerSequence()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::setLastLedgerSequence ( std::uint32_t const &  value)
inherited

Set the last ledger sequence.

Parameters
valueLast ledger sequence number
Returns
Reference to the derived builder for method chaining.

Definition at line 136 of file TransactionBuilderBase.h.

◆ setAccountTxnID()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::setAccountTxnID ( uint256 const &  value)
inherited

Set the account transaction ID.

Parameters
valueAccount transaction ID (typically as a hex string)
Returns
Reference to the derived builder for method chaining.

Definition at line 148 of file TransactionBuilderBase.h.

◆ setPreviousTxnID()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::setPreviousTxnID ( uint256 const &  value)
inherited

Set the previous transaction ID.

Used for emulate027 compatibility.

Parameters
valuePrevious transaction ID
Returns
Reference to the derived builder for method chaining.

Definition at line 161 of file TransactionBuilderBase.h.

◆ setOperationLimit()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::setOperationLimit ( std::uint32_t const &  value)
inherited

Set the operation limit.

Parameters
valueOperation limit
Returns
Reference to the derived builder for method chaining.

Definition at line 173 of file TransactionBuilderBase.h.

◆ setMemos()

Set the memos array.

Parameters
valueArray of memo objects
Returns
Reference to the derived builder for method chaining.

Definition at line 185 of file TransactionBuilderBase.h.

◆ setSigners()

Set the signers array for multi-signing.

Parameters
valueArray of signer objects
Returns
Reference to the derived builder for method chaining.

Definition at line 197 of file TransactionBuilderBase.h.

◆ setNetworkID()

Set the network ID.

Parameters
valueNetwork ID
Returns
Reference to the derived builder for method chaining.

Definition at line 209 of file TransactionBuilderBase.h.

◆ setDelegate()

Set the delegate account for delegated transactions.

Parameters
valueDelegate account ID
Returns
Reference to the derived builder for method chaining.

Definition at line 221 of file TransactionBuilderBase.h.

◆ getSTObject()

STObject const & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::getSTObject ( ) const
inherited

Get the underlying STObject.

Returns
The STObject

Definition at line 232 of file TransactionBuilderBase.h.

◆ sign()

LoanPayBuilder & xrpl::transactions::TransactionBuilderBase< LoanPayBuilder >::sign ( PublicKey const &  publicKey,
SecretKey const &  secretKey 
)
protectedinherited

Sign the transaction with the given keys.

This sets the SigningPubKey field and computes the TxnSignature.

Parameters
publicKeyThe public key for signing
secretKeyThe secret key for signing
Returns
Reference to the derived builder for method chaining.

Definition at line 248 of file TransactionBuilderBase.h.

Member Data Documentation

◆ object_

Definition at line 266 of file TransactionBuilderBase.h.