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 
35 // Used as the type of a transaction or the type of a ledger entry.
41  ltANY = -3,
42 
47  ltCHILD = -2,
48 
49  ltINVALID = -1,
50 
51  //---------------------------------------------------------------------------
52 
54 
64  ltDIR_NODE = 'd',
65 
67 
68  ltTICKET = 'T',
69 
71 
72  ltOFFER = 'o',
73 
75 
76  ltAMENDMENTS = 'f',
77 
79 
80  ltESCROW = 'u',
81 
82  // Simple unidirection xrp channel
83  ltPAYCHAN = 'x',
84 
85  ltCHECK = 'C',
86 
88 
89  // No longer used or supported. Left here to prevent accidental
90  // reassignment of the ledger type.
91  ltNICKNAME [[deprecated]] = 'n',
92 
93  ltNotUsed01 [[deprecated]] = 'c',
94 };
95 
100  // ltACCOUNT_ROOT
101  lsfPasswordSpent = 0x00010000, // True, if password set fee is spent.
103  0x00020000, // True, to require a DestinationTag for payments.
105  0x00040000, // True, to require a authorization to hold IOUs.
106  lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP.
107  lsfDisableMaster = 0x00100000, // True, force regular key
108  lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
109  lsfGlobalFreeze = 0x00400000, // True, all assets frozen
111  0x00800000, // True, trust lines allow rippling by default
112  lsfDepositAuth = 0x01000000, // True, all deposits require authorization
113 
114  // ltOFFER
115  lsfPassive = 0x00010000,
116  lsfSell = 0x00020000, // True, offer was placed as a sell.
117 
118  // ltRIPPLE_STATE
119  lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
120  lsfHighReserve = 0x00020000,
121  lsfLowAuth = 0x00040000,
122  lsfHighAuth = 0x00080000,
123  lsfLowNoRipple = 0x00100000,
124  lsfHighNoRipple = 0x00200000,
125  lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
126  lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
127 
128  // ltSIGNER_LIST
129  lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
130 };
131 
132 //------------------------------------------------------------------------------
133 
136 class LedgerFormats : public KnownFormats<LedgerEntryType>
137 {
138 private:
142  LedgerFormats();
143 
144 public:
145  static LedgerFormats const&
146  getInstance();
147 };
148 
149 } // namespace ripple
150 
151 #endif
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition: LedgerFormats.h:101
ripple::ltNICKNAME
@ ltNICKNAME
Definition: LedgerFormats.h:91
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition: LedgerFormats.h:109
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition: LedgerFormats.h:107
ripple::lsfLowReserve
@ lsfLowReserve
Definition: LedgerFormats.h:119
ripple::lsfLowAuth
@ lsfLowAuth
Definition: LedgerFormats.h:121
ripple::lsfLowNoRipple
@ lsfLowNoRipple
Definition: LedgerFormats.h:123
ripple::ltESCROW
@ ltESCROW
Definition: LedgerFormats.h:80
ripple::ltANY
@ ltANY
Special type, anything This is used when the type in the Keylet is unknown, such as when building met...
Definition: LedgerFormats.h:41
ripple::ltLEDGER_HASHES
@ ltLEDGER_HASHES
Definition: LedgerFormats.h:74
ripple::ltAMENDMENTS
@ ltAMENDMENTS
Definition: LedgerFormats.h:76
ripple::ltNotUsed01
@ ltNotUsed01
Definition: LedgerFormats.h:93
ripple::ltSIGNER_LIST
@ ltSIGNER_LIST
Definition: LedgerFormats.h:70
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition: LedgerFormats.h:112
ripple::ltTICKET
@ ltTICKET
Definition: LedgerFormats.h:68
ripple::ltCHECK
@ ltCHECK
Definition: LedgerFormats.h:85
ripple::lsfHighAuth
@ lsfHighAuth
Definition: LedgerFormats.h:122
ripple::ltCHILD
@ ltCHILD
Special type, anything not a directory This is used when the type in the Keylet is unknown,...
Definition: LedgerFormats.h:47
ripple::lsfRequireAuth
@ lsfRequireAuth
Definition: LedgerFormats.h:104
ripple::ltINVALID
@ ltINVALID
Definition: LedgerFormats.h:49
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition: LedgerFormats.h:110
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
Definition: LedgerFormats.h:78
ripple::lsfSell
@ lsfSell
Definition: LedgerFormats.h:116
ripple::KnownFormats
Manages a list of known formats.
Definition: KnownFormats.h:39
ripple::LedgerFormats::LedgerFormats
LedgerFormats()
Create the object.
Definition: LedgerFormats.cpp:29
ripple::lsfOneOwnerCount
@ lsfOneOwnerCount
Definition: LedgerFormats.h:129
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
Definition: LedgerFormats.h:87
ripple::lsfPassive
@ lsfPassive
Definition: LedgerFormats.h:115
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition: LedgerFormats.cpp:230
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition: LedgerFormats.h:102
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition: LedgerFormats.h:124
ripple::lsfHighFreeze
@ lsfHighFreeze
Definition: LedgerFormats.h:126
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::ltRIPPLE_STATE
@ ltRIPPLE_STATE
Definition: LedgerFormats.h:66
ripple::LedgerEntryType
LedgerEntryType
Ledger entry types.
Definition: LedgerFormats.h:36
ripple::lsfNoFreeze
@ lsfNoFreeze
Definition: LedgerFormats.h:108
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition: LedgerFormats.h:99
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition: LedgerFormats.h:136
ripple::ltPAYCHAN
@ ltPAYCHAN
Definition: LedgerFormats.h:83
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition: LedgerFormats.h:106
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition: LedgerFormats.h:125
ripple::ltDIR_NODE
@ ltDIR_NODE
Directory node.
Definition: LedgerFormats.h:64
ripple::ltOFFER
@ ltOFFER
Definition: LedgerFormats.h:72
ripple::ltACCOUNT_ROOT
@ ltACCOUNT_ROOT
Definition: LedgerFormats.h:53
ripple::lsfHighReserve
@ lsfHighReserve
Definition: LedgerFormats.h:120