xrpld
Loading...
Searching...
No Matches
xrpl::ledger_entries::Escrow Class Reference

Ledger Entry: Escrow. More...

#include <Escrow.h>

Inheritance diagram for xrpl::ledger_entries::Escrow:
Collaboration diagram for xrpl::ledger_entries::Escrow:

Public Member Functions

 Escrow (SLE::const_pointer sle)
 Construct a Escrow ledger entry wrapper from an existing SLE object.
SF_ACCOUNT::type::value_type getAccount () const
 Get sfAccount (SoeRequired).
protocol_autogen::Optional< SF_UINT32::type::value_type > getSequence () const
 Get sfSequence (SoeOptional).
bool hasSequence () const
 Check if sfSequence is present.
SF_ACCOUNT::type::value_type getDestination () const
 Get sfDestination (SoeRequired).
SF_AMOUNT::type::value_type getAmount () const
 Get sfAmount (SoeRequired).
protocol_autogen::Optional< SF_VL::type::value_type > getCondition () const
 Get sfCondition (SoeOptional).
bool hasCondition () const
 Check if sfCondition is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getCancelAfter () const
 Get sfCancelAfter (SoeOptional).
bool hasCancelAfter () const
 Check if sfCancelAfter is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getFinishAfter () const
 Get sfFinishAfter (SoeOptional).
bool hasFinishAfter () const
 Check if sfFinishAfter is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getSourceTag () const
 Get sfSourceTag (SoeOptional).
bool hasSourceTag () const
 Check if sfSourceTag is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getDestinationTag () const
 Get sfDestinationTag (SoeOptional).
bool hasDestinationTag () const
 Check if sfDestinationTag is present.
SF_UINT64::type::value_type getOwnerNode () const
 Get sfOwnerNode (SoeRequired).
SF_UINT256::type::value_type getPreviousTxnID () const
 Get sfPreviousTxnID (SoeRequired).
SF_UINT32::type::value_type getPreviousTxnLgrSeq () const
 Get sfPreviousTxnLgrSeq (SoeRequired).
protocol_autogen::Optional< SF_UINT64::type::value_type > getDestinationNode () const
 Get sfDestinationNode (SoeOptional).
bool hasDestinationNode () const
 Check if sfDestinationNode is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getTransferRate () const
 Get sfTransferRate (SoeOptional).
bool hasTransferRate () const
 Check if sfTransferRate is present.
protocol_autogen::Optional< SF_UINT64::type::value_type > getIssuerNode () const
 Get sfIssuerNode (SoeOptional).
bool hasIssuerNode () const
 Check if sfIssuerNode is present.
bool validate () const
 Validate the ledger entry.
LedgerEntryType getType () const
 Get the ledger entry type.
uint256 const & getKey () const
 Get the key (index) of this ledger entry.
std::optional< uint256getLedgerIndex () const
 Get the ledger index (sfLedgerIndex).
bool hasLedgerIndex () const
 Check if the ledger entry has a ledger index.
uint16_t getLedgerEntryType () const
 Get the ledger entry type field (sfLedgerEntryType).
std::uint32_t getFlags () const
 Get the flags field (sfFlags).
bool isFlag (std::uint32_t f) const
 Check if a specific flag is set.
SLE::const_pointer getSle () const
 Get the underlying SLE object.

Static Public Attributes

static constexpr LedgerEntryType entryType = ltESCROW

Protected Attributes

SLE::const_pointer sle_
 The underlying serialized ledger entry being wrapped.

Detailed Description

Ledger Entry: Escrow.

Type: ltESCROW (0x0075) RPC Name: escrow

Immutable wrapper around SLE providing type-safe field access. Use EscrowBuilder to construct new ledger entries.

Definition at line 27 of file Escrow.h.

Constructor & Destructor Documentation

◆ Escrow()

xrpl::ledger_entries::Escrow::Escrow ( SLE::const_pointer sle)
explicit

Construct a Escrow ledger entry wrapper from an existing SLE object.

Exceptions
std::runtime_errorif the ledger entry type doesn't match.

Definition at line 36 of file Escrow.h.

Member Function Documentation

◆ getAccount()

SF_ACCOUNT::type::value_type xrpl::ledger_entries::Escrow::getAccount ( ) const
nodiscard

Get sfAccount (SoeRequired).

Returns
The field value.

Definition at line 54 of file Escrow.h.

◆ getSequence()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getSequence ( ) const
nodiscard

Get sfSequence (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 65 of file Escrow.h.

◆ hasSequence()

bool xrpl::ledger_entries::Escrow::hasSequence ( ) const
nodiscard

Check if sfSequence is present.

Returns
True if the field is present, false otherwise.

Definition at line 78 of file Escrow.h.

◆ getDestination()

SF_ACCOUNT::type::value_type xrpl::ledger_entries::Escrow::getDestination ( ) const
nodiscard

Get sfDestination (SoeRequired).

Returns
The field value.

Definition at line 89 of file Escrow.h.

◆ getAmount()

SF_AMOUNT::type::value_type xrpl::ledger_entries::Escrow::getAmount ( ) const
nodiscard

Get sfAmount (SoeRequired).

Returns
The field value.

Definition at line 100 of file Escrow.h.

◆ getCondition()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::Escrow::getCondition ( ) const
nodiscard

Get sfCondition (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 111 of file Escrow.h.

◆ hasCondition()

bool xrpl::ledger_entries::Escrow::hasCondition ( ) const
nodiscard

Check if sfCondition is present.

Returns
True if the field is present, false otherwise.

Definition at line 124 of file Escrow.h.

◆ getCancelAfter()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getCancelAfter ( ) const
nodiscard

Get sfCancelAfter (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 135 of file Escrow.h.

◆ hasCancelAfter()

bool xrpl::ledger_entries::Escrow::hasCancelAfter ( ) const
nodiscard

Check if sfCancelAfter is present.

Returns
True if the field is present, false otherwise.

Definition at line 148 of file Escrow.h.

◆ getFinishAfter()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getFinishAfter ( ) const
nodiscard

Get sfFinishAfter (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 159 of file Escrow.h.

◆ hasFinishAfter()

bool xrpl::ledger_entries::Escrow::hasFinishAfter ( ) const
nodiscard

Check if sfFinishAfter is present.

Returns
True if the field is present, false otherwise.

Definition at line 172 of file Escrow.h.

◆ getSourceTag()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getSourceTag ( ) const
nodiscard

Get sfSourceTag (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 183 of file Escrow.h.

◆ hasSourceTag()

bool xrpl::ledger_entries::Escrow::hasSourceTag ( ) const
nodiscard

Check if sfSourceTag is present.

Returns
True if the field is present, false otherwise.

Definition at line 196 of file Escrow.h.

◆ getDestinationTag()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getDestinationTag ( ) const
nodiscard

Get sfDestinationTag (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 207 of file Escrow.h.

◆ hasDestinationTag()

bool xrpl::ledger_entries::Escrow::hasDestinationTag ( ) const
nodiscard

Check if sfDestinationTag is present.

Returns
True if the field is present, false otherwise.

Definition at line 220 of file Escrow.h.

◆ getOwnerNode()

SF_UINT64::type::value_type xrpl::ledger_entries::Escrow::getOwnerNode ( ) const
nodiscard

Get sfOwnerNode (SoeRequired).

Returns
The field value.

Definition at line 231 of file Escrow.h.

◆ getPreviousTxnID()

SF_UINT256::type::value_type xrpl::ledger_entries::Escrow::getPreviousTxnID ( ) const
nodiscard

Get sfPreviousTxnID (SoeRequired).

Returns
The field value.

Definition at line 242 of file Escrow.h.

◆ getPreviousTxnLgrSeq()

SF_UINT32::type::value_type xrpl::ledger_entries::Escrow::getPreviousTxnLgrSeq ( ) const
nodiscard

Get sfPreviousTxnLgrSeq (SoeRequired).

Returns
The field value.

Definition at line 253 of file Escrow.h.

◆ getDestinationNode()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::Escrow::getDestinationNode ( ) const
nodiscard

Get sfDestinationNode (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 264 of file Escrow.h.

◆ hasDestinationNode()

bool xrpl::ledger_entries::Escrow::hasDestinationNode ( ) const
nodiscard

Check if sfDestinationNode is present.

Returns
True if the field is present, false otherwise.

Definition at line 277 of file Escrow.h.

◆ getTransferRate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Escrow::getTransferRate ( ) const
nodiscard

Get sfTransferRate (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 288 of file Escrow.h.

◆ hasTransferRate()

bool xrpl::ledger_entries::Escrow::hasTransferRate ( ) const
nodiscard

Check if sfTransferRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 301 of file Escrow.h.

◆ getIssuerNode()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::Escrow::getIssuerNode ( ) const
nodiscard

Get sfIssuerNode (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 312 of file Escrow.h.

◆ hasIssuerNode()

bool xrpl::ledger_entries::Escrow::hasIssuerNode ( ) const
nodiscard

Check if sfIssuerNode is present.

Returns
True if the field is present, false otherwise.

Definition at line 325 of file Escrow.h.

◆ validate()

bool xrpl::ledger_entries::LedgerEntryBase::validate ( ) const
nodiscardinherited

Validate the ledger entry.

Returns
true if validation passes, false otherwise

Definition at line 40 of file LedgerEntryBase.h.

◆ getType()

LedgerEntryType xrpl::ledger_entries::LedgerEntryBase::getType ( ) const
nodiscardinherited

Get the ledger entry type.

Returns
The type of this ledger entry

Definition at line 57 of file LedgerEntryBase.h.

◆ getKey()

uint256 const & xrpl::ledger_entries::LedgerEntryBase::getKey ( ) const
nodiscardinherited

Get the key (index) of this ledger entry.

The key uniquely identifies this ledger entry in the ledger state.

Returns
A constant reference to the 256-bit key

Definition at line 70 of file LedgerEntryBase.h.

◆ getLedgerIndex()

std::optional< uint256 > xrpl::ledger_entries::LedgerEntryBase::getLedgerIndex ( ) const
nodiscardinherited

Get the ledger index (sfLedgerIndex).

This field is OPTIONAL and represents the index of the ledger entry.

Returns
The ledger index if present, std::nullopt otherwise

Definition at line 85 of file LedgerEntryBase.h.

◆ hasLedgerIndex()

bool xrpl::ledger_entries::LedgerEntryBase::hasLedgerIndex ( ) const
nodiscardinherited

Check if the ledger entry has a ledger index.

Returns
true if sfLedgerIndex is present, false otherwise

Definition at line 100 of file LedgerEntryBase.h.

◆ getLedgerEntryType()

uint16_t xrpl::ledger_entries::LedgerEntryBase::getLedgerEntryType ( ) const
nodiscardinherited

Get the ledger entry type field (sfLedgerEntryType).

This field is REQUIRED for all ledger entries and indicates the type of the ledger entry (e.g., AccountRoot, RippleState, Offer, etc.).

Returns
The ledger entry type as a 16-bit unsigned integer

Definition at line 114 of file LedgerEntryBase.h.

◆ getFlags()

std::uint32_t xrpl::ledger_entries::LedgerEntryBase::getFlags ( ) const
nodiscardinherited

Get the flags field (sfFlags).

This field is REQUIRED for all ledger entries and contains type-specific flags that modify the behavior of the ledger entry.

Returns
The flags value as a 32-bit unsigned integer

Definition at line 128 of file LedgerEntryBase.h.

◆ isFlag()

bool xrpl::ledger_entries::LedgerEntryBase::isFlag ( std::uint32_t f) const
nodiscardinherited

Check if a specific flag is set.

Parameters
fThe flag bitmask to check
Returns
true if all bits in f are set in the flags field

Definition at line 141 of file LedgerEntryBase.h.

◆ getSle()

SLE::const_pointer xrpl::ledger_entries::LedgerEntryBase::getSle ( ) const
nodiscardinherited

Get the underlying SLE object.

Provides direct access to the wrapped serialized ledger entry object for cases where the type-safe accessors are insufficient.

Returns
A constant reference to the underlying SLE object

Definition at line 155 of file LedgerEntryBase.h.

Member Data Documentation

◆ entryType

LedgerEntryType xrpl::ledger_entries::Escrow::entryType = ltESCROW
staticconstexpr

Definition at line 30 of file Escrow.h.

◆ sle_

SLE::const_pointer xrpl::ledger_entries::LedgerEntryBase::sle_
protectedinherited

The underlying serialized ledger entry being wrapped.

Definition at line 162 of file LedgerEntryBase.h.