1#ifndef XRPL_RPC_RPCLEDGERHELPERS_H_INCLUDED
2#define XRPL_RPC_RPCLEDGERHELPERS_H_INCLUDED
4#include <xrpld/app/misc/NetworkOPs.h>
5#include <xrpld/app/misc/TxQ.h>
6#include <xrpld/rpc/Context.h>
7#include <xrpld/rpc/Status.h>
8#include <xrpld/rpc/detail/Tuning.h>
10#include <xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.pb.h>
58getLedger(T& ledger, uint32_t ledgerIndex, Context
const& context);
131template <
class T,
class R>
151 org::xrpl::rpc::v1::LedgerSpecifier
const& specifier,
152 Context
const& context);
Status ledgerFromSpecifier(T &ledger, org::xrpl::rpc::v1::LedgerSpecifier const &specifier, Context const &context)
Retrieves a ledger based on a LedgerSpecifier.
Expected< std::shared_ptr< Ledger const >, Json::Value > getOrAcquireLedger(RPC::JsonContext const &context)
Retrieves or acquires a ledger based on the parameters provided in the given JsonContext.
Status ledgerFromRequest(T &ledger, GRPCContext< R > const &context)
Retrieves a ledger from a gRPC request context.
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext const &context, Json::Value &result)
Looks up a ledger from a request and fills a Json::Value with ledger data.
Status getLedger(T &ledger, uint256 const &ledgerHash, Context const &context)
Retrieves a ledger by its hash.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.