rippled
Loading...
Searching...
No Matches
LedgerToJson.h
1#ifndef XRPL_APP_LEDGER_LEDGERTOJSON_H_INCLUDED
2#define XRPL_APP_LEDGER_LEDGERTOJSON_H_INCLUDED
3
4#include <xrpld/app/ledger/Ledger.h>
5#include <xrpld/app/ledger/LedgerMaster.h>
6#include <xrpld/app/misc/TxQ.h>
7#include <xrpld/rpc/Context.h>
8
9#include <xrpl/basics/chrono.h>
10#include <xrpl/protocol/serialize.h>
11
12namespace xrpl {
13
43
47void
49
52getJson(LedgerFill const&);
53
55void
56copyFrom(Json::Value& to, Json::Value const& from);
57
58} // namespace xrpl
59
60#endif
Represents a JSON value.
Definition json_value.h:131
std::optional< NetClock::time_point > getCloseTimeBySeq(LedgerIndex ledgerIndex)
A view into a ledger.
Definition ReadView.h:32
LedgerIndex seq() const
Returns the sequence number of the base ledger.
Definition ReadView.h:99
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
void copyFrom(Json::Value &to, Json::Value const &from)
Copy all the keys and values from one object into another.
void addJson(Json::Value &json, LedgerFill const &fill)
Given a Ledger and options, fill a Json::Value with a description of the ledger.
LedgerFill(ReadView const &l, RPC::Context const *ctx, int o=0, std::vector< TxQ::TxDetails > q={})
RPC::Context const * context
std::vector< TxQ::TxDetails > txQueue
std::optional< NetClock::time_point > closeTime
ReadView const & ledger
The context of information needed to call an RPC.
Definition Context.h:20
LedgerMaster & ledgerMaster
Definition Context.h:25