3#include "data/BackendInterface.hpp"
4#include "rpc/common/SpecBackend.hpp"
5#include "rpc/common/Types.hpp"
7#include <boost/json/conversion.hpp>
8#include <boost/json/object.hpp>
9#include <boost/json/value.hpp>
10#include <rpcspec/handlers/transaction_entry/Types.hpp>
11#include <xrpl/protocol/LedgerHeader.h>
27 :
public rpc::HandlerFor<rpc::spec::handlers::transaction_entry::Input> {
28 std::shared_ptr<BackendInterface> sharedPtrBackend_;
41 boost::json::object
tx;
58 : sharedPtrBackend_(std::move(sharedPtrBackend))
80 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 transaction_entry command.
Definition TransactionEntry.cpp:21
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition TransactionEntry.cpp:72
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition TransactionEntry.hpp:50
TransactionEntryHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new Transaction Entry Handler object.
Definition TransactionEntry.hpp:57
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
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
A struct to hold the output data of the command.
Definition TransactionEntry.hpp:34
boost::json::object metadata
Transaction metadata as JSON.
Definition TransactionEntry.hpp:40
boost::json::object tx
Transaction as JSON.
Definition TransactionEntry.hpp:41
bool validated
Whether the ledger is validated.
Definition TransactionEntry.hpp:43
std::optional< xrpl::LedgerHeader > ledgerHeader
Header of the ledger containing the transaction.
Definition TransactionEntry.hpp:38
uint32_t apiVersion
API version of the request.
Definition TransactionEntry.hpp:44