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 XChainAddClaimAttestationBuilder;
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(sfXChainClaimID);
159 return this->
tx_->at(sfDestination);
172 return this->
tx_->isFieldPresent(sfDestination);
202 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& xChainClaimID,
std::optional<SF_UINT32::type::value_type> sequence =
std::nullopt,
225 if (tx->getTxnType() != ttXCHAIN_ADD_CLAIM_ATTESTATION)
227 throw std::runtime_error(
"Invalid transaction type for XChainAddClaimAttestationBuilder");
241 object_[sfXChainBridge] = value;
252 object_[sfAttestationSignerAccount] = value;
285 object_[sfOtherChainSource] = value;
307 object_[sfAttestationRewardAccount] = value;
318 object_[sfWasLockingChainSend] = value;
329 object_[sfXChainClaimID] = value;
340 object_[sfDestination] = value;
353 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.
XChainAddClaimAttestationBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
Builder for XChainAddClaimAttestation transactions.
XChainAddClaimAttestationBuilder & setXChainClaimID(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfXChainClaimID (soeREQUIRED)
XChainAddClaimAttestationBuilder & setOtherChainSource(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfOtherChainSource (soeREQUIRED)
XChainAddClaimAttestation build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the XChainAddClaimAttestation wrapper.
XChainAddClaimAttestationBuilder & setWasLockingChainSend(std::decay_t< typename SF_UINT8::type::value_type > const &value)
Set sfWasLockingChainSend (soeREQUIRED)
XChainAddClaimAttestationBuilder & setAmount(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfAmount (soeREQUIRED)
XChainAddClaimAttestationBuilder & setAttestationRewardAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfAttestationRewardAccount (soeREQUIRED)
XChainAddClaimAttestationBuilder & setXChainBridge(std::decay_t< typename SF_XCHAIN_BRIDGE::type::value_type > const &value)
Transaction-specific field setters.
XChainAddClaimAttestationBuilder & setPublicKey(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfPublicKey (soeREQUIRED)
XChainAddClaimAttestationBuilder(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 &xChainClaimID, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new XChainAddClaimAttestationBuilder with required fields.
XChainAddClaimAttestationBuilder(std::shared_ptr< STTx const > tx)
Construct a XChainAddClaimAttestationBuilder from an existing STTx object.
XChainAddClaimAttestationBuilder & setSignature(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfSignature (soeREQUIRED)
XChainAddClaimAttestationBuilder & setAttestationSignerAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfAttestationSignerAccount (soeREQUIRED)
XChainAddClaimAttestationBuilder & setDestination(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfDestination (soeOPTIONAL)
Transaction: XChainAddClaimAttestation.
SF_UINT8::type::value_type getWasLockingChainSend() const
Get sfWasLockingChainSend (soeREQUIRED)
SF_ACCOUNT::type::value_type getAttestationSignerAccount() const
Get sfAttestationSignerAccount (soeREQUIRED)
XChainAddClaimAttestation(std::shared_ptr< STTx const > tx)
Construct a XChainAddClaimAttestation transaction wrapper from an existing STTx object.
SF_ACCOUNT::type::value_type getAttestationRewardAccount() const
Get sfAttestationRewardAccount (soeREQUIRED)
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getDestination() const
Get sfDestination (soeOPTIONAL)
SF_VL::type::value_type getPublicKey() const
Get sfPublicKey (soeREQUIRED)
SF_VL::type::value_type getSignature() const
Get sfSignature (soeREQUIRED)
static constexpr xrpl::TxType txType
SF_ACCOUNT::type::value_type getOtherChainSource() const
Get sfOtherChainSource (soeREQUIRED)
bool hasDestination() const
Check if sfDestination is present.
SF_XCHAIN_BRIDGE::type::value_type getXChainBridge() const
Get sfXChainBridge (soeREQUIRED)
SF_AMOUNT::type::value_type getAmount() const
Get sfAmount (soeREQUIRED)
SF_UINT64::type::value_type getXChainClaimID() const
Get sfXChainClaimID (soeREQUIRED)
TxType
Transaction type identifiers.