@kamino-finance/klend-sdk 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README_KAMINO_MANAGER.md +24 -3
- package/dist/classes/manager.d.ts +45 -2
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +54 -0
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/vault.d.ts +56 -4
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +107 -3
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.d.ts.map +1 -1
- package/dist/client_kamino_manager.js +6 -0
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +9 -3
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +42 -32
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +10 -10
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +51 -52
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js +4 -4
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js.map +1 -1
- package/package.json +1 -1
- package/src/classes/manager.ts +80 -1
- package/src/classes/vault.ts +158 -4
- package/src/client_kamino_manager.ts +8 -0
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +178 -175
- package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +117 -116
- package/src/idl_codegen_kamino_vault/types/WithdrawalCaps.ts +30 -30
|
@@ -1,269 +1,270 @@
|
|
|
1
|
-
import { PublicKey } from
|
|
2
|
-
import BN from
|
|
3
|
-
import * as types from
|
|
4
|
-
import * as borsh from
|
|
1
|
+
import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
import * as borsh from "@coral-xyz/borsh"
|
|
5
5
|
|
|
6
6
|
export interface PerformanceFeeBpsJSON {
|
|
7
|
-
kind:
|
|
7
|
+
kind: "PerformanceFeeBps"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export class PerformanceFeeBps {
|
|
11
|
-
static readonly discriminator = 0
|
|
12
|
-
static readonly kind =
|
|
13
|
-
readonly discriminator = 0
|
|
14
|
-
readonly kind =
|
|
11
|
+
static readonly discriminator = 0
|
|
12
|
+
static readonly kind = "PerformanceFeeBps"
|
|
13
|
+
readonly discriminator = 0
|
|
14
|
+
readonly kind = "PerformanceFeeBps"
|
|
15
15
|
|
|
16
16
|
toJSON(): PerformanceFeeBpsJSON {
|
|
17
17
|
return {
|
|
18
|
-
kind:
|
|
19
|
-
}
|
|
18
|
+
kind: "PerformanceFeeBps",
|
|
19
|
+
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
toEncodable() {
|
|
23
23
|
return {
|
|
24
24
|
PerformanceFeeBps: {},
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface ManagementFeeBpsJSON {
|
|
30
|
-
kind:
|
|
30
|
+
kind: "ManagementFeeBps"
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export class ManagementFeeBps {
|
|
34
|
-
static readonly discriminator = 1
|
|
35
|
-
static readonly kind =
|
|
36
|
-
readonly discriminator = 1
|
|
37
|
-
readonly kind =
|
|
34
|
+
static readonly discriminator = 1
|
|
35
|
+
static readonly kind = "ManagementFeeBps"
|
|
36
|
+
readonly discriminator = 1
|
|
37
|
+
readonly kind = "ManagementFeeBps"
|
|
38
38
|
|
|
39
39
|
toJSON(): ManagementFeeBpsJSON {
|
|
40
40
|
return {
|
|
41
|
-
kind:
|
|
42
|
-
}
|
|
41
|
+
kind: "ManagementFeeBps",
|
|
42
|
+
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
toEncodable() {
|
|
46
46
|
return {
|
|
47
47
|
ManagementFeeBps: {},
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface MinDepositAmountJSON {
|
|
53
|
-
kind:
|
|
53
|
+
kind: "MinDepositAmount"
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export class MinDepositAmount {
|
|
57
|
-
static readonly discriminator = 2
|
|
58
|
-
static readonly kind =
|
|
59
|
-
readonly discriminator = 2
|
|
60
|
-
readonly kind =
|
|
57
|
+
static readonly discriminator = 2
|
|
58
|
+
static readonly kind = "MinDepositAmount"
|
|
59
|
+
readonly discriminator = 2
|
|
60
|
+
readonly kind = "MinDepositAmount"
|
|
61
61
|
|
|
62
62
|
toJSON(): MinDepositAmountJSON {
|
|
63
63
|
return {
|
|
64
|
-
kind:
|
|
65
|
-
}
|
|
64
|
+
kind: "MinDepositAmount",
|
|
65
|
+
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
toEncodable() {
|
|
69
69
|
return {
|
|
70
70
|
MinDepositAmount: {},
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface MinWithdrawAmountJSON {
|
|
76
|
-
kind:
|
|
76
|
+
kind: "MinWithdrawAmount"
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export class MinWithdrawAmount {
|
|
80
|
-
static readonly discriminator = 3
|
|
81
|
-
static readonly kind =
|
|
82
|
-
readonly discriminator = 3
|
|
83
|
-
readonly kind =
|
|
80
|
+
static readonly discriminator = 3
|
|
81
|
+
static readonly kind = "MinWithdrawAmount"
|
|
82
|
+
readonly discriminator = 3
|
|
83
|
+
readonly kind = "MinWithdrawAmount"
|
|
84
84
|
|
|
85
85
|
toJSON(): MinWithdrawAmountJSON {
|
|
86
86
|
return {
|
|
87
|
-
kind:
|
|
88
|
-
}
|
|
87
|
+
kind: "MinWithdrawAmount",
|
|
88
|
+
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
toEncodable() {
|
|
92
92
|
return {
|
|
93
93
|
MinWithdrawAmount: {},
|
|
94
|
-
}
|
|
94
|
+
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export interface MintInvestAmountJSON {
|
|
99
|
-
kind:
|
|
99
|
+
kind: "MintInvestAmount"
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export class MintInvestAmount {
|
|
103
|
-
static readonly discriminator = 4
|
|
104
|
-
static readonly kind =
|
|
105
|
-
readonly discriminator = 4
|
|
106
|
-
readonly kind =
|
|
103
|
+
static readonly discriminator = 4
|
|
104
|
+
static readonly kind = "MintInvestAmount"
|
|
105
|
+
readonly discriminator = 4
|
|
106
|
+
readonly kind = "MintInvestAmount"
|
|
107
107
|
|
|
108
108
|
toJSON(): MintInvestAmountJSON {
|
|
109
109
|
return {
|
|
110
|
-
kind:
|
|
111
|
-
}
|
|
110
|
+
kind: "MintInvestAmount",
|
|
111
|
+
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
toEncodable() {
|
|
115
115
|
return {
|
|
116
116
|
MintInvestAmount: {},
|
|
117
|
-
}
|
|
117
|
+
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export interface MinInvestDelaySlotsJSON {
|
|
122
|
-
kind:
|
|
122
|
+
kind: "MinInvestDelaySlots"
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export class MinInvestDelaySlots {
|
|
126
|
-
static readonly discriminator = 5
|
|
127
|
-
static readonly kind =
|
|
128
|
-
readonly discriminator = 5
|
|
129
|
-
readonly kind =
|
|
126
|
+
static readonly discriminator = 5
|
|
127
|
+
static readonly kind = "MinInvestDelaySlots"
|
|
128
|
+
readonly discriminator = 5
|
|
129
|
+
readonly kind = "MinInvestDelaySlots"
|
|
130
130
|
|
|
131
131
|
toJSON(): MinInvestDelaySlotsJSON {
|
|
132
132
|
return {
|
|
133
|
-
kind:
|
|
134
|
-
}
|
|
133
|
+
kind: "MinInvestDelaySlots",
|
|
134
|
+
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
toEncodable() {
|
|
138
138
|
return {
|
|
139
139
|
MinInvestDelaySlots: {},
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
export interface CrankFundFeePerReserveJSON {
|
|
145
|
-
kind:
|
|
145
|
+
kind: "CrankFundFeePerReserve"
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
export class CrankFundFeePerReserve {
|
|
149
|
-
static readonly discriminator = 6
|
|
150
|
-
static readonly kind =
|
|
151
|
-
readonly discriminator = 6
|
|
152
|
-
readonly kind =
|
|
149
|
+
static readonly discriminator = 6
|
|
150
|
+
static readonly kind = "CrankFundFeePerReserve"
|
|
151
|
+
readonly discriminator = 6
|
|
152
|
+
readonly kind = "CrankFundFeePerReserve"
|
|
153
153
|
|
|
154
154
|
toJSON(): CrankFundFeePerReserveJSON {
|
|
155
155
|
return {
|
|
156
|
-
kind:
|
|
157
|
-
}
|
|
156
|
+
kind: "CrankFundFeePerReserve",
|
|
157
|
+
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
toEncodable() {
|
|
161
161
|
return {
|
|
162
162
|
CrankFundFeePerReserve: {},
|
|
163
|
-
}
|
|
163
|
+
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
export interface PendingVaultAdminJSON {
|
|
168
|
-
kind:
|
|
168
|
+
kind: "PendingVaultAdmin"
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
export class PendingVaultAdmin {
|
|
172
|
-
static readonly discriminator = 7
|
|
173
|
-
static readonly kind =
|
|
174
|
-
readonly discriminator = 7
|
|
175
|
-
readonly kind =
|
|
172
|
+
static readonly discriminator = 7
|
|
173
|
+
static readonly kind = "PendingVaultAdmin"
|
|
174
|
+
readonly discriminator = 7
|
|
175
|
+
readonly kind = "PendingVaultAdmin"
|
|
176
176
|
|
|
177
177
|
toJSON(): PendingVaultAdminJSON {
|
|
178
178
|
return {
|
|
179
|
-
kind:
|
|
180
|
-
}
|
|
179
|
+
kind: "PendingVaultAdmin",
|
|
180
|
+
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
toEncodable() {
|
|
184
184
|
return {
|
|
185
185
|
PendingVaultAdmin: {},
|
|
186
|
-
}
|
|
186
|
+
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
191
191
|
export function fromDecoded(obj: any): types.VaultConfigFieldKind {
|
|
192
|
-
if (typeof obj !==
|
|
193
|
-
throw new Error(
|
|
192
|
+
if (typeof obj !== "object") {
|
|
193
|
+
throw new Error("Invalid enum object")
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return new PerformanceFeeBps();
|
|
196
|
+
if ("PerformanceFeeBps" in obj) {
|
|
197
|
+
return new PerformanceFeeBps()
|
|
199
198
|
}
|
|
200
|
-
if (
|
|
201
|
-
return new ManagementFeeBps()
|
|
199
|
+
if ("ManagementFeeBps" in obj) {
|
|
200
|
+
return new ManagementFeeBps()
|
|
202
201
|
}
|
|
203
|
-
if (
|
|
204
|
-
return new MinDepositAmount()
|
|
202
|
+
if ("MinDepositAmount" in obj) {
|
|
203
|
+
return new MinDepositAmount()
|
|
205
204
|
}
|
|
206
|
-
if (
|
|
207
|
-
return new MinWithdrawAmount()
|
|
205
|
+
if ("MinWithdrawAmount" in obj) {
|
|
206
|
+
return new MinWithdrawAmount()
|
|
208
207
|
}
|
|
209
|
-
if (
|
|
210
|
-
return new MintInvestAmount()
|
|
208
|
+
if ("MintInvestAmount" in obj) {
|
|
209
|
+
return new MintInvestAmount()
|
|
211
210
|
}
|
|
212
|
-
if (
|
|
213
|
-
return new MinInvestDelaySlots()
|
|
211
|
+
if ("MinInvestDelaySlots" in obj) {
|
|
212
|
+
return new MinInvestDelaySlots()
|
|
214
213
|
}
|
|
215
|
-
if (
|
|
216
|
-
return new CrankFundFeePerReserve()
|
|
214
|
+
if ("CrankFundFeePerReserve" in obj) {
|
|
215
|
+
return new CrankFundFeePerReserve()
|
|
217
216
|
}
|
|
218
|
-
if (
|
|
219
|
-
return new PendingVaultAdmin()
|
|
217
|
+
if ("PendingVaultAdmin" in obj) {
|
|
218
|
+
return new PendingVaultAdmin()
|
|
220
219
|
}
|
|
221
220
|
|
|
222
|
-
throw new Error(
|
|
221
|
+
throw new Error("Invalid enum object")
|
|
223
222
|
}
|
|
224
223
|
|
|
225
|
-
export function fromJSON(
|
|
224
|
+
export function fromJSON(
|
|
225
|
+
obj: types.VaultConfigFieldJSON
|
|
226
|
+
): types.VaultConfigFieldKind {
|
|
226
227
|
switch (obj.kind) {
|
|
227
|
-
case
|
|
228
|
-
return new PerformanceFeeBps()
|
|
228
|
+
case "PerformanceFeeBps": {
|
|
229
|
+
return new PerformanceFeeBps()
|
|
229
230
|
}
|
|
230
|
-
case
|
|
231
|
-
return new ManagementFeeBps()
|
|
231
|
+
case "ManagementFeeBps": {
|
|
232
|
+
return new ManagementFeeBps()
|
|
232
233
|
}
|
|
233
|
-
case
|
|
234
|
-
return new MinDepositAmount()
|
|
234
|
+
case "MinDepositAmount": {
|
|
235
|
+
return new MinDepositAmount()
|
|
235
236
|
}
|
|
236
|
-
case
|
|
237
|
-
return new MinWithdrawAmount()
|
|
237
|
+
case "MinWithdrawAmount": {
|
|
238
|
+
return new MinWithdrawAmount()
|
|
238
239
|
}
|
|
239
|
-
case
|
|
240
|
-
return new MintInvestAmount()
|
|
240
|
+
case "MintInvestAmount": {
|
|
241
|
+
return new MintInvestAmount()
|
|
241
242
|
}
|
|
242
|
-
case
|
|
243
|
-
return new MinInvestDelaySlots()
|
|
243
|
+
case "MinInvestDelaySlots": {
|
|
244
|
+
return new MinInvestDelaySlots()
|
|
244
245
|
}
|
|
245
|
-
case
|
|
246
|
-
return new CrankFundFeePerReserve()
|
|
246
|
+
case "CrankFundFeePerReserve": {
|
|
247
|
+
return new CrankFundFeePerReserve()
|
|
247
248
|
}
|
|
248
|
-
case
|
|
249
|
-
return new PendingVaultAdmin()
|
|
249
|
+
case "PendingVaultAdmin": {
|
|
250
|
+
return new PendingVaultAdmin()
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
|
|
254
255
|
export function layout(property?: string) {
|
|
255
256
|
const ret = borsh.rustEnum([
|
|
256
|
-
borsh.struct([],
|
|
257
|
-
borsh.struct([],
|
|
258
|
-
borsh.struct([],
|
|
259
|
-
borsh.struct([],
|
|
260
|
-
borsh.struct([],
|
|
261
|
-
borsh.struct([],
|
|
262
|
-
borsh.struct([],
|
|
263
|
-
borsh.struct([],
|
|
264
|
-
])
|
|
257
|
+
borsh.struct([], "PerformanceFeeBps"),
|
|
258
|
+
borsh.struct([], "ManagementFeeBps"),
|
|
259
|
+
borsh.struct([], "MinDepositAmount"),
|
|
260
|
+
borsh.struct([], "MinWithdrawAmount"),
|
|
261
|
+
borsh.struct([], "MintInvestAmount"),
|
|
262
|
+
borsh.struct([], "MinInvestDelaySlots"),
|
|
263
|
+
borsh.struct([], "CrankFundFeePerReserve"),
|
|
264
|
+
borsh.struct([], "PendingVaultAdmin"),
|
|
265
|
+
])
|
|
265
266
|
if (property !== undefined) {
|
|
266
|
-
return ret.replicate(property)
|
|
267
|
+
return ret.replicate(property)
|
|
267
268
|
}
|
|
268
|
-
return ret
|
|
269
|
+
return ret
|
|
269
270
|
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { PublicKey } from
|
|
2
|
-
import BN from
|
|
3
|
-
import * as types from
|
|
4
|
-
import * as borsh from
|
|
1
|
+
import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
import * as borsh from "@coral-xyz/borsh"
|
|
5
5
|
|
|
6
6
|
export interface WithdrawalCapsFields {
|
|
7
|
-
configCapacity: BN
|
|
8
|
-
currentTotal: BN
|
|
9
|
-
lastIntervalStartTimestamp: BN
|
|
10
|
-
configIntervalLengthSeconds: BN
|
|
7
|
+
configCapacity: BN
|
|
8
|
+
currentTotal: BN
|
|
9
|
+
lastIntervalStartTimestamp: BN
|
|
10
|
+
configIntervalLengthSeconds: BN
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export interface WithdrawalCapsJSON {
|
|
14
|
-
configCapacity: string
|
|
15
|
-
currentTotal: string
|
|
16
|
-
lastIntervalStartTimestamp: string
|
|
17
|
-
configIntervalLengthSeconds: string
|
|
14
|
+
configCapacity: string
|
|
15
|
+
currentTotal: string
|
|
16
|
+
lastIntervalStartTimestamp: string
|
|
17
|
+
configIntervalLengthSeconds: string
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/** Reserve Withdrawal Caps State */
|
|
21
21
|
export class WithdrawalCaps {
|
|
22
|
-
readonly configCapacity: BN
|
|
23
|
-
readonly currentTotal: BN
|
|
24
|
-
readonly lastIntervalStartTimestamp: BN
|
|
25
|
-
readonly configIntervalLengthSeconds: BN
|
|
22
|
+
readonly configCapacity: BN
|
|
23
|
+
readonly currentTotal: BN
|
|
24
|
+
readonly lastIntervalStartTimestamp: BN
|
|
25
|
+
readonly configIntervalLengthSeconds: BN
|
|
26
26
|
|
|
27
27
|
constructor(fields: WithdrawalCapsFields) {
|
|
28
|
-
this.configCapacity = fields.configCapacity
|
|
29
|
-
this.currentTotal = fields.currentTotal
|
|
30
|
-
this.lastIntervalStartTimestamp = fields.lastIntervalStartTimestamp
|
|
31
|
-
this.configIntervalLengthSeconds = fields.configIntervalLengthSeconds
|
|
28
|
+
this.configCapacity = fields.configCapacity
|
|
29
|
+
this.currentTotal = fields.currentTotal
|
|
30
|
+
this.lastIntervalStartTimestamp = fields.lastIntervalStartTimestamp
|
|
31
|
+
this.configIntervalLengthSeconds = fields.configIntervalLengthSeconds
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
static layout(property?: string) {
|
|
35
35
|
return borsh.struct(
|
|
36
36
|
[
|
|
37
|
-
borsh.i64(
|
|
38
|
-
borsh.i64(
|
|
39
|
-
borsh.u64(
|
|
40
|
-
borsh.u64(
|
|
37
|
+
borsh.i64("configCapacity"),
|
|
38
|
+
borsh.i64("currentTotal"),
|
|
39
|
+
borsh.u64("lastIntervalStartTimestamp"),
|
|
40
|
+
borsh.u64("configIntervalLengthSeconds"),
|
|
41
41
|
],
|
|
42
42
|
property
|
|
43
|
-
)
|
|
43
|
+
)
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -50,7 +50,7 @@ export class WithdrawalCaps {
|
|
|
50
50
|
currentTotal: obj.currentTotal,
|
|
51
51
|
lastIntervalStartTimestamp: obj.lastIntervalStartTimestamp,
|
|
52
52
|
configIntervalLengthSeconds: obj.configIntervalLengthSeconds,
|
|
53
|
-
})
|
|
53
|
+
})
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
static toEncodable(fields: WithdrawalCapsFields) {
|
|
@@ -59,7 +59,7 @@ export class WithdrawalCaps {
|
|
|
59
59
|
currentTotal: fields.currentTotal,
|
|
60
60
|
lastIntervalStartTimestamp: fields.lastIntervalStartTimestamp,
|
|
61
61
|
configIntervalLengthSeconds: fields.configIntervalLengthSeconds,
|
|
62
|
-
}
|
|
62
|
+
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
toJSON(): WithdrawalCapsJSON {
|
|
@@ -68,7 +68,7 @@ export class WithdrawalCaps {
|
|
|
68
68
|
currentTotal: this.currentTotal.toString(),
|
|
69
69
|
lastIntervalStartTimestamp: this.lastIntervalStartTimestamp.toString(),
|
|
70
70
|
configIntervalLengthSeconds: this.configIntervalLengthSeconds.toString(),
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
static fromJSON(obj: WithdrawalCapsJSON): WithdrawalCaps {
|
|
@@ -77,10 +77,10 @@ export class WithdrawalCaps {
|
|
|
77
77
|
currentTotal: new BN(obj.currentTotal),
|
|
78
78
|
lastIntervalStartTimestamp: new BN(obj.lastIntervalStartTimestamp),
|
|
79
79
|
configIntervalLengthSeconds: new BN(obj.configIntervalLengthSeconds),
|
|
80
|
-
})
|
|
80
|
+
})
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
toEncodable() {
|
|
84
|
-
return WithdrawalCaps.toEncodable(this)
|
|
84
|
+
return WithdrawalCaps.toEncodable(this)
|
|
85
85
|
}
|
|
86
86
|
}
|