22#include <xrpl/basics/base_uint.h>
23#include <xrpl/protocol/AccountID.h>
36using Blob = std::vector<unsigned char>;
53 std::vector<LedgerObject> objects;
54 std::optional<ripple::uint256> cursor;
61 std::vector<LedgerObject> offers;
62 std::optional<ripple::uint256> cursor;
71 std::uint32_t ledgerSequence = 0;
72 std::uint32_t date = 0;
85 : transaction{std::move(transaction)}, metadata{std::move(metadata)}, ledgerSequence{ledgerSequence}, date{date}
95 : transaction{std::get<0>(
data)}
96 , metadata{std::get<1>(
data)}
97 , ledgerSequence{std::get<2>(
data)}
98 , date{std::get<3>(
data)}
111 return transaction == other.transaction && metadata == other.metadata &&
112 ledgerSequence == other.ledgerSequence && date == other.date;
120 std::uint32_t ledgerSequence = 0;
121 std::uint32_t transactionIndex = 0;
132 : ledgerSequence{ledgerSequence}, transactionIndex{transactionIndex}
142 : ledgerSequence{std::get<0>(
data)}, transactionIndex{std::get<1>(
data)}
154 [[nodiscard]] std::tuple<std::uint32_t, std::uint32_t>
157 return std::make_tuple(ledgerSequence, transactionIndex);
165 std::vector<TransactionAndMetadata> txns;
166 std::optional<TransactionsCursor> cursor;
173 ripple::uint256 tokenID;
174 std::uint32_t ledgerSequence{};
175 ripple::AccountID owner;
190 NFT(ripple::uint256
const& tokenID,
191 std::uint32_t ledgerSequence,
192 ripple::AccountID
const& owner,
195 : tokenID{tokenID}, ledgerSequence{ledgerSequence}, owner{owner}, uri{std::move(uri)}, isBurned{isBurned}
207 NFT(ripple::uint256
const& tokenID, std::uint32_t ledgerSequence, ripple::AccountID
const& owner,
bool isBurned)
208 :
NFT(tokenID, ledgerSequence, owner, {}, isBurned)
224 return tokenID == other.tokenID && ledgerSequence == other.ledgerSequence;
232 std::vector<NFT> nfts;
233 std::optional<ripple::uint256> cursor;
240 std::vector<Blob> mptokens;
241 std::optional<ripple::AccountID> cursor;
248 std::uint32_t minSequence = 0;
249 std::uint32_t maxSequence = 0;
257 ripple::uint256 feature;
258 bool isSupportedByXRPL =
false;
259 bool isSupportedByClio =
false;
260 bool isRetired =
false;
268 static ripple::uint256
279 return name == other.name;
293 AmendmentKey(std::convertible_to<std::string>
auto&& val) : name{std::forward<decltype(val)>(val)}
298 operator std::string
const&()
const;
301 operator std::string_view()
const;
304 operator ripple::uint256()
const;
315constexpr ripple::uint256 kFIRST_KEY{
"0000000000000000000000000000000000000000000000000000000000000000"};
316constexpr ripple::uint256 kLAST_KEY{
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"};
317constexpr ripple::uint256 kHI192{
"0000000000000000000000000000000000000000000000001111111111111111"};
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70
A helper for amendment name to feature conversions.
Definition Types.hpp:286
auto operator<=>(AmendmentKey const &other) const =default
Comparison operators.
AmendmentKey(std::convertible_to< std::string > auto &&val)
Construct a new AmendmentKey.
Definition Types.hpp:293
Represents an amendment in the XRPL.
Definition Types.hpp:255
bool operator==(Amendment const &other) const
Equality comparison operator.
Definition Types.hpp:277
static ripple::uint256 getAmendmentId(std::string_view const name)
Get the amendment Id from its name.
Definition AmendmentCenter.cpp:183
Represents a page of book offer objects.
Definition Types.hpp:60
Represents an object in the ledger.
Definition Types.hpp:41
Represents a page of LedgerObjects.
Definition Types.hpp:52
Stores a range of sequences as a min and max pair.
Definition Types.hpp:247
Represents an array of MPTokens.
Definition Types.hpp:239
Represents a NFToken.
Definition Types.hpp:172
NFT(ripple::uint256 const &tokenID, std::uint32_t ledgerSequence, ripple::AccountID const &owner, Blob uri, bool isBurned)
Construct a new NFT object.
Definition Types.hpp:190
bool operator==(NFT const &other) const
Check if the NFT is the same as another.
Definition Types.hpp:222
NFT(ripple::uint256 const &tokenID, std::uint32_t ledgerSequence, ripple::AccountID const &owner, bool isBurned)
Construct a new NFT object.
Definition Types.hpp:207
Represents a bundle of NFTs with a cursor to the next page.
Definition Types.hpp:231
Represests a bundle of transactions with metadata and a cursor to the next page.
Definition Types.hpp:164
Represents a cursor into the transactions table.
Definition Types.hpp:119
TransactionsCursor(std::tuple< std::uint32_t, std::uint32_t > data)
Construct a new Transactions Cursor object.
Definition Types.hpp:141
TransactionsCursor(std::uint32_t ledgerSequence, std::uint32_t transactionIndex)
Construct a new Transactions Cursor object.
Definition Types.hpp:131
std::tuple< std::uint32_t, std::uint32_t > asTuple() const
Convert the cursor to a tuple of seq and index.
Definition Types.hpp:155