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

Builder for LoanSet transactions. More...

#include <LoanSet.h>

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

Public Member Functions

 LoanSetBuilder (SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT256::type::value_type > const &loanBrokerID, std::decay_t< typename SF_NUMBER::type::value_type > const &principalRequested, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
 Construct a new LoanSetBuilder with required fields.
 
 LoanSetBuilder (std::shared_ptr< STTx const > tx)
 Construct a LoanSetBuilder from an existing STTx object.
 
LoanSetBuildersetLoanBrokerID (std::decay_t< typename SF_UINT256::type::value_type > const &value)
 Transaction-specific field setters.
 
LoanSetBuildersetData (std::decay_t< typename SF_VL::type::value_type > const &value)
 Set sfData (soeOPTIONAL)
 
LoanSetBuildersetCounterparty (std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
 Set sfCounterparty (soeOPTIONAL)
 
LoanSetBuildersetCounterpartySignature (STObject const &value)
 Set sfCounterpartySignature (soeOPTIONAL)
 
LoanSetBuildersetLoanOriginationFee (std::decay_t< typename SF_NUMBER::type::value_type > const &value)
 Set sfLoanOriginationFee (soeOPTIONAL)
 
LoanSetBuildersetLoanServiceFee (std::decay_t< typename SF_NUMBER::type::value_type > const &value)
 Set sfLoanServiceFee (soeOPTIONAL)
 
LoanSetBuildersetLatePaymentFee (std::decay_t< typename SF_NUMBER::type::value_type > const &value)
 Set sfLatePaymentFee (soeOPTIONAL)
 
LoanSetBuildersetClosePaymentFee (std::decay_t< typename SF_NUMBER::type::value_type > const &value)
 Set sfClosePaymentFee (soeOPTIONAL)
 
LoanSetBuildersetOverpaymentFee (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfOverpaymentFee (soeOPTIONAL)
 
LoanSetBuildersetInterestRate (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfInterestRate (soeOPTIONAL)
 
LoanSetBuildersetLateInterestRate (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfLateInterestRate (soeOPTIONAL)
 
LoanSetBuildersetCloseInterestRate (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfCloseInterestRate (soeOPTIONAL)
 
LoanSetBuildersetOverpaymentInterestRate (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfOverpaymentInterestRate (soeOPTIONAL)
 
LoanSetBuildersetPrincipalRequested (std::decay_t< typename SF_NUMBER::type::value_type > const &value)
 Set sfPrincipalRequested (soeREQUIRED)
 
LoanSetBuildersetPaymentTotal (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfPaymentTotal (soeOPTIONAL)
 
LoanSetBuildersetPaymentInterval (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfPaymentInterval (soeOPTIONAL)
 
LoanSetBuildersetGracePeriod (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfGracePeriod (soeOPTIONAL)
 
LoanSet build (PublicKey const &publicKey, SecretKey const &secretKey)
 Build and return the LoanSet wrapper.
 
LoanSetBuildersetAccount (AccountID const &value)
 Set the account that is sending the transaction.
 
LoanSetBuildersetFee (STAmount const &value)
 Set the transaction fee.
 
LoanSetBuildersetSequence (std::uint32_t const &value)
 Set the sequence number.
 
LoanSetBuildersetTicketSequence (std::uint32_t const &value)
 Set the ticket sequence to use for this transaction.
 
LoanSetBuildersetFlags (std::uint32_t const &value)
 Set transaction flags.
 
LoanSetBuildersetSourceTag (std::uint32_t const &value)
 Set the source tag.
 
LoanSetBuildersetLastLedgerSequence (std::uint32_t const &value)
 Set the last ledger sequence.
 
LoanSetBuildersetAccountTxnID (uint256 const &value)
 Set the account transaction ID.
 
LoanSetBuildersetPreviousTxnID (uint256 const &value)
 Set the previous transaction ID.
 
LoanSetBuildersetOperationLimit (std::uint32_t const &value)
 Set the operation limit.
 
LoanSetBuildersetMemos (STArray const &value)
 Set the memos array.
 
LoanSetBuildersetSigners (STArray const &value)
 Set the signers array for multi-signing.
 
LoanSetBuildersetNetworkID (std::uint32_t const &value)
 Set the network ID.
 
LoanSetBuildersetDelegate (AccountID const &value)
 Set the delegate account for delegated transactions.
 
STObject const & getSTObject () const
 Get the underlying STObject.
 

Protected Member Functions

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

Protected Attributes

STObject object_
 

Detailed Description

Builder for LoanSet 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 468 of file protocol_autogen/transactions/LoanSet.h.

Constructor & Destructor Documentation

◆ LoanSetBuilder() [1/2]

xrpl::transactions::LoanSetBuilder::LoanSetBuilder ( SF_ACCOUNT::type::value_type  account,
std::decay_t< typename SF_UINT256::type::value_type > const &  loanBrokerID,
std::decay_t< typename SF_NUMBER::type::value_type > const &  principalRequested,
std::optional< SF_UINT32::type::value_type >  sequence = std::nullopt,
std::optional< SF_AMOUNT::type::value_type >  fee = std::nullopt 
)

Construct a new LoanSetBuilder with required fields.

Parameters
accountThe account initiating the transaction.
loanBrokerIDThe sfLoanBrokerID field value.
principalRequestedThe sfPrincipalRequested field value.
sequenceOptional sequence number for the transaction.
feeOptional fee for the transaction.

Definition at line 479 of file protocol_autogen/transactions/LoanSet.h.

◆ LoanSetBuilder() [2/2]

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

Construct a LoanSetBuilder 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 494 of file protocol_autogen/transactions/LoanSet.h.

Member Function Documentation

◆ setLoanBrokerID()

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

Transaction-specific field setters.

Set sfLoanBrokerID (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 510 of file protocol_autogen/transactions/LoanSet.h.

◆ setData()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setData ( std::decay_t< typename SF_VL::type::value_type > const &  value)

Set sfData (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 521 of file protocol_autogen/transactions/LoanSet.h.

◆ setCounterparty()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setCounterparty ( std::decay_t< typename SF_ACCOUNT::type::value_type > const &  value)

Set sfCounterparty (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 532 of file protocol_autogen/transactions/LoanSet.h.

◆ setCounterpartySignature()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setCounterpartySignature ( STObject const &  value)

Set sfCounterpartySignature (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 543 of file protocol_autogen/transactions/LoanSet.h.

◆ setLoanOriginationFee()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setLoanOriginationFee ( std::decay_t< typename SF_NUMBER::type::value_type > const &  value)

Set sfLoanOriginationFee (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 554 of file protocol_autogen/transactions/LoanSet.h.

◆ setLoanServiceFee()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setLoanServiceFee ( std::decay_t< typename SF_NUMBER::type::value_type > const &  value)

Set sfLoanServiceFee (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 565 of file protocol_autogen/transactions/LoanSet.h.

◆ setLatePaymentFee()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setLatePaymentFee ( std::decay_t< typename SF_NUMBER::type::value_type > const &  value)

Set sfLatePaymentFee (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 576 of file protocol_autogen/transactions/LoanSet.h.

◆ setClosePaymentFee()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setClosePaymentFee ( std::decay_t< typename SF_NUMBER::type::value_type > const &  value)

Set sfClosePaymentFee (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 587 of file protocol_autogen/transactions/LoanSet.h.

◆ setOverpaymentFee()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setOverpaymentFee ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfOverpaymentFee (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 598 of file protocol_autogen/transactions/LoanSet.h.

◆ setInterestRate()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setInterestRate ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfInterestRate (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 609 of file protocol_autogen/transactions/LoanSet.h.

◆ setLateInterestRate()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setLateInterestRate ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfLateInterestRate (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 620 of file protocol_autogen/transactions/LoanSet.h.

◆ setCloseInterestRate()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setCloseInterestRate ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfCloseInterestRate (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 631 of file protocol_autogen/transactions/LoanSet.h.

◆ setOverpaymentInterestRate()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setOverpaymentInterestRate ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfOverpaymentInterestRate (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 642 of file protocol_autogen/transactions/LoanSet.h.

◆ setPrincipalRequested()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setPrincipalRequested ( std::decay_t< typename SF_NUMBER::type::value_type > const &  value)

Set sfPrincipalRequested (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 653 of file protocol_autogen/transactions/LoanSet.h.

◆ setPaymentTotal()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setPaymentTotal ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfPaymentTotal (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 664 of file protocol_autogen/transactions/LoanSet.h.

◆ setPaymentInterval()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setPaymentInterval ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfPaymentInterval (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 675 of file protocol_autogen/transactions/LoanSet.h.

◆ setGracePeriod()

LoanSetBuilder & xrpl::transactions::LoanSetBuilder::setGracePeriod ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfGracePeriod (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 686 of file protocol_autogen/transactions/LoanSet.h.

◆ build()

LoanSet xrpl::transactions::LoanSetBuilder::build ( PublicKey const &  publicKey,
SecretKey const &  secretKey 
)

Build and return the LoanSet wrapper.

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

Definition at line 699 of file protocol_autogen/transactions/LoanSet.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()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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< LoanSetBuilder >::getSTObject ( ) const
inherited

Get the underlying STObject.

Returns
The STObject

Definition at line 232 of file TransactionBuilderBase.h.

◆ sign()

LoanSetBuilder & xrpl::transactions::TransactionBuilderBase< LoanSetBuilder >::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.