-
Notifications
You must be signed in to change notification settings - Fork 525
/
Copy pathAccountRoot.ts
201 lines (198 loc) · 6.3 KB
/
AccountRoot.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
import BaseLedgerEntry from './BaseLedgerEntry'
/**
* The AccountRoot object type describes a single account, its settings, and
* XRP balance.
*
* @category Ledger Entries
*/
export default interface AccountRoot extends BaseLedgerEntry {
LedgerEntryType: 'AccountRoot'
/** The identifying (classic) address of this account. */
Account: string
/** The account's current XRP balance in drops, represented as a string. */
Balance: string
/** A bit-map of boolean flags enabled for this account. */
Flags: number
/**
* The number of objects this account owns in the ledger, which contributes
* to its owner reserve.
*/
OwnerCount: number
/**
* The identifying hash of the transaction that most recently modified this
* object.
*/
PreviousTxnID: string
/**
* The index of the ledger that contains the transaction that most recently
* modified this object.
*/
PreviousTxnLgrSeq: number
/** The sequence number of the next valid transaction for this account. */
Sequence: number
/**
* The identifying hash of the transaction most recently sent by this
* account. This field must be enabled to use the AccountTxnID transaction
* field. To enable it, send an AccountSet transaction with the.
* `asfAccountTxnID` flag enabled.
*/
AccountTxnID?: string
/**
* A domain associated with this account. In JSON, this is the hexadecimal
* for the ASCII representation of the domain.
*/
Domain?: string
/** The md5 hash of an email address. */
EmailHash?: string
/**
* A public key that may be used to send encrypted messages to this account
* in JSON, uses hexadecimal.
*/
MessageKey?: string
/**
* The address of a key pair that can be used to sign transactions for this
* account instead of the master key. Use a SetRegularKey transaction to
* change this value.
*/
RegularKey?: string
/**
* How many Tickets this account owns in the ledger. This is updated
* automatically to ensure that the account stays within the hard limit of 250.
* Tickets at a time.
*/
TicketCount?: number
/**
* How many significant digits to use for exchange rates of Offers involving
* currencies issued by this address. Valid values are 3 to 15, inclusive.
*/
TickSize?: number
/**
* A transfer fee to charge other users for sending currency issued by this
* account to each other.
*/
TransferRate?: number
/** An arbitrary 256-bit value that users can set. */
WalletLocator?: string
/** Total NFTokens this account's issued that have been burned. This number is always equal or less than MintedNFTokens. */
BurnedNFTokens?: number
/** The sequence that the account first minted an NFToken */
FirstNFTSequence: number
/** Total NFTokens have been minted by and on behalf of this account. */
MintedNFTokens?: number
/** Another account that can mint NFTokens on behalf of this account. */
NFTokenMinter?: string
}
/**
* A boolean map of AccountRootFlags for simplified code checking AccountRoot settings.
* For submitting settings flags to the ledger, use AccountRootFlags instead.
*/
export interface AccountRootFlagsInterface {
/**
* The account has used its free SetRegularKey transaction.
*/
lsfPasswordSpent?: boolean
/**
* Requires incoming payments to specify a Destination Tag.
*/
lsfRequireDestTag?: boolean
/**
* This account must individually approve other users for those users to hold this account's issued currencies.
*/
lsfRequireAuth?: boolean
/**
* Client applications should not send XRP to this account. Not enforced by rippled.
*/
lsfDisallowXRP?: boolean
/**
* Disallows use of the master key to sign transactions for this account.
*/
lsfDisableMaster?: boolean
/**
* This address cannot freeze trust lines connected to it. Once enabled, cannot be disabled.
*/
lsfNoFreeze?: boolean
/**
* All assets issued by this address are frozen.
*/
lsfGlobalFreeze?: boolean
/**
* Enable rippling on this address's trust lines by default. Required for issuing addresses; discouraged for others.
*/
lsfDefaultRipple?: boolean
/**
* This account can only receive funds from transactions it sends, and from preauthorized accounts.
* (It has DepositAuth enabled.)
*/
lsfDepositAuth?: boolean
/**
* Disallow incoming NFTOffers from other accounts.
*/
lsfDisallowIncomingNFTokenOffer?: boolean
/**
* Disallow incoming Checks from other accounts.
*/
lsfDisallowIncomingCheck?: boolean
/**
* Disallow incoming PayChannels from other accounts.
*/
lsfDisallowIncomingPayChan?: boolean
/**
* Disallow incoming Trustlines from other accounts.
*/
lsfDisallowIncomingTrustline?: boolean
}
export enum AccountRootFlags {
/**
* The account has used its free SetRegularKey transaction.
*/
lsfPasswordSpent = 0x00010000,
/**
* Requires incoming payments to specify a Destination Tag.
*/
lsfRequireDestTag = 0x00020000,
/**
* This account must individually approve other users for those users to hold this account's issued currencies.
*/
lsfRequireAuth = 0x00040000,
/**
* Client applications should not send XRP to this account. Not enforced by rippled.
*/
lsfDisallowXRP = 0x00080000,
/**
* Disallows use of the master key to sign transactions for this account.
*/
lsfDisableMaster = 0x00100000,
/**
* This address cannot freeze trust lines connected to it. Once enabled, cannot be disabled.
*/
lsfNoFreeze = 0x00200000,
/**
* All assets issued by this address are frozen.
*/
lsfGlobalFreeze = 0x00400000,
/**
* Enable rippling on this address's trust lines by default. Required for issuing addresses; discouraged for others.
*/
lsfDefaultRipple = 0x00800000,
/**
* This account can only receive funds from transactions it sends, and from preauthorized accounts.
* (It has DepositAuth enabled.)
*/
lsfDepositAuth = 0x01000000,
/**
* Disallow incoming NFTOffers from other accounts.
*/
lsfDisallowIncomingNFTokenOffer = 0x04000000,
/**
* Disallow incoming Checks from other accounts.
*/
lsfDisallowIncomingCheck = 0x08000000,
/**
* Disallow incoming PayChannels from other accounts.
*/
lsfDisallowIncomingPayChan = 0x10000000,
/**
* Disallow incoming Trustlines from other accounts.
*/
lsfDisallowIncomingTrustline = 0x20000000,
}