xrpld
Loading...
Searching...
No Matches
Indexes.cpp
1#include <xrpl/protocol/Indexes.h>
2
3#include <xrpl/basics/Slice.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/basics/safe_cast.h>
6#include <xrpl/beast/utility/instrumentation.h>
7#include <xrpl/protocol/AccountID.h>
8#include <xrpl/protocol/Asset.h>
9#include <xrpl/protocol/Book.h>
10#include <xrpl/protocol/Concepts.h>
11#include <xrpl/protocol/Issue.h>
12#include <xrpl/protocol/LedgerFormats.h>
13#include <xrpl/protocol/MPTIssue.h>
14#include <xrpl/protocol/Protocol.h>
15#include <xrpl/protocol/SeqProxy.h>
16#include <xrpl/protocol/UintTypes.h>
17#include <xrpl/protocol/digest.h>
18#include <xrpl/protocol/jss.h>
19#include <xrpl/protocol/nftPageMask.h>
20
21#include <boost/endian/conversion.hpp>
22
23#include <algorithm>
24#include <array>
25#include <cstdint>
26#include <cstring>
27#include <set>
28#include <utility>
29#include <variant>
30#include <vector>
31
32namespace xrpl {
33
34// This list should include all of the keylet functions that take a single
35// AccountID parameter. Declared in Indexes.h; defined here so the header need
36// not include jss.h.
38 {
39 {.function = &keylet::account, .expectedLEName = jss::AccountRoot, .includeInTests = false},
40 {
41 .function = &keylet::ownerDir,
42 .expectedLEName = jss::DirectoryNode,
43 .includeInTests = true,
44 },
45 {
46 .function = &keylet::signerList,
47 .expectedLEName = jss::SignerList,
48 .includeInTests = true,
49 },
50 // It's normally impossible to create an item at nftpage_min, but
51 // test it anyway, since the invariant checks for it.
52 {
53 .function = &keylet::nftokenPageMin,
54 .expectedLEName = jss::NFTokenPage,
55 .includeInTests = true,
56 },
57 {
58 .function = &keylet::nftokenPageMax,
59 .expectedLEName = jss::NFTokenPage,
60 .includeInTests = true,
61 },
62 {.function = &keylet::did, .expectedLEName = jss::DID, .includeInTests = true},
63 },
64};
65
85 Account = 'a',
86 DirNode = 'd',
87 TrustLine = 'r',
88 Offer = 'o',
89 OwnerDir = 'O',
90 BookDir = 'B',
91 SkipList = 's',
92 Escrow = 'u',
95 Ticket = 'T',
98 Check = 'C',
105 Amm = 'A',
106 Did = 'I',
107 Oracle = 'R',
109 MPToken = 't',
112 Delegate = 'E',
113 Vault = 'V',
114 LoanBroker = 'l', // lower-case L
115 Loan = 'L',
118
119 // No longer used or supported. Left here to reserve the space to avoid accidental reuse.
120 Contract [[deprecated]] = 'c',
121 Generator [[deprecated]] = 'g',
122 Nickname [[deprecated]] = 'n',
123 Bridge [[deprecated]] = 'H',
124 XchainClaimId [[deprecated]] = 'Q',
125 XchainCreateAccountClaimId [[deprecated]] = 'K',
126};
127
128template <class... Args>
129static UInt256
130indexHash(LedgerNameSpace space, Args const&... args)
131{
132 return sha512Half(safeCast<std::uint16_t>(space), args...);
133}
134
136getBookBase(Book const& book)
137{
138 XRPL_ASSERT(isConsistent(book), "xrpl::getBookBase : input is consistent");
139
140 constexpr std::uint8_t kIssueToMPTTag = 0x01;
141 constexpr std::uint8_t kMPTToIssueTag = 0x02;
142 constexpr std::uint8_t kMPTToMPTTag = 0x03;
143
144 auto getIndexHash = [&book]<typename... Args>(Args... args) {
145 if (book.domain)
146 return indexHash(std::forward<Args>(args)..., *book.domain);
147 return indexHash(std::forward<Args>(args)...);
148 };
149
150 auto const index = std::visit(
151 [&]<ValidIssueType TIn, ValidIssueType TOut>(TIn const& in, TOut const& out) {
153 {
154 return getIndexHash(
155 LedgerNameSpace::BookDir, in.currency, out.currency, in.account, out.account);
156 }
157 // The three MPT-involving branches are new under MPTokensV2 and
158 // each gets a 1-byte discriminator to prevent preimage collisions
159 // between branches: the (Issue,MPT) and (MPT,Issue) preimages
160 // are both 64 bytes of raw concatenation, so without a
161 // per-branch tag chosen Currency / MPTID / AccountID values can
162 // align byte-for-byte and produce the same BookDir keylet for
163 // two distinct markets. (Issue,Issue) is left untagged to
164 // preserve existing mainnet order-book keylets.
166 {
167 return getIndexHash(
169 kIssueToMPTTag,
170 in.currency,
171 out.getMptID(),
172 in.account);
173 }
175 {
176 return getIndexHash(
178 kMPTToIssueTag,
179 in.getMptID(),
180 out.currency,
181 out.account);
182 }
183 else
184 {
185 return getIndexHash(
186 LedgerNameSpace::BookDir, kMPTToMPTTag, in.getMptID(), out.getMptID());
187 }
188 },
189 book.in.value(),
190 book.out.value());
191
192 // Return with quality 0.
193 auto const k = keylet::quality({ltDIR_NODE, index}, 0);
194
195 return k.key;
196}
197
200{
201 static constexpr UInt256 kNextQuality(
202 "0000000000000000000000000000000000000000000000010000000000000000");
203 return uBase + kNextQuality;
204}
205
207getQuality(UInt256 const& uBase)
208{
209 // VFALCO [base_uint] This assumes a certain storage format
210 //
211 // Load the final 8 bytes as a big-endian integer. load_big_u64 reads
212 // through unaligned byte storage (via memcpy) and applies the endian
213 // conversion, avoiding the alignment/strict-aliasing UB of casting the
214 // unsigned char* returned by end() to a std::uint64_t*.
215 return boost::endian::load_big_u64(uBase.end() - 8);
216}
217
218MPTID
219makeMptID(std::uint32_t const sequence, AccountID const& account)
220{
221 MPTID u;
222 auto const bigEndianSequence = boost::endian::native_to_big(sequence);
223 memcpy(u.data(), &bigEndianSequence, sizeof(bigEndianSequence));
224 memcpy(u.data() + sizeof(bigEndianSequence), account.data(), sizeof(account));
225 return u;
226}
227
228//------------------------------------------------------------------------------
229
230namespace keylet {
231
232Keylet
233account(AccountID const& id) noexcept
234{
235 return Keylet{ltACCOUNT_ROOT, indexHash(LedgerNameSpace::Account, id)};
236}
237
238Keylet
239child(UInt256 const& key) noexcept
240{
241 return {ltCHILD, key};
242}
243
244Keylet const&
245skip() noexcept
246{
247 static Keylet const kRet{ltLEDGER_HASHES, indexHash(LedgerNameSpace::SkipList)};
248 return kRet;
249}
250
251Keylet
252skip(LedgerIndex ledger) noexcept
253{
254 return {
255 ltLEDGER_HASHES,
256 indexHash(LedgerNameSpace::SkipList, static_cast<std::uint32_t>(ledger) >> 16)};
257}
258
259Keylet const&
260amendments() noexcept
261{
262 static Keylet const kRet{ltAMENDMENTS, indexHash(LedgerNameSpace::Amendments)};
263 return kRet;
264}
265
266Keylet const&
267feeSettings() noexcept
268{
269 static Keylet const kRet{ltFEE_SETTINGS, indexHash(LedgerNameSpace::FeeSettings)};
270 return kRet;
271}
272
273Keylet const&
274negativeUNL() noexcept
275{
276 static Keylet const kRet{ltNEGATIVE_UNL, indexHash(LedgerNameSpace::NegativeUnl)};
277 return kRet;
278}
279
280Keylet
281book(Book const& b)
282{
283 return {ltDIR_NODE, getBookBase(b)};
284}
285
286Keylet
287trustLine(AccountID const& id0, AccountID const& id1, Currency const& currency) noexcept
288{
289 // There is code in TrustSet that calls us with id0 == id1, to allow users
290 // to locate and delete such "weird" trustlines. If we remove that code, we
291 // could enable this assert:
292 // XRPL_ASSERT(id0 != id1, "xrpl::keylet::trustLine : accounts must be
293 // different");
294
295 // A trust line is shared between two accounts; while we typically think
296 // of this as an "issuer" and a "holder" the relationship is actually fully
297 // bidirectional.
298 //
299 // So that we can generate a unique ID for a trust line, regardess of which
300 // side of the line we're looking at, we define a "canonical" order for the
301 // two accounts (smallest then largest) and hash them in that order:
302 auto const accounts = std::minmax(id0, id1);
303
304 return {
305 ltRIPPLE_STATE,
306 indexHash(LedgerNameSpace::TrustLine, accounts.first, accounts.second, currency)};
307}
308
309Keylet
310offer(AccountID const& id, SeqProxy const& seq) noexcept
311{
312 return {ltOFFER, indexHash(LedgerNameSpace::Offer, id, seq.value())};
313}
314
315Keylet
316quality(Keylet const& k, std::uint64_t const q) noexcept
317{
318 XRPL_ASSERT(k.type == ltDIR_NODE, "xrpl::keylet::quality : valid input type");
319
320 // Indexes are stored in big endian format: they print as hex as stored.
321 // Most significant bytes are first and the least significant bytes
322 // represent adjacent entries. We place the quality, in big endian format,
323 // in the 8 right most bytes; this way, incrementing goes to the next entry
324 // for indexes.
325 UInt256 x = k.key;
326
327 // Store the quality as a big-endian integer in the final 8 bytes.
328 // store_big_u64 writes through unaligned byte storage (via memcpy) and
329 // applies the endian conversion, avoiding the alignment/strict-aliasing UB
330 // of casting the unsigned char* returned by end() to a std::uint64_t*.
331 boost::endian::store_big_u64(x.end() - 8, q);
332
333 return {ltDIR_NODE, x};
334}
335
336Keylet
337next(Keylet const& k)
338{
339 XRPL_ASSERT(k.type == ltDIR_NODE, "xrpl::keylet::next : valid input type");
340 return {ltDIR_NODE, getQualityNext(k.key)};
341}
342
343Keylet
344ticket(AccountID const& id, SeqProxy const& seq)
345{
346 XRPL_ASSERT(seq.isTicket(), "xrpl::keylet::ticket : valid input");
347 return {ltTICKET, indexHash(LedgerNameSpace::Ticket, id, seq.value())};
348}
349
350// This function is presently static, since it's never accessed from anywhere
351// else. If we ever support multiple pages of signer lists, this would be the
352// keylet used to locate them.
353static Keylet
355{
356 return {ltSIGNER_LIST, indexHash(LedgerNameSpace::SignerList, account, page)};
357}
358
359Keylet
361{
362 return signerList(account, 0);
363}
364
365Keylet
366sponsorship(AccountID const& sponsor, AccountID const& sponsee) noexcept
367{
368 return {ltSPONSORSHIP, indexHash(LedgerNameSpace::Sponsorship, sponsor, sponsee)};
369}
370
371Keylet
372check(AccountID const& id, SeqProxy const& seq) noexcept
373{
374 return {ltCHECK, indexHash(LedgerNameSpace::Check, id, seq.value())};
375}
376
377Keylet
378txProposal(AccountID const& target, std::uint32_t ticketSequence) noexcept
379{
380 return {
381 ltTRANSACTION_PROPOSAL,
382 indexHash(LedgerNameSpace::TransactionProposal, target, ticketSequence)};
383}
384
385Keylet
386depositPreauth(AccountID const& owner, AccountID const& preauthorized) noexcept
387{
388 return {ltDEPOSIT_PREAUTH, indexHash(LedgerNameSpace::DepositPreauth, owner, preauthorized)};
389}
390
391// Credentials should be sorted here, use credentials::makeSorted
392Keylet
394 AccountID const& owner,
395 std::set<std::pair<AccountID, Slice>> const& authCreds) noexcept
396{
398 hashes.reserve(authCreds.size());
399 for (auto const& o : authCreds)
400 hashes.emplace_back(sha512Half(o.first, o.second));
401
402 return {
403 ltDEPOSIT_PREAUTH, indexHash(LedgerNameSpace::DepositPreauthCredentials, owner, hashes)};
404}
405
406//------------------------------------------------------------------------------
407
408Keylet
409unchecked(UInt256 const& key) noexcept
410{
411 return {ltANY, key};
412}
413
414Keylet
415ownerDir(AccountID const& id) noexcept
416{
417 return {ltDIR_NODE, indexHash(LedgerNameSpace::OwnerDir, id)};
418}
419
420Keylet
421page(UInt256 const& key, std::uint64_t const index) noexcept
422{
423 if (index == 0)
424 return {ltDIR_NODE, key};
425
426 return {ltDIR_NODE, indexHash(LedgerNameSpace::DirNode, key, index)};
427}
428
429Keylet
430escrow(AccountID const& src, SeqProxy const& seq) noexcept
431{
432 return {ltESCROW, indexHash(LedgerNameSpace::Escrow, src, seq.value())};
433}
434
435Keylet
436payChannel(AccountID const& src, AccountID const& dst, SeqProxy const& seq) noexcept
437{
438 return {ltPAYCHAN, indexHash(LedgerNameSpace::XRPPaymentChannel, src, dst, seq.value())};
439}
440
441Keylet
443{
445 std::memcpy(buf.data(), owner.data(), owner.size());
446 return {ltNFTOKEN_PAGE, UInt256::fromRaw(buf)};
447}
448
449Keylet
451{
453 std::memcpy(id.data(), owner.data(), owner.size());
454 return {ltNFTOKEN_PAGE, id};
455}
456
457Keylet
458nftokenPage(Keylet const& k, UInt256 const& token)
459{
460 XRPL_ASSERT(k.type == ltNFTOKEN_PAGE, "xrpl::keylet::nftokenPage : valid input type");
461 return {ltNFTOKEN_PAGE, (k.key & ~nft::kPageMask) + (token & nft::kPageMask)};
462}
463
464Keylet
465nftokenOffer(AccountID const& owner, SeqProxy const& seq)
466{
467 return {ltNFTOKEN_OFFER, indexHash(LedgerNameSpace::NftokenOffer, owner, seq.value())};
468}
469
470Keylet
471nftBuys(UInt256 const& id) noexcept
472{
473 return {ltDIR_NODE, indexHash(LedgerNameSpace::NftokenBuyOffers, id)};
474}
475
476Keylet
477nftSells(UInt256 const& id) noexcept
478{
479 return {ltDIR_NODE, indexHash(LedgerNameSpace::NftokenSellOffers, id)};
480}
481
482Keylet
483amm(Asset const& asset1, Asset const& asset2) noexcept
484{
485 auto const& [minA, maxA] = std::minmax(asset1, asset2);
486 return std::visit(
487 []<ValidIssueType TIss1, ValidIssueType TIss2>(TIss1 const& issue1, TIss2 const& issue2) {
489 {
490 return amm(indexHash(
492 issue1.account,
493 issue1.currency,
494 issue2.account,
495 issue2.currency));
496 }
498 {
499 return amm(indexHash(
500 LedgerNameSpace::Amm, issue1.account, issue1.currency, issue2.getMptID()));
501 }
503 {
504 return amm(indexHash(
505 LedgerNameSpace::Amm, issue1.getMptID(), issue2.account, issue2.currency));
506 }
508 {
509 return amm(indexHash(LedgerNameSpace::Amm, issue1.getMptID(), issue2.getMptID()));
510 }
511 },
512 minA.value(),
513 maxA.value());
514}
515
516Keylet
517amm(UInt256 const& id) noexcept
518{
519 return {ltAMM, id};
520}
521
522Keylet
523delegate(AccountID const& account, AccountID const& authorizedAccount) noexcept
524{
525 return {ltDELEGATE, indexHash(LedgerNameSpace::Delegate, account, authorizedAccount)};
526}
527
528Keylet
529did(AccountID const& account) noexcept
530{
531 return {ltDID, indexHash(LedgerNameSpace::Did, account)};
532}
533
534Keylet
535oracle(AccountID const& account, std::uint32_t const documentID) noexcept
536{
537 return {ltORACLE, indexHash(LedgerNameSpace::Oracle, account, documentID)};
538}
539
540Keylet
541mptokenIssuance(MPTID const& issuanceID) noexcept
542{
543 return {ltMPTOKEN_ISSUANCE, indexHash(LedgerNameSpace::MPTokenIssuance, issuanceID)};
544}
545
546Keylet
547mptoken(MPTID const& issuanceID, AccountID const& holder) noexcept
548{
549 return mptoken(mptokenIssuance(issuanceID).key, holder);
550}
551
552Keylet
553mptoken(UInt256 const& issuanceKey, AccountID const& holder) noexcept
554{
555 return {ltMPTOKEN, indexHash(LedgerNameSpace::MPToken, issuanceKey, holder)};
556}
557
558Keylet
559credential(AccountID const& subject, AccountID const& issuer, Slice const& credType) noexcept
560{
561 return {ltCREDENTIAL, indexHash(LedgerNameSpace::Credential, subject, issuer, credType)};
562}
563
564Keylet
565vault(AccountID const& owner, SeqProxy const& seq) noexcept
566{
567 return vault(indexHash(LedgerNameSpace::Vault, owner, seq.value()));
568}
569
570Keylet
571loanBroker(AccountID const& owner, SeqProxy const& seq) noexcept
572{
573 return loanBroker(indexHash(LedgerNameSpace::LoanBroker, owner, seq.value()));
574}
575
576Keylet
577loan(UInt256 const& loanBrokerID, SeqProxy const& loanSeq) noexcept
578{
579 return loan(indexHash(LedgerNameSpace::Loan, loanBrokerID, loanSeq.value()));
580}
581
582Keylet
583permissionedDomain(AccountID const& account, SeqProxy const& seq) noexcept
584{
585 return {
586 ltPERMISSIONED_DOMAIN,
588}
589
590Keylet
591permissionedDomain(UInt256 const& domainID) noexcept
592{
593 return {ltPERMISSIONED_DOMAIN, domainID};
594}
595
596} // namespace keylet
597
598} // namespace xrpl
static BaseUInt fromRaw(Container const &c)
Definition base_uint.h:303
iterator end()
Definition base_uint.h:133
pointer data()
Definition base_uint.h:117
static constexpr std::size_t size()
Definition base_uint.h:549
Specifies an order book.
Definition Book.h:28
A type that represents either a sequence value or a ticket value.
Definition SeqProxy.h:37
constexpr bool isTicket() const
Definition SeqProxy.h:92
constexpr std::uint32_t value() const
Definition SeqProxy.h:80
An immutable linear range of bytes.
Definition Slice.h:28
T data(T... args)
T emplace_back(T... args)
T forward(T... args)
T is_same_v
T memcpy(T... args)
T minmax(T... args)
Keylet const & skip() noexcept
The index of the "short" skip list.
Definition Indexes.cpp:245
Keylet nftokenOffer(AccountID const &owner, SeqProxy const &seq)
An offer from an account to buy or sell an NFT.
Definition Indexes.cpp:465
Keylet oracle(AccountID const &account, std::uint32_t const documentID) noexcept
Definition Indexes.cpp:535
Keylet next(Keylet const &k)
The directory for the next lower quality.
Definition Indexes.cpp:337
Keylet payChannel(AccountID const &src, AccountID const &dst, SeqProxy const &seq) noexcept
A PaymentChannel.
Definition Indexes.cpp:436
Keylet const & negativeUNL() noexcept
The (fixed) index of the object containing the ledger negativeUNL.
Definition Indexes.cpp:274
Keylet escrow(AccountID const &src, SeqProxy const &seq) noexcept
An escrow entry.
Definition Indexes.cpp:430
Keylet did(AccountID const &account) noexcept
Definition Indexes.cpp:529
Keylet quality(Keylet const &k, std::uint64_t const q) noexcept
The initial directory page for a specific quality.
Definition Indexes.cpp:316
Keylet offer(AccountID const &id, SeqProxy const &seq) noexcept
An offer from an account.
Definition Indexes.cpp:310
Keylet depositPreauth(AccountID const &owner, AccountID const &preauthorized) noexcept
A DepositPreauth.
Definition Indexes.cpp:386
Keylet nftokenPage(Keylet const &k, UInt256 const &token)
Definition Indexes.cpp:458
Keylet book(Book const &b)
The beginning of an order book.
Definition Indexes.cpp:281
Keylet const & feeSettings() noexcept
The (fixed) index of the object containing the ledger fees.
Definition Indexes.cpp:267
Keylet const & amendments() noexcept
The index of the amendment table.
Definition Indexes.cpp:260
Keylet signerList(AccountID const &account) noexcept
A SignerList.
Definition Indexes.cpp:360
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition Indexes.cpp:415
Keylet txProposal(AccountID const &target, std::uint32_t ticketSequence) noexcept
A TransactionProposal.
Definition Indexes.cpp:378
Keylet check(AccountID const &id, SeqProxy const &seq) noexcept
A Check.
Definition Indexes.cpp:372
Keylet amm(Asset const &issue1, Asset const &issue2) noexcept
AMM entry.
Definition Indexes.cpp:483
Keylet nftokenPageMin(AccountID const &owner)
NFT page keylets.
Definition Indexes.cpp:442
Keylet unchecked(UInt256 const &key) noexcept
Any ledger entry.
Definition Indexes.cpp:409
Keylet ticket(AccountID const &id, SeqProxy const &ticketSeq)
A ticket belonging to an account.
Definition Indexes.cpp:344
Keylet vault(AccountID const &owner, SeqProxy const &seq) noexcept
Definition Indexes.cpp:565
Keylet permissionedDomain(AccountID const &account, SeqProxy const &seq) noexcept
Definition Indexes.cpp:583
Keylet nftokenPageMax(AccountID const &owner)
A keylet for the owner's last possible NFT page.
Definition Indexes.cpp:450
Keylet page(UInt256 const &root, std::uint64_t const index=0) noexcept
A page in a directory.
Definition Indexes.cpp:421
Keylet mptoken(MPTID const &issuanceID, AccountID const &holder) noexcept
Definition Indexes.cpp:547
Keylet delegate(AccountID const &account, AccountID const &authorizedAccount) noexcept
A keylet for Delegate object.
Definition Indexes.cpp:523
Keylet loanBroker(AccountID const &owner, SeqProxy const &seq) noexcept
Definition Indexes.cpp:571
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:233
Keylet sponsorship(AccountID const &sponsor, AccountID const &sponsee) noexcept
A Sponsorship.
Definition Indexes.cpp:366
Keylet nftSells(UInt256 const &id) noexcept
The directory of sell offers for the specified NFT.
Definition Indexes.cpp:477
Keylet nftBuys(UInt256 const &id) noexcept
The directory of buy offers for the specified NFT.
Definition Indexes.cpp:471
Keylet loan(UInt256 const &loanBrokerID, SeqProxy const &loanSeq) noexcept
Definition Indexes.cpp:577
Keylet credential(AccountID const &subject, AccountID const &issuer, Slice const &credType) noexcept
Definition Indexes.cpp:559
Keylet child(UInt256 const &key) noexcept
Any item that can be in an owner dir.
Definition Indexes.cpp:239
Keylet mptokenIssuance(MPTID const &issuanceID) noexcept
Definition Indexes.cpp:541
Keylet trustLine(AccountID const &id0, AccountID const &id1, Currency const &currency) noexcept
The index of a trust line for a given currency.
Definition Indexes.cpp:287
constexpr UInt256 kPageMask(std::string_view("0000000000000000000000000000000000000000ffffffffffffffffffffffff"))
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
UInt256 getBookBase(Book const &book)
Definition Indexes.cpp:136
std::uint32_t LedgerIndex
A ledger index.
Definition Protocol.h:409
std::uint64_t getQuality(UInt256 const &uBase)
Definition Indexes.cpp:207
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
Definition UintTypes.h:42
UInt256 getQualityNext(UInt256 const &uBase)
Definition Indexes.cpp:199
constexpr Dest safeCast(Src s) noexcept
Definition safe_cast.h:21
static UInt256 indexHash(LedgerNameSpace space, Args const &... args)
Definition Indexes.cpp:130
BaseUInt< 256 > UInt256
Definition base_uint.h:581
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
Definition UintTypes.h:54
LedgerNameSpace
Type-specific prefix for calculating ledger indices.
Definition Indexes.cpp:84
MPTID makeMptID(std::uint32_t const sequence, AccountID const &account)
Definition Indexes.cpp:219
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:34
bool isConsistent(Asset const &asset)
Definition Asset.h:323
@ ltANY
A special type, matching any ledger entry type.
@ ltCHILD
A special type, matching any ledger type except directory nodes.
std::array< KeyletDesc< AccountID const & >, 6 > const kDirectAccountKeylets
Definition Indexes.cpp:37
Sha512HalfHasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
Definition digest.h:215
T reserve(T... args)
A pair of SHAMap key and LedgerEntryType.
Definition Keylet.h:20
UInt256 key
Definition Keylet.h:21
LedgerEntryType type
Definition Keylet.h:22
T visit(T... args)