@streamflow/staking 7.5.3 → 8.0.0-alpha.p287.25d0c28

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.
Files changed (59) hide show
  1. package/dist/cjs/index.cjs +2988 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/cjs/index.d.cts +298 -0
  4. package/dist/cjs/solana/descriptor/fee_manager.cjs +4 -0
  5. package/dist/cjs/solana/descriptor/fee_manager.cjs.map +1 -0
  6. package/dist/cjs/solana/descriptor/fee_manager.d.cts +292 -0
  7. package/dist/cjs/solana/descriptor/reward_pool.cjs +4 -0
  8. package/dist/cjs/solana/descriptor/reward_pool.cjs.map +1 -0
  9. package/dist/cjs/solana/descriptor/reward_pool.d.cts +967 -0
  10. package/dist/cjs/solana/descriptor/stake_pool.cjs +4 -0
  11. package/dist/cjs/solana/descriptor/stake_pool.cjs.map +1 -0
  12. package/dist/cjs/solana/descriptor/stake_pool.d.cts +954 -0
  13. package/dist/esm/index.d.ts +298 -7
  14. package/dist/esm/index.js +2963 -7
  15. package/dist/esm/index.js.map +1 -0
  16. package/dist/esm/solana/descriptor/fee_manager.d.ts +3 -1
  17. package/dist/esm/solana/descriptor/fee_manager.js +3 -1
  18. package/dist/esm/solana/descriptor/fee_manager.js.map +1 -0
  19. package/dist/esm/solana/descriptor/idl/fee_manager.json +255 -407
  20. package/dist/esm/solana/descriptor/idl/reward_pool.json +853 -1296
  21. package/dist/esm/solana/descriptor/idl/stake_pool.json +875 -1247
  22. package/dist/esm/solana/descriptor/reward_pool.d.ts +3 -1
  23. package/dist/esm/solana/descriptor/reward_pool.js +3 -1
  24. package/dist/esm/solana/descriptor/reward_pool.js.map +1 -0
  25. package/dist/esm/solana/descriptor/stake_pool.d.ts +3 -1
  26. package/dist/esm/solana/descriptor/stake_pool.js +3 -1
  27. package/dist/esm/solana/descriptor/stake_pool.js.map +1 -0
  28. package/package.json +63 -18
  29. package/dist/cjs/__tests__/solana/rewards.spec.js +0 -61
  30. package/dist/cjs/index.js +0 -37
  31. package/dist/cjs/solana/client.js +0 -336
  32. package/dist/cjs/solana/constants.js +0 -72
  33. package/dist/cjs/solana/descriptor/fee_manager.js +0 -2
  34. package/dist/cjs/solana/descriptor/idl/fee_manager.json +0 -436
  35. package/dist/cjs/solana/descriptor/idl/reward_pool.json +0 -1372
  36. package/dist/cjs/solana/descriptor/idl/stake_pool.json +0 -1318
  37. package/dist/cjs/solana/descriptor/reward_pool.js +0 -2
  38. package/dist/cjs/solana/descriptor/stake_pool.js +0 -2
  39. package/dist/cjs/solana/lib/derive-accounts.js +0 -46
  40. package/dist/cjs/solana/lib/fee-amounts.js +0 -44
  41. package/dist/cjs/solana/lib/rewards.js +0 -154
  42. package/dist/cjs/solana/lib/stake-weight.js +0 -19
  43. package/dist/cjs/solana/types.js +0 -2
  44. package/dist/esm/__tests__/solana/rewards.spec.d.ts +0 -1
  45. package/dist/esm/__tests__/solana/rewards.spec.js +0 -56
  46. package/dist/esm/solana/client.d.ts +0 -89
  47. package/dist/esm/solana/client.js +0 -334
  48. package/dist/esm/solana/constants.d.ts +0 -54
  49. package/dist/esm/solana/constants.js +0 -69
  50. package/dist/esm/solana/lib/derive-accounts.d.ts +0 -10
  51. package/dist/esm/solana/lib/derive-accounts.js +0 -31
  52. package/dist/esm/solana/lib/fee-amounts.d.ts +0 -9
  53. package/dist/esm/solana/lib/fee-amounts.js +0 -38
  54. package/dist/esm/solana/lib/rewards.d.ts +0 -26
  55. package/dist/esm/solana/lib/rewards.js +0 -152
  56. package/dist/esm/solana/lib/stake-weight.d.ts +0 -2
  57. package/dist/esm/solana/lib/stake-weight.js +0 -12
  58. package/dist/esm/solana/types.d.ts +0 -77
  59. package/dist/esm/solana/types.js +0 -1
@@ -1,1318 +1,946 @@
1
1
  {
2
- "address": "STAKEvGqQTtzJZH6BWDcbpzXXn2BBerPAgQ3EGLN2GH",
3
- "metadata": {
4
- "name": "stake_pool",
5
- "version": "2.1.1",
6
- "spec": "0.1.0",
7
- "description": "Program to manage Stake Pools and stake/unstake tokens"
2
+ "address": "STAKEvGqQTtzJZH6BWDcbpzXXn2BBerPAgQ3EGLN2GH",
3
+ "metadata": {
4
+ "name": "stake_pool",
5
+ "version": "2.1.1",
6
+ "spec": "0.1.0",
7
+ "description": "Program to manage Stake Pools and stake/unstake tokens"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "change_authority",
12
+ "discriminator": [50, 106, 66, 104, 99, 118, 145, 88],
13
+ "accounts": [
14
+ {
15
+ "name": "stake_pool",
16
+ "docs": ["Stake Pool"],
17
+ "writable": true
18
+ },
19
+ {
20
+ "name": "authority",
21
+ "docs": ["Current Authority"],
22
+ "writable": true,
23
+ "signer": true
24
+ },
25
+ {
26
+ "name": "new_authority"
27
+ }
28
+ ],
29
+ "args": []
8
30
  },
9
- "instructions": [
10
- {
11
- "name": "change_authority",
12
- "discriminator": [
13
- 50,
14
- 106,
15
- 66,
16
- 104,
17
- 99,
18
- 118,
19
- 145,
20
- 88
21
- ],
22
- "accounts": [
23
- {
24
- "name": "stake_pool",
25
- "docs": [
26
- "Stake Pool"
27
- ],
28
- "writable": true
29
- },
30
- {
31
- "name": "authority",
32
- "docs": [
33
- "Current Authority"
34
- ],
35
- "writable": true,
36
- "signer": true
37
- },
38
- {
39
- "name": "new_authority"
40
- }
41
- ],
42
- "args": []
43
- },
44
- {
45
- "name": "create_lookup_table",
46
- "discriminator": [
47
- 74,
48
- 26,
49
- 45,
50
- 214,
51
- 23,
52
- 155,
53
- 143,
54
- 153
55
- ],
56
- "accounts": [
57
- {
58
- "name": "stake_pool",
59
- "docs": [
60
- "Stake Pool"
61
- ]
62
- },
63
- {
64
- "name": "lookup_table_link",
65
- "docs": [
66
- "Link that will store address of the actual Lookup Table"
67
- ],
68
- "writable": true,
69
- "pda": {
70
- "seeds": [
71
- {
72
- "kind": "const",
73
- "value": [
74
- 108,
75
- 111,
76
- 111,
77
- 107,
78
- 117,
79
- 112,
80
- 45,
81
- 116,
82
- 97,
83
- 98,
84
- 108,
85
- 101
86
- ]
87
- },
88
- {
89
- "kind": "account",
90
- "path": "stake_pool"
91
- },
92
- {
93
- "kind": "account",
94
- "path": "authority"
95
- },
96
- {
97
- "kind": "arg",
98
- "path": "nonce"
99
- }
100
- ]
101
- }
102
- },
103
- {
104
- "name": "lookup_table",
105
- "writable": true
106
- },
107
- {
108
- "name": "lookup_table_program",
109
- "address": "AddressLookupTab1e1111111111111111111111111"
110
- },
111
- {
112
- "name": "payer",
113
- "docs": [
114
- "Payer of the transaction"
115
- ],
116
- "writable": true,
117
- "signer": true
118
- },
119
- {
120
- "name": "authority"
121
- },
122
- {
123
- "name": "system_program",
124
- "address": "11111111111111111111111111111111"
125
- }
126
- ],
127
- "args": [
128
- {
129
- "name": "nonce",
130
- "type": "u32"
131
- },
132
- {
133
- "name": "recent_slot",
134
- "type": "u64"
135
- }
31
+ {
32
+ "name": "create_lookup_table",
33
+ "discriminator": [74, 26, 45, 214, 23, 155, 143, 153],
34
+ "accounts": [
35
+ {
36
+ "name": "stake_pool",
37
+ "docs": ["Stake Pool"]
38
+ },
39
+ {
40
+ "name": "lookup_table_link",
41
+ "docs": ["Link that will store address of the actual Lookup Table"],
42
+ "writable": true,
43
+ "pda": {
44
+ "seeds": [
45
+ {
46
+ "kind": "const",
47
+ "value": [108, 111, 111, 107, 117, 112, 45, 116, 97, 98, 108, 101]
48
+ },
49
+ {
50
+ "kind": "account",
51
+ "path": "stake_pool"
52
+ },
53
+ {
54
+ "kind": "account",
55
+ "path": "authority"
56
+ },
57
+ {
58
+ "kind": "arg",
59
+ "path": "nonce"
60
+ }
136
61
  ]
62
+ }
137
63
  },
138
64
  {
139
- "name": "create_pool",
140
- "discriminator": [
141
- 233,
142
- 146,
143
- 209,
144
- 142,
145
- 207,
146
- 104,
147
- 64,
148
- 188
149
- ],
150
- "accounts": [
151
- {
152
- "name": "stake_pool",
153
- "writable": true,
154
- "pda": {
155
- "seeds": [
156
- {
157
- "kind": "const",
158
- "value": [
159
- 115,
160
- 116,
161
- 97,
162
- 107,
163
- 101,
164
- 45,
165
- 112,
166
- 111,
167
- 111,
168
- 108
169
- ]
170
- },
171
- {
172
- "kind": "account",
173
- "path": "mint"
174
- },
175
- {
176
- "kind": "account",
177
- "path": "creator"
178
- },
179
- {
180
- "kind": "arg",
181
- "path": "nonce"
182
- }
183
- ]
184
- }
185
- },
186
- {
187
- "name": "mint",
188
- "docs": [
189
- "Mint used for staking"
190
- ]
191
- },
192
- {
193
- "name": "vault",
194
- "writable": true,
195
- "pda": {
196
- "seeds": [
197
- {
198
- "kind": "const",
199
- "value": [
200
- 115,
201
- 116,
202
- 97,
203
- 107,
204
- 101,
205
- 45,
206
- 118,
207
- 97,
208
- 117,
209
- 108,
210
- 116
211
- ]
212
- },
213
- {
214
- "kind": "account",
215
- "path": "stake_pool"
216
- }
217
- ]
218
- }
219
- },
220
- {
221
- "name": "stake_mint",
222
- "writable": true,
223
- "pda": {
224
- "seeds": [
225
- {
226
- "kind": "const",
227
- "value": [
228
- 115,
229
- 116,
230
- 97,
231
- 107,
232
- 101,
233
- 45,
234
- 109,
235
- 105,
236
- 110,
237
- 116
238
- ]
239
- },
240
- {
241
- "kind": "account",
242
- "path": "stake_pool"
243
- }
244
- ]
245
- }
246
- },
247
- {
248
- "name": "creator",
249
- "docs": [
250
- "Stake Pool creator"
251
- ],
252
- "writable": true,
253
- "signer": true
254
- },
255
- {
256
- "name": "token_program"
257
- },
258
- {
259
- "name": "system_program",
260
- "address": "11111111111111111111111111111111"
261
- }
262
- ],
263
- "args": [
264
- {
265
- "name": "nonce",
266
- "type": "u8"
267
- },
268
- {
269
- "name": "max_weight",
270
- "type": "u64"
271
- },
272
- {
273
- "name": "min_duration",
274
- "type": "u64"
275
- },
276
- {
277
- "name": "max_duration",
278
- "type": "u64"
279
- },
280
- {
281
- "name": "permissionless",
282
- "type": "bool"
283
- },
284
- {
285
- "name": "freeze_stake_mint",
286
- "type": {
287
- "option": "bool"
288
- }
289
- },
290
- {
291
- "name": "unstake_period",
292
- "type": {
293
- "option": "u64"
294
- }
295
- }
65
+ "name": "lookup_table",
66
+ "writable": true
67
+ },
68
+ {
69
+ "name": "lookup_table_program",
70
+ "address": "AddressLookupTab1e1111111111111111111111111"
71
+ },
72
+ {
73
+ "name": "payer",
74
+ "docs": ["Payer of the transaction"],
75
+ "writable": true,
76
+ "signer": true
77
+ },
78
+ {
79
+ "name": "authority"
80
+ },
81
+ {
82
+ "name": "system_program",
83
+ "address": "11111111111111111111111111111111"
84
+ }
85
+ ],
86
+ "args": [
87
+ {
88
+ "name": "nonce",
89
+ "type": "u32"
90
+ },
91
+ {
92
+ "name": "recent_slot",
93
+ "type": "u64"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "name": "create_pool",
99
+ "discriminator": [233, 146, 209, 142, 207, 104, 64, 188],
100
+ "accounts": [
101
+ {
102
+ "name": "stake_pool",
103
+ "writable": true,
104
+ "pda": {
105
+ "seeds": [
106
+ {
107
+ "kind": "const",
108
+ "value": [115, 116, 97, 107, 101, 45, 112, 111, 111, 108]
109
+ },
110
+ {
111
+ "kind": "account",
112
+ "path": "mint"
113
+ },
114
+ {
115
+ "kind": "account",
116
+ "path": "creator"
117
+ },
118
+ {
119
+ "kind": "arg",
120
+ "path": "nonce"
121
+ }
296
122
  ]
123
+ }
297
124
  },
298
125
  {
299
- "name": "migrate_entry",
300
- "discriminator": [
301
- 239,
302
- 154,
303
- 55,
304
- 173,
305
- 110,
306
- 36,
307
- 188,
308
- 214
309
- ],
310
- "accounts": [
311
- {
312
- "name": "stake_pool_from",
313
- "docs": [
314
- "Stake Pool"
315
- ],
316
- "writable": true,
317
- "address": "Cja9f8JFS6sTgBqSRZGBrA2HDbUj4MZUGdtRYruKTeJp"
318
- },
319
- {
320
- "name": "stake_pool_to",
321
- "docs": [
322
- "Stake Pool"
323
- ],
324
- "writable": true,
325
- "address": "BXRBbWMkscNBZoBL4fgRk77GBUX9eVP4AendQEumtPi8"
326
- },
327
- {
328
- "name": "stake_entry_from",
329
- "docs": [
330
- "Entry that will store Stake Metadata"
331
- ],
332
- "writable": true,
333
- "pda": {
334
- "seeds": [
335
- {
336
- "kind": "const",
337
- "value": [
338
- 115,
339
- 116,
340
- 97,
341
- 107,
342
- 101,
343
- 45,
344
- 101,
345
- 110,
346
- 116,
347
- 114,
348
- 121
349
- ]
350
- },
351
- {
352
- "kind": "account",
353
- "path": "stake_pool_from"
354
- },
355
- {
356
- "kind": "account",
357
- "path": "authority"
358
- },
359
- {
360
- "kind": "arg",
361
- "path": "nonce"
362
- }
363
- ]
364
- }
365
- },
366
- {
367
- "name": "stake_entry_to",
368
- "docs": [
369
- "Entry that will store Stake Metadata"
370
- ],
371
- "writable": true,
372
- "pda": {
373
- "seeds": [
374
- {
375
- "kind": "const",
376
- "value": [
377
- 115,
378
- 116,
379
- 97,
380
- 107,
381
- 101,
382
- 45,
383
- 101,
384
- 110,
385
- 116,
386
- 114,
387
- 121
388
- ]
389
- },
390
- {
391
- "kind": "account",
392
- "path": "stake_pool_to"
393
- },
394
- {
395
- "kind": "account",
396
- "path": "authority"
397
- },
398
- {
399
- "kind": "arg",
400
- "path": "new_nonce"
401
- }
402
- ]
403
- }
404
- },
405
- {
406
- "name": "vault_from",
407
- "docs": [
408
- "Stake Pool Vault that stores staked tokens"
409
- ],
410
- "writable": true
411
- },
412
- {
413
- "name": "vault_to",
414
- "docs": [
415
- "Stake Pool Vault that stores staked tokens"
416
- ],
417
- "writable": true
418
- },
419
- {
420
- "name": "to",
421
- "docs": [
422
- "Token Account to transfer Stake Mint tokens to"
423
- ],
424
- "writable": true
425
- },
426
- {
427
- "name": "payer",
428
- "docs": [
429
- "Owner of the Token Account from which tokens will be staked"
430
- ],
431
- "writable": true,
432
- "signer": true
433
- },
434
- {
435
- "name": "authority"
436
- },
437
- {
438
- "name": "mint",
439
- "docs": [
440
- "Original mint of staked tokens"
441
- ],
442
- "writable": true,
443
- "relations": [
444
- "stake_pool_from",
445
- "stake_pool_to"
446
- ]
447
- },
448
- {
449
- "name": "stake_mint_from",
450
- "docs": [
451
- "Mint of stake tokens that will be minted in return for staking"
452
- ],
453
- "writable": true
454
- },
455
- {
456
- "name": "stake_mint_to",
457
- "docs": [
458
- "Mint of stake tokens that will be minted in return for staking"
459
- ],
460
- "writable": true
461
- },
462
- {
463
- "name": "token_program"
464
- },
465
- {
466
- "name": "system_program",
467
- "address": "11111111111111111111111111111111"
468
- }
469
- ],
470
- "args": [
471
- {
472
- "name": "nonce",
473
- "type": "u32"
474
- },
475
- {
476
- "name": "new_nonce",
477
- "type": "u32"
478
- }
126
+ "name": "mint",
127
+ "docs": ["Mint used for staking"]
128
+ },
129
+ {
130
+ "name": "vault",
131
+ "writable": true,
132
+ "pda": {
133
+ "seeds": [
134
+ {
135
+ "kind": "const",
136
+ "value": [115, 116, 97, 107, 101, 45, 118, 97, 117, 108, 116]
137
+ },
138
+ {
139
+ "kind": "account",
140
+ "path": "stake_pool"
141
+ }
479
142
  ]
143
+ }
480
144
  },
481
145
  {
482
- "name": "request_unstake",
483
- "discriminator": [
484
- 44,
485
- 154,
486
- 110,
487
- 253,
488
- 160,
489
- 202,
490
- 54,
491
- 34
492
- ],
493
- "accounts": [
494
- {
495
- "name": "stake_pool",
496
- "writable": true,
497
- "relations": [
498
- "stake_entry"
499
- ]
500
- },
501
- {
502
- "name": "stake_entry",
503
- "docs": [
504
- "Entry that stores Stake Metadata"
505
- ],
506
- "writable": true
507
- },
508
- {
509
- "name": "authority",
510
- "docs": [
511
- "Stake Entry Authority"
512
- ],
513
- "writable": true,
514
- "signer": true
515
- }
516
- ],
517
- "args": []
518
- },
519
- {
520
- "name": "set_token_metadata_spl",
521
- "discriminator": [
522
- 244,
523
- 162,
524
- 227,
525
- 218,
526
- 129,
527
- 5,
528
- 25,
529
- 253
530
- ],
531
- "accounts": [
532
- {
533
- "name": "authority",
534
- "docs": [
535
- "Stake Pool Authority"
536
- ],
537
- "signer": true,
538
- "relations": [
539
- "stake_pool"
540
- ]
541
- },
542
- {
543
- "name": "stake_pool"
544
- },
545
- {
546
- "name": "stake_mint",
547
- "relations": [
548
- "stake_pool"
549
- ]
550
- },
551
- {
552
- "name": "metadata_account",
553
- "writable": true,
554
- "pda": {
555
- "seeds": [
556
- {
557
- "kind": "const",
558
- "value": [
559
- 109,
560
- 101,
561
- 116,
562
- 97,
563
- 100,
564
- 97,
565
- 116,
566
- 97
567
- ]
568
- },
569
- {
570
- "kind": "account",
571
- "path": "metadata_program"
572
- },
573
- {
574
- "kind": "account",
575
- "path": "stake_mint"
576
- }
577
- ],
578
- "program": {
579
- "kind": "account",
580
- "path": "metadata_program"
581
- }
582
- }
583
- },
584
- {
585
- "name": "metadata_program",
586
- "docs": [
587
- "MPL Program"
588
- ],
589
- "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
590
- },
591
- {
592
- "name": "token_program",
593
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
594
- },
595
- {
596
- "name": "rent",
597
- "address": "SysvarRent111111111111111111111111111111111"
598
- },
599
- {
600
- "name": "system_program",
601
- "address": "11111111111111111111111111111111"
602
- }
603
- ],
604
- "args": [
605
- {
606
- "name": "name",
607
- "type": "string"
608
- },
609
- {
610
- "name": "symbol",
611
- "type": "string"
612
- },
613
- {
614
- "name": "uri",
615
- "type": "string"
616
- }
146
+ "name": "stake_mint",
147
+ "writable": true,
148
+ "pda": {
149
+ "seeds": [
150
+ {
151
+ "kind": "const",
152
+ "value": [115, 116, 97, 107, 101, 45, 109, 105, 110, 116]
153
+ },
154
+ {
155
+ "kind": "account",
156
+ "path": "stake_pool"
157
+ }
617
158
  ]
159
+ }
618
160
  },
619
161
  {
620
- "name": "set_token_metadata_t22",
621
- "discriminator": [
622
- 239,
623
- 134,
624
- 91,
625
- 83,
626
- 196,
627
- 57,
628
- 120,
629
- 106
630
- ],
631
- "accounts": [
632
- {
633
- "name": "authority",
634
- "docs": [
635
- "Stake Pool Authority"
636
- ],
637
- "signer": true,
638
- "relations": [
639
- "stake_pool"
640
- ]
641
- },
642
- {
643
- "name": "stake_pool"
644
- },
645
- {
646
- "name": "stake_mint",
647
- "writable": true,
648
- "relations": [
649
- "stake_pool"
650
- ]
651
- },
652
- {
653
- "name": "token_program",
654
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
655
- },
656
- {
657
- "name": "system_program",
658
- "address": "11111111111111111111111111111111"
659
- }
660
- ],
661
- "args": [
662
- {
663
- "name": "name",
664
- "type": "string"
665
- },
666
- {
667
- "name": "symbol",
668
- "type": "string"
669
- },
670
- {
671
- "name": "uri",
672
- "type": "string"
673
- }
162
+ "name": "creator",
163
+ "docs": ["Stake Pool creator"],
164
+ "writable": true,
165
+ "signer": true
166
+ },
167
+ {
168
+ "name": "token_program"
169
+ },
170
+ {
171
+ "name": "system_program",
172
+ "address": "11111111111111111111111111111111"
173
+ }
174
+ ],
175
+ "args": [
176
+ {
177
+ "name": "nonce",
178
+ "type": "u8"
179
+ },
180
+ {
181
+ "name": "max_weight",
182
+ "type": "u64"
183
+ },
184
+ {
185
+ "name": "min_duration",
186
+ "type": "u64"
187
+ },
188
+ {
189
+ "name": "max_duration",
190
+ "type": "u64"
191
+ },
192
+ {
193
+ "name": "permissionless",
194
+ "type": "bool"
195
+ },
196
+ {
197
+ "name": "freeze_stake_mint",
198
+ "type": {
199
+ "option": "bool"
200
+ }
201
+ },
202
+ {
203
+ "name": "unstake_period",
204
+ "type": {
205
+ "option": "u64"
206
+ }
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "name": "migrate_entry",
212
+ "discriminator": [239, 154, 55, 173, 110, 36, 188, 214],
213
+ "accounts": [
214
+ {
215
+ "name": "stake_pool_from",
216
+ "docs": ["Stake Pool"],
217
+ "writable": true,
218
+ "address": "Cja9f8JFS6sTgBqSRZGBrA2HDbUj4MZUGdtRYruKTeJp"
219
+ },
220
+ {
221
+ "name": "stake_pool_to",
222
+ "docs": ["Stake Pool"],
223
+ "writable": true,
224
+ "address": "BXRBbWMkscNBZoBL4fgRk77GBUX9eVP4AendQEumtPi8"
225
+ },
226
+ {
227
+ "name": "stake_entry_from",
228
+ "docs": ["Entry that will store Stake Metadata"],
229
+ "writable": true,
230
+ "pda": {
231
+ "seeds": [
232
+ {
233
+ "kind": "const",
234
+ "value": [115, 116, 97, 107, 101, 45, 101, 110, 116, 114, 121]
235
+ },
236
+ {
237
+ "kind": "account",
238
+ "path": "stake_pool_from"
239
+ },
240
+ {
241
+ "kind": "account",
242
+ "path": "authority"
243
+ },
244
+ {
245
+ "kind": "arg",
246
+ "path": "nonce"
247
+ }
674
248
  ]
249
+ }
675
250
  },
676
251
  {
677
- "name": "stake",
678
- "discriminator": [
679
- 206,
680
- 176,
681
- 202,
682
- 18,
683
- 200,
684
- 209,
685
- 179,
686
- 108
687
- ],
688
- "accounts": [
689
- {
690
- "name": "stake_pool",
691
- "docs": [
692
- "Stake Pool"
693
- ],
694
- "writable": true
695
- },
696
- {
697
- "name": "stake_entry",
698
- "docs": [
699
- "Entry that will store Stake Metadata"
700
- ],
701
- "writable": true,
702
- "pda": {
703
- "seeds": [
704
- {
705
- "kind": "const",
706
- "value": [
707
- 115,
708
- 116,
709
- 97,
710
- 107,
711
- 101,
712
- 45,
713
- 101,
714
- 110,
715
- 116,
716
- 114,
717
- 121
718
- ]
719
- },
720
- {
721
- "kind": "account",
722
- "path": "stake_pool"
723
- },
724
- {
725
- "kind": "account",
726
- "path": "authority"
727
- },
728
- {
729
- "kind": "arg",
730
- "path": "nonce"
731
- }
732
- ]
733
- }
734
- },
735
- {
736
- "name": "from",
737
- "docs": [
738
- "Token Account from which stake tokens will be transferred"
739
- ],
740
- "writable": true
741
- },
742
- {
743
- "name": "vault",
744
- "docs": [
745
- "Stake Pool Vault that stores staked tokens"
746
- ],
747
- "writable": true,
748
- "relations": [
749
- "stake_pool"
750
- ]
751
- },
752
- {
753
- "name": "to",
754
- "docs": [
755
- "Token Account to transfer Stake Mint tokens to"
756
- ],
757
- "writable": true
758
- },
759
- {
760
- "name": "payer",
761
- "docs": [
762
- "Owner of the Token Account from which tokens will be staked"
763
- ],
764
- "writable": true,
765
- "signer": true
766
- },
767
- {
768
- "name": "authority"
769
- },
770
- {
771
- "name": "mint",
772
- "docs": [
773
- "Original mint of staked tokens"
774
- ],
775
- "writable": true,
776
- "relations": [
777
- "stake_pool"
778
- ]
779
- },
780
- {
781
- "name": "stake_mint",
782
- "docs": [
783
- "Mint of stake tokens that will be minted in return for staking"
784
- ],
785
- "writable": true,
786
- "relations": [
787
- "stake_pool"
788
- ]
789
- },
790
- {
791
- "name": "token_program"
792
- },
793
- {
794
- "name": "system_program",
795
- "address": "11111111111111111111111111111111"
796
- }
797
- ],
798
- "args": [
799
- {
800
- "name": "nonce",
801
- "type": "u32"
802
- },
803
- {
804
- "name": "amount",
805
- "type": "u64"
806
- },
807
- {
808
- "name": "duration",
809
- "type": "u64"
810
- }
252
+ "name": "stake_entry_to",
253
+ "docs": ["Entry that will store Stake Metadata"],
254
+ "writable": true,
255
+ "pda": {
256
+ "seeds": [
257
+ {
258
+ "kind": "const",
259
+ "value": [115, 116, 97, 107, 101, 45, 101, 110, 116, 114, 121]
260
+ },
261
+ {
262
+ "kind": "account",
263
+ "path": "stake_pool_to"
264
+ },
265
+ {
266
+ "kind": "account",
267
+ "path": "authority"
268
+ },
269
+ {
270
+ "kind": "arg",
271
+ "path": "new_nonce"
272
+ }
811
273
  ]
274
+ }
812
275
  },
813
276
  {
814
- "name": "unstake",
815
- "discriminator": [
816
- 90,
817
- 95,
818
- 107,
819
- 42,
820
- 205,
821
- 124,
822
- 50,
823
- 225
824
- ],
825
- "accounts": [
826
- {
827
- "name": "stake_pool",
828
- "writable": true,
829
- "relations": [
830
- "stake_entry"
831
- ]
832
- },
833
- {
834
- "name": "stake_entry",
835
- "docs": [
836
- "Entry that stores Stake Metadata"
837
- ],
838
- "writable": true
839
- },
840
- {
841
- "name": "from",
842
- "docs": [
843
- "Stake Mint Token account"
844
- ],
845
- "writable": true
846
- },
847
- {
848
- "name": "vault",
849
- "docs": [
850
- "Escrow Account that stores Staked tokens"
851
- ],
852
- "writable": true,
853
- "relations": [
854
- "stake_pool"
855
- ]
856
- },
857
- {
858
- "name": "to",
859
- "docs": [
860
- "Token account to withdraw Staked tokens to"
861
- ],
862
- "writable": true
863
- },
864
- {
865
- "name": "authority",
866
- "docs": [
867
- "Stake Entry Authority"
868
- ],
869
- "writable": true,
870
- "signer": true
871
- },
872
- {
873
- "name": "mint",
874
- "docs": [
875
- "Original mint of staked tokens"
876
- ],
877
- "writable": true,
878
- "relations": [
879
- "stake_pool"
880
- ]
881
- },
882
- {
883
- "name": "stake_mint",
884
- "docs": [
885
- "Stake Mint used to exchanged Staked tokens to"
886
- ],
887
- "writable": true,
888
- "relations": [
889
- "stake_pool"
890
- ]
891
- },
892
- {
893
- "name": "token_program"
894
- }
277
+ "name": "vault_from",
278
+ "docs": ["Stake Pool Vault that stores staked tokens"],
279
+ "writable": true
280
+ },
281
+ {
282
+ "name": "vault_to",
283
+ "docs": ["Stake Pool Vault that stores staked tokens"],
284
+ "writable": true
285
+ },
286
+ {
287
+ "name": "to",
288
+ "docs": ["Token Account to transfer Stake Mint tokens to"],
289
+ "writable": true
290
+ },
291
+ {
292
+ "name": "payer",
293
+ "docs": ["Owner of the Token Account from which tokens will be staked"],
294
+ "writable": true,
295
+ "signer": true
296
+ },
297
+ {
298
+ "name": "authority"
299
+ },
300
+ {
301
+ "name": "mint",
302
+ "docs": ["Original mint of staked tokens"],
303
+ "writable": true,
304
+ "relations": ["stake_pool_from", "stake_pool_to"]
305
+ },
306
+ {
307
+ "name": "stake_mint_from",
308
+ "docs": ["Mint of stake tokens that will be minted in return for staking"],
309
+ "writable": true
310
+ },
311
+ {
312
+ "name": "stake_mint_to",
313
+ "docs": ["Mint of stake tokens that will be minted in return for staking"],
314
+ "writable": true
315
+ },
316
+ {
317
+ "name": "token_program"
318
+ },
319
+ {
320
+ "name": "system_program",
321
+ "address": "11111111111111111111111111111111"
322
+ }
323
+ ],
324
+ "args": [
325
+ {
326
+ "name": "nonce",
327
+ "type": "u32"
328
+ },
329
+ {
330
+ "name": "new_nonce",
331
+ "type": "u32"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "name": "request_unstake",
337
+ "discriminator": [44, 154, 110, 253, 160, 202, 54, 34],
338
+ "accounts": [
339
+ {
340
+ "name": "stake_pool",
341
+ "writable": true,
342
+ "relations": ["stake_entry"]
343
+ },
344
+ {
345
+ "name": "stake_entry",
346
+ "docs": ["Entry that stores Stake Metadata"],
347
+ "writable": true
348
+ },
349
+ {
350
+ "name": "authority",
351
+ "docs": ["Stake Entry Authority"],
352
+ "writable": true,
353
+ "signer": true
354
+ }
355
+ ],
356
+ "args": []
357
+ },
358
+ {
359
+ "name": "set_token_metadata_spl",
360
+ "discriminator": [244, 162, 227, 218, 129, 5, 25, 253],
361
+ "accounts": [
362
+ {
363
+ "name": "authority",
364
+ "docs": ["Stake Pool Authority"],
365
+ "signer": true,
366
+ "relations": ["stake_pool"]
367
+ },
368
+ {
369
+ "name": "stake_pool"
370
+ },
371
+ {
372
+ "name": "stake_mint",
373
+ "relations": ["stake_pool"]
374
+ },
375
+ {
376
+ "name": "metadata_account",
377
+ "writable": true,
378
+ "pda": {
379
+ "seeds": [
380
+ {
381
+ "kind": "const",
382
+ "value": [109, 101, 116, 97, 100, 97, 116, 97]
383
+ },
384
+ {
385
+ "kind": "account",
386
+ "path": "metadata_program"
387
+ },
388
+ {
389
+ "kind": "account",
390
+ "path": "stake_mint"
391
+ }
895
392
  ],
896
- "args": []
393
+ "program": {
394
+ "kind": "account",
395
+ "path": "metadata_program"
396
+ }
397
+ }
398
+ },
399
+ {
400
+ "name": "metadata_program",
401
+ "docs": ["MPL Program"],
402
+ "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
403
+ },
404
+ {
405
+ "name": "token_program",
406
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
407
+ },
408
+ {
409
+ "name": "rent",
410
+ "address": "SysvarRent111111111111111111111111111111111"
411
+ },
412
+ {
413
+ "name": "system_program",
414
+ "address": "11111111111111111111111111111111"
897
415
  }
898
- ],
899
- "accounts": [
900
- {
901
- "name": "LookupTableLink",
902
- "discriminator": [
903
- 133,
904
- 88,
905
- 187,
906
- 141,
907
- 1,
908
- 53,
909
- 72,
910
- 236
911
- ]
416
+ ],
417
+ "args": [
418
+ {
419
+ "name": "name",
420
+ "type": "string"
912
421
  },
913
422
  {
914
- "name": "StakeEntry",
915
- "discriminator": [
916
- 187,
917
- 127,
918
- 9,
919
- 35,
920
- 155,
921
- 68,
922
- 86,
923
- 40
924
- ]
423
+ "name": "symbol",
424
+ "type": "string"
925
425
  },
926
426
  {
927
- "name": "StakePool",
928
- "discriminator": [
929
- 121,
930
- 34,
931
- 206,
932
- 21,
933
- 79,
934
- 127,
935
- 255,
936
- 28
937
- ]
427
+ "name": "uri",
428
+ "type": "string"
938
429
  }
939
- ],
940
- "errors": [
430
+ ]
431
+ },
432
+ {
433
+ "name": "set_token_metadata_t22",
434
+ "discriminator": [239, 134, 91, 83, 196, 57, 120, 106],
435
+ "accounts": [
436
+ {
437
+ "name": "authority",
438
+ "docs": ["Stake Pool Authority"],
439
+ "signer": true,
440
+ "relations": ["stake_pool"]
441
+ },
941
442
  {
942
- "code": 6000,
943
- "name": "InvalidDuration",
944
- "msg": "Minimum duration must be less than the maximum"
443
+ "name": "stake_pool"
945
444
  },
946
445
  {
947
- "code": 6001,
948
- "name": "InvalidWeight",
949
- "msg": "Weight should be more than minimum"
446
+ "name": "stake_mint",
447
+ "writable": true,
448
+ "relations": ["stake_pool"]
950
449
  },
951
450
  {
952
- "code": 6002,
953
- "name": "DurationTooShort",
954
- "msg": "Duration of staking can't be less than minimum duration of the pool"
451
+ "name": "token_program",
452
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
955
453
  },
956
454
  {
957
- "code": 6003,
958
- "name": "InvalidStakeAmount",
959
- "msg": "Stake amount should be more than 0"
455
+ "name": "system_program",
456
+ "address": "11111111111111111111111111111111"
457
+ }
458
+ ],
459
+ "args": [
460
+ {
461
+ "name": "name",
462
+ "type": "string"
960
463
  },
961
464
  {
962
- "code": 6004,
963
- "name": "ArithmeticError",
964
- "msg": "Arithmetic Error (overflow/underflow)"
465
+ "name": "symbol",
466
+ "type": "string"
965
467
  },
966
468
  {
967
- "code": 6005,
968
- "name": "Unauthorized",
969
- "msg": "Account is not authorized to execute this instruction"
469
+ "name": "uri",
470
+ "type": "string"
471
+ }
472
+ ]
473
+ },
474
+ {
475
+ "name": "stake",
476
+ "discriminator": [206, 176, 202, 18, 200, 209, 179, 108],
477
+ "accounts": [
478
+ {
479
+ "name": "stake_pool",
480
+ "docs": ["Stake Pool"],
481
+ "writable": true
970
482
  },
971
483
  {
972
- "code": 6006,
973
- "name": "OwnerMismatch",
974
- "msg": "Token account owner did not match intended owner"
484
+ "name": "stake_entry",
485
+ "docs": ["Entry that will store Stake Metadata"],
486
+ "writable": true,
487
+ "pda": {
488
+ "seeds": [
489
+ {
490
+ "kind": "const",
491
+ "value": [115, 116, 97, 107, 101, 45, 101, 110, 116, 114, 121]
492
+ },
493
+ {
494
+ "kind": "account",
495
+ "path": "stake_pool"
496
+ },
497
+ {
498
+ "kind": "account",
499
+ "path": "authority"
500
+ },
501
+ {
502
+ "kind": "arg",
503
+ "path": "nonce"
504
+ }
505
+ ]
506
+ }
975
507
  },
976
508
  {
977
- "code": 6007,
978
- "name": "InvalidMint",
979
- "msg": "Provided Mint does not equal the Pool Mint"
509
+ "name": "from",
510
+ "docs": ["Token Account from which stake tokens will be transferred"],
511
+ "writable": true
980
512
  },
981
513
  {
982
- "code": 6008,
983
- "name": "InvalidStakeVault",
984
- "msg": "Provided Stake Vault does not equal the Pool Vault"
514
+ "name": "vault",
515
+ "docs": ["Stake Pool Vault that stores staked tokens"],
516
+ "writable": true,
517
+ "relations": ["stake_pool"]
985
518
  },
986
519
  {
987
- "code": 6009,
988
- "name": "InvalidStakeMint",
989
- "msg": "Provided Stake Mint does not equal the Pool Stake Mint"
520
+ "name": "to",
521
+ "docs": ["Token Account to transfer Stake Mint tokens to"],
522
+ "writable": true
990
523
  },
991
524
  {
992
- "code": 6010,
993
- "name": "InvalidStakePool",
994
- "msg": "Provided Stake Pool does not equal the Entry Stake Pool"
525
+ "name": "payer",
526
+ "docs": ["Owner of the Token Account from which tokens will be staked"],
527
+ "writable": true,
528
+ "signer": true
995
529
  },
996
530
  {
997
- "code": 6011,
998
- "name": "InvalidPoolMint",
999
- "msg": "Provided Mint does not equal the Pool Mint"
531
+ "name": "authority"
1000
532
  },
1001
533
  {
1002
- "code": 6012,
1003
- "name": "ClosedStake",
1004
- "msg": "Stake Entry is already closed and can't be used"
534
+ "name": "mint",
535
+ "docs": ["Original mint of staked tokens"],
536
+ "writable": true,
537
+ "relations": ["stake_pool"]
1005
538
  },
1006
539
  {
1007
- "code": 6013,
1008
- "name": "LockedStake",
1009
- "msg": "Stake is locked, unstake is not possible"
540
+ "name": "stake_mint",
541
+ "docs": ["Mint of stake tokens that will be minted in return for staking"],
542
+ "writable": true,
543
+ "relations": ["stake_pool"]
1010
544
  },
1011
545
  {
1012
- "code": 6014,
1013
- "name": "UnsupportedTokenExtensions",
1014
- "msg": "Mint has unsupported Token Extensions"
546
+ "name": "token_program"
1015
547
  },
1016
548
  {
1017
- "code": 6015,
1018
- "name": "UnstakeRequestNotRequired",
1019
- "msg": "Unstake request is not required"
549
+ "name": "system_program",
550
+ "address": "11111111111111111111111111111111"
551
+ }
552
+ ],
553
+ "args": [
554
+ {
555
+ "name": "nonce",
556
+ "type": "u32"
1020
557
  },
1021
558
  {
1022
- "code": 6016,
1023
- "name": "UnstakeRequestRequired",
1024
- "msg": "Stake pool has unstake period, request is required prior to unstake"
559
+ "name": "amount",
560
+ "type": "u64"
1025
561
  },
1026
562
  {
1027
- "code": 6017,
1028
- "name": "UnstakeTooEarly",
1029
- "msg": "Unstake is not possible until unstake period has passed"
563
+ "name": "duration",
564
+ "type": "u64"
1030
565
  }
1031
- ],
1032
- "types": [
566
+ ]
567
+ },
568
+ {
569
+ "name": "unstake",
570
+ "discriminator": [90, 95, 107, 42, 205, 124, 50, 225],
571
+ "accounts": [
572
+ {
573
+ "name": "stake_pool",
574
+ "writable": true,
575
+ "relations": ["stake_entry"]
576
+ },
1033
577
  {
1034
- "name": "LookupTableLink",
1035
- "type": {
1036
- "kind": "struct",
1037
- "fields": [
1038
- {
1039
- "name": "nonce",
1040
- "docs": [
1041
- "Nonce to differentiate lookup tables for the same stake pool"
1042
- ],
1043
- "type": "u32"
1044
- },
1045
- {
1046
- "name": "stake_pool",
1047
- "docs": [
1048
- "Stake Pool for which tokens were staked"
1049
- ],
1050
- "type": "pubkey"
1051
- },
1052
- {
1053
- "name": "authority",
1054
- "docs": [
1055
- "Authority of the Entry"
1056
- ],
1057
- "type": "pubkey"
1058
- },
1059
- {
1060
- "name": "lookup_table",
1061
- "docs": [
1062
- "Pubkey of the address lookup table"
1063
- ],
1064
- "type": "pubkey"
1065
- },
1066
- {
1067
- "name": "_buffer",
1068
- "docs": [
1069
- "Buffer for additional fields"
1070
- ],
1071
- "type": {
1072
- "array": [
1073
- "u8",
1074
- 64
1075
- ]
1076
- }
1077
- }
1078
- ]
1079
- }
578
+ "name": "stake_entry",
579
+ "docs": ["Entry that stores Stake Metadata"],
580
+ "writable": true
1080
581
  },
1081
582
  {
1082
- "name": "StakeEntry",
1083
- "type": {
1084
- "kind": "struct",
1085
- "fields": [
1086
- {
1087
- "name": "nonce",
1088
- "docs": [
1089
- "Nonce to differentiate stakes for the same pool"
1090
- ],
1091
- "type": "u32"
1092
- },
1093
- {
1094
- "name": "stake_pool",
1095
- "docs": [
1096
- "Stake Pool for which tokens were staked"
1097
- ],
1098
- "type": "pubkey"
1099
- },
1100
- {
1101
- "name": "payer",
1102
- "docs": [
1103
- "Original Owner of Staked tokens"
1104
- ],
1105
- "type": "pubkey"
1106
- },
1107
- {
1108
- "name": "authority",
1109
- "docs": [
1110
- "Authority of the Entry"
1111
- ],
1112
- "type": "pubkey"
1113
- },
1114
- {
1115
- "name": "amount",
1116
- "docs": [
1117
- "Amount of deposited funds"
1118
- ],
1119
- "type": "u64"
1120
- },
1121
- {
1122
- "name": "duration",
1123
- "docs": [
1124
- "Duration of the lockup"
1125
- ],
1126
- "type": "u64"
1127
- },
1128
- {
1129
- "name": "effective_amount",
1130
- "docs": [
1131
- "Effective Amount staked, does not equal to deposited amount, accounts for Stake Weight"
1132
- ],
1133
- "type": "u128"
1134
- },
1135
- {
1136
- "name": "created_ts",
1137
- "docs": [
1138
- "Timestamp when Deposit was made"
1139
- ],
1140
- "type": "u64"
1141
- },
1142
- {
1143
- "name": "closed_ts",
1144
- "docs": [
1145
- "Timestamp when entry has been closed"
1146
- ],
1147
- "type": "u64"
1148
- },
1149
- {
1150
- "name": "prior_total_effective_stake",
1151
- "docs": [
1152
- "Total effective stake at the time of staking"
1153
- ],
1154
- "type": "u128"
1155
- },
1156
- {
1157
- "name": "unstake_ts",
1158
- "docs": [
1159
- "Timestamp when unstake was requested, will be used in case `unstake_period` is set"
1160
- ],
1161
- "type": "u64"
1162
- },
1163
- {
1164
- "name": "_buffer",
1165
- "docs": [
1166
- "Buffer for additional fields"
1167
- ],
1168
- "type": {
1169
- "array": [
1170
- "u8",
1171
- 40
1172
- ]
1173
- }
1174
- }
1175
- ]
1176
- }
583
+ "name": "from",
584
+ "docs": ["Stake Mint Token account"],
585
+ "writable": true
586
+ },
587
+ {
588
+ "name": "vault",
589
+ "docs": ["Escrow Account that stores Staked tokens"],
590
+ "writable": true,
591
+ "relations": ["stake_pool"]
592
+ },
593
+ {
594
+ "name": "to",
595
+ "docs": ["Token account to withdraw Staked tokens to"],
596
+ "writable": true
597
+ },
598
+ {
599
+ "name": "authority",
600
+ "docs": ["Stake Entry Authority"],
601
+ "writable": true,
602
+ "signer": true
603
+ },
604
+ {
605
+ "name": "mint",
606
+ "docs": ["Original mint of staked tokens"],
607
+ "writable": true,
608
+ "relations": ["stake_pool"]
609
+ },
610
+ {
611
+ "name": "stake_mint",
612
+ "docs": ["Stake Mint used to exchanged Staked tokens to"],
613
+ "writable": true,
614
+ "relations": ["stake_pool"]
1177
615
  },
1178
616
  {
1179
- "name": "StakePool",
617
+ "name": "token_program"
618
+ }
619
+ ],
620
+ "args": []
621
+ }
622
+ ],
623
+ "accounts": [
624
+ {
625
+ "name": "LookupTableLink",
626
+ "discriminator": [133, 88, 187, 141, 1, 53, 72, 236]
627
+ },
628
+ {
629
+ "name": "StakeEntry",
630
+ "discriminator": [187, 127, 9, 35, 155, 68, 86, 40]
631
+ },
632
+ {
633
+ "name": "StakePool",
634
+ "discriminator": [121, 34, 206, 21, 79, 127, 255, 28]
635
+ }
636
+ ],
637
+ "errors": [
638
+ {
639
+ "code": 6000,
640
+ "name": "InvalidDuration",
641
+ "msg": "Minimum duration must be less than the maximum"
642
+ },
643
+ {
644
+ "code": 6001,
645
+ "name": "InvalidWeight",
646
+ "msg": "Weight should be more than minimum"
647
+ },
648
+ {
649
+ "code": 6002,
650
+ "name": "DurationTooShort",
651
+ "msg": "Duration of staking can't be less than minimum duration of the pool"
652
+ },
653
+ {
654
+ "code": 6003,
655
+ "name": "InvalidStakeAmount",
656
+ "msg": "Stake amount should be more than 0"
657
+ },
658
+ {
659
+ "code": 6004,
660
+ "name": "ArithmeticError",
661
+ "msg": "Arithmetic Error (overflow/underflow)"
662
+ },
663
+ {
664
+ "code": 6005,
665
+ "name": "Unauthorized",
666
+ "msg": "Account is not authorized to execute this instruction"
667
+ },
668
+ {
669
+ "code": 6006,
670
+ "name": "OwnerMismatch",
671
+ "msg": "Token account owner did not match intended owner"
672
+ },
673
+ {
674
+ "code": 6007,
675
+ "name": "InvalidMint",
676
+ "msg": "Provided Mint does not equal the Pool Mint"
677
+ },
678
+ {
679
+ "code": 6008,
680
+ "name": "InvalidStakeVault",
681
+ "msg": "Provided Stake Vault does not equal the Pool Vault"
682
+ },
683
+ {
684
+ "code": 6009,
685
+ "name": "InvalidStakeMint",
686
+ "msg": "Provided Stake Mint does not equal the Pool Stake Mint"
687
+ },
688
+ {
689
+ "code": 6010,
690
+ "name": "InvalidStakePool",
691
+ "msg": "Provided Stake Pool does not equal the Entry Stake Pool"
692
+ },
693
+ {
694
+ "code": 6011,
695
+ "name": "InvalidPoolMint",
696
+ "msg": "Provided Mint does not equal the Pool Mint"
697
+ },
698
+ {
699
+ "code": 6012,
700
+ "name": "ClosedStake",
701
+ "msg": "Stake Entry is already closed and can't be used"
702
+ },
703
+ {
704
+ "code": 6013,
705
+ "name": "LockedStake",
706
+ "msg": "Stake is locked, unstake is not possible"
707
+ },
708
+ {
709
+ "code": 6014,
710
+ "name": "UnsupportedTokenExtensions",
711
+ "msg": "Mint has unsupported Token Extensions"
712
+ },
713
+ {
714
+ "code": 6015,
715
+ "name": "UnstakeRequestNotRequired",
716
+ "msg": "Unstake request is not required"
717
+ },
718
+ {
719
+ "code": 6016,
720
+ "name": "UnstakeRequestRequired",
721
+ "msg": "Stake pool has unstake period, request is required prior to unstake"
722
+ },
723
+ {
724
+ "code": 6017,
725
+ "name": "UnstakeTooEarly",
726
+ "msg": "Unstake is not possible until unstake period has passed"
727
+ }
728
+ ],
729
+ "types": [
730
+ {
731
+ "name": "LookupTableLink",
732
+ "type": {
733
+ "kind": "struct",
734
+ "fields": [
735
+ {
736
+ "name": "nonce",
737
+ "docs": ["Nonce to differentiate lookup tables for the same stake pool"],
738
+ "type": "u32"
739
+ },
740
+ {
741
+ "name": "stake_pool",
742
+ "docs": ["Stake Pool for which tokens were staked"],
743
+ "type": "pubkey"
744
+ },
745
+ {
746
+ "name": "authority",
747
+ "docs": ["Authority of the Entry"],
748
+ "type": "pubkey"
749
+ },
750
+ {
751
+ "name": "lookup_table",
752
+ "docs": ["Pubkey of the address lookup table"],
753
+ "type": "pubkey"
754
+ },
755
+ {
756
+ "name": "_buffer",
757
+ "docs": ["Buffer for additional fields"],
1180
758
  "type": {
1181
- "kind": "struct",
1182
- "fields": [
1183
- {
1184
- "name": "bump",
1185
- "docs": [
1186
- "Bump Seed used to sign transactions"
1187
- ],
1188
- "type": "u8"
1189
- },
1190
- {
1191
- "name": "nonce",
1192
- "docs": [
1193
- "Nonce to differentiate pools for the same mint"
1194
- ],
1195
- "type": "u8"
1196
- },
1197
- {
1198
- "name": "mint",
1199
- "docs": [
1200
- "Mint of the Stake Pool"
1201
- ],
1202
- "type": "pubkey"
1203
- },
1204
- {
1205
- "name": "creator",
1206
- "docs": [
1207
- "Initial Creator"
1208
- ],
1209
- "type": "pubkey"
1210
- },
1211
- {
1212
- "name": "authority",
1213
- "docs": [
1214
- "Current authority"
1215
- ],
1216
- "type": "pubkey"
1217
- },
1218
- {
1219
- "name": "min_weight",
1220
- "docs": [
1221
- "The lowest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
1222
- "For instance:",
1223
- "* `min_weight = 1 x SCALE_FACTOR_BASE` signifies a minimum multiplier of 1x for min staking duration",
1224
- "* `min_weight = 2 x SCALE_FACTOR_BASE` indicates a minimum multiplier of 2x for min staking duration"
1225
- ],
1226
- "type": "u64"
1227
- },
1228
- {
1229
- "name": "max_weight",
1230
- "docs": [
1231
- "The highest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
1232
- "For instance:",
1233
- "* `max_weight = 1 x SCALE_FACTOR_BASE` signifies a max multiplier of 1x for max staking duration",
1234
- "* `max_weight = 2 x SCALE_FACTOR_BASE` indicates a max multiplier of 2x for max staking duration"
1235
- ],
1236
- "type": "u64"
1237
- },
1238
- {
1239
- "name": "min_duration",
1240
- "docs": [
1241
- "Min Duration of stake in seconds"
1242
- ],
1243
- "type": "u64"
1244
- },
1245
- {
1246
- "name": "max_duration",
1247
- "docs": [
1248
- "Max Duration of stake in seconds, the more duration, the more weight the stake has"
1249
- ],
1250
- "type": "u64"
1251
- },
1252
- {
1253
- "name": "permissionless",
1254
- "docs": [
1255
- "Whether anyone can add Reward Pools or just admin"
1256
- ],
1257
- "type": "bool"
1258
- },
1259
- {
1260
- "name": "vault",
1261
- "docs": [
1262
- "Escrow Account that stores staked tokens"
1263
- ],
1264
- "type": "pubkey"
1265
- },
1266
- {
1267
- "name": "stake_mint",
1268
- "docs": [
1269
- "Stake Mint, will be returned in exchange for stake tokens"
1270
- ],
1271
- "type": "pubkey"
1272
- },
1273
- {
1274
- "name": "total_stake",
1275
- "docs": [
1276
- "Total number of Staked tokens"
1277
- ],
1278
- "type": "u64"
1279
- },
1280
- {
1281
- "name": "total_effective_stake",
1282
- "docs": [
1283
- "Total staked tokens accounting for each stake weight, does not equal `total_stake`,",
1284
- "represents a sum of effective stake multiplied by 10^9 for precision"
1285
- ],
1286
- "type": "u128"
1287
- },
1288
- {
1289
- "name": "freeze_stake_mint",
1290
- "docs": [
1291
- "Whether we should freeze stake mint token accounts"
1292
- ],
1293
- "type": "bool"
1294
- },
1295
- {
1296
- "name": "unstake_period",
1297
- "docs": [
1298
- "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
1299
- ],
1300
- "type": "u64"
1301
- },
1302
- {
1303
- "name": "_buffer",
1304
- "docs": [
1305
- "Buffer for additional fields"
1306
- ],
1307
- "type": {
1308
- "array": [
1309
- "u8",
1310
- 55
1311
- ]
1312
- }
1313
- }
1314
- ]
759
+ "array": ["u8", 64]
1315
760
  }
1316
- }
1317
- ]
761
+ }
762
+ ]
763
+ }
764
+ },
765
+ {
766
+ "name": "StakeEntry",
767
+ "type": {
768
+ "kind": "struct",
769
+ "fields": [
770
+ {
771
+ "name": "nonce",
772
+ "docs": ["Nonce to differentiate stakes for the same pool"],
773
+ "type": "u32"
774
+ },
775
+ {
776
+ "name": "stake_pool",
777
+ "docs": ["Stake Pool for which tokens were staked"],
778
+ "type": "pubkey"
779
+ },
780
+ {
781
+ "name": "payer",
782
+ "docs": ["Original Owner of Staked tokens"],
783
+ "type": "pubkey"
784
+ },
785
+ {
786
+ "name": "authority",
787
+ "docs": ["Authority of the Entry"],
788
+ "type": "pubkey"
789
+ },
790
+ {
791
+ "name": "amount",
792
+ "docs": ["Amount of deposited funds"],
793
+ "type": "u64"
794
+ },
795
+ {
796
+ "name": "duration",
797
+ "docs": ["Duration of the lockup"],
798
+ "type": "u64"
799
+ },
800
+ {
801
+ "name": "effective_amount",
802
+ "docs": ["Effective Amount staked, does not equal to deposited amount, accounts for Stake Weight"],
803
+ "type": "u128"
804
+ },
805
+ {
806
+ "name": "created_ts",
807
+ "docs": ["Timestamp when Deposit was made"],
808
+ "type": "u64"
809
+ },
810
+ {
811
+ "name": "closed_ts",
812
+ "docs": ["Timestamp when entry has been closed"],
813
+ "type": "u64"
814
+ },
815
+ {
816
+ "name": "prior_total_effective_stake",
817
+ "docs": ["Total effective stake at the time of staking"],
818
+ "type": "u128"
819
+ },
820
+ {
821
+ "name": "unstake_ts",
822
+ "docs": ["Timestamp when unstake was requested, will be used in case `unstake_period` is set"],
823
+ "type": "u64"
824
+ },
825
+ {
826
+ "name": "_buffer",
827
+ "docs": ["Buffer for additional fields"],
828
+ "type": {
829
+ "array": ["u8", 40]
830
+ }
831
+ }
832
+ ]
833
+ }
834
+ },
835
+ {
836
+ "name": "StakePool",
837
+ "type": {
838
+ "kind": "struct",
839
+ "fields": [
840
+ {
841
+ "name": "bump",
842
+ "docs": ["Bump Seed used to sign transactions"],
843
+ "type": "u8"
844
+ },
845
+ {
846
+ "name": "nonce",
847
+ "docs": ["Nonce to differentiate pools for the same mint"],
848
+ "type": "u8"
849
+ },
850
+ {
851
+ "name": "mint",
852
+ "docs": ["Mint of the Stake Pool"],
853
+ "type": "pubkey"
854
+ },
855
+ {
856
+ "name": "creator",
857
+ "docs": ["Initial Creator"],
858
+ "type": "pubkey"
859
+ },
860
+ {
861
+ "name": "authority",
862
+ "docs": ["Current authority"],
863
+ "type": "pubkey"
864
+ },
865
+ {
866
+ "name": "min_weight",
867
+ "docs": [
868
+ "The lowest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
869
+ "For instance:",
870
+ "* `min_weight = 1 x SCALE_FACTOR_BASE` signifies a minimum multiplier of 1x for min staking duration",
871
+ "* `min_weight = 2 x SCALE_FACTOR_BASE` indicates a minimum multiplier of 2x for min staking duration"
872
+ ],
873
+ "type": "u64"
874
+ },
875
+ {
876
+ "name": "max_weight",
877
+ "docs": [
878
+ "The highest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
879
+ "For instance:",
880
+ "* `max_weight = 1 x SCALE_FACTOR_BASE` signifies a max multiplier of 1x for max staking duration",
881
+ "* `max_weight = 2 x SCALE_FACTOR_BASE` indicates a max multiplier of 2x for max staking duration"
882
+ ],
883
+ "type": "u64"
884
+ },
885
+ {
886
+ "name": "min_duration",
887
+ "docs": ["Min Duration of stake in seconds"],
888
+ "type": "u64"
889
+ },
890
+ {
891
+ "name": "max_duration",
892
+ "docs": ["Max Duration of stake in seconds, the more duration, the more weight the stake has"],
893
+ "type": "u64"
894
+ },
895
+ {
896
+ "name": "permissionless",
897
+ "docs": ["Whether anyone can add Reward Pools or just admin"],
898
+ "type": "bool"
899
+ },
900
+ {
901
+ "name": "vault",
902
+ "docs": ["Escrow Account that stores staked tokens"],
903
+ "type": "pubkey"
904
+ },
905
+ {
906
+ "name": "stake_mint",
907
+ "docs": ["Stake Mint, will be returned in exchange for stake tokens"],
908
+ "type": "pubkey"
909
+ },
910
+ {
911
+ "name": "total_stake",
912
+ "docs": ["Total number of Staked tokens"],
913
+ "type": "u64"
914
+ },
915
+ {
916
+ "name": "total_effective_stake",
917
+ "docs": [
918
+ "Total staked tokens accounting for each stake weight, does not equal `total_stake`,",
919
+ "represents a sum of effective stake multiplied by 10^9 for precision"
920
+ ],
921
+ "type": "u128"
922
+ },
923
+ {
924
+ "name": "freeze_stake_mint",
925
+ "docs": ["Whether we should freeze stake mint token accounts"],
926
+ "type": "bool"
927
+ },
928
+ {
929
+ "name": "unstake_period",
930
+ "docs": [
931
+ "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
932
+ ],
933
+ "type": "u64"
934
+ },
935
+ {
936
+ "name": "_buffer",
937
+ "docs": ["Buffer for additional fields"],
938
+ "type": {
939
+ "array": ["u8", 55]
940
+ }
941
+ }
942
+ ]
943
+ }
944
+ }
945
+ ]
1318
946
  }