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/deposit_authorized/Types.hpp>
11#include <xrpl/basics/base_uint.h>
12#include <xrpl/protocol/STArray.h>
34 :
public rpc::HandlerFor<rpc::spec::handlers::deposit_authorized::Input> {
36 std::shared_ptr<BackendInterface>
const sharedPtrBackend_;
69 : sharedPtrBackend_(std::move(sharedPtrBackend))
91 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition DepositAuthorized.cpp:130
DepositAuthorizedHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new DepositAuthorizedHandler object.
Definition DepositAuthorized.hpp:68
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition DepositAuthorized.hpp:61
Result process(Input const &input, Context const &ctx) const
Process the DepositAuthorized command.
Definition DepositAuthorized.cpp:35
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 DepositAuthorized.hpp:43
std::string sourceAccount
Address of the sending account.
Definition DepositAuthorized.hpp:45
uint32_t ledgerIndex
Sequence of the ledger used.
Definition DepositAuthorized.hpp:48
bool depositAuthorized
Whether the source may pay the destination.
Definition DepositAuthorized.hpp:44
std::string ledgerHash
Hash of the ledger used.
Definition DepositAuthorized.hpp:47
bool validated
Whether the ledger is validated.
Definition DepositAuthorized.hpp:55
std::string destinationAccount
Address of the receiving account.
Definition DepositAuthorized.hpp:46
std::optional< std::vector< xrpl::uint256 > > credentials
Credentials from the request, if any.
Definition DepositAuthorized.hpp:52
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132