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