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>
16class OracleSetBuilder;
55 SF_UINT32::type::value_type
58 return this->
tx_->at(sfOracleDocumentID);
71 return this->
tx_->at(sfProvider);
84 return this->
tx_->isFieldPresent(sfProvider);
97 return this->
tx_->at(sfURI);
110 return this->
tx_->isFieldPresent(sfURI);
123 return this->
tx_->at(sfAssetClass);
136 return this->
tx_->isFieldPresent(sfAssetClass);
144 SF_UINT32::type::value_type
147 return this->
tx_->at(sfLastUpdateTime);
158 return this->
tx_->getFieldArray(sfPriceDataSeries);
199 if (tx->getTxnType() != ttORACLE_SET)
215 object_[sfOracleDocumentID] = value;
259 object_[sfLastUpdateTime] = value;
283 sign(publicKey, secretKey);
void setFieldArray(SField const &field, STArray const &v)
Builder for OracleSet transactions.
OracleSetBuilder & setAssetClass(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfAssetClass (soeOPTIONAL)
OracleSet build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the OracleSet wrapper.
OracleSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT32::type::value_type > const &oracleDocumentID, std::decay_t< typename SF_UINT32::type::value_type > const &lastUpdateTime, STArray const &priceDataSeries, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new OracleSetBuilder with required fields.
OracleSetBuilder & setProvider(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfProvider (soeOPTIONAL)
OracleSetBuilder & setLastUpdateTime(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfLastUpdateTime (soeREQUIRED)
OracleSetBuilder & setURI(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfURI (soeOPTIONAL)
OracleSetBuilder & setOracleDocumentID(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Transaction-specific field setters.
OracleSetBuilder & setPriceDataSeries(STArray const &value)
Set sfPriceDataSeries (soeREQUIRED)
OracleSetBuilder(std::shared_ptr< STTx const > tx)
Construct a OracleSetBuilder from an existing STTx object.
bool hasProvider() const
Check if sfProvider is present.
STArray const & getPriceDataSeries() const
Get sfPriceDataSeries (soeREQUIRED)
OracleSet(std::shared_ptr< STTx const > tx)
Construct a OracleSet transaction wrapper from an existing STTx object.
SF_UINT32::type::value_type getLastUpdateTime() const
Get sfLastUpdateTime (soeREQUIRED)
SF_UINT32::type::value_type getOracleDocumentID() const
Get sfOracleDocumentID (soeREQUIRED)
bool hasAssetClass() const
Check if sfAssetClass is present.
protocol_autogen::Optional< SF_VL::type::value_type > getProvider() const
Get sfProvider (soeOPTIONAL)
bool hasURI() const
Check if sfURI is present.
static constexpr xrpl::TxType txType
protocol_autogen::Optional< SF_VL::type::value_type > getAssetClass() const
Get sfAssetClass (soeOPTIONAL)
protocol_autogen::Optional< SF_VL::type::value_type > getURI() const
Get sfURI (soeOPTIONAL)
Base class for all transaction wrapper types.
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
Base class for all transaction builders.
OracleSetBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
TxType
Transaction type identifiers.