4#include <xrpl/protocol/STLedgerEntry.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/LedgerEntryBase.h>
8#include <xrpl/protocol_autogen/LedgerEntryBuilderBase.h>
9#include <xrpl/json/json_value.h>
53 SF_ACCOUNT::type::value_type
56 return this->
sle_->at(sfAccount);
68 return this->
sle_->at(sfSequence);
80 return this->
sle_->isFieldPresent(sfSequence);
88 SF_ACCOUNT::type::value_type
91 return this->
sle_->at(sfDestination);
99 SF_AMOUNT::type::value_type
102 return this->
sle_->at(sfAmount);
114 return this->
sle_->at(sfCondition);
126 return this->
sle_->isFieldPresent(sfCondition);
138 return this->
sle_->at(sfCancelAfter);
150 return this->
sle_->isFieldPresent(sfCancelAfter);
162 return this->
sle_->at(sfFinishAfter);
174 return this->
sle_->isFieldPresent(sfFinishAfter);
186 return this->
sle_->at(sfSourceTag);
198 return this->
sle_->isFieldPresent(sfSourceTag);
210 return this->
sle_->at(sfDestinationTag);
222 return this->
sle_->isFieldPresent(sfDestinationTag);
230 SF_UINT64::type::value_type
233 return this->
sle_->at(sfOwnerNode);
241 SF_UINT256::type::value_type
244 return this->
sle_->at(sfPreviousTxnID);
252 SF_UINT32::type::value_type
255 return this->
sle_->at(sfPreviousTxnLgrSeq);
267 return this->
sle_->at(sfDestinationNode);
279 return this->
sle_->isFieldPresent(sfDestinationNode);
291 return this->
sle_->at(sfTransferRate);
303 return this->
sle_->isFieldPresent(sfTransferRate);
315 return this->
sle_->at(sfIssuerNode);
327 return this->
sle_->isFieldPresent(sfIssuerNode);
368 if (sle->at(sfLedgerEntryType) != ltESCROW)
406 object_[sfDestination] = value;
439 object_[sfCancelAfter] = value;
450 object_[sfFinishAfter] = value;
472 object_[sfDestinationTag] = value;
494 object_[sfPreviousTxnID] = value;
505 object_[sfPreviousTxnLgrSeq] = value;
516 object_[sfDestinationNode] = value;
527 object_[sfTransferRate] = value;
Builder for Escrow ledger entries.
EscrowBuilder & setAmount(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfAmount (soeREQUIRED)
EscrowBuilder & setSourceTag(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfSourceTag (soeOPTIONAL)
EscrowBuilder & setDestinationNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfDestinationNode (soeOPTIONAL)
EscrowBuilder & setCancelAfter(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCancelAfter (soeOPTIONAL)
EscrowBuilder & setFinishAfter(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfFinishAfter (soeOPTIONAL)
EscrowBuilder & setPreviousTxnLgrSeq(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousTxnLgrSeq (soeREQUIRED)
EscrowBuilder & setDestination(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfDestination (soeREQUIRED)
EscrowBuilder & setCondition(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfCondition (soeOPTIONAL)
EscrowBuilder & setSequence(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfSequence (soeOPTIONAL)
EscrowBuilder & setAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Ledger entry-specific field setters.
EscrowBuilder & setOwnerNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfOwnerNode (soeREQUIRED)
Escrow build(uint256 const &index)
Build and return the completed Escrow wrapper.
EscrowBuilder & setTransferRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfTransferRate (soeOPTIONAL)
EscrowBuilder(std::decay_t< typename SF_ACCOUNT::type::value_type > const &account, std::decay_t< typename SF_ACCOUNT::type::value_type > const &destination, std::decay_t< typename SF_AMOUNT::type::value_type > const &amount, std::decay_t< typename SF_UINT64::type::value_type > const &ownerNode, std::decay_t< typename SF_UINT256::type::value_type > const &previousTxnID, std::decay_t< typename SF_UINT32::type::value_type > const &previousTxnLgrSeq)
Construct a new EscrowBuilder with required fields.
EscrowBuilder & setIssuerNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfIssuerNode (soeOPTIONAL)
EscrowBuilder(std::shared_ptr< SLE const > sle)
Construct a EscrowBuilder from an existing SLE object.
EscrowBuilder & setPreviousTxnID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfPreviousTxnID (soeREQUIRED)
EscrowBuilder & setDestinationTag(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfDestinationTag (soeOPTIONAL)
bool hasDestinationTag() const
Check if sfDestinationTag is present.
Escrow(std::shared_ptr< SLE const > sle)
Construct a Escrow ledger entry wrapper from an existing SLE object.
SF_UINT64::type::value_type getOwnerNode() const
Get sfOwnerNode (soeREQUIRED)
protocol_autogen::Optional< SF_UINT32::type::value_type > getDestinationTag() const
Get sfDestinationTag (soeOPTIONAL)
bool hasCancelAfter() const
Check if sfCancelAfter is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getCancelAfter() const
Get sfCancelAfter (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT32::type::value_type > getSequence() const
Get sfSequence (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT64::type::value_type > getIssuerNode() const
Get sfIssuerNode (soeOPTIONAL)
protocol_autogen::Optional< SF_VL::type::value_type > getCondition() const
Get sfCondition (soeOPTIONAL)
SF_UINT32::type::value_type getPreviousTxnLgrSeq() const
Get sfPreviousTxnLgrSeq (soeREQUIRED)
bool hasCondition() const
Check if sfCondition is present.
bool hasSequence() const
Check if sfSequence is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getFinishAfter() const
Get sfFinishAfter (soeOPTIONAL)
SF_AMOUNT::type::value_type getAmount() const
Get sfAmount (soeREQUIRED)
bool hasTransferRate() const
Check if sfTransferRate is present.
SF_ACCOUNT::type::value_type getAccount() const
Get sfAccount (soeREQUIRED)
bool hasSourceTag() const
Check if sfSourceTag is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getSourceTag() const
Get sfSourceTag (soeOPTIONAL)
static constexpr LedgerEntryType entryType
protocol_autogen::Optional< SF_UINT32::type::value_type > getTransferRate() const
Get sfTransferRate (soeOPTIONAL)
bool hasFinishAfter() const
Check if sfFinishAfter is present.
SF_UINT256::type::value_type getPreviousTxnID() const
Get sfPreviousTxnID (soeREQUIRED)
bool hasDestinationNode() const
Check if sfDestinationNode is present.
SF_ACCOUNT::type::value_type getDestination() const
Get sfDestination (soeREQUIRED)
protocol_autogen::Optional< SF_UINT64::type::value_type > getDestinationNode() const
Get sfDestinationNode (soeOPTIONAL)
bool hasIssuerNode() const
Check if sfIssuerNode is present.
Base class for type-safe ledger entry wrappers.
std::shared_ptr< SLE const > sle_
The underlying serialized ledger entry being wrapped.
Base class for all ledger entry builders.
LedgerEntryType
Identifiers for on-ledger objects.