3#include "data/BackendInterface.hpp"
4#include "etl/ETLServiceInterface.hpp"
5#include "rpc/common/SpecBackend.hpp"
6#include "rpc/common/Types.hpp"
7#include "util/log/Logger.hpp"
9#include <boost/json/array.hpp>
10#include <boost/json/conversion.hpp>
11#include <boost/json/object.hpp>
12#include <boost/json/value.hpp>
13#include <rpcspec/handlers/account_tx/Types.hpp>
32 std::shared_ptr<BackendInterface> sharedPtrBackend_;
33 std::shared_ptr<etl::ETLServiceInterface const> etl_;
36 static constexpr auto kLimitMin = rpc::spec::handlers::account_tx::kLimitMin;
37 static constexpr auto kLimitMax = rpc::spec::handlers::account_tx::kLimitMax;
38 static constexpr auto kLimitDefault = rpc::spec::handlers::account_tx::kLimitDefault;
40 using Marker = rpc::spec::handlers::account_tx::Marker;
47 uint32_t ledgerIndexMin{0};
48 uint32_t ledgerIndexMax{0};
49 std::optional<uint32_t> limit;
50 std::optional<Marker> marker;
52 boost::json::array transactions;
54 bool validated =
true;
66 std::shared_ptr<BackendInterface> sharedPtrBackend,
67 std::shared_ptr<etl::ETLServiceInterface const>
const& etl
69 : sharedPtrBackend_(std::move(sharedPtrBackend)), etl_{etl}
91 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
96namespace rpc::spec::handlers::account_tx {
99tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Marker
const& marker);
Result process(Input const &input, Context const &ctx) const
Process the AccountTx command.
Definition AccountTx.cpp:39
AccountTxHandler(std::shared_ptr< BackendInterface > sharedPtrBackend, std::shared_ptr< etl::ETLServiceInterface const > const &etl)
Construct a new AccountTxHandler object.
Definition AccountTx.hpp:65
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition AccountTx.cpp:244
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:78
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:61
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 AccountTx.hpp:45
Context of an RPC call.
Definition Types.hpp:98
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:109