20 #ifndef RIPPLE_RPC_HANDLERS_LEDGER_H_INCLUDED
21 #define RIPPLE_RPC_HANDLERS_LEDGER_H_INCLUDED
23 #include <ripple/app/ledger/LedgerMaster.h>
24 #include <ripple/app/ledger/LedgerToJson.h>
25 #include <ripple/app/main/Application.h>
26 #include <ripple/json/Object.h>
27 #include <ripple/ledger/ReadView.h>
28 #include <ripple/protocol/jss.h>
29 #include <ripple/rpc/Context.h>
30 #include <ripple/rpc/Role.h>
31 #include <ripple/rpc/Status.h>
32 #include <ripple/rpc/impl/Handler.h>
33 #include <ripple/rpc/impl/RPCHelpers.h>
58 template <
class Object>
62 static constexpr
char name[] =
"ledger";
86 template <
class Object>
static constexpr unsigned minApiVer
static constexpr unsigned maxApiVer
std::shared_ptr< ReadView const > ledger_
void copyFrom(Json::Value &to, Json::Value const &from)
Copy all the keys and values from one object into another.
JSON (JavaScript Object Notation).
virtual LedgerMaster & getLedgerMaster()=0
static constexpr Condition condition
Status represents the results of an operation that might fail.
constexpr unsigned int apiMinimumSupportedVersion
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
LedgerHandler(JsonContext &)
void writeResult(Object &)
LedgerEntryType
Identifiers for on-ledger objects.
constexpr unsigned int apiMaximumValidVersion
Json::Value & addObject(Json::Value &, Json::StaticString const &key)
Add a new subobject at a named key in a Json object.
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.
static constexpr char name[]
std::vector< TxQ::TxDetails > queueTxs_
static constexpr Role role
Role
Indicates the level of administrative permission to grant.
void open(soci::session &s, BasicConfig const &config, std::string const &dbName)
Open a soci session.