1#ifndef XRPL_RPC_HANDLERS_LEDGER_H_INCLUDED
2#define XRPL_RPC_HANDLERS_LEDGER_H_INCLUDED
4#include <xrpld/app/ledger/LedgerMaster.h>
5#include <xrpld/app/ledger/LedgerToJson.h>
6#include <xrpld/app/main/Application.h>
7#include <xrpld/rpc/Context.h>
8#include <xrpld/rpc/Role.h>
9#include <xrpld/rpc/Status.h>
10#include <xrpld/rpc/detail/Handler.h>
12#include <xrpl/json/Object.h>
13#include <xrpl/ledger/ReadView.h>
14#include <xrpl/protocol/ApiVersion.h>
15#include <xrpl/protocol/jss.h>
40 template <
class Object>
44 static constexpr char name[] =
"ledger";
67template <
class Object>
95 "Some fields from your request are deprecated. Please check the "
97 "https://xrpl.org/docs/references/http-websocket-apis/ "
98 "and update your request. Field `type` is deprecated.";
102 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.