rippled
Loading...
Searching...
No Matches
LedgerFormats.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_PROTOCOL_LEDGERFORMATS_H_INCLUDED
21#define RIPPLE_PROTOCOL_LEDGERFORMATS_H_INCLUDED
22
23#include <xrpl/protocol/KnownFormats.h>
24
25namespace ripple {
26
52// clang-format off
54{
55
56#pragma push_macro("LEDGER_ENTRY")
57#undef LEDGER_ENTRY
58
59#define LEDGER_ENTRY(tag, value, ...) tag = value,
60
61#include <xrpl/protocol/detail/ledger_entries.macro>
62
63#undef LEDGER_ENTRY
64#pragma pop_macro("LEDGER_ENTRY")
65
66 //---------------------------------------------------------------------------
78 ltANY = 0,
79
91 ltCHILD = 0x1CD2,
92
93 //---------------------------------------------------------------------------
100 ltNICKNAME [[deprecated("This object type is not supported and should not be used.")]] = 0x006e,
101
108 ltCONTRACT [[deprecated("This object type is not supported and should not be used.")]] = 0x0063,
109
116 ltGENERATOR_MAP [[deprecated("This object type is not supported and should not be used.")]] = 0x0067,
117};
118// clang-format off
119
124 // ltACCOUNT_ROOT
125 lsfPasswordSpent = 0x00010000, // True, if password set fee is spent.
127 0x00020000, // True, to require a DestinationTag for payments.
129 0x00040000, // True, to require a authorization to hold IOUs.
130 lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP.
131 lsfDisableMaster = 0x00100000, // True, force regular key
132 lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
133 lsfGlobalFreeze = 0x00400000, // True, all assets frozen
135 0x00800000, // True, incoming trust lines allow rippling by default
136 lsfDepositAuth = 0x01000000, // True, all deposits require authorization
137/* // reserved for Hooks amendment
138 lsfTshCollect = 0x02000000, // True, allow TSH collect-calls to acc hooks
139*/
141 0x04000000, // True, reject new incoming NFT offers
143 0x08000000, // True, reject new checks
145 0x10000000, // True, reject new paychans
147 0x20000000, // True, reject new trustlines (only if no issued assets)
149 0x40000000, // True, enable trustline locking
151 0x80000000, // True, enable clawback
152
153 // ltOFFER
154 lsfPassive = 0x00010000,
155 lsfSell = 0x00020000, // True, offer was placed as a sell.
156 lsfHybrid = 0x00040000, // True, offer is hybrid.
157
158 // ltRIPPLE_STATE
159 lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
160 lsfHighReserve = 0x00020000,
161 lsfLowAuth = 0x00040000,
162 lsfHighAuth = 0x00080000,
163 lsfLowNoRipple = 0x00100000,
164 lsfHighNoRipple = 0x00200000,
165 lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
166 lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
167 lsfLowDeepFreeze = 0x02000000, // True, low side has set deep freeze flag
168 lsfHighDeepFreeze = 0x04000000, // True, high side has set deep freeze flag
169 lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
170 // apps to identify payments via AMM.
171
172 // ltSIGNER_LIST
173 lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
174
175 // ltDIR_NODE
178
179 // ltNFTOKEN_OFFER
180 lsfSellNFToken = 0x00000001,
181
182 // ltMPTOKEN_ISSUANCE
183 lsfMPTLocked = 0x00000001, // Also used in ltMPTOKEN
184 lsfMPTCanLock = 0x00000002,
185 lsfMPTRequireAuth = 0x00000004,
186 lsfMPTCanEscrow = 0x00000008,
187 lsfMPTCanTrade = 0x00000010,
188 lsfMPTCanTransfer = 0x00000020,
189 lsfMPTCanClawback = 0x00000040,
190
199
200 // ltMPTOKEN
201 lsfMPTAuthorized = 0x00000002,
202
203 // ltCREDENTIAL
204 lsfAccepted = 0x00010000,
205
206 // ltVAULT
207 lsfVaultPrivate = 0x00010000,
208};
209
210//------------------------------------------------------------------------------
211
214class LedgerFormats : public KnownFormats<LedgerEntryType, LedgerFormats>
215{
216private:
221
222public:
223 static LedgerFormats const&
224 getInstance();
225};
226
227} // namespace ripple
228
229#endif
Manages a list of known formats.
Holds the list of known ledger entry formats.
LedgerFormats()
Create the object.
static LedgerFormats const & getInstance()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
@ lsfHighDeepFreeze
@ lsmfMPTCanMutateRequireAuth
@ lsfMPTCanTransfer
@ lsmfMPTCanMutateCanTransfer
@ lsmfMPTCanMutateCanTrade
@ lsfRequireDestTag
@ lsfMPTCanEscrow
@ lsfOneOwnerCount
@ lsfPasswordSpent
@ lsfDefaultRipple
@ lsfHighNoRipple
@ lsfDisallowIncomingCheck
@ lsfAllowTrustLineClawback
@ lsfNFTokenBuyOffers
@ lsmfMPTCanMutateCanEscrow
@ lsfMPTCanClawback
@ lsmfMPTCanMutateCanClawback
@ lsfNFTokenSellOffers
@ lsfDisableMaster
@ lsmfMPTCanMutateMetadata
@ lsfVaultPrivate
@ lsmfMPTCanMutateCanLock
@ lsfDisallowIncomingPayChan
@ lsfMPTRequireAuth
@ lsfDisallowIncomingTrustline
@ lsfAllowTrustLineLocking
@ lsfDisallowIncomingNFTokenOffer
@ lsfMPTAuthorized
@ lsfGlobalFreeze
@ lsmfMPTCanMutateTransferFee
@ lsfLowDeepFreeze
LedgerEntryType
Identifiers for on-ledger objects.
@ ltNICKNAME
A legacy, deprecated type.
@ ltCONTRACT
A legacy, deprecated type.
@ ltCHILD
A special type, matching any ledger type except directory nodes.
@ ltANY
A special type, matching any ledger entry type.
@ ltGENERATOR_MAP
A legacy, deprecated type.