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, 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
156 // ltRIPPLE_STATE
157 lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
158 lsfHighReserve = 0x00020000,
159 lsfLowAuth = 0x00040000,
160 lsfHighAuth = 0x00080000,
161 lsfLowNoRipple = 0x00100000,
162 lsfHighNoRipple = 0x00200000,
163 lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
164 lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
165 lsfLowDeepFreeze = 0x02000000, // True, low side has set deep freeze flag
166 lsfHighDeepFreeze = 0x04000000, // True, high side has set deep freeze flag
167 lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
168 // apps to identify payments via AMM.
169
170 // ltSIGNER_LIST
171 lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
172
173 // ltDIR_NODE
176
177 // ltNFTOKEN_OFFER
178 lsfSellNFToken = 0x00000001,
179
180 // ltMPTOKEN_ISSUANCE
181 lsfMPTLocked = 0x00000001, // Also used in ltMPTOKEN
182 lsfMPTCanLock = 0x00000002,
183 lsfMPTRequireAuth = 0x00000004,
184 lsfMPTCanEscrow = 0x00000008,
185 lsfMPTCanTrade = 0x00000010,
186 lsfMPTCanTransfer = 0x00000020,
187 lsfMPTCanClawback = 0x00000040,
188
189 // ltMPTOKEN
190 lsfMPTAuthorized = 0x00000002,
191
192 // ltCREDENTIAL
193 lsfAccepted = 0x00010000,
194};
195
196//------------------------------------------------------------------------------
197
200class LedgerFormats : public KnownFormats<LedgerEntryType, LedgerFormats>
201{
202private:
207
208public:
209 static LedgerFormats const&
210 getInstance();
211};
212
213} // namespace ripple
214
215#endif
Manages a list of known formats.
Definition: KnownFormats.h:41
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
@ 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.