@jpool/bond-sdk 0.10.5 → 0.11.0-next.11
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/dist/index.d.mts +952 -717
- package/dist/index.d.ts +952 -717
- package/dist/index.js +339 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +339 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -11,28 +11,28 @@ import { PublicKey, PublicKeyInitData, Cluster, Transaction, VersionedTransactio
|
|
|
11
11
|
* IDL can be found at `target/idl/jbond.json`.
|
|
12
12
|
*/
|
|
13
13
|
type Jbond = {
|
|
14
|
-
address:
|
|
15
|
-
metadata: {
|
|
16
|
-
name:
|
|
17
|
-
version:
|
|
18
|
-
spec:
|
|
19
|
-
description:
|
|
14
|
+
"address": "Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1";
|
|
15
|
+
"metadata": {
|
|
16
|
+
"name": "jbond";
|
|
17
|
+
"version": "0.2.1";
|
|
18
|
+
"spec": "0.1.0";
|
|
19
|
+
"description": "Jpool Bond Program";
|
|
20
20
|
};
|
|
21
|
-
instructions: [
|
|
22
|
-
{
|
|
23
|
-
name:
|
|
24
|
-
docs: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
];
|
|
35
|
-
discriminator: [
|
|
21
|
+
"instructions": [
|
|
22
|
+
{
|
|
23
|
+
"name": "bondClaim";
|
|
24
|
+
"docs": [
|
|
25
|
+
"Claims compensation for a validator.",
|
|
26
|
+
"Transfers funds from the validator's bond account to reserve.",
|
|
27
|
+
"",
|
|
28
|
+
"# Arguments",
|
|
29
|
+
"* `amount` - Amount of compensation to claim (must be positive).",
|
|
30
|
+
"",
|
|
31
|
+
"# Errors",
|
|
32
|
+
"Fails if the authority is invalid, if the validator is not active,",
|
|
33
|
+
"if the amount is zero, or if there are insufficient funds."
|
|
34
|
+
];
|
|
35
|
+
"discriminator": [
|
|
36
36
|
151,
|
|
37
37
|
92,
|
|
38
38
|
10,
|
|
@@ -42,19 +42,19 @@ type Jbond = {
|
|
|
42
42
|
188,
|
|
43
43
|
129
|
|
44
44
|
];
|
|
45
|
-
accounts: [
|
|
45
|
+
"accounts": [
|
|
46
46
|
{
|
|
47
|
-
name:
|
|
48
|
-
writable: true;
|
|
47
|
+
"name": "bondState";
|
|
48
|
+
"writable": true;
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
name:
|
|
52
|
-
writable: true;
|
|
53
|
-
pda: {
|
|
54
|
-
seeds: [
|
|
51
|
+
"name": "validatorBond";
|
|
52
|
+
"writable": true;
|
|
53
|
+
"pda": {
|
|
54
|
+
"seeds": [
|
|
55
55
|
{
|
|
56
|
-
kind:
|
|
57
|
-
value: [
|
|
56
|
+
"kind": "const";
|
|
57
|
+
"value": [
|
|
58
58
|
118,
|
|
59
59
|
97,
|
|
60
60
|
108,
|
|
@@ -72,68 +72,68 @@ type Jbond = {
|
|
|
72
72
|
];
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
kind:
|
|
76
|
-
path:
|
|
75
|
+
"kind": "account";
|
|
76
|
+
"path": "bondState";
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
-
kind:
|
|
80
|
-
path:
|
|
81
|
-
account:
|
|
79
|
+
"kind": "account";
|
|
80
|
+
"path": "validator_bond.vote_account";
|
|
81
|
+
"account": "validatorBond";
|
|
82
82
|
}
|
|
83
83
|
];
|
|
84
84
|
};
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
name:
|
|
88
|
-
writable: true;
|
|
87
|
+
"name": "reserve";
|
|
88
|
+
"writable": true;
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
name:
|
|
92
|
-
signer: true;
|
|
91
|
+
"name": "authority";
|
|
92
|
+
"signer": true;
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
name:
|
|
96
|
-
writable: true;
|
|
97
|
-
optional: true;
|
|
95
|
+
"name": "bondTokenAccount";
|
|
96
|
+
"writable": true;
|
|
97
|
+
"optional": true;
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
name:
|
|
101
|
-
writable: true;
|
|
102
|
-
optional: true;
|
|
100
|
+
"name": "reserveTokenAccount";
|
|
101
|
+
"writable": true;
|
|
102
|
+
"optional": true;
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
|
-
name:
|
|
106
|
-
writable: true;
|
|
107
|
-
optional: true;
|
|
105
|
+
"name": "stakeAccount";
|
|
106
|
+
"writable": true;
|
|
107
|
+
"optional": true;
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
name:
|
|
111
|
-
address:
|
|
110
|
+
"name": "systemProgram";
|
|
111
|
+
"address": "11111111111111111111111111111111";
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
name:
|
|
115
|
-
optional: true;
|
|
116
|
-
address:
|
|
114
|
+
"name": "tokenProgram";
|
|
115
|
+
"optional": true;
|
|
116
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
120
|
-
optional: true;
|
|
119
|
+
"name": "stakeProgram";
|
|
120
|
+
"optional": true;
|
|
121
121
|
}
|
|
122
122
|
];
|
|
123
|
-
args: [
|
|
123
|
+
"args": [
|
|
124
124
|
{
|
|
125
|
-
name:
|
|
126
|
-
type:
|
|
125
|
+
"name": "amount";
|
|
126
|
+
"type": "u64";
|
|
127
127
|
}
|
|
128
128
|
];
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
name:
|
|
132
|
-
docs: [
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
"name": "bondConfigure";
|
|
132
|
+
"docs": [
|
|
133
|
+
"Updates bond configuration, including authority and reserve fields.",
|
|
134
|
+
"Allows changing the bond's authority and updating the reserve account."
|
|
135
135
|
];
|
|
136
|
-
discriminator: [
|
|
136
|
+
"discriminator": [
|
|
137
137
|
61,
|
|
138
138
|
42,
|
|
139
139
|
106,
|
|
@@ -143,41 +143,41 @@ type Jbond = {
|
|
|
143
143
|
65,
|
|
144
144
|
20
|
|
145
145
|
];
|
|
146
|
-
accounts: [
|
|
146
|
+
"accounts": [
|
|
147
147
|
{
|
|
148
|
-
name:
|
|
149
|
-
writable: true;
|
|
148
|
+
"name": "bondState";
|
|
149
|
+
"writable": true;
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
name:
|
|
153
|
-
signer: true;
|
|
154
|
-
relations: [
|
|
155
|
-
|
|
152
|
+
"name": "authority";
|
|
153
|
+
"signer": true;
|
|
154
|
+
"relations": [
|
|
155
|
+
"bondState"
|
|
156
156
|
];
|
|
157
157
|
}
|
|
158
158
|
];
|
|
159
|
-
args: [
|
|
159
|
+
"args": [
|
|
160
160
|
{
|
|
161
|
-
name:
|
|
162
|
-
type: {
|
|
163
|
-
defined: {
|
|
164
|
-
name:
|
|
161
|
+
"name": "data";
|
|
162
|
+
"type": {
|
|
163
|
+
"defined": {
|
|
164
|
+
"name": "bondConfigureData";
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
];
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
name:
|
|
172
|
-
docs: [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
"name": "bondInitialize";
|
|
172
|
+
"docs": [
|
|
173
|
+
"Initializes state for the bond.",
|
|
174
|
+
"Sets the authority and reserve account for managing validator bonds.",
|
|
175
|
+
"",
|
|
176
|
+
"# Errors",
|
|
177
|
+
"Fails if the global state account is already initialized or if the payer lacks",
|
|
178
|
+
"sufficient funds."
|
|
179
179
|
];
|
|
180
|
-
discriminator: [
|
|
180
|
+
"discriminator": [
|
|
181
181
|
230,
|
|
182
182
|
3,
|
|
183
183
|
121,
|
|
@@ -187,15 +187,15 @@ type Jbond = {
|
|
|
187
187
|
175,
|
|
188
188
|
210
|
|
189
189
|
];
|
|
190
|
-
accounts: [
|
|
190
|
+
"accounts": [
|
|
191
191
|
{
|
|
192
|
-
name:
|
|
193
|
-
writable: true;
|
|
194
|
-
pda: {
|
|
195
|
-
seeds: [
|
|
192
|
+
"name": "bondState";
|
|
193
|
+
"writable": true;
|
|
194
|
+
"pda": {
|
|
195
|
+
"seeds": [
|
|
196
196
|
{
|
|
197
|
-
kind:
|
|
198
|
-
value: [
|
|
197
|
+
"kind": "const";
|
|
198
|
+
"value": [
|
|
199
199
|
98,
|
|
200
200
|
111,
|
|
201
201
|
110,
|
|
@@ -209,72 +209,116 @@ type Jbond = {
|
|
|
209
209
|
];
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
kind:
|
|
213
|
-
path:
|
|
212
|
+
"kind": "arg";
|
|
213
|
+
"path": "data.bond_type";
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
kind:
|
|
217
|
-
path:
|
|
216
|
+
"kind": "arg";
|
|
217
|
+
"path": "data.name";
|
|
218
218
|
}
|
|
219
219
|
];
|
|
220
220
|
};
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
name:
|
|
224
|
-
writable: true;
|
|
225
|
-
signer: true;
|
|
223
|
+
"name": "authority";
|
|
224
|
+
"writable": true;
|
|
225
|
+
"signer": true;
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
name:
|
|
228
|
+
"name": "reserve";
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
|
-
name:
|
|
232
|
-
address:
|
|
231
|
+
"name": "associatedTokenProgram";
|
|
232
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
name:
|
|
236
|
-
address:
|
|
235
|
+
"name": "systemProgram";
|
|
236
|
+
"address": "11111111111111111111111111111111";
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
name:
|
|
240
|
-
address:
|
|
239
|
+
"name": "tokenProgram";
|
|
240
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
|
-
name:
|
|
244
|
-
writable: true;
|
|
245
|
-
optional: true;
|
|
243
|
+
"name": "reserveTokenAccount";
|
|
244
|
+
"writable": true;
|
|
245
|
+
"optional": true;
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
name:
|
|
249
|
-
optional: true;
|
|
248
|
+
"name": "mint";
|
|
249
|
+
"optional": true;
|
|
250
250
|
}
|
|
251
251
|
];
|
|
252
|
-
args: [
|
|
252
|
+
"args": [
|
|
253
253
|
{
|
|
254
|
-
name:
|
|
255
|
-
type: {
|
|
256
|
-
defined: {
|
|
257
|
-
name:
|
|
254
|
+
"name": "data";
|
|
255
|
+
"type": {
|
|
256
|
+
"defined": {
|
|
257
|
+
"name": "bondInitializeData";
|
|
258
258
|
};
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
];
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
|
-
name:
|
|
265
|
-
docs: [
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
264
|
+
"name": "bondLockFunds";
|
|
265
|
+
"docs": [
|
|
266
|
+
"Locks funds for both the current and upcoming epoch.",
|
|
267
|
+
"Moves collateral from available to locked state, making it unavailable for withdrawal for the current and next epoch.",
|
|
268
|
+
"# Errors",
|
|
269
|
+
"Fails if the validator is not active, or if there are insufficient available funds."
|
|
270
|
+
];
|
|
271
|
+
"discriminator": [
|
|
272
|
+
117,
|
|
273
|
+
166,
|
|
274
|
+
195,
|
|
275
|
+
99,
|
|
276
|
+
103,
|
|
277
|
+
45,
|
|
278
|
+
195,
|
|
279
|
+
2
|
|
280
|
+
];
|
|
281
|
+
"accounts": [
|
|
282
|
+
{
|
|
283
|
+
"name": "bondState";
|
|
284
|
+
"writable": true;
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "validatorBond";
|
|
288
|
+
"writable": true;
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "bondTokenAccount";
|
|
292
|
+
"optional": true;
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "payer";
|
|
296
|
+
"writable": true;
|
|
297
|
+
"signer": true;
|
|
298
|
+
}
|
|
299
|
+
];
|
|
300
|
+
"args": [
|
|
301
|
+
{
|
|
302
|
+
"name": "amount";
|
|
303
|
+
"type": "u64";
|
|
304
|
+
}
|
|
305
|
+
];
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "bondRegister";
|
|
309
|
+
"docs": [
|
|
310
|
+
"Registers a new validator with the bond.",
|
|
311
|
+
"Sets up the validator's bond account and deposits initial collateral.",
|
|
312
|
+
"",
|
|
313
|
+
"# Arguments",
|
|
314
|
+
"* `initial_collateral` - Amount of collateral to lock (must be positive).",
|
|
315
|
+
"* `withdrawal_authority` - Optional key that can withdraw collateral later.",
|
|
316
|
+
"",
|
|
317
|
+
"# Errors",
|
|
318
|
+
"Fails if the validator is already registered, if the vote account is invalid,",
|
|
319
|
+
"or if the initial collateral transfer fails."
|
|
320
|
+
];
|
|
321
|
+
"discriminator": [
|
|
278
322
|
117,
|
|
279
323
|
127,
|
|
280
324
|
78,
|
|
@@ -284,19 +328,19 @@ type Jbond = {
|
|
|
284
328
|
163,
|
|
285
329
|
83
|
|
286
330
|
];
|
|
287
|
-
accounts: [
|
|
331
|
+
"accounts": [
|
|
288
332
|
{
|
|
289
|
-
name:
|
|
290
|
-
writable: true;
|
|
333
|
+
"name": "bondState";
|
|
334
|
+
"writable": true;
|
|
291
335
|
},
|
|
292
336
|
{
|
|
293
|
-
name:
|
|
294
|
-
writable: true;
|
|
295
|
-
pda: {
|
|
296
|
-
seeds: [
|
|
337
|
+
"name": "validatorBond";
|
|
338
|
+
"writable": true;
|
|
339
|
+
"pda": {
|
|
340
|
+
"seeds": [
|
|
297
341
|
{
|
|
298
|
-
kind:
|
|
299
|
-
value: [
|
|
342
|
+
"kind": "const";
|
|
343
|
+
"value": [
|
|
300
344
|
118,
|
|
301
345
|
97,
|
|
302
346
|
108,
|
|
@@ -314,78 +358,114 @@ type Jbond = {
|
|
|
314
358
|
];
|
|
315
359
|
},
|
|
316
360
|
{
|
|
317
|
-
kind:
|
|
318
|
-
path:
|
|
361
|
+
"kind": "account";
|
|
362
|
+
"path": "bondState";
|
|
319
363
|
},
|
|
320
364
|
{
|
|
321
|
-
kind:
|
|
322
|
-
path:
|
|
365
|
+
"kind": "account";
|
|
366
|
+
"path": "voteAccount";
|
|
323
367
|
}
|
|
324
368
|
];
|
|
325
369
|
};
|
|
326
370
|
},
|
|
327
371
|
{
|
|
328
|
-
name:
|
|
372
|
+
"name": "identity";
|
|
329
373
|
},
|
|
330
374
|
{
|
|
331
|
-
name:
|
|
375
|
+
"name": "voteAccount";
|
|
332
376
|
},
|
|
333
377
|
{
|
|
334
|
-
name:
|
|
335
|
-
writable: true;
|
|
336
|
-
signer: true;
|
|
378
|
+
"name": "creator";
|
|
379
|
+
"writable": true;
|
|
380
|
+
"signer": true;
|
|
337
381
|
},
|
|
338
382
|
{
|
|
339
|
-
name:
|
|
340
|
-
address:
|
|
383
|
+
"name": "systemProgram";
|
|
384
|
+
"address": "11111111111111111111111111111111";
|
|
341
385
|
},
|
|
342
386
|
{
|
|
343
|
-
name:
|
|
344
|
-
address:
|
|
387
|
+
"name": "tokenProgram";
|
|
388
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
345
389
|
},
|
|
346
390
|
{
|
|
347
|
-
name:
|
|
348
|
-
address:
|
|
391
|
+
"name": "associatedTokenProgram";
|
|
392
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
349
393
|
},
|
|
350
394
|
{
|
|
351
|
-
name:
|
|
352
|
-
writable: true;
|
|
353
|
-
optional: true;
|
|
395
|
+
"name": "bondTokenAccount";
|
|
396
|
+
"writable": true;
|
|
397
|
+
"optional": true;
|
|
354
398
|
},
|
|
355
399
|
{
|
|
356
|
-
name:
|
|
357
|
-
optional: true;
|
|
400
|
+
"name": "mint";
|
|
401
|
+
"optional": true;
|
|
358
402
|
}
|
|
359
403
|
];
|
|
360
|
-
args: [
|
|
404
|
+
"args": [
|
|
361
405
|
{
|
|
362
|
-
name:
|
|
363
|
-
type: {
|
|
364
|
-
defined: {
|
|
365
|
-
name:
|
|
406
|
+
"name": "bondType";
|
|
407
|
+
"type": {
|
|
408
|
+
"defined": {
|
|
409
|
+
"name": "bondType";
|
|
366
410
|
};
|
|
367
411
|
};
|
|
368
412
|
},
|
|
369
413
|
{
|
|
370
|
-
name:
|
|
371
|
-
type:
|
|
414
|
+
"name": "bondName";
|
|
415
|
+
"type": "string";
|
|
416
|
+
}
|
|
417
|
+
];
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "bondReleaseFunds";
|
|
421
|
+
"docs": [
|
|
422
|
+
"Releases locked funds after an epoch ends.",
|
|
423
|
+
"Moves collateral from locked back to available state, allowing withdrawals.",
|
|
424
|
+
"# Errors",
|
|
425
|
+
"Fails if the validator is not active, or if there are insufficient locked funds."
|
|
426
|
+
];
|
|
427
|
+
"discriminator": [
|
|
428
|
+
184,
|
|
429
|
+
224,
|
|
430
|
+
14,
|
|
431
|
+
24,
|
|
432
|
+
76,
|
|
433
|
+
14,
|
|
434
|
+
226,
|
|
435
|
+
190
|
|
436
|
+
];
|
|
437
|
+
"accounts": [
|
|
438
|
+
{
|
|
439
|
+
"name": "validatorBond";
|
|
440
|
+
"writable": true;
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "payer";
|
|
444
|
+
"writable": true;
|
|
445
|
+
"signer": true;
|
|
446
|
+
}
|
|
447
|
+
];
|
|
448
|
+
"args": [
|
|
449
|
+
{
|
|
450
|
+
"name": "amount";
|
|
451
|
+
"type": "u64";
|
|
372
452
|
}
|
|
373
453
|
];
|
|
374
454
|
},
|
|
375
455
|
{
|
|
376
|
-
name:
|
|
377
|
-
docs: [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
];
|
|
388
|
-
discriminator: [
|
|
456
|
+
"name": "bondSetWithdrawAuthority";
|
|
457
|
+
"docs": [
|
|
458
|
+
"Sets a new withdrawal authority for a validator's bond account.",
|
|
459
|
+
"Allows changing who can withdraw collateral in the future.",
|
|
460
|
+
"",
|
|
461
|
+
"# Arguments",
|
|
462
|
+
"* `new_withdraw_authority` - Optional new withdrawal authority key (None to restrict to",
|
|
463
|
+
"identity).",
|
|
464
|
+
"",
|
|
465
|
+
"# Errors",
|
|
466
|
+
"Fails if the signer is not authorized to change the withdrawal authority."
|
|
467
|
+
];
|
|
468
|
+
"discriminator": [
|
|
389
469
|
212,
|
|
390
470
|
162,
|
|
391
471
|
53,
|
|
@@ -395,18 +475,18 @@ type Jbond = {
|
|
|
395
475
|
61,
|
|
396
476
|
166
|
|
397
477
|
];
|
|
398
|
-
accounts: [
|
|
478
|
+
"accounts": [
|
|
399
479
|
{
|
|
400
|
-
name:
|
|
480
|
+
"name": "bondState";
|
|
401
481
|
},
|
|
402
482
|
{
|
|
403
|
-
name:
|
|
404
|
-
writable: true;
|
|
405
|
-
pda: {
|
|
406
|
-
seeds: [
|
|
483
|
+
"name": "validatorBond";
|
|
484
|
+
"writable": true;
|
|
485
|
+
"pda": {
|
|
486
|
+
"seeds": [
|
|
407
487
|
{
|
|
408
|
-
kind:
|
|
409
|
-
value: [
|
|
488
|
+
"kind": "const";
|
|
489
|
+
"value": [
|
|
410
490
|
118,
|
|
411
491
|
97,
|
|
412
492
|
108,
|
|
@@ -424,42 +504,42 @@ type Jbond = {
|
|
|
424
504
|
];
|
|
425
505
|
},
|
|
426
506
|
{
|
|
427
|
-
kind:
|
|
428
|
-
path:
|
|
507
|
+
"kind": "account";
|
|
508
|
+
"path": "bondState";
|
|
429
509
|
},
|
|
430
510
|
{
|
|
431
|
-
kind:
|
|
432
|
-
path:
|
|
433
|
-
account:
|
|
511
|
+
"kind": "account";
|
|
512
|
+
"path": "validator_bond.vote_account";
|
|
513
|
+
"account": "validatorBond";
|
|
434
514
|
}
|
|
435
515
|
];
|
|
436
516
|
};
|
|
437
517
|
},
|
|
438
518
|
{
|
|
439
|
-
name:
|
|
440
|
-
signer: true;
|
|
519
|
+
"name": "identity";
|
|
520
|
+
"signer": true;
|
|
441
521
|
},
|
|
442
522
|
{
|
|
443
|
-
name:
|
|
444
|
-
optional: true;
|
|
523
|
+
"name": "newWithdrawAuthority";
|
|
524
|
+
"optional": true;
|
|
445
525
|
}
|
|
446
526
|
];
|
|
447
|
-
args: [];
|
|
527
|
+
"args": [];
|
|
448
528
|
},
|
|
449
529
|
{
|
|
450
|
-
name:
|
|
451
|
-
docs: [
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
];
|
|
462
|
-
discriminator: [
|
|
530
|
+
"name": "bondTopUp";
|
|
531
|
+
"docs": [
|
|
532
|
+
"Adds additional collateral to an existing validator's bond.",
|
|
533
|
+
"Increases the collateral balance, enhancing the validator's stake.",
|
|
534
|
+
"",
|
|
535
|
+
"# Arguments",
|
|
536
|
+
"* `amount` - Amount to add.",
|
|
537
|
+
"",
|
|
538
|
+
"# Errors",
|
|
539
|
+
"Fails if the validator is not active, if the amount is zero,",
|
|
540
|
+
"or if the transfer of funds fails."
|
|
541
|
+
];
|
|
542
|
+
"discriminator": [
|
|
463
543
|
132,
|
|
464
544
|
225,
|
|
465
545
|
254,
|
|
@@ -469,19 +549,19 @@ type Jbond = {
|
|
|
469
549
|
176,
|
|
470
550
|
66
|
|
471
551
|
];
|
|
472
|
-
accounts: [
|
|
552
|
+
"accounts": [
|
|
473
553
|
{
|
|
474
|
-
name:
|
|
475
|
-
writable: true;
|
|
554
|
+
"name": "bondState";
|
|
555
|
+
"writable": true;
|
|
476
556
|
},
|
|
477
557
|
{
|
|
478
|
-
name:
|
|
479
|
-
writable: true;
|
|
480
|
-
pda: {
|
|
481
|
-
seeds: [
|
|
558
|
+
"name": "validatorBond";
|
|
559
|
+
"writable": true;
|
|
560
|
+
"pda": {
|
|
561
|
+
"seeds": [
|
|
482
562
|
{
|
|
483
|
-
kind:
|
|
484
|
-
value: [
|
|
563
|
+
"kind": "const";
|
|
564
|
+
"value": [
|
|
485
565
|
118,
|
|
486
566
|
97,
|
|
487
567
|
108,
|
|
@@ -499,73 +579,109 @@ type Jbond = {
|
|
|
499
579
|
];
|
|
500
580
|
},
|
|
501
581
|
{
|
|
502
|
-
kind:
|
|
503
|
-
path:
|
|
582
|
+
"kind": "account";
|
|
583
|
+
"path": "bondState";
|
|
504
584
|
},
|
|
505
585
|
{
|
|
506
|
-
kind:
|
|
507
|
-
path:
|
|
508
|
-
account:
|
|
586
|
+
"kind": "account";
|
|
587
|
+
"path": "validator_bond.vote_account";
|
|
588
|
+
"account": "validatorBond";
|
|
509
589
|
}
|
|
510
590
|
];
|
|
511
591
|
};
|
|
512
592
|
},
|
|
513
593
|
{
|
|
514
|
-
name:
|
|
515
|
-
writable: true;
|
|
516
|
-
signer: true;
|
|
594
|
+
"name": "payer";
|
|
595
|
+
"writable": true;
|
|
596
|
+
"signer": true;
|
|
517
597
|
},
|
|
518
598
|
{
|
|
519
|
-
name:
|
|
520
|
-
writable: true;
|
|
521
|
-
optional: true;
|
|
599
|
+
"name": "payerTokenAccount";
|
|
600
|
+
"writable": true;
|
|
601
|
+
"optional": true;
|
|
522
602
|
},
|
|
523
603
|
{
|
|
524
|
-
name:
|
|
525
|
-
writable: true;
|
|
526
|
-
optional: true;
|
|
604
|
+
"name": "bondTokenAccount";
|
|
605
|
+
"writable": true;
|
|
606
|
+
"optional": true;
|
|
527
607
|
},
|
|
528
608
|
{
|
|
529
|
-
name:
|
|
530
|
-
writable: true;
|
|
531
|
-
optional: true;
|
|
609
|
+
"name": "stakeAccount";
|
|
610
|
+
"writable": true;
|
|
611
|
+
"optional": true;
|
|
532
612
|
},
|
|
533
613
|
{
|
|
534
|
-
name:
|
|
535
|
-
address:
|
|
614
|
+
"name": "systemProgram";
|
|
615
|
+
"address": "11111111111111111111111111111111";
|
|
536
616
|
},
|
|
537
617
|
{
|
|
538
|
-
name:
|
|
539
|
-
optional: true;
|
|
540
|
-
address:
|
|
618
|
+
"name": "tokenProgram";
|
|
619
|
+
"optional": true;
|
|
620
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
541
621
|
},
|
|
542
622
|
{
|
|
543
|
-
name:
|
|
544
|
-
optional: true;
|
|
623
|
+
"name": "stakeProgram";
|
|
624
|
+
"optional": true;
|
|
545
625
|
}
|
|
546
626
|
];
|
|
547
|
-
args: [
|
|
627
|
+
"args": [
|
|
548
628
|
{
|
|
549
|
-
name:
|
|
550
|
-
type:
|
|
629
|
+
"name": "amount";
|
|
630
|
+
"type": "u64";
|
|
551
631
|
}
|
|
552
632
|
];
|
|
553
633
|
},
|
|
554
634
|
{
|
|
555
|
-
name:
|
|
556
|
-
docs: [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
'
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
635
|
+
"name": "bondUpdate";
|
|
636
|
+
"docs": [
|
|
637
|
+
"Transitions locked funds between epochs for a validator bond.",
|
|
638
|
+
"",
|
|
639
|
+
"This function should be called at epoch boundaries to update the bond's",
|
|
640
|
+
"`last_update_epoch` and move the `next_epoch_locked` amount into",
|
|
641
|
+
"`current_epoch_locked`. It ensures that the update only occurs once per epoch.",
|
|
642
|
+
"",
|
|
643
|
+
"# Errors",
|
|
644
|
+
"Returns [`BondError::InvalidEpoch`] if called more than once in the same epoch,",
|
|
645
|
+
"or if the system clock cannot be accessed."
|
|
646
|
+
];
|
|
647
|
+
"discriminator": [
|
|
648
|
+
237,
|
|
649
|
+
102,
|
|
650
|
+
183,
|
|
651
|
+
192,
|
|
652
|
+
94,
|
|
653
|
+
83,
|
|
654
|
+
52,
|
|
655
|
+
82
|
|
656
|
+
];
|
|
657
|
+
"accounts": [
|
|
658
|
+
{
|
|
659
|
+
"name": "validatorBond";
|
|
660
|
+
"writable": true;
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "payer";
|
|
664
|
+
"writable": true;
|
|
665
|
+
"signer": true;
|
|
666
|
+
}
|
|
667
|
+
];
|
|
668
|
+
"args": [];
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "bondWithdraw";
|
|
672
|
+
"docs": [
|
|
673
|
+
"Withdraws collateral from a validator's bond.",
|
|
674
|
+
"Decreases the collateral balance, allowing the validator to reclaim funds.",
|
|
675
|
+
"",
|
|
676
|
+
"# Arguments",
|
|
677
|
+
"* `amount` - Amount to withdraw (must not exceed available balance).",
|
|
678
|
+
"",
|
|
679
|
+
"# Errors",
|
|
680
|
+
"Fails if the validator is not active, if the amount is zero,",
|
|
681
|
+
"if the withdrawal authority is invalid, or if the withdrawal would",
|
|
682
|
+
"leave insufficient collateral."
|
|
683
|
+
];
|
|
684
|
+
"discriminator": [
|
|
569
685
|
99,
|
|
570
686
|
64,
|
|
571
687
|
127,
|
|
@@ -575,19 +691,19 @@ type Jbond = {
|
|
|
575
691
|
70,
|
|
576
692
|
204
|
|
577
693
|
];
|
|
578
|
-
accounts: [
|
|
694
|
+
"accounts": [
|
|
579
695
|
{
|
|
580
|
-
name:
|
|
581
|
-
writable: true;
|
|
696
|
+
"name": "bondState";
|
|
697
|
+
"writable": true;
|
|
582
698
|
},
|
|
583
699
|
{
|
|
584
|
-
name:
|
|
585
|
-
writable: true;
|
|
586
|
-
pda: {
|
|
587
|
-
seeds: [
|
|
700
|
+
"name": "validatorBond";
|
|
701
|
+
"writable": true;
|
|
702
|
+
"pda": {
|
|
703
|
+
"seeds": [
|
|
588
704
|
{
|
|
589
|
-
kind:
|
|
590
|
-
value: [
|
|
705
|
+
"kind": "const";
|
|
706
|
+
"value": [
|
|
591
707
|
118,
|
|
592
708
|
97,
|
|
593
709
|
108,
|
|
@@ -605,65 +721,65 @@ type Jbond = {
|
|
|
605
721
|
];
|
|
606
722
|
},
|
|
607
723
|
{
|
|
608
|
-
kind:
|
|
609
|
-
path:
|
|
724
|
+
"kind": "account";
|
|
725
|
+
"path": "bondState";
|
|
610
726
|
},
|
|
611
727
|
{
|
|
612
|
-
kind:
|
|
613
|
-
path:
|
|
614
|
-
account:
|
|
728
|
+
"kind": "account";
|
|
729
|
+
"path": "validator_bond.vote_account";
|
|
730
|
+
"account": "validatorBond";
|
|
615
731
|
}
|
|
616
732
|
];
|
|
617
733
|
};
|
|
618
734
|
},
|
|
619
735
|
{
|
|
620
|
-
name:
|
|
621
|
-
writable: true;
|
|
622
|
-
signer: true;
|
|
736
|
+
"name": "withdrawalAuthority";
|
|
737
|
+
"writable": true;
|
|
738
|
+
"signer": true;
|
|
623
739
|
},
|
|
624
740
|
{
|
|
625
|
-
name:
|
|
626
|
-
writable: true;
|
|
741
|
+
"name": "destination";
|
|
742
|
+
"writable": true;
|
|
627
743
|
},
|
|
628
744
|
{
|
|
629
|
-
name:
|
|
630
|
-
writable: true;
|
|
631
|
-
optional: true;
|
|
745
|
+
"name": "destinationTokenAccount";
|
|
746
|
+
"writable": true;
|
|
747
|
+
"optional": true;
|
|
632
748
|
},
|
|
633
749
|
{
|
|
634
|
-
name:
|
|
635
|
-
writable: true;
|
|
636
|
-
optional: true;
|
|
750
|
+
"name": "bondTokenAccount";
|
|
751
|
+
"writable": true;
|
|
752
|
+
"optional": true;
|
|
637
753
|
},
|
|
638
754
|
{
|
|
639
|
-
name:
|
|
640
|
-
writable: true;
|
|
641
|
-
optional: true;
|
|
755
|
+
"name": "stakeAccount";
|
|
756
|
+
"writable": true;
|
|
757
|
+
"optional": true;
|
|
642
758
|
},
|
|
643
759
|
{
|
|
644
|
-
name:
|
|
645
|
-
address:
|
|
760
|
+
"name": "systemProgram";
|
|
761
|
+
"address": "11111111111111111111111111111111";
|
|
646
762
|
},
|
|
647
763
|
{
|
|
648
|
-
name:
|
|
649
|
-
optional: true;
|
|
650
|
-
address:
|
|
764
|
+
"name": "tokenProgram";
|
|
765
|
+
"optional": true;
|
|
766
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
651
767
|
},
|
|
652
768
|
{
|
|
653
|
-
name:
|
|
654
|
-
optional: true;
|
|
769
|
+
"name": "stakeProgram";
|
|
770
|
+
"optional": true;
|
|
655
771
|
}
|
|
656
772
|
];
|
|
657
|
-
args: [
|
|
773
|
+
"args": [
|
|
658
774
|
{
|
|
659
|
-
name:
|
|
660
|
-
type:
|
|
775
|
+
"name": "amount";
|
|
776
|
+
"type": "u64";
|
|
661
777
|
}
|
|
662
778
|
];
|
|
663
779
|
},
|
|
664
780
|
{
|
|
665
|
-
name:
|
|
666
|
-
discriminator: [
|
|
781
|
+
"name": "globalConfigure";
|
|
782
|
+
"discriminator": [
|
|
667
783
|
67,
|
|
668
784
|
142,
|
|
669
785
|
164,
|
|
@@ -673,15 +789,15 @@ type Jbond = {
|
|
|
673
789
|
144,
|
|
674
790
|
187
|
|
675
791
|
];
|
|
676
|
-
accounts: [
|
|
792
|
+
"accounts": [
|
|
677
793
|
{
|
|
678
|
-
name:
|
|
679
|
-
writable: true;
|
|
680
|
-
pda: {
|
|
681
|
-
seeds: [
|
|
794
|
+
"name": "globalState";
|
|
795
|
+
"writable": true;
|
|
796
|
+
"pda": {
|
|
797
|
+
"seeds": [
|
|
682
798
|
{
|
|
683
|
-
kind:
|
|
684
|
-
value: [
|
|
799
|
+
"kind": "const";
|
|
800
|
+
"value": [
|
|
685
801
|
103,
|
|
686
802
|
108,
|
|
687
803
|
111,
|
|
@@ -700,27 +816,27 @@ type Jbond = {
|
|
|
700
816
|
};
|
|
701
817
|
},
|
|
702
818
|
{
|
|
703
|
-
name:
|
|
704
|
-
signer: true;
|
|
705
|
-
relations: [
|
|
706
|
-
|
|
819
|
+
"name": "authority";
|
|
820
|
+
"signer": true;
|
|
821
|
+
"relations": [
|
|
822
|
+
"globalState"
|
|
707
823
|
];
|
|
708
824
|
}
|
|
709
825
|
];
|
|
710
|
-
args: [
|
|
826
|
+
"args": [
|
|
711
827
|
{
|
|
712
|
-
name:
|
|
713
|
-
type: {
|
|
714
|
-
defined: {
|
|
715
|
-
name:
|
|
828
|
+
"name": "data";
|
|
829
|
+
"type": {
|
|
830
|
+
"defined": {
|
|
831
|
+
"name": "globalConfigureData";
|
|
716
832
|
};
|
|
717
833
|
};
|
|
718
834
|
}
|
|
719
835
|
];
|
|
720
836
|
},
|
|
721
837
|
{
|
|
722
|
-
name:
|
|
723
|
-
discriminator: [
|
|
838
|
+
"name": "globalInitialize";
|
|
839
|
+
"discriminator": [
|
|
724
840
|
30,
|
|
725
841
|
79,
|
|
726
842
|
193,
|
|
@@ -730,15 +846,15 @@ type Jbond = {
|
|
|
730
846
|
223,
|
|
731
847
|
196
|
|
732
848
|
];
|
|
733
|
-
accounts: [
|
|
849
|
+
"accounts": [
|
|
734
850
|
{
|
|
735
|
-
name:
|
|
736
|
-
writable: true;
|
|
737
|
-
pda: {
|
|
738
|
-
seeds: [
|
|
851
|
+
"name": "globalState";
|
|
852
|
+
"writable": true;
|
|
853
|
+
"pda": {
|
|
854
|
+
"seeds": [
|
|
739
855
|
{
|
|
740
|
-
kind:
|
|
741
|
-
value: [
|
|
856
|
+
"kind": "const";
|
|
857
|
+
"value": [
|
|
742
858
|
103,
|
|
743
859
|
108,
|
|
744
860
|
111,
|
|
@@ -757,23 +873,23 @@ type Jbond = {
|
|
|
757
873
|
};
|
|
758
874
|
},
|
|
759
875
|
{
|
|
760
|
-
name:
|
|
761
|
-
writable: true;
|
|
762
|
-
signer: true;
|
|
876
|
+
"name": "authority";
|
|
877
|
+
"writable": true;
|
|
878
|
+
"signer": true;
|
|
763
879
|
},
|
|
764
880
|
{
|
|
765
|
-
name:
|
|
766
|
-
address:
|
|
881
|
+
"name": "systemProgram";
|
|
882
|
+
"address": "11111111111111111111111111111111";
|
|
767
883
|
}
|
|
768
884
|
];
|
|
769
|
-
args: [];
|
|
885
|
+
"args": [];
|
|
770
886
|
},
|
|
771
887
|
{
|
|
772
|
-
name:
|
|
773
|
-
docs: [
|
|
774
|
-
|
|
888
|
+
"name": "migrateBond";
|
|
889
|
+
"docs": [
|
|
890
|
+
"Migrates validator bond data from legacy structure to new structure."
|
|
775
891
|
];
|
|
776
|
-
discriminator: [
|
|
892
|
+
"discriminator": [
|
|
777
893
|
107,
|
|
778
894
|
119,
|
|
779
895
|
59,
|
|
@@ -783,26 +899,26 @@ type Jbond = {
|
|
|
783
899
|
37,
|
|
784
900
|
163
|
|
785
901
|
];
|
|
786
|
-
accounts: [
|
|
902
|
+
"accounts": [
|
|
787
903
|
{
|
|
788
|
-
name:
|
|
789
|
-
writable: true;
|
|
904
|
+
"name": "bondState";
|
|
905
|
+
"writable": true;
|
|
790
906
|
},
|
|
791
907
|
{
|
|
792
|
-
name:
|
|
793
|
-
writable: true;
|
|
908
|
+
"name": "legacyValidatorBond";
|
|
909
|
+
"writable": true;
|
|
794
910
|
},
|
|
795
911
|
{
|
|
796
|
-
name:
|
|
912
|
+
"name": "legacyVoteAccount";
|
|
797
913
|
},
|
|
798
914
|
{
|
|
799
|
-
name:
|
|
800
|
-
writable: true;
|
|
801
|
-
pda: {
|
|
802
|
-
seeds: [
|
|
915
|
+
"name": "validatorBond";
|
|
916
|
+
"writable": true;
|
|
917
|
+
"pda": {
|
|
918
|
+
"seeds": [
|
|
803
919
|
{
|
|
804
|
-
kind:
|
|
805
|
-
value: [
|
|
920
|
+
"kind": "const";
|
|
921
|
+
"value": [
|
|
806
922
|
118,
|
|
807
923
|
97,
|
|
808
924
|
108,
|
|
@@ -820,34 +936,34 @@ type Jbond = {
|
|
|
820
936
|
];
|
|
821
937
|
},
|
|
822
938
|
{
|
|
823
|
-
kind:
|
|
824
|
-
path:
|
|
939
|
+
"kind": "account";
|
|
940
|
+
"path": "bondState";
|
|
825
941
|
},
|
|
826
942
|
{
|
|
827
|
-
kind:
|
|
828
|
-
path:
|
|
943
|
+
"kind": "account";
|
|
944
|
+
"path": "legacyVoteAccount";
|
|
829
945
|
}
|
|
830
946
|
];
|
|
831
947
|
};
|
|
832
948
|
},
|
|
833
949
|
{
|
|
834
|
-
name:
|
|
835
|
-
writable: true;
|
|
836
|
-
signer: true;
|
|
950
|
+
"name": "creator";
|
|
951
|
+
"writable": true;
|
|
952
|
+
"signer": true;
|
|
837
953
|
},
|
|
838
954
|
{
|
|
839
|
-
name:
|
|
840
|
-
address:
|
|
955
|
+
"name": "systemProgram";
|
|
956
|
+
"address": "11111111111111111111111111111111";
|
|
841
957
|
}
|
|
842
958
|
];
|
|
843
|
-
args: [];
|
|
959
|
+
"args": [];
|
|
844
960
|
},
|
|
845
961
|
{
|
|
846
|
-
name:
|
|
847
|
-
docs: [
|
|
848
|
-
|
|
962
|
+
"name": "sessionFinish";
|
|
963
|
+
"docs": [
|
|
964
|
+
"Finishes a bond, preventing further deposits and withdrawals."
|
|
849
965
|
];
|
|
850
|
-
discriminator: [
|
|
966
|
+
"discriminator": [
|
|
851
967
|
230,
|
|
852
968
|
209,
|
|
853
969
|
54,
|
|
@@ -857,28 +973,28 @@ type Jbond = {
|
|
|
857
973
|
137,
|
|
858
974
|
113
|
|
859
975
|
];
|
|
860
|
-
accounts: [
|
|
976
|
+
"accounts": [
|
|
861
977
|
{
|
|
862
|
-
name:
|
|
863
|
-
writable: true;
|
|
978
|
+
"name": "bondState";
|
|
979
|
+
"writable": true;
|
|
864
980
|
},
|
|
865
981
|
{
|
|
866
|
-
name:
|
|
867
|
-
writable: true;
|
|
868
|
-
signer: true;
|
|
869
|
-
relations: [
|
|
870
|
-
|
|
982
|
+
"name": "authority";
|
|
983
|
+
"writable": true;
|
|
984
|
+
"signer": true;
|
|
985
|
+
"relations": [
|
|
986
|
+
"bondState"
|
|
871
987
|
];
|
|
872
988
|
}
|
|
873
989
|
];
|
|
874
|
-
args: [];
|
|
990
|
+
"args": [];
|
|
875
991
|
},
|
|
876
992
|
{
|
|
877
|
-
name:
|
|
878
|
-
docs: [
|
|
879
|
-
|
|
993
|
+
"name": "sessionStart";
|
|
994
|
+
"docs": [
|
|
995
|
+
"Starts a paused bond, allowing deposits and withdrawals to resume."
|
|
880
996
|
];
|
|
881
|
-
discriminator: [
|
|
997
|
+
"discriminator": [
|
|
882
998
|
132,
|
|
883
999
|
93,
|
|
884
1000
|
83,
|
|
@@ -888,32 +1004,32 @@ type Jbond = {
|
|
|
888
1004
|
58,
|
|
889
1005
|
92
|
|
890
1006
|
];
|
|
891
|
-
accounts: [
|
|
1007
|
+
"accounts": [
|
|
892
1008
|
{
|
|
893
|
-
name:
|
|
894
|
-
writable: true;
|
|
1009
|
+
"name": "bondState";
|
|
1010
|
+
"writable": true;
|
|
895
1011
|
},
|
|
896
1012
|
{
|
|
897
|
-
name:
|
|
898
|
-
writable: true;
|
|
899
|
-
signer: true;
|
|
900
|
-
relations: [
|
|
901
|
-
|
|
1013
|
+
"name": "authority";
|
|
1014
|
+
"writable": true;
|
|
1015
|
+
"signer": true;
|
|
1016
|
+
"relations": [
|
|
1017
|
+
"bondState"
|
|
902
1018
|
];
|
|
903
1019
|
}
|
|
904
1020
|
];
|
|
905
|
-
args: [
|
|
1021
|
+
"args": [
|
|
906
1022
|
{
|
|
907
|
-
name:
|
|
908
|
-
type:
|
|
1023
|
+
"name": "durationSecs";
|
|
1024
|
+
"type": "u64";
|
|
909
1025
|
}
|
|
910
1026
|
];
|
|
911
1027
|
}
|
|
912
1028
|
];
|
|
913
|
-
accounts: [
|
|
1029
|
+
"accounts": [
|
|
914
1030
|
{
|
|
915
|
-
name:
|
|
916
|
-
discriminator: [
|
|
1031
|
+
"name": "bondState";
|
|
1032
|
+
"discriminator": [
|
|
917
1033
|
251,
|
|
918
1034
|
95,
|
|
919
1035
|
76,
|
|
@@ -925,8 +1041,8 @@ type Jbond = {
|
|
|
925
1041
|
];
|
|
926
1042
|
},
|
|
927
1043
|
{
|
|
928
|
-
name:
|
|
929
|
-
discriminator: [
|
|
1044
|
+
"name": "globalState";
|
|
1045
|
+
"discriminator": [
|
|
930
1046
|
163,
|
|
931
1047
|
46,
|
|
932
1048
|
74,
|
|
@@ -938,8 +1054,8 @@ type Jbond = {
|
|
|
938
1054
|
];
|
|
939
1055
|
},
|
|
940
1056
|
{
|
|
941
|
-
name:
|
|
942
|
-
discriminator: [
|
|
1057
|
+
"name": "validatorBond";
|
|
1058
|
+
"discriminator": [
|
|
943
1059
|
82,
|
|
944
1060
|
127,
|
|
945
1061
|
243,
|
|
@@ -951,10 +1067,10 @@ type Jbond = {
|
|
|
951
1067
|
];
|
|
952
1068
|
}
|
|
953
1069
|
];
|
|
954
|
-
events: [
|
|
1070
|
+
"events": [
|
|
955
1071
|
{
|
|
956
|
-
name:
|
|
957
|
-
discriminator: [
|
|
1072
|
+
"name": "bondFinished";
|
|
1073
|
+
"discriminator": [
|
|
958
1074
|
223,
|
|
959
1075
|
254,
|
|
960
1076
|
3,
|
|
@@ -966,8 +1082,8 @@ type Jbond = {
|
|
|
966
1082
|
];
|
|
967
1083
|
},
|
|
968
1084
|
{
|
|
969
|
-
name:
|
|
970
|
-
discriminator: [
|
|
1085
|
+
"name": "bondStarted";
|
|
1086
|
+
"discriminator": [
|
|
971
1087
|
235,
|
|
972
1088
|
69,
|
|
973
1089
|
80,
|
|
@@ -979,8 +1095,8 @@ type Jbond = {
|
|
|
979
1095
|
];
|
|
980
1096
|
},
|
|
981
1097
|
{
|
|
982
|
-
name:
|
|
983
|
-
discriminator: [
|
|
1098
|
+
"name": "collateralToppedUp";
|
|
1099
|
+
"discriminator": [
|
|
984
1100
|
189,
|
|
985
1101
|
137,
|
|
986
1102
|
204,
|
|
@@ -992,8 +1108,8 @@ type Jbond = {
|
|
|
992
1108
|
];
|
|
993
1109
|
},
|
|
994
1110
|
{
|
|
995
|
-
name:
|
|
996
|
-
discriminator: [
|
|
1111
|
+
"name": "collateralWithdrawn";
|
|
1112
|
+
"discriminator": [
|
|
997
1113
|
51,
|
|
998
1114
|
224,
|
|
999
1115
|
133,
|
|
@@ -1005,8 +1121,8 @@ type Jbond = {
|
|
|
1005
1121
|
];
|
|
1006
1122
|
},
|
|
1007
1123
|
{
|
|
1008
|
-
name:
|
|
1009
|
-
discriminator: [
|
|
1124
|
+
"name": "compensationClaimed";
|
|
1125
|
+
"discriminator": [
|
|
1010
1126
|
36,
|
|
1011
1127
|
159,
|
|
1012
1128
|
41,
|
|
@@ -1018,8 +1134,8 @@ type Jbond = {
|
|
|
1018
1134
|
];
|
|
1019
1135
|
},
|
|
1020
1136
|
{
|
|
1021
|
-
name:
|
|
1022
|
-
discriminator: [
|
|
1137
|
+
"name": "validatorRegistered";
|
|
1138
|
+
"discriminator": [
|
|
1023
1139
|
20,
|
|
1024
1140
|
20,
|
|
1025
1141
|
190,
|
|
@@ -1031,208 +1147,213 @@ type Jbond = {
|
|
|
1031
1147
|
];
|
|
1032
1148
|
}
|
|
1033
1149
|
];
|
|
1034
|
-
errors: [
|
|
1150
|
+
"errors": [
|
|
1035
1151
|
{
|
|
1036
|
-
code: 6000;
|
|
1037
|
-
name:
|
|
1038
|
-
msg:
|
|
1152
|
+
"code": 6000;
|
|
1153
|
+
"name": "invalidVoteAccount";
|
|
1154
|
+
"msg": "Invalid vote account";
|
|
1039
1155
|
},
|
|
1040
1156
|
{
|
|
1041
|
-
code: 6001;
|
|
1042
|
-
name:
|
|
1043
|
-
msg:
|
|
1157
|
+
"code": 6001;
|
|
1158
|
+
"name": "identityMismatch";
|
|
1159
|
+
"msg": "Identity does not match vote account";
|
|
1044
1160
|
},
|
|
1045
1161
|
{
|
|
1046
|
-
code: 6002;
|
|
1047
|
-
name:
|
|
1048
|
-
msg:
|
|
1162
|
+
"code": 6002;
|
|
1163
|
+
"name": "insufficientCollateral";
|
|
1164
|
+
"msg": "Insufficient collateral amount";
|
|
1049
1165
|
},
|
|
1050
1166
|
{
|
|
1051
|
-
code: 6003;
|
|
1052
|
-
name:
|
|
1053
|
-
msg:
|
|
1167
|
+
"code": 6003;
|
|
1168
|
+
"name": "targetAprTooLow";
|
|
1169
|
+
"msg": "Target APR is below minimum threshold";
|
|
1054
1170
|
},
|
|
1055
1171
|
{
|
|
1056
|
-
code: 6004;
|
|
1057
|
-
name:
|
|
1058
|
-
msg:
|
|
1172
|
+
"code": 6004;
|
|
1173
|
+
"name": "mathOverflow";
|
|
1174
|
+
"msg": "Math overflow";
|
|
1059
1175
|
},
|
|
1060
1176
|
{
|
|
1061
|
-
code: 6005;
|
|
1062
|
-
name:
|
|
1063
|
-
msg:
|
|
1177
|
+
"code": 6005;
|
|
1178
|
+
"name": "invalidAmount";
|
|
1179
|
+
"msg": "Invalid amount";
|
|
1064
1180
|
},
|
|
1065
1181
|
{
|
|
1066
|
-
code: 6006;
|
|
1067
|
-
name:
|
|
1068
|
-
msg:
|
|
1182
|
+
"code": 6006;
|
|
1183
|
+
"name": "validatorNotActive";
|
|
1184
|
+
"msg": "Validator bond account is not active";
|
|
1069
1185
|
},
|
|
1070
1186
|
{
|
|
1071
|
-
code: 6007;
|
|
1072
|
-
name:
|
|
1073
|
-
msg:
|
|
1187
|
+
"code": 6007;
|
|
1188
|
+
"name": "validatorAlreadyRegistered";
|
|
1189
|
+
"msg": "Validator already registered";
|
|
1074
1190
|
},
|
|
1075
1191
|
{
|
|
1076
|
-
code: 6008;
|
|
1077
|
-
name:
|
|
1078
|
-
msg:
|
|
1192
|
+
"code": 6008;
|
|
1193
|
+
"name": "unauthorized";
|
|
1194
|
+
"msg": "unauthorized";
|
|
1079
1195
|
},
|
|
1080
1196
|
{
|
|
1081
|
-
code: 6009;
|
|
1082
|
-
name:
|
|
1083
|
-
msg:
|
|
1197
|
+
"code": 6009;
|
|
1198
|
+
"name": "withdrawalLockedNearEpochEnd";
|
|
1199
|
+
"msg": "Withdrawals are locked near the end of the epoch.";
|
|
1084
1200
|
},
|
|
1085
1201
|
{
|
|
1086
|
-
code: 6010;
|
|
1087
|
-
name:
|
|
1088
|
-
msg:
|
|
1202
|
+
"code": 6010;
|
|
1203
|
+
"name": "missingTokenAccounts";
|
|
1204
|
+
"msg": "Missing token accounts for token collateral type";
|
|
1089
1205
|
},
|
|
1090
1206
|
{
|
|
1091
|
-
code: 6011;
|
|
1092
|
-
name:
|
|
1093
|
-
msg:
|
|
1207
|
+
"code": 6011;
|
|
1208
|
+
"name": "missingTokenProgram";
|
|
1209
|
+
"msg": "Token program is required for token collateral type";
|
|
1094
1210
|
},
|
|
1095
1211
|
{
|
|
1096
|
-
code: 6012;
|
|
1097
|
-
name:
|
|
1098
|
-
msg:
|
|
1212
|
+
"code": 6012;
|
|
1213
|
+
"name": "invalidMint";
|
|
1214
|
+
"msg": "Invalid mint for token collateral type";
|
|
1099
1215
|
},
|
|
1100
1216
|
{
|
|
1101
|
-
code: 6013;
|
|
1102
|
-
name:
|
|
1103
|
-
msg:
|
|
1217
|
+
"code": 6013;
|
|
1218
|
+
"name": "missingStakeAccount";
|
|
1219
|
+
"msg": "Stake account is required for stake account collateral type";
|
|
1104
1220
|
},
|
|
1105
1221
|
{
|
|
1106
|
-
code: 6014;
|
|
1107
|
-
name:
|
|
1108
|
-
msg:
|
|
1222
|
+
"code": 6014;
|
|
1223
|
+
"name": "missingStakeProgram";
|
|
1224
|
+
"msg": "Stake program is required for stake account collateral type";
|
|
1109
1225
|
},
|
|
1110
1226
|
{
|
|
1111
|
-
code: 6015;
|
|
1112
|
-
name:
|
|
1113
|
-
msg:
|
|
1227
|
+
"code": 6015;
|
|
1228
|
+
"name": "bondFinished";
|
|
1229
|
+
"msg": "Bond is finished (deposits/withdrawals disabled)";
|
|
1114
1230
|
},
|
|
1115
1231
|
{
|
|
1116
|
-
code: 6016;
|
|
1117
|
-
name:
|
|
1118
|
-
msg:
|
|
1232
|
+
"code": 6016;
|
|
1233
|
+
"name": "bondNotFinished";
|
|
1234
|
+
"msg": "Bond is not finished";
|
|
1119
1235
|
},
|
|
1120
1236
|
{
|
|
1121
|
-
code: 6017;
|
|
1122
|
-
name:
|
|
1123
|
-
msg:
|
|
1237
|
+
"code": 6017;
|
|
1238
|
+
"name": "unsupportedCollateralType";
|
|
1239
|
+
"msg": "Unsupported collateral type";
|
|
1124
1240
|
},
|
|
1125
1241
|
{
|
|
1126
|
-
code: 6018;
|
|
1127
|
-
name:
|
|
1128
|
-
msg:
|
|
1242
|
+
"code": 6018;
|
|
1243
|
+
"name": "overflow";
|
|
1244
|
+
"msg": "Math operation overflowed";
|
|
1129
1245
|
},
|
|
1130
1246
|
{
|
|
1131
|
-
code: 6019;
|
|
1132
|
-
name:
|
|
1133
|
-
msg:
|
|
1247
|
+
"code": 6019;
|
|
1248
|
+
"name": "incorrectBondType";
|
|
1249
|
+
"msg": "Incorrect bond type for this operation";
|
|
1134
1250
|
},
|
|
1135
1251
|
{
|
|
1136
|
-
code: 6020;
|
|
1137
|
-
name:
|
|
1138
|
-
msg:
|
|
1252
|
+
"code": 6020;
|
|
1253
|
+
"name": "bondNotFinishable";
|
|
1254
|
+
"msg": "This bond type can't be finished";
|
|
1139
1255
|
},
|
|
1140
1256
|
{
|
|
1141
|
-
code: 6021;
|
|
1142
|
-
name:
|
|
1143
|
-
msg:
|
|
1257
|
+
"code": 6021;
|
|
1258
|
+
"name": "invalidArgument";
|
|
1259
|
+
"msg": "Invalid argument provided";
|
|
1144
1260
|
},
|
|
1145
1261
|
{
|
|
1146
|
-
code: 6022;
|
|
1147
|
-
name:
|
|
1148
|
-
msg:
|
|
1262
|
+
"code": 6022;
|
|
1263
|
+
"name": "bondNotDisabled";
|
|
1264
|
+
"msg": "Bond is not disabled";
|
|
1149
1265
|
},
|
|
1150
1266
|
{
|
|
1151
|
-
code: 6023;
|
|
1152
|
-
name:
|
|
1153
|
-
msg:
|
|
1267
|
+
"code": 6023;
|
|
1268
|
+
"name": "bondNotEnabled";
|
|
1269
|
+
"msg": "Bond is not enabled";
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"code": 6024;
|
|
1273
|
+
"name": "invalidEpoch";
|
|
1274
|
+
"msg": "Invalid epoch for this operation";
|
|
1154
1275
|
}
|
|
1155
1276
|
];
|
|
1156
|
-
types: [
|
|
1277
|
+
"types": [
|
|
1157
1278
|
{
|
|
1158
|
-
name:
|
|
1159
|
-
type: {
|
|
1160
|
-
kind:
|
|
1161
|
-
fields: [
|
|
1279
|
+
"name": "bondConfigureData";
|
|
1280
|
+
"type": {
|
|
1281
|
+
"kind": "struct";
|
|
1282
|
+
"fields": [
|
|
1162
1283
|
{
|
|
1163
|
-
name:
|
|
1164
|
-
type: {
|
|
1165
|
-
option: {
|
|
1166
|
-
defined: {
|
|
1167
|
-
name:
|
|
1284
|
+
"name": "status";
|
|
1285
|
+
"type": {
|
|
1286
|
+
"option": {
|
|
1287
|
+
"defined": {
|
|
1288
|
+
"name": "bondStatus";
|
|
1168
1289
|
};
|
|
1169
1290
|
};
|
|
1170
1291
|
};
|
|
1171
1292
|
},
|
|
1172
1293
|
{
|
|
1173
|
-
name:
|
|
1174
|
-
type: {
|
|
1175
|
-
option:
|
|
1294
|
+
"name": "newReserve";
|
|
1295
|
+
"type": {
|
|
1296
|
+
"option": "pubkey";
|
|
1176
1297
|
};
|
|
1177
1298
|
},
|
|
1178
1299
|
{
|
|
1179
|
-
name:
|
|
1180
|
-
type: {
|
|
1181
|
-
option:
|
|
1300
|
+
"name": "newAuthority";
|
|
1301
|
+
"type": {
|
|
1302
|
+
"option": "pubkey";
|
|
1182
1303
|
};
|
|
1183
1304
|
}
|
|
1184
1305
|
];
|
|
1185
1306
|
};
|
|
1186
1307
|
},
|
|
1187
1308
|
{
|
|
1188
|
-
name:
|
|
1189
|
-
type: {
|
|
1190
|
-
kind:
|
|
1191
|
-
fields: [
|
|
1309
|
+
"name": "bondFinished";
|
|
1310
|
+
"type": {
|
|
1311
|
+
"kind": "struct";
|
|
1312
|
+
"fields": [
|
|
1192
1313
|
{
|
|
1193
|
-
name:
|
|
1194
|
-
type:
|
|
1314
|
+
"name": "bond";
|
|
1315
|
+
"type": "pubkey";
|
|
1195
1316
|
},
|
|
1196
1317
|
{
|
|
1197
|
-
name:
|
|
1198
|
-
type:
|
|
1318
|
+
"name": "authority";
|
|
1319
|
+
"type": "pubkey";
|
|
1199
1320
|
},
|
|
1200
1321
|
{
|
|
1201
|
-
name:
|
|
1202
|
-
type:
|
|
1322
|
+
"name": "timestamp";
|
|
1323
|
+
"type": "i64";
|
|
1203
1324
|
}
|
|
1204
1325
|
];
|
|
1205
1326
|
};
|
|
1206
1327
|
},
|
|
1207
1328
|
{
|
|
1208
|
-
name:
|
|
1209
|
-
docs: [
|
|
1210
|
-
|
|
1329
|
+
"name": "bondInitializeData";
|
|
1330
|
+
"docs": [
|
|
1331
|
+
"Data required to initialize a performance bond"
|
|
1211
1332
|
];
|
|
1212
|
-
type: {
|
|
1213
|
-
kind:
|
|
1214
|
-
fields: [
|
|
1333
|
+
"type": {
|
|
1334
|
+
"kind": "struct";
|
|
1335
|
+
"fields": [
|
|
1215
1336
|
{
|
|
1216
|
-
name:
|
|
1217
|
-
type:
|
|
1337
|
+
"name": "name";
|
|
1338
|
+
"type": "string";
|
|
1218
1339
|
},
|
|
1219
1340
|
{
|
|
1220
|
-
name:
|
|
1221
|
-
type: {
|
|
1222
|
-
defined: {
|
|
1223
|
-
name:
|
|
1341
|
+
"name": "bondType";
|
|
1342
|
+
"type": {
|
|
1343
|
+
"defined": {
|
|
1344
|
+
"name": "bondType";
|
|
1224
1345
|
};
|
|
1225
1346
|
};
|
|
1226
1347
|
},
|
|
1227
1348
|
{
|
|
1228
|
-
name:
|
|
1229
|
-
type:
|
|
1349
|
+
"name": "reserve";
|
|
1350
|
+
"type": "pubkey";
|
|
1230
1351
|
},
|
|
1231
1352
|
{
|
|
1232
|
-
name:
|
|
1233
|
-
type: {
|
|
1234
|
-
defined: {
|
|
1235
|
-
name:
|
|
1353
|
+
"name": "collateralType";
|
|
1354
|
+
"type": {
|
|
1355
|
+
"defined": {
|
|
1356
|
+
"name": "collateralType";
|
|
1236
1357
|
};
|
|
1237
1358
|
};
|
|
1238
1359
|
}
|
|
@@ -1240,359 +1361,402 @@ type Jbond = {
|
|
|
1240
1361
|
};
|
|
1241
1362
|
},
|
|
1242
1363
|
{
|
|
1243
|
-
name:
|
|
1244
|
-
type: {
|
|
1245
|
-
kind:
|
|
1246
|
-
fields: [
|
|
1364
|
+
"name": "bondStarted";
|
|
1365
|
+
"type": {
|
|
1366
|
+
"kind": "struct";
|
|
1367
|
+
"fields": [
|
|
1247
1368
|
{
|
|
1248
|
-
name:
|
|
1249
|
-
type:
|
|
1369
|
+
"name": "bond";
|
|
1370
|
+
"type": "pubkey";
|
|
1250
1371
|
},
|
|
1251
1372
|
{
|
|
1252
|
-
name:
|
|
1253
|
-
type:
|
|
1373
|
+
"name": "authority";
|
|
1374
|
+
"type": "pubkey";
|
|
1254
1375
|
},
|
|
1255
1376
|
{
|
|
1256
|
-
name:
|
|
1257
|
-
type:
|
|
1377
|
+
"name": "timestamp";
|
|
1378
|
+
"type": "i64";
|
|
1258
1379
|
}
|
|
1259
1380
|
];
|
|
1260
1381
|
};
|
|
1261
1382
|
},
|
|
1262
1383
|
{
|
|
1263
|
-
name:
|
|
1264
|
-
type: {
|
|
1265
|
-
kind:
|
|
1266
|
-
fields: [
|
|
1384
|
+
"name": "bondState";
|
|
1385
|
+
"type": {
|
|
1386
|
+
"kind": "struct";
|
|
1387
|
+
"fields": [
|
|
1267
1388
|
{
|
|
1268
|
-
name:
|
|
1269
|
-
type:
|
|
1389
|
+
"name": "name";
|
|
1390
|
+
"type": "string";
|
|
1270
1391
|
},
|
|
1271
1392
|
{
|
|
1272
|
-
name:
|
|
1273
|
-
docs: [
|
|
1274
|
-
|
|
1393
|
+
"name": "bondType";
|
|
1394
|
+
"docs": [
|
|
1395
|
+
"The type of bond (e.g., Standard, Crowdfunding)"
|
|
1275
1396
|
];
|
|
1276
|
-
type: {
|
|
1277
|
-
defined: {
|
|
1278
|
-
name:
|
|
1397
|
+
"type": {
|
|
1398
|
+
"defined": {
|
|
1399
|
+
"name": "bondType";
|
|
1279
1400
|
};
|
|
1280
1401
|
};
|
|
1281
1402
|
},
|
|
1282
1403
|
{
|
|
1283
|
-
name:
|
|
1284
|
-
docs: [
|
|
1285
|
-
|
|
1404
|
+
"name": "collateralType";
|
|
1405
|
+
"docs": [
|
|
1406
|
+
"The type of collateral accepted for this bond"
|
|
1286
1407
|
];
|
|
1287
|
-
type: {
|
|
1288
|
-
defined: {
|
|
1289
|
-
name:
|
|
1408
|
+
"type": {
|
|
1409
|
+
"defined": {
|
|
1410
|
+
"name": "collateralType";
|
|
1290
1411
|
};
|
|
1291
1412
|
};
|
|
1292
1413
|
},
|
|
1293
1414
|
{
|
|
1294
|
-
name:
|
|
1295
|
-
docs: [
|
|
1296
|
-
|
|
1415
|
+
"name": "reserve";
|
|
1416
|
+
"docs": [
|
|
1417
|
+
"Reserve account where collateral is held"
|
|
1297
1418
|
];
|
|
1298
|
-
type:
|
|
1419
|
+
"type": "pubkey";
|
|
1299
1420
|
},
|
|
1300
1421
|
{
|
|
1301
|
-
name:
|
|
1302
|
-
docs: [
|
|
1303
|
-
|
|
1422
|
+
"name": "authority";
|
|
1423
|
+
"docs": [
|
|
1424
|
+
"Authority allowed to manage the bond configuration"
|
|
1304
1425
|
];
|
|
1305
|
-
type:
|
|
1426
|
+
"type": "pubkey";
|
|
1306
1427
|
},
|
|
1307
1428
|
{
|
|
1308
|
-
name:
|
|
1309
|
-
docs: [
|
|
1310
|
-
|
|
1429
|
+
"name": "sessionId";
|
|
1430
|
+
"docs": [
|
|
1431
|
+
"Unique identifier for the bonding session"
|
|
1311
1432
|
];
|
|
1312
|
-
type:
|
|
1433
|
+
"type": "u32";
|
|
1313
1434
|
},
|
|
1314
1435
|
{
|
|
1315
|
-
name:
|
|
1316
|
-
docs: [
|
|
1317
|
-
|
|
1436
|
+
"name": "totalMembers";
|
|
1437
|
+
"docs": [
|
|
1438
|
+
"Total number of users who have participated in the bond"
|
|
1318
1439
|
];
|
|
1319
|
-
type:
|
|
1440
|
+
"type": "u16";
|
|
1320
1441
|
},
|
|
1321
1442
|
{
|
|
1322
|
-
name:
|
|
1323
|
-
docs: [
|
|
1324
|
-
|
|
1443
|
+
"name": "totalCompensationAmount";
|
|
1444
|
+
"docs": [
|
|
1445
|
+
"Total compensation amount paid out"
|
|
1325
1446
|
];
|
|
1326
|
-
type:
|
|
1447
|
+
"type": "u64";
|
|
1327
1448
|
},
|
|
1328
1449
|
{
|
|
1329
|
-
name:
|
|
1330
|
-
docs: [
|
|
1331
|
-
|
|
1450
|
+
"name": "sessionStartTs";
|
|
1451
|
+
"docs": [
|
|
1452
|
+
"Start timestamp of the current session (unix seconds). 0 — not set."
|
|
1332
1453
|
];
|
|
1333
|
-
type:
|
|
1454
|
+
"type": "i64";
|
|
1334
1455
|
},
|
|
1335
1456
|
{
|
|
1336
|
-
name:
|
|
1337
|
-
docs: [
|
|
1338
|
-
|
|
1457
|
+
"name": "sessionFinishTs";
|
|
1458
|
+
"docs": [
|
|
1459
|
+
"Finish timestamp of the current session (unix seconds). 0 — not set."
|
|
1339
1460
|
];
|
|
1340
|
-
type:
|
|
1461
|
+
"type": "i64";
|
|
1341
1462
|
},
|
|
1342
1463
|
{
|
|
1343
|
-
name:
|
|
1344
|
-
docs: [
|
|
1345
|
-
|
|
1464
|
+
"name": "status";
|
|
1465
|
+
"docs": [
|
|
1466
|
+
"Current status of the bond"
|
|
1346
1467
|
];
|
|
1347
|
-
type: {
|
|
1348
|
-
defined: {
|
|
1349
|
-
name:
|
|
1468
|
+
"type": {
|
|
1469
|
+
"defined": {
|
|
1470
|
+
"name": "bondStatus";
|
|
1350
1471
|
};
|
|
1351
1472
|
};
|
|
1352
1473
|
},
|
|
1353
1474
|
{
|
|
1354
|
-
name:
|
|
1355
|
-
docs: [
|
|
1356
|
-
|
|
1475
|
+
"name": "bump";
|
|
1476
|
+
"docs": [
|
|
1477
|
+
"Bump for the PDA"
|
|
1357
1478
|
];
|
|
1358
|
-
type:
|
|
1479
|
+
"type": "u8";
|
|
1359
1480
|
}
|
|
1360
1481
|
];
|
|
1361
1482
|
};
|
|
1362
1483
|
},
|
|
1363
1484
|
{
|
|
1364
|
-
name:
|
|
1365
|
-
type: {
|
|
1366
|
-
kind:
|
|
1367
|
-
variants: [
|
|
1485
|
+
"name": "bondStatus";
|
|
1486
|
+
"type": {
|
|
1487
|
+
"kind": "enum";
|
|
1488
|
+
"variants": [
|
|
1368
1489
|
{
|
|
1369
|
-
name:
|
|
1490
|
+
"name": "active";
|
|
1370
1491
|
},
|
|
1371
1492
|
{
|
|
1372
|
-
name:
|
|
1493
|
+
"name": "disabled";
|
|
1373
1494
|
}
|
|
1374
1495
|
];
|
|
1375
1496
|
};
|
|
1376
1497
|
},
|
|
1377
1498
|
{
|
|
1378
|
-
name:
|
|
1379
|
-
docs: [
|
|
1380
|
-
|
|
1499
|
+
"name": "bondType";
|
|
1500
|
+
"docs": [
|
|
1501
|
+
"Types of bonds supported by the program"
|
|
1381
1502
|
];
|
|
1382
|
-
type: {
|
|
1383
|
-
kind:
|
|
1384
|
-
variants: [
|
|
1503
|
+
"type": {
|
|
1504
|
+
"kind": "enum";
|
|
1505
|
+
"variants": [
|
|
1385
1506
|
{
|
|
1386
|
-
name:
|
|
1507
|
+
"name": "standard";
|
|
1387
1508
|
},
|
|
1388
1509
|
{
|
|
1389
|
-
name:
|
|
1510
|
+
"name": "crowdfunding";
|
|
1390
1511
|
}
|
|
1391
1512
|
];
|
|
1392
1513
|
};
|
|
1393
1514
|
},
|
|
1394
1515
|
{
|
|
1395
|
-
name:
|
|
1396
|
-
type: {
|
|
1397
|
-
kind:
|
|
1398
|
-
fields: [
|
|
1516
|
+
"name": "collateralToppedUp";
|
|
1517
|
+
"type": {
|
|
1518
|
+
"kind": "struct";
|
|
1519
|
+
"fields": [
|
|
1399
1520
|
{
|
|
1400
|
-
name:
|
|
1401
|
-
type:
|
|
1521
|
+
"name": "validator";
|
|
1522
|
+
"type": "pubkey";
|
|
1402
1523
|
},
|
|
1403
1524
|
{
|
|
1404
|
-
name:
|
|
1405
|
-
type:
|
|
1525
|
+
"name": "amount";
|
|
1526
|
+
"type": "u64";
|
|
1406
1527
|
},
|
|
1407
1528
|
{
|
|
1408
|
-
name:
|
|
1409
|
-
type:
|
|
1529
|
+
"name": "postBalance";
|
|
1530
|
+
"type": "u64";
|
|
1410
1531
|
},
|
|
1411
1532
|
{
|
|
1412
|
-
name:
|
|
1413
|
-
type:
|
|
1533
|
+
"name": "timestamp";
|
|
1534
|
+
"type": "i64";
|
|
1414
1535
|
}
|
|
1415
1536
|
];
|
|
1416
1537
|
};
|
|
1417
1538
|
},
|
|
1418
1539
|
{
|
|
1419
|
-
name:
|
|
1420
|
-
docs: [
|
|
1421
|
-
|
|
1540
|
+
"name": "collateralType";
|
|
1541
|
+
"docs": [
|
|
1542
|
+
"Types of collateral that can be used for bond deposit"
|
|
1422
1543
|
];
|
|
1423
|
-
type: {
|
|
1424
|
-
kind:
|
|
1425
|
-
variants: [
|
|
1544
|
+
"type": {
|
|
1545
|
+
"kind": "enum";
|
|
1546
|
+
"variants": [
|
|
1426
1547
|
{
|
|
1427
|
-
name:
|
|
1548
|
+
"name": "native";
|
|
1428
1549
|
},
|
|
1429
1550
|
{
|
|
1430
|
-
name:
|
|
1551
|
+
"name": "stakeAccount";
|
|
1431
1552
|
},
|
|
1432
1553
|
{
|
|
1433
|
-
name:
|
|
1434
|
-
fields: [
|
|
1435
|
-
|
|
1554
|
+
"name": "token";
|
|
1555
|
+
"fields": [
|
|
1556
|
+
"pubkey"
|
|
1436
1557
|
];
|
|
1437
1558
|
}
|
|
1438
1559
|
];
|
|
1439
1560
|
};
|
|
1440
1561
|
},
|
|
1441
1562
|
{
|
|
1442
|
-
name:
|
|
1443
|
-
type: {
|
|
1444
|
-
kind:
|
|
1445
|
-
fields: [
|
|
1563
|
+
"name": "collateralWithdrawn";
|
|
1564
|
+
"type": {
|
|
1565
|
+
"kind": "struct";
|
|
1566
|
+
"fields": [
|
|
1446
1567
|
{
|
|
1447
|
-
name:
|
|
1448
|
-
type:
|
|
1568
|
+
"name": "validator";
|
|
1569
|
+
"type": "pubkey";
|
|
1449
1570
|
},
|
|
1450
1571
|
{
|
|
1451
|
-
name:
|
|
1452
|
-
type:
|
|
1572
|
+
"name": "amount";
|
|
1573
|
+
"type": "u64";
|
|
1453
1574
|
},
|
|
1454
1575
|
{
|
|
1455
|
-
name:
|
|
1456
|
-
type:
|
|
1576
|
+
"name": "postBalance";
|
|
1577
|
+
"type": "u64";
|
|
1457
1578
|
},
|
|
1458
1579
|
{
|
|
1459
|
-
name:
|
|
1460
|
-
type:
|
|
1580
|
+
"name": "timestamp";
|
|
1581
|
+
"type": "i64";
|
|
1461
1582
|
}
|
|
1462
1583
|
];
|
|
1463
1584
|
};
|
|
1464
1585
|
},
|
|
1465
1586
|
{
|
|
1466
|
-
name:
|
|
1467
|
-
type: {
|
|
1468
|
-
kind:
|
|
1469
|
-
fields: [
|
|
1587
|
+
"name": "compensationClaimed";
|
|
1588
|
+
"type": {
|
|
1589
|
+
"kind": "struct";
|
|
1590
|
+
"fields": [
|
|
1470
1591
|
{
|
|
1471
|
-
name:
|
|
1472
|
-
type:
|
|
1592
|
+
"name": "validator";
|
|
1593
|
+
"type": "pubkey";
|
|
1473
1594
|
},
|
|
1474
1595
|
{
|
|
1475
|
-
name:
|
|
1476
|
-
type:
|
|
1596
|
+
"name": "amount";
|
|
1597
|
+
"type": "u64";
|
|
1477
1598
|
},
|
|
1478
1599
|
{
|
|
1479
|
-
name:
|
|
1480
|
-
type:
|
|
1600
|
+
"name": "postBalance";
|
|
1601
|
+
"type": "u64";
|
|
1481
1602
|
},
|
|
1482
1603
|
{
|
|
1483
|
-
name:
|
|
1484
|
-
type:
|
|
1604
|
+
"name": "epoch";
|
|
1605
|
+
"type": "u64";
|
|
1485
1606
|
},
|
|
1486
1607
|
{
|
|
1487
|
-
name:
|
|
1488
|
-
type:
|
|
1608
|
+
"name": "timestamp";
|
|
1609
|
+
"type": "i64";
|
|
1489
1610
|
}
|
|
1490
1611
|
];
|
|
1491
1612
|
};
|
|
1492
1613
|
},
|
|
1493
1614
|
{
|
|
1494
|
-
name:
|
|
1495
|
-
type: {
|
|
1496
|
-
kind:
|
|
1497
|
-
fields: [
|
|
1615
|
+
"name": "globalConfigureData";
|
|
1616
|
+
"type": {
|
|
1617
|
+
"kind": "struct";
|
|
1618
|
+
"fields": [
|
|
1498
1619
|
{
|
|
1499
|
-
name:
|
|
1500
|
-
type: {
|
|
1501
|
-
option:
|
|
1620
|
+
"name": "newAuthority";
|
|
1621
|
+
"type": {
|
|
1622
|
+
"option": "pubkey";
|
|
1502
1623
|
};
|
|
1503
1624
|
}
|
|
1504
1625
|
];
|
|
1505
1626
|
};
|
|
1506
1627
|
},
|
|
1507
1628
|
{
|
|
1508
|
-
name:
|
|
1509
|
-
type: {
|
|
1510
|
-
kind:
|
|
1511
|
-
fields: [
|
|
1629
|
+
"name": "globalState";
|
|
1630
|
+
"type": {
|
|
1631
|
+
"kind": "struct";
|
|
1632
|
+
"fields": [
|
|
1512
1633
|
{
|
|
1513
|
-
name:
|
|
1514
|
-
docs: [
|
|
1515
|
-
|
|
1634
|
+
"name": "authority";
|
|
1635
|
+
"docs": [
|
|
1636
|
+
"The authority allowed to manage the program"
|
|
1516
1637
|
];
|
|
1517
|
-
type:
|
|
1638
|
+
"type": "pubkey";
|
|
1518
1639
|
},
|
|
1519
1640
|
{
|
|
1520
|
-
name:
|
|
1521
|
-
docs: [
|
|
1522
|
-
|
|
1641
|
+
"name": "bump";
|
|
1642
|
+
"docs": [
|
|
1643
|
+
"Bump for the PDA"
|
|
1523
1644
|
];
|
|
1524
|
-
type:
|
|
1645
|
+
"type": "u8";
|
|
1525
1646
|
}
|
|
1526
1647
|
];
|
|
1527
1648
|
};
|
|
1528
1649
|
},
|
|
1529
1650
|
{
|
|
1530
|
-
name:
|
|
1531
|
-
type: {
|
|
1532
|
-
kind:
|
|
1533
|
-
fields: [
|
|
1651
|
+
"name": "validatorBond";
|
|
1652
|
+
"type": {
|
|
1653
|
+
"kind": "struct";
|
|
1654
|
+
"fields": [
|
|
1534
1655
|
{
|
|
1535
|
-
name:
|
|
1536
|
-
|
|
1656
|
+
"name": "state";
|
|
1657
|
+
"docs": [
|
|
1658
|
+
"The bond state address"
|
|
1659
|
+
];
|
|
1660
|
+
"type": "pubkey";
|
|
1537
1661
|
},
|
|
1538
1662
|
{
|
|
1539
|
-
name:
|
|
1540
|
-
|
|
1663
|
+
"name": "identity";
|
|
1664
|
+
"docs": [
|
|
1665
|
+
"Validator identity pubkey"
|
|
1666
|
+
];
|
|
1667
|
+
"type": "pubkey";
|
|
1541
1668
|
},
|
|
1542
1669
|
{
|
|
1543
|
-
name:
|
|
1544
|
-
|
|
1670
|
+
"name": "voteAccount";
|
|
1671
|
+
"docs": [
|
|
1672
|
+
"Validator vote account pubkey"
|
|
1673
|
+
];
|
|
1674
|
+
"type": "pubkey";
|
|
1545
1675
|
},
|
|
1546
1676
|
{
|
|
1547
|
-
name:
|
|
1548
|
-
|
|
1677
|
+
"name": "creator";
|
|
1678
|
+
"docs": [
|
|
1679
|
+
"The bond creator pubkey"
|
|
1680
|
+
];
|
|
1681
|
+
"type": "pubkey";
|
|
1549
1682
|
},
|
|
1550
1683
|
{
|
|
1551
|
-
name:
|
|
1552
|
-
|
|
1553
|
-
|
|
1684
|
+
"name": "withdrawalAuthority";
|
|
1685
|
+
"docs": [
|
|
1686
|
+
"Optional withdrawal authority pubkey (if set, can withdraw on behalf of the validator,",
|
|
1687
|
+
"otherwise only identity can withdraw)"
|
|
1688
|
+
];
|
|
1689
|
+
"type": {
|
|
1690
|
+
"option": "pubkey";
|
|
1554
1691
|
};
|
|
1555
1692
|
},
|
|
1556
1693
|
{
|
|
1557
|
-
name:
|
|
1558
|
-
|
|
1694
|
+
"name": "createdAt";
|
|
1695
|
+
"docs": [
|
|
1696
|
+
"Bond creation timestamp"
|
|
1697
|
+
];
|
|
1698
|
+
"type": "i64";
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"name": "bump";
|
|
1702
|
+
"docs": [
|
|
1703
|
+
"Bump for the PDA"
|
|
1704
|
+
];
|
|
1705
|
+
"type": "u8";
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"name": "nextEpochLocked";
|
|
1709
|
+
"docs": [
|
|
1710
|
+
"Amount of collateral locked for the next epoch"
|
|
1711
|
+
];
|
|
1712
|
+
"type": "u64";
|
|
1559
1713
|
},
|
|
1560
1714
|
{
|
|
1561
|
-
name:
|
|
1562
|
-
|
|
1715
|
+
"name": "currentEpochLocked";
|
|
1716
|
+
"docs": [
|
|
1717
|
+
"Amount of collateral locked for the current epoch"
|
|
1718
|
+
];
|
|
1719
|
+
"type": "u64";
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "lastUpdateEpoch";
|
|
1723
|
+
"docs": [
|
|
1724
|
+
"The last epoch when the bond was updated"
|
|
1725
|
+
];
|
|
1726
|
+
"type": "u64";
|
|
1563
1727
|
}
|
|
1564
1728
|
];
|
|
1565
1729
|
};
|
|
1566
1730
|
},
|
|
1567
1731
|
{
|
|
1568
|
-
name:
|
|
1569
|
-
type: {
|
|
1570
|
-
kind:
|
|
1571
|
-
fields: [
|
|
1732
|
+
"name": "validatorRegistered";
|
|
1733
|
+
"type": {
|
|
1734
|
+
"kind": "struct";
|
|
1735
|
+
"fields": [
|
|
1572
1736
|
{
|
|
1573
|
-
name:
|
|
1574
|
-
type:
|
|
1737
|
+
"name": "identity";
|
|
1738
|
+
"type": "pubkey";
|
|
1575
1739
|
},
|
|
1576
1740
|
{
|
|
1577
|
-
name:
|
|
1578
|
-
type:
|
|
1741
|
+
"name": "voteAccount";
|
|
1742
|
+
"type": "pubkey";
|
|
1579
1743
|
},
|
|
1580
1744
|
{
|
|
1581
|
-
name:
|
|
1582
|
-
type:
|
|
1745
|
+
"name": "timestamp";
|
|
1746
|
+
"type": "i64";
|
|
1583
1747
|
}
|
|
1584
1748
|
];
|
|
1585
1749
|
};
|
|
1586
1750
|
}
|
|
1587
1751
|
];
|
|
1588
|
-
constants: [
|
|
1752
|
+
"constants": [
|
|
1589
1753
|
{
|
|
1590
|
-
name:
|
|
1591
|
-
docs: [
|
|
1592
|
-
|
|
1754
|
+
"name": "epochLockedSlotTail";
|
|
1755
|
+
"docs": [
|
|
1756
|
+
"Epoch slot index at the end of an epoch after which withdrawals are locked"
|
|
1593
1757
|
];
|
|
1594
|
-
type:
|
|
1595
|
-
value:
|
|
1758
|
+
"type": "u64";
|
|
1759
|
+
"value": "420000";
|
|
1596
1760
|
}
|
|
1597
1761
|
];
|
|
1598
1762
|
};
|
|
@@ -1664,6 +1828,28 @@ type ClaimProps = {
|
|
|
1664
1828
|
reserve?: PublicKey;
|
|
1665
1829
|
authority?: PublicKey;
|
|
1666
1830
|
};
|
|
1831
|
+
type BondLockFunds = {
|
|
1832
|
+
bondType: BondType;
|
|
1833
|
+
name: string;
|
|
1834
|
+
amount: number;
|
|
1835
|
+
withdrawAuthority: PublicKey;
|
|
1836
|
+
voteAccount: PublicKey;
|
|
1837
|
+
collateralType?: CollateralType;
|
|
1838
|
+
};
|
|
1839
|
+
type BondReleaseFunds = {
|
|
1840
|
+
bondType: BondType;
|
|
1841
|
+
name: string;
|
|
1842
|
+
amount: number;
|
|
1843
|
+
withdrawAuthority: PublicKey;
|
|
1844
|
+
voteAccount: PublicKey;
|
|
1845
|
+
};
|
|
1846
|
+
type ClaimAllProps = {
|
|
1847
|
+
bondType: BondType;
|
|
1848
|
+
name: string;
|
|
1849
|
+
collateralType?: CollateralType;
|
|
1850
|
+
reserve?: PublicKey;
|
|
1851
|
+
authority?: PublicKey;
|
|
1852
|
+
};
|
|
1667
1853
|
type GetHistoryProps = {
|
|
1668
1854
|
voteAccount: PublicKey;
|
|
1669
1855
|
options?: {
|
|
@@ -1757,7 +1943,7 @@ declare class NodeWallet implements Wallet {
|
|
|
1757
1943
|
/**
|
|
1758
1944
|
* Enum for different client environments.
|
|
1759
1945
|
*/
|
|
1760
|
-
declare enum
|
|
1946
|
+
declare enum JBondClientEnv {
|
|
1761
1947
|
DEV = "dev",
|
|
1762
1948
|
STAGE = "stage",
|
|
1763
1949
|
PROD = "prod"
|
|
@@ -1765,23 +1951,27 @@ declare enum BondClientEnv {
|
|
|
1765
1951
|
/**
|
|
1766
1952
|
* Options for configuring the JBondClient.
|
|
1767
1953
|
*/
|
|
1768
|
-
type
|
|
1954
|
+
type JBondClientOptions = {
|
|
1769
1955
|
debug?: boolean;
|
|
1770
1956
|
} & Record<string, any>;
|
|
1771
1957
|
declare class JBondClient {
|
|
1772
1958
|
readonly provider: Provider;
|
|
1773
|
-
readonly options:
|
|
1959
|
+
readonly options: JBondClientOptions;
|
|
1774
1960
|
readonly program: Program<Jbond>;
|
|
1775
|
-
constructor(provider: Provider, options?:
|
|
1961
|
+
constructor(provider: Provider, options?: JBondClientOptions);
|
|
1776
1962
|
get history(): HistoryManager;
|
|
1963
|
+
/**
|
|
1964
|
+
* Creates a local instance of `JBondClient` for development and testing.
|
|
1965
|
+
*/
|
|
1966
|
+
static local(options?: JBondClientOptions): JBondClient;
|
|
1777
1967
|
/**
|
|
1778
1968
|
* Creates an instance of `JBondClient` using a provided connection and wallet.
|
|
1779
1969
|
*/
|
|
1780
|
-
static fromWallet(connection: Connection, wallet?: Wallet, options?:
|
|
1970
|
+
static fromWallet(connection: Connection, wallet?: Wallet, options?: JBondClientOptions): JBondClient;
|
|
1781
1971
|
/**
|
|
1782
1972
|
* Creates an instance of `JBondClient` using the provided connection and keypair.
|
|
1783
1973
|
*/
|
|
1784
|
-
static fromKeypair(connection: Connection, keypair: Keypair, options?:
|
|
1974
|
+
static fromKeypair(connection: Connection, keypair: Keypair, options?: JBondClientOptions): JBondClient;
|
|
1785
1975
|
/**
|
|
1786
1976
|
* Get the current program ID.
|
|
1787
1977
|
*/
|
|
@@ -1793,11 +1983,11 @@ declare class JBondClient {
|
|
|
1793
1983
|
/**
|
|
1794
1984
|
* Set the environment.
|
|
1795
1985
|
*/
|
|
1796
|
-
env(env:
|
|
1986
|
+
env(env: JBondClientEnv): this;
|
|
1797
1987
|
/**
|
|
1798
1988
|
* Configure a specific option.
|
|
1799
1989
|
*/
|
|
1800
|
-
configure<K extends keyof
|
|
1990
|
+
configure<K extends keyof JBondClientOptions>(key: K, val: JBondClientOptions[K]): this;
|
|
1801
1991
|
/**
|
|
1802
1992
|
* Debug logging
|
|
1803
1993
|
* @param args
|
|
@@ -1832,7 +2022,7 @@ declare class JBondClient {
|
|
|
1832
2022
|
*/
|
|
1833
2023
|
withdrawCollateral(props: WithdrawCollateralProps): Promise<string | undefined>;
|
|
1834
2024
|
/**
|
|
1835
|
-
* Claim compensation
|
|
2025
|
+
* Claim compensation for a validator
|
|
1836
2026
|
*/
|
|
1837
2027
|
claimCompensation(props: ClaimProps): Promise<string | undefined>;
|
|
1838
2028
|
/**
|
|
@@ -1887,6 +2077,10 @@ declare class JBondClient {
|
|
|
1887
2077
|
* Build claim instruction
|
|
1888
2078
|
*/
|
|
1889
2079
|
getClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
|
|
2080
|
+
/**
|
|
2081
|
+
* Build claim all compensations instructions
|
|
2082
|
+
*/
|
|
2083
|
+
getClaimAllCompensationsIxs(props: ClaimAllProps): Promise<TransactionInstruction[]>;
|
|
1890
2084
|
/**
|
|
1891
2085
|
* Build set withdraw authority instruction
|
|
1892
2086
|
*/
|
|
@@ -1899,6 +2093,36 @@ declare class JBondClient {
|
|
|
1899
2093
|
* Build start crowdfunding session instruction
|
|
1900
2094
|
*/
|
|
1901
2095
|
getBondSessionStartIx(props: BondStartProps): Promise<TransactionInstruction>;
|
|
2096
|
+
lockFunds(props: BondLockFunds): Promise<string | undefined>;
|
|
2097
|
+
releaseFunds(props: BondReleaseFunds): Promise<string | undefined>;
|
|
2098
|
+
/**
|
|
2099
|
+
* Update epoch locks
|
|
2100
|
+
*/
|
|
2101
|
+
updateEpochLocks(props: {
|
|
2102
|
+
bondType: BondType;
|
|
2103
|
+
bondName: string;
|
|
2104
|
+
voteAccount: PublicKeyInitData;
|
|
2105
|
+
}): Promise<string | undefined>;
|
|
2106
|
+
/**
|
|
2107
|
+
* Build update epoch locks instruction
|
|
2108
|
+
*/
|
|
2109
|
+
getUpdateEpochLocksIx(props: {
|
|
2110
|
+
bondType: BondType;
|
|
2111
|
+
bondName: string;
|
|
2112
|
+
voteAccount: PublicKeyInitData;
|
|
2113
|
+
}): Promise<TransactionInstruction>;
|
|
2114
|
+
/**
|
|
2115
|
+
* Build lock funds instruction
|
|
2116
|
+
*/
|
|
2117
|
+
getLockFundsIx(props: BondLockFunds): Promise<TransactionInstruction>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Build release funds instruction
|
|
2120
|
+
*/
|
|
2121
|
+
getReleaseFundsIx(props: BondReleaseFunds): Promise<TransactionInstruction>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Get available collateral for withdrawal (taking into account locked funds)
|
|
2124
|
+
*/
|
|
2125
|
+
getAvailableCollateral(bondType: BondType, bondName: string, voteAccount: PublicKeyInitData): Promise<number>;
|
|
1902
2126
|
/**
|
|
1903
2127
|
* Get all bond states with total collected collateral
|
|
1904
2128
|
*/
|
|
@@ -1952,7 +2176,7 @@ declare class JBondClient {
|
|
|
1952
2176
|
bump: number;
|
|
1953
2177
|
};
|
|
1954
2178
|
stateStats: {
|
|
1955
|
-
totalCollected:
|
|
2179
|
+
totalCollected: number;
|
|
1956
2180
|
status: SessionStatus;
|
|
1957
2181
|
};
|
|
1958
2182
|
}[]>;
|
|
@@ -2026,26 +2250,37 @@ declare class JBondClient {
|
|
|
2026
2250
|
withdrawalAuthority: PublicKey | null;
|
|
2027
2251
|
createdAt: bn_js;
|
|
2028
2252
|
bump: number;
|
|
2253
|
+
nextEpochLocked: bn_js;
|
|
2254
|
+
currentEpochLocked: bn_js;
|
|
2255
|
+
lastUpdateEpoch: bn_js;
|
|
2029
2256
|
publicKey: PublicKey;
|
|
2030
2257
|
}>;
|
|
2031
2258
|
/**
|
|
2032
2259
|
* Get validator bond account balance (in SOL)
|
|
2033
2260
|
*/
|
|
2034
2261
|
getValidatorBondBalance(bondType: BondType, bondName: string, vote: PublicKeyInitData): Promise<number>;
|
|
2262
|
+
getBondStateValidatorBondBalances(bondType: BondType, bondName: string): Promise<{
|
|
2263
|
+
voteAccount: PublicKey;
|
|
2264
|
+
balance: number;
|
|
2265
|
+
}[]>;
|
|
2035
2266
|
/**
|
|
2036
2267
|
* Get total collected collateral for a bond state
|
|
2037
2268
|
*/
|
|
2038
|
-
getBondStateTotalCollected(bondType: BondType, bondName: string
|
|
2269
|
+
getBondStateTotalCollected(bondType: BondType, bondName: string): Promise<number>;
|
|
2039
2270
|
/**
|
|
2040
2271
|
* Get bond state stats
|
|
2041
2272
|
* @param state
|
|
2042
2273
|
* @private
|
|
2043
2274
|
*/
|
|
2044
2275
|
private getBondStateStats;
|
|
2276
|
+
/**
|
|
2277
|
+
* Get validator bond rent exempt amount
|
|
2278
|
+
*/
|
|
2279
|
+
private validatorBondRentExempt;
|
|
2045
2280
|
/**
|
|
2046
2281
|
* Get all validator bonds for a given bond state
|
|
2047
2282
|
*/
|
|
2048
|
-
private
|
|
2283
|
+
private getValidatorBondsForState;
|
|
2049
2284
|
/**
|
|
2050
2285
|
* Get session status for bond state
|
|
2051
2286
|
*/
|
|
@@ -2062,4 +2297,4 @@ declare const CROWDFUNDING_BOND_SEED = "crowdfunding";
|
|
|
2062
2297
|
*/
|
|
2063
2298
|
declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
2064
2299
|
|
|
2065
|
-
export { BOND_STATE_SEED,
|
|
2300
|
+
export { BOND_STATE_SEED, type BondConfigureProps, type BondFinishProps, type BondInitializeProps, type BondLockFunds, type BondReleaseFunds, type BondStartProps, type BondState, type BondStateStats, type BondStateStatus, BondTransactionType, BondType, CROWDFUNDING_BOND_SEED, type ClaimAllProps, type ClaimProps, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, GLOBAL_STATE_SEED, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JBondClientEnv, type JBondClientOptions, type Jbond, NodeWallet, type RegisterValidatorProps, STANDARD_BOND_SEED, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, VALIDATOR_BOND_SEED, type ValidatorBond, type WithdrawCollateralProps };
|