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

Ledger Entry: MPToken. More...

#include <MPToken.h>

Inheritance diagram for xrpl::ledger_entries::MPToken:
Collaboration diagram for xrpl::ledger_entries::MPToken:

Public Member Functions

 MPToken (SLE::const_pointer sle)
 Construct a MPToken ledger entry wrapper from an existing SLE object.
SF_ACCOUNT::type::value_type getAccount () const
 Get sfAccount (SoeRequired).
SF_UINT192::type::value_type getMPTokenIssuanceID () const
 Get sfMPTokenIssuanceID (SoeRequired).
protocol_autogen::Optional< SF_UINT64::type::value_type > getMPTAmount () const
 Get sfMPTAmount (SoeDefault).
bool hasMPTAmount () const
 Check if sfMPTAmount is present.
protocol_autogen::Optional< SF_UINT64::type::value_type > getLockedAmount () const
 Get sfLockedAmount (SoeOptional).
bool hasLockedAmount () const
 Check if sfLockedAmount 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_VL::type::value_type > getConfidentialBalanceInbox () const
 Get sfConfidentialBalanceInbox (SoeOptional).
bool hasConfidentialBalanceInbox () const
 Check if sfConfidentialBalanceInbox is present.
protocol_autogen::Optional< SF_VL::type::value_type > getConfidentialBalanceSpending () const
 Get sfConfidentialBalanceSpending (SoeOptional).
bool hasConfidentialBalanceSpending () const
 Check if sfConfidentialBalanceSpending is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getConfidentialBalanceVersion () const
 Get sfConfidentialBalanceVersion (SoeDefault).
bool hasConfidentialBalanceVersion () const
 Check if sfConfidentialBalanceVersion is present.
protocol_autogen::Optional< SF_VL::type::value_type > getIssuerEncryptedBalance () const
 Get sfIssuerEncryptedBalance (SoeOptional).
bool hasIssuerEncryptedBalance () const
 Check if sfIssuerEncryptedBalance is present.
protocol_autogen::Optional< SF_VL::type::value_type > getAuditorEncryptedBalance () const
 Get sfAuditorEncryptedBalance (SoeOptional).
bool hasAuditorEncryptedBalance () const
 Check if sfAuditorEncryptedBalance is present.
protocol_autogen::Optional< SF_VL::type::value_type > getHolderEncryptionKey () const
 Get sfHolderEncryptionKey (SoeOptional).
bool hasHolderEncryptionKey () const
 Check if sfHolderEncryptionKey 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 = ltMPTOKEN

Protected Attributes

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

Detailed Description

Ledger Entry: MPToken.

Type: ltMPTOKEN (0x007f) RPC Name: mptoken

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

Definition at line 27 of file MPToken.h.

Constructor & Destructor Documentation

◆ MPToken()

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

Construct a MPToken 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 MPToken.h.

Member Function Documentation

◆ getAccount()

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

Get sfAccount (SoeRequired).

Returns
The field value.

Definition at line 54 of file MPToken.h.

◆ getMPTokenIssuanceID()

SF_UINT192::type::value_type xrpl::ledger_entries::MPToken::getMPTokenIssuanceID ( ) const
nodiscard

Get sfMPTokenIssuanceID (SoeRequired).

Returns
The field value.

Definition at line 65 of file MPToken.h.

◆ getMPTAmount()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::MPToken::getMPTAmount ( ) const
nodiscard

Get sfMPTAmount (SoeDefault).

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

Definition at line 76 of file MPToken.h.

◆ hasMPTAmount()

bool xrpl::ledger_entries::MPToken::hasMPTAmount ( ) const
nodiscard

Check if sfMPTAmount is present.

Returns
True if the field is present, false otherwise.

Definition at line 89 of file MPToken.h.

◆ getLockedAmount()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::MPToken::getLockedAmount ( ) const
nodiscard

Get sfLockedAmount (SoeOptional).

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

Definition at line 100 of file MPToken.h.

◆ hasLockedAmount()

bool xrpl::ledger_entries::MPToken::hasLockedAmount ( ) const
nodiscard

Check if sfLockedAmount is present.

Returns
True if the field is present, false otherwise.

Definition at line 113 of file MPToken.h.

◆ getOwnerNode()

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

Get sfOwnerNode (SoeRequired).

Returns
The field value.

Definition at line 124 of file MPToken.h.

◆ getPreviousTxnID()

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

Get sfPreviousTxnID (SoeRequired).

Returns
The field value.

Definition at line 135 of file MPToken.h.

◆ getPreviousTxnLgrSeq()

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

Get sfPreviousTxnLgrSeq (SoeRequired).

Returns
The field value.

Definition at line 146 of file MPToken.h.

◆ getConfidentialBalanceInbox()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::MPToken::getConfidentialBalanceInbox ( ) const
nodiscard

Get sfConfidentialBalanceInbox (SoeOptional).

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

Definition at line 157 of file MPToken.h.

◆ hasConfidentialBalanceInbox()

bool xrpl::ledger_entries::MPToken::hasConfidentialBalanceInbox ( ) const
nodiscard

Check if sfConfidentialBalanceInbox is present.

Returns
True if the field is present, false otherwise.

Definition at line 170 of file MPToken.h.

◆ getConfidentialBalanceSpending()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::MPToken::getConfidentialBalanceSpending ( ) const
nodiscard

Get sfConfidentialBalanceSpending (SoeOptional).

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

Definition at line 181 of file MPToken.h.

◆ hasConfidentialBalanceSpending()

bool xrpl::ledger_entries::MPToken::hasConfidentialBalanceSpending ( ) const
nodiscard

Check if sfConfidentialBalanceSpending is present.

Returns
True if the field is present, false otherwise.

Definition at line 194 of file MPToken.h.

◆ getConfidentialBalanceVersion()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::MPToken::getConfidentialBalanceVersion ( ) const
nodiscard

Get sfConfidentialBalanceVersion (SoeDefault).

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

Definition at line 205 of file MPToken.h.

◆ hasConfidentialBalanceVersion()

bool xrpl::ledger_entries::MPToken::hasConfidentialBalanceVersion ( ) const
nodiscard

Check if sfConfidentialBalanceVersion is present.

Returns
True if the field is present, false otherwise.

Definition at line 218 of file MPToken.h.

◆ getIssuerEncryptedBalance()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::MPToken::getIssuerEncryptedBalance ( ) const
nodiscard

Get sfIssuerEncryptedBalance (SoeOptional).

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

Definition at line 229 of file MPToken.h.

◆ hasIssuerEncryptedBalance()

bool xrpl::ledger_entries::MPToken::hasIssuerEncryptedBalance ( ) const
nodiscard

Check if sfIssuerEncryptedBalance is present.

Returns
True if the field is present, false otherwise.

Definition at line 242 of file MPToken.h.

◆ getAuditorEncryptedBalance()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::MPToken::getAuditorEncryptedBalance ( ) const
nodiscard

Get sfAuditorEncryptedBalance (SoeOptional).

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

Definition at line 253 of file MPToken.h.

◆ hasAuditorEncryptedBalance()

bool xrpl::ledger_entries::MPToken::hasAuditorEncryptedBalance ( ) const
nodiscard

Check if sfAuditorEncryptedBalance is present.

Returns
True if the field is present, false otherwise.

Definition at line 266 of file MPToken.h.

◆ getHolderEncryptionKey()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::MPToken::getHolderEncryptionKey ( ) const
nodiscard

Get sfHolderEncryptionKey (SoeOptional).

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

Definition at line 277 of file MPToken.h.

◆ hasHolderEncryptionKey()

bool xrpl::ledger_entries::MPToken::hasHolderEncryptionKey ( ) const
nodiscard

Check if sfHolderEncryptionKey is present.

Returns
True if the field is present, false otherwise.

Definition at line 290 of file MPToken.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::MPToken::entryType = ltMPTOKEN
staticconstexpr

Definition at line 30 of file MPToken.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.