3#include "data/AmendmentCenterInterface.hpp"
4#include "data/BackendInterface.hpp"
5#include "rpc/common/Specs.hpp"
6#include "rpc/common/Types.hpp"
8#include <boost/json/conversion.hpp>
9#include <boost/json/value.hpp>
10#include <xrpl/protocol/jss.h>
24 std::shared_ptr<BackendInterface> sharedPtrBackend_;
25 std::shared_ptr<data::AmendmentCenterInterface const> amendmentCenter_;
32 std::optional<std::string> ledgerHash;
33 std::optional<uint32_t> ledgerIndex;
34 std::optional<std::string> feature;
47 bool supported =
false;
51 std::map<std::string, Feature> features;
52 std::string ledgerHash;
53 uint32_t ledgerIndex{};
57 bool inlineResult =
false;
60 bool validated =
true;
72 std::shared_ptr<BackendInterface> sharedPtrBackend,
73 std::shared_ptr<data::AmendmentCenterInterface const>
const& amendmentCenter
75 : sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_(amendmentCenter)
86 spec([[maybe_unused]] uint32_t apiVersion);
109 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
118 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output::Feature
const& feature);
127 tag_invoke(boost::json::value_to_tag<Input>, boost::json::value
const& jv);
Result process(Input const &input, Context const &ctx) const
Process the Feature command.
Definition Feature.cpp:35
static RpcSpecConstRef spec(uint32_t apiVersion)
Returns the API specification for the command.
Definition Feature.cpp:103
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition Feature.cpp:122
FeatureHandler(std::shared_ptr< BackendInterface > sharedPtrBackend, std::shared_ptr< data::AmendmentCenterInterface const > const &amendmentCenter)
Construct a new FeatureHandler object.
Definition Feature.hpp:71
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:18
RpcSpec const & RpcSpecConstRef
An alias for a const reference to RpcSpec.
Definition Specs.hpp:130
std::expected< OutputType, Status > HandlerReturnType
Return type for each individual handler.
Definition Types.hpp:62
Context of an RPC call.
Definition Types.hpp:99
Represents an amendment/feature.
Definition Feature.hpp:44
A struct to hold the output data of the command.
Definition Feature.hpp:40
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:110