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, name, rpcName, fields) 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)
148 // 0x40000000 is available
150 0x80000000, // True, enable clawback
151
152 // ltOFFER
153 lsfPassive = 0x00010000,
154 lsfSell = 0x00020000, // True, offer was placed as a sell.
155 lsfHybrid = 0x00040000, // True, offer is hybrid.
156
157 // ltRIPPLE_STATE
158 lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
159 lsfHighReserve = 0x00020000,
160 lsfLowAuth = 0x00040000,
161 lsfHighAuth = 0x00080000,
162 lsfLowNoRipple = 0x00100000,
163 lsfHighNoRipple = 0x00200000,
164 lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
165 lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
166 lsfLowDeepFreeze = 0x02000000, // True, low side has set deep freeze flag
167 lsfHighDeepFreeze = 0x04000000, // True, high side has set deep freeze flag
168 lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
169 // apps to identify payments via AMM.
170
171 // ltSIGNER_LIST
172 lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
173
174 // ltDIR_NODE
177
178 // ltNFTOKEN_OFFER
179 lsfSellNFToken = 0x00000001,
180
181 // ltMPTOKEN_ISSUANCE
182 lsfMPTLocked = 0x00000001, // Also used in ltMPTOKEN
183 lsfMPTCanLock = 0x00000002,
184 lsfMPTRequireAuth = 0x00000004,
185 lsfMPTCanEscrow = 0x00000008,
186 lsfMPTCanTrade = 0x00000010,
187 lsfMPTCanTransfer = 0x00000020,
188 lsfMPTCanClawback = 0x00000040,
189
190 // ltMPTOKEN
191 lsfMPTAuthorized = 0x00000002,
192
193 // ltCREDENTIAL
194 lsfAccepted = 0x00010000,
195
196 // ltVAULT
197 lsfVaultPrivate = 0x00010000,
198};
199
200//------------------------------------------------------------------------------
201
204class LedgerFormats : public KnownFormats<LedgerEntryType, LedgerFormats>
205{
206private:
211
212public:
213 static LedgerFormats const&
214 getInstance();
215};
216
217} // namespace ripple
218
219#endif
Manages a list of known formats.
Definition: KnownFormats.h:43
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:26
LedgerSpecificFlags
@ lsfHighDeepFreeze
@ lsfMPTCanTransfer
@ lsfMPTCanTrade
@ lsfRequireDestTag
@ lsfMPTCanEscrow
@ lsfOneOwnerCount
@ lsfPasswordSpent
@ lsfMPTCanLock
@ lsfDefaultRipple
@ lsfHighNoRipple
@ lsfRequireAuth
@ lsfHighFreeze
@ lsfDisallowIncomingCheck
@ lsfAllowTrustLineClawback
@ lsfLowNoRipple
@ lsfNFTokenBuyOffers
@ lsfMPTCanClawback
@ lsfNFTokenSellOffers
@ lsfDisableMaster
@ lsfHighReserve
@ lsfVaultPrivate
@ lsfDepositAuth
@ lsfDisallowIncomingPayChan
@ lsfMPTRequireAuth
@ lsfDisallowIncomingTrustline
@ lsfDisallowIncomingNFTokenOffer
@ lsfMPTAuthorized
@ lsfGlobalFreeze
@ lsfLowReserve
@ lsfLowFreeze
@ lsfMPTLocked
@ lsfLowDeepFreeze
@ lsfSellNFToken
@ lsfDisallowXRP
LedgerEntryType
Identifiers for on-ledger objects.
Definition: LedgerFormats.h:54
@ ltNICKNAME
A legacy, deprecated type.
@ ltCONTRACT
A legacy, deprecated type.
@ ltCHILD
A special type, matching any ledger type except directory nodes.
Definition: LedgerFormats.h:91
@ ltANY
A special type, matching any ledger entry type.
Definition: LedgerFormats.h:78
@ ltGENERATOR_MAP
A legacy, deprecated type.