22#include "data/AmendmentCenterInterface.hpp"
23#include "data/BackendInterface.hpp"
24#include "rpc/common/Specs.hpp"
25#include "rpc/common/Types.hpp"
27#include <boost/json/conversion.hpp>
28#include <boost/json/value.hpp>
29#include <xrpl/protocol/jss.h>
43 std::shared_ptr<BackendInterface> sharedPtrBackend_;
44 std::shared_ptr<data::AmendmentCenterInterface const> amendmentCenter_;
51 std::optional<std::string> ledgerHash;
52 std::optional<uint32_t> ledgerIndex;
53 std::optional<std::string> feature;
66 bool supported =
false;
70 std::map<std::string, Feature> features;
71 std::string ledgerHash;
72 uint32_t ledgerIndex{};
75 bool inlineResult =
false;
78 bool validated =
true;
90 std::shared_ptr<BackendInterface>
const& backend,
91 std::shared_ptr<data::AmendmentCenterInterface const>
const& amendmentCenter
93 : sharedPtrBackend_(backend), amendmentCenter_(amendmentCenter)
104 spec([[maybe_unused]] uint32_t apiVersion);
124 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
133 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output::Feature
const& feature);
142 tag_invoke(boost::json::value_to_tag<Input>, boost::json::value
const& jv);
Contains common functionality for handling the server_info command.
Definition Feature.hpp:42
FeatureHandler(std::shared_ptr< BackendInterface > const &backend, std::shared_ptr< data::AmendmentCenterInterface const > const &amendmentCenter)
Construct a new FeatureHandler object.
Definition Feature.hpp:89
Result process(Input input, Context const &ctx) const
Process the Feature command.
Definition Feature.cpp:54
static RpcSpecConstRef spec(uint32_t apiVersion)
Returns the API specification for the command.
Definition Feature.cpp:113
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:129
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:36
RpcSpec const & RpcSpecConstRef
An alias for a const reference to RpcSpec.
Definition Specs.hpp:145
std::expected< OutputType, Status > HandlerReturnType
Return type for each individual handler.
Definition Types.hpp:81
Context of an RPC call.
Definition Types.hpp:118
Represents an amendment/feature.
Definition Feature.hpp:63
A struct to hold the output data of the command.
Definition Feature.hpp:59
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:129