20#include <xrpl/basics/Slice.h> 
   21#include <xrpl/basics/base_uint.h> 
   22#include <xrpl/basics/safe_cast.h> 
   23#include <xrpl/beast/utility/instrumentation.h> 
   24#include <xrpl/protocol/AccountID.h> 
   25#include <xrpl/protocol/Asset.h> 
   26#include <xrpl/protocol/Book.h> 
   27#include <xrpl/protocol/Indexes.h> 
   28#include <xrpl/protocol/LedgerFormats.h> 
   29#include <xrpl/protocol/Protocol.h> 
   30#include <xrpl/protocol/SField.h> 
   31#include <xrpl/protocol/STXChainBridge.h> 
   32#include <xrpl/protocol/SeqProxy.h> 
   33#include <xrpl/protocol/UintTypes.h> 
   34#include <xrpl/protocol/digest.h> 
   35#include <xrpl/protocol/nftPageMask.h> 
   37#include <boost/endian/conversion.hpp> 
  107template <
class... Args>
 
  111    return sha512Half(safe_cast<std::uint16_t>(space), args...);
 
 
  118        isConsistent(book), 
"ripple::getBookBase : input is consistent");
 
 
  143    static constexpr uint256 nextq(
 
  144        "0000000000000000000000000000000000000000000000010000000000000000");
 
  145    return uBase + nextq;
 
 
  165    XRPL_ASSERT(ticketSeq.
isTicket(), 
"ripple::getTicketIndex : valid input");
 
 
  173    sequence = boost::endian::native_to_big(sequence);
 
  174    memcpy(u.
data(), &sequence, 
sizeof(sequence));
 
  175    memcpy(u.
data() + 
sizeof(sequence), account.
data(), 
sizeof(account));
 
 
  283        k.type == ltDIR_NODE, 
"ripple::keylet::quality : valid input type");
 
  295    return {ltDIR_NODE, x};
 
 
  302        k.
type == ltDIR_NODE,
 
  303        "ripple::keylet::next_t::operator() : valid input type");
 
 
  356    hashes.
reserve(authCreds.size());
 
  357    for (
auto const& o : authCreds)
 
 
  383        return {ltDIR_NODE, key};
 
 
  407    return {ltNFTOKEN_PAGE, 
uint256{buf}};
 
 
  415    return {ltNFTOKEN_PAGE, 
id};
 
 
  422        k.
type == ltNFTOKEN_PAGE, 
"ripple::keylet::nftpage : valid input type");
 
  423    return {ltNFTOKEN_PAGE, (k.
key & ~nft::pageMask) + (token & 
nft::pageMask)};
 
 
  448    auto const& [minI, maxI] =
 
 
  478    auto const& issue = 
bridge.issue(chainType);
 
 
  489        ltXCHAIN_OWNED_CLAIM_ID,
 
  492            bridge.lockingChainDoor(),
 
  493            bridge.lockingChainIssue(),
 
  494            bridge.issuingChainDoor(),
 
  495            bridge.issuingChainIssue(),
 
 
  503        ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID,
 
  506            bridge.lockingChainDoor(),
 
  507            bridge.lockingChainIssue(),
 
  508            bridge.issuingChainDoor(),
 
  509            bridge.issuingChainIssue(),
 
 
  556    Slice const& credType) 
noexcept 
 
  573        ltPERMISSIONED_DOMAIN,
 
 
  580    return {ltPERMISSIONED_DOMAIN, domainID};
 
 
std::optional< uint256 > domain
 
A currency issued by an account.
 
A type that represents either a sequence value or a ticket value.
 
constexpr std::uint32_t value() const
 
constexpr bool isTicket() const
 
An immutable linear range of bytes.
 
static constexpr std::size_t size()
 
T emplace_back(T... args)
 
Keylet quality(Keylet const &k, std::uint64_t q) noexcept
The initial directory page for a specific quality.
 
Keylet mptoken(MPTID const &issuanceID, AccountID const &holder) noexcept
 
Keylet oracle(AccountID const &account, std::uint32_t const &documentID) noexcept
 
Keylet delegate(AccountID const &account, AccountID const &authorizedAccount) noexcept
A keylet for Delegate object.
 
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
 
Keylet permissionedDomain(AccountID const &account, std::uint32_t seq) noexcept
 
Keylet const & negativeUNL() noexcept
The (fixed) index of the object containing the ledger negativeUNL.
 
Keylet amm(Asset const &issue1, Asset const &issue2) noexcept
AMM entry.
 
Keylet line(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
 
Keylet const & amendments() noexcept
The index of the amendment table.
 
Keylet nftpage(Keylet const &k, uint256 const &token)
 
Keylet mptIssuance(std::uint32_t seq, AccountID const &issuer) noexcept
 
Keylet xChainClaimID(STXChainBridge const &bridge, std::uint64_t seq)
 
Keylet did(AccountID const &account) noexcept
 
Keylet vault(AccountID const &owner, std::uint32_t seq) noexcept
 
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
 
Keylet unchecked(uint256 const &key) noexcept
Any ledger entry.
 
Keylet escrow(AccountID const &src, std::uint32_t seq) noexcept
An escrow entry.
 
Keylet nftpage_min(AccountID const &owner)
NFT page keylets.
 
Keylet bridge(STXChainBridge const &bridge, STXChainBridge::ChainType chainType)
 
Keylet const & fees() noexcept
The (fixed) index of the object containing the ledger fees.
 
Keylet nftpage_max(AccountID const &owner)
A keylet for the owner's last possible NFT page.
 
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
 
Keylet nft_buys(uint256 const &id) noexcept
The directory of buy offers for the specified NFT.
 
Keylet const & skip() noexcept
The index of the "short" skip list.
 
Keylet nft_sells(uint256 const &id) noexcept
The directory of sell offers for the specified NFT.
 
Keylet signers(AccountID const &account) noexcept
A SignerList.
 
Keylet xChainCreateAccountClaimID(STXChainBridge const &bridge, std::uint64_t seq)
 
Keylet nftoffer(AccountID const &owner, std::uint32_t seq)
An offer from an account to buy or sell an NFT.
 
Keylet check(AccountID const &id, std::uint32_t seq) noexcept
A Check.
 
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
 
Keylet depositPreauth(AccountID const &owner, AccountID const &preauthorized) noexcept
A DepositPreauth.
 
Keylet payChan(AccountID const &src, AccountID const &dst, std::uint32_t seq) noexcept
A PaymentChannel.
 
uint256 constexpr pageMask(std::string_view("0000000000000000000000000000000000000000ffffffffffffffffffffffff"))
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
bool isConsistent(Book const &book)
 
LedgerNameSpace
Type-specific prefix for calculating ledger indices.
 
@ XCHAIN_CREATE_ACCOUNT_CLAIM_ID
 
@ DEPOSIT_PREAUTH_CREDENTIALS
 
std::uint64_t getQuality(uint256 const &uBase)
 
base_uint< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
 
static uint256 indexHash(LedgerNameSpace space, Args const &... args)
 
uint256 getQualityNext(uint256 const &uBase)
 
uint256 getTicketIndex(AccountID const &account, std::uint32_t uSequence)
 
@ ltCHILD
A special type, matching any ledger type except directory nodes.
 
@ ltANY
A special type, matching any ledger entry type.
 
@ credential
Credentials signature.
 
MPTID makeMptID(std::uint32_t sequence, AccountID const &account)
 
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
 
uint256 getBookBase(Book const &book)
 
A pair of SHAMap key and LedgerEntryType.
 
Keylet operator()(Book const &b) const
 
Keylet operator()(Keylet const &k) const
 
Keylet operator()(AccountID const &id, std::uint32_t ticketSeq) const