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 ConfidentialMPTConvertBack");
55 SF_UINT192::type::value_type
58 return this->
tx_->at(sfMPTokenIssuanceID);
66 SF_UINT64::type::value_type
69 return this->
tx_->at(sfMPTAmount);
77 SF_VL::type::value_type
80 return this->
tx_->at(sfHolderEncryptedAmount);
88 SF_VL::type::value_type
91 return this->
tx_->at(sfIssuerEncryptedAmount);
104 return this->
tx_->at(sfAuditorEncryptedAmount);
117 return this->
tx_->isFieldPresent(sfAuditorEncryptedAmount);
125 SF_UINT256::type::value_type
128 return this->
tx_->at(sfBlindingFactor);
136 SF_VL::type::value_type
139 return this->
tx_->at(sfZKProof);
147 SF_VL::type::value_type
150 return this->
tx_->at(sfBalanceCommitment);
199 if (tx->getTxnType() != ttCONFIDENTIAL_MPT_CONVERT_BACK)
201 throw std::runtime_error(
"Invalid transaction type for ConfidentialMPTConvertBackBuilder");
215 object_[sfMPTokenIssuanceID] = value;
237 object_[sfHolderEncryptedAmount] = value;
248 object_[sfIssuerEncryptedAmount] = value;
259 object_[sfAuditorEncryptedAmount] = value;
270 object_[sfBlindingFactor] = value;
292 object_[sfBalanceCommitment] = value;
305 sign(publicKey, secretKey);
Builder for ConfidentialMPTConvertBack transactions.
ConfidentialMPTConvertBackBuilder & setHolderEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfHolderEncryptedAmount (SoeRequired).
ConfidentialMPTConvertBackBuilder & setBalanceCommitment(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfBalanceCommitment (SoeRequired).
ConfidentialMPTConvertBackBuilder & setMPTokenIssuanceID(std::decay_t< typename SF_UINT192::type::value_type > const &value)
Transaction-specific field setters.
ConfidentialMPTConvertBackBuilder(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::decay_t< typename SF_VL::type::value_type > const &zKProof, std::decay_t< typename SF_VL::type::value_type > const &balanceCommitment, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new ConfidentialMPTConvertBackBuilder with required fields.
ConfidentialMPTConvertBackBuilder & setIssuerEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfIssuerEncryptedAmount (SoeRequired).
ConfidentialMPTConvertBackBuilder & setMPTAmount(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfMPTAmount (SoeRequired).
ConfidentialMPTConvertBackBuilder & setAuditorEncryptedAmount(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfAuditorEncryptedAmount (SoeOptional).
ConfidentialMPTConvertBackBuilder & setZKProof(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfZKProof (SoeRequired).
ConfidentialMPTConvertBackBuilder(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTConvertBackBuilder from an existing STTx object.
ConfidentialMPTConvertBackBuilder & setBlindingFactor(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfBlindingFactor (SoeRequired).
ConfidentialMPTConvertBack build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the ConfidentialMPTConvertBack wrapper.
Transaction: ConfidentialMPTConvertBack.
SF_UINT64::type::value_type getMPTAmount() const
Get sfMPTAmount (SoeRequired).
SF_UINT256::type::value_type getBlindingFactor() const
Get sfBlindingFactor (SoeRequired).
SF_VL::type::value_type getIssuerEncryptedAmount() const
Get sfIssuerEncryptedAmount (SoeRequired).
protocol_autogen::Optional< SF_VL::type::value_type > getAuditorEncryptedAmount() const
Get sfAuditorEncryptedAmount (SoeOptional).
bool hasAuditorEncryptedAmount() const
Check if sfAuditorEncryptedAmount is present.
SF_VL::type::value_type getZKProof() const
Get sfZKProof (SoeRequired).
SF_VL::type::value_type getHolderEncryptedAmount() const
Get sfHolderEncryptedAmount (SoeRequired).
SF_VL::type::value_type getBalanceCommitment() const
Get sfBalanceCommitment (SoeRequired).
ConfidentialMPTConvertBack(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTConvertBack transaction wrapper from an existing STTx object.
static constexpr xrpl::TxType txType
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
ConfidentialMPTConvertBackBuilder & 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.