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 SponsorshipSet");
60 return this->
tx_->at(sfCounterpartySponsor);
73 return this->
tx_->isFieldPresent(sfCounterpartySponsor);
86 return this->
tx_->at(sfSponsee);
99 return this->
tx_->isFieldPresent(sfSponsee);
112 return this->
tx_->at(sfFeeAmountDelta);
125 return this->
tx_->isFieldPresent(sfFeeAmountDelta);
138 return this->
tx_->at(sfMaxFee);
151 return this->
tx_->isFieldPresent(sfMaxFee);
164 return this->
tx_->at(sfRemainingOwnerCountDelta);
177 return this->
tx_->isFieldPresent(sfRemainingOwnerCountDelta);
212 if (tx->getTxnType() != ttSPONSORSHIP_SET)
230 object_[sfCounterpartySponsor] = value;
252 object_[sfFeeAmountDelta] = value;
274 object_[sfRemainingOwnerCountDelta] = value;
287 sign(publicKey, secretKey);
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
SponsorshipSetBuilder & 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.