rippled
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 <ripple/protocol/KnownFormats.h>
24 
25 namespace ripple {
26 
52 // clang-format off
54 {
59  ltACCOUNT_ROOT = 0x0061,
60 
66  ltDIR_NODE = 0x0064,
67 
74  ltRIPPLE_STATE = 0x0072,
75 
80  ltTICKET = 0x0054,
81 
86  ltSIGNER_LIST = 0x0053,
87 
92  ltOFFER = 0x006f,
93 
94 
99  ltBRIDGE = 0x0069,
100 
109  ltLEDGER_HASHES = 0x0068,
110 
117  ltAMENDMENTS = 0x0066,
118 
124 
130 
137  ltFEE_SETTINGS = 0x0073,
138 
143  ltESCROW = 0x0075,
144 
149  ltPAYCHAN = 0x0078,
150 
155  ltCHECK = 0x0043,
156 
162 
169  ltNEGATIVE_UNL = 0x004e,
170 
175  ltNFTOKEN_PAGE = 0x0050,
176 
181  ltNFTOKEN_OFFER = 0x0037,
182 
187  ltAMM = 0x0079,
188 
193  ltDID = 0x0049,
194 
198  ltORACLE = 0x0080,
199 
200  //---------------------------------------------------------------------------
212  ltANY = 0,
213 
225  ltCHILD = 0x1CD2,
226 
227  //---------------------------------------------------------------------------
234  ltNICKNAME [[deprecated("This object type is not supported and should not be used.")]] = 0x006e,
235 
242  ltCONTRACT [[deprecated("This object type is not supported and should not be used.")]] = 0x0063,
243 
250  ltGENERATOR_MAP [[deprecated("This object type is not supported and should not be used.")]] = 0x0067,
251 };
252 // clang-format off
253 
258  // ltACCOUNT_ROOT
259  lsfPasswordSpent = 0x00010000, // True, if password set fee is spent.
261  0x00020000, // True, to require a DestinationTag for payments.
263  0x00040000, // True, to require a authorization to hold IOUs.
264  lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP.
265  lsfDisableMaster = 0x00100000, // True, force regular key
266  lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
267  lsfGlobalFreeze = 0x00400000, // True, all assets frozen
269  0x00800000, // True, trust lines allow rippling by default
270  lsfDepositAuth = 0x01000000, // True, all deposits require authorization
271 /* // reserved for Hooks amendment
272  lsfTshCollect = 0x02000000, // True, allow TSH collect-calls to acc hooks
273 */
275  0x04000000, // True, reject new incoming NFT offers
277  0x08000000, // True, reject new checks
279  0x10000000, // True, reject new paychans
281  0x20000000, // True, reject new trustlines (only if no issued assets)
282  // 0x40000000 is available
284  0x80000000, // True, enable clawback
285 
286  // ltOFFER
287  lsfPassive = 0x00010000,
288  lsfSell = 0x00020000, // True, offer was placed as a sell.
289 
290  // ltRIPPLE_STATE
291  lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
292  lsfHighReserve = 0x00020000,
293  lsfLowAuth = 0x00040000,
294  lsfHighAuth = 0x00080000,
295  lsfLowNoRipple = 0x00100000,
296  lsfHighNoRipple = 0x00200000,
297  lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
298  lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
299  lsfAMMNode = 0x01000000, // True, trust line to AMM. Used by client
300  // apps to identify payments via AMM.
301 
302  // ltSIGNER_LIST
303  lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
304 
305  // ltDIR_NODE
306  lsfNFTokenBuyOffers = 0x00000001,
307  lsfNFTokenSellOffers = 0x00000002,
308 
309  // ltNFTOKEN_OFFER
310  lsfSellNFToken = 0x00000001,
311 };
312 
313 //------------------------------------------------------------------------------
314 
317 class LedgerFormats : public KnownFormats<LedgerEntryType, LedgerFormats>
318 {
319 private:
323  LedgerFormats();
324 
325 public:
326  static LedgerFormats const&
327  getInstance();
328 };
329 
330 } // namespace ripple
331 
332 #endif
ripple::ltTICKET
@ ltTICKET
A ledger object which describes a ticket.
Definition: LedgerFormats.h:80
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition: LedgerFormats.h:259
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition: LedgerFormats.h:267
ripple::ltANY
@ ltANY
A special type, matching any ledger entry type.
Definition: LedgerFormats.h:212
ripple::ltORACLE
@ ltORACLE
A ledger object which tracks Oracle.
Definition: LedgerFormats.h:198
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition: LedgerFormats.h:265
ripple::lsfLowReserve
@ lsfLowReserve
Definition: LedgerFormats.h:291
ripple::ltLEDGER_HASHES
@ ltLEDGER_HASHES
A ledger object that contains a list of ledger hashes.
Definition: LedgerFormats.h:109
ripple::ltCONTRACT
@ ltCONTRACT
A legacy, deprecated type.
Definition: LedgerFormats.h:242
ripple::lsfLowAuth
@ lsfLowAuth
Definition: LedgerFormats.h:293
ripple::lsfLowNoRipple
@ lsfLowNoRipple
Definition: LedgerFormats.h:295
ripple::ltSIGNER_LIST
@ ltSIGNER_LIST
A ledger object which contains a signer list for an account.
Definition: LedgerFormats.h:86
ripple::ltCHECK
@ ltCHECK
A ledger object which describes a check.
Definition: LedgerFormats.h:155
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
The ledger object which lists the network's fee settings.
Definition: LedgerFormats.h:137
ripple::lsfAllowTrustLineClawback
@ lsfAllowTrustLineClawback
Definition: LedgerFormats.h:283
ripple::ltCHILD
@ ltCHILD
A special type, matching any ledger type except directory nodes.
Definition: LedgerFormats.h:225
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition: LedgerFormats.h:270
ripple::lsfHighAuth
@ lsfHighAuth
Definition: LedgerFormats.h:294
ripple::ltDIR_NODE
@ ltDIR_NODE
A ledger object which contains a list of object identifiers.
Definition: LedgerFormats.h:66
ripple::lsfSellNFToken
@ lsfSellNFToken
Definition: LedgerFormats.h:310
ripple::ltAMENDMENTS
@ ltAMENDMENTS
The ledger object which lists details about amendments on the network.
Definition: LedgerFormats.h:117
ripple::lsfRequireAuth
@ lsfRequireAuth
Definition: LedgerFormats.h:262
ripple::ltOFFER
@ ltOFFER
A ledger object which describes an offer on the DEX.
Definition: LedgerFormats.h:92
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition: LedgerFormats.h:268
ripple::lsfAMMNode
@ lsfAMMNode
Definition: LedgerFormats.h:299
ripple::lsfSell
@ lsfSell
Definition: LedgerFormats.h:288
ripple::KnownFormats
Manages a list of known formats.
Definition: KnownFormats.h:40
ripple::ltESCROW
@ ltESCROW
A ledger object describing a single escrow.
Definition: LedgerFormats.h:143
ripple::ltDID
@ ltDID
The ledger object which tracks the DID.
Definition: LedgerFormats.h:193
ripple::lsfDisallowIncomingPayChan
@ lsfDisallowIncomingPayChan
Definition: LedgerFormats.h:278
ripple::ltNFTOKEN_OFFER
@ ltNFTOKEN_OFFER
A ledger object which identifies an offer to buy or sell an NFT.
Definition: LedgerFormats.h:181
ripple::LedgerFormats::LedgerFormats
LedgerFormats()
Create the object.
Definition: LedgerFormats.cpp:26
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
A ledger object which describes a deposit preauthorization.
Definition: LedgerFormats.h:161
ripple::lsfOneOwnerCount
@ lsfOneOwnerCount
Definition: LedgerFormats.h:303
std::uint16_t
ripple::lsfPassive
@ lsfPassive
Definition: LedgerFormats.h:287
ripple::ltNICKNAME
@ ltNICKNAME
A legacy, deprecated type.
Definition: LedgerFormats.h:234
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition: LedgerFormats.cpp:362
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition: LedgerFormats.h:260
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition: LedgerFormats.h:296
ripple::lsfHighFreeze
@ lsfHighFreeze
Definition: LedgerFormats.h:298
ripple::ltNFTOKEN_PAGE
@ ltNFTOKEN_PAGE
A ledger object which contains a list of NFTs.
Definition: LedgerFormats.h:175
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::lsfNFTokenSellOffers
@ lsfNFTokenSellOffers
Definition: LedgerFormats.h:307
ripple::ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID
@ ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID
A claim id for a cross chain create account transaction.
Definition: LedgerFormats.h:129
ripple::lsfNFTokenBuyOffers
@ lsfNFTokenBuyOffers
Definition: LedgerFormats.h:306
ripple::LedgerEntryType
LedgerEntryType
Identifiers for on-ledger objects.
Definition: LedgerFormats.h:53
ripple::ltBRIDGE
@ ltBRIDGE
The ledger object which lists details about sidechains.
Definition: LedgerFormats.h:99
ripple::ltNEGATIVE_UNL
@ ltNEGATIVE_UNL
The ledger object which tracks the current negative UNL state.
Definition: LedgerFormats.h:169
ripple::lsfDisallowIncomingNFTokenOffer
@ lsfDisallowIncomingNFTokenOffer
Definition: LedgerFormats.h:274
ripple::lsfNoFreeze
@ lsfNoFreeze
Definition: LedgerFormats.h:266
ripple::ltACCOUNT_ROOT
@ ltACCOUNT_ROOT
A ledger object which describes an account.
Definition: LedgerFormats.h:59
ripple::lsfDisallowIncomingTrustline
@ lsfDisallowIncomingTrustline
Definition: LedgerFormats.h:280
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition: LedgerFormats.h:257
ripple::ltGENERATOR_MAP
@ ltGENERATOR_MAP
A legacy, deprecated type.
Definition: LedgerFormats.h:250
ripple::lsfDisallowIncomingCheck
@ lsfDisallowIncomingCheck
Definition: LedgerFormats.h:276
ripple::ltXCHAIN_OWNED_CLAIM_ID
@ ltXCHAIN_OWNED_CLAIM_ID
A claim id for a cross chain transaction.
Definition: LedgerFormats.h:123
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition: LedgerFormats.h:317
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition: LedgerFormats.h:264
ripple::ltRIPPLE_STATE
@ ltRIPPLE_STATE
A ledger object which describes a bidirectional trust line.
Definition: LedgerFormats.h:74
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition: LedgerFormats.h:297
ripple::lsfHighReserve
@ lsfHighReserve
Definition: LedgerFormats.h:292
ripple::ltAMM
@ ltAMM
The ledger object which tracks the AMM.
Definition: LedgerFormats.h:187
ripple::ltPAYCHAN
@ ltPAYCHAN
A ledger object describing a single unidirectional XRP payment channel.
Definition: LedgerFormats.h:149