Ledger Entry: Delegate.
More...
#include <Delegate.h>
Ledger Entry: Delegate.
Type: ltDELEGATE (0x0083) RPC Name: delegate
Immutable wrapper around SLE providing type-safe field access. Use DelegateBuilder to construct new ledger entries.
Definition at line 27 of file Delegate.h.
◆ Delegate()
Construct a Delegate ledger entry wrapper from an existing SLE object.
- Exceptions
-
Definition at line 36 of file Delegate.h.
◆ getAccount()
| SF_ACCOUNT::type::value_type xrpl::ledger_entries::Delegate::getAccount |
( |
| ) |
const |
|
nodiscard |
Get sfAccount (SoeRequired).
- Returns
- The field value.
Definition at line 54 of file Delegate.h.
◆ getAuthorize()
| SF_ACCOUNT::type::value_type xrpl::ledger_entries::Delegate::getAuthorize |
( |
| ) |
const |
|
nodiscard |
Get sfAuthorize (SoeRequired).
- Returns
- The field value.
Definition at line 65 of file Delegate.h.
◆ getPermissions()
| STArray const & xrpl::ledger_entries::Delegate::getPermissions |
( |
| ) |
const |
|
nodiscard |
Get sfPermissions (SoeRequired).
- Note
- This is an untyped field (unknown).
- Returns
- The field value.
Definition at line 77 of file Delegate.h.
◆ getOwnerNode()
| SF_UINT64::type::value_type xrpl::ledger_entries::Delegate::getOwnerNode |
( |
| ) |
const |
|
nodiscard |
Get sfOwnerNode (SoeRequired).
- Returns
- The field value.
Definition at line 88 of file Delegate.h.
◆ getDestinationNode()
Get sfDestinationNode (SoeOptional).
- Returns
- The field value, or std::nullopt if not present.
Definition at line 99 of file Delegate.h.
◆ hasDestinationNode()
| bool xrpl::ledger_entries::Delegate::hasDestinationNode |
( |
| ) |
const |
|
nodiscard |
Check if sfDestinationNode is present.
- Returns
- True if the field is present, false otherwise.
Definition at line 112 of file Delegate.h.
◆ getPreviousTxnID()
| SF_UINT256::type::value_type xrpl::ledger_entries::Delegate::getPreviousTxnID |
( |
| ) |
const |
|
nodiscard |
Get sfPreviousTxnID (SoeRequired).
- Returns
- The field value.
Definition at line 123 of file Delegate.h.
◆ getPreviousTxnLgrSeq()
| SF_UINT32::type::value_type xrpl::ledger_entries::Delegate::getPreviousTxnLgrSeq |
( |
| ) |
const |
|
nodiscard |
Get sfPreviousTxnLgrSeq (SoeRequired).
- Returns
- The field value.
Definition at line 134 of file Delegate.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()
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()
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
-
| f | The 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()
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.
◆ entryType
◆ sle_
The underlying serialized ledger entry being wrapped.
Definition at line 162 of file LedgerEntryBase.h.