@streamflow/staking 7.5.2 → 7.5.3-alpha.43a9937.20250509142428

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 +2942 -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 +2917 -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 +884 -918
  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 +234 -2
  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 -980
  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,980 +1,946 @@
1
1
  {
2
- "address": "STAKEvGqQTtzJZH6BWDcbpzXXn2BBerPAgQ3EGLN2GH",
3
- "metadata": {
4
- "name": "stake_pool",
5
- "version": "1.0.0",
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_pool",
46
- "discriminator": [
47
- 233,
48
- 146,
49
- 209,
50
- 142,
51
- 207,
52
- 104,
53
- 64,
54
- 188
55
- ],
56
- "accounts": [
57
- {
58
- "name": "stake_pool",
59
- "writable": true,
60
- "pda": {
61
- "seeds": [
62
- {
63
- "kind": "const",
64
- "value": [
65
- 115,
66
- 116,
67
- 97,
68
- 107,
69
- 101,
70
- 45,
71
- 112,
72
- 111,
73
- 111,
74
- 108
75
- ]
76
- },
77
- {
78
- "kind": "account",
79
- "path": "mint"
80
- },
81
- {
82
- "kind": "account",
83
- "path": "creator"
84
- },
85
- {
86
- "kind": "arg",
87
- "path": "nonce"
88
- }
89
- ]
90
- }
91
- },
92
- {
93
- "name": "mint",
94
- "docs": [
95
- "Mint used for staking"
96
- ]
97
- },
98
- {
99
- "name": "vault",
100
- "writable": true,
101
- "pda": {
102
- "seeds": [
103
- {
104
- "kind": "const",
105
- "value": [
106
- 115,
107
- 116,
108
- 97,
109
- 107,
110
- 101,
111
- 45,
112
- 118,
113
- 97,
114
- 117,
115
- 108,
116
- 116
117
- ]
118
- },
119
- {
120
- "kind": "account",
121
- "path": "stake_pool"
122
- }
123
- ]
124
- }
125
- },
126
- {
127
- "name": "stake_mint",
128
- "writable": true,
129
- "pda": {
130
- "seeds": [
131
- {
132
- "kind": "const",
133
- "value": [
134
- 115,
135
- 116,
136
- 97,
137
- 107,
138
- 101,
139
- 45,
140
- 109,
141
- 105,
142
- 110,
143
- 116
144
- ]
145
- },
146
- {
147
- "kind": "account",
148
- "path": "stake_pool"
149
- }
150
- ]
151
- }
152
- },
153
- {
154
- "name": "creator",
155
- "docs": [
156
- "Stake Pool creator"
157
- ],
158
- "writable": true,
159
- "signer": true
160
- },
161
- {
162
- "name": "token_program"
163
- },
164
- {
165
- "name": "system_program",
166
- "address": "11111111111111111111111111111111"
167
- }
168
- ],
169
- "args": [
170
- {
171
- "name": "nonce",
172
- "type": "u8"
173
- },
174
- {
175
- "name": "max_weight",
176
- "type": "u64"
177
- },
178
- {
179
- "name": "min_duration",
180
- "type": "u64"
181
- },
182
- {
183
- "name": "max_duration",
184
- "type": "u64"
185
- },
186
- {
187
- "name": "permissionless",
188
- "type": "bool"
189
- },
190
- {
191
- "name": "freeze_stake_mint",
192
- "type": {
193
- "option": "bool"
194
- }
195
- },
196
- {
197
- "name": "unstake_period",
198
- "type": {
199
- "option": "u64"
200
- }
201
- }
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
+ }
202
61
  ]
62
+ }
203
63
  },
204
64
  {
205
- "name": "request_unstake",
206
- "discriminator": [
207
- 44,
208
- 154,
209
- 110,
210
- 253,
211
- 160,
212
- 202,
213
- 54,
214
- 34
215
- ],
216
- "accounts": [
217
- {
218
- "name": "stake_pool",
219
- "writable": true,
220
- "relations": [
221
- "stake_entry"
222
- ]
223
- },
224
- {
225
- "name": "stake_entry",
226
- "docs": [
227
- "Entry that stores Stake Metadata"
228
- ],
229
- "writable": true
230
- },
231
- {
232
- "name": "authority",
233
- "docs": [
234
- "Stake Entry Authority"
235
- ],
236
- "writable": true,
237
- "signer": true
238
- }
239
- ],
240
- "args": []
241
- },
242
- {
243
- "name": "set_token_metadata_spl",
244
- "discriminator": [
245
- 244,
246
- 162,
247
- 227,
248
- 218,
249
- 129,
250
- 5,
251
- 25,
252
- 253
253
- ],
254
- "accounts": [
255
- {
256
- "name": "authority",
257
- "docs": [
258
- "Stake Pool Authority"
259
- ],
260
- "signer": true,
261
- "relations": [
262
- "stake_pool"
263
- ]
264
- },
265
- {
266
- "name": "stake_pool"
267
- },
268
- {
269
- "name": "stake_mint",
270
- "relations": [
271
- "stake_pool"
272
- ]
273
- },
274
- {
275
- "name": "metadata_account",
276
- "writable": true,
277
- "pda": {
278
- "seeds": [
279
- {
280
- "kind": "const",
281
- "value": [
282
- 109,
283
- 101,
284
- 116,
285
- 97,
286
- 100,
287
- 97,
288
- 116,
289
- 97
290
- ]
291
- },
292
- {
293
- "kind": "account",
294
- "path": "metadata_program"
295
- },
296
- {
297
- "kind": "account",
298
- "path": "stake_mint"
299
- }
300
- ],
301
- "program": {
302
- "kind": "account",
303
- "path": "metadata_program"
304
- }
305
- }
306
- },
307
- {
308
- "name": "metadata_program",
309
- "docs": [
310
- "MPL Program"
311
- ],
312
- "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
313
- },
314
- {
315
- "name": "token_program",
316
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
317
- },
318
- {
319
- "name": "rent",
320
- "address": "SysvarRent111111111111111111111111111111111"
321
- },
322
- {
323
- "name": "system_program",
324
- "address": "11111111111111111111111111111111"
325
- }
326
- ],
327
- "args": [
328
- {
329
- "name": "name",
330
- "type": "string"
331
- },
332
- {
333
- "name": "symbol",
334
- "type": "string"
335
- },
336
- {
337
- "name": "uri",
338
- "type": "string"
339
- }
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
+ }
340
122
  ]
123
+ }
341
124
  },
342
125
  {
343
- "name": "set_token_metadata_t22",
344
- "discriminator": [
345
- 239,
346
- 134,
347
- 91,
348
- 83,
349
- 196,
350
- 57,
351
- 120,
352
- 106
353
- ],
354
- "accounts": [
355
- {
356
- "name": "authority",
357
- "docs": [
358
- "Stake Pool Authority"
359
- ],
360
- "signer": true,
361
- "relations": [
362
- "stake_pool"
363
- ]
364
- },
365
- {
366
- "name": "stake_pool"
367
- },
368
- {
369
- "name": "stake_mint",
370
- "writable": true,
371
- "relations": [
372
- "stake_pool"
373
- ]
374
- },
375
- {
376
- "name": "token_program",
377
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
378
- },
379
- {
380
- "name": "system_program",
381
- "address": "11111111111111111111111111111111"
382
- }
383
- ],
384
- "args": [
385
- {
386
- "name": "name",
387
- "type": "string"
388
- },
389
- {
390
- "name": "symbol",
391
- "type": "string"
392
- },
393
- {
394
- "name": "uri",
395
- "type": "string"
396
- }
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
+ }
397
142
  ]
143
+ }
398
144
  },
399
145
  {
400
- "name": "stake",
401
- "discriminator": [
402
- 206,
403
- 176,
404
- 202,
405
- 18,
406
- 200,
407
- 209,
408
- 179,
409
- 108
410
- ],
411
- "accounts": [
412
- {
413
- "name": "stake_pool",
414
- "docs": [
415
- "Stake Pool"
416
- ],
417
- "writable": true
418
- },
419
- {
420
- "name": "stake_entry",
421
- "docs": [
422
- "Entry that will store Stake Metadata"
423
- ],
424
- "writable": true,
425
- "pda": {
426
- "seeds": [
427
- {
428
- "kind": "const",
429
- "value": [
430
- 115,
431
- 116,
432
- 97,
433
- 107,
434
- 101,
435
- 45,
436
- 101,
437
- 110,
438
- 116,
439
- 114,
440
- 121
441
- ]
442
- },
443
- {
444
- "kind": "account",
445
- "path": "stake_pool"
446
- },
447
- {
448
- "kind": "account",
449
- "path": "authority"
450
- },
451
- {
452
- "kind": "arg",
453
- "path": "nonce"
454
- }
455
- ]
456
- }
457
- },
458
- {
459
- "name": "from",
460
- "docs": [
461
- "Token Account from which stake tokens will be transferred"
462
- ],
463
- "writable": true
464
- },
465
- {
466
- "name": "vault",
467
- "docs": [
468
- "Stake Pool Vault that stores staked tokens"
469
- ],
470
- "writable": true,
471
- "relations": [
472
- "stake_pool"
473
- ]
474
- },
475
- {
476
- "name": "to",
477
- "docs": [
478
- "Token Account to transfer Stake Mint tokens to"
479
- ],
480
- "writable": true
481
- },
482
- {
483
- "name": "payer",
484
- "docs": [
485
- "Owner of the Token Account from which tokens will be staked"
486
- ],
487
- "writable": true,
488
- "signer": true
489
- },
490
- {
491
- "name": "authority"
492
- },
493
- {
494
- "name": "mint",
495
- "docs": [
496
- "Original mint of staked tokens"
497
- ],
498
- "writable": true,
499
- "relations": [
500
- "stake_pool"
501
- ]
502
- },
503
- {
504
- "name": "stake_mint",
505
- "docs": [
506
- "Mint of stake tokens that will be minted in return for staking"
507
- ],
508
- "writable": true,
509
- "relations": [
510
- "stake_pool"
511
- ]
512
- },
513
- {
514
- "name": "token_program"
515
- },
516
- {
517
- "name": "system_program",
518
- "address": "11111111111111111111111111111111"
519
- }
520
- ],
521
- "args": [
522
- {
523
- "name": "nonce",
524
- "type": "u32"
525
- },
526
- {
527
- "name": "amount",
528
- "type": "u64"
529
- },
530
- {
531
- "name": "duration",
532
- "type": "u64"
533
- }
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
+ }
534
158
  ]
159
+ }
535
160
  },
536
161
  {
537
- "name": "unstake",
538
- "discriminator": [
539
- 90,
540
- 95,
541
- 107,
542
- 42,
543
- 205,
544
- 124,
545
- 50,
546
- 225
547
- ],
548
- "accounts": [
549
- {
550
- "name": "stake_pool",
551
- "writable": true,
552
- "relations": [
553
- "stake_entry"
554
- ]
555
- },
556
- {
557
- "name": "stake_entry",
558
- "docs": [
559
- "Entry that stores Stake Metadata"
560
- ],
561
- "writable": true
562
- },
563
- {
564
- "name": "from",
565
- "docs": [
566
- "Stake Mint Token account"
567
- ],
568
- "writable": true
569
- },
570
- {
571
- "name": "vault",
572
- "docs": [
573
- "Escrow Account that stores Staked tokens"
574
- ],
575
- "writable": true,
576
- "relations": [
577
- "stake_pool"
578
- ]
579
- },
580
- {
581
- "name": "to",
582
- "docs": [
583
- "Token account to withdraw Staked tokens to"
584
- ],
585
- "writable": true
586
- },
587
- {
588
- "name": "authority",
589
- "docs": [
590
- "Stake Entry Authority"
591
- ],
592
- "writable": true,
593
- "signer": true
594
- },
595
- {
596
- "name": "mint",
597
- "docs": [
598
- "Original mint of staked tokens"
599
- ],
600
- "writable": true,
601
- "relations": [
602
- "stake_pool"
603
- ]
604
- },
605
- {
606
- "name": "stake_mint",
607
- "docs": [
608
- "Stake Mint used to exchanged Staked tokens to"
609
- ],
610
- "writable": true,
611
- "relations": [
612
- "stake_pool"
613
- ]
614
- },
615
- {
616
- "name": "token_program"
617
- }
618
- ],
619
- "args": []
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
+ }
620
207
  }
621
- ],
622
- "accounts": [
623
- {
624
- "name": "StakeEntry",
625
- "discriminator": [
626
- 187,
627
- 127,
628
- 9,
629
- 35,
630
- 155,
631
- 68,
632
- 86,
633
- 40
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
+ }
634
248
  ]
249
+ }
635
250
  },
636
251
  {
637
- "name": "StakePool",
638
- "discriminator": [
639
- 121,
640
- 34,
641
- 206,
642
- 21,
643
- 79,
644
- 127,
645
- 255,
646
- 28
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
+ }
647
273
  ]
274
+ }
275
+ },
276
+ {
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"
648
322
  }
649
- ],
650
- "errors": [
323
+ ],
324
+ "args": [
651
325
  {
652
- "code": 6000,
653
- "name": "InvalidDuration",
654
- "msg": "Minimum duration must be less than the maximum"
326
+ "name": "nonce",
327
+ "type": "u32"
655
328
  },
656
329
  {
657
- "code": 6001,
658
- "name": "InvalidWeight",
659
- "msg": "Weight should be more than minimum"
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"]
660
343
  },
661
344
  {
662
- "code": 6002,
663
- "name": "DurationTooShort",
664
- "msg": "Duration of staking can't be less than minimum duration of the pool"
345
+ "name": "stake_entry",
346
+ "docs": ["Entry that stores Stake Metadata"],
347
+ "writable": true
665
348
  },
666
349
  {
667
- "code": 6003,
668
- "name": "InvalidStakeAmount",
669
- "msg": "Stake amount should be more than 0"
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"]
670
367
  },
671
368
  {
672
- "code": 6004,
673
- "name": "ArithmeticError",
674
- "msg": "Arithmetic Error (overflow/underflow)"
369
+ "name": "stake_pool"
675
370
  },
676
371
  {
677
- "code": 6005,
678
- "name": "Unauthorized",
679
- "msg": "Account is not authorized to execute this instruction"
372
+ "name": "stake_mint",
373
+ "relations": ["stake_pool"]
680
374
  },
681
375
  {
682
- "code": 6006,
683
- "name": "OwnerMismatch",
684
- "msg": "Token account owner did not match intended owner"
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
+ }
392
+ ],
393
+ "program": {
394
+ "kind": "account",
395
+ "path": "metadata_program"
396
+ }
397
+ }
398
+ },
399
+ {
400
+ "name": "metadata_program",
401
+ "docs": ["MPL Program"],
402
+ "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
685
403
  },
686
404
  {
687
- "code": 6007,
688
- "name": "InvalidMint",
689
- "msg": "Provided Mint does not equal the Pool Mint"
405
+ "name": "token_program",
406
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
690
407
  },
691
408
  {
692
- "code": 6008,
693
- "name": "InvalidStakeVault",
694
- "msg": "Provided Stake Vault does not equal the Pool Vault"
409
+ "name": "rent",
410
+ "address": "SysvarRent111111111111111111111111111111111"
695
411
  },
696
412
  {
697
- "code": 6009,
698
- "name": "InvalidStakeMint",
699
- "msg": "Provided Stake Mint does not equal the Pool Stake Mint"
413
+ "name": "system_program",
414
+ "address": "11111111111111111111111111111111"
415
+ }
416
+ ],
417
+ "args": [
418
+ {
419
+ "name": "name",
420
+ "type": "string"
700
421
  },
701
422
  {
702
- "code": 6010,
703
- "name": "InvalidStakePool",
704
- "msg": "Provided Stake Pool does not equal the Entry Stake Pool"
423
+ "name": "symbol",
424
+ "type": "string"
705
425
  },
706
426
  {
707
- "code": 6011,
708
- "name": "InvalidPoolMint",
709
- "msg": "Provided Mint does not equal the Pool Mint"
427
+ "name": "uri",
428
+ "type": "string"
429
+ }
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"]
710
441
  },
711
442
  {
712
- "code": 6012,
713
- "name": "ClosedStake",
714
- "msg": "Stake Entry is already closed and can't be used"
443
+ "name": "stake_pool"
715
444
  },
716
445
  {
717
- "code": 6013,
718
- "name": "LockedStake",
719
- "msg": "Stake is locked, unstake is not possible"
446
+ "name": "stake_mint",
447
+ "writable": true,
448
+ "relations": ["stake_pool"]
720
449
  },
721
450
  {
722
- "code": 6014,
723
- "name": "UnsupportedTokenExtensions",
724
- "msg": "Mint has unsupported Token Extensions"
451
+ "name": "token_program",
452
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
725
453
  },
726
454
  {
727
- "code": 6015,
728
- "name": "UnstakeRequestNotRequired",
729
- "msg": "Unstake request is not required"
455
+ "name": "system_program",
456
+ "address": "11111111111111111111111111111111"
457
+ }
458
+ ],
459
+ "args": [
460
+ {
461
+ "name": "name",
462
+ "type": "string"
730
463
  },
731
464
  {
732
- "code": 6016,
733
- "name": "UnstakeRequestRequired",
734
- "msg": "Stake pool has unstake period, request is required prior to unstake"
465
+ "name": "symbol",
466
+ "type": "string"
735
467
  },
736
468
  {
737
- "code": 6017,
738
- "name": "UnstakeTooEarly",
739
- "msg": "Unstake is not possible until unstake period has passed"
469
+ "name": "uri",
470
+ "type": "string"
740
471
  }
741
- ],
742
- "types": [
472
+ ]
473
+ },
474
+ {
475
+ "name": "stake",
476
+ "discriminator": [206, 176, 202, 18, 200, 209, 179, 108],
477
+ "accounts": [
743
478
  {
744
- "name": "StakeEntry",
745
- "type": {
746
- "kind": "struct",
747
- "fields": [
748
- {
749
- "name": "nonce",
750
- "docs": [
751
- "Nonce to differentiate stakes for the same pool"
752
- ],
753
- "type": "u32"
754
- },
755
- {
756
- "name": "stake_pool",
757
- "docs": [
758
- "Stake Pool for which tokens were staked"
759
- ],
760
- "type": "pubkey"
761
- },
762
- {
763
- "name": "payer",
764
- "docs": [
765
- "Original Owner of Staked tokens"
766
- ],
767
- "type": "pubkey"
768
- },
769
- {
770
- "name": "authority",
771
- "docs": [
772
- "Authority of the Entry"
773
- ],
774
- "type": "pubkey"
775
- },
776
- {
777
- "name": "amount",
778
- "docs": [
779
- "Amount of deposited funds"
780
- ],
781
- "type": "u64"
782
- },
783
- {
784
- "name": "duration",
785
- "docs": [
786
- "Duration of the lockup"
787
- ],
788
- "type": "u64"
789
- },
790
- {
791
- "name": "effective_amount",
792
- "docs": [
793
- "Effective Amount staked, does not equal to deposited amount, accounts for Stake Weight"
794
- ],
795
- "type": "u128"
796
- },
797
- {
798
- "name": "created_ts",
799
- "docs": [
800
- "Timestamp when Deposit was made"
801
- ],
802
- "type": "u64"
803
- },
804
- {
805
- "name": "closed_ts",
806
- "docs": [
807
- "Timestamp when entry has been closed"
808
- ],
809
- "type": "u64"
810
- },
811
- {
812
- "name": "prior_total_effective_stake",
813
- "docs": [
814
- "Total effective stake at the time of staking"
815
- ],
816
- "type": "u128"
817
- },
818
- {
819
- "name": "unstake_ts",
820
- "docs": [
821
- "Timestamp when unstake was requested, will be used in case `unstake_period` is set"
822
- ],
823
- "type": "u64"
824
- },
825
- {
826
- "name": "_buffer",
827
- "docs": [
828
- "Buffer for additional fields"
829
- ],
830
- "type": {
831
- "array": [
832
- "u8",
833
- 40
834
- ]
835
- }
836
- }
837
- ]
838
- }
479
+ "name": "stake_pool",
480
+ "docs": ["Stake Pool"],
481
+ "writable": true
482
+ },
483
+ {
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
+ }
507
+ },
508
+ {
509
+ "name": "from",
510
+ "docs": ["Token Account from which stake tokens will be transferred"],
511
+ "writable": true
512
+ },
513
+ {
514
+ "name": "vault",
515
+ "docs": ["Stake Pool Vault that stores staked tokens"],
516
+ "writable": true,
517
+ "relations": ["stake_pool"]
518
+ },
519
+ {
520
+ "name": "to",
521
+ "docs": ["Token Account to transfer Stake Mint tokens to"],
522
+ "writable": true
839
523
  },
840
524
  {
841
- "name": "StakePool",
525
+ "name": "payer",
526
+ "docs": ["Owner of the Token Account from which tokens will be staked"],
527
+ "writable": true,
528
+ "signer": true
529
+ },
530
+ {
531
+ "name": "authority"
532
+ },
533
+ {
534
+ "name": "mint",
535
+ "docs": ["Original mint of staked tokens"],
536
+ "writable": true,
537
+ "relations": ["stake_pool"]
538
+ },
539
+ {
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"]
544
+ },
545
+ {
546
+ "name": "token_program"
547
+ },
548
+ {
549
+ "name": "system_program",
550
+ "address": "11111111111111111111111111111111"
551
+ }
552
+ ],
553
+ "args": [
554
+ {
555
+ "name": "nonce",
556
+ "type": "u32"
557
+ },
558
+ {
559
+ "name": "amount",
560
+ "type": "u64"
561
+ },
562
+ {
563
+ "name": "duration",
564
+ "type": "u64"
565
+ }
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
+ },
577
+ {
578
+ "name": "stake_entry",
579
+ "docs": ["Entry that stores Stake Metadata"],
580
+ "writable": true
581
+ },
582
+ {
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"]
615
+ },
616
+ {
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"],
842
758
  "type": {
843
- "kind": "struct",
844
- "fields": [
845
- {
846
- "name": "bump",
847
- "docs": [
848
- "Bump Seed used to sign transactions"
849
- ],
850
- "type": "u8"
851
- },
852
- {
853
- "name": "nonce",
854
- "docs": [
855
- "Nonce to differentiate pools for the same mint"
856
- ],
857
- "type": "u8"
858
- },
859
- {
860
- "name": "mint",
861
- "docs": [
862
- "Mint of the Stake Pool"
863
- ],
864
- "type": "pubkey"
865
- },
866
- {
867
- "name": "creator",
868
- "docs": [
869
- "Initial Creator"
870
- ],
871
- "type": "pubkey"
872
- },
873
- {
874
- "name": "authority",
875
- "docs": [
876
- "Current authority"
877
- ],
878
- "type": "pubkey"
879
- },
880
- {
881
- "name": "min_weight",
882
- "docs": [
883
- "The lowest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
884
- "For instance:",
885
- "* `min_weight = 1 x SCALE_FACTOR_BASE` signifies a minimum multiplier of 1x for min staking duration",
886
- "* `min_weight = 2 x SCALE_FACTOR_BASE` indicates a minimum multiplier of 2x for min staking duration"
887
- ],
888
- "type": "u64"
889
- },
890
- {
891
- "name": "max_weight",
892
- "docs": [
893
- "The highest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
894
- "For instance:",
895
- "* `max_weight = 1 x SCALE_FACTOR_BASE` signifies a max multiplier of 1x for max staking duration",
896
- "* `max_weight = 2 x SCALE_FACTOR_BASE` indicates a max multiplier of 2x for max staking duration"
897
- ],
898
- "type": "u64"
899
- },
900
- {
901
- "name": "min_duration",
902
- "docs": [
903
- "Min Duration of stake in seconds"
904
- ],
905
- "type": "u64"
906
- },
907
- {
908
- "name": "max_duration",
909
- "docs": [
910
- "Max Duration of stake in seconds, the more duration, the more weight the stake has"
911
- ],
912
- "type": "u64"
913
- },
914
- {
915
- "name": "permissionless",
916
- "docs": [
917
- "Whether anyone can add Reward Pools or just admin"
918
- ],
919
- "type": "bool"
920
- },
921
- {
922
- "name": "vault",
923
- "docs": [
924
- "Escrow Account that stores staked tokens"
925
- ],
926
- "type": "pubkey"
927
- },
928
- {
929
- "name": "stake_mint",
930
- "docs": [
931
- "Stake Mint, will be returned in exchange for stake tokens"
932
- ],
933
- "type": "pubkey"
934
- },
935
- {
936
- "name": "total_stake",
937
- "docs": [
938
- "Total number of Staked tokens"
939
- ],
940
- "type": "u64"
941
- },
942
- {
943
- "name": "total_effective_stake",
944
- "docs": [
945
- "Total staked tokens accounting for each stake weight, does not equal `total_stake`,",
946
- "represents a sum of effective stake multiplied by 10^9 for precision"
947
- ],
948
- "type": "u128"
949
- },
950
- {
951
- "name": "freeze_stake_mint",
952
- "docs": [
953
- "Whether we should freeze stake mint token accounts"
954
- ],
955
- "type": "bool"
956
- },
957
- {
958
- "name": "unstake_period",
959
- "docs": [
960
- "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
961
- ],
962
- "type": "u64"
963
- },
964
- {
965
- "name": "_buffer",
966
- "docs": [
967
- "Buffer for additional fields"
968
- ],
969
- "type": {
970
- "array": [
971
- "u8",
972
- 55
973
- ]
974
- }
975
- }
976
- ]
759
+ "array": ["u8", 64]
977
760
  }
978
- }
979
- ]
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
+ ]
980
946
  }