3#include "data/BackendInterface.hpp"
4#include "rpc/common/SpecBackend.hpp"
5#include "rpc/common/Types.hpp"
7#include <boost/json/array.hpp>
8#include <boost/json/conversion.hpp>
9#include <boost/json/value.hpp>
10#include <rpcspec/handlers/mpt_holders/Types.hpp>
30 std::shared_ptr<BackendInterface> sharedPtrBackend_;
36 static constexpr auto kLimitMin = rpc::spec::handlers::mpt_holders::kLimitMin;
40 static constexpr auto kLimitMax = rpc::spec::handlers::mpt_holders::kLimitMax;
44 static constexpr auto kLimitDefault = rpc::spec::handlers::mpt_holders::kLimitDefault;
48 static constexpr auto kMaxAccounts = rpc::spec::handlers::mpt_holders::kMaxAccounts;
73 : sharedPtrBackend_(std::move(sharedPtrBackend))
95 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition MPTHolders.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 MPTHolders.cpp:169
Result process(Input const &input, Context const &ctx) const
Process the MPTHolders command.
Definition MPTHolders.cpp:97
static constexpr auto kLimitMin
Minimum allowed value of the limit parameter.
Definition MPTHolders.hpp:36
static constexpr auto kMaxAccounts
Maximum number of entries allowed in the accounts filter.
Definition MPTHolders.hpp:48
MPTHoldersHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new MPTHoldersHandler object.
Definition MPTHolders.hpp:72
static constexpr auto kLimitMax
Maximum allowed value of the limit parameter.
Definition MPTHolders.hpp:40
static constexpr auto kLimitDefault
Default value of the limit parameter.
Definition MPTHolders.hpp:44
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
A struct to hold the output data of the command.
Definition MPTHolders.hpp:53
std::optional< std::string > marker
Marker to fetch the next page, if any.
Definition MPTHolders.hpp:59
uint32_t ledgerIndex
Sequence of the ledger used.
Definition MPTHolders.hpp:55
bool validated
Whether the ledger is validated.
Definition MPTHolders.hpp:57
std::optional< uint32_t > limit
Page limit used; unset in filtered mode.
Definition MPTHolders.hpp:58
std::string mptID
ID of the queried MPTokenIssuance.
Definition MPTHolders.hpp:56
boost::json::array mpts
MPToken objects of the holders, as JSON.
Definition MPTHolders.hpp:54
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132