3#include <xrpl/basics/base_uint.h>
4#include <xrpl/protocol/Book.h>
5#include <xrpl/protocol/Keylet.h>
6#include <xrpl/protocol/LedgerFormats.h>
7#include <xrpl/protocol/Protocol.h>
8#include <xrpl/protocol/PublicKey.h>
9#include <xrpl/protocol/STXChainBridge.h>
10#include <xrpl/protocol/Serializer.h>
11#include <xrpl/protocol/UintTypes.h>
12#include <xrpl/protocol/jss.h>
95 return trustLine(
id, issue.account, issue.currency);
107 return {ltOFFER, key};
130 return {ltTICKET, key};
146 return {ltCHECK, key};
163 return {ltDEPOSIT_PREAUTH, key};
185 XRPL_ASSERT(
root.type == ltDIR_NODE,
"xrpl::keylet::page : valid root type");
225 return {ltNFTOKEN_OFFER,
offer};
270 return {ltCREDENTIAL, key};
282 return {ltMPTOKEN_ISSUANCE, issuanceKey};
291 return {ltMPTOKEN, mptokenKey};
303 return {ltVAULT, vaultKey};
312 return {ltLOAN_BROKER, key};
321 return {ltLOAN, key};
349template <
class... KeyletParams>
361 {{.function = &
keylet::account, .expectedLEName = jss::AccountRoot, .includeInTests =
false},
362 {.function = &
keylet::ownerDir, .expectedLEName = jss::DirectoryNode, .includeInTests =
true},
363 {.function = &
keylet::signerList, .expectedLEName = jss::SignerList, .includeInTests =
true},
367 .expectedLEName = jss::NFTokenPage,
368 .includeInTests =
true},
370 .expectedLEName = jss::NFTokenPage,
371 .includeInTests =
true},
372 {.function = &
keylet::did, .expectedLEName = jss::DID, .includeInTests =
true}}};
Lightweight wrapper to tag static string.
A currency issued by an account.
A type that represents either a sequence value or a ticket value.
An immutable linear range of bytes.
Keylet computation functions.
Keylet const & skip() noexcept
The index of the "short" skip list.
Keylet quality(Keylet const &k, std::uint64_t q) noexcept
The initial directory page for a specific quality.
Keylet next(Keylet const &k)
The directory for the next lower quality.
Keylet ticket(AccountID const &id, std::uint32_t ticketSeq)
A ticket belonging to an account.
Keylet oracle(AccountID const &account, std::uint32_t const &documentID) noexcept
Keylet loanBroker(AccountID const &owner, std::uint32_t seq) noexcept
Keylet const & negativeUNL() noexcept
The (fixed) index of the object containing the ledger negativeUNL.
Keylet did(AccountID const &account) noexcept
Keylet unchecked(uint256 const &key) noexcept
Any ledger entry.
Keylet mptokenIssuance(std::uint32_t seq, AccountID const &issuer) noexcept
Keylet depositPreauth(AccountID const &owner, AccountID const &preauthorized) noexcept
A DepositPreauth.
Keylet book(Book const &b)
The beginning of an order book.
Keylet escrow(AccountID const &src, std::uint32_t seq) noexcept
An escrow entry.
Keylet bridge(STXChainBridge const &bridge, STXChainBridge::ChainType chainType)
Keylet const & feeSettings() noexcept
The (fixed) index of the object containing the ledger fees.
Keylet payChannel(AccountID const &src, AccountID const &dst, std::uint32_t seq) noexcept
A PaymentChannel.
Keylet const & amendments() noexcept
The index of the amendment table.
Keylet signerList(AccountID const &account) noexcept
A SignerList.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Keylet check(AccountID const &id, std::uint32_t seq) noexcept
A Check.
Keylet amm(Asset const &issue1, Asset const &issue2) noexcept
AMM entry.
Keylet nftokenPageMin(AccountID const &owner)
NFT page keylets.
Keylet loan(uint256 const &loanBrokerID, std::uint32_t loanSeq) noexcept
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
Keylet nftokenPage(Keylet const &k, uint256 const &token)
Keylet vault(AccountID const &owner, std::uint32_t seq) noexcept
Keylet nftokenPageMax(AccountID const &owner)
A keylet for the owner's last possible NFT page.
Keylet xChainCreateAccountClaimID(STXChainBridge const &bridge, std::uint64_t seq)
Keylet mptoken(MPTID const &issuanceID, AccountID const &holder) noexcept
Keylet nftSells(uint256 const &id) noexcept
The directory of sell offers for the specified NFT.
Keylet nftBuys(uint256 const &id) noexcept
The directory of buy offers for the specified NFT.
Keylet delegate(AccountID const &account, AccountID const &authorizedAccount) noexcept
A keylet for Delegate object.
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet permissionedDomain(AccountID const &account, std::uint32_t seq) noexcept
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
Keylet credential(AccountID const &subject, AccountID const &issuer, Slice const &credType) noexcept
Keylet xChainClaimID(STXChainBridge const &bridge, std::uint64_t seq)
Keylet nftokenOffer(AccountID const &owner, std::uint32_t seq)
An offer from an account to buy or sell an NFT.
Keylet trustLine(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t LedgerIndex
A ledger index.
uint256 getTicketIndex(AccountID const &account, std::uint32_t uSequence)
std::uint64_t getQuality(uint256 const &uBase)
std::array< KeyletDesc< AccountID const & >, 6 > const kDirectAccountKeylets
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
Number root(Number f, unsigned d)
uint256 getQualityNext(uint256 const &uBase)
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
uint256 getBookBase(Book const &book)
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
MPTID makeMptID(std::uint32_t sequence, AccountID const &account)
std::function< Keylet(KeyletParams...)> function
json::StaticString expectedLEName
A pair of SHAMap key and LedgerEntryType.