@jpool/bond-sdk 0.10.6 → 0.11.0-next.12
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 +967 -765
- package/dist/index.d.ts +967 -765
- package/dist/index.js +379 -125
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +379 -125
- 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,97 +873,23 @@ type Jbond = {
|
|
|
757
873
|
};
|
|
758
874
|
},
|
|
759
875
|
{
|
|
760
|
-
name:
|
|
761
|
-
writable: true;
|
|
762
|
-
signer: true;
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
name: 'systemProgram';
|
|
766
|
-
address: '11111111111111111111111111111111';
|
|
767
|
-
}
|
|
768
|
-
];
|
|
769
|
-
args: [];
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
name: 'migrateBond';
|
|
773
|
-
docs: [
|
|
774
|
-
'Migrates validator bond data from legacy structure to new structure.'
|
|
775
|
-
];
|
|
776
|
-
discriminator: [
|
|
777
|
-
107,
|
|
778
|
-
119,
|
|
779
|
-
59,
|
|
780
|
-
110,
|
|
781
|
-
76,
|
|
782
|
-
18,
|
|
783
|
-
37,
|
|
784
|
-
163
|
|
785
|
-
];
|
|
786
|
-
accounts: [
|
|
787
|
-
{
|
|
788
|
-
name: 'bondState';
|
|
789
|
-
writable: true;
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
name: 'legacyValidatorBond';
|
|
793
|
-
writable: true;
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
name: 'legacyVoteAccount';
|
|
797
|
-
},
|
|
798
|
-
{
|
|
799
|
-
name: 'validatorBond';
|
|
800
|
-
writable: true;
|
|
801
|
-
pda: {
|
|
802
|
-
seeds: [
|
|
803
|
-
{
|
|
804
|
-
kind: 'const';
|
|
805
|
-
value: [
|
|
806
|
-
118,
|
|
807
|
-
97,
|
|
808
|
-
108,
|
|
809
|
-
105,
|
|
810
|
-
100,
|
|
811
|
-
97,
|
|
812
|
-
116,
|
|
813
|
-
111,
|
|
814
|
-
114,
|
|
815
|
-
95,
|
|
816
|
-
98,
|
|
817
|
-
111,
|
|
818
|
-
110,
|
|
819
|
-
100
|
|
820
|
-
];
|
|
821
|
-
},
|
|
822
|
-
{
|
|
823
|
-
kind: 'account';
|
|
824
|
-
path: 'bondState';
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
kind: 'account';
|
|
828
|
-
path: 'legacyVoteAccount';
|
|
829
|
-
}
|
|
830
|
-
];
|
|
831
|
-
};
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
name: 'creator';
|
|
835
|
-
writable: true;
|
|
836
|
-
signer: true;
|
|
876
|
+
"name": "authority";
|
|
877
|
+
"writable": true;
|
|
878
|
+
"signer": true;
|
|
837
879
|
},
|
|
838
880
|
{
|
|
839
|
-
name:
|
|
840
|
-
address:
|
|
881
|
+
"name": "systemProgram";
|
|
882
|
+
"address": "11111111111111111111111111111111";
|
|
841
883
|
}
|
|
842
884
|
];
|
|
843
|
-
args: [];
|
|
885
|
+
"args": [];
|
|
844
886
|
},
|
|
845
887
|
{
|
|
846
|
-
name:
|
|
847
|
-
docs: [
|
|
848
|
-
|
|
888
|
+
"name": "sessionFinish";
|
|
889
|
+
"docs": [
|
|
890
|
+
"Finishes a bond, preventing further deposits and withdrawals."
|
|
849
891
|
];
|
|
850
|
-
discriminator: [
|
|
892
|
+
"discriminator": [
|
|
851
893
|
230,
|
|
852
894
|
209,
|
|
853
895
|
54,
|
|
@@ -857,28 +899,28 @@ type Jbond = {
|
|
|
857
899
|
137,
|
|
858
900
|
113
|
|
859
901
|
];
|
|
860
|
-
accounts: [
|
|
902
|
+
"accounts": [
|
|
861
903
|
{
|
|
862
|
-
name:
|
|
863
|
-
writable: true;
|
|
904
|
+
"name": "bondState";
|
|
905
|
+
"writable": true;
|
|
864
906
|
},
|
|
865
907
|
{
|
|
866
|
-
name:
|
|
867
|
-
writable: true;
|
|
868
|
-
signer: true;
|
|
869
|
-
relations: [
|
|
870
|
-
|
|
908
|
+
"name": "authority";
|
|
909
|
+
"writable": true;
|
|
910
|
+
"signer": true;
|
|
911
|
+
"relations": [
|
|
912
|
+
"bondState"
|
|
871
913
|
];
|
|
872
914
|
}
|
|
873
915
|
];
|
|
874
|
-
args: [];
|
|
916
|
+
"args": [];
|
|
875
917
|
},
|
|
876
918
|
{
|
|
877
|
-
name:
|
|
878
|
-
docs: [
|
|
879
|
-
|
|
919
|
+
"name": "sessionStart";
|
|
920
|
+
"docs": [
|
|
921
|
+
"Starts a paused bond, allowing deposits and withdrawals to resume."
|
|
880
922
|
];
|
|
881
|
-
discriminator: [
|
|
923
|
+
"discriminator": [
|
|
882
924
|
132,
|
|
883
925
|
93,
|
|
884
926
|
83,
|
|
@@ -888,32 +930,67 @@ type Jbond = {
|
|
|
888
930
|
58,
|
|
889
931
|
92
|
|
890
932
|
];
|
|
891
|
-
accounts: [
|
|
933
|
+
"accounts": [
|
|
892
934
|
{
|
|
893
|
-
name:
|
|
894
|
-
writable: true;
|
|
935
|
+
"name": "bondState";
|
|
936
|
+
"writable": true;
|
|
895
937
|
},
|
|
896
938
|
{
|
|
897
|
-
name:
|
|
898
|
-
writable: true;
|
|
899
|
-
signer: true;
|
|
900
|
-
relations: [
|
|
901
|
-
|
|
939
|
+
"name": "authority";
|
|
940
|
+
"writable": true;
|
|
941
|
+
"signer": true;
|
|
942
|
+
"relations": [
|
|
943
|
+
"bondState"
|
|
902
944
|
];
|
|
903
945
|
}
|
|
904
946
|
];
|
|
905
|
-
args: [
|
|
947
|
+
"args": [
|
|
906
948
|
{
|
|
907
|
-
name:
|
|
908
|
-
type:
|
|
949
|
+
"name": "durationSecs";
|
|
950
|
+
"type": "u64";
|
|
951
|
+
}
|
|
952
|
+
];
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"name": "testSetLastUpdateEpoch";
|
|
956
|
+
"docs": [
|
|
957
|
+
"NOTE!: This instruction is for testing purposes only.",
|
|
958
|
+
"It allows direct manipulation of the validator bond's last epoch update.",
|
|
959
|
+
"This should not be used in production environments."
|
|
960
|
+
];
|
|
961
|
+
"discriminator": [
|
|
962
|
+
215,
|
|
963
|
+
125,
|
|
964
|
+
32,
|
|
965
|
+
8,
|
|
966
|
+
43,
|
|
967
|
+
106,
|
|
968
|
+
194,
|
|
969
|
+
221
|
|
970
|
+
];
|
|
971
|
+
"accounts": [
|
|
972
|
+
{
|
|
973
|
+
"name": "validatorBond";
|
|
974
|
+
"writable": true;
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "payer";
|
|
978
|
+
"writable": true;
|
|
979
|
+
"signer": true;
|
|
980
|
+
}
|
|
981
|
+
];
|
|
982
|
+
"args": [
|
|
983
|
+
{
|
|
984
|
+
"name": "epoch";
|
|
985
|
+
"type": "u64";
|
|
909
986
|
}
|
|
910
987
|
];
|
|
911
988
|
}
|
|
912
989
|
];
|
|
913
|
-
accounts: [
|
|
990
|
+
"accounts": [
|
|
914
991
|
{
|
|
915
|
-
name:
|
|
916
|
-
discriminator: [
|
|
992
|
+
"name": "bondState";
|
|
993
|
+
"discriminator": [
|
|
917
994
|
251,
|
|
918
995
|
95,
|
|
919
996
|
76,
|
|
@@ -925,8 +1002,8 @@ type Jbond = {
|
|
|
925
1002
|
];
|
|
926
1003
|
},
|
|
927
1004
|
{
|
|
928
|
-
name:
|
|
929
|
-
discriminator: [
|
|
1005
|
+
"name": "globalState";
|
|
1006
|
+
"discriminator": [
|
|
930
1007
|
163,
|
|
931
1008
|
46,
|
|
932
1009
|
74,
|
|
@@ -938,8 +1015,8 @@ type Jbond = {
|
|
|
938
1015
|
];
|
|
939
1016
|
},
|
|
940
1017
|
{
|
|
941
|
-
name:
|
|
942
|
-
discriminator: [
|
|
1018
|
+
"name": "validatorBond";
|
|
1019
|
+
"discriminator": [
|
|
943
1020
|
82,
|
|
944
1021
|
127,
|
|
945
1022
|
243,
|
|
@@ -951,10 +1028,10 @@ type Jbond = {
|
|
|
951
1028
|
];
|
|
952
1029
|
}
|
|
953
1030
|
];
|
|
954
|
-
events: [
|
|
1031
|
+
"events": [
|
|
955
1032
|
{
|
|
956
|
-
name:
|
|
957
|
-
discriminator: [
|
|
1033
|
+
"name": "bondFinished";
|
|
1034
|
+
"discriminator": [
|
|
958
1035
|
223,
|
|
959
1036
|
254,
|
|
960
1037
|
3,
|
|
@@ -966,8 +1043,8 @@ type Jbond = {
|
|
|
966
1043
|
];
|
|
967
1044
|
},
|
|
968
1045
|
{
|
|
969
|
-
name:
|
|
970
|
-
discriminator: [
|
|
1046
|
+
"name": "bondStarted";
|
|
1047
|
+
"discriminator": [
|
|
971
1048
|
235,
|
|
972
1049
|
69,
|
|
973
1050
|
80,
|
|
@@ -979,8 +1056,8 @@ type Jbond = {
|
|
|
979
1056
|
];
|
|
980
1057
|
},
|
|
981
1058
|
{
|
|
982
|
-
name:
|
|
983
|
-
discriminator: [
|
|
1059
|
+
"name": "collateralToppedUp";
|
|
1060
|
+
"discriminator": [
|
|
984
1061
|
189,
|
|
985
1062
|
137,
|
|
986
1063
|
204,
|
|
@@ -992,8 +1069,8 @@ type Jbond = {
|
|
|
992
1069
|
];
|
|
993
1070
|
},
|
|
994
1071
|
{
|
|
995
|
-
name:
|
|
996
|
-
discriminator: [
|
|
1072
|
+
"name": "collateralWithdrawn";
|
|
1073
|
+
"discriminator": [
|
|
997
1074
|
51,
|
|
998
1075
|
224,
|
|
999
1076
|
133,
|
|
@@ -1005,8 +1082,8 @@ type Jbond = {
|
|
|
1005
1082
|
];
|
|
1006
1083
|
},
|
|
1007
1084
|
{
|
|
1008
|
-
name:
|
|
1009
|
-
discriminator: [
|
|
1085
|
+
"name": "compensationClaimed";
|
|
1086
|
+
"discriminator": [
|
|
1010
1087
|
36,
|
|
1011
1088
|
159,
|
|
1012
1089
|
41,
|
|
@@ -1018,8 +1095,8 @@ type Jbond = {
|
|
|
1018
1095
|
];
|
|
1019
1096
|
},
|
|
1020
1097
|
{
|
|
1021
|
-
name:
|
|
1022
|
-
discriminator: [
|
|
1098
|
+
"name": "validatorRegistered";
|
|
1099
|
+
"discriminator": [
|
|
1023
1100
|
20,
|
|
1024
1101
|
20,
|
|
1025
1102
|
190,
|
|
@@ -1031,208 +1108,213 @@ type Jbond = {
|
|
|
1031
1108
|
];
|
|
1032
1109
|
}
|
|
1033
1110
|
];
|
|
1034
|
-
errors: [
|
|
1111
|
+
"errors": [
|
|
1035
1112
|
{
|
|
1036
|
-
code: 6000;
|
|
1037
|
-
name:
|
|
1038
|
-
msg:
|
|
1113
|
+
"code": 6000;
|
|
1114
|
+
"name": "invalidVoteAccount";
|
|
1115
|
+
"msg": "Invalid vote account";
|
|
1039
1116
|
},
|
|
1040
1117
|
{
|
|
1041
|
-
code: 6001;
|
|
1042
|
-
name:
|
|
1043
|
-
msg:
|
|
1118
|
+
"code": 6001;
|
|
1119
|
+
"name": "identityMismatch";
|
|
1120
|
+
"msg": "Identity does not match vote account";
|
|
1044
1121
|
},
|
|
1045
1122
|
{
|
|
1046
|
-
code: 6002;
|
|
1047
|
-
name:
|
|
1048
|
-
msg:
|
|
1123
|
+
"code": 6002;
|
|
1124
|
+
"name": "insufficientCollateral";
|
|
1125
|
+
"msg": "Insufficient collateral amount";
|
|
1049
1126
|
},
|
|
1050
1127
|
{
|
|
1051
|
-
code: 6003;
|
|
1052
|
-
name:
|
|
1053
|
-
msg:
|
|
1128
|
+
"code": 6003;
|
|
1129
|
+
"name": "targetAprTooLow";
|
|
1130
|
+
"msg": "Target APR is below minimum threshold";
|
|
1054
1131
|
},
|
|
1055
1132
|
{
|
|
1056
|
-
code: 6004;
|
|
1057
|
-
name:
|
|
1058
|
-
msg:
|
|
1133
|
+
"code": 6004;
|
|
1134
|
+
"name": "mathOverflow";
|
|
1135
|
+
"msg": "Math overflow";
|
|
1059
1136
|
},
|
|
1060
1137
|
{
|
|
1061
|
-
code: 6005;
|
|
1062
|
-
name:
|
|
1063
|
-
msg:
|
|
1138
|
+
"code": 6005;
|
|
1139
|
+
"name": "invalidAmount";
|
|
1140
|
+
"msg": "Invalid amount";
|
|
1064
1141
|
},
|
|
1065
1142
|
{
|
|
1066
|
-
code: 6006;
|
|
1067
|
-
name:
|
|
1068
|
-
msg:
|
|
1143
|
+
"code": 6006;
|
|
1144
|
+
"name": "validatorNotActive";
|
|
1145
|
+
"msg": "Validator bond account is not active";
|
|
1069
1146
|
},
|
|
1070
1147
|
{
|
|
1071
|
-
code: 6007;
|
|
1072
|
-
name:
|
|
1073
|
-
msg:
|
|
1148
|
+
"code": 6007;
|
|
1149
|
+
"name": "validatorAlreadyRegistered";
|
|
1150
|
+
"msg": "Validator already registered";
|
|
1074
1151
|
},
|
|
1075
1152
|
{
|
|
1076
|
-
code: 6008;
|
|
1077
|
-
name:
|
|
1078
|
-
msg:
|
|
1153
|
+
"code": 6008;
|
|
1154
|
+
"name": "unauthorized";
|
|
1155
|
+
"msg": "unauthorized";
|
|
1079
1156
|
},
|
|
1080
1157
|
{
|
|
1081
|
-
code: 6009;
|
|
1082
|
-
name:
|
|
1083
|
-
msg:
|
|
1158
|
+
"code": 6009;
|
|
1159
|
+
"name": "withdrawalLockedNearEpochEnd";
|
|
1160
|
+
"msg": "Withdrawals are locked near the end of the epoch.";
|
|
1084
1161
|
},
|
|
1085
1162
|
{
|
|
1086
|
-
code: 6010;
|
|
1087
|
-
name:
|
|
1088
|
-
msg:
|
|
1163
|
+
"code": 6010;
|
|
1164
|
+
"name": "missingTokenAccounts";
|
|
1165
|
+
"msg": "Missing token accounts for token collateral type";
|
|
1089
1166
|
},
|
|
1090
1167
|
{
|
|
1091
|
-
code: 6011;
|
|
1092
|
-
name:
|
|
1093
|
-
msg:
|
|
1168
|
+
"code": 6011;
|
|
1169
|
+
"name": "missingTokenProgram";
|
|
1170
|
+
"msg": "Token program is required for token collateral type";
|
|
1094
1171
|
},
|
|
1095
1172
|
{
|
|
1096
|
-
code: 6012;
|
|
1097
|
-
name:
|
|
1098
|
-
msg:
|
|
1173
|
+
"code": 6012;
|
|
1174
|
+
"name": "invalidMint";
|
|
1175
|
+
"msg": "Invalid mint for token collateral type";
|
|
1099
1176
|
},
|
|
1100
1177
|
{
|
|
1101
|
-
code: 6013;
|
|
1102
|
-
name:
|
|
1103
|
-
msg:
|
|
1178
|
+
"code": 6013;
|
|
1179
|
+
"name": "missingStakeAccount";
|
|
1180
|
+
"msg": "Stake account is required for stake account collateral type";
|
|
1104
1181
|
},
|
|
1105
1182
|
{
|
|
1106
|
-
code: 6014;
|
|
1107
|
-
name:
|
|
1108
|
-
msg:
|
|
1183
|
+
"code": 6014;
|
|
1184
|
+
"name": "missingStakeProgram";
|
|
1185
|
+
"msg": "Stake program is required for stake account collateral type";
|
|
1109
1186
|
},
|
|
1110
1187
|
{
|
|
1111
|
-
code: 6015;
|
|
1112
|
-
name:
|
|
1113
|
-
msg:
|
|
1188
|
+
"code": 6015;
|
|
1189
|
+
"name": "bondFinished";
|
|
1190
|
+
"msg": "Bond is finished (deposits/withdrawals disabled)";
|
|
1114
1191
|
},
|
|
1115
1192
|
{
|
|
1116
|
-
code: 6016;
|
|
1117
|
-
name:
|
|
1118
|
-
msg:
|
|
1193
|
+
"code": 6016;
|
|
1194
|
+
"name": "bondNotFinished";
|
|
1195
|
+
"msg": "Bond is not finished";
|
|
1119
1196
|
},
|
|
1120
1197
|
{
|
|
1121
|
-
code: 6017;
|
|
1122
|
-
name:
|
|
1123
|
-
msg:
|
|
1198
|
+
"code": 6017;
|
|
1199
|
+
"name": "unsupportedCollateralType";
|
|
1200
|
+
"msg": "Unsupported collateral type";
|
|
1124
1201
|
},
|
|
1125
1202
|
{
|
|
1126
|
-
code: 6018;
|
|
1127
|
-
name:
|
|
1128
|
-
msg:
|
|
1203
|
+
"code": 6018;
|
|
1204
|
+
"name": "overflow";
|
|
1205
|
+
"msg": "Math operation overflowed";
|
|
1129
1206
|
},
|
|
1130
1207
|
{
|
|
1131
|
-
code: 6019;
|
|
1132
|
-
name:
|
|
1133
|
-
msg:
|
|
1208
|
+
"code": 6019;
|
|
1209
|
+
"name": "incorrectBondType";
|
|
1210
|
+
"msg": "Incorrect bond type for this operation";
|
|
1134
1211
|
},
|
|
1135
1212
|
{
|
|
1136
|
-
code: 6020;
|
|
1137
|
-
name:
|
|
1138
|
-
msg:
|
|
1213
|
+
"code": 6020;
|
|
1214
|
+
"name": "bondNotFinishable";
|
|
1215
|
+
"msg": "This bond type can't be finished";
|
|
1139
1216
|
},
|
|
1140
1217
|
{
|
|
1141
|
-
code: 6021;
|
|
1142
|
-
name:
|
|
1143
|
-
msg:
|
|
1218
|
+
"code": 6021;
|
|
1219
|
+
"name": "invalidArgument";
|
|
1220
|
+
"msg": "Invalid argument provided";
|
|
1144
1221
|
},
|
|
1145
1222
|
{
|
|
1146
|
-
code: 6022;
|
|
1147
|
-
name:
|
|
1148
|
-
msg:
|
|
1223
|
+
"code": 6022;
|
|
1224
|
+
"name": "bondNotDisabled";
|
|
1225
|
+
"msg": "Bond is not disabled";
|
|
1149
1226
|
},
|
|
1150
1227
|
{
|
|
1151
|
-
code: 6023;
|
|
1152
|
-
name:
|
|
1153
|
-
msg:
|
|
1228
|
+
"code": 6023;
|
|
1229
|
+
"name": "bondNotEnabled";
|
|
1230
|
+
"msg": "Bond is not enabled";
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"code": 6024;
|
|
1234
|
+
"name": "invalidEpoch";
|
|
1235
|
+
"msg": "Invalid epoch for this operation";
|
|
1154
1236
|
}
|
|
1155
1237
|
];
|
|
1156
|
-
types: [
|
|
1238
|
+
"types": [
|
|
1157
1239
|
{
|
|
1158
|
-
name:
|
|
1159
|
-
type: {
|
|
1160
|
-
kind:
|
|
1161
|
-
fields: [
|
|
1240
|
+
"name": "bondConfigureData";
|
|
1241
|
+
"type": {
|
|
1242
|
+
"kind": "struct";
|
|
1243
|
+
"fields": [
|
|
1162
1244
|
{
|
|
1163
|
-
name:
|
|
1164
|
-
type: {
|
|
1165
|
-
option: {
|
|
1166
|
-
defined: {
|
|
1167
|
-
name:
|
|
1245
|
+
"name": "status";
|
|
1246
|
+
"type": {
|
|
1247
|
+
"option": {
|
|
1248
|
+
"defined": {
|
|
1249
|
+
"name": "bondStatus";
|
|
1168
1250
|
};
|
|
1169
1251
|
};
|
|
1170
1252
|
};
|
|
1171
1253
|
},
|
|
1172
1254
|
{
|
|
1173
|
-
name:
|
|
1174
|
-
type: {
|
|
1175
|
-
option:
|
|
1255
|
+
"name": "newReserve";
|
|
1256
|
+
"type": {
|
|
1257
|
+
"option": "pubkey";
|
|
1176
1258
|
};
|
|
1177
1259
|
},
|
|
1178
1260
|
{
|
|
1179
|
-
name:
|
|
1180
|
-
type: {
|
|
1181
|
-
option:
|
|
1261
|
+
"name": "newAuthority";
|
|
1262
|
+
"type": {
|
|
1263
|
+
"option": "pubkey";
|
|
1182
1264
|
};
|
|
1183
1265
|
}
|
|
1184
1266
|
];
|
|
1185
1267
|
};
|
|
1186
1268
|
},
|
|
1187
1269
|
{
|
|
1188
|
-
name:
|
|
1189
|
-
type: {
|
|
1190
|
-
kind:
|
|
1191
|
-
fields: [
|
|
1270
|
+
"name": "bondFinished";
|
|
1271
|
+
"type": {
|
|
1272
|
+
"kind": "struct";
|
|
1273
|
+
"fields": [
|
|
1192
1274
|
{
|
|
1193
|
-
name:
|
|
1194
|
-
type:
|
|
1275
|
+
"name": "bond";
|
|
1276
|
+
"type": "pubkey";
|
|
1195
1277
|
},
|
|
1196
1278
|
{
|
|
1197
|
-
name:
|
|
1198
|
-
type:
|
|
1279
|
+
"name": "authority";
|
|
1280
|
+
"type": "pubkey";
|
|
1199
1281
|
},
|
|
1200
1282
|
{
|
|
1201
|
-
name:
|
|
1202
|
-
type:
|
|
1283
|
+
"name": "timestamp";
|
|
1284
|
+
"type": "i64";
|
|
1203
1285
|
}
|
|
1204
1286
|
];
|
|
1205
1287
|
};
|
|
1206
1288
|
},
|
|
1207
1289
|
{
|
|
1208
|
-
name:
|
|
1209
|
-
docs: [
|
|
1210
|
-
|
|
1290
|
+
"name": "bondInitializeData";
|
|
1291
|
+
"docs": [
|
|
1292
|
+
"Data required to initialize a performance bond"
|
|
1211
1293
|
];
|
|
1212
|
-
type: {
|
|
1213
|
-
kind:
|
|
1214
|
-
fields: [
|
|
1294
|
+
"type": {
|
|
1295
|
+
"kind": "struct";
|
|
1296
|
+
"fields": [
|
|
1215
1297
|
{
|
|
1216
|
-
name:
|
|
1217
|
-
type:
|
|
1298
|
+
"name": "name";
|
|
1299
|
+
"type": "string";
|
|
1218
1300
|
},
|
|
1219
1301
|
{
|
|
1220
|
-
name:
|
|
1221
|
-
type: {
|
|
1222
|
-
defined: {
|
|
1223
|
-
name:
|
|
1302
|
+
"name": "bondType";
|
|
1303
|
+
"type": {
|
|
1304
|
+
"defined": {
|
|
1305
|
+
"name": "bondType";
|
|
1224
1306
|
};
|
|
1225
1307
|
};
|
|
1226
1308
|
},
|
|
1227
1309
|
{
|
|
1228
|
-
name:
|
|
1229
|
-
type:
|
|
1310
|
+
"name": "reserve";
|
|
1311
|
+
"type": "pubkey";
|
|
1230
1312
|
},
|
|
1231
1313
|
{
|
|
1232
|
-
name:
|
|
1233
|
-
type: {
|
|
1234
|
-
defined: {
|
|
1235
|
-
name:
|
|
1314
|
+
"name": "collateralType";
|
|
1315
|
+
"type": {
|
|
1316
|
+
"defined": {
|
|
1317
|
+
"name": "collateralType";
|
|
1236
1318
|
};
|
|
1237
1319
|
};
|
|
1238
1320
|
}
|
|
@@ -1240,359 +1322,402 @@ type Jbond = {
|
|
|
1240
1322
|
};
|
|
1241
1323
|
},
|
|
1242
1324
|
{
|
|
1243
|
-
name:
|
|
1244
|
-
type: {
|
|
1245
|
-
kind:
|
|
1246
|
-
fields: [
|
|
1325
|
+
"name": "bondStarted";
|
|
1326
|
+
"type": {
|
|
1327
|
+
"kind": "struct";
|
|
1328
|
+
"fields": [
|
|
1247
1329
|
{
|
|
1248
|
-
name:
|
|
1249
|
-
type:
|
|
1330
|
+
"name": "bond";
|
|
1331
|
+
"type": "pubkey";
|
|
1250
1332
|
},
|
|
1251
1333
|
{
|
|
1252
|
-
name:
|
|
1253
|
-
type:
|
|
1334
|
+
"name": "authority";
|
|
1335
|
+
"type": "pubkey";
|
|
1254
1336
|
},
|
|
1255
1337
|
{
|
|
1256
|
-
name:
|
|
1257
|
-
type:
|
|
1338
|
+
"name": "timestamp";
|
|
1339
|
+
"type": "i64";
|
|
1258
1340
|
}
|
|
1259
1341
|
];
|
|
1260
1342
|
};
|
|
1261
1343
|
},
|
|
1262
1344
|
{
|
|
1263
|
-
name:
|
|
1264
|
-
type: {
|
|
1265
|
-
kind:
|
|
1266
|
-
fields: [
|
|
1345
|
+
"name": "bondState";
|
|
1346
|
+
"type": {
|
|
1347
|
+
"kind": "struct";
|
|
1348
|
+
"fields": [
|
|
1267
1349
|
{
|
|
1268
|
-
name:
|
|
1269
|
-
type:
|
|
1350
|
+
"name": "name";
|
|
1351
|
+
"type": "string";
|
|
1270
1352
|
},
|
|
1271
1353
|
{
|
|
1272
|
-
name:
|
|
1273
|
-
docs: [
|
|
1274
|
-
|
|
1354
|
+
"name": "bondType";
|
|
1355
|
+
"docs": [
|
|
1356
|
+
"The type of bond (e.g., Standard, Crowdfunding)"
|
|
1275
1357
|
];
|
|
1276
|
-
type: {
|
|
1277
|
-
defined: {
|
|
1278
|
-
name:
|
|
1358
|
+
"type": {
|
|
1359
|
+
"defined": {
|
|
1360
|
+
"name": "bondType";
|
|
1279
1361
|
};
|
|
1280
1362
|
};
|
|
1281
1363
|
},
|
|
1282
1364
|
{
|
|
1283
|
-
name:
|
|
1284
|
-
docs: [
|
|
1285
|
-
|
|
1365
|
+
"name": "collateralType";
|
|
1366
|
+
"docs": [
|
|
1367
|
+
"The type of collateral accepted for this bond"
|
|
1286
1368
|
];
|
|
1287
|
-
type: {
|
|
1288
|
-
defined: {
|
|
1289
|
-
name:
|
|
1369
|
+
"type": {
|
|
1370
|
+
"defined": {
|
|
1371
|
+
"name": "collateralType";
|
|
1290
1372
|
};
|
|
1291
1373
|
};
|
|
1292
1374
|
},
|
|
1293
1375
|
{
|
|
1294
|
-
name:
|
|
1295
|
-
docs: [
|
|
1296
|
-
|
|
1376
|
+
"name": "reserve";
|
|
1377
|
+
"docs": [
|
|
1378
|
+
"Reserve account where collateral is held"
|
|
1297
1379
|
];
|
|
1298
|
-
type:
|
|
1380
|
+
"type": "pubkey";
|
|
1299
1381
|
},
|
|
1300
1382
|
{
|
|
1301
|
-
name:
|
|
1302
|
-
docs: [
|
|
1303
|
-
|
|
1383
|
+
"name": "authority";
|
|
1384
|
+
"docs": [
|
|
1385
|
+
"Authority allowed to manage the bond configuration"
|
|
1304
1386
|
];
|
|
1305
|
-
type:
|
|
1387
|
+
"type": "pubkey";
|
|
1306
1388
|
},
|
|
1307
1389
|
{
|
|
1308
|
-
name:
|
|
1309
|
-
docs: [
|
|
1310
|
-
|
|
1390
|
+
"name": "sessionId";
|
|
1391
|
+
"docs": [
|
|
1392
|
+
"Unique identifier for the bonding session"
|
|
1311
1393
|
];
|
|
1312
|
-
type:
|
|
1394
|
+
"type": "u32";
|
|
1313
1395
|
},
|
|
1314
1396
|
{
|
|
1315
|
-
name:
|
|
1316
|
-
docs: [
|
|
1317
|
-
|
|
1397
|
+
"name": "totalMembers";
|
|
1398
|
+
"docs": [
|
|
1399
|
+
"Total number of users who have participated in the bond"
|
|
1318
1400
|
];
|
|
1319
|
-
type:
|
|
1401
|
+
"type": "u16";
|
|
1320
1402
|
},
|
|
1321
1403
|
{
|
|
1322
|
-
name:
|
|
1323
|
-
docs: [
|
|
1324
|
-
|
|
1404
|
+
"name": "totalCompensationAmount";
|
|
1405
|
+
"docs": [
|
|
1406
|
+
"Total compensation amount paid out"
|
|
1325
1407
|
];
|
|
1326
|
-
type:
|
|
1408
|
+
"type": "u64";
|
|
1327
1409
|
},
|
|
1328
1410
|
{
|
|
1329
|
-
name:
|
|
1330
|
-
docs: [
|
|
1331
|
-
|
|
1411
|
+
"name": "sessionStartTs";
|
|
1412
|
+
"docs": [
|
|
1413
|
+
"Start timestamp of the current session (unix seconds). 0 — not set."
|
|
1332
1414
|
];
|
|
1333
|
-
type:
|
|
1415
|
+
"type": "i64";
|
|
1334
1416
|
},
|
|
1335
1417
|
{
|
|
1336
|
-
name:
|
|
1337
|
-
docs: [
|
|
1338
|
-
|
|
1418
|
+
"name": "sessionFinishTs";
|
|
1419
|
+
"docs": [
|
|
1420
|
+
"Finish timestamp of the current session (unix seconds). 0 — not set."
|
|
1339
1421
|
];
|
|
1340
|
-
type:
|
|
1422
|
+
"type": "i64";
|
|
1341
1423
|
},
|
|
1342
1424
|
{
|
|
1343
|
-
name:
|
|
1344
|
-
docs: [
|
|
1345
|
-
|
|
1425
|
+
"name": "status";
|
|
1426
|
+
"docs": [
|
|
1427
|
+
"Current status of the bond"
|
|
1346
1428
|
];
|
|
1347
|
-
type: {
|
|
1348
|
-
defined: {
|
|
1349
|
-
name:
|
|
1429
|
+
"type": {
|
|
1430
|
+
"defined": {
|
|
1431
|
+
"name": "bondStatus";
|
|
1350
1432
|
};
|
|
1351
1433
|
};
|
|
1352
1434
|
},
|
|
1353
1435
|
{
|
|
1354
|
-
name:
|
|
1355
|
-
docs: [
|
|
1356
|
-
|
|
1436
|
+
"name": "bump";
|
|
1437
|
+
"docs": [
|
|
1438
|
+
"Bump for the PDA"
|
|
1357
1439
|
];
|
|
1358
|
-
type:
|
|
1440
|
+
"type": "u8";
|
|
1359
1441
|
}
|
|
1360
1442
|
];
|
|
1361
1443
|
};
|
|
1362
1444
|
},
|
|
1363
1445
|
{
|
|
1364
|
-
name:
|
|
1365
|
-
type: {
|
|
1366
|
-
kind:
|
|
1367
|
-
variants: [
|
|
1446
|
+
"name": "bondStatus";
|
|
1447
|
+
"type": {
|
|
1448
|
+
"kind": "enum";
|
|
1449
|
+
"variants": [
|
|
1368
1450
|
{
|
|
1369
|
-
name:
|
|
1451
|
+
"name": "active";
|
|
1370
1452
|
},
|
|
1371
1453
|
{
|
|
1372
|
-
name:
|
|
1454
|
+
"name": "disabled";
|
|
1373
1455
|
}
|
|
1374
1456
|
];
|
|
1375
1457
|
};
|
|
1376
1458
|
},
|
|
1377
1459
|
{
|
|
1378
|
-
name:
|
|
1379
|
-
docs: [
|
|
1380
|
-
|
|
1460
|
+
"name": "bondType";
|
|
1461
|
+
"docs": [
|
|
1462
|
+
"Types of bonds supported by the program"
|
|
1381
1463
|
];
|
|
1382
|
-
type: {
|
|
1383
|
-
kind:
|
|
1384
|
-
variants: [
|
|
1464
|
+
"type": {
|
|
1465
|
+
"kind": "enum";
|
|
1466
|
+
"variants": [
|
|
1385
1467
|
{
|
|
1386
|
-
name:
|
|
1468
|
+
"name": "standard";
|
|
1387
1469
|
},
|
|
1388
1470
|
{
|
|
1389
|
-
name:
|
|
1471
|
+
"name": "crowdfunding";
|
|
1390
1472
|
}
|
|
1391
1473
|
];
|
|
1392
1474
|
};
|
|
1393
1475
|
},
|
|
1394
1476
|
{
|
|
1395
|
-
name:
|
|
1396
|
-
type: {
|
|
1397
|
-
kind:
|
|
1398
|
-
fields: [
|
|
1477
|
+
"name": "collateralToppedUp";
|
|
1478
|
+
"type": {
|
|
1479
|
+
"kind": "struct";
|
|
1480
|
+
"fields": [
|
|
1399
1481
|
{
|
|
1400
|
-
name:
|
|
1401
|
-
type:
|
|
1482
|
+
"name": "validator";
|
|
1483
|
+
"type": "pubkey";
|
|
1402
1484
|
},
|
|
1403
1485
|
{
|
|
1404
|
-
name:
|
|
1405
|
-
type:
|
|
1486
|
+
"name": "amount";
|
|
1487
|
+
"type": "u64";
|
|
1406
1488
|
},
|
|
1407
1489
|
{
|
|
1408
|
-
name:
|
|
1409
|
-
type:
|
|
1490
|
+
"name": "postBalance";
|
|
1491
|
+
"type": "u64";
|
|
1410
1492
|
},
|
|
1411
1493
|
{
|
|
1412
|
-
name:
|
|
1413
|
-
type:
|
|
1494
|
+
"name": "timestamp";
|
|
1495
|
+
"type": "i64";
|
|
1414
1496
|
}
|
|
1415
1497
|
];
|
|
1416
1498
|
};
|
|
1417
1499
|
},
|
|
1418
1500
|
{
|
|
1419
|
-
name:
|
|
1420
|
-
docs: [
|
|
1421
|
-
|
|
1501
|
+
"name": "collateralType";
|
|
1502
|
+
"docs": [
|
|
1503
|
+
"Types of collateral that can be used for bond deposit"
|
|
1422
1504
|
];
|
|
1423
|
-
type: {
|
|
1424
|
-
kind:
|
|
1425
|
-
variants: [
|
|
1505
|
+
"type": {
|
|
1506
|
+
"kind": "enum";
|
|
1507
|
+
"variants": [
|
|
1426
1508
|
{
|
|
1427
|
-
name:
|
|
1509
|
+
"name": "native";
|
|
1428
1510
|
},
|
|
1429
1511
|
{
|
|
1430
|
-
name:
|
|
1512
|
+
"name": "stakeAccount";
|
|
1431
1513
|
},
|
|
1432
1514
|
{
|
|
1433
|
-
name:
|
|
1434
|
-
fields: [
|
|
1435
|
-
|
|
1515
|
+
"name": "token";
|
|
1516
|
+
"fields": [
|
|
1517
|
+
"pubkey"
|
|
1436
1518
|
];
|
|
1437
1519
|
}
|
|
1438
1520
|
];
|
|
1439
1521
|
};
|
|
1440
1522
|
},
|
|
1441
1523
|
{
|
|
1442
|
-
name:
|
|
1443
|
-
type: {
|
|
1444
|
-
kind:
|
|
1445
|
-
fields: [
|
|
1524
|
+
"name": "collateralWithdrawn";
|
|
1525
|
+
"type": {
|
|
1526
|
+
"kind": "struct";
|
|
1527
|
+
"fields": [
|
|
1446
1528
|
{
|
|
1447
|
-
name:
|
|
1448
|
-
type:
|
|
1529
|
+
"name": "validator";
|
|
1530
|
+
"type": "pubkey";
|
|
1449
1531
|
},
|
|
1450
1532
|
{
|
|
1451
|
-
name:
|
|
1452
|
-
type:
|
|
1533
|
+
"name": "amount";
|
|
1534
|
+
"type": "u64";
|
|
1453
1535
|
},
|
|
1454
1536
|
{
|
|
1455
|
-
name:
|
|
1456
|
-
type:
|
|
1537
|
+
"name": "postBalance";
|
|
1538
|
+
"type": "u64";
|
|
1457
1539
|
},
|
|
1458
1540
|
{
|
|
1459
|
-
name:
|
|
1460
|
-
type:
|
|
1541
|
+
"name": "timestamp";
|
|
1542
|
+
"type": "i64";
|
|
1461
1543
|
}
|
|
1462
1544
|
];
|
|
1463
1545
|
};
|
|
1464
1546
|
},
|
|
1465
1547
|
{
|
|
1466
|
-
name:
|
|
1467
|
-
type: {
|
|
1468
|
-
kind:
|
|
1469
|
-
fields: [
|
|
1548
|
+
"name": "compensationClaimed";
|
|
1549
|
+
"type": {
|
|
1550
|
+
"kind": "struct";
|
|
1551
|
+
"fields": [
|
|
1470
1552
|
{
|
|
1471
|
-
name:
|
|
1472
|
-
type:
|
|
1553
|
+
"name": "validator";
|
|
1554
|
+
"type": "pubkey";
|
|
1473
1555
|
},
|
|
1474
1556
|
{
|
|
1475
|
-
name:
|
|
1476
|
-
type:
|
|
1557
|
+
"name": "amount";
|
|
1558
|
+
"type": "u64";
|
|
1477
1559
|
},
|
|
1478
1560
|
{
|
|
1479
|
-
name:
|
|
1480
|
-
type:
|
|
1561
|
+
"name": "postBalance";
|
|
1562
|
+
"type": "u64";
|
|
1481
1563
|
},
|
|
1482
1564
|
{
|
|
1483
|
-
name:
|
|
1484
|
-
type:
|
|
1565
|
+
"name": "epoch";
|
|
1566
|
+
"type": "u64";
|
|
1485
1567
|
},
|
|
1486
1568
|
{
|
|
1487
|
-
name:
|
|
1488
|
-
type:
|
|
1569
|
+
"name": "timestamp";
|
|
1570
|
+
"type": "i64";
|
|
1489
1571
|
}
|
|
1490
1572
|
];
|
|
1491
1573
|
};
|
|
1492
1574
|
},
|
|
1493
1575
|
{
|
|
1494
|
-
name:
|
|
1495
|
-
type: {
|
|
1496
|
-
kind:
|
|
1497
|
-
fields: [
|
|
1576
|
+
"name": "globalConfigureData";
|
|
1577
|
+
"type": {
|
|
1578
|
+
"kind": "struct";
|
|
1579
|
+
"fields": [
|
|
1498
1580
|
{
|
|
1499
|
-
name:
|
|
1500
|
-
type: {
|
|
1501
|
-
option:
|
|
1581
|
+
"name": "newAuthority";
|
|
1582
|
+
"type": {
|
|
1583
|
+
"option": "pubkey";
|
|
1502
1584
|
};
|
|
1503
1585
|
}
|
|
1504
1586
|
];
|
|
1505
1587
|
};
|
|
1506
1588
|
},
|
|
1507
1589
|
{
|
|
1508
|
-
name:
|
|
1509
|
-
type: {
|
|
1510
|
-
kind:
|
|
1511
|
-
fields: [
|
|
1590
|
+
"name": "globalState";
|
|
1591
|
+
"type": {
|
|
1592
|
+
"kind": "struct";
|
|
1593
|
+
"fields": [
|
|
1512
1594
|
{
|
|
1513
|
-
name:
|
|
1514
|
-
docs: [
|
|
1515
|
-
|
|
1595
|
+
"name": "authority";
|
|
1596
|
+
"docs": [
|
|
1597
|
+
"The authority allowed to manage the program"
|
|
1516
1598
|
];
|
|
1517
|
-
type:
|
|
1599
|
+
"type": "pubkey";
|
|
1518
1600
|
},
|
|
1519
1601
|
{
|
|
1520
|
-
name:
|
|
1521
|
-
docs: [
|
|
1522
|
-
|
|
1602
|
+
"name": "bump";
|
|
1603
|
+
"docs": [
|
|
1604
|
+
"Bump for the PDA"
|
|
1523
1605
|
];
|
|
1524
|
-
type:
|
|
1606
|
+
"type": "u8";
|
|
1525
1607
|
}
|
|
1526
1608
|
];
|
|
1527
1609
|
};
|
|
1528
1610
|
},
|
|
1529
1611
|
{
|
|
1530
|
-
name:
|
|
1531
|
-
type: {
|
|
1532
|
-
kind:
|
|
1533
|
-
fields: [
|
|
1612
|
+
"name": "validatorBond";
|
|
1613
|
+
"type": {
|
|
1614
|
+
"kind": "struct";
|
|
1615
|
+
"fields": [
|
|
1534
1616
|
{
|
|
1535
|
-
name:
|
|
1536
|
-
|
|
1617
|
+
"name": "state";
|
|
1618
|
+
"docs": [
|
|
1619
|
+
"The bond state address"
|
|
1620
|
+
];
|
|
1621
|
+
"type": "pubkey";
|
|
1537
1622
|
},
|
|
1538
1623
|
{
|
|
1539
|
-
name:
|
|
1540
|
-
|
|
1624
|
+
"name": "identity";
|
|
1625
|
+
"docs": [
|
|
1626
|
+
"Validator identity pubkey"
|
|
1627
|
+
];
|
|
1628
|
+
"type": "pubkey";
|
|
1541
1629
|
},
|
|
1542
1630
|
{
|
|
1543
|
-
name:
|
|
1544
|
-
|
|
1631
|
+
"name": "voteAccount";
|
|
1632
|
+
"docs": [
|
|
1633
|
+
"Validator vote account pubkey"
|
|
1634
|
+
];
|
|
1635
|
+
"type": "pubkey";
|
|
1545
1636
|
},
|
|
1546
1637
|
{
|
|
1547
|
-
name:
|
|
1548
|
-
|
|
1638
|
+
"name": "creator";
|
|
1639
|
+
"docs": [
|
|
1640
|
+
"The bond creator pubkey"
|
|
1641
|
+
];
|
|
1642
|
+
"type": "pubkey";
|
|
1549
1643
|
},
|
|
1550
1644
|
{
|
|
1551
|
-
name:
|
|
1552
|
-
|
|
1553
|
-
|
|
1645
|
+
"name": "withdrawalAuthority";
|
|
1646
|
+
"docs": [
|
|
1647
|
+
"Optional withdrawal authority pubkey (if set, can withdraw on behalf of the validator,",
|
|
1648
|
+
"otherwise only identity can withdraw)"
|
|
1649
|
+
];
|
|
1650
|
+
"type": {
|
|
1651
|
+
"option": "pubkey";
|
|
1554
1652
|
};
|
|
1555
1653
|
},
|
|
1556
1654
|
{
|
|
1557
|
-
name:
|
|
1558
|
-
|
|
1655
|
+
"name": "createdAt";
|
|
1656
|
+
"docs": [
|
|
1657
|
+
"Bond creation timestamp"
|
|
1658
|
+
];
|
|
1659
|
+
"type": "i64";
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"name": "bump";
|
|
1663
|
+
"docs": [
|
|
1664
|
+
"Bump for the PDA"
|
|
1665
|
+
];
|
|
1666
|
+
"type": "u8";
|
|
1559
1667
|
},
|
|
1560
1668
|
{
|
|
1561
|
-
name:
|
|
1562
|
-
|
|
1669
|
+
"name": "nextEpochLocked";
|
|
1670
|
+
"docs": [
|
|
1671
|
+
"Amount of collateral locked for the next epoch"
|
|
1672
|
+
];
|
|
1673
|
+
"type": "u64";
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
"name": "currentEpochLocked";
|
|
1677
|
+
"docs": [
|
|
1678
|
+
"Amount of collateral locked for the current epoch"
|
|
1679
|
+
];
|
|
1680
|
+
"type": "u64";
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"name": "lastUpdateEpoch";
|
|
1684
|
+
"docs": [
|
|
1685
|
+
"The last epoch when the bond was updated"
|
|
1686
|
+
];
|
|
1687
|
+
"type": "u64";
|
|
1563
1688
|
}
|
|
1564
1689
|
];
|
|
1565
1690
|
};
|
|
1566
1691
|
},
|
|
1567
1692
|
{
|
|
1568
|
-
name:
|
|
1569
|
-
type: {
|
|
1570
|
-
kind:
|
|
1571
|
-
fields: [
|
|
1693
|
+
"name": "validatorRegistered";
|
|
1694
|
+
"type": {
|
|
1695
|
+
"kind": "struct";
|
|
1696
|
+
"fields": [
|
|
1572
1697
|
{
|
|
1573
|
-
name:
|
|
1574
|
-
type:
|
|
1698
|
+
"name": "identity";
|
|
1699
|
+
"type": "pubkey";
|
|
1575
1700
|
},
|
|
1576
1701
|
{
|
|
1577
|
-
name:
|
|
1578
|
-
type:
|
|
1702
|
+
"name": "voteAccount";
|
|
1703
|
+
"type": "pubkey";
|
|
1579
1704
|
},
|
|
1580
1705
|
{
|
|
1581
|
-
name:
|
|
1582
|
-
type:
|
|
1706
|
+
"name": "timestamp";
|
|
1707
|
+
"type": "i64";
|
|
1583
1708
|
}
|
|
1584
1709
|
];
|
|
1585
1710
|
};
|
|
1586
1711
|
}
|
|
1587
1712
|
];
|
|
1588
|
-
constants: [
|
|
1713
|
+
"constants": [
|
|
1589
1714
|
{
|
|
1590
|
-
name:
|
|
1591
|
-
docs: [
|
|
1592
|
-
|
|
1715
|
+
"name": "epochLockedSlotTail";
|
|
1716
|
+
"docs": [
|
|
1717
|
+
"Epoch slot index at the end of an epoch after which withdrawals are locked"
|
|
1593
1718
|
];
|
|
1594
|
-
type:
|
|
1595
|
-
value:
|
|
1719
|
+
"type": "u64";
|
|
1720
|
+
"value": "420000";
|
|
1596
1721
|
}
|
|
1597
1722
|
];
|
|
1598
1723
|
};
|
|
@@ -1664,6 +1789,28 @@ type ClaimProps = {
|
|
|
1664
1789
|
reserve?: PublicKey;
|
|
1665
1790
|
authority?: PublicKey;
|
|
1666
1791
|
};
|
|
1792
|
+
type BondLockFunds = {
|
|
1793
|
+
bondType: BondType;
|
|
1794
|
+
name: string;
|
|
1795
|
+
amount: number;
|
|
1796
|
+
withdrawAuthority: PublicKey;
|
|
1797
|
+
voteAccount: PublicKey;
|
|
1798
|
+
collateralType?: CollateralType;
|
|
1799
|
+
};
|
|
1800
|
+
type BondReleaseFunds = {
|
|
1801
|
+
bondType: BondType;
|
|
1802
|
+
name: string;
|
|
1803
|
+
amount: number;
|
|
1804
|
+
withdrawAuthority: PublicKey;
|
|
1805
|
+
voteAccount: PublicKey;
|
|
1806
|
+
};
|
|
1807
|
+
type ClaimAllProps = {
|
|
1808
|
+
bondType: BondType;
|
|
1809
|
+
name: string;
|
|
1810
|
+
collateralType?: CollateralType;
|
|
1811
|
+
reserve?: PublicKey;
|
|
1812
|
+
authority?: PublicKey;
|
|
1813
|
+
};
|
|
1667
1814
|
type GetHistoryProps = {
|
|
1668
1815
|
voteAccount: PublicKey;
|
|
1669
1816
|
options?: {
|
|
@@ -1757,7 +1904,7 @@ declare class NodeWallet implements Wallet {
|
|
|
1757
1904
|
/**
|
|
1758
1905
|
* Enum for different client environments.
|
|
1759
1906
|
*/
|
|
1760
|
-
declare enum
|
|
1907
|
+
declare enum JBondClientEnv {
|
|
1761
1908
|
DEV = "dev",
|
|
1762
1909
|
STAGE = "stage",
|
|
1763
1910
|
PROD = "prod"
|
|
@@ -1765,23 +1912,27 @@ declare enum BondClientEnv {
|
|
|
1765
1912
|
/**
|
|
1766
1913
|
* Options for configuring the JBondClient.
|
|
1767
1914
|
*/
|
|
1768
|
-
type
|
|
1915
|
+
type JBondClientOptions = {
|
|
1769
1916
|
debug?: boolean;
|
|
1770
1917
|
} & Record<string, any>;
|
|
1771
1918
|
declare class JBondClient {
|
|
1772
1919
|
readonly provider: Provider;
|
|
1773
|
-
readonly options:
|
|
1920
|
+
readonly options: JBondClientOptions;
|
|
1774
1921
|
readonly program: Program<Jbond>;
|
|
1775
|
-
constructor(provider: Provider, options?:
|
|
1922
|
+
constructor(provider: Provider, options?: JBondClientOptions);
|
|
1776
1923
|
get history(): HistoryManager;
|
|
1924
|
+
/**
|
|
1925
|
+
* Creates a local instance of `JBondClient` for development and testing.
|
|
1926
|
+
*/
|
|
1927
|
+
static local(options?: JBondClientOptions): JBondClient;
|
|
1777
1928
|
/**
|
|
1778
1929
|
* Creates an instance of `JBondClient` using a provided connection and wallet.
|
|
1779
1930
|
*/
|
|
1780
|
-
static fromWallet(connection: Connection, wallet?: Wallet, options?:
|
|
1931
|
+
static fromWallet(connection: Connection, wallet?: Wallet, options?: JBondClientOptions): JBondClient;
|
|
1781
1932
|
/**
|
|
1782
1933
|
* Creates an instance of `JBondClient` using the provided connection and keypair.
|
|
1783
1934
|
*/
|
|
1784
|
-
static fromKeypair(connection: Connection, keypair: Keypair, options?:
|
|
1935
|
+
static fromKeypair(connection: Connection, keypair: Keypair, options?: JBondClientOptions): JBondClient;
|
|
1785
1936
|
/**
|
|
1786
1937
|
* Get the current program ID.
|
|
1787
1938
|
*/
|
|
@@ -1793,11 +1944,11 @@ declare class JBondClient {
|
|
|
1793
1944
|
/**
|
|
1794
1945
|
* Set the environment.
|
|
1795
1946
|
*/
|
|
1796
|
-
env(env:
|
|
1947
|
+
env(env: JBondClientEnv): this;
|
|
1797
1948
|
/**
|
|
1798
1949
|
* Configure a specific option.
|
|
1799
1950
|
*/
|
|
1800
|
-
configure<K extends keyof
|
|
1951
|
+
configure<K extends keyof JBondClientOptions>(key: K, val: JBondClientOptions[K]): this;
|
|
1801
1952
|
/**
|
|
1802
1953
|
* Debug logging
|
|
1803
1954
|
* @param args
|
|
@@ -1832,7 +1983,7 @@ declare class JBondClient {
|
|
|
1832
1983
|
*/
|
|
1833
1984
|
withdrawCollateral(props: WithdrawCollateralProps): Promise<string | undefined>;
|
|
1834
1985
|
/**
|
|
1835
|
-
* Claim compensation
|
|
1986
|
+
* Claim compensation for a validator
|
|
1836
1987
|
*/
|
|
1837
1988
|
claimCompensation(props: ClaimProps): Promise<string | undefined>;
|
|
1838
1989
|
/**
|
|
@@ -1887,6 +2038,10 @@ declare class JBondClient {
|
|
|
1887
2038
|
* Build claim instruction
|
|
1888
2039
|
*/
|
|
1889
2040
|
getClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
|
|
2041
|
+
/**
|
|
2042
|
+
* Build claim all compensations instructions
|
|
2043
|
+
*/
|
|
2044
|
+
getClaimAllCompensationsIxs(props: ClaimAllProps): Promise<TransactionInstruction[]>;
|
|
1890
2045
|
/**
|
|
1891
2046
|
* Build set withdraw authority instruction
|
|
1892
2047
|
*/
|
|
@@ -1899,6 +2054,42 @@ declare class JBondClient {
|
|
|
1899
2054
|
* Build start crowdfunding session instruction
|
|
1900
2055
|
*/
|
|
1901
2056
|
getBondSessionStartIx(props: BondStartProps): Promise<TransactionInstruction>;
|
|
2057
|
+
lockFunds(props: BondLockFunds): Promise<string | undefined>;
|
|
2058
|
+
releaseFunds(props: BondReleaseFunds): Promise<string | undefined>;
|
|
2059
|
+
/**
|
|
2060
|
+
* Update epoch locks
|
|
2061
|
+
*/
|
|
2062
|
+
updateEpochLocks(props: {
|
|
2063
|
+
bondType: BondType;
|
|
2064
|
+
bondName: string;
|
|
2065
|
+
voteAccount: PublicKeyInitData;
|
|
2066
|
+
}): Promise<string | undefined>;
|
|
2067
|
+
/**
|
|
2068
|
+
* Build update epoch locks instruction
|
|
2069
|
+
*/
|
|
2070
|
+
getUpdateEpochLocksIx(props: {
|
|
2071
|
+
bondType: BondType;
|
|
2072
|
+
bondName: string;
|
|
2073
|
+
voteAccount: PublicKeyInitData;
|
|
2074
|
+
}): Promise<TransactionInstruction>;
|
|
2075
|
+
getTestSetLastUpdateEpochIx(props: {
|
|
2076
|
+
bondType: BondType;
|
|
2077
|
+
bondName: string;
|
|
2078
|
+
voteAccount: PublicKeyInitData;
|
|
2079
|
+
epoch: number;
|
|
2080
|
+
}): Promise<TransactionInstruction>;
|
|
2081
|
+
/**
|
|
2082
|
+
* Build lock funds instruction
|
|
2083
|
+
*/
|
|
2084
|
+
getLockFundsIx(props: BondLockFunds): Promise<TransactionInstruction>;
|
|
2085
|
+
/**
|
|
2086
|
+
* Build release funds instruction
|
|
2087
|
+
*/
|
|
2088
|
+
getReleaseFundsIx(props: BondReleaseFunds): Promise<TransactionInstruction>;
|
|
2089
|
+
/**
|
|
2090
|
+
* Get available collateral for withdrawal (taking into account locked funds)
|
|
2091
|
+
*/
|
|
2092
|
+
getAvailableCollateral(bondType: BondType, bondName: string, voteAccount: PublicKeyInitData): Promise<number>;
|
|
1902
2093
|
/**
|
|
1903
2094
|
* Get all bond states with total collected collateral
|
|
1904
2095
|
*/
|
|
@@ -1952,7 +2143,7 @@ declare class JBondClient {
|
|
|
1952
2143
|
bump: number;
|
|
1953
2144
|
};
|
|
1954
2145
|
stateStats: {
|
|
1955
|
-
totalCollected:
|
|
2146
|
+
totalCollected: number;
|
|
1956
2147
|
status: SessionStatus;
|
|
1957
2148
|
};
|
|
1958
2149
|
}[]>;
|
|
@@ -2026,26 +2217,37 @@ declare class JBondClient {
|
|
|
2026
2217
|
withdrawalAuthority: PublicKey | null;
|
|
2027
2218
|
createdAt: bn_js;
|
|
2028
2219
|
bump: number;
|
|
2220
|
+
nextEpochLocked: bn_js;
|
|
2221
|
+
currentEpochLocked: bn_js;
|
|
2222
|
+
lastUpdateEpoch: bn_js;
|
|
2029
2223
|
publicKey: PublicKey;
|
|
2030
2224
|
}>;
|
|
2031
2225
|
/**
|
|
2032
2226
|
* Get validator bond account balance (in SOL)
|
|
2033
2227
|
*/
|
|
2034
2228
|
getValidatorBondBalance(bondType: BondType, bondName: string, vote: PublicKeyInitData): Promise<number>;
|
|
2229
|
+
getBondStateValidatorBondBalances(bondType: BondType, bondName: string): Promise<{
|
|
2230
|
+
voteAccount: PublicKey;
|
|
2231
|
+
balance: number;
|
|
2232
|
+
}[]>;
|
|
2035
2233
|
/**
|
|
2036
2234
|
* Get total collected collateral for a bond state
|
|
2037
2235
|
*/
|
|
2038
|
-
getBondStateTotalCollected(bondType: BondType, bondName: string
|
|
2236
|
+
getBondStateTotalCollected(bondType: BondType, bondName: string): Promise<number>;
|
|
2039
2237
|
/**
|
|
2040
2238
|
* Get bond state stats
|
|
2041
2239
|
* @param state
|
|
2042
2240
|
* @private
|
|
2043
2241
|
*/
|
|
2044
2242
|
private getBondStateStats;
|
|
2243
|
+
/**
|
|
2244
|
+
* Get validator bond rent exempt amount
|
|
2245
|
+
*/
|
|
2246
|
+
private validatorBondRentExempt;
|
|
2045
2247
|
/**
|
|
2046
2248
|
* Get all validator bonds for a given bond state
|
|
2047
2249
|
*/
|
|
2048
|
-
private
|
|
2250
|
+
private getValidatorBondsForState;
|
|
2049
2251
|
/**
|
|
2050
2252
|
* Get session status for bond state
|
|
2051
2253
|
*/
|
|
@@ -2062,4 +2264,4 @@ declare const CROWDFUNDING_BOND_SEED = "crowdfunding";
|
|
|
2062
2264
|
*/
|
|
2063
2265
|
declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
2064
2266
|
|
|
2065
|
-
export { BOND_STATE_SEED,
|
|
2267
|
+
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 };
|