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
{
41
ltANY
= -3,
42
47
ltCHILD
= -2,
48
49
ltINVALID
= -1,
50
51
//---------------------------------------------------------------------------
52
53
ltACCOUNT_ROOT
=
'a'
,
54
64
ltDIR_NODE
=
'd'
,
65
66
ltRIPPLE_STATE
=
'r'
,
67
68
ltTICKET
=
'T'
,
69
70
ltSIGNER_LIST
=
'S'
,
71
72
ltOFFER
=
'o'
,
73
74
ltLEDGER_HASHES
=
'h'
,
75
76
ltAMENDMENTS
=
'f'
,
77
78
ltFEE_SETTINGS
=
's'
,
79
80
ltESCROW
=
'u'
,
81
82
// Simple unidirection xrp channel
83
ltPAYCHAN
=
'x'
,
84
85
ltCHECK
=
'C'
,
86
87
ltDEPOSIT_PREAUTH
=
'p'
,
88
89
// No longer used or supported. Left here to prevent accidental
90
// reassignment of the ledger type.
91
ltNICKNAME
=
'n'
,
92
93
ltNotUsed01
=
'c'
,
94
};
95
99
// Used as a prefix for computing ledger indexes (keys).
100
enum
LedgerNameSpace
{
101
spaceAccount
=
'a'
,
102
spaceDirNode
=
'd'
,
103
spaceGenerator
=
'g'
,
104
spaceRipple
=
'r'
,
105
spaceOffer
=
'o'
,
// Entry for an offer.
106
spaceOwnerDir
=
'O'
,
// Directory of things owned by an account.
107
spaceBookDir
=
'B'
,
// Directory of order books.
108
spaceContract
=
'c'
,
109
spaceSkipList
=
's'
,
110
spaceEscrow
=
'u'
,
111
spaceAmendment
=
'f'
,
112
spaceFee
=
'e'
,
113
spaceTicket
=
'T'
,
114
spaceSignerList
=
'S'
,
115
spaceXRPUChannel
=
'x'
,
116
spaceCheck
=
'C'
,
117
spaceDepositPreauth
=
'p'
,
118
119
// No longer used or supported. Left here to reserve the space and
120
// avoid accidental reuse of the space.
121
spaceNickname
=
'n'
,
122
};
123
127
enum
LedgerSpecificFlags
{
128
// ltACCOUNT_ROOT
129
lsfPasswordSpent
= 0x00010000,
// True, if password set fee is spent.
130
lsfRequireDestTag
=
131
0x00020000,
// True, to require a DestinationTag for payments.
132
lsfRequireAuth
=
133
0x00040000,
// True, to require a authorization to hold IOUs.
134
lsfDisallowXRP
= 0x00080000,
// True, to disallow sending XRP.
135
lsfDisableMaster
= 0x00100000,
// True, force regular key
136
lsfNoFreeze
= 0x00200000,
// True, cannot freeze ripple states
137
lsfGlobalFreeze
= 0x00400000,
// True, all assets frozen
138
lsfDefaultRipple
=
139
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
&
174
getInstance
();
175
};
176
177
}
// namespace ripple
178
179
#endif
ripple::spaceSignerList
@ spaceSignerList
Definition:
LedgerFormats.h:114
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition:
LedgerFormats.h:129
ripple::ltNICKNAME
@ ltNICKNAME
Definition:
LedgerFormats.h:91
ripple::lsfGlobalFreeze
@ lsfGlobalFreeze
Definition:
LedgerFormats.h:137
ripple::spaceRipple
@ spaceRipple
Definition:
LedgerFormats.h:104
ripple::spaceDepositPreauth
@ spaceDepositPreauth
Definition:
LedgerFormats.h:117
ripple::lsfDisableMaster
@ lsfDisableMaster
Definition:
LedgerFormats.h:135
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: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::spaceOffer
@ spaceOffer
Definition:
LedgerFormats.h:105
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::spaceNickname
@ spaceNickname
Definition:
LedgerFormats.h:121
ripple::spaceCheck
@ spaceCheck
Definition:
LedgerFormats.h:116
ripple::LedgerNameSpace
LedgerNameSpace
Definition:
LedgerFormats.h:100
ripple::spaceSkipList
@ spaceSkipList
Definition:
LedgerFormats.h:109
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition:
LedgerFormats.h:140
ripple::ltTICKET
@ ltTICKET
Definition:
LedgerFormats.h:68
ripple::ltCHECK
@ ltCHECK
Definition:
LedgerFormats.h:85
ripple::lsfHighAuth
@ lsfHighAuth
Definition:
LedgerFormats.h:150
ripple::spaceEscrow
@ spaceEscrow
Definition:
LedgerFormats.h:110
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:132
ripple::ltINVALID
@ ltINVALID
Definition:
LedgerFormats.h:49
ripple::lsfDefaultRipple
@ lsfDefaultRipple
Definition:
LedgerFormats.h:138
ripple::ltFEE_SETTINGS
@ ltFEE_SETTINGS
Definition:
LedgerFormats.h:78
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:101
ripple::spaceAmendment
@ spaceAmendment
Definition:
LedgerFormats.h:111
ripple::LedgerFormats::LedgerFormats
LedgerFormats()
Create the object.
Definition:
LedgerFormats.cpp:29
ripple::spaceDirNode
@ spaceDirNode
Definition:
LedgerFormats.h:102
ripple::lsfOneOwnerCount
@ lsfOneOwnerCount
Definition:
LedgerFormats.h:157
ripple::spaceTicket
@ spaceTicket
Definition:
LedgerFormats.h:113
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
Definition:
LedgerFormats.h:87
ripple::lsfPassive
@ lsfPassive
Definition:
LedgerFormats.h:143
ripple::spaceBookDir
@ spaceBookDir
Definition:
LedgerFormats.h:107
ripple::LedgerFormats::getInstance
static LedgerFormats const & getInstance()
Definition:
LedgerFormats.cpp:230
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition:
LedgerFormats.h:130
ripple::lsfHighNoRipple
@ lsfHighNoRipple
Definition:
LedgerFormats.h:152
ripple::spaceFee
@ spaceFee
Definition:
LedgerFormats.h:112
ripple::spaceOwnerDir
@ spaceOwnerDir
Definition:
LedgerFormats.h:106
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:66
ripple::LedgerEntryType
LedgerEntryType
Ledger entry types.
Definition:
LedgerFormats.h:36
ripple::lsfNoFreeze
@ lsfNoFreeze
Definition:
LedgerFormats.h:136
ripple::LedgerSpecificFlags
LedgerSpecificFlags
Definition:
LedgerFormats.h:127
ripple::LedgerFormats
Holds the list of known ledger entry formats.
Definition:
LedgerFormats.h:164
ripple::ltPAYCHAN
@ ltPAYCHAN
Definition:
LedgerFormats.h:83
ripple::lsfDisallowXRP
@ lsfDisallowXRP
Definition:
LedgerFormats.h:134
ripple::lsfLowFreeze
@ lsfLowFreeze
Definition:
LedgerFormats.h:153
ripple::ltDIR_NODE
@ ltDIR_NODE
Directory node.
Definition:
LedgerFormats.h:64
ripple::ltOFFER
@ ltOFFER
Definition:
LedgerFormats.h:72
ripple::spaceContract
@ spaceContract
Definition:
LedgerFormats.h:108
ripple::ltACCOUNT_ROOT
@ ltACCOUNT_ROOT
Definition:
LedgerFormats.h:53
ripple::lsfHighReserve
@ lsfHighReserve
Definition:
LedgerFormats.h:148
ripple::spaceGenerator
@ spaceGenerator
Definition:
LedgerFormats.h:103
ripple::spaceXRPUChannel
@ spaceXRPUChannel
Definition:
LedgerFormats.h:115
Generated by
1.8.17