rippled
Loading...
Searching...
No Matches
LedgerToJson.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_APP_LEDGER_LEDGERTOJSON_H_INCLUDED
21#define RIPPLE_APP_LEDGER_LEDGERTOJSON_H_INCLUDED
22
23#include <xrpld/app/ledger/Ledger.h>
24#include <xrpld/app/ledger/LedgerMaster.h>
25#include <xrpld/app/misc/TxQ.h>
26#include <xrpld/rpc/Context.h>
27
28#include <xrpl/basics/chrono.h>
29#include <xrpl/json/Object.h>
30#include <xrpl/protocol/serialize.h>
31
32namespace ripple {
33
63
68void
70
73getJson(LedgerFill const&);
74
75} // namespace ripple
76
77#endif
Represents a JSON value.
Definition json_value.h:149
std::optional< NetClock::time_point > getCloseTimeBySeq(LedgerIndex ledgerIndex)
A view into a ledger.
Definition ReadView.h:51
LedgerIndex seq() const
Returns the sequence number of the base ledger.
Definition ReadView.h:118
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
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.
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
STL namespace.
ReadView const & ledger
std::vector< TxQ::TxDetails > txQueue
LedgerFill(ReadView const &l, RPC::Context *ctx, int o=0, std::vector< TxQ::TxDetails > q={})
RPC::Context * context
std::optional< NetClock::time_point > closeTime
The context of information needed to call an RPC.
Definition Context.h:39
LedgerMaster & ledgerMaster
Definition Context.h:44