20#ifndef RIPPLE_RPC_HANDLERS_LEDGER_H_INCLUDED
21#define RIPPLE_RPC_HANDLERS_LEDGER_H_INCLUDED
23#include <xrpld/app/ledger/LedgerMaster.h>
24#include <xrpld/app/ledger/LedgerToJson.h>
25#include <xrpld/app/main/Application.h>
26#include <xrpld/rpc/Context.h>
27#include <xrpld/rpc/Role.h>
28#include <xrpld/rpc/Status.h>
29#include <xrpld/rpc/detail/Handler.h>
30#include <xrpld/rpc/detail/RPCHelpers.h>
32#include <xrpl/json/Object.h>
33#include <xrpl/ledger/ReadView.h>
34#include <xrpl/protocol/jss.h>
59 template <
class Object>
63 static constexpr char name[] =
"ledger";
86template <
class Object>
114 "Some fields from your request are deprecated. Please check the "
116 "https://xrpl.org/docs/references/http-websocket-apis/ "
117 "and update your request. Field `type` is deprecated.";
121 value[jss::warnings] = std::move(warnings);
Value & append(Value const &value)
Append value to array at the end.
bool isMember(char const *key) const
Return true if the object has a member named key.
virtual LedgerMaster & getLedgerMaster()=0
static constexpr unsigned maxApiVer
static constexpr Condition condition
static constexpr unsigned minApiVer
std::shared_ptr< ReadView const > ledger_
static constexpr char name[]
void writeResult(Object &)
std::vector< TxQ::TxDetails > queueTxs_
static constexpr Role role
JSON (JavaScript Object Notation).
@ arrayValue
array value (ordered list)
@ objectValue
object value (collection of name/value pairs).
Json::Value & addObject(Json::Value &, Json::StaticString const &key)
Add a new subobject at a named key in a Json object.
void copyFrom(Json::Value &to, Json::Value const &from)
Copy all the keys and values from one object into another.
static constexpr auto apiMaximumValidVersion
static constexpr auto apiMinimumSupportedVersion
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
@ warnRPC_FIELDS_DEPRECATED
void addJson(Json::Value &json, LedgerFill const &fill)
Given a Ledger and options, fill a Json::Object or Json::Value with a description of the ledger.
@ open
We haven't closed our ledger yet, but others might have.
Role
Indicates the level of administrative permission to grant.
Status represents the results of an operation that might fail.