@jpool/bond-sdk 0.3.0-next.3 → 0.3.0-next.5
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 +368 -364
- package/dist/index.d.ts +368 -364
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,28 +9,28 @@ import { BN, AnchorProvider, Program, Wallet as Wallet$1 } from '@coral-xyz/anch
|
|
|
9
9
|
* IDL can be found at `target/idl/jbond.json`.
|
|
10
10
|
*/
|
|
11
11
|
type Jbond = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
address: 'nWHxjhR2CxusPo2ygSduCRo7WYPcpAfc8ob4e7oU4XM';
|
|
13
|
+
metadata: {
|
|
14
|
+
name: 'jbond';
|
|
15
|
+
version: '0.1.0';
|
|
16
|
+
spec: '0.1.0';
|
|
17
|
+
description: 'Jpool Bond Program';
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
instructions: [
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
name: 'claim';
|
|
22
|
+
docs: [
|
|
23
|
+
'Claims compensation for a validator.',
|
|
24
|
+
'Transfers funds from the validator\'s bond account to reserve.',
|
|
25
|
+
'',
|
|
26
|
+
'# Arguments',
|
|
27
|
+
'* `amount` - Amount of compensation to claim (must be positive).',
|
|
28
|
+
'',
|
|
29
|
+
'# Errors',
|
|
30
|
+
'Fails if the authority is invalid, if the validator is not active,',
|
|
31
|
+
'if the amount is zero, or if there are insufficient funds.'
|
|
32
32
|
];
|
|
33
|
-
|
|
33
|
+
discriminator: [
|
|
34
34
|
62,
|
|
35
35
|
198,
|
|
36
36
|
214,
|
|
@@ -40,15 +40,15 @@ type Jbond = {
|
|
|
40
40
|
108,
|
|
41
41
|
210
|
|
42
42
|
];
|
|
43
|
-
|
|
43
|
+
accounts: [
|
|
44
44
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
name: 'globalState';
|
|
46
|
+
writable: true;
|
|
47
|
+
pda: {
|
|
48
|
+
seeds: [
|
|
49
49
|
{
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
kind: 'const';
|
|
51
|
+
value: [
|
|
52
52
|
103,
|
|
53
53
|
108,
|
|
54
54
|
111,
|
|
@@ -67,13 +67,13 @@ type Jbond = {
|
|
|
67
67
|
};
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
name: 'validatorBond';
|
|
71
|
+
writable: true;
|
|
72
|
+
pda: {
|
|
73
|
+
seeds: [
|
|
74
74
|
{
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
kind: 'const';
|
|
76
|
+
value: [
|
|
77
77
|
118,
|
|
78
78
|
97,
|
|
79
79
|
108,
|
|
@@ -91,47 +91,47 @@ type Jbond = {
|
|
|
91
91
|
];
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
kind: 'account';
|
|
95
|
+
path: 'validator_bond.vote_account';
|
|
96
|
+
account: 'validatorBond';
|
|
97
97
|
}
|
|
98
98
|
];
|
|
99
99
|
};
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
name: 'reserve';
|
|
103
|
+
writable: true;
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
name: 'authority';
|
|
107
|
+
docs: [
|
|
108
|
+
'Authority that can trigger claims'
|
|
109
109
|
];
|
|
110
|
-
|
|
110
|
+
signer: true;
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
name: 'systemProgram';
|
|
114
|
+
address: '11111111111111111111111111111111';
|
|
115
115
|
}
|
|
116
116
|
];
|
|
117
|
-
|
|
117
|
+
args: [
|
|
118
118
|
{
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
name: 'amount';
|
|
120
|
+
type: 'u64';
|
|
121
121
|
}
|
|
122
122
|
];
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
name: 'initialize';
|
|
126
|
+
docs: [
|
|
127
|
+
'Initializes the global state for the bonding program.',
|
|
128
|
+
'Sets the authority and reserve account for managing validator bonds.',
|
|
129
|
+
'',
|
|
130
|
+
'# Errors',
|
|
131
|
+
'Fails if the global state account is already initialized or if the payer lacks',
|
|
132
|
+
'sufficient funds.'
|
|
133
133
|
];
|
|
134
|
-
|
|
134
|
+
discriminator: [
|
|
135
135
|
175,
|
|
136
136
|
175,
|
|
137
137
|
109,
|
|
@@ -141,15 +141,15 @@ type Jbond = {
|
|
|
141
141
|
155,
|
|
142
142
|
237
|
|
143
143
|
];
|
|
144
|
-
|
|
144
|
+
accounts: [
|
|
145
145
|
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
name: 'globalState';
|
|
147
|
+
writable: true;
|
|
148
|
+
pda: {
|
|
149
|
+
seeds: [
|
|
150
150
|
{
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
kind: 'const';
|
|
152
|
+
value: [
|
|
153
153
|
103,
|
|
154
154
|
108,
|
|
155
155
|
111,
|
|
@@ -168,35 +168,35 @@ type Jbond = {
|
|
|
168
168
|
};
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
name: 'authority';
|
|
172
|
+
writable: true;
|
|
173
|
+
signer: true;
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
|
-
|
|
176
|
+
name: 'reserve';
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
name: 'systemProgram';
|
|
180
|
+
address: '11111111111111111111111111111111';
|
|
181
181
|
}
|
|
182
182
|
];
|
|
183
|
-
|
|
183
|
+
args: [];
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
186
|
+
name: 'register';
|
|
187
|
+
docs: [
|
|
188
|
+
'Registers a new validator with the bonding program.',
|
|
189
|
+
'Sets up the validator\'s bond account and deposits initial collateral.',
|
|
190
|
+
'',
|
|
191
|
+
'# Arguments',
|
|
192
|
+
'* `initial_collateral` - Amount of collateral to lock (must be positive).',
|
|
193
|
+
'* `withdrawal_authority` - Optional key that can withdraw collateral later.',
|
|
194
|
+
'',
|
|
195
|
+
'# Errors',
|
|
196
|
+
'Fails if the validator is already registered, if the vote account is invalid,',
|
|
197
|
+
'or if the initial collateral transfer fails.'
|
|
198
198
|
];
|
|
199
|
-
|
|
199
|
+
discriminator: [
|
|
200
200
|
211,
|
|
201
201
|
124,
|
|
202
202
|
67,
|
|
@@ -206,15 +206,15 @@ type Jbond = {
|
|
|
206
206
|
178,
|
|
207
207
|
240
|
|
208
208
|
];
|
|
209
|
-
|
|
209
|
+
accounts: [
|
|
210
210
|
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
name: 'globalState';
|
|
212
|
+
writable: true;
|
|
213
|
+
pda: {
|
|
214
|
+
seeds: [
|
|
215
215
|
{
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
kind: 'const';
|
|
217
|
+
value: [
|
|
218
218
|
103,
|
|
219
219
|
108,
|
|
220
220
|
111,
|
|
@@ -233,13 +233,13 @@ type Jbond = {
|
|
|
233
233
|
};
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
name: 'validatorBond';
|
|
237
|
+
writable: true;
|
|
238
|
+
pda: {
|
|
239
|
+
seeds: [
|
|
240
240
|
{
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
kind: 'const';
|
|
242
|
+
value: [
|
|
243
243
|
118,
|
|
244
244
|
97,
|
|
245
245
|
108,
|
|
@@ -257,57 +257,57 @@ type Jbond = {
|
|
|
257
257
|
];
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
kind: 'account';
|
|
261
|
+
path: 'voteAccount';
|
|
262
262
|
}
|
|
263
263
|
];
|
|
264
264
|
};
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
|
-
|
|
267
|
+
name: 'identity';
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
|
-
|
|
270
|
+
name: 'voteAccount';
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
name: 'creator';
|
|
274
|
+
docs: [
|
|
275
|
+
'The account creating the bond (pays for account creation and initial collateral)'
|
|
276
276
|
];
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
writable: true;
|
|
278
|
+
signer: true;
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
name: 'systemProgram';
|
|
282
|
+
address: '11111111111111111111111111111111';
|
|
283
283
|
}
|
|
284
284
|
];
|
|
285
|
-
|
|
285
|
+
args: [
|
|
286
286
|
{
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
name: 'initialCollateral';
|
|
288
|
+
type: 'u64';
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
name: 'withdrawalAuthority';
|
|
292
|
+
type: {
|
|
293
|
+
option: 'pubkey';
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
];
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
name: 'setAuthority';
|
|
300
|
+
docs: [
|
|
301
|
+
'Sets a new withdrawal authority for a validator\'s bond account.',
|
|
302
|
+
'Allows changing who can withdraw collateral in the future.',
|
|
303
|
+
'',
|
|
304
|
+
'# Arguments',
|
|
305
|
+
'* `new_authority` - Optional new authority key (None to restrict to identity).',
|
|
306
|
+
'',
|
|
307
|
+
'# Errors',
|
|
308
|
+
'Fails if the signer is not authorized to change the authority.'
|
|
309
309
|
];
|
|
310
|
-
|
|
310
|
+
discriminator: [
|
|
311
311
|
133,
|
|
312
312
|
250,
|
|
313
313
|
37,
|
|
@@ -317,15 +317,15 @@ type Jbond = {
|
|
|
317
317
|
26,
|
|
318
318
|
121
|
|
319
319
|
];
|
|
320
|
-
|
|
320
|
+
accounts: [
|
|
321
321
|
{
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
name: 'globalState';
|
|
323
|
+
writable: true;
|
|
324
|
+
pda: {
|
|
325
|
+
seeds: [
|
|
326
326
|
{
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
kind: 'const';
|
|
328
|
+
value: [
|
|
329
329
|
103,
|
|
330
330
|
108,
|
|
331
331
|
111,
|
|
@@ -344,32 +344,32 @@ type Jbond = {
|
|
|
344
344
|
};
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
name: 'authority';
|
|
348
|
+
signer: true;
|
|
349
|
+
relations: [
|
|
350
|
+
'globalState'
|
|
351
351
|
];
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
|
-
|
|
354
|
+
name: 'newAuthority';
|
|
355
355
|
}
|
|
356
356
|
];
|
|
357
|
-
|
|
357
|
+
args: [];
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
360
|
+
name: 'topUp';
|
|
361
|
+
docs: [
|
|
362
|
+
'Adds additional collateral to an existing validator\'s bond.',
|
|
363
|
+
'Increases the collateral balance, enhancing the validator\'s stake.',
|
|
364
|
+
'',
|
|
365
|
+
'# Arguments',
|
|
366
|
+
'* `amount` - Amount to add.',
|
|
367
|
+
'',
|
|
368
|
+
'# Errors',
|
|
369
|
+
'Fails if the validator is not active, if the amount is zero,',
|
|
370
|
+
'or if the transfer of funds fails.'
|
|
371
371
|
];
|
|
372
|
-
|
|
372
|
+
discriminator: [
|
|
373
373
|
236,
|
|
374
374
|
225,
|
|
375
375
|
96,
|
|
@@ -379,15 +379,15 @@ type Jbond = {
|
|
|
379
379
|
77,
|
|
380
380
|
208
|
|
381
381
|
];
|
|
382
|
-
|
|
382
|
+
accounts: [
|
|
383
383
|
{
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
384
|
+
name: 'validatorBond';
|
|
385
|
+
writable: true;
|
|
386
|
+
pda: {
|
|
387
|
+
seeds: [
|
|
388
388
|
{
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
kind: 'const';
|
|
390
|
+
value: [
|
|
391
391
|
118,
|
|
392
392
|
97,
|
|
393
393
|
108,
|
|
@@ -405,45 +405,45 @@ type Jbond = {
|
|
|
405
405
|
];
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
kind: 'account';
|
|
409
|
+
path: 'validator_bond.vote_account';
|
|
410
|
+
account: 'validatorBond';
|
|
411
411
|
}
|
|
412
412
|
];
|
|
413
413
|
};
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
name: 'payer';
|
|
417
|
+
writable: true;
|
|
418
|
+
signer: true;
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
name: 'systemProgram';
|
|
422
|
+
address: '11111111111111111111111111111111';
|
|
423
423
|
}
|
|
424
424
|
];
|
|
425
|
-
|
|
425
|
+
args: [
|
|
426
426
|
{
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
name: 'amount';
|
|
428
|
+
type: 'u64';
|
|
429
429
|
}
|
|
430
430
|
];
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
433
|
+
name: 'withdraw';
|
|
434
|
+
docs: [
|
|
435
|
+
'Withdraws collateral from a validator\'s bond.',
|
|
436
|
+
'Decreases the collateral balance, allowing the validator to reclaim funds.',
|
|
437
|
+
'',
|
|
438
|
+
'# Arguments',
|
|
439
|
+
'* `amount` - Amount to withdraw (must not exceed available balance).',
|
|
440
|
+
'',
|
|
441
|
+
'# Errors',
|
|
442
|
+
'Fails if the validator is not active, if the amount is zero,',
|
|
443
|
+
'if the withdrawal authority is invalid, or if the withdrawal would',
|
|
444
|
+
'leave insufficient collateral.'
|
|
445
445
|
];
|
|
446
|
-
|
|
446
|
+
discriminator: [
|
|
447
447
|
183,
|
|
448
448
|
18,
|
|
449
449
|
70,
|
|
@@ -453,15 +453,15 @@ type Jbond = {
|
|
|
453
453
|
161,
|
|
454
454
|
34
|
|
455
455
|
];
|
|
456
|
-
|
|
456
|
+
accounts: [
|
|
457
457
|
{
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
name: 'validatorBond';
|
|
459
|
+
writable: true;
|
|
460
|
+
pda: {
|
|
461
|
+
seeds: [
|
|
462
462
|
{
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
kind: 'const';
|
|
464
|
+
value: [
|
|
465
465
|
118,
|
|
466
466
|
97,
|
|
467
467
|
108,
|
|
@@ -479,39 +479,43 @@ type Jbond = {
|
|
|
479
479
|
];
|
|
480
480
|
},
|
|
481
481
|
{
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
482
|
+
kind: 'account';
|
|
483
|
+
path: 'validator_bond.vote_account';
|
|
484
|
+
account: 'validatorBond';
|
|
485
485
|
}
|
|
486
486
|
];
|
|
487
487
|
};
|
|
488
488
|
},
|
|
489
489
|
{
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
name: 'withdrawalAuthority';
|
|
491
|
+
writable: true;
|
|
492
|
+
signer: true;
|
|
493
493
|
},
|
|
494
494
|
{
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
name: 'destination';
|
|
496
|
+
writable: true;
|
|
497
497
|
},
|
|
498
498
|
{
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
name: 'epochSchedule';
|
|
500
|
+
address: 'SysvarEpochSchedu1e111111111111111111111111';
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'systemProgram';
|
|
504
|
+
address: '11111111111111111111111111111111';
|
|
501
505
|
}
|
|
502
506
|
];
|
|
503
|
-
|
|
507
|
+
args: [
|
|
504
508
|
{
|
|
505
|
-
|
|
506
|
-
|
|
509
|
+
name: 'amount';
|
|
510
|
+
type: 'u64';
|
|
507
511
|
}
|
|
508
512
|
];
|
|
509
513
|
}
|
|
510
514
|
];
|
|
511
|
-
|
|
515
|
+
accounts: [
|
|
512
516
|
{
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
name: 'globalState';
|
|
518
|
+
discriminator: [
|
|
515
519
|
163,
|
|
516
520
|
46,
|
|
517
521
|
74,
|
|
@@ -523,8 +527,8 @@ type Jbond = {
|
|
|
523
527
|
];
|
|
524
528
|
},
|
|
525
529
|
{
|
|
526
|
-
|
|
527
|
-
|
|
530
|
+
name: 'validatorBond';
|
|
531
|
+
discriminator: [
|
|
528
532
|
82,
|
|
529
533
|
127,
|
|
530
534
|
243,
|
|
@@ -536,10 +540,10 @@ type Jbond = {
|
|
|
536
540
|
];
|
|
537
541
|
}
|
|
538
542
|
];
|
|
539
|
-
|
|
543
|
+
events: [
|
|
540
544
|
{
|
|
541
|
-
|
|
542
|
-
|
|
545
|
+
name: 'collateralToppedUp';
|
|
546
|
+
discriminator: [
|
|
543
547
|
189,
|
|
544
548
|
137,
|
|
545
549
|
204,
|
|
@@ -551,8 +555,8 @@ type Jbond = {
|
|
|
551
555
|
];
|
|
552
556
|
},
|
|
553
557
|
{
|
|
554
|
-
|
|
555
|
-
|
|
558
|
+
name: 'collateralWithdrawn';
|
|
559
|
+
discriminator: [
|
|
556
560
|
51,
|
|
557
561
|
224,
|
|
558
562
|
133,
|
|
@@ -564,8 +568,8 @@ type Jbond = {
|
|
|
564
568
|
];
|
|
565
569
|
},
|
|
566
570
|
{
|
|
567
|
-
|
|
568
|
-
|
|
571
|
+
name: 'compensationClaimed';
|
|
572
|
+
discriminator: [
|
|
569
573
|
36,
|
|
570
574
|
159,
|
|
571
575
|
41,
|
|
@@ -577,8 +581,8 @@ type Jbond = {
|
|
|
577
581
|
];
|
|
578
582
|
},
|
|
579
583
|
{
|
|
580
|
-
|
|
581
|
-
|
|
584
|
+
name: 'validatorRegistered';
|
|
585
|
+
discriminator: [
|
|
582
586
|
20,
|
|
583
587
|
20,
|
|
584
588
|
190,
|
|
@@ -590,278 +594,278 @@ type Jbond = {
|
|
|
590
594
|
];
|
|
591
595
|
}
|
|
592
596
|
];
|
|
593
|
-
|
|
597
|
+
errors: [
|
|
594
598
|
{
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
599
|
+
code: 6000;
|
|
600
|
+
name: 'invalidVoteAccount';
|
|
601
|
+
msg: 'Invalid vote account';
|
|
598
602
|
},
|
|
599
603
|
{
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
604
|
+
code: 6001;
|
|
605
|
+
name: 'identityMismatch';
|
|
606
|
+
msg: 'Identity does not match vote account';
|
|
603
607
|
},
|
|
604
608
|
{
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
609
|
+
code: 6002;
|
|
610
|
+
name: 'insufficientCollateral';
|
|
611
|
+
msg: 'Insufficient collateral amount';
|
|
608
612
|
},
|
|
609
613
|
{
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
614
|
+
code: 6003;
|
|
615
|
+
name: 'targetAprTooLow';
|
|
616
|
+
msg: 'Target APR is below minimum threshold';
|
|
613
617
|
},
|
|
614
618
|
{
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
619
|
+
code: 6004;
|
|
620
|
+
name: 'mathOverflow';
|
|
621
|
+
msg: 'Math overflow';
|
|
618
622
|
},
|
|
619
623
|
{
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
624
|
+
code: 6005;
|
|
625
|
+
name: 'invalidAmount';
|
|
626
|
+
msg: 'Invalid amount';
|
|
623
627
|
},
|
|
624
628
|
{
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
629
|
+
code: 6006;
|
|
630
|
+
name: 'validatorNotActive';
|
|
631
|
+
msg: 'Validator boost account is not active';
|
|
628
632
|
},
|
|
629
633
|
{
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
634
|
+
code: 6007;
|
|
635
|
+
name: 'validatorAlreadyRegistered';
|
|
636
|
+
msg: 'Validator already registered';
|
|
633
637
|
},
|
|
634
638
|
{
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
639
|
+
code: 6008;
|
|
640
|
+
name: 'unauthorized';
|
|
641
|
+
msg: 'unauthorized';
|
|
638
642
|
},
|
|
639
643
|
{
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
644
|
+
code: 6009;
|
|
645
|
+
name: 'withdrawalLockedNearEpochEnd';
|
|
646
|
+
msg: 'Withdrawals are locked near the end of the epoch.';
|
|
643
647
|
}
|
|
644
648
|
];
|
|
645
|
-
|
|
649
|
+
types: [
|
|
646
650
|
{
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
+
name: 'collateralToppedUp';
|
|
652
|
+
type: {
|
|
653
|
+
kind: 'struct';
|
|
654
|
+
fields: [
|
|
651
655
|
{
|
|
652
|
-
|
|
653
|
-
|
|
656
|
+
name: 'validator';
|
|
657
|
+
type: 'pubkey';
|
|
654
658
|
},
|
|
655
659
|
{
|
|
656
|
-
|
|
657
|
-
|
|
660
|
+
name: 'amount';
|
|
661
|
+
type: 'u64';
|
|
658
662
|
},
|
|
659
663
|
{
|
|
660
|
-
|
|
661
|
-
|
|
664
|
+
name: 'postBalance';
|
|
665
|
+
type: 'u64';
|
|
662
666
|
},
|
|
663
667
|
{
|
|
664
|
-
|
|
665
|
-
|
|
668
|
+
name: 'timestamp';
|
|
669
|
+
type: 'i64';
|
|
666
670
|
}
|
|
667
671
|
];
|
|
668
672
|
};
|
|
669
673
|
},
|
|
670
674
|
{
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
name: 'collateralWithdrawn';
|
|
676
|
+
type: {
|
|
677
|
+
kind: 'struct';
|
|
678
|
+
fields: [
|
|
675
679
|
{
|
|
676
|
-
|
|
677
|
-
|
|
680
|
+
name: 'validator';
|
|
681
|
+
type: 'pubkey';
|
|
678
682
|
},
|
|
679
683
|
{
|
|
680
|
-
|
|
681
|
-
|
|
684
|
+
name: 'amount';
|
|
685
|
+
type: 'u64';
|
|
682
686
|
},
|
|
683
687
|
{
|
|
684
|
-
|
|
685
|
-
|
|
688
|
+
name: 'postBalance';
|
|
689
|
+
type: 'u64';
|
|
686
690
|
},
|
|
687
691
|
{
|
|
688
|
-
|
|
689
|
-
|
|
692
|
+
name: 'timestamp';
|
|
693
|
+
type: 'i64';
|
|
690
694
|
}
|
|
691
695
|
];
|
|
692
696
|
};
|
|
693
697
|
},
|
|
694
698
|
{
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
+
name: 'compensationClaimed';
|
|
700
|
+
type: {
|
|
701
|
+
kind: 'struct';
|
|
702
|
+
fields: [
|
|
699
703
|
{
|
|
700
|
-
|
|
701
|
-
|
|
704
|
+
name: 'validator';
|
|
705
|
+
type: 'pubkey';
|
|
702
706
|
},
|
|
703
707
|
{
|
|
704
|
-
|
|
705
|
-
|
|
708
|
+
name: 'amount';
|
|
709
|
+
type: 'u64';
|
|
706
710
|
},
|
|
707
711
|
{
|
|
708
|
-
|
|
709
|
-
|
|
712
|
+
name: 'postBalance';
|
|
713
|
+
type: 'u64';
|
|
710
714
|
},
|
|
711
715
|
{
|
|
712
|
-
|
|
713
|
-
|
|
716
|
+
name: 'epoch';
|
|
717
|
+
type: 'u64';
|
|
714
718
|
},
|
|
715
719
|
{
|
|
716
|
-
|
|
717
|
-
|
|
720
|
+
name: 'timestamp';
|
|
721
|
+
type: 'i64';
|
|
718
722
|
}
|
|
719
723
|
];
|
|
720
724
|
};
|
|
721
725
|
},
|
|
722
726
|
{
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
+
name: 'globalState';
|
|
728
|
+
type: {
|
|
729
|
+
kind: 'struct';
|
|
730
|
+
fields: [
|
|
727
731
|
{
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
732
|
+
name: 'authority';
|
|
733
|
+
docs: [
|
|
734
|
+
'The authority allowed to manage the program'
|
|
731
735
|
];
|
|
732
|
-
|
|
736
|
+
type: 'pubkey';
|
|
733
737
|
},
|
|
734
738
|
{
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
739
|
+
name: 'reserve';
|
|
740
|
+
docs: [
|
|
741
|
+
'The reserve vault holding SOL for bonding and compensation'
|
|
738
742
|
];
|
|
739
|
-
|
|
743
|
+
type: 'pubkey';
|
|
740
744
|
},
|
|
741
745
|
{
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
746
|
+
name: 'totalValidators';
|
|
747
|
+
docs: [
|
|
748
|
+
'Total number of registered validators'
|
|
745
749
|
];
|
|
746
|
-
|
|
750
|
+
type: 'u16';
|
|
747
751
|
},
|
|
748
752
|
{
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
753
|
+
name: 'totalCompensationAmount';
|
|
754
|
+
docs: [
|
|
755
|
+
'Total compensation amount paid out'
|
|
752
756
|
];
|
|
753
|
-
|
|
757
|
+
type: 'u64';
|
|
754
758
|
},
|
|
755
759
|
{
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
760
|
+
name: 'bump';
|
|
761
|
+
docs: [
|
|
762
|
+
'Bump for the PDA'
|
|
759
763
|
];
|
|
760
|
-
|
|
764
|
+
type: 'u8';
|
|
761
765
|
}
|
|
762
766
|
];
|
|
763
767
|
};
|
|
764
768
|
},
|
|
765
769
|
{
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
+
name: 'validatorBond';
|
|
771
|
+
type: {
|
|
772
|
+
kind: 'struct';
|
|
773
|
+
fields: [
|
|
770
774
|
{
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
775
|
+
name: 'identity';
|
|
776
|
+
docs: [
|
|
777
|
+
'The validator identity pubkey'
|
|
774
778
|
];
|
|
775
|
-
|
|
779
|
+
type: 'pubkey';
|
|
776
780
|
},
|
|
777
781
|
{
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
782
|
+
name: 'voteAccount';
|
|
783
|
+
docs: [
|
|
784
|
+
'The validator vote account pubkey'
|
|
781
785
|
];
|
|
782
|
-
|
|
786
|
+
type: 'pubkey';
|
|
783
787
|
},
|
|
784
788
|
{
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
789
|
+
name: 'creator';
|
|
790
|
+
docs: [
|
|
791
|
+
'Creator of the validator bond account'
|
|
788
792
|
];
|
|
789
|
-
|
|
793
|
+
type: 'pubkey';
|
|
790
794
|
},
|
|
791
795
|
{
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
796
|
+
name: 'withdrawalAuthority';
|
|
797
|
+
docs: [
|
|
798
|
+
'Authority allowed to withdraw funds (if None, only identity can withdraw)'
|
|
795
799
|
];
|
|
796
|
-
|
|
797
|
-
|
|
800
|
+
type: {
|
|
801
|
+
option: 'pubkey';
|
|
798
802
|
};
|
|
799
803
|
},
|
|
800
804
|
{
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
805
|
+
name: 'totalCompensationAmount';
|
|
806
|
+
docs: [
|
|
807
|
+
'Total compensation claimed for the validator'
|
|
804
808
|
];
|
|
805
|
-
|
|
809
|
+
type: 'u64';
|
|
806
810
|
},
|
|
807
811
|
{
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
812
|
+
name: 'lastCompensationAmount';
|
|
813
|
+
docs: [
|
|
814
|
+
'Last compensation amount claimed'
|
|
811
815
|
];
|
|
812
|
-
|
|
816
|
+
type: 'u64';
|
|
813
817
|
},
|
|
814
818
|
{
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
819
|
+
name: 'lastCompensationEpoch';
|
|
820
|
+
docs: [
|
|
821
|
+
'Last epoch when compensation was claimed'
|
|
818
822
|
];
|
|
819
|
-
|
|
823
|
+
type: 'u64';
|
|
820
824
|
},
|
|
821
825
|
{
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
826
|
+
name: 'createdAt';
|
|
827
|
+
docs: [
|
|
828
|
+
'Timestamp when the bond account was created'
|
|
825
829
|
];
|
|
826
|
-
|
|
830
|
+
type: 'i64';
|
|
827
831
|
},
|
|
828
832
|
{
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
833
|
+
name: 'isActive';
|
|
834
|
+
docs: [
|
|
835
|
+
'Whether the validator is currently active'
|
|
832
836
|
];
|
|
833
|
-
|
|
837
|
+
type: 'bool';
|
|
834
838
|
},
|
|
835
839
|
{
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
840
|
+
name: 'bump';
|
|
841
|
+
docs: [
|
|
842
|
+
'Bump for the PDA'
|
|
839
843
|
];
|
|
840
|
-
|
|
844
|
+
type: 'u8';
|
|
841
845
|
}
|
|
842
846
|
];
|
|
843
847
|
};
|
|
844
848
|
},
|
|
845
849
|
{
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
+
name: 'validatorRegistered';
|
|
851
|
+
type: {
|
|
852
|
+
kind: 'struct';
|
|
853
|
+
fields: [
|
|
850
854
|
{
|
|
851
|
-
|
|
852
|
-
|
|
855
|
+
name: 'identity';
|
|
856
|
+
type: 'pubkey';
|
|
853
857
|
},
|
|
854
858
|
{
|
|
855
|
-
|
|
856
|
-
|
|
859
|
+
name: 'voteAccount';
|
|
860
|
+
type: 'pubkey';
|
|
857
861
|
},
|
|
858
862
|
{
|
|
859
|
-
|
|
860
|
-
|
|
863
|
+
name: 'initialCollateral';
|
|
864
|
+
type: 'u64';
|
|
861
865
|
},
|
|
862
866
|
{
|
|
863
|
-
|
|
864
|
-
|
|
867
|
+
name: 'timestamp';
|
|
868
|
+
type: 'i64';
|
|
865
869
|
}
|
|
866
870
|
];
|
|
867
871
|
};
|