4#include <xrpl/protocol/STTx.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/TransactionBase.h>
8#include <xrpl/protocol_autogen/TransactionBuilderBase.h>
9#include <xrpl/json/json_value.h>
44 throw std::runtime_error(
"Invalid transaction type for LoanBrokerSet");
55 SF_UINT256::type::value_type
58 return this->
tx_->at(sfVaultID);
71 return this->
tx_->at(sfLoanBrokerID);
84 return this->
tx_->isFieldPresent(sfLoanBrokerID);
97 return this->
tx_->at(sfData);
110 return this->
tx_->isFieldPresent(sfData);
123 return this->
tx_->at(sfManagementFeeRate);
136 return this->
tx_->isFieldPresent(sfManagementFeeRate);
149 return this->
tx_->at(sfDebtMaximum);
162 return this->
tx_->isFieldPresent(sfDebtMaximum);
175 return this->
tx_->at(sfCoverRateMinimum);
188 return this->
tx_->isFieldPresent(sfCoverRateMinimum);
201 return this->
tx_->at(sfCoverRateLiquidation);
214 return this->
tx_->isFieldPresent(sfCoverRateLiquidation);
251 if (tx->getTxnType() != ttLOAN_BROKER_SET)
278 object_[sfLoanBrokerID] = value;
300 object_[sfManagementFeeRate] = value;
311 object_[sfDebtMaximum] = value;
322 object_[sfCoverRateMinimum] = value;
333 object_[sfCoverRateLiquidation] = value;
346 sign(publicKey, secretKey);
Builder for LoanBrokerSet transactions.
LoanBrokerSetBuilder & setLoanBrokerID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfLoanBrokerID (SoeOptional).
LoanBrokerSetBuilder & setData(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfData (SoeOptional).
LoanBrokerSetBuilder & setVaultID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Transaction-specific field setters.
LoanBrokerSetBuilder & setCoverRateLiquidation(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCoverRateLiquidation (SoeOptional).
LoanBrokerSetBuilder(std::shared_ptr< STTx const > tx)
Construct a LoanBrokerSetBuilder from an existing STTx object.
LoanBrokerSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT256::type::value_type > const &vaultID, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new LoanBrokerSetBuilder with required fields.
LoanBrokerSetBuilder & setManagementFeeRate(std::decay_t< typename SF_UINT16::type::value_type > const &value)
Set sfManagementFeeRate (SoeOptional).
LoanBrokerSetBuilder & setDebtMaximum(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfDebtMaximum (SoeOptional).
LoanBrokerSet build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the LoanBrokerSet wrapper.
LoanBrokerSetBuilder & setCoverRateMinimum(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCoverRateMinimum (SoeOptional).
Transaction: LoanBrokerSet.
bool hasDebtMaximum() const
Check if sfDebtMaximum is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateMinimum() const
Get sfCoverRateMinimum (SoeOptional).
SF_UINT256::type::value_type getVaultID() const
Get sfVaultID (SoeRequired).
bool hasData() const
Check if sfData is present.
LoanBrokerSet(std::shared_ptr< STTx const > tx)
Construct a LoanBrokerSet transaction wrapper from an existing STTx object.
bool hasManagementFeeRate() const
Check if sfManagementFeeRate is present.
bool hasLoanBrokerID() const
Check if sfLoanBrokerID is present.
protocol_autogen::Optional< SF_UINT256::type::value_type > getLoanBrokerID() const
Get sfLoanBrokerID (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateLiquidation() const
Get sfCoverRateLiquidation (SoeOptional).
protocol_autogen::Optional< SF_NUMBER::type::value_type > getDebtMaximum() const
Get sfDebtMaximum (SoeOptional).
static constexpr xrpl::TxType txType
bool hasCoverRateLiquidation() const
Check if sfCoverRateLiquidation is present.
bool hasCoverRateMinimum() const
Check if sfCoverRateMinimum is present.
protocol_autogen::Optional< SF_UINT16::type::value_type > getManagementFeeRate() const
Get sfManagementFeeRate (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getData() const
Get sfData (SoeOptional).
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
TransactionBase(std::shared_ptr< STTx const > tx)
Construct a transaction wrapper from an existing STTx object.
TransactionBuilderBase()=default
LoanBrokerSetBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
std::conditional_t< std::is_reference_v< ValueType >, std::optional< std::reference_wrapper< std::remove_reference_t< ValueType > > >, std::optional< ValueType > > Optional
TxType
Transaction type identifiers.