3#include "util/Concepts.hpp"
5#include <boost/json/object.hpp>
7#include <xrpl/basics/Blob.h>
8#include <xrpl/basics/base_uint.h>
9#include <xrpl/proto/org/xrpl/rpc/v1/get_ledger.pb.h>
10#include <xrpl/proto/org/xrpl/rpc/v1/ledger.pb.h>
11#include <xrpl/protocol/LedgerHeader.h>
12#include <xrpl/protocol/STTx.h>
13#include <xrpl/protocol/Serializer.h>
14#include <xrpl/protocol/TxFormats.h>
15#include <xrpl/protocol/TxMeta.h>
36template <xrpl::TxType... Types>
47 [[nodiscard]]
static constexpr bool
48 wants(xrpl::TxType type)
noexcept
50 return ((Types == type) || ...);
80 and
sttx.getTransactionID() == other.
sttx.getTransactionID()
81 and
meta.getTxID() == other.
meta.getTxID()
112 operator==(
Object const&)
const =
default;
147 auto const serialized = [](
auto const& hdr) {
148 xrpl::Serializer ser;
149 xrpl::addRaw(hdr, ser);
150 return ser.getString();
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56
This namespace contains the data models used by the ETL pipeline and its extensions.
Definition Models.hpp:25
static consteval auto hasNoDuplicates(auto &&... values)
Checks that the list of given values contains no duplicates.
Definition Concepts.hpp:38
Represents a book successor.
Definition Models.hpp:118
std::string firstBook
Raw key of the first offer directory page of the book.
Definition Models.hpp:119
std::string bookBase
Raw key of the book base (book directory without the quality).
Definition Models.hpp:120
Represents an entire ledger diff worth of transactions and objects.
Definition Models.hpp:129
std::optional< std::vector< std::string > > edgeKeys
Last key of each initial load range.
Definition Models.hpp:133
std::optional< std::vector< BookSuccessor > > successors
Book successors, if provided.
Definition Models.hpp:132
bool operator==(LedgerData const &other) const
Compares LedgerData objects to each other without considering the header field.
Definition Models.hpp:145
xrpl::LedgerHeader header
Deserialized ledger header.
Definition Models.hpp:135
std::vector< Object > objects
Objects changed by the ledger.
Definition Models.hpp:131
std::string rawHeader
Serialized ledger header.
Definition Models.hpp:136
uint32_t seq
Sequence of the ledger.
Definition Models.hpp:137
std::vector< Transaction > transactions
Transactions in the ledger.
Definition Models.hpp:130
Represents a single object on the ledger.
Definition Models.hpp:91
std::string predecessor
Raw key of the previous object in the ledger (last key if unset).
Definition Models.hpp:107
xrpl::uint256 key
Key of the ledger object.
Definition Models.hpp:102
ModType
Modification type for the object.
Definition Models.hpp:95
@ Created
Object was created in this ledger.
Definition Models.hpp:97
@ Modified
Object was modified in this ledger.
Definition Models.hpp:98
@ Deleted
Object was deleted in this ledger.
Definition Models.hpp:99
@ Unspecified
Modification type was not provided.
Definition Models.hpp:96
std::string dataRaw
Serialized object data as a string.
Definition Models.hpp:105
std::string keyRaw
Key of the ledger object as raw bytes.
Definition Models.hpp:103
std::string successor
Raw key of the next object in the ledger (first key if unset).
Definition Models.hpp:106
ModType type
How the object was modified in this ledger.
Definition Models.hpp:109
A specification for the Registry.
Definition Models.hpp:38
static constexpr bool kSpecTag
Marker used by the Registry to detect a Spec.
Definition Models.hpp:39
static constexpr bool wants(xrpl::TxType type) noexcept
Checks if the transaction type was requested.
Definition Models.hpp:48
Represents a task for the extractors.
Definition Models.hpp:166
Priority
Represents the priority of the task.
Definition Models.hpp:170
@ Lower
Low priority, used for backfilling older ledgers.
Definition Models.hpp:171
@ Higher
High priority, used for extracting new ledgers going forward.
Definition Models.hpp:172
uint32_t seq
Sequence of the ledger to extract.
Definition Models.hpp:176
Priority priority
Priority of the task.
Definition Models.hpp:175
Represents a single transaction on the ledger.
Definition Models.hpp:57
xrpl::TxMeta meta
Deserialized transaction metadata.
Definition Models.hpp:63
xrpl::uint256 id
Transaction hash.
Definition Models.hpp:66
std::string metaRaw
Raw serialized transaction metadata blob.
Definition Models.hpp:59
bool operator==(Transaction const &other) const
Compares Transaction objects to each other without considering sttx and meta fields.
Definition Models.hpp:76
xrpl::TxType type
Transaction type.
Definition Models.hpp:68
std::string key
The above id as a string of 32 raw bytes.
Definition Models.hpp:67
std::string raw
Raw serialized transaction blob.
Definition Models.hpp:58
xrpl::STTx sttx
Deserialized transaction.
Definition Models.hpp:62