@streamflow/staking 8.2.2 → 8.3.1

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.
@@ -0,0 +1,1721 @@
1
+ {
2
+ "address": "RWRDyfZa6Rk9UYi85yjYYfGmoUqffLqjo6vZdFawEez",
3
+ "metadata": {
4
+ "name": "reward_pool_dynamic",
5
+ "version": "2.2.0",
6
+ "spec": "0.1.0",
7
+ "description": "Reward pools with dynamic rewards distribution"
8
+ },
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": "reward_pool",
25
+ "docs": [
26
+ "Reward 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": "claim_rewards",
46
+ "discriminator": [
47
+ 4,
48
+ 144,
49
+ 132,
50
+ 71,
51
+ 116,
52
+ 23,
53
+ 151,
54
+ 80
55
+ ],
56
+ "accounts": [
57
+ {
58
+ "name": "stake_pool",
59
+ "docs": [
60
+ "Original Stake Pool"
61
+ ],
62
+ "relations": [
63
+ "reward_pool"
64
+ ]
65
+ },
66
+ {
67
+ "name": "reward_pool",
68
+ "docs": [
69
+ "Reward Pool"
70
+ ],
71
+ "writable": true
72
+ },
73
+ {
74
+ "name": "stake_entry",
75
+ "docs": [
76
+ "Stake Entry for which rewards are being claimed"
77
+ ]
78
+ },
79
+ {
80
+ "name": "reward_entry",
81
+ "docs": [
82
+ "Reward Entry that stores metadata about claimed rewards"
83
+ ],
84
+ "writable": true,
85
+ "pda": {
86
+ "seeds": [
87
+ {
88
+ "kind": "const",
89
+ "value": [
90
+ 114,
91
+ 101,
92
+ 119,
93
+ 97,
94
+ 114,
95
+ 100,
96
+ 45,
97
+ 101,
98
+ 110,
99
+ 116,
100
+ 114,
101
+ 121
102
+ ]
103
+ },
104
+ {
105
+ "kind": "account",
106
+ "path": "reward_pool"
107
+ },
108
+ {
109
+ "kind": "account",
110
+ "path": "stake_entry"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "name": "vault",
117
+ "docs": [
118
+ "Reward Pool Vault that stores tokens"
119
+ ],
120
+ "writable": true,
121
+ "relations": [
122
+ "reward_pool"
123
+ ]
124
+ },
125
+ {
126
+ "name": "to",
127
+ "docs": [
128
+ "Account to send the reward tokens to."
129
+ ],
130
+ "writable": true
131
+ },
132
+ {
133
+ "name": "claimant",
134
+ "docs": [
135
+ "Who is claiming the tokens."
136
+ ],
137
+ "writable": true,
138
+ "signer": true
139
+ },
140
+ {
141
+ "name": "mint",
142
+ "docs": [
143
+ "The mint to claim."
144
+ ],
145
+ "relations": [
146
+ "reward_pool"
147
+ ]
148
+ },
149
+ {
150
+ "name": "governor",
151
+ "docs": [
152
+ "Reward Pool governor"
153
+ ],
154
+ "optional": true
155
+ },
156
+ {
157
+ "name": "vote",
158
+ "docs": [
159
+ "Vote for the active proposal"
160
+ ],
161
+ "optional": true
162
+ },
163
+ {
164
+ "name": "token_program"
165
+ },
166
+ {
167
+ "name": "system_program",
168
+ "address": "11111111111111111111111111111111"
169
+ }
170
+ ],
171
+ "args": []
172
+ },
173
+ {
174
+ "name": "close_entry",
175
+ "discriminator": [
176
+ 132,
177
+ 26,
178
+ 202,
179
+ 145,
180
+ 190,
181
+ 37,
182
+ 114,
183
+ 67
184
+ ],
185
+ "accounts": [
186
+ {
187
+ "name": "stake_pool",
188
+ "docs": [
189
+ "Stake Pool"
190
+ ],
191
+ "relations": [
192
+ "reward_pool"
193
+ ]
194
+ },
195
+ {
196
+ "name": "reward_pool",
197
+ "docs": [
198
+ "Reward Pool"
199
+ ]
200
+ },
201
+ {
202
+ "name": "stake_entry",
203
+ "pda": {
204
+ "seeds": [
205
+ {
206
+ "kind": "const",
207
+ "value": [
208
+ 115,
209
+ 116,
210
+ 97,
211
+ 107,
212
+ 101,
213
+ 45,
214
+ 101,
215
+ 110,
216
+ 116,
217
+ 114,
218
+ 121
219
+ ]
220
+ },
221
+ {
222
+ "kind": "account",
223
+ "path": "stake_pool"
224
+ },
225
+ {
226
+ "kind": "account",
227
+ "path": "authority"
228
+ },
229
+ {
230
+ "kind": "arg",
231
+ "path": "stake_nonce"
232
+ }
233
+ ],
234
+ "program": {
235
+ "kind": "const",
236
+ "value": [
237
+ 6,
238
+ 133,
239
+ 25,
240
+ 160,
241
+ 130,
242
+ 0,
243
+ 119,
244
+ 110,
245
+ 227,
246
+ 8,
247
+ 28,
248
+ 85,
249
+ 214,
250
+ 116,
251
+ 67,
252
+ 41,
253
+ 155,
254
+ 152,
255
+ 181,
256
+ 139,
257
+ 124,
258
+ 208,
259
+ 85,
260
+ 71,
261
+ 175,
262
+ 40,
263
+ 123,
264
+ 71,
265
+ 139,
266
+ 170,
267
+ 201,
268
+ 178
269
+ ]
270
+ }
271
+ }
272
+ },
273
+ {
274
+ "name": "reward_entry",
275
+ "docs": [
276
+ "Reward Entry that stores metadata about claimed rewards"
277
+ ],
278
+ "writable": true,
279
+ "pda": {
280
+ "seeds": [
281
+ {
282
+ "kind": "const",
283
+ "value": [
284
+ 114,
285
+ 101,
286
+ 119,
287
+ 97,
288
+ 114,
289
+ 100,
290
+ 45,
291
+ 101,
292
+ 110,
293
+ 116,
294
+ 114,
295
+ 121
296
+ ]
297
+ },
298
+ {
299
+ "kind": "account",
300
+ "path": "reward_pool"
301
+ },
302
+ {
303
+ "kind": "account",
304
+ "path": "stake_entry"
305
+ }
306
+ ]
307
+ }
308
+ },
309
+ {
310
+ "name": "authority",
311
+ "writable": true,
312
+ "signer": true
313
+ },
314
+ {
315
+ "name": "rent_sponsor",
316
+ "writable": true,
317
+ "pda": {
318
+ "seeds": [
319
+ {
320
+ "kind": "const",
321
+ "value": [
322
+ 114,
323
+ 101,
324
+ 110,
325
+ 116,
326
+ 45,
327
+ 115,
328
+ 112,
329
+ 111,
330
+ 110,
331
+ 115,
332
+ 111,
333
+ 114
334
+ ]
335
+ }
336
+ ]
337
+ }
338
+ }
339
+ ],
340
+ "args": [
341
+ {
342
+ "name": "stake_nonce",
343
+ "type": "u32"
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "name": "create_entry",
349
+ "discriminator": [
350
+ 248,
351
+ 207,
352
+ 142,
353
+ 242,
354
+ 66,
355
+ 162,
356
+ 150,
357
+ 16
358
+ ],
359
+ "accounts": [
360
+ {
361
+ "name": "stake_pool",
362
+ "docs": [
363
+ "Original Stake Pool"
364
+ ],
365
+ "relations": [
366
+ "reward_pool",
367
+ "stake_entry"
368
+ ]
369
+ },
370
+ {
371
+ "name": "reward_pool",
372
+ "docs": [
373
+ "Reward Pool"
374
+ ],
375
+ "writable": true
376
+ },
377
+ {
378
+ "name": "stake_entry",
379
+ "docs": [
380
+ "Stake Entry for which rewards are being claimed"
381
+ ]
382
+ },
383
+ {
384
+ "name": "reward_entry",
385
+ "docs": [
386
+ "Reward Entry that stores metadata about claimed rewards"
387
+ ],
388
+ "writable": true,
389
+ "pda": {
390
+ "seeds": [
391
+ {
392
+ "kind": "const",
393
+ "value": [
394
+ 114,
395
+ 101,
396
+ 119,
397
+ 97,
398
+ 114,
399
+ 100,
400
+ 45,
401
+ 101,
402
+ 110,
403
+ 116,
404
+ 114,
405
+ 121
406
+ ]
407
+ },
408
+ {
409
+ "kind": "account",
410
+ "path": "reward_pool"
411
+ },
412
+ {
413
+ "kind": "account",
414
+ "path": "stake_entry"
415
+ }
416
+ ]
417
+ }
418
+ },
419
+ {
420
+ "name": "payer",
421
+ "docs": [
422
+ "Rent payer"
423
+ ],
424
+ "writable": true,
425
+ "signer": true
426
+ },
427
+ {
428
+ "name": "authority"
429
+ },
430
+ {
431
+ "name": "rent_sponsor",
432
+ "writable": true,
433
+ "pda": {
434
+ "seeds": [
435
+ {
436
+ "kind": "const",
437
+ "value": [
438
+ 114,
439
+ 101,
440
+ 110,
441
+ 116,
442
+ 45,
443
+ 115,
444
+ 112,
445
+ 111,
446
+ 110,
447
+ 115,
448
+ 111,
449
+ 114
450
+ ]
451
+ }
452
+ ]
453
+ }
454
+ },
455
+ {
456
+ "name": "system_program",
457
+ "address": "11111111111111111111111111111111"
458
+ }
459
+ ],
460
+ "args": []
461
+ },
462
+ {
463
+ "name": "create_pool",
464
+ "discriminator": [
465
+ 233,
466
+ 146,
467
+ 209,
468
+ 142,
469
+ 207,
470
+ 104,
471
+ 64,
472
+ 188
473
+ ],
474
+ "accounts": [
475
+ {
476
+ "name": "stake_pool",
477
+ "docs": [
478
+ "Stake Pool to Which Reward Pool is being added"
479
+ ]
480
+ },
481
+ {
482
+ "name": "reward_pool",
483
+ "docs": [
484
+ "Reward Pool to add"
485
+ ],
486
+ "writable": true,
487
+ "pda": {
488
+ "seeds": [
489
+ {
490
+ "kind": "const",
491
+ "value": [
492
+ 114,
493
+ 101,
494
+ 119,
495
+ 97,
496
+ 114,
497
+ 100,
498
+ 45,
499
+ 112,
500
+ 111,
501
+ 111,
502
+ 108
503
+ ]
504
+ },
505
+ {
506
+ "kind": "account",
507
+ "path": "stake_pool"
508
+ },
509
+ {
510
+ "kind": "account",
511
+ "path": "mint"
512
+ },
513
+ {
514
+ "kind": "arg",
515
+ "path": "nonce"
516
+ }
517
+ ]
518
+ }
519
+ },
520
+ {
521
+ "name": "mint",
522
+ "docs": [
523
+ "Mint used for rewards"
524
+ ]
525
+ },
526
+ {
527
+ "name": "vault",
528
+ "docs": [
529
+ "Escrow Account that will store the tokens"
530
+ ],
531
+ "writable": true,
532
+ "pda": {
533
+ "seeds": [
534
+ {
535
+ "kind": "const",
536
+ "value": [
537
+ 114,
538
+ 101,
539
+ 119,
540
+ 97,
541
+ 114,
542
+ 100,
543
+ 45,
544
+ 118,
545
+ 97,
546
+ 117,
547
+ 108,
548
+ 116
549
+ ]
550
+ },
551
+ {
552
+ "kind": "account",
553
+ "path": "reward_pool"
554
+ }
555
+ ]
556
+ }
557
+ },
558
+ {
559
+ "name": "governor",
560
+ "docs": [
561
+ "Governor to be set for the RewardPool"
562
+ ],
563
+ "optional": true
564
+ },
565
+ {
566
+ "name": "creator",
567
+ "docs": [
568
+ "Reward Pool creator"
569
+ ],
570
+ "writable": true,
571
+ "signer": true
572
+ },
573
+ {
574
+ "name": "token_program"
575
+ },
576
+ {
577
+ "name": "system_program",
578
+ "address": "11111111111111111111111111111111"
579
+ }
580
+ ],
581
+ "args": [
582
+ {
583
+ "name": "nonce",
584
+ "type": "u8"
585
+ },
586
+ {
587
+ "name": "permissionless",
588
+ "type": "bool"
589
+ },
590
+ {
591
+ "name": "claim_period",
592
+ "type": "u64"
593
+ },
594
+ {
595
+ "name": "claim_start_ts",
596
+ "type": "u64"
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ "name": "fund_pool",
602
+ "discriminator": [
603
+ 36,
604
+ 57,
605
+ 233,
606
+ 176,
607
+ 181,
608
+ 20,
609
+ 87,
610
+ 159
611
+ ],
612
+ "accounts": [
613
+ {
614
+ "name": "funder",
615
+ "docs": [
616
+ "Reward Pool funder"
617
+ ],
618
+ "writable": true,
619
+ "signer": true
620
+ },
621
+ {
622
+ "name": "from",
623
+ "docs": [
624
+ "Token Account from which tokens will be transferred"
625
+ ],
626
+ "writable": true
627
+ },
628
+ {
629
+ "name": "vault",
630
+ "docs": [
631
+ "Reward Pool Vault that stores tokens"
632
+ ],
633
+ "writable": true,
634
+ "relations": [
635
+ "reward_pool"
636
+ ]
637
+ },
638
+ {
639
+ "name": "mint",
640
+ "docs": [
641
+ "Mint of reward tokens"
642
+ ],
643
+ "relations": [
644
+ "reward_pool"
645
+ ]
646
+ },
647
+ {
648
+ "name": "stake_pool",
649
+ "docs": [
650
+ "Original Stake Pool"
651
+ ],
652
+ "relations": [
653
+ "reward_pool"
654
+ ]
655
+ },
656
+ {
657
+ "name": "reward_pool",
658
+ "docs": [
659
+ "Reward Pool"
660
+ ],
661
+ "writable": true
662
+ },
663
+ {
664
+ "name": "streamflow_treasury",
665
+ "writable": true,
666
+ "address": "5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"
667
+ },
668
+ {
669
+ "name": "streamflow_treasury_tokens",
670
+ "writable": true,
671
+ "pda": {
672
+ "seeds": [
673
+ {
674
+ "kind": "account",
675
+ "path": "streamflow_treasury"
676
+ },
677
+ {
678
+ "kind": "account",
679
+ "path": "token_program"
680
+ },
681
+ {
682
+ "kind": "account",
683
+ "path": "mint"
684
+ }
685
+ ],
686
+ "program": {
687
+ "kind": "const",
688
+ "value": [
689
+ 140,
690
+ 151,
691
+ 37,
692
+ 143,
693
+ 78,
694
+ 36,
695
+ 137,
696
+ 241,
697
+ 187,
698
+ 61,
699
+ 16,
700
+ 41,
701
+ 20,
702
+ 142,
703
+ 13,
704
+ 131,
705
+ 11,
706
+ 90,
707
+ 19,
708
+ 153,
709
+ 218,
710
+ 255,
711
+ 16,
712
+ 132,
713
+ 4,
714
+ 142,
715
+ 123,
716
+ 216,
717
+ 219,
718
+ 233,
719
+ 248,
720
+ 89
721
+ ]
722
+ }
723
+ }
724
+ },
725
+ {
726
+ "name": "config",
727
+ "docs": [
728
+ "Fee Configuration"
729
+ ],
730
+ "pda": {
731
+ "seeds": [
732
+ {
733
+ "kind": "const",
734
+ "value": [
735
+ 99,
736
+ 111,
737
+ 110,
738
+ 102,
739
+ 105,
740
+ 103
741
+ ]
742
+ }
743
+ ],
744
+ "program": {
745
+ "kind": "account",
746
+ "path": "fee_program"
747
+ }
748
+ }
749
+ },
750
+ {
751
+ "name": "fee_value",
752
+ "docs": [
753
+ "Fee Value for the funder account"
754
+ ],
755
+ "optional": true,
756
+ "pda": {
757
+ "seeds": [
758
+ {
759
+ "kind": "const",
760
+ "value": [
761
+ 102,
762
+ 101,
763
+ 101,
764
+ 45,
765
+ 118,
766
+ 97,
767
+ 108,
768
+ 117,
769
+ 101
770
+ ]
771
+ },
772
+ {
773
+ "kind": "account",
774
+ "path": "funder"
775
+ }
776
+ ],
777
+ "program": {
778
+ "kind": "account",
779
+ "path": "fee_program"
780
+ }
781
+ }
782
+ },
783
+ {
784
+ "name": "fee_program",
785
+ "address": "FEELzfBhsWXTNJX53zZcDVfRNoFYZQ6cZA3jLiGVL16V"
786
+ },
787
+ {
788
+ "name": "token_program"
789
+ }
790
+ ],
791
+ "args": [
792
+ {
793
+ "name": "amount",
794
+ "type": "u64"
795
+ }
796
+ ]
797
+ },
798
+ {
799
+ "name": "set_governor",
800
+ "discriminator": [
801
+ 47,
802
+ 75,
803
+ 9,
804
+ 199,
805
+ 215,
806
+ 187,
807
+ 161,
808
+ 161
809
+ ],
810
+ "accounts": [
811
+ {
812
+ "name": "stake_pool",
813
+ "docs": [
814
+ "Stake Pool - to verify the governor belongs to the same stake pool"
815
+ ],
816
+ "relations": [
817
+ "reward_pool",
818
+ "governor"
819
+ ]
820
+ },
821
+ {
822
+ "name": "reward_pool",
823
+ "docs": [
824
+ "Reward Pool - to be updated with new governor"
825
+ ],
826
+ "writable": true
827
+ },
828
+ {
829
+ "name": "governor",
830
+ "docs": [
831
+ "New Governor to be set for the RewardPool"
832
+ ]
833
+ },
834
+ {
835
+ "name": "authority",
836
+ "docs": [
837
+ "Current Authority - only authority can set the governor"
838
+ ],
839
+ "writable": true,
840
+ "signer": true
841
+ }
842
+ ],
843
+ "args": []
844
+ },
845
+ {
846
+ "name": "update_pool",
847
+ "discriminator": [
848
+ 239,
849
+ 214,
850
+ 170,
851
+ 78,
852
+ 36,
853
+ 35,
854
+ 30,
855
+ 34
856
+ ],
857
+ "accounts": [
858
+ {
859
+ "name": "authority",
860
+ "docs": [
861
+ "Current Authority"
862
+ ],
863
+ "writable": true,
864
+ "signer": true
865
+ },
866
+ {
867
+ "name": "reward_pool",
868
+ "docs": [
869
+ "Reward Pool"
870
+ ],
871
+ "writable": true
872
+ }
873
+ ],
874
+ "args": [
875
+ {
876
+ "name": "claim_period",
877
+ "type": {
878
+ "option": "u64"
879
+ }
880
+ },
881
+ {
882
+ "name": "permissionless",
883
+ "type": {
884
+ "option": "bool"
885
+ }
886
+ }
887
+ ]
888
+ }
889
+ ],
890
+ "accounts": [
891
+ {
892
+ "name": "Config",
893
+ "discriminator": [
894
+ 155,
895
+ 12,
896
+ 170,
897
+ 224,
898
+ 30,
899
+ 250,
900
+ 204,
901
+ 130
902
+ ]
903
+ },
904
+ {
905
+ "name": "FeeValue",
906
+ "discriminator": [
907
+ 10,
908
+ 188,
909
+ 89,
910
+ 64,
911
+ 4,
912
+ 183,
913
+ 231,
914
+ 0
915
+ ]
916
+ },
917
+ {
918
+ "name": "Governor",
919
+ "discriminator": [
920
+ 37,
921
+ 136,
922
+ 44,
923
+ 80,
924
+ 68,
925
+ 85,
926
+ 213,
927
+ 178
928
+ ]
929
+ },
930
+ {
931
+ "name": "RewardEntry",
932
+ "discriminator": [
933
+ 208,
934
+ 191,
935
+ 173,
936
+ 14,
937
+ 213,
938
+ 84,
939
+ 179,
940
+ 162
941
+ ]
942
+ },
943
+ {
944
+ "name": "RewardPool",
945
+ "discriminator": [
946
+ 134,
947
+ 121,
948
+ 197,
949
+ 211,
950
+ 133,
951
+ 154,
952
+ 82,
953
+ 32
954
+ ]
955
+ },
956
+ {
957
+ "name": "StakeEntry",
958
+ "discriminator": [
959
+ 187,
960
+ 127,
961
+ 9,
962
+ 35,
963
+ 155,
964
+ 68,
965
+ 86,
966
+ 40
967
+ ]
968
+ },
969
+ {
970
+ "name": "StakePool",
971
+ "discriminator": [
972
+ 121,
973
+ 34,
974
+ 206,
975
+ 21,
976
+ 79,
977
+ 127,
978
+ 255,
979
+ 28
980
+ ]
981
+ },
982
+ {
983
+ "name": "Vote",
984
+ "discriminator": [
985
+ 96,
986
+ 91,
987
+ 104,
988
+ 57,
989
+ 145,
990
+ 35,
991
+ 172,
992
+ 155
993
+ ]
994
+ }
995
+ ],
996
+ "errors": [
997
+ {
998
+ "code": 6000,
999
+ "name": "ArithmeticError",
1000
+ "msg": "Arithmetic Error (overflow/underflow)"
1001
+ },
1002
+ {
1003
+ "code": 6001,
1004
+ "name": "Unauthorized",
1005
+ "msg": "Account is not authorized to execute this instruction"
1006
+ },
1007
+ {
1008
+ "code": 6002,
1009
+ "name": "OwnerMismatch",
1010
+ "msg": "Token account owner did not match intended owner"
1011
+ },
1012
+ {
1013
+ "code": 6003,
1014
+ "name": "InvalidRewardPool",
1015
+ "msg": "Provided Reward Pool is Invalid"
1016
+ },
1017
+ {
1018
+ "code": 6004,
1019
+ "name": "InvalidRewardVault",
1020
+ "msg": "Incorrect vault for RewardPool"
1021
+ },
1022
+ {
1023
+ "code": 6005,
1024
+ "name": "InvalidRewardEntry",
1025
+ "msg": "Provided Reward Entry is Invalid"
1026
+ },
1027
+ {
1028
+ "code": 6006,
1029
+ "name": "InvalidStakeEntry",
1030
+ "msg": "Provided Stake Entry is Invalid"
1031
+ },
1032
+ {
1033
+ "code": 6007,
1034
+ "name": "InvalidStakePool",
1035
+ "msg": "Provided Stake Pool does not equal the Governor Stake Pool"
1036
+ },
1037
+ {
1038
+ "code": 6008,
1039
+ "name": "InvalidMint",
1040
+ "msg": "Provided Mint does not equal the Pool Mint"
1041
+ },
1042
+ {
1043
+ "code": 6009,
1044
+ "name": "StakeEntryClosed",
1045
+ "msg": "Stake Entry is closed, rewards are not claimable anymore"
1046
+ },
1047
+ {
1048
+ "code": 6010,
1049
+ "name": "StakeEntryOpened",
1050
+ "msg": "Stake Entry is still opened, closing is not possible"
1051
+ },
1052
+ {
1053
+ "code": 6011,
1054
+ "name": "InvalidClaimStartTs",
1055
+ "msg": "Invalid claim start ts provided"
1056
+ },
1057
+ {
1058
+ "code": 6012,
1059
+ "name": "ClaimTooEarly",
1060
+ "msg": "Claiming is not possible until claim period has passed"
1061
+ },
1062
+ {
1063
+ "code": 6013,
1064
+ "name": "RewardPoolDrained",
1065
+ "msg": "Reward Pool does not have enough Rewards for Claiming"
1066
+ },
1067
+ {
1068
+ "code": 6014,
1069
+ "name": "InvalidGovernor",
1070
+ "msg": "Provided governor is invalid"
1071
+ },
1072
+ {
1073
+ "code": 6015,
1074
+ "name": "InvalidVote",
1075
+ "msg": "Provided vote is invalid"
1076
+ },
1077
+ {
1078
+ "code": 6016,
1079
+ "name": "VoteRequired",
1080
+ "msg": "Vote is required for claiming"
1081
+ }
1082
+ ],
1083
+ "types": [
1084
+ {
1085
+ "name": "Config",
1086
+ "type": {
1087
+ "kind": "struct",
1088
+ "fields": [
1089
+ {
1090
+ "name": "authority",
1091
+ "docs": [
1092
+ "Fee Manager authority"
1093
+ ],
1094
+ "type": "pubkey"
1095
+ },
1096
+ {
1097
+ "name": "streamflow_fee",
1098
+ "docs": [
1099
+ "Default fee"
1100
+ ],
1101
+ "type": "u64"
1102
+ },
1103
+ {
1104
+ "name": "_buffer_1",
1105
+ "docs": [
1106
+ "Buffer for additional fields"
1107
+ ],
1108
+ "type": {
1109
+ "array": [
1110
+ "u8",
1111
+ 64
1112
+ ]
1113
+ }
1114
+ },
1115
+ {
1116
+ "name": "_buffer_2",
1117
+ "docs": [
1118
+ "Buffer for additional fields"
1119
+ ],
1120
+ "type": {
1121
+ "array": [
1122
+ "u8",
1123
+ 64
1124
+ ]
1125
+ }
1126
+ },
1127
+ {
1128
+ "name": "_buffer_3",
1129
+ "docs": [
1130
+ "Buffer for additional fields"
1131
+ ],
1132
+ "type": {
1133
+ "array": [
1134
+ "u8",
1135
+ 64
1136
+ ]
1137
+ }
1138
+ }
1139
+ ]
1140
+ }
1141
+ },
1142
+ {
1143
+ "name": "FeeValue",
1144
+ "type": {
1145
+ "kind": "struct",
1146
+ "fields": [
1147
+ {
1148
+ "name": "streamflow_fee",
1149
+ "type": "u64"
1150
+ },
1151
+ {
1152
+ "name": "_buffer",
1153
+ "docs": [
1154
+ "Buffer for additional fields"
1155
+ ],
1156
+ "type": {
1157
+ "array": [
1158
+ "u8",
1159
+ 64
1160
+ ]
1161
+ }
1162
+ }
1163
+ ]
1164
+ }
1165
+ },
1166
+ {
1167
+ "name": "Governor",
1168
+ "type": {
1169
+ "kind": "struct",
1170
+ "fields": [
1171
+ {
1172
+ "name": "bump",
1173
+ "docs": [
1174
+ "Bump Seed used to sign transactions"
1175
+ ],
1176
+ "type": "u8"
1177
+ },
1178
+ {
1179
+ "name": "nonce",
1180
+ "docs": [
1181
+ "Nonce to support multiple governors for the same pool"
1182
+ ],
1183
+ "type": "u8"
1184
+ },
1185
+ {
1186
+ "name": "stake_pool",
1187
+ "docs": [
1188
+ "Stake Pool for which Reward Pool was added"
1189
+ ],
1190
+ "type": "pubkey"
1191
+ },
1192
+ {
1193
+ "name": "authority",
1194
+ "docs": [
1195
+ "Authority of the Governor that can add proposals and set the current one"
1196
+ ],
1197
+ "type": "pubkey"
1198
+ },
1199
+ {
1200
+ "name": "current_proposal",
1201
+ "docs": [
1202
+ "Address of the current proposal"
1203
+ ],
1204
+ "type": "pubkey"
1205
+ },
1206
+ {
1207
+ "name": "total_proposals",
1208
+ "docs": [
1209
+ "Total number of created proposals"
1210
+ ],
1211
+ "type": "u64"
1212
+ },
1213
+ {
1214
+ "name": "_buffer",
1215
+ "docs": [
1216
+ "Buffer for additional fields"
1217
+ ],
1218
+ "type": {
1219
+ "array": [
1220
+ "u8",
1221
+ 128
1222
+ ]
1223
+ }
1224
+ }
1225
+ ]
1226
+ }
1227
+ },
1228
+ {
1229
+ "name": "RewardEntry",
1230
+ "type": {
1231
+ "kind": "struct",
1232
+ "fields": [
1233
+ {
1234
+ "name": "reward_pool",
1235
+ "docs": [
1236
+ "Reward Pool"
1237
+ ],
1238
+ "type": "pubkey"
1239
+ },
1240
+ {
1241
+ "name": "stake_entry",
1242
+ "docs": [
1243
+ "Stake Entry for which reward entry was initialized"
1244
+ ],
1245
+ "type": "pubkey"
1246
+ },
1247
+ {
1248
+ "name": "created_ts",
1249
+ "docs": [
1250
+ "Timestamp when reward entry has been created"
1251
+ ],
1252
+ "type": "u64"
1253
+ },
1254
+ {
1255
+ "name": "rewards_state",
1256
+ "docs": [
1257
+ "State of the reward disitrbution, accounts for the last state in the reward pool"
1258
+ ],
1259
+ "type": "u128"
1260
+ },
1261
+ {
1262
+ "name": "claimed_amount",
1263
+ "docs": [
1264
+ "Sum of already claimed rewards"
1265
+ ],
1266
+ "type": "u64"
1267
+ },
1268
+ {
1269
+ "name": "last_claimed_ts",
1270
+ "docs": [
1271
+ "Timestamp when rewards have been claimed last time"
1272
+ ],
1273
+ "type": "u64"
1274
+ },
1275
+ {
1276
+ "name": "is_sponsored",
1277
+ "docs": [
1278
+ "Whether the entry rent has been sponsored by the rent vault"
1279
+ ],
1280
+ "type": "bool"
1281
+ },
1282
+ {
1283
+ "name": "_buffer",
1284
+ "docs": [
1285
+ "Buffer for additional fields"
1286
+ ],
1287
+ "type": {
1288
+ "array": [
1289
+ "u8",
1290
+ 31
1291
+ ]
1292
+ }
1293
+ }
1294
+ ]
1295
+ }
1296
+ },
1297
+ {
1298
+ "name": "RewardPool",
1299
+ "type": {
1300
+ "kind": "struct",
1301
+ "fields": [
1302
+ {
1303
+ "name": "bump",
1304
+ "docs": [
1305
+ "Bump Seed used to sign transactions"
1306
+ ],
1307
+ "type": "u8"
1308
+ },
1309
+ {
1310
+ "name": "nonce",
1311
+ "docs": [
1312
+ "Nonce to differentiate pools for the same mint"
1313
+ ],
1314
+ "type": "u8"
1315
+ },
1316
+ {
1317
+ "name": "stake_pool",
1318
+ "docs": [
1319
+ "Stake Pool for which Reward Pool was added"
1320
+ ],
1321
+ "type": "pubkey"
1322
+ },
1323
+ {
1324
+ "name": "governor",
1325
+ "docs": [
1326
+ "Governor of the Stake Pool, should be passed at claiming if set"
1327
+ ],
1328
+ "type": "pubkey"
1329
+ },
1330
+ {
1331
+ "name": "mint",
1332
+ "docs": [
1333
+ "Mint of Reward Pool"
1334
+ ],
1335
+ "type": "pubkey"
1336
+ },
1337
+ {
1338
+ "name": "creator",
1339
+ "docs": [
1340
+ "Creator of the Pool"
1341
+ ],
1342
+ "type": "pubkey"
1343
+ },
1344
+ {
1345
+ "name": "authority",
1346
+ "docs": [
1347
+ "Current authority"
1348
+ ],
1349
+ "type": "pubkey"
1350
+ },
1351
+ {
1352
+ "name": "permissionless",
1353
+ "docs": [
1354
+ "Whether anyone can fund the Pool"
1355
+ ],
1356
+ "type": "bool"
1357
+ },
1358
+ {
1359
+ "name": "claim_period",
1360
+ "docs": [
1361
+ "Period of claims, may be used to block consecutive claims within the same period"
1362
+ ],
1363
+ "type": "u64"
1364
+ },
1365
+ {
1366
+ "name": "claim_start_ts",
1367
+ "docs": [
1368
+ "Time when claiming starts, will be used as a base timestamp if claim_period is set"
1369
+ ],
1370
+ "type": "u64"
1371
+ },
1372
+ {
1373
+ "name": "vault",
1374
+ "docs": [
1375
+ "Escrow Account that stores reward tokens"
1376
+ ],
1377
+ "type": "pubkey"
1378
+ },
1379
+ {
1380
+ "name": "funded_amount",
1381
+ "docs": [
1382
+ "Total funded amount"
1383
+ ],
1384
+ "type": "u64"
1385
+ },
1386
+ {
1387
+ "name": "claimed_amount",
1388
+ "docs": [
1389
+ "Total number of rewards claimed"
1390
+ ],
1391
+ "type": "u64"
1392
+ },
1393
+ {
1394
+ "name": "rewards_state",
1395
+ "docs": [
1396
+ "Ever increasing accumulator of the amount of rewards per effective stake.\n Said another way, if a user deposited before any rewards were added to the\n `vault`, then this would be the token amount per effective stake they could\n claim."
1397
+ ],
1398
+ "type": "u128"
1399
+ },
1400
+ {
1401
+ "name": "last_amount",
1402
+ "docs": [
1403
+ "latest amount of tokens in the vault"
1404
+ ],
1405
+ "type": "u64"
1406
+ },
1407
+ {
1408
+ "name": "created_ts",
1409
+ "docs": [
1410
+ "Time when Reward Pool was created"
1411
+ ],
1412
+ "type": "u64"
1413
+ },
1414
+ {
1415
+ "name": "_buffer",
1416
+ "docs": [
1417
+ "Buffer for additional fields"
1418
+ ],
1419
+ "type": {
1420
+ "array": [
1421
+ "u8",
1422
+ 128
1423
+ ]
1424
+ }
1425
+ }
1426
+ ]
1427
+ }
1428
+ },
1429
+ {
1430
+ "name": "StakeEntry",
1431
+ "type": {
1432
+ "kind": "struct",
1433
+ "fields": [
1434
+ {
1435
+ "name": "nonce",
1436
+ "docs": [
1437
+ "Nonce to differentiate stakes for the same pool"
1438
+ ],
1439
+ "type": "u32"
1440
+ },
1441
+ {
1442
+ "name": "stake_pool",
1443
+ "docs": [
1444
+ "Stake Pool for which tokens were staked"
1445
+ ],
1446
+ "type": "pubkey"
1447
+ },
1448
+ {
1449
+ "name": "payer",
1450
+ "docs": [
1451
+ "Original Owner of Staked tokens"
1452
+ ],
1453
+ "type": "pubkey"
1454
+ },
1455
+ {
1456
+ "name": "authority",
1457
+ "docs": [
1458
+ "Authority of the Entry"
1459
+ ],
1460
+ "type": "pubkey"
1461
+ },
1462
+ {
1463
+ "name": "amount",
1464
+ "docs": [
1465
+ "Amount of deposited funds"
1466
+ ],
1467
+ "type": "u64"
1468
+ },
1469
+ {
1470
+ "name": "duration",
1471
+ "docs": [
1472
+ "Duration of the lockup"
1473
+ ],
1474
+ "type": "u64"
1475
+ },
1476
+ {
1477
+ "name": "effective_amount",
1478
+ "docs": [
1479
+ "Effective Amount staked, does not equal to deposited amount, accounts for Stake Weight"
1480
+ ],
1481
+ "type": "u128"
1482
+ },
1483
+ {
1484
+ "name": "created_ts",
1485
+ "docs": [
1486
+ "Timestamp when Deposit was made"
1487
+ ],
1488
+ "type": "u64"
1489
+ },
1490
+ {
1491
+ "name": "closed_ts",
1492
+ "docs": [
1493
+ "Timestamp when entry has been closed"
1494
+ ],
1495
+ "type": "u64"
1496
+ },
1497
+ {
1498
+ "name": "prior_total_effective_stake",
1499
+ "docs": [
1500
+ "Total effective stake at the time of staking"
1501
+ ],
1502
+ "type": "u128"
1503
+ },
1504
+ {
1505
+ "name": "unstake_ts",
1506
+ "docs": [
1507
+ "Timestamp when unstake was requested, will be used in case `unstake_period` is set"
1508
+ ],
1509
+ "type": "u64"
1510
+ },
1511
+ {
1512
+ "name": "is_sponsored",
1513
+ "docs": [
1514
+ "Whether the entry rent has been sponsored by the rent vault"
1515
+ ],
1516
+ "type": "bool"
1517
+ },
1518
+ {
1519
+ "name": "_buffer",
1520
+ "docs": [
1521
+ "Buffer for additional fields"
1522
+ ],
1523
+ "type": {
1524
+ "array": [
1525
+ "u8",
1526
+ 39
1527
+ ]
1528
+ }
1529
+ }
1530
+ ]
1531
+ }
1532
+ },
1533
+ {
1534
+ "name": "StakePool",
1535
+ "type": {
1536
+ "kind": "struct",
1537
+ "fields": [
1538
+ {
1539
+ "name": "bump",
1540
+ "docs": [
1541
+ "Bump Seed used to sign transactions"
1542
+ ],
1543
+ "type": "u8"
1544
+ },
1545
+ {
1546
+ "name": "nonce",
1547
+ "docs": [
1548
+ "Nonce to differentiate pools for the same mint"
1549
+ ],
1550
+ "type": "u8"
1551
+ },
1552
+ {
1553
+ "name": "mint",
1554
+ "docs": [
1555
+ "Mint of the Stake Pool"
1556
+ ],
1557
+ "type": "pubkey"
1558
+ },
1559
+ {
1560
+ "name": "creator",
1561
+ "docs": [
1562
+ "Initial Creator"
1563
+ ],
1564
+ "type": "pubkey"
1565
+ },
1566
+ {
1567
+ "name": "authority",
1568
+ "docs": [
1569
+ "Current authority"
1570
+ ],
1571
+ "type": "pubkey"
1572
+ },
1573
+ {
1574
+ "name": "min_weight",
1575
+ "docs": [
1576
+ "The lowest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
1577
+ "For instance:",
1578
+ "* `min_weight = 1 x SCALE_FACTOR_BASE` signifies a minimum multiplier of 1x for min staking duration",
1579
+ "* `min_weight = 2 x SCALE_FACTOR_BASE` indicates a minimum multiplier of 2x for min staking duration"
1580
+ ],
1581
+ "type": "u64"
1582
+ },
1583
+ {
1584
+ "name": "max_weight",
1585
+ "docs": [
1586
+ "The highest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
1587
+ "For instance:",
1588
+ "* `max_weight = 1 x SCALE_FACTOR_BASE` signifies a max multiplier of 1x for max staking duration",
1589
+ "* `max_weight = 2 x SCALE_FACTOR_BASE` indicates a max multiplier of 2x for max staking duration"
1590
+ ],
1591
+ "type": "u64"
1592
+ },
1593
+ {
1594
+ "name": "min_duration",
1595
+ "docs": [
1596
+ "Min Duration of stake in seconds"
1597
+ ],
1598
+ "type": "u64"
1599
+ },
1600
+ {
1601
+ "name": "max_duration",
1602
+ "docs": [
1603
+ "Max Duration of stake in seconds, the more duration, the more weight the stake has"
1604
+ ],
1605
+ "type": "u64"
1606
+ },
1607
+ {
1608
+ "name": "permissionless",
1609
+ "docs": [
1610
+ "Whether anyone can add Reward Pools or just admin"
1611
+ ],
1612
+ "type": "bool"
1613
+ },
1614
+ {
1615
+ "name": "vault",
1616
+ "docs": [
1617
+ "Escrow Account that stores staked tokens"
1618
+ ],
1619
+ "type": "pubkey"
1620
+ },
1621
+ {
1622
+ "name": "stake_mint",
1623
+ "docs": [
1624
+ "Stake Mint, will be returned in exchange for stake tokens"
1625
+ ],
1626
+ "type": "pubkey"
1627
+ },
1628
+ {
1629
+ "name": "total_stake",
1630
+ "docs": [
1631
+ "Total number of Staked tokens"
1632
+ ],
1633
+ "type": "u64"
1634
+ },
1635
+ {
1636
+ "name": "total_effective_stake",
1637
+ "docs": [
1638
+ "Total staked tokens accounting for each stake weight, does not equal `total_stake`,",
1639
+ "represents a sum of effective stake multiplied by 10^9 for precision"
1640
+ ],
1641
+ "type": "u128"
1642
+ },
1643
+ {
1644
+ "name": "freeze_stake_mint",
1645
+ "docs": [
1646
+ "Whether we should freeze stake mint token accounts"
1647
+ ],
1648
+ "type": "bool"
1649
+ },
1650
+ {
1651
+ "name": "unstake_period",
1652
+ "docs": [
1653
+ "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
1654
+ ],
1655
+ "type": "u64"
1656
+ },
1657
+ {
1658
+ "name": "_buffer",
1659
+ "docs": [
1660
+ "Buffer for additional fields"
1661
+ ],
1662
+ "type": {
1663
+ "array": [
1664
+ "u8",
1665
+ 55
1666
+ ]
1667
+ }
1668
+ }
1669
+ ]
1670
+ }
1671
+ },
1672
+ {
1673
+ "name": "Vote",
1674
+ "type": {
1675
+ "kind": "struct",
1676
+ "fields": [
1677
+ {
1678
+ "name": "proposal",
1679
+ "docs": [
1680
+ "Question to which vote was provided"
1681
+ ],
1682
+ "type": "pubkey"
1683
+ },
1684
+ {
1685
+ "name": "voter",
1686
+ "docs": [
1687
+ "Voter that voted on the proposal"
1688
+ ],
1689
+ "type": "pubkey"
1690
+ },
1691
+ {
1692
+ "name": "option_index",
1693
+ "docs": [
1694
+ "Index of the option used for voting"
1695
+ ],
1696
+ "type": "u8"
1697
+ },
1698
+ {
1699
+ "name": "weight",
1700
+ "docs": [
1701
+ "Weight of the vote, correspond to number of sTokens used"
1702
+ ],
1703
+ "type": "u64"
1704
+ },
1705
+ {
1706
+ "name": "_buffer",
1707
+ "docs": [
1708
+ "Buffer for additional fields"
1709
+ ],
1710
+ "type": {
1711
+ "array": [
1712
+ "u8",
1713
+ 64
1714
+ ]
1715
+ }
1716
+ }
1717
+ ]
1718
+ }
1719
+ }
1720
+ ]
1721
+ }