3#include "data/AmendmentCenterInterface.hpp"
4#include "data/BackendInterface.hpp"
5#include "rpc/common/Specs.hpp"
7#include <boost/json/array.hpp>
8#include <boost/json/conversion.hpp>
9#include <boost/json/value.hpp>
10#include <xrpl/protocol/AccountID.h>
11#include <xrpl/protocol/Issue.h>
26 std::shared_ptr<BackendInterface> sharedPtrBackend_;
27 std::shared_ptr<data::AmendmentCenterInterface const> amendmentCenter_;
35 boost::json::value amount1;
36 boost::json::value amount2;
37 boost::json::value lpToken;
38 boost::json::array voteSlots;
39 boost::json::value auctionSlot;
40 std::uint16_t tradingFee = 0;
41 std::string ammAccount;
42 std::optional<bool> asset1Frozen;
43 std::optional<bool> asset2Frozen;
45 std::string ledgerHash;
46 uint32_t ledgerIndex{};
47 bool validated =
true;
54 std::optional<ripple::AccountID> accountID;
55 std::optional<ripple::AccountID> ammAccount;
56 ripple::Issue issue1 = ripple::noIssue();
57 ripple::Issue issue2 = ripple::noIssue();
58 std::optional<std::string> ledgerHash;
59 std::optional<uint32_t> ledgerIndex;
71 std::shared_ptr<BackendInterface> sharedPtrBackend,
72 std::shared_ptr<data::AmendmentCenterInterface const>
const& amendmentCenter
74 : sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_{amendmentCenter}
85 spec([[maybe_unused]] uint32_t apiVersion);
105 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
114 tag_invoke(boost::json::value_to_tag<Input>, boost::json::value
const& jv);
Result process(Input const &input, Context const &ctx) const
Process the AMMInfo command.
Definition AMMInfo.cpp:64
AMMInfoHandler(std::shared_ptr< BackendInterface > sharedPtrBackend, std::shared_ptr< data::AmendmentCenterInterface const > const &amendmentCenter)
Construct a new AMMInfoHandler object.
Definition AMMInfo.hpp:70
static RpcSpecConstRef spec(uint32_t apiVersion)
Returns the API specification for the command.
Definition AMMInfo.cpp:227
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition AMMInfo.cpp:288
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
A struct to hold the output data of the command.
Definition AMMInfo.hpp:33
Context of an RPC call.
Definition Types.hpp:99
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:110