3#include "data/BackendInterface.hpp"
5#include "rpc/common/SpecBackend.hpp"
6#include "rpc/common/Types.hpp"
8#include <boost/json/conversion.hpp>
9#include <boost/json/value.hpp>
10#include <rpcspec/handlers/book_changes/Types.hpp>
26 std::shared_ptr<BackendInterface> sharedPtrBackend_;
54 : sharedPtrBackend_(std::move(sharedPtrBackend))
76 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
Result process(Input const &input, Context const &ctx) const
Process the BookChanges command.
Definition BookChanges.cpp:24
BookChangesHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new BookChangesHandler object.
Definition BookChanges.hpp:53
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition BookChanges.hpp:46
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition BookChanges.cpp:53
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:17
std::expected< OutputType, Status > HandlerReturnType
Return type for each individual handler.
Definition Types.hpp:63
spec::HandlerFor< InputT, boost::json::value > HandlerFor
The spec-driven base every typed handler inherits.
Definition SpecBackend.hpp:24
A struct to hold the output data of the command.
Definition BookChanges.hpp:32
bool validated
Whether the ledger is validated.
Definition BookChanges.hpp:40
uint32_t ledgerIndex
Sequence of the ledger.
Definition BookChanges.hpp:34
uint32_t ledgerTime
Close time of the ledger, in seconds since the Ripple epoch.
Definition BookChanges.hpp:35
std::string ledgerHash
Hash of the ledger the changes were computed for.
Definition BookChanges.hpp:33
std::vector< BookChange > bookChanges
Order book changes caused by the ledger's transactions.
Definition BookChanges.hpp:39
Context of an RPC call.
Definition Types.hpp:102
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132