rippled
Loading...
Searching...
No Matches
LedgerToJson.h
1#pragma once
2
3#include <xrpld/app/ledger/Ledger.h>
4#include <xrpld/app/ledger/LedgerMaster.h>
5#include <xrpld/app/misc/TxQ.h>
6#include <xrpld/rpc/Context.h>
7
8#include <xrpl/basics/chrono.h>
9#include <xrpl/protocol/serialize.h>
10
11namespace xrpl {
12
30
34void
36
39getJson(LedgerFill const&);
40
42void
43copyFrom(Json::Value& to, Json::Value const& from);
44
45} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
std::optional< NetClock::time_point > getCloseTimeBySeq(LedgerIndex ledgerIndex)
A view into a ledger.
Definition ReadView.h:31
LedgerIndex seq() const
Returns the sequence number of the base ledger.
Definition ReadView.h:97
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
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:19
LedgerMaster & ledgerMaster
Definition Context.h:24