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 ConfidentialMPTMirrorUpdate");
55 SF_UINT192::type::value_type
58 return this->
tx_->at(sfMPTokenIssuanceID);
71 return this->
tx_->at(sfHolder);
84 return this->
tx_->isFieldPresent(sfHolder);
97 return this->
tx_->at(sfIssuerEncryptedAmount);
110 return this->
tx_->isFieldPresent(sfIssuerEncryptedAmount);
123 return this->
tx_->at(sfAuditorEncryptedAmount);
136 return this->
tx_->isFieldPresent(sfAuditorEncryptedAmount);
144 SF_VL::type::value_type
147 return this->
tx_->at(sfZKProof);
186 if (tx->getTxnType() != ttCONFIDENTIAL_MPT_MIRROR_UPDATE)
188 throw std::runtime_error(
"Invalid transaction type for ConfidentialMPTMirrorUpdateBuilder");
204 object_[sfMPTokenIssuanceID] = value;
226 object_[sfIssuerEncryptedAmount] = value;
237 object_[sfAuditorEncryptedAmount] = value;
261 sign(publicKey, secretKey);
Builder for ConfidentialMPTMirrorUpdate transactions.
ConfidentialMPTMirrorUpdate build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the ConfidentialMPTMirrorUpdate wrapper.
ConfidentialMPTMirrorUpdateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT192::type::value_type > const &mPTokenIssuanceID, std::decay_t< typename SF_VL::type::value_type > const &zKProof, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new ConfidentialMPTMirrorUpdateBuilder with required fields.
ConfidentialMPTMirrorUpdateBuilder & setAuditorEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfAuditorEncryptedAmount (SoeOptional).
ConfidentialMPTMirrorUpdateBuilder & setMPTokenIssuanceID(std::decay_t< typename SF_UINT192::type::value_type > const &value)
Transaction-specific field setters.
ConfidentialMPTMirrorUpdateBuilder & setZKProof(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfZKProof (SoeRequired).
ConfidentialMPTMirrorUpdateBuilder & setIssuerEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfIssuerEncryptedAmount (SoeOptional).
ConfidentialMPTMirrorUpdateBuilder(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTMirrorUpdateBuilder from an existing STTx object.
ConfidentialMPTMirrorUpdateBuilder & setHolder(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfHolder (SoeOptional).
Transaction: ConfidentialMPTMirrorUpdate.
bool hasIssuerEncryptedAmount() const
Check if sfIssuerEncryptedAmount is present.
protocol_autogen::Optional< SF_VL::type::value_type > getAuditorEncryptedAmount() const
Get sfAuditorEncryptedAmount (SoeOptional).
static constexpr xrpl::TxType txType
ConfidentialMPTMirrorUpdate(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTMirrorUpdate transaction wrapper from an existing STTx object.
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getHolder() const
Get sfHolder (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getIssuerEncryptedAmount() const
Get sfIssuerEncryptedAmount (SoeOptional).
SF_VL::type::value_type getZKProof() const
Get sfZKProof (SoeRequired).
bool hasAuditorEncryptedAmount() const
Check if sfAuditorEncryptedAmount is present.
bool hasHolder() const
Check if sfHolder is present.
SF_UINT192::type::value_type getMPTokenIssuanceID() const
Get sfMPTokenIssuanceID (SoeRequired).
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
ConfidentialMPTMirrorUpdateBuilder & 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.