23#include "etl/impl/LedgerFetcher.hpp"
24#include "etlng/ExtractorInterface.hpp"
25#include "etlng/Models.hpp"
26#include "util/log/Logger.hpp"
28#include <google/protobuf/repeated_ptr_field.h>
30#include <xrpl/basics/Slice.h>
31#include <xrpl/basics/base_uint.h>
32#include <xrpl/proto/org/xrpl/rpc/v1/get_ledger.pb.h>
33#include <xrpl/proto/org/xrpl/rpc/v1/ledger.pb.h>
34#include <xrpl/protocol/LedgerHeader.h>
35#include <xrpl/protocol/STTx.h>
36#include <xrpl/protocol/Serializer.h>
37#include <xrpl/protocol/TxMeta.h>
47namespace etlng::impl {
49using PBObjType = org::xrpl::rpc::v1::RawLedgerObject;
50using PBModType = PBObjType::ModificationType;
51using PBTxType = org::xrpl::rpc::v1::TransactionAndMetadata;
52using PBTxListType = google::protobuf::RepeatedPtrField<PBTxType>;
53using PBObjListType = google::protobuf::RepeatedPtrField<PBObjType>;
54using PBBookSuccessorType = org::xrpl::rpc::v1::BookSuccessor;
55using PBLedgerResponseType = org::xrpl::rpc::v1::GetLedgerResponse;
58extractModType(PBModType type);
60[[nodiscard]] model::Transaction
61extractTx(PBTxType tx, uint32_t seq);
63[[nodiscard]] std::vector<model::Transaction>
64extractTxs(PBTxListType transactions, uint32_t seq);
66[[nodiscard]] model::Object
67extractObj(PBObjType obj);
69[[nodiscard]] std::vector<model::Object>
70extractObjs(PBObjListType objects);
72[[nodiscard]] model::BookSuccessor
73extractSuccessor(PBBookSuccessorType successor);
75[[nodiscard]] std::optional<std::vector<model::BookSuccessor>>
76maybeExtractSuccessors(PBLedgerResponseType
const&
data);
80 std::shared_ptr<etl::LedgerFetcherInterface> fetcher_;
85 [[nodiscard]]
static auto
89 Extractor(std::shared_ptr<etl::LedgerFetcherInterface> fetcher) : fetcher_(std::move(fetcher))
93 [[nodiscard]] std::optional<model::LedgerData>
96 [[nodiscard]] std::optional<model::LedgerData>
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:111
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70
ModType
Modification type for the object.
Definition Models.hpp:109