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 ConfidentialMPTConvert");
55 SF_UINT192::type::value_type
58 return this->
tx_->at(sfMPTokenIssuanceID);
66 SF_UINT64::type::value_type
69 return this->
tx_->at(sfMPTAmount);
82 return this->
tx_->at(sfHolderEncryptionKey);
95 return this->
tx_->isFieldPresent(sfHolderEncryptionKey);
103 SF_VL::type::value_type
106 return this->
tx_->at(sfHolderEncryptedAmount);
114 SF_VL::type::value_type
117 return this->
tx_->at(sfIssuerEncryptedAmount);
130 return this->
tx_->at(sfAuditorEncryptedAmount);
143 return this->
tx_->isFieldPresent(sfAuditorEncryptedAmount);
151 SF_UINT256::type::value_type
154 return this->
tx_->at(sfBlindingFactor);
167 return this->
tx_->at(sfZKProof);
180 return this->
tx_->isFieldPresent(sfZKProof);
225 if (tx->getTxnType() != ttCONFIDENTIAL_MPT_CONVERT)
227 throw std::runtime_error(
"Invalid transaction type for ConfidentialMPTConvertBuilder");
241 object_[sfMPTokenIssuanceID] = value;
263 object_[sfHolderEncryptionKey] = value;
274 object_[sfHolderEncryptedAmount] = value;
285 object_[sfIssuerEncryptedAmount] = value;
296 object_[sfAuditorEncryptedAmount] = value;
307 object_[sfBlindingFactor] = value;
331 sign(publicKey, secretKey);
Builder for ConfidentialMPTConvert transactions.
ConfidentialMPTConvertBuilder & setZKProof(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfZKProof (SoeOptional).
ConfidentialMPTConvertBuilder & setAuditorEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfAuditorEncryptedAmount (SoeOptional).
ConfidentialMPTConvertBuilder & setHolderEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfHolderEncryptedAmount (SoeRequired).
ConfidentialMPTConvertBuilder & setHolderEncryptionKey(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfHolderEncryptionKey (SoeOptional).
ConfidentialMPTConvertBuilder & setMPTokenIssuanceID(std::decay_t< typename SF_UINT192::type::value_type > const &value)
Transaction-specific field setters.
ConfidentialMPTConvertBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT192::type::value_type > const &mPTokenIssuanceID, std::decay_t< typename SF_UINT64::type::value_type > const &mPTAmount, std::decay_t< typename SF_VL::type::value_type > const &holderEncryptedAmount, std::decay_t< typename SF_VL::type::value_type > const &issuerEncryptedAmount, std::decay_t< typename SF_UINT256::type::value_type > const &blindingFactor, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new ConfidentialMPTConvertBuilder with required fields.
ConfidentialMPTConvertBuilder(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTConvertBuilder from an existing STTx object.
ConfidentialMPTConvertBuilder & setMPTAmount(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfMPTAmount (SoeRequired).
ConfidentialMPTConvertBuilder & setBlindingFactor(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfBlindingFactor (SoeRequired).
ConfidentialMPTConvert build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the ConfidentialMPTConvert wrapper.
ConfidentialMPTConvertBuilder & setIssuerEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfIssuerEncryptedAmount (SoeRequired).
Transaction: ConfidentialMPTConvert.
SF_VL::type::value_type getIssuerEncryptedAmount() const
Get sfIssuerEncryptedAmount (SoeRequired).
static constexpr xrpl::TxType txType
bool hasHolderEncryptionKey() const
Check if sfHolderEncryptionKey is present.
SF_UINT256::type::value_type getBlindingFactor() const
Get sfBlindingFactor (SoeRequired).
SF_UINT192::type::value_type getMPTokenIssuanceID() const
Get sfMPTokenIssuanceID (SoeRequired).
bool hasAuditorEncryptedAmount() const
Check if sfAuditorEncryptedAmount is present.
SF_VL::type::value_type getHolderEncryptedAmount() const
Get sfHolderEncryptedAmount (SoeRequired).
protocol_autogen::Optional< SF_VL::type::value_type > getHolderEncryptionKey() const
Get sfHolderEncryptionKey (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getZKProof() const
Get sfZKProof (SoeOptional).
ConfidentialMPTConvert(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTConvert transaction wrapper from an existing STTx object.
bool hasZKProof() const
Check if sfZKProof is present.
SF_UINT64::type::value_type getMPTAmount() const
Get sfMPTAmount (SoeRequired).
protocol_autogen::Optional< SF_VL::type::value_type > getAuditorEncryptedAmount() const
Get sfAuditorEncryptedAmount (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
ConfidentialMPTConvertBuilder & 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.