Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
LedgerFetcherInterface.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include <xrpl/proto/org/xrpl/rpc/v1/get_ledger.pb.h>
5#include <xrpl/proto/org/xrpl/rpc/v1/ledger.pb.h>
6
7#include <cstdint>
8#include <optional>
9
10namespace etl {
11
19 using GetLedgerResponseType = org::xrpl::rpc::v1::GetLedgerResponse;
23 using OptionalGetLedgerResponseType = std::optional<GetLedgerResponseType>;
24
25 virtual ~LedgerFetcherInterface() = default;
26
37 [[nodiscard]] virtual OptionalGetLedgerResponseType
38 fetchData(uint32_t seq) = 0;
39
50 [[nodiscard]] virtual OptionalGetLedgerResponseType
51 fetchDataAndDiff(uint32_t seq) = 0;
52};
53
54} // namespace etl
This namespace contains everything to do with the ETL and ETL sources.
Definition AmendmentBlockHandlerInterface.hpp:6
An interface for LedgerFetcher.
Definition LedgerFetcherInterface.hpp:15
org::xrpl::rpc::v1::GetLedgerResponse GetLedgerResponseType
gRPC response containing the data of a single ledger
Definition LedgerFetcherInterface.hpp:19
virtual OptionalGetLedgerResponseType fetchData(uint32_t seq)=0
Extract data for a particular ledger from an ETL source.
virtual OptionalGetLedgerResponseType fetchDataAndDiff(uint32_t seq)=0
Extract diff data for a particular ledger from an ETL source.
std::optional< GetLedgerResponseType > OptionalGetLedgerResponseType
Optional ledger response; empty if the server is shutting down.
Definition LedgerFetcherInterface.hpp:23