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>
16class DepositPreauthBuilder;
60 return this->
tx_->at(sfAuthorize);
73 return this->
tx_->isFieldPresent(sfAuthorize);
86 return this->
tx_->at(sfUnauthorize);
99 return this->
tx_->isFieldPresent(sfUnauthorize);
110 if (this->
tx_->isFieldPresent(sfAuthorizeCredentials))
111 return this->
tx_->getFieldArray(sfAuthorizeCredentials);
123 return this->
tx_->isFieldPresent(sfAuthorizeCredentials);
134 if (this->
tx_->isFieldPresent(sfUnauthorizeCredentials))
135 return this->
tx_->getFieldArray(sfUnauthorizeCredentials);
147 return this->
tx_->isFieldPresent(sfUnauthorizeCredentials);
182 if (tx->getTxnType() != ttDEPOSIT_PREAUTH)
209 object_[sfUnauthorize] = value;
244 sign(publicKey, secretKey);
void setFieldArray(SField const &field, STArray const &v)
Builder for DepositPreauth transactions.
DepositPreauthBuilder & setUnauthorize(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfUnauthorize (soeOPTIONAL)
DepositPreauthBuilder & setAuthorizeCredentials(STArray const &value)
Set sfAuthorizeCredentials (soeOPTIONAL)
DepositPreauthBuilder(std::shared_ptr< STTx const > tx)
Construct a DepositPreauthBuilder from an existing STTx object.
DepositPreauthBuilder(SF_ACCOUNT::type::value_type account, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new DepositPreauthBuilder with required fields.
DepositPreauth build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the DepositPreauth wrapper.
DepositPreauthBuilder & setUnauthorizeCredentials(STArray const &value)
Set sfUnauthorizeCredentials (soeOPTIONAL)
DepositPreauthBuilder & setAuthorize(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Transaction-specific field setters.
Transaction: DepositPreauth.
bool hasAuthorize() const
Check if sfAuthorize is present.
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getAuthorize() const
Get sfAuthorize (soeOPTIONAL)
bool hasUnauthorizeCredentials() const
Check if sfUnauthorizeCredentials is present.
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getUnauthorize() const
Get sfUnauthorize (soeOPTIONAL)
std::optional< std::reference_wrapper< STArray const > > getUnauthorizeCredentials() const
Get sfUnauthorizeCredentials (soeOPTIONAL)
bool hasUnauthorize() const
Check if sfUnauthorize is present.
static constexpr xrpl::TxType txType
bool hasAuthorizeCredentials() const
Check if sfAuthorizeCredentials is present.
std::optional< std::reference_wrapper< STArray const > > getAuthorizeCredentials() const
Get sfAuthorizeCredentials (soeOPTIONAL)
DepositPreauth(std::shared_ptr< STTx const > tx)
Construct a DepositPreauth transaction wrapper from an existing STTx object.
Base class for all transaction wrapper types.
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
Base class for all transaction builders.
DepositPreauthBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
TxType
Transaction type identifiers.