rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
xrpl::ledger_entries::LoanBroker Class Reference

Ledger Entry: LoanBroker. More...

#include <LoanBroker.h>

Inheritance diagram for xrpl::ledger_entries::LoanBroker:
Inheritance graph
[legend]
Collaboration diagram for xrpl::ledger_entries::LoanBroker:
Collaboration graph
[legend]

Public Member Functions

 LoanBroker (std::shared_ptr< SLE const > sle)
 Construct a LoanBroker ledger entry wrapper from an existing SLE object.
 
SF_UINT256::type::value_type getPreviousTxnID () const
 Get sfPreviousTxnID (soeREQUIRED)
 
SF_UINT32::type::value_type getPreviousTxnLgrSeq () const
 Get sfPreviousTxnLgrSeq (soeREQUIRED)
 
SF_UINT32::type::value_type getSequence () const
 Get sfSequence (soeREQUIRED)
 
SF_UINT64::type::value_type getOwnerNode () const
 Get sfOwnerNode (soeREQUIRED)
 
SF_UINT64::type::value_type getVaultNode () const
 Get sfVaultNode (soeREQUIRED)
 
SF_UINT256::type::value_type getVaultID () const
 Get sfVaultID (soeREQUIRED)
 
SF_ACCOUNT::type::value_type getAccount () const
 Get sfAccount (soeREQUIRED)
 
SF_ACCOUNT::type::value_type getOwner () const
 Get sfOwner (soeREQUIRED)
 
SF_UINT32::type::value_type getLoanSequence () const
 Get sfLoanSequence (soeREQUIRED)
 
protocol_autogen::Optional< SF_VL::type::value_type > getData () const
 Get sfData (soeDEFAULT)
 
bool hasData () const
 Check if sfData is present.
 
protocol_autogen::Optional< SF_UINT16::type::value_type > getManagementFeeRate () const
 Get sfManagementFeeRate (soeDEFAULT)
 
bool hasManagementFeeRate () const
 Check if sfManagementFeeRate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getOwnerCount () const
 Get sfOwnerCount (soeDEFAULT)
 
bool hasOwnerCount () const
 Check if sfOwnerCount is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getDebtTotal () const
 Get sfDebtTotal (soeDEFAULT)
 
bool hasDebtTotal () const
 Check if sfDebtTotal is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getDebtMaximum () const
 Get sfDebtMaximum (soeDEFAULT)
 
bool hasDebtMaximum () const
 Check if sfDebtMaximum is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getCoverAvailable () const
 Get sfCoverAvailable (soeDEFAULT)
 
bool hasCoverAvailable () const
 Check if sfCoverAvailable is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateMinimum () const
 Get sfCoverRateMinimum (soeDEFAULT)
 
bool hasCoverRateMinimum () const
 Check if sfCoverRateMinimum is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateLiquidation () const
 Get sfCoverRateLiquidation (soeDEFAULT)
 
bool hasCoverRateLiquidation () const
 Check if sfCoverRateLiquidation 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).
 
std::shared_ptr< SLE const > getSle () const
 Get the underlying SLE object.
 

Static Public Attributes

static constexpr LedgerEntryType entryType = ltLOAN_BROKER
 

Protected Attributes

std::shared_ptr< SLE const > sle_
 The underlying serialized ledger entry being wrapped.
 

Detailed Description

Ledger Entry: LoanBroker.

Type: ltLOAN_BROKER (0x0088) RPC Name: loan_broker

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

Definition at line 27 of file LoanBroker.h.

Constructor & Destructor Documentation

◆ LoanBroker()

xrpl::ledger_entries::LoanBroker::LoanBroker ( std::shared_ptr< SLE const >  sle)
explicit

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

Member Function Documentation

◆ getPreviousTxnID()

SF_UINT256::type::value_type xrpl::ledger_entries::LoanBroker::getPreviousTxnID ( ) const

Get sfPreviousTxnID (soeREQUIRED)

Returns
The field value.

Definition at line 54 of file LoanBroker.h.

◆ getPreviousTxnLgrSeq()

SF_UINT32::type::value_type xrpl::ledger_entries::LoanBroker::getPreviousTxnLgrSeq ( ) const

Get sfPreviousTxnLgrSeq (soeREQUIRED)

Returns
The field value.

Definition at line 65 of file LoanBroker.h.

◆ getSequence()

SF_UINT32::type::value_type xrpl::ledger_entries::LoanBroker::getSequence ( ) const

Get sfSequence (soeREQUIRED)

Returns
The field value.

Definition at line 76 of file LoanBroker.h.

◆ getOwnerNode()

SF_UINT64::type::value_type xrpl::ledger_entries::LoanBroker::getOwnerNode ( ) const

Get sfOwnerNode (soeREQUIRED)

Returns
The field value.

Definition at line 87 of file LoanBroker.h.

◆ getVaultNode()

SF_UINT64::type::value_type xrpl::ledger_entries::LoanBroker::getVaultNode ( ) const

Get sfVaultNode (soeREQUIRED)

Returns
The field value.

Definition at line 98 of file LoanBroker.h.

◆ getVaultID()

SF_UINT256::type::value_type xrpl::ledger_entries::LoanBroker::getVaultID ( ) const

Get sfVaultID (soeREQUIRED)

Returns
The field value.

Definition at line 109 of file LoanBroker.h.

◆ getAccount()

SF_ACCOUNT::type::value_type xrpl::ledger_entries::LoanBroker::getAccount ( ) const

Get sfAccount (soeREQUIRED)

Returns
The field value.

Definition at line 120 of file LoanBroker.h.

◆ getOwner()

SF_ACCOUNT::type::value_type xrpl::ledger_entries::LoanBroker::getOwner ( ) const

Get sfOwner (soeREQUIRED)

Returns
The field value.

Definition at line 131 of file LoanBroker.h.

◆ getLoanSequence()

SF_UINT32::type::value_type xrpl::ledger_entries::LoanBroker::getLoanSequence ( ) const

Get sfLoanSequence (soeREQUIRED)

Returns
The field value.

Definition at line 142 of file LoanBroker.h.

◆ getData()

protocol_autogen::Optional< SF_VL::type::value_type > xrpl::ledger_entries::LoanBroker::getData ( ) const

Get sfData (soeDEFAULT)

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

Definition at line 153 of file LoanBroker.h.

◆ hasData()

bool xrpl::ledger_entries::LoanBroker::hasData ( ) const

Check if sfData is present.

Returns
True if the field is present, false otherwise.

Definition at line 166 of file LoanBroker.h.

◆ getManagementFeeRate()

protocol_autogen::Optional< SF_UINT16::type::value_type > xrpl::ledger_entries::LoanBroker::getManagementFeeRate ( ) const

Get sfManagementFeeRate (soeDEFAULT)

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

Definition at line 177 of file LoanBroker.h.

◆ hasManagementFeeRate()

bool xrpl::ledger_entries::LoanBroker::hasManagementFeeRate ( ) const

Check if sfManagementFeeRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 190 of file LoanBroker.h.

◆ getOwnerCount()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::LoanBroker::getOwnerCount ( ) const

Get sfOwnerCount (soeDEFAULT)

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

Definition at line 201 of file LoanBroker.h.

◆ hasOwnerCount()

bool xrpl::ledger_entries::LoanBroker::hasOwnerCount ( ) const

Check if sfOwnerCount is present.

Returns
True if the field is present, false otherwise.

Definition at line 214 of file LoanBroker.h.

◆ getDebtTotal()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::LoanBroker::getDebtTotal ( ) const

Get sfDebtTotal (soeDEFAULT)

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

Definition at line 225 of file LoanBroker.h.

◆ hasDebtTotal()

bool xrpl::ledger_entries::LoanBroker::hasDebtTotal ( ) const

Check if sfDebtTotal is present.

Returns
True if the field is present, false otherwise.

Definition at line 238 of file LoanBroker.h.

◆ getDebtMaximum()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::LoanBroker::getDebtMaximum ( ) const

Get sfDebtMaximum (soeDEFAULT)

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

Definition at line 249 of file LoanBroker.h.

◆ hasDebtMaximum()

bool xrpl::ledger_entries::LoanBroker::hasDebtMaximum ( ) const

Check if sfDebtMaximum is present.

Returns
True if the field is present, false otherwise.

Definition at line 262 of file LoanBroker.h.

◆ getCoverAvailable()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::LoanBroker::getCoverAvailable ( ) const

Get sfCoverAvailable (soeDEFAULT)

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

Definition at line 273 of file LoanBroker.h.

◆ hasCoverAvailable()

bool xrpl::ledger_entries::LoanBroker::hasCoverAvailable ( ) const

Check if sfCoverAvailable is present.

Returns
True if the field is present, false otherwise.

Definition at line 286 of file LoanBroker.h.

◆ getCoverRateMinimum()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::LoanBroker::getCoverRateMinimum ( ) const

Get sfCoverRateMinimum (soeDEFAULT)

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

Definition at line 297 of file LoanBroker.h.

◆ hasCoverRateMinimum()

bool xrpl::ledger_entries::LoanBroker::hasCoverRateMinimum ( ) const

Check if sfCoverRateMinimum is present.

Returns
True if the field is present, false otherwise.

Definition at line 310 of file LoanBroker.h.

◆ getCoverRateLiquidation()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::LoanBroker::getCoverRateLiquidation ( ) const

Get sfCoverRateLiquidation (soeDEFAULT)

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

Definition at line 321 of file LoanBroker.h.

◆ hasCoverRateLiquidation()

bool xrpl::ledger_entries::LoanBroker::hasCoverRateLiquidation ( ) const

Check if sfCoverRateLiquidation is present.

Returns
True if the field is present, false otherwise.

Definition at line 334 of file LoanBroker.h.

◆ validate()

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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.

◆ getSle()

std::shared_ptr< SLE const > xrpl::ledger_entries::LedgerEntryBase::getSle ( ) const
inherited

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 142 of file LedgerEntryBase.h.

Member Data Documentation

◆ entryType

constexpr LedgerEntryType xrpl::ledger_entries::LoanBroker::entryType = ltLOAN_BROKER
staticconstexpr

Definition at line 30 of file LoanBroker.h.

◆ sle_

std::shared_ptr<SLE const> xrpl::ledger_entries::LedgerEntryBase::sle_
protectedinherited

The underlying serialized ledger entry being wrapped.

Definition at line 149 of file LedgerEntryBase.h.