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 XChainAddAccountCreateAttestationBuilder;
44 throw std::runtime_error(
"Invalid transaction type for XChainAddAccountCreateAttestation");
55 SF_XCHAIN_BRIDGE::type::value_type
58 return this->
tx_->at(sfXChainBridge);
66 SF_ACCOUNT::type::value_type
69 return this->
tx_->at(sfAttestationSignerAccount);
77 SF_VL::type::value_type
80 return this->
tx_->at(sfPublicKey);
88 SF_VL::type::value_type
91 return this->
tx_->at(sfSignature);
99 SF_ACCOUNT::type::value_type
102 return this->
tx_->at(sfOtherChainSource);
110 SF_AMOUNT::type::value_type
113 return this->
tx_->at(sfAmount);
121 SF_ACCOUNT::type::value_type
124 return this->
tx_->at(sfAttestationRewardAccount);
132 SF_UINT8::type::value_type
135 return this->
tx_->at(sfWasLockingChainSend);
143 SF_UINT64::type::value_type
146 return this->
tx_->at(sfXChainAccountCreateCount);
154 SF_ACCOUNT::type::value_type
157 return this->
tx_->at(sfDestination);
165 SF_AMOUNT::type::value_type
168 return this->
tx_->at(sfSignatureReward);
200 std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge,
std::decay_t<typename SF_ACCOUNT::type::value_type> const& attestationSignerAccount,
std::decay_t<typename SF_VL::type::value_type> const& publicKey,
std::decay_t<typename SF_VL::type::value_type> const& signature,
std::decay_t<typename SF_ACCOUNT::type::value_type> const& otherChainSource,
std::decay_t<typename SF_AMOUNT::type::value_type> const& amount,
std::decay_t<typename SF_ACCOUNT::type::value_type> const& attestationRewardAccount,
std::decay_t<typename SF_UINT8::type::value_type> const& wasLockingChainSend,
std::decay_t<typename SF_UINT64::type::value_type> const& xChainAccountCreateCount,
std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination,
std::decay_t<typename SF_AMOUNT::type::value_type> const& signatureReward,
std::optional<SF_UINT32::type::value_type> sequence =
std::nullopt,
225 if (tx->getTxnType() != ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION)
227 throw std::runtime_error(
"Invalid transaction type for XChainAddAccountCreateAttestationBuilder");
241 object_[sfXChainBridge] = value;
252 object_[sfAttestationSignerAccount] = value;
285 object_[sfOtherChainSource] = value;
307 object_[sfAttestationRewardAccount] = value;
318 object_[sfWasLockingChainSend] = value;
329 object_[sfXChainAccountCreateCount] = value;
340 object_[sfDestination] = value;
351 object_[sfSignatureReward] = value;
364 sign(publicKey, secretKey);
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.
XChainAddAccountCreateAttestationBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
Builder for XChainAddAccountCreateAttestation transactions.
XChainAddAccountCreateAttestationBuilder & setOtherChainSource(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfOtherChainSource (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setAttestationSignerAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfAttestationSignerAccount (soeREQUIRED)
XChainAddAccountCreateAttestation build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the XChainAddAccountCreateAttestation wrapper.
XChainAddAccountCreateAttestationBuilder(std::shared_ptr< STTx const > tx)
Construct a XChainAddAccountCreateAttestationBuilder from an existing STTx object.
XChainAddAccountCreateAttestationBuilder & setXChainAccountCreateCount(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfXChainAccountCreateCount (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setPublicKey(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfPublicKey (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setAttestationRewardAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfAttestationRewardAccount (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_XCHAIN_BRIDGE::type::value_type > const &xChainBridge, std::decay_t< typename SF_ACCOUNT::type::value_type > const &attestationSignerAccount, std::decay_t< typename SF_VL::type::value_type > const &publicKey, std::decay_t< typename SF_VL::type::value_type > const &signature, std::decay_t< typename SF_ACCOUNT::type::value_type > const &otherChainSource, std::decay_t< typename SF_AMOUNT::type::value_type > const &amount, std::decay_t< typename SF_ACCOUNT::type::value_type > const &attestationRewardAccount, std::decay_t< typename SF_UINT8::type::value_type > const &wasLockingChainSend, std::decay_t< typename SF_UINT64::type::value_type > const &xChainAccountCreateCount, std::decay_t< typename SF_ACCOUNT::type::value_type > const &destination, std::decay_t< typename SF_AMOUNT::type::value_type > const &signatureReward, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new XChainAddAccountCreateAttestationBuilder with required fields.
XChainAddAccountCreateAttestationBuilder & setDestination(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfDestination (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setSignature(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfSignature (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setWasLockingChainSend(std::decay_t< typename SF_UINT8::type::value_type > const &value)
Set sfWasLockingChainSend (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setSignatureReward(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfSignatureReward (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setAmount(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfAmount (soeREQUIRED)
XChainAddAccountCreateAttestationBuilder & setXChainBridge(std::decay_t< typename SF_XCHAIN_BRIDGE::type::value_type > const &value)
Transaction-specific field setters.
Transaction: XChainAddAccountCreateAttestation.
SF_ACCOUNT::type::value_type getAttestationSignerAccount() const
Get sfAttestationSignerAccount (soeREQUIRED)
SF_UINT8::type::value_type getWasLockingChainSend() const
Get sfWasLockingChainSend (soeREQUIRED)
SF_ACCOUNT::type::value_type getOtherChainSource() const
Get sfOtherChainSource (soeREQUIRED)
SF_XCHAIN_BRIDGE::type::value_type getXChainBridge() const
Get sfXChainBridge (soeREQUIRED)
SF_ACCOUNT::type::value_type getDestination() const
Get sfDestination (soeREQUIRED)
SF_AMOUNT::type::value_type getSignatureReward() const
Get sfSignatureReward (soeREQUIRED)
SF_UINT64::type::value_type getXChainAccountCreateCount() const
Get sfXChainAccountCreateCount (soeREQUIRED)
SF_VL::type::value_type getSignature() const
Get sfSignature (soeREQUIRED)
SF_VL::type::value_type getPublicKey() const
Get sfPublicKey (soeREQUIRED)
SF_AMOUNT::type::value_type getAmount() const
Get sfAmount (soeREQUIRED)
XChainAddAccountCreateAttestation(std::shared_ptr< STTx const > tx)
Construct a XChainAddAccountCreateAttestation transaction wrapper from an existing STTx object.
SF_ACCOUNT::type::value_type getAttestationRewardAccount() const
Get sfAttestationRewardAccount (soeREQUIRED)
static constexpr xrpl::TxType txType
TxType
Transaction type identifiers.