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 
102  ltLEDGER_HASHES = 0x0068,
103 
110  ltAMENDMENTS = 0x0066,
111 
118  ltFEE_SETTINGS = 0x0073,
119 
124  ltESCROW = 0x0075,
125 
130  ltPAYCHAN = 0x0078,
131 
136  ltCHECK = 0x0043,
137 
143 
150  ltNEGATIVE_UNL = 0x004e,
151 
152  //---------------------------------------------------------------------------
164  ltANY = 0,
165 
177  ltCHILD = 0x1CD2,
178 
179  //---------------------------------------------------------------------------
186  ltNICKNAME [[deprecated("This object type is not supported and should not be used.")]] = 0x006e,
187 
194  ltCONTRACT [[deprecated("This object type is not supported and should not be used.")]] = 0x0063,
195 
202  ltGENERATOR_MAP [[deprecated("This object type is not supported and should not be used.")]] = 0x0067,
203 };
204 // clang-format off
205 
210  // ltACCOUNT_ROOT
211  lsfPasswordSpent = 0x00010000, // True, if password set fee is spent.
213  0x00020000, // True, to require a DestinationTag for payments.
215  0x00040000, // True, to require a authorization to hold IOUs.
216  lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP.
217  lsfDisableMaster = 0x00100000, // True, force regular key
218  lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
219  lsfGlobalFreeze = 0x00400000, // True, all assets frozen
221  0x00800000, // True, trust lines allow rippling by default
222  lsfDepositAuth = 0x01000000, // True, all deposits require authorization
223 
224  // ltOFFER
225  lsfPassive = 0x00010000,
226  lsfSell = 0x00020000, // True, offer was placed as a sell.
227 
228  // ltRIPPLE_STATE
229  lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
230  lsfHighReserve = 0x00020000,
231  lsfLowAuth = 0x00040000,
232  lsfHighAuth = 0x00080000,
233  lsfLowNoRipple = 0x00100000,
234  lsfHighNoRipple = 0x00200000,
235  lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
236  lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
237 
238  // ltSIGNER_LIST
239  lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
240 };
241 
242 //------------------------------------------------------------------------------
243 
246 class LedgerFormats : public KnownFormats<LedgerEntryType, LedgerFormats>
247 {
248 private:
252  LedgerFormats();
253 
254 public:
255  static LedgerFormats const&
256  getInstance();
257 };
258 
259 } // namespace ripple
260 
261 #endif
ripple::ltTICKET
@ ltTICKET
A ledger object which describes a ticket.
Definition: LedgerFormats.h:80
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition: LedgerFormats.h:211
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition: LedgerFormats.h:219
ripple::ltANY
@ ltANY
A special type, matching any ledger entry type.
Definition: LedgerFormats.h:164
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition: LedgerFormats.h:217
ripple::lsfLowReserve
@ lsfLowReserve
Definition: LedgerFormats.h:229
ripple::ltLEDGER_HASHES
@ ltLEDGER_HASHES
A ledger object that contains a list of ledger hashes.
Definition: LedgerFormats.h:102
ripple::ltCONTRACT
@ ltCONTRACT
A legacy, deprecated type.
Definition: LedgerFormats.h:194
ripple::lsfLowAuth
@ lsfLowAuth
Definition: LedgerFormats.h:231
ripple::lsfLowNoRipple
@ lsfLowNoRipple
Definition: LedgerFormats.h:233
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:136
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
The ledger object which lists the network's fee settings.
Definition: LedgerFormats.h:118
ripple::ltCHILD
@ ltCHILD
A special type, matching any ledger type except directory nodes.
Definition: LedgerFormats.h:177
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition: LedgerFormats.h:222
ripple::lsfHighAuth
@ lsfHighAuth
Definition: LedgerFormats.h:232
ripple::ltDIR_NODE
@ ltDIR_NODE
A ledger object which contains a list of object identifiers.
Definition: LedgerFormats.h:66
ripple::ltAMENDMENTS
@ ltAMENDMENTS
The ledger object which lists details about amendments on the network.
Definition: LedgerFormats.h:110
ripple::lsfRequireAuth
@ lsfRequireAuth
Definition: LedgerFormats.h:214
ripple::ltOFFER
@ ltOFFER
A ledger object which describes an offer on the DEX.
Definition: LedgerFormats.h:92
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition: LedgerFormats.h:220
ripple::lsfSell
@ lsfSell
Definition: LedgerFormats.h:226
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:124
ripple::LedgerFormats::LedgerFormats
LedgerFormats()
Create the object.
Definition: LedgerFormats.cpp:29
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
A ledger object which describes a deposit preauthorization.
Definition: LedgerFormats.h:142
ripple::lsfOneOwnerCount
@ lsfOneOwnerCount
Definition: LedgerFormats.h:239
std::uint16_t
ripple::lsfPassive
@ lsfPassive
Definition: LedgerFormats.h:225
ripple::ltNICKNAME
@ ltNICKNAME
A legacy, deprecated type.
Definition: LedgerFormats.h:186
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition: LedgerFormats.cpp:240
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition: LedgerFormats.h:212
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition: LedgerFormats.h:234
ripple::lsfHighFreeze
@ lsfHighFreeze
Definition: LedgerFormats.h:236
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::LedgerEntryType
LedgerEntryType
Identifiers for on-ledger objects.
Definition: LedgerFormats.h:53
ripple::ltNEGATIVE_UNL
@ ltNEGATIVE_UNL
The ledger object which tracks the current negative UNL state.
Definition: LedgerFormats.h:150
ripple::lsfNoFreeze
@ lsfNoFreeze
Definition: LedgerFormats.h:218
ripple::ltACCOUNT_ROOT
@ ltACCOUNT_ROOT
A ledger object which describes an account.
Definition: LedgerFormats.h:59
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition: LedgerFormats.h:209
ripple::ltGENERATOR_MAP
@ ltGENERATOR_MAP
A legacy, deprecated type.
Definition: LedgerFormats.h:202
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition: LedgerFormats.h:246
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition: LedgerFormats.h:216
ripple::ltRIPPLE_STATE
@ ltRIPPLE_STATE
A ledger object which describes a bidirectional trust line.
Definition: LedgerFormats.h:74
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition: LedgerFormats.h:235
ripple::lsfHighReserve
@ lsfHighReserve
Definition: LedgerFormats.h:230
ripple::ltPAYCHAN
@ ltPAYCHAN
A ledger object describing a single unidirectional XRP payment channel.
Definition: LedgerFormats.h:130