xrpld
Loading...
Searching...
No Matches
AccountNFTs.h
1#pragma once
2
3#include <xrpld/rpc/Context.h>
4#include <xrpld/rpc/detail/SpecBridge.hpp>
5
6#include <xrpl/basics/base_uint.h>
7#include <xrpl/json/json_value.h>
8#include <xrpl/ledger/ReadView.h>
9#include <xrpl/protocol/AccountID.h>
10#include <xrpl/protocol/STObject.h>
11
12#include <rpcspec/Errors.hpp>
13#include <rpcspec/handlers/account_nfts/Types.hpp>
14
15#include <cstdint>
16#include <expected>
17#include <functional>
18#include <memory>
19#include <optional>
20#include <vector>
21
22namespace xrpl::rpc {
23
29class AccountNFTsHandler : public HandlerFor<::rpc::spec::handlers::account_nfts::Input>
30{
31public:
43
49 explicit AccountNFTsHandler(JsonContext& context);
50
57 [[nodiscard]] std::expected<Output, ::rpc::Status>
58 process(Input const& input) const;
59
66 void
67 writeResult(json::Value& value, Output const& output) const;
68
69private:
71};
72
73} // namespace xrpl::rpc
Represents a JSON value.
Definition json_value.h:121
AccountNFTsHandler(JsonContext &context)
Construct a handler for a single request.
std::expected< Output, ::rpc::Status > process(Input const &input) const
Process the request.
void writeResult(json::Value &value, Output const &output) const
Write the output of process() into the response.
std::reference_wrapper< JsonContext > context_
Definition AccountNFTs.h:70
The api_version numbers this server serves.
Definition ApiVersion.h:26
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:34
The data an account_nfts request produces, written out by writeResult().
Definition AccountNFTs.h:36
std::shared_ptr< ReadView const > ledger
The ledger the request selected.
Definition AccountNFTs.h:37
std::uint32_t limit
The limit used; written only with a marker.
Definition AccountNFTs.h:39
AccountID account
The account; written only on the last page.
Definition AccountNFTs.h:38
std::vector< STObject > nfts
The NFTs on this page.
Definition AccountNFTs.h:40
std::optional< uint256 > marker
Where the next page starts, if there is one.
Definition AccountNFTs.h:41