3#include <xrpl/protocol/HashPrefix.h>
4#include <xrpl/protocol/PublicKey.h>
5#include <xrpl/protocol/SField.h>
6#include <xrpl/protocol/STAccount.h>
7#include <xrpl/protocol/STAmount.h>
8#include <xrpl/protocol/STArray.h>
9#include <xrpl/protocol/STBlob.h>
10#include <xrpl/protocol/STInteger.h>
11#include <xrpl/protocol/STObject.h>
12#include <xrpl/protocol/STTx.h>
13#include <xrpl/protocol/STXChainBridge.h>
14#include <xrpl/protocol/SecretKey.h>
15#include <xrpl/protocol/Serializer.h>
16#include <xrpl/protocol/TxFormats.h>
17#include <xrpl/protocol/jss.h>
25template <
typename Derived>
32 SF_UINT16::type::value_type transactionType,
33 SF_ACCOUNT::type::value_type account,
43 object_[sfTransactionType] = transactionType;
65 return static_cast<Derived&
>(*this);
77 return static_cast<Derived&
>(*this);
89 return static_cast<Derived&
>(*this);
102 object_[sfTicketSequence] = value;
103 return static_cast<Derived&
>(*this);
115 return static_cast<Derived&
>(*this);
127 return static_cast<Derived&
>(*this);
138 object_[sfLastLedgerSequence] = value;
139 return static_cast<Derived&
>(*this);
150 object_[sfAccountTxnID] = value;
151 return static_cast<Derived&
>(*this);
163 object_[sfPreviousTxnID] = value;
164 return static_cast<Derived&
>(*this);
175 object_[sfOperationLimit] = value;
176 return static_cast<Derived&
>(*this);
188 return static_cast<Derived&
>(*this);
200 return static_cast<Derived&
>(*this);
212 return static_cast<Derived&
>(*this);
224 return static_cast<Derived&
>(*this);
263 return static_cast<Derived&
>(*this);
Slice slice() const noexcept
void addWithoutSigningFields(Serializer &s) const
void setFieldVL(SField const &field, Blob const &)
void setFieldArray(SField const &field, STArray const &v)
Slice slice() const noexcept
Base class for all transaction builders.
Derived & setDelegate(AccountID const &value)
Set the delegate account for delegated transactions.
Derived & setPreviousTxnID(uint256 const &value)
Set the previous transaction ID.
Derived & setFee(STAmount const &value)
Set the transaction fee.
Derived & setFlags(std::uint32_t const &value)
Set transaction flags.
Derived & setAccountTxnID(uint256 const &value)
Set the account transaction ID.
Derived & setOperationLimit(std::uint32_t const &value)
Set the operation limit.
Derived & setTicketSequence(std::uint32_t const &value)
Set the ticket sequence to use for this transaction.
Derived & setNetworkID(std::uint32_t const &value)
Set the network ID.
Derived & setSigners(STArray const &value)
Set the signers array for multi-signing.
Derived & setSequence(std::uint32_t const &value)
Set the sequence number.
STObject const & getSTObject() const
Get the underlying STObject.
Derived & setAccount(AccountID const &value)
Set the account that is sending the transaction.
TransactionBuilderBase()=default
Derived & setLastLedgerSequence(std::uint32_t const &value)
Set the last ledger sequence.
Derived & setMemos(STArray const &value)
Set the memos array.
Derived & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
TransactionBuilderBase(SF_UINT16::type::value_type transactionType, SF_ACCOUNT::type::value_type account, std::optional< SF_UINT32::type::value_type > sequence, std::optional< SF_AMOUNT::type::value_type > fee)
Derived & setSourceTag(std::uint32_t const &value)
Set the source tag.
@ txSign
inner transaction to sign
Buffer sign(PublicKey const &pk, SecretKey const &sk, Slice const &message)
Generate a signature for a message.