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 DIDSet");
60 return this->
tx_->at(sfDIDDocument);
73 return this->
tx_->isFieldPresent(sfDIDDocument);
86 return this->
tx_->at(sfURI);
99 return this->
tx_->isFieldPresent(sfURI);
112 return this->
tx_->at(sfData);
125 return this->
tx_->isFieldPresent(sfData);
160 if (tx->getTxnType() != ttDID_SET)
176 object_[sfDIDDocument] = value;
211 sign(publicKey, secretKey);
Builder for DIDSet transactions.
DIDSetBuilder & setDIDDocument(std::decay_t< typename SF_VL::type::value_type > const &value)
Transaction-specific field setters.
DIDSetBuilder(std::shared_ptr< STTx const > tx)
Construct a DIDSetBuilder from an existing STTx object.
DIDSetBuilder(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 DIDSetBuilder with required fields.
DIDSetBuilder & setData(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfData (SoeOptional).
DIDSetBuilder & setURI(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfURI (SoeOptional).
DIDSet build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the DIDSet wrapper.
DIDSet(std::shared_ptr< STTx const > tx)
Construct a DIDSet transaction wrapper from an existing STTx object.
static constexpr xrpl::TxType txType
protocol_autogen::Optional< SF_VL::type::value_type > getData() const
Get sfData (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getDIDDocument() const
Get sfDIDDocument (SoeOptional).
protocol_autogen::Optional< SF_VL::type::value_type > getURI() const
Get sfURI (SoeOptional).
bool hasDIDDocument() const
Check if sfDIDDocument is present.
bool hasData() const
Check if sfData is present.
bool hasURI() const
Check if sfURI 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
DIDSetBuilder & 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.