rippled
ripple
protocol
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.
36
enum
LedgerEntryType
37
{
42
ltANY
= -3,
43
48
ltCHILD
= -2,
49
50
ltINVALID
= -1,
51
52
//---------------------------------------------------------------------------
53
54
ltACCOUNT_ROOT
=
'a'
,
55
65
ltDIR_NODE
=
'd'
,
66
67
ltRIPPLE_STATE
=
'r'
,
68
69
ltTICKET
=
'T'
,
70
71
ltSIGNER_LIST
=
'S'
,
72
73
ltOFFER
=
'o'
,
74
75
ltLEDGER_HASHES
=
'h'
,
76
77
ltAMENDMENTS
=
'f'
,
78
79
ltFEE_SETTINGS
=
's'
,
80
81
ltESCROW
=
'u'
,
82
83
// Simple unidirection xrp channel
84
ltPAYCHAN
=
'x'
,
85
86
ltCHECK
=
'C'
,
87
88
ltDEPOSIT_PREAUTH
=
'p'
,
89
90
// No longer used or supported. Left here to prevent accidental
91
// reassignment of the ledger type.
92
ltNICKNAME
=
'n'
,
93
94
ltNotUsed01
=
'c'
,
95
};
96
100
// Used as a prefix for computing ledger indexes (keys).
101
enum
LedgerNameSpace
102
{
103
spaceAccount
=
'a'
,
104
spaceDirNode
=
'd'
,
105
spaceGenerator
=
'g'
,
106
spaceRipple
=
'r'
,
107
spaceOffer
=
'o'
,
// Entry for an offer.
108
spaceOwnerDir
=
'O'
,
// Directory of things owned by an account.
109
spaceBookDir
=
'B'
,
// Directory of order books.
110
spaceContract
=
'c'
,
111
spaceSkipList
=
's'
,
112
spaceEscrow
=
'u'
,
113
spaceAmendment
=
'f'
,
114
spaceFee
=
'e'
,
115
spaceTicket
=
'T'
,
116
spaceSignerList
=
'S'
,
117
spaceXRPUChannel
=
'x'
,
118
spaceCheck
=
'C'
,
119
spaceDepositPreauth
=
'p'
,
120
121
// No longer used or supported. Left here to reserve the space and
122
// avoid accidental reuse of the space.
123
spaceNickname
=
'n'
,
124
};
125
129
enum
LedgerSpecificFlags
130
{
131
// ltACCOUNT_ROOT
132
lsfPasswordSpent
= 0x00010000,
// True, if password set fee is spent.
133
lsfRequireDestTag
= 0x00020000,
// True, to require a DestinationTag for payments.
134
lsfRequireAuth
= 0x00040000,
// True, to require a authorization to hold IOUs.
135
lsfDisallowXRP
= 0x00080000,
// True, to disallow sending XRP.
136
lsfDisableMaster
= 0x00100000,
// True, force regular key
137
lsfNoFreeze
= 0x00200000,
// True, cannot freeze ripple states
138
lsfGlobalFreeze
= 0x00400000,
// True, all assets frozen
139
lsfDefaultRipple
= 0x00800000,
// True, trust lines allow rippling by default
140
lsfDepositAuth
= 0x01000000,
// True, all deposits require authorization
141
142
// ltOFFER
143
lsfPassive
= 0x00010000,
144
lsfSell
= 0x00020000,
// True, offer was placed as a sell.
145
146
// ltRIPPLE_STATE
147
lsfLowReserve
= 0x00010000,
// True, if entry counts toward reserve.
148
lsfHighReserve
= 0x00020000,
149
lsfLowAuth
= 0x00040000,
150
lsfHighAuth
= 0x00080000,
151
lsfLowNoRipple
= 0x00100000,
152
lsfHighNoRipple
= 0x00200000,
153
lsfLowFreeze
= 0x00400000,
// True, low side has set freeze flag
154
lsfHighFreeze
= 0x00800000,
// True, high side has set freeze flag
155
156
// ltSIGNER_LIST
157
lsfOneOwnerCount
= 0x00010000,
// True, uses only one OwnerCount
158
};
159
160
//------------------------------------------------------------------------------
161
164
class
LedgerFormats
:
public
KnownFormats
<LedgerEntryType>
165
{
166
private
:
170
LedgerFormats
();
171
172
public
:
173
static
LedgerFormats
const
&
getInstance
();
174
};
175
176
}
// ripple
177
178
#endif
ripple::spaceSignerList
@ spaceSignerList
Definition:
LedgerFormats.h:116
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition:
LedgerFormats.h:132
ripple::ltNICKNAME
@ ltNICKNAME
Definition:
LedgerFormats.h:92
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition:
LedgerFormats.h:138
ripple::spaceRipple
@ spaceRipple
Definition:
LedgerFormats.h:106
ripple::spaceDepositPreauth
@ spaceDepositPreauth
Definition:
LedgerFormats.h:119
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition:
LedgerFormats.h:136
ripple::lsfLowReserve
@ lsfLowReserve
Definition:
LedgerFormats.h:147
ripple::lsfLowAuth
@ lsfLowAuth
Definition:
LedgerFormats.h:149
ripple::lsfLowNoRipple
@ lsfLowNoRipple
Definition:
LedgerFormats.h:151
ripple::ltESCROW
@ ltESCROW
Definition:
LedgerFormats.h:81
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:42
ripple::spaceOffer
@ spaceOffer
Definition:
LedgerFormats.h:107
ripple::ltLEDGER_HASHES
@ ltLEDGER_HASHES
Definition:
LedgerFormats.h:75
ripple::ltAMENDMENTS
@ ltAMENDMENTS
Definition:
LedgerFormats.h:77
ripple::ltNotUsed01
@ ltNotUsed01
Definition:
LedgerFormats.h:94
ripple::ltSIGNER_LIST
@ ltSIGNER_LIST
Definition:
LedgerFormats.h:71
ripple::spaceNickname
@ spaceNickname
Definition:
LedgerFormats.h:123
ripple::spaceCheck
@ spaceCheck
Definition:
LedgerFormats.h:118
ripple::LedgerNameSpace
LedgerNameSpace
Definition:
LedgerFormats.h:101
ripple::spaceSkipList
@ spaceSkipList
Definition:
LedgerFormats.h:111
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition:
LedgerFormats.h:140
ripple::ltTICKET
@ ltTICKET
Definition:
LedgerFormats.h:69
ripple::ltCHECK
@ ltCHECK
Definition:
LedgerFormats.h:86
ripple::lsfHighAuth
@ lsfHighAuth
Definition:
LedgerFormats.h:150
ripple::spaceEscrow
@ spaceEscrow
Definition:
LedgerFormats.h:112
ripple::ltCHILD
@ ltCHILD
Special type, anything not a directory This is used when the type in the Keylet is unknown,...
Definition:
LedgerFormats.h:48
ripple::lsfRequireAuth
@ lsfRequireAuth
Definition:
LedgerFormats.h:134
ripple::ltINVALID
@ ltINVALID
Definition:
LedgerFormats.h:50
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition:
LedgerFormats.h:139
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
Definition:
LedgerFormats.h:79
ripple::lsfSell
@ lsfSell
Definition:
LedgerFormats.h:144
ripple::KnownFormats
Manages a list of known formats.
Definition:
KnownFormats.h:39
ripple::spaceAccount
@ spaceAccount
Definition:
LedgerFormats.h:103
ripple::spaceAmendment
@ spaceAmendment
Definition:
LedgerFormats.h:113
ripple::LedgerFormats::LedgerFormats
LedgerFormats()
Create the object.
Definition:
LedgerFormats.cpp:29
ripple::spaceDirNode
@ spaceDirNode
Definition:
LedgerFormats.h:104
ripple::lsfOneOwnerCount
@ lsfOneOwnerCount
Definition:
LedgerFormats.h:157
ripple::spaceTicket
@ spaceTicket
Definition:
LedgerFormats.h:115
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
Definition:
LedgerFormats.h:88
ripple::lsfPassive
@ lsfPassive
Definition:
LedgerFormats.h:143
ripple::spaceBookDir
@ spaceBookDir
Definition:
LedgerFormats.h:109
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition:
LedgerFormats.cpp:217
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition:
LedgerFormats.h:133
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition:
LedgerFormats.h:152
ripple::spaceFee
@ spaceFee
Definition:
LedgerFormats.h:114
ripple::spaceOwnerDir
@ spaceOwnerDir
Definition:
LedgerFormats.h:108
ripple::lsfHighFreeze
@ lsfHighFreeze
Definition:
LedgerFormats.h:154
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:67
ripple::LedgerEntryType
LedgerEntryType
Ledger entry types.
Definition:
LedgerFormats.h:36
ripple::lsfNoFreeze
@ lsfNoFreeze
Definition:
LedgerFormats.h:137
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition:
LedgerFormats.h:129
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition:
LedgerFormats.h:164
ripple::ltPAYCHAN
@ ltPAYCHAN
Definition:
LedgerFormats.h:84
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition:
LedgerFormats.h:135
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition:
LedgerFormats.h:153
ripple::ltDIR_NODE
@ ltDIR_NODE
Directory node.
Definition:
LedgerFormats.h:65
ripple::ltOFFER
@ ltOFFER
Definition:
LedgerFormats.h:73
ripple::spaceContract
@ spaceContract
Definition:
LedgerFormats.h:110
ripple::ltACCOUNT_ROOT
@ ltACCOUNT_ROOT
Definition:
LedgerFormats.h:54
ripple::lsfHighReserve
@ lsfHighReserve
Definition:
LedgerFormats.h:148
ripple::spaceGenerator
@ spaceGenerator
Definition:
LedgerFormats.h:105
ripple::spaceXRPUChannel
@ spaceXRPUChannel
Definition:
LedgerFormats.h:117
Generated by
1.8.17