3#include "data/AmendmentCenterInterface.hpp"
4#include "data/BackendInterface.hpp"
6#include "rpc/common/Checkers.hpp"
7#include "rpc/common/JsonBool.hpp"
8#include "rpc/common/Specs.hpp"
9#include "rpc/common/Types.hpp"
10#include "rpc/common/Validators.hpp"
12#include <boost/json/conversion.hpp>
13#include <boost/json/value.hpp>
14#include <xrpl/protocol/STLedgerEntry.h>
15#include <xrpl/protocol/jss.h>
32 std::shared_ptr<BackendInterface> sharedPtrBackend_;
33 std::shared_ptr<data::AmendmentCenterInterface const> amendmentCenter_;
41 std::string ledgerHash;
42 ripple::STLedgerEntry accountData;
43 bool isDisallowIncomingEnabled =
false;
44 bool isClawbackEnabled =
false;
45 bool isTokenEscrowEnabled =
false;
47 std::optional<std::vector<ripple::STLedgerEntry>> signerLists;
49 bool validated =
true;
59 std::optional<std::string> account;
60 std::optional<std::string> ident;
61 std::optional<std::string> ledgerHash;
62 std::optional<uint32_t> ledgerIndex;
75 std::shared_ptr<BackendInterface> sharedPtrBackend,
76 std::shared_ptr<data::AmendmentCenterInterface const>
const& amendmentCenter
78 : sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_{amendmentCenter}
89 spec([[maybe_unused]] uint32_t apiVersion)
91 static auto const kRPC_SPEC_V1 =
RpcSpec{
101 static auto const kRPC_SPEC =
104 return apiVersion == 1 ? kRPC_SPEC_V1 : kRPC_SPEC;
125 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
134 tag_invoke(boost::json::value_to_tag<Input>, boost::json::value
const& jv);
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition AccountInfo.cpp:121
AccountInfoHandler(std::shared_ptr< BackendInterface > sharedPtrBackend, std::shared_ptr< data::AmendmentCenterInterface const > const &amendmentCenter)
Construct a new AccountInfoHandler object.
Definition AccountInfo.hpp:74
Result process(Input const &input, Context const &ctx) const
Process the AccountInfo command.
Definition AccountInfo.cpp:37
static RpcSpecConstRef spec(uint32_t apiVersion)
Returns the API specification for the command.
Definition AccountInfo.hpp:89
Check for a deprecated fields.
Definition Checkers.hpp:44
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 AccountInfo.hpp:39
Context of an RPC call.
Definition Types.hpp:99
A wrapper around bool that allows to convert from any JSON value.
Definition JsonBool.hpp:15
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:110
Represents a Specification of an entire RPC command.
Definition Specs.hpp:82
static CustomValidator accountValidator
Provides a commonly used validator for accounts.
Definition Validators.hpp:504
static CustomValidator ledgerIndexValidator
Provides a commonly used validator for ledger index.
Definition Validators.hpp:489
static CustomValidator uint256HexStringValidator
Provides a commonly used validator for uint256 hex string.
Definition Validators.hpp:551
Validates that the type of the value is one of the given types.
Definition Validators.hpp:128