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
16 using GetLedgerResponseType = org::xrpl::rpc::v1::GetLedgerResponse;
17 using OptionalGetLedgerResponseType = std::optional<GetLedgerResponseType>;
18
19 virtual ~LedgerFetcherInterface() = default;
20
31 [[nodiscard]] virtual OptionalGetLedgerResponseType
32 fetchData(uint32_t seq) = 0;
33
44 [[nodiscard]] virtual OptionalGetLedgerResponseType
45 fetchDataAndDiff(uint32_t seq) = 0;
46};
47
48} // namespace etl
An interface for LedgerFetcher.
Definition LedgerFetcherInterface.hpp:15
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.