@streamflow/staking 8.7.0 → 8.8.0-alpha.0-alpha.p305.df0bb0f

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.
@@ -106,6 +106,945 @@ declare namespace constants {
106
106
  export { constants_ANCHOR_DISCRIMINATOR_OFFSET as ANCHOR_DISCRIMINATOR_OFFSET, constants_CONFIG_PREFIX as CONFIG_PREFIX, constants_DEFAULT_FEE as DEFAULT_FEE, constants_DEFAULT_FEE_BN as DEFAULT_FEE_BN, constants_FEE_PRECISION_FACTOR as FEE_PRECISION_FACTOR, constants_FEE_PRECISION_FACTOR_BN as FEE_PRECISION_FACTOR_BN, constants_FEE_PROGRAM_ID as FEE_PROGRAM_ID, constants_FEE_VALUE_PREFIX as FEE_VALUE_PREFIX, constants_REWARD_AMOUNT_DECIMALS as REWARD_AMOUNT_DECIMALS, constants_REWARD_AMOUNT_PRECISION_FACTOR as REWARD_AMOUNT_PRECISION_FACTOR, constants_REWARD_AMOUNT_PRECISION_FACTOR_BN as REWARD_AMOUNT_PRECISION_FACTOR_BN, constants_REWARD_ENTRY_BYTE_OFFSETS as REWARD_ENTRY_BYTE_OFFSETS, constants_REWARD_ENTRY_PREFIX as REWARD_ENTRY_PREFIX, constants_REWARD_ENTRY_REWARD_POOL_OFFSET as REWARD_ENTRY_REWARD_POOL_OFFSET, constants_REWARD_ENTRY_STAKE_ENTRY_OFFSET as REWARD_ENTRY_STAKE_ENTRY_OFFSET, constants_REWARD_POOL_BYTE_OFFSETS as REWARD_POOL_BYTE_OFFSETS, constants_REWARD_POOL_DYNAMIC_PROGRAM_ID as REWARD_POOL_DYNAMIC_PROGRAM_ID, constants_REWARD_POOL_MINT_OFFSET as REWARD_POOL_MINT_OFFSET, constants_REWARD_POOL_PREFIX as REWARD_POOL_PREFIX, constants_REWARD_POOL_PROGRAM_ID as REWARD_POOL_PROGRAM_ID, constants_REWARD_POOL_STAKE_POOL_OFFSET as REWARD_POOL_STAKE_POOL_OFFSET, constants_REWARD_VAULT_PREFIX as REWARD_VAULT_PREFIX, constants_SCALE_PRECISION_FACTOR as SCALE_PRECISION_FACTOR, constants_SCALE_PRECISION_FACTOR_BN as SCALE_PRECISION_FACTOR_BN, constants_STAKE_ENTRY_BYTE_OFFSETS as STAKE_ENTRY_BYTE_OFFSETS, constants_STAKE_ENTRY_DISCRIMINATOR as STAKE_ENTRY_DISCRIMINATOR, constants_STAKE_ENTRY_OWNER_OFFSET as STAKE_ENTRY_OWNER_OFFSET, constants_STAKE_ENTRY_PAYER_OFFSET as STAKE_ENTRY_PAYER_OFFSET, constants_STAKE_ENTRY_PREFIX as STAKE_ENTRY_PREFIX, constants_STAKE_ENTRY_STAKE_POOL_OFFSET as STAKE_ENTRY_STAKE_POOL_OFFSET, constants_STAKE_MINT_PREFIX as STAKE_MINT_PREFIX, constants_STAKE_POOL_BYTE_OFFSETS as STAKE_POOL_BYTE_OFFSETS, constants_STAKE_POOL_CREATOR_OFFSET as STAKE_POOL_CREATOR_OFFSET, constants_STAKE_POOL_MINT_OFFSET as STAKE_POOL_MINT_OFFSET, constants_STAKE_POOL_PREFIX as STAKE_POOL_PREFIX, constants_STAKE_POOL_PROGRAM_ID as STAKE_POOL_PROGRAM_ID, constants_STAKE_VAULT_PREFIX as STAKE_VAULT_PREFIX, constants_STREAMFLOW_TREASURY_PUBLIC_KEY as STREAMFLOW_TREASURY_PUBLIC_KEY, constants_U64_MAX as U64_MAX };
107
107
  }
108
108
 
109
+ /**
110
+ * Program IDL in camelCase format in order to be used in JS/TS.
111
+ *
112
+ * Note that this is only a type helper and is not the actual IDL. The original
113
+ * IDL can be found at `target/idl/governor.json`.
114
+ */
115
+ type Governor = {
116
+ "address": "GVERNASJFxi8vjjJtwCKYQTeN51XsV1y2B1ap1GtKrKR";
117
+ "metadata": {
118
+ "name": "governor";
119
+ "version": "2.3.0";
120
+ "spec": "0.1.0";
121
+ "description": "Governor program to allow users to vote with stake tokens";
122
+ };
123
+ "instructions": [
124
+ {
125
+ "name": "addProposal";
126
+ "discriminator": [
127
+ 130,
128
+ 139,
129
+ 214,
130
+ 107,
131
+ 93,
132
+ 13,
133
+ 84,
134
+ 152
135
+ ];
136
+ "accounts": [
137
+ {
138
+ "name": "stakePool";
139
+ "docs": [
140
+ "The stake pool associated with the governor"
141
+ ];
142
+ "relations": [
143
+ "governor"
144
+ ];
145
+ },
146
+ {
147
+ "name": "governor";
148
+ "docs": [
149
+ "The governor to which the proposal is being added"
150
+ ];
151
+ "writable": true;
152
+ },
153
+ {
154
+ "name": "proposal";
155
+ "docs": [
156
+ "The new proposal account to be created"
157
+ ];
158
+ "writable": true;
159
+ "pda": {
160
+ "seeds": [
161
+ {
162
+ "kind": "const";
163
+ "value": [
164
+ 112,
165
+ 114,
166
+ 111,
167
+ 112,
168
+ 111,
169
+ 115,
170
+ 97,
171
+ 108
172
+ ];
173
+ },
174
+ {
175
+ "kind": "account";
176
+ "path": "governor";
177
+ },
178
+ {
179
+ "kind": "arg";
180
+ "path": "nonce";
181
+ }
182
+ ];
183
+ };
184
+ },
185
+ {
186
+ "name": "authority";
187
+ "docs": [
188
+ "Authority of the governor"
189
+ ];
190
+ "writable": true;
191
+ "signer": true;
192
+ },
193
+ {
194
+ "name": "systemProgram";
195
+ "address": "11111111111111111111111111111111";
196
+ }
197
+ ];
198
+ "args": [
199
+ {
200
+ "name": "nonce";
201
+ "type": "u32";
202
+ },
203
+ {
204
+ "name": "text";
205
+ "type": "string";
206
+ },
207
+ {
208
+ "name": "options";
209
+ "type": {
210
+ "vec": "string";
211
+ };
212
+ },
213
+ {
214
+ "name": "votingStartTs";
215
+ "type": "u64";
216
+ },
217
+ {
218
+ "name": "votingEndTs";
219
+ "type": "u64";
220
+ }
221
+ ];
222
+ },
223
+ {
224
+ "name": "changeAuthority";
225
+ "discriminator": [
226
+ 50,
227
+ 106,
228
+ 66,
229
+ 104,
230
+ 99,
231
+ 118,
232
+ 145,
233
+ 88
234
+ ];
235
+ "accounts": [
236
+ {
237
+ "name": "governor";
238
+ "docs": [
239
+ "Reward Pool"
240
+ ];
241
+ "writable": true;
242
+ },
243
+ {
244
+ "name": "authority";
245
+ "docs": [
246
+ "Current Authority"
247
+ ];
248
+ "writable": true;
249
+ "signer": true;
250
+ },
251
+ {
252
+ "name": "newAuthority";
253
+ }
254
+ ];
255
+ "args": [];
256
+ },
257
+ {
258
+ "name": "createGovernor";
259
+ "discriminator": [
260
+ 103,
261
+ 30,
262
+ 78,
263
+ 252,
264
+ 28,
265
+ 128,
266
+ 40,
267
+ 3
268
+ ];
269
+ "accounts": [
270
+ {
271
+ "name": "stakePool";
272
+ "docs": [
273
+ "The stake pool for which the governor is being created"
274
+ ];
275
+ },
276
+ {
277
+ "name": "governor";
278
+ "docs": [
279
+ "The governor account to be created"
280
+ ];
281
+ "writable": true;
282
+ "pda": {
283
+ "seeds": [
284
+ {
285
+ "kind": "const";
286
+ "value": [
287
+ 103,
288
+ 111,
289
+ 118,
290
+ 101,
291
+ 114,
292
+ 110,
293
+ 111,
294
+ 114
295
+ ];
296
+ },
297
+ {
298
+ "kind": "account";
299
+ "path": "stakePool";
300
+ },
301
+ {
302
+ "kind": "arg";
303
+ "path": "nonce";
304
+ }
305
+ ];
306
+ };
307
+ },
308
+ {
309
+ "name": "authority";
310
+ "docs": [
311
+ "Authority of the stake pool"
312
+ ];
313
+ "writable": true;
314
+ "signer": true;
315
+ },
316
+ {
317
+ "name": "systemProgram";
318
+ "address": "11111111111111111111111111111111";
319
+ }
320
+ ];
321
+ "args": [
322
+ {
323
+ "name": "nonce";
324
+ "type": "u8";
325
+ }
326
+ ];
327
+ },
328
+ {
329
+ "name": "setActiveProposal";
330
+ "discriminator": [
331
+ 41,
332
+ 14,
333
+ 222,
334
+ 18,
335
+ 33,
336
+ 232,
337
+ 43,
338
+ 82
339
+ ];
340
+ "accounts": [
341
+ {
342
+ "name": "governor";
343
+ "docs": [
344
+ "The governor for which to set the active proposal"
345
+ ];
346
+ "writable": true;
347
+ "relations": [
348
+ "proposal"
349
+ ];
350
+ },
351
+ {
352
+ "name": "proposal";
353
+ "docs": [
354
+ "The proposal to set as active"
355
+ ];
356
+ "writable": true;
357
+ },
358
+ {
359
+ "name": "authority";
360
+ "docs": [
361
+ "Authority of the governor"
362
+ ];
363
+ "signer": true;
364
+ }
365
+ ];
366
+ "args": [];
367
+ },
368
+ {
369
+ "name": "voteOnProposal";
370
+ "discriminator": [
371
+ 188,
372
+ 239,
373
+ 13,
374
+ 88,
375
+ 119,
376
+ 199,
377
+ 251,
378
+ 119
379
+ ];
380
+ "accounts": [
381
+ {
382
+ "name": "stakePool";
383
+ "docs": [
384
+ "Original Stake Pool"
385
+ ];
386
+ "relations": [
387
+ "governor"
388
+ ];
389
+ },
390
+ {
391
+ "name": "governor";
392
+ "docs": [
393
+ "The governor account that manages the voting process"
394
+ ];
395
+ "writable": true;
396
+ "relations": [
397
+ "proposal"
398
+ ];
399
+ },
400
+ {
401
+ "name": "proposal";
402
+ "docs": [
403
+ "The proposal being voted on"
404
+ ];
405
+ },
406
+ {
407
+ "name": "vote";
408
+ "docs": [
409
+ "The vote account that will be created to record the vote"
410
+ ];
411
+ "writable": true;
412
+ "pda": {
413
+ "seeds": [
414
+ {
415
+ "kind": "const";
416
+ "value": [
417
+ 118,
418
+ 111,
419
+ 116,
420
+ 101
421
+ ];
422
+ },
423
+ {
424
+ "kind": "account";
425
+ "path": "proposal";
426
+ },
427
+ {
428
+ "kind": "account";
429
+ "path": "voter";
430
+ }
431
+ ];
432
+ };
433
+ },
434
+ {
435
+ "name": "stakeMintAccount";
436
+ "docs": [
437
+ "The user's stake token account that holds the stake tokens"
438
+ ];
439
+ },
440
+ {
441
+ "name": "voter";
442
+ "docs": [
443
+ "The user who is voting"
444
+ ];
445
+ "writable": true;
446
+ "signer": true;
447
+ },
448
+ {
449
+ "name": "rentSponsor";
450
+ "writable": true;
451
+ "pda": {
452
+ "seeds": [
453
+ {
454
+ "kind": "const";
455
+ "value": [
456
+ 114,
457
+ 101,
458
+ 110,
459
+ 116,
460
+ 45,
461
+ 115,
462
+ 112,
463
+ 111,
464
+ 110,
465
+ 115,
466
+ 111,
467
+ 114
468
+ ];
469
+ }
470
+ ];
471
+ };
472
+ },
473
+ {
474
+ "name": "systemProgram";
475
+ "address": "11111111111111111111111111111111";
476
+ },
477
+ {
478
+ "name": "eventAuthority";
479
+ "pda": {
480
+ "seeds": [
481
+ {
482
+ "kind": "const";
483
+ "value": [
484
+ 95,
485
+ 95,
486
+ 101,
487
+ 118,
488
+ 101,
489
+ 110,
490
+ 116,
491
+ 95,
492
+ 97,
493
+ 117,
494
+ 116,
495
+ 104,
496
+ 111,
497
+ 114,
498
+ 105,
499
+ 116,
500
+ 121
501
+ ];
502
+ }
503
+ ];
504
+ };
505
+ },
506
+ {
507
+ "name": "program";
508
+ }
509
+ ];
510
+ "args": [
511
+ {
512
+ "name": "optionIndex";
513
+ "type": "u8";
514
+ }
515
+ ];
516
+ }
517
+ ];
518
+ "accounts": [
519
+ {
520
+ "name": "governor";
521
+ "discriminator": [
522
+ 37,
523
+ 136,
524
+ 44,
525
+ 80,
526
+ 68,
527
+ 85,
528
+ 213,
529
+ 178
530
+ ];
531
+ },
532
+ {
533
+ "name": "proposal";
534
+ "discriminator": [
535
+ 26,
536
+ 94,
537
+ 189,
538
+ 187,
539
+ 116,
540
+ 136,
541
+ 53,
542
+ 33
543
+ ];
544
+ },
545
+ {
546
+ "name": "stakePool";
547
+ "discriminator": [
548
+ 121,
549
+ 34,
550
+ 206,
551
+ 21,
552
+ 79,
553
+ 127,
554
+ 255,
555
+ 28
556
+ ];
557
+ },
558
+ {
559
+ "name": "vote";
560
+ "discriminator": [
561
+ 96,
562
+ 91,
563
+ 104,
564
+ 57,
565
+ 145,
566
+ 35,
567
+ 172,
568
+ 155
569
+ ];
570
+ }
571
+ ];
572
+ "events": [
573
+ {
574
+ "name": "voteEvent";
575
+ "discriminator": [
576
+ 195,
577
+ 71,
578
+ 250,
579
+ 105,
580
+ 120,
581
+ 119,
582
+ 234,
583
+ 134
584
+ ];
585
+ }
586
+ ];
587
+ "errors": [
588
+ {
589
+ "code": 6000;
590
+ "name": "arithmeticError";
591
+ "msg": "Arithmetic Error (overflow/underflow)";
592
+ },
593
+ {
594
+ "code": 6001;
595
+ "name": "unauthorized";
596
+ "msg": "Account is not authorized to execute this instruction";
597
+ },
598
+ {
599
+ "code": 6002;
600
+ "name": "invalidStakeMint";
601
+ "msg": "Provided Stake Mint does not equal the Pool Stake Mint";
602
+ },
603
+ {
604
+ "code": 6003;
605
+ "name": "invalidStakePool";
606
+ "msg": "Provided Stake Pool does not equal the Entry Stake Pool";
607
+ },
608
+ {
609
+ "code": 6004;
610
+ "name": "invalidGovernor";
611
+ "msg": "Provided Governor does not match the proposal Governor";
612
+ },
613
+ {
614
+ "code": 6005;
615
+ "name": "invalidProposalText";
616
+ "msg": "Invalid proposal text provided";
617
+ },
618
+ {
619
+ "code": 6006;
620
+ "name": "invalidProposalOptions";
621
+ "msg": "Invalid proposal options provided";
622
+ },
623
+ {
624
+ "code": 6007;
625
+ "name": "invalidProposalDuration";
626
+ "msg": "Invalid proposal duration";
627
+ },
628
+ {
629
+ "code": 6008;
630
+ "name": "proposalAlreadyActive";
631
+ "msg": "This proposal is already active";
632
+ },
633
+ {
634
+ "code": 6009;
635
+ "name": "votingNotStarted";
636
+ "msg": "Voting not started yet";
637
+ },
638
+ {
639
+ "code": 6010;
640
+ "name": "votingEnded";
641
+ "msg": "Voting has already ended";
642
+ },
643
+ {
644
+ "code": 6011;
645
+ "name": "invalidOptionIndex";
646
+ "msg": "Provided option is not a valid proposal option";
647
+ },
648
+ {
649
+ "code": 6012;
650
+ "name": "insufficientStakeTokens";
651
+ "msg": "Insufficient tokens for voting";
652
+ }
653
+ ];
654
+ "types": [
655
+ {
656
+ "name": "governor";
657
+ "type": {
658
+ "kind": "struct";
659
+ "fields": [
660
+ {
661
+ "name": "bump";
662
+ "docs": [
663
+ "Bump Seed used to sign transactions"
664
+ ];
665
+ "type": "u8";
666
+ },
667
+ {
668
+ "name": "nonce";
669
+ "docs": [
670
+ "Nonce to support multiple governors for the same pool"
671
+ ];
672
+ "type": "u8";
673
+ },
674
+ {
675
+ "name": "stakePool";
676
+ "docs": [
677
+ "Stake Pool for which Reward Pool was added"
678
+ ];
679
+ "type": "pubkey";
680
+ },
681
+ {
682
+ "name": "authority";
683
+ "docs": [
684
+ "Authority of the Governor that can add proposals and set the current one"
685
+ ];
686
+ "type": "pubkey";
687
+ },
688
+ {
689
+ "name": "currentProposal";
690
+ "docs": [
691
+ "Address of the current proposal"
692
+ ];
693
+ "type": "pubkey";
694
+ },
695
+ {
696
+ "name": "totalProposals";
697
+ "docs": [
698
+ "Total number of created proposals"
699
+ ];
700
+ "type": "u64";
701
+ },
702
+ {
703
+ "name": "buffer";
704
+ "docs": [
705
+ "Buffer for additional fields"
706
+ ];
707
+ "type": {
708
+ "array": [
709
+ "u8",
710
+ 128
711
+ ];
712
+ };
713
+ }
714
+ ];
715
+ };
716
+ },
717
+ {
718
+ "name": "proposal";
719
+ "type": {
720
+ "kind": "struct";
721
+ "fields": [
722
+ {
723
+ "name": "nonce";
724
+ "docs": [
725
+ "Nonce used to derive proposal address"
726
+ ];
727
+ "type": "u32";
728
+ },
729
+ {
730
+ "name": "governor";
731
+ "docs": [
732
+ "Stake Pool for which Reward Pool was added"
733
+ ];
734
+ "type": "pubkey";
735
+ },
736
+ {
737
+ "name": "text";
738
+ "docs": [
739
+ "Text of the proposals we reserve up to 512 bytes (ascii symbols take 1 byte)"
740
+ ];
741
+ "type": "string";
742
+ },
743
+ {
744
+ "name": "options";
745
+ "docs": [
746
+ "Potential options that will be used when answering, we reserve enough space for up to 8x32 = 256 ascii symbols in total"
747
+ ];
748
+ "type": {
749
+ "vec": "string";
750
+ };
751
+ },
752
+ {
753
+ "name": "votingStartTs";
754
+ "docs": [
755
+ "Time when voting starts, 0 means that voting start immediately after proposal was created"
756
+ ];
757
+ "type": "u64";
758
+ },
759
+ {
760
+ "name": "votingEndTs";
761
+ "docs": [
762
+ "Time when voting ends, 0 means that voting will be possible anytime"
763
+ ];
764
+ "type": "u64";
765
+ },
766
+ {
767
+ "name": "createdTs";
768
+ "docs": [
769
+ "Time when proposal was created"
770
+ ];
771
+ "type": "u64";
772
+ },
773
+ {
774
+ "name": "lastActiveTs";
775
+ "docs": [
776
+ "Last time when proposal was made active"
777
+ ];
778
+ "type": "u64";
779
+ },
780
+ {
781
+ "name": "buffer";
782
+ "docs": [
783
+ "Buffer for additional fields"
784
+ ];
785
+ "type": {
786
+ "array": [
787
+ "u8",
788
+ 64
789
+ ];
790
+ };
791
+ }
792
+ ];
793
+ };
794
+ },
795
+ {
796
+ "name": "stakePool";
797
+ "type": {
798
+ "kind": "struct";
799
+ "fields": [
800
+ {
801
+ "name": "bump";
802
+ "docs": [
803
+ "Bump Seed used to sign transactions"
804
+ ];
805
+ "type": "u8";
806
+ },
807
+ {
808
+ "name": "nonce";
809
+ "docs": [
810
+ "Nonce to differentiate pools for the same mint"
811
+ ];
812
+ "type": "u8";
813
+ },
814
+ {
815
+ "name": "mint";
816
+ "docs": [
817
+ "Mint of the Stake Pool"
818
+ ];
819
+ "type": "pubkey";
820
+ },
821
+ {
822
+ "name": "creator";
823
+ "docs": [
824
+ "Initial Creator"
825
+ ];
826
+ "type": "pubkey";
827
+ },
828
+ {
829
+ "name": "authority";
830
+ "docs": [
831
+ "Current authority"
832
+ ];
833
+ "type": "pubkey";
834
+ },
835
+ {
836
+ "name": "minWeight";
837
+ "docs": [
838
+ "The lowest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
839
+ "For instance:",
840
+ "* `min_weight = 1 x SCALE_FACTOR_BASE` signifies a minimum multiplier of 1x for min staking duration",
841
+ "* `min_weight = 2 x SCALE_FACTOR_BASE` indicates a minimum multiplier of 2x for min staking duration"
842
+ ];
843
+ "type": "u64";
844
+ },
845
+ {
846
+ "name": "maxWeight";
847
+ "docs": [
848
+ "The highest weight awarded for staking, measured as a fraction of `1 / SCALE_FACTOR_BASE`.",
849
+ "For instance:",
850
+ "* `max_weight = 1 x SCALE_FACTOR_BASE` signifies a max multiplier of 1x for max staking duration",
851
+ "* `max_weight = 2 x SCALE_FACTOR_BASE` indicates a max multiplier of 2x for max staking duration"
852
+ ];
853
+ "type": "u64";
854
+ },
855
+ {
856
+ "name": "minDuration";
857
+ "docs": [
858
+ "Min Duration of stake in seconds"
859
+ ];
860
+ "type": "u64";
861
+ },
862
+ {
863
+ "name": "maxDuration";
864
+ "docs": [
865
+ "Max Duration of stake in seconds, the more duration, the more weight the stake has"
866
+ ];
867
+ "type": "u64";
868
+ },
869
+ {
870
+ "name": "permissionless";
871
+ "docs": [
872
+ "Whether anyone can add Reward Pools or just admin"
873
+ ];
874
+ "type": "bool";
875
+ },
876
+ {
877
+ "name": "vault";
878
+ "docs": [
879
+ "Escrow Account that stores staked tokens"
880
+ ];
881
+ "type": "pubkey";
882
+ },
883
+ {
884
+ "name": "stakeMint";
885
+ "docs": [
886
+ "Stake Mint, will be returned in exchange for stake tokens"
887
+ ];
888
+ "type": "pubkey";
889
+ },
890
+ {
891
+ "name": "totalStake";
892
+ "docs": [
893
+ "Total number of Staked tokens"
894
+ ];
895
+ "type": "u64";
896
+ },
897
+ {
898
+ "name": "totalEffectiveStake";
899
+ "docs": [
900
+ "Total staked tokens accounting for each stake weight, does not equal `total_stake`,",
901
+ "represents a sum of effective stake multiplied by 10^9 for precision"
902
+ ];
903
+ "type": "u128";
904
+ },
905
+ {
906
+ "name": "freezeStakeMint";
907
+ "docs": [
908
+ "Whether we should freeze stake mint token accounts"
909
+ ];
910
+ "type": "bool";
911
+ },
912
+ {
913
+ "name": "unstakePeriod";
914
+ "docs": [
915
+ "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
916
+ ];
917
+ "type": "u64";
918
+ },
919
+ {
920
+ "name": "totalStakeCapped";
921
+ "docs": [
922
+ "Whether amount of total staked tokens is limited by `remaining_total_stake` - stored as separate flag to not deal with `Option`"
923
+ ];
924
+ "type": "bool";
925
+ },
926
+ {
927
+ "name": "remainingTotalStake";
928
+ "docs": [
929
+ "Remaining total amount of staked tokens (cumulative)"
930
+ ];
931
+ "type": "u64";
932
+ },
933
+ {
934
+ "name": "expiryTs";
935
+ "docs": [
936
+ "Time when stake pool expires, staking is not possible after expiration"
937
+ ];
938
+ "type": "u64";
939
+ },
940
+ {
941
+ "name": "autoUnstake";
942
+ "docs": [
943
+ "Whether auto unstaking is enabled, stake entries will be unstaked after duration"
944
+ ];
945
+ "type": "bool";
946
+ },
947
+ {
948
+ "name": "buffer";
949
+ "docs": [
950
+ "Buffer for additional fields"
951
+ ];
952
+ "type": {
953
+ "array": [
954
+ "u8",
955
+ 37
956
+ ];
957
+ };
958
+ }
959
+ ];
960
+ };
961
+ },
962
+ {
963
+ "name": "vote";
964
+ "type": {
965
+ "kind": "struct";
966
+ "fields": [
967
+ {
968
+ "name": "proposal";
969
+ "docs": [
970
+ "Question to which vote was provided"
971
+ ];
972
+ "type": "pubkey";
973
+ },
974
+ {
975
+ "name": "voter";
976
+ "docs": [
977
+ "Voter that voted on the proposal"
978
+ ];
979
+ "type": "pubkey";
980
+ },
981
+ {
982
+ "name": "optionIndex";
983
+ "docs": [
984
+ "Index of the option used for voting"
985
+ ];
986
+ "type": "u8";
987
+ },
988
+ {
989
+ "name": "weight";
990
+ "docs": [
991
+ "Weight of the vote, correspond to number of sTokens used"
992
+ ];
993
+ "type": "u64";
994
+ },
995
+ {
996
+ "name": "isSponsored";
997
+ "docs": [
998
+ "Whether the vote rent has been sponsored by the rent vault"
999
+ ];
1000
+ "type": "bool";
1001
+ },
1002
+ {
1003
+ "name": "buffer";
1004
+ "docs": [
1005
+ "Buffer for additional fields"
1006
+ ];
1007
+ "type": {
1008
+ "array": [
1009
+ "u8",
1010
+ 63
1011
+ ];
1012
+ };
1013
+ }
1014
+ ];
1015
+ };
1016
+ },
1017
+ {
1018
+ "name": "voteEvent";
1019
+ "type": {
1020
+ "kind": "struct";
1021
+ "fields": [
1022
+ {
1023
+ "name": "governor";
1024
+ "type": "pubkey";
1025
+ },
1026
+ {
1027
+ "name": "proposal";
1028
+ "type": "pubkey";
1029
+ },
1030
+ {
1031
+ "name": "voter";
1032
+ "type": "pubkey";
1033
+ },
1034
+ {
1035
+ "name": "optionIndex";
1036
+ "type": "u8";
1037
+ },
1038
+ {
1039
+ "name": "value";
1040
+ "type": "u64";
1041
+ }
1042
+ ];
1043
+ };
1044
+ }
1045
+ ];
1046
+ };
1047
+
109
1048
  /**
110
1049
  * Program IDL in camelCase format in order to be used in JS/TS.
111
1050
  *
@@ -116,7 +1055,7 @@ type RewardPoolDynamic = {
116
1055
  "address": "RWRDyfZa6Rk9UYi85yjYYfGmoUqffLqjo6vZdFawEez";
117
1056
  "metadata": {
118
1057
  "name": "rewardPoolDynamic";
119
- "version": "2.2.0";
1058
+ "version": "2.3.0";
120
1059
  "spec": "0.1.0";
121
1060
  "description": "Reward pools with dynamic rewards distribution";
122
1061
  };
@@ -1629,6 +2568,13 @@ type RewardPoolDynamic = {
1629
2568
  ];
1630
2569
  "type": "bool";
1631
2570
  },
2571
+ {
2572
+ "name": "autoUnstake";
2573
+ "docs": [
2574
+ "Whether auto unstaking is enabled, copied from the stake pool for use in instructions that don't require the stake pool account"
2575
+ ];
2576
+ "type": "bool";
2577
+ },
1632
2578
  {
1633
2579
  "name": "buffer";
1634
2580
  "docs": [
@@ -1637,7 +2583,7 @@ type RewardPoolDynamic = {
1637
2583
  "type": {
1638
2584
  "array": [
1639
2585
  "u8",
1640
- 39
2586
+ 38
1641
2587
  ];
1642
2588
  };
1643
2589
  }
@@ -1768,6 +2714,34 @@ type RewardPoolDynamic = {
1768
2714
  ];
1769
2715
  "type": "u64";
1770
2716
  },
2717
+ {
2718
+ "name": "totalStakeCapped";
2719
+ "docs": [
2720
+ "Whether amount of total staked tokens is limited by `remaining_total_stake` - stored as separate flag to not deal with `Option`"
2721
+ ];
2722
+ "type": "bool";
2723
+ },
2724
+ {
2725
+ "name": "remainingTotalStake";
2726
+ "docs": [
2727
+ "Remaining total amount of staked tokens (cumulative)"
2728
+ ];
2729
+ "type": "u64";
2730
+ },
2731
+ {
2732
+ "name": "expiryTs";
2733
+ "docs": [
2734
+ "Time when stake pool expires, staking is not possible after expiration"
2735
+ ];
2736
+ "type": "u64";
2737
+ },
2738
+ {
2739
+ "name": "autoUnstake";
2740
+ "docs": [
2741
+ "Whether auto unstaking is enabled, stake entries will be unstaked after duration"
2742
+ ];
2743
+ "type": "bool";
2744
+ },
1771
2745
  {
1772
2746
  "name": "buffer";
1773
2747
  "docs": [
@@ -1776,7 +2750,7 @@ type RewardPoolDynamic = {
1776
2750
  "type": {
1777
2751
  "array": [
1778
2752
  "u8",
1779
- 55
2753
+ 37
1780
2754
  ];
1781
2755
  };
1782
2756
  }
@@ -1816,6 +2790,13 @@ type RewardPoolDynamic = {
1816
2790
  ];
1817
2791
  "type": "u64";
1818
2792
  },
2793
+ {
2794
+ "name": "isSponsored";
2795
+ "docs": [
2796
+ "Whether the vote rent has been sponsored by the rent vault"
2797
+ ];
2798
+ "type": "bool";
2799
+ },
1819
2800
  {
1820
2801
  "name": "buffer";
1821
2802
  "docs": [
@@ -1824,7 +2805,7 @@ type RewardPoolDynamic = {
1824
2805
  "type": {
1825
2806
  "array": [
1826
2807
  "u8",
1827
- 64
2808
+ 63
1828
2809
  ];
1829
2810
  };
1830
2811
  }
@@ -1921,6 +2902,9 @@ interface CreateStakePoolArgs extends TokenProgram {
1921
2902
  permissionless?: boolean;
1922
2903
  freezeStakeMint?: boolean | null;
1923
2904
  unstakePeriod?: BN | null;
2905
+ maxTotalStakeCumulative?: BN;
2906
+ expiryTs?: BN;
2907
+ autoUnstake?: boolean;
1924
2908
  authority?: Keypair;
1925
2909
  }
1926
2910
 
@@ -1929,6 +2913,7 @@ interface Programs {
1929
2913
  rewardPoolProgram: Program<RewardPool$1>;
1930
2914
  rewardPoolDynamicProgram: Program<RewardPoolDynamic>;
1931
2915
  feeManagerProgram: Program<FeeManager>;
2916
+ governor: Program<Governor>;
1932
2917
  }
1933
2918
  type CreationResult = ITransactionResult & {
1934
2919
  metadataId: PublicKey;
@@ -1942,6 +2927,7 @@ interface IInitOptions {
1942
2927
  rewardPool?: string;
1943
2928
  rewardPoolDynamic?: string;
1944
2929
  feeManager?: string;
2930
+ governor?: string;
1945
2931
  };
1946
2932
  sendRate?: number;
1947
2933
  sendThrottler?: PQueue;
@@ -1965,7 +2951,7 @@ declare class SolanaStakingClient {
1965
2951
  getDefaultFeeValue(): Promise<DefaultFeeValueConfig>;
1966
2952
  getFeeValueIfExists(target: string | PublicKey): Promise<FeeValue | null>;
1967
2953
  createStakePool(data: CreateStakePoolArgs, extParams: IInteractSolanaExt): Promise<CreationResult>;
1968
- prepareCreateStakePoolInstructions({ maxWeight, maxDuration, minDuration, mint, permissionless, freezeStakeMint, unstakePeriod, nonce, tokenProgramId, }: CreateStakePoolArgs, extParams: IInteractSolanaExt): Promise<{
2954
+ prepareCreateStakePoolInstructions({ maxWeight, maxDuration, minDuration, mint, permissionless, freezeStakeMint, unstakePeriod, maxTotalStakeCumulative, expiryTs, autoUnstake, nonce, tokenProgramId, }: CreateStakePoolArgs, extParams: IInteractSolanaExt): Promise<{
1969
2955
  ixs: TransactionInstruction[];
1970
2956
  publicKey: PublicKey;
1971
2957
  }>;