xrpld
Loading...
Searching...
No Matches
xrpl::rpc::NFTBuyOffersHandler Class Reference

Handles the nft_buy_offers RPC method. More...

#include <NFTBuyOffers.h>

Inheritance diagram for xrpl::rpc::NFTBuyOffersHandler:
Collaboration diagram for xrpl::rpc::NFTBuyOffersHandler:

Public Member Functions

 NFTBuyOffersHandler (JsonContext &context)
 Construct a handler for a single request.
std::expected< Output, ::rpc::Status > process (Input const &input) const
 Process the request.

Static Public Member Functions

static void writeResult (json::Value &value, Output const &output)
 Write the output of process() into the response.

Protected Member Functions

std::expected< Output, ::rpc::Status > enumerateOffers (Input const &input, Keylet const &directory) const
 Enumerate one page of an NFT offer directory.

Private Attributes

std::reference_wrapper< JsonContext > context_

Detailed Description

Handles the nft_buy_offers RPC method.

The request is parsed by ::rpc::spec::handlers::nft_offers_common.

Definition at line 17 of file NFTBuyOffers.h.

Constructor & Destructor Documentation

◆ NFTBuyOffersHandler()

xrpl::rpc::NFTBuyOffersHandler::NFTBuyOffersHandler ( JsonContext & context)
explicit

Construct a handler for a single request.

Parameters
contextThe context of the request being handled.

Definition at line 14 of file NFTBuyOffers.cpp.

Member Function Documentation

◆ process()

std::expected< NFTBuyOffersHandler::Output,::rpc::Status > xrpl::rpc::NFTBuyOffersHandler::process ( Input const & input) const
nodiscard

Process the request.

Parameters
inputThe request, parsed and validated by the spec.
Returns
The output to write, or the status of the error.

Definition at line 19 of file NFTBuyOffers.cpp.

◆ writeResult()

void xrpl::rpc::NFTOffersHandlerBase::writeResult ( json::Value & value,
Output const & output )
staticinherited

Write the output of process() into the response.

Parameters
valueThe response to write into.
outputThe output process() returned.

Definition at line 141 of file NFTOffersCommon.cpp.

◆ enumerateOffers()

std::expected< NFTOffersHandlerBase::Output,::rpc::Status > xrpl::rpc::NFTOffersHandlerBase::enumerateOffers ( Input const & input,
Keylet const & directory ) const
nodiscardprotectedinherited

Enumerate one page of an NFT offer directory.

Parameters
inputThe request, parsed and validated by the spec.
directoryThe buy or sell offer directory of the NFT.
Returns
The output to write, or the status of the error.

Definition at line 63 of file NFTOffersCommon.cpp.

Member Data Documentation

◆ context_

std::reference_wrapper<JsonContext> xrpl::rpc::NFTOffersHandlerBase::context_
privateinherited

Definition at line 70 of file NFTOffersCommon.h.