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 
90 
91  // No longer used or supported. Left here to prevent accidental
92  // reassignment of the ledger type.
93  ltNICKNAME [[deprecated]] = 'n',
94 
95  ltNotUsed01 [[deprecated]] = 'c',
96 };
97 
102  // ltACCOUNT_ROOT
103  lsfPasswordSpent = 0x00010000, // True, if password set fee is spent.
105  0x00020000, // True, to require a DestinationTag for payments.
107  0x00040000, // True, to require a authorization to hold IOUs.
108  lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP.
109  lsfDisableMaster = 0x00100000, // True, force regular key
110  lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
111  lsfGlobalFreeze = 0x00400000, // True, all assets frozen
113  0x00800000, // True, trust lines allow rippling by default
114  lsfDepositAuth = 0x01000000, // True, all deposits require authorization
115 
116  // ltOFFER
117  lsfPassive = 0x00010000,
118  lsfSell = 0x00020000, // True, offer was placed as a sell.
119 
120  // ltRIPPLE_STATE
121  lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
122  lsfHighReserve = 0x00020000,
123  lsfLowAuth = 0x00040000,
124  lsfHighAuth = 0x00080000,
125  lsfLowNoRipple = 0x00100000,
126  lsfHighNoRipple = 0x00200000,
127  lsfLowFreeze = 0x00400000, // True, low side has set freeze flag
128  lsfHighFreeze = 0x00800000, // True, high side has set freeze flag
129 
130  // ltSIGNER_LIST
131  lsfOneOwnerCount = 0x00010000, // True, uses only one OwnerCount
132 };
133 
134 //------------------------------------------------------------------------------
135 
138 class LedgerFormats : public KnownFormats<LedgerEntryType>
139 {
140 private:
144  LedgerFormats();
145 
146 public:
147  static LedgerFormats const&
148  getInstance();
149 };
150 
151 } // namespace ripple
152 
153 #endif
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition: LedgerFormats.h:103
ripple::ltNICKNAME
@ ltNICKNAME
Definition: LedgerFormats.h:93
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition: LedgerFormats.h:111
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition: LedgerFormats.h:109
ripple::lsfLowReserve
@ lsfLowReserve
Definition: LedgerFormats.h:121
ripple::lsfLowAuth
@ lsfLowAuth
Definition: LedgerFormats.h:123
ripple::lsfLowNoRipple
@ lsfLowNoRipple
Definition: LedgerFormats.h:125
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:95
ripple::ltSIGNER_LIST
@ ltSIGNER_LIST
Definition: LedgerFormats.h:70
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition: LedgerFormats.h:114
ripple::ltTICKET
@ ltTICKET
Definition: LedgerFormats.h:68
ripple::ltCHECK
@ ltCHECK
Definition: LedgerFormats.h:85
ripple::lsfHighAuth
@ lsfHighAuth
Definition: LedgerFormats.h:124
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:106
ripple::ltINVALID
@ ltINVALID
Definition: LedgerFormats.h:49
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition: LedgerFormats.h:112
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
Definition: LedgerFormats.h:78
ripple::lsfSell
@ lsfSell
Definition: LedgerFormats.h:118
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:131
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
Definition: LedgerFormats.h:87
ripple::lsfPassive
@ lsfPassive
Definition: LedgerFormats.h:117
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition: LedgerFormats.cpp:239
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition: LedgerFormats.h:104
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition: LedgerFormats.h:126
ripple::lsfHighFreeze
@ lsfHighFreeze
Definition: LedgerFormats.h:128
ripple::ltNEGATIVE_UNL
@ ltNEGATIVE_UNL
Definition: LedgerFormats.h:89
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:110
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition: LedgerFormats.h:101
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition: LedgerFormats.h:138
ripple::ltPAYCHAN
@ ltPAYCHAN
Definition: LedgerFormats.h:83
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition: LedgerFormats.h:108
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition: LedgerFormats.h:127
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:122