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

Handles the transaction_entry RPC method. More...

#include <TransactionEntry.h>

Inheritance diagram for xrpl::rpc::TransactionEntryHandler:
Collaboration diagram for xrpl::rpc::TransactionEntryHandler:

Classes

struct  Output
 The data a transaction_entry request produces, written out by writeResult(). More...

Public Member Functions

 TransactionEntryHandler (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.

Private Attributes

std::reference_wrapper< JsonContext > context_

Detailed Description

Handles the transaction_entry RPC method.

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

Definition at line 27 of file TransactionEntry.h.

Constructor & Destructor Documentation

◆ TransactionEntryHandler()

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

Construct a handler for a single request.

Parameters
contextThe context of the request being handled.

Definition at line 23 of file TransactionEntry.cpp.

Member Function Documentation

◆ process()

std::expected< TransactionEntryHandler::Output,::rpc::Status > xrpl::rpc::TransactionEntryHandler::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 31 of file TransactionEntry.cpp.

◆ writeResult()

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

Write the output of process() into the response.

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

Definition at line 63 of file TransactionEntry.cpp.

Member Data Documentation

◆ context_

std::reference_wrapper<JsonContext> xrpl::rpc::TransactionEntryHandler::context_
private

Definition at line 67 of file TransactionEntry.h.