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 ConfidentialMPTHolderKeyUpdate");
55 SF_UINT192::type::value_type
58 return this->
tx_->at(sfMPTokenIssuanceID);
71 return this->
tx_->at(sfHolderEncryptionKey);
84 return this->
tx_->isFieldPresent(sfHolderEncryptionKey);
97 return this->
tx_->at(sfConfidentialBalanceSpending);
110 return this->
tx_->isFieldPresent(sfConfidentialBalanceSpending);
123 return this->
tx_->at(sfConfidentialBalanceInbox);
136 return this->
tx_->isFieldPresent(sfConfidentialBalanceInbox);
149 return this->
tx_->at(sfZKProof);
162 return this->
tx_->isFieldPresent(sfZKProof);
199 if (tx->getTxnType() != ttCONFIDENTIAL_MPT_HOLDER_KEY_UPDATE)
201 throw std::runtime_error(
"Invalid transaction type for ConfidentialMPTHolderKeyUpdateBuilder");
217 object_[sfMPTokenIssuanceID] = value;
228 object_[sfHolderEncryptionKey] = value;
239 object_[sfConfidentialBalanceSpending] = value;
250 object_[sfConfidentialBalanceInbox] = value;
274 sign(publicKey, secretKey);
Builder for ConfidentialMPTHolderKeyUpdate transactions.
ConfidentialMPTHolderKeyUpdateBuilder & setConfidentialBalanceInbox(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfConfidentialBalanceInbox (SoeOptional).
ConfidentialMPTHolderKeyUpdateBuilder & setZKProof(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfZKProof (SoeOptional).
ConfidentialMPTHolderKeyUpdateBuilder & setMPTokenIssuanceID(std::decay_t< typename SF_UINT192::type::value_type > const &value)
Transaction-specific field setters.
ConfidentialMPTHolderKeyUpdateBuilder & setHolderEncryptionKey(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfHolderEncryptionKey (SoeOptional).
ConfidentialMPTHolderKeyUpdateBuilder & setConfidentialBalanceSpending(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfConfidentialBalanceSpending (SoeOptional).
ConfidentialMPTHolderKeyUpdateBuilder(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTHolderKeyUpdateBuilder from an existing STTx object.
ConfidentialMPTHolderKeyUpdateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT192::type::value_type > const &mPTokenIssuanceID, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new ConfidentialMPTHolderKeyUpdateBuilder with required fields.
ConfidentialMPTHolderKeyUpdate build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the ConfidentialMPTHolderKeyUpdate wrapper.
Transaction: ConfidentialMPTHolderKeyUpdate.
protocol_autogen::Optional< SF_VL::type::value_type > getConfidentialBalanceInbox() const
Get sfConfidentialBalanceInbox (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getZKProof() const
Get sfZKProof (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getConfidentialBalanceSpending() const
Get sfConfidentialBalanceSpending (SoeOptional).
bool hasConfidentialBalanceSpending() const
Check if sfConfidentialBalanceSpending is present.
static constexpr xrpl::TxType txType
bool hasZKProof() const
Check if sfZKProof is present.
SF_UINT192::type::value_type getMPTokenIssuanceID() const
Get sfMPTokenIssuanceID (SoeRequired).
bool hasConfidentialBalanceInbox() const
Check if sfConfidentialBalanceInbox is present.
protocol_autogen::Optional< SF_VL::type::value_type > getHolderEncryptionKey() const
Get sfHolderEncryptionKey (SoeOptional).
ConfidentialMPTHolderKeyUpdate(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTHolderKeyUpdate transaction wrapper from an existing STTx object.
bool hasHolderEncryptionKey() const
Check if sfHolderEncryptionKey is present.
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
ConfidentialMPTHolderKeyUpdateBuilder & 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.