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/nfts_by_issuer/Types.hpp>
24 std::shared_ptr<BackendInterface> sharedPtrBackend_;
30 static constexpr auto kLimitMin = rpc::spec::handlers::nfts_by_issuer::kLimitMin;
34 static constexpr auto kLimitMax = rpc::spec::handlers::nfts_by_issuer::kLimitMax;
38 static constexpr auto kLimitDefault = rpc::spec::handlers::nfts_by_issuer::kLimitDefault;
64 : sharedPtrBackend_(std::move(sharedPtrBackend))
86 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 NFTsByIssuer.hpp:56
static constexpr auto kLimitDefault
Default value of the limit parameter.
Definition NFTsByIssuer.hpp:38
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition NFTsByIssuer.cpp:91
static constexpr auto kLimitMax
Maximum allowed value of the limit parameter.
Definition NFTsByIssuer.hpp:34
static constexpr auto kLimitMin
Minimum allowed value of the limit parameter.
Definition NFTsByIssuer.hpp:30
NFTsByIssuerHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new NFTsByIssuerHandler object.
Definition NFTsByIssuer.hpp:63
Result process(Input const &input, Context const &ctx) const
Process the NFTsByIssuer command.
Definition NFTsByIssuer.cpp:27
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 NFTsByIssuer.hpp:43
std::string issuer
Address of the issuer.
Definition NFTsByIssuer.hpp:46
uint32_t ledgerIndex
Sequence of the ledger used.
Definition NFTsByIssuer.hpp:45
bool validated
Whether the ledger is validated.
Definition NFTsByIssuer.hpp:47
std::optional< uint32_t > nftTaxon
Taxon filter from the request, if any.
Definition NFTsByIssuer.hpp:48
std::optional< std::string > marker
Marker to fetch the next page, if any.
Definition NFTsByIssuer.hpp:50
boost::json::array nfts
NFTs minted by the issuer, as JSON.
Definition NFTsByIssuer.hpp:44
uint32_t limit
Limit used for this page.
Definition NFTsByIssuer.hpp:49
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132