xrpld
Loading...
Searching...
No Matches
xrpl::rpc::LedgerHandler Class Reference

#include <Ledger.h>

Inheritance diagram for xrpl::rpc::LedgerHandler:
Collaboration diagram for xrpl::rpc::LedgerHandler:

Classes

struct  Output

Public Member Functions

 LedgerHandler (JsonContext &)
std::expected< Output, ::rpc::Status > process (Input const &input)
void writeResult (json::Value &value, Output const &output) const

Static Public Attributes

static constexpr std::string_view name = method::kLedger
static constexpr unsigned minApiVer = rpc::kApiMinimumSupportedVersion
static constexpr unsigned maxApiVer = rpc::kApiMaximumValidVersion
static constexpr Role role = Role::USER
static constexpr Condition condition = Condition::NoCondition

Private Attributes

std::reference_wrapper< JsonContext > context_

Detailed Description

Definition at line 34 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

Constructor & Destructor Documentation

◆ LedgerHandler()

xrpl::rpc::LedgerHandler::LedgerHandler ( JsonContext & context)
explicit

Definition at line 40 of file xrpld/rpc/handlers/ledger/Ledger.cpp.

Member Function Documentation

◆ process()

std::expected< LedgerHandler::Output,::rpc::Status > xrpl::rpc::LedgerHandler::process ( Input const & input)
nodiscard

Definition at line 45 of file xrpld/rpc/handlers/ledger/Ledger.cpp.

◆ writeResult()

void xrpl::rpc::LedgerHandler::writeResult ( json::Value & value,
Output const & output ) const

Definition at line 89 of file xrpld/rpc/handlers/ledger/Ledger.cpp.

Member Data Documentation

◆ name

std::string_view xrpl::rpc::LedgerHandler::name = method::kLedger
staticconstexpr

Definition at line 53 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

◆ minApiVer

unsigned xrpl::rpc::LedgerHandler::minApiVer = rpc::kApiMinimumSupportedVersion
staticconstexpr

Definition at line 55 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

◆ maxApiVer

unsigned xrpl::rpc::LedgerHandler::maxApiVer = rpc::kApiMaximumValidVersion
staticconstexpr

Definition at line 57 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

◆ role

Role xrpl::rpc::LedgerHandler::role = Role::USER
staticconstexpr

Definition at line 59 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

◆ condition

Condition xrpl::rpc::LedgerHandler::condition = Condition::NoCondition
staticconstexpr

Definition at line 61 of file src/xrpld/rpc/handlers/ledger/Ledger.h.

◆ context_

std::reference_wrapper<JsonContext> xrpl::rpc::LedgerHandler::context_
private

Definition at line 65 of file src/xrpld/rpc/handlers/ledger/Ledger.h.