5#include <xrpl/protocol/KnownFormats.h>
6#include <xrpl/protocol/SOTemplate.h>
42#pragma push_macro("LEDGER_ENTRY")
45#define LEDGER_ENTRY(tag, value, ...) tag = value,
47#include <xrpl/protocol/detail/ledger_entries.macro>
50#pragma pop_macro("LEDGER_ENTRY")
86 ltNICKNAME [[deprecated(
"This object type is not supported and should not be used.")]] = 0x006e,
95 ltCONTRACT [[deprecated(
"This object type is not supported and should not be used.")]] = 0x0063,
104 ltGENERATOR_MAP [[deprecated(
"This object type is not supported and should not be used.")]] =
119#pragma push_macro("XMACRO")
120#pragma push_macro("TO_VALUE")
121#pragma push_macro("VALUE_TO_MAP")
122#pragma push_macro("NULL_NAME")
123#pragma push_macro("TO_MAP")
124#pragma push_macro("ALL_LEDGER_FLAGS")
132#undef ALL_LEDGER_FLAGS
136#define XMACRO(LEDGER_OBJECT, LSF_FLAG, LSF_FLAG2) \
137 LEDGER_OBJECT(AccountRoot, \
138 LSF_FLAG(lsfPasswordSpent, 0x00010000) \
139 LSF_FLAG(lsfRequireDestTag, 0x00020000) \
140 LSF_FLAG(lsfRequireAuth, 0x00040000) \
141 LSF_FLAG(lsfDisallowXRP, 0x00080000) \
142 LSF_FLAG(lsfDisableMaster, 0x00100000) \
143 LSF_FLAG(lsfNoFreeze, 0x00200000) \
144 LSF_FLAG(lsfGlobalFreeze, 0x00400000) \
145 LSF_FLAG(lsfDefaultRipple, 0x00800000) \
146 LSF_FLAG(lsfDepositAuth, 0x01000000) \
147 LSF_FLAG(lsfDisallowIncomingNFTokenOffer, 0x04000000) \
148 LSF_FLAG(lsfDisallowIncomingCheck, 0x08000000) \
149 LSF_FLAG(lsfDisallowIncomingPayChan, 0x10000000) \
150 LSF_FLAG(lsfDisallowIncomingTrustline, 0x20000000) \
151 LSF_FLAG(lsfAllowTrustLineLocking, 0x40000000) \
152 LSF_FLAG(lsfAllowTrustLineClawback, 0x80000000)) \
154 LEDGER_OBJECT(Offer, \
155 LSF_FLAG(lsfPassive, 0x00010000) \
156 LSF_FLAG(lsfSell, 0x00020000) \
157 LSF_FLAG(lsfHybrid, 0x00040000)) \
159 LEDGER_OBJECT(RippleState, \
160 LSF_FLAG(lsfLowReserve, 0x00010000) \
161 LSF_FLAG(lsfHighReserve, 0x00020000) \
162 LSF_FLAG(lsfLowAuth, 0x00040000) \
163 LSF_FLAG(lsfHighAuth, 0x00080000) \
164 LSF_FLAG(lsfLowNoRipple, 0x00100000) \
165 LSF_FLAG(lsfHighNoRipple, 0x00200000) \
166 LSF_FLAG(lsfLowFreeze, 0x00400000) \
167 LSF_FLAG(lsfHighFreeze, 0x00800000) \
168 LSF_FLAG(lsfAMMNode, 0x01000000) \
170 LSF_FLAG(lsfLowDeepFreeze, 0x02000000) \
171 LSF_FLAG(lsfHighDeepFreeze, 0x04000000)) \
173 LEDGER_OBJECT(SignerList, \
174 LSF_FLAG(lsfOneOwnerCount, 0x00010000)) \
176 LEDGER_OBJECT(DirNode, \
177 LSF_FLAG(lsfNFTokenBuyOffers, 0x00000001) \
178 LSF_FLAG(lsfNFTokenSellOffers, 0x00000002)) \
180 LEDGER_OBJECT(NFTokenOffer, \
181 LSF_FLAG(lsfSellNFToken, 0x00000001)) \
183 LEDGER_OBJECT(MPTokenIssuance, \
184 LSF_FLAG(lsfMPTLocked, 0x00000001) \
185 LSF_FLAG(lsfMPTCanLock, 0x00000002) \
186 LSF_FLAG(lsfMPTRequireAuth, 0x00000004) \
187 LSF_FLAG(lsfMPTCanEscrow, 0x00000008) \
188 LSF_FLAG(lsfMPTCanTrade, 0x00000010) \
189 LSF_FLAG(lsfMPTCanTransfer, 0x00000020) \
190 LSF_FLAG(lsfMPTCanClawback, 0x00000040) \
191 LSF_FLAG(lsfMPTCanHoldConfidentialBalance, 0x00000080)) \
193 LEDGER_OBJECT(MPToken, \
194 LSF_FLAG2(lsfMPTLocked, 0x00000001) \
195 LSF_FLAG(lsfMPTAuthorized, 0x00000002) \
196 LSF_FLAG(lsfMPTAMM, 0x00000004)) \
198 LEDGER_OBJECT(Credential, \
199 LSF_FLAG(lsfAccepted, 0x00010000)) \
201 LEDGER_OBJECT(Vault, \
202 LSF_FLAG(lsfVaultPrivate, 0x00010000)) \
204 LEDGER_OBJECT(Loan, \
205 LSF_FLAG(lsfLoanDefault, 0x00010000) \
206 LSF_FLAG(lsfLoanImpaired, 0x00020000) \
207 LSF_FLAG(lsfLoanOverpayment, 0x00040000)) \
209 LEDGER_OBJECT(Sponsorship, \
210 LSF_FLAG(lsfSponsorshipRequireSignForFee, 0x00010000) \
211 LSF_FLAG(lsfSponsorshipRequireSignForReserve, 0x00020000))
223#define TO_VALUE(name, value) name = (value),
224#define NULL_NAME(name, values) values
225#define NULL_OUTPUT(name, value)
243#define VALUE_TO_MAP(name, value) {#name, value},
244#define TO_MAP(name, values) \
245 inline LedgerFlagMap const& get##name##Flags() \
247 static LedgerFlagMap const flags = {values}; \
250XMACRO(TO_MAP, VALUE_TO_MAP, VALUE_TO_MAP)
262#define ALL_LEDGER_FLAGS(name, values) {#name, get##name##Flags()},
267 XMACRO(ALL_LEDGER_FLAGS, NULL_OUTPUT, NULL_OUTPUT)};
277#undef ALL_LEDGER_FLAGS
279#pragma pop_macro("XMACRO")
280#pragma pop_macro("TO_VALUE")
281#pragma pop_macro("VALUE_TO_MAP")
282#pragma pop_macro("NULL_NAME")
283#pragma pop_macro("TO_MAP")
284#pragma pop_macro("ALL_LEDGER_FLAGS")
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::map< std::string, std::uint32_t > LedgerFlagMap
constexpr std::uint32_t lsifMPTCanClawback
constexpr std::uint32_t lsifMPTCanHoldConfidentialBalance
constexpr std::uint32_t lsifMPTRequireAuth
constexpr std::uint32_t lsifMPTCanEscrow
constexpr std::uint32_t lsifMPTCanTrade
constexpr std::uint32_t lsifMPTMetadata
std::vector< std::pair< std::string, LedgerFlagMap > > const & getAllLedgerFlags()
LedgerEntryType
Identifiers for on-ledger objects.
@ ltGENERATOR_MAP
A legacy, deprecated type.
@ ltNICKNAME
A legacy, deprecated type.
@ ltCONTRACT
A legacy, deprecated type.
@ ltANY
A special type, matching any ledger entry type.
@ ltCHILD
A special type, matching any ledger type except directory nodes.
constexpr std::uint32_t lsifMPTCanLock
constexpr std::uint32_t lsifMPTTransferFee
constexpr std::uint32_t lsifMPTCanTransfer