@wireio/stake 2.3.1 → 2.4.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.
package/lib/stake.js CHANGED
@@ -88,6 +88,51 @@ var instructions$7 = [
88
88
  args: [
89
89
  ]
90
90
  },
91
+ {
92
+ name: "admin_force_unbond_role",
93
+ discriminator: [
94
+ 80,
95
+ 107,
96
+ 27,
97
+ 49,
98
+ 126,
99
+ 25,
100
+ 31,
101
+ 238
102
+ ],
103
+ accounts: [
104
+ {
105
+ name: "admin",
106
+ signer: true
107
+ },
108
+ {
109
+ name: "global_config"
110
+ },
111
+ {
112
+ name: "global_state"
113
+ },
114
+ {
115
+ name: "user",
116
+ docs: [
117
+ "The user whose role bond is being force-unbonded"
118
+ ]
119
+ },
120
+ {
121
+ name: "outpost_account",
122
+ writable: true
123
+ }
124
+ ],
125
+ args: [
126
+ {
127
+ name: "role",
128
+ type: {
129
+ defined: {
130
+ name: "Role"
131
+ }
132
+ }
133
+ }
134
+ ]
135
+ },
91
136
  {
92
137
  name: "aggregate_stake_metrics",
93
138
  docs: [
@@ -862,6 +907,72 @@ var instructions$7 = [
862
907
  }
863
908
  ]
864
909
  },
910
+ {
911
+ name: "deposit_to_reserve",
912
+ discriminator: [
913
+ 8,
914
+ 79,
915
+ 123,
916
+ 129,
917
+ 146,
918
+ 140,
919
+ 178,
920
+ 128
921
+ ],
922
+ accounts: [
923
+ {
924
+ name: "admin",
925
+ signer: true
926
+ },
927
+ {
928
+ name: "global_config"
929
+ },
930
+ {
931
+ name: "depositor",
932
+ writable: true,
933
+ signer: true
934
+ },
935
+ {
936
+ name: "reserve_pool",
937
+ writable: true
938
+ },
939
+ {
940
+ name: "vault"
941
+ },
942
+ {
943
+ name: "ephemeral_stake",
944
+ writable: true
945
+ },
946
+ {
947
+ name: "controller_state"
948
+ },
949
+ {
950
+ name: "stake_program"
951
+ },
952
+ {
953
+ name: "system_program"
954
+ },
955
+ {
956
+ name: "clock"
957
+ },
958
+ {
959
+ name: "stake_history"
960
+ },
961
+ {
962
+ name: "rent"
963
+ }
964
+ ],
965
+ args: [
966
+ {
967
+ name: "amount",
968
+ type: "u64"
969
+ },
970
+ {
971
+ name: "seed",
972
+ type: "u32"
973
+ }
974
+ ]
975
+ },
865
976
  {
866
977
  name: "desynd",
867
978
  discriminator: [
@@ -938,6 +1049,10 @@ var instructions$7 = [
938
1049
  ],
939
1050
  writable: true
940
1051
  },
1052
+ {
1053
+ name: "pretoken_purchase_history",
1054
+ writable: true
1055
+ },
941
1056
  {
942
1057
  name: "token_program"
943
1058
  },
@@ -980,6 +1095,44 @@ var instructions$7 = [
980
1095
  ],
981
1096
  returns: "u16"
982
1097
  },
1098
+ {
1099
+ name: "has_role",
1100
+ discriminator: [
1101
+ 218,
1102
+ 136,
1103
+ 44,
1104
+ 87,
1105
+ 142,
1106
+ 247,
1107
+ 141,
1108
+ 195
1109
+ ],
1110
+ accounts: [
1111
+ {
1112
+ name: "user",
1113
+ docs: [
1114
+ "User whose role status is being checked."
1115
+ ]
1116
+ },
1117
+ {
1118
+ name: "outpost_account"
1119
+ },
1120
+ {
1121
+ name: "global_state"
1122
+ }
1123
+ ],
1124
+ args: [
1125
+ {
1126
+ name: "role",
1127
+ type: {
1128
+ defined: {
1129
+ name: "Role"
1130
+ }
1131
+ }
1132
+ }
1133
+ ],
1134
+ returns: "bool"
1135
+ },
983
1136
  {
984
1137
  name: "init_bucket",
985
1138
  docs: [
@@ -1331,6 +1484,52 @@ var instructions$7 = [
1331
1484
  args: [
1332
1485
  ]
1333
1486
  },
1487
+ {
1488
+ name: "initialize_pretoken_purchase_history",
1489
+ docs: [
1490
+ "Admin-only: initialize PretokenPurchaseHistory PDA for a pool"
1491
+ ],
1492
+ discriminator: [
1493
+ 140,
1494
+ 166,
1495
+ 196,
1496
+ 128,
1497
+ 189,
1498
+ 240,
1499
+ 159,
1500
+ 1
1501
+ ],
1502
+ accounts: [
1503
+ {
1504
+ name: "admin",
1505
+ writable: true,
1506
+ signer: true
1507
+ },
1508
+ {
1509
+ name: "global_config"
1510
+ },
1511
+ {
1512
+ name: "pretoken_purchase_history",
1513
+ writable: true
1514
+ },
1515
+ {
1516
+ name: "pool_authority"
1517
+ },
1518
+ {
1519
+ name: "global_state",
1520
+ writable: true
1521
+ },
1522
+ {
1523
+ name: "pool_pretoken_record",
1524
+ writable: true
1525
+ },
1526
+ {
1527
+ name: "system_program"
1528
+ }
1529
+ ],
1530
+ args: [
1531
+ ]
1532
+ },
1334
1533
  {
1335
1534
  name: "initialize_processing_state",
1336
1535
  docs: [
@@ -2212,6 +2411,10 @@ var instructions$7 = [
2212
2411
  },
2213
2412
  {
2214
2413
  name: "system_program"
2414
+ },
2415
+ {
2416
+ name: "pretoken_purchase_history",
2417
+ writable: true
2215
2418
  }
2216
2419
  ],
2217
2420
  args: [
@@ -2306,6 +2509,10 @@ var instructions$7 = [
2306
2509
  },
2307
2510
  {
2308
2511
  name: "chainlink_program"
2512
+ },
2513
+ {
2514
+ name: "pretoken_purchase_history",
2515
+ writable: true
2309
2516
  }
2310
2517
  ],
2311
2518
  args: [
@@ -2401,7 +2608,7 @@ var instructions$7 = [
2401
2608
  name: "refresh_stake_metrics_post_sync",
2402
2609
  docs: [
2403
2610
  "V2: Refresh stake metrics after removal selection + PDA setup",
2404
- "Requires ActiveInfosSynced + ValidatorPdaSetup as prerequisites",
2611
+ "Requires ValidatorAdditionSelection + ValidatorPdaSetup as prerequisites",
2405
2612
  "Tracks completion in last_post_sync_stake_metrics_refresh_epoch"
2406
2613
  ],
2407
2614
  discriminator: [
@@ -2445,50 +2652,182 @@ var instructions$7 = [
2445
2652
  ]
2446
2653
  },
2447
2654
  {
2448
- name: "register_user",
2655
+ name: "refund",
2449
2656
  discriminator: [
2450
2657
  2,
2451
- 241,
2452
- 150,
2453
- 223,
2454
- 99,
2455
- 214,
2456
- 116,
2457
- 97
2658
+ 96,
2659
+ 183,
2660
+ 251,
2661
+ 63,
2662
+ 208,
2663
+ 46,
2664
+ 46
2458
2665
  ],
2459
2666
  accounts: [
2667
+ {
2668
+ name: "associated_token_program"
2669
+ },
2460
2670
  {
2461
2671
  name: "user",
2672
+ writable: true,
2673
+ signer: true
2674
+ },
2675
+ {
2676
+ name: "global_state",
2462
2677
  writable: true
2463
2678
  },
2464
2679
  {
2465
- name: "user_ata",
2680
+ name: "outpost_account",
2466
2681
  writable: true
2467
2682
  },
2468
2683
  {
2469
- name: "user_record",
2684
+ name: "distribution_state",
2470
2685
  writable: true
2471
2686
  },
2472
2687
  {
2473
- name: "payer",
2474
- docs: [
2475
- "Payer for the user record PDA creation (always the user)"
2476
- ],
2477
- writable: true,
2478
- signer: true
2688
+ name: "pool_authority"
2479
2689
  },
2480
2690
  {
2481
- name: "distribution_state",
2691
+ name: "liqsol_pool_ata",
2692
+ writable: true
2693
+ },
2694
+ {
2695
+ name: "refund_liqsol_ata",
2696
+ writable: true
2697
+ },
2698
+ {
2699
+ name: "liqsol_pool_user_record",
2700
+ writable: true
2701
+ },
2702
+ {
2703
+ name: "user_record",
2482
2704
  writable: true
2483
2705
  },
2706
+ {
2707
+ name: "extra_account_meta_list"
2708
+ },
2709
+ {
2710
+ name: "liqsol_core_program"
2711
+ },
2712
+ {
2713
+ name: "transfer_hook_program"
2714
+ },
2715
+ {
2716
+ name: "liqsol_mint"
2717
+ },
2718
+ {
2719
+ name: "token_program"
2720
+ },
2484
2721
  {
2485
2722
  name: "bucket_authority"
2486
2723
  },
2487
2724
  {
2488
2725
  name: "bucket_token_account",
2489
- docs: [
2490
- "The bucket's associated token account holding liqSOL (for index sync)"
2491
- ],
2726
+ writable: true
2727
+ },
2728
+ {
2729
+ name: "bucket_user_record",
2730
+ writable: true
2731
+ },
2732
+ {
2733
+ name: "system_program"
2734
+ }
2735
+ ],
2736
+ args: [
2737
+ ]
2738
+ },
2739
+ {
2740
+ name: "register_system_pda",
2741
+ discriminator: [
2742
+ 110,
2743
+ 93,
2744
+ 36,
2745
+ 156,
2746
+ 179,
2747
+ 69,
2748
+ 54,
2749
+ 210
2750
+ ],
2751
+ accounts: [
2752
+ {
2753
+ name: "admin",
2754
+ writable: true,
2755
+ signer: true
2756
+ },
2757
+ {
2758
+ name: "global_config"
2759
+ },
2760
+ {
2761
+ name: "pda_owner",
2762
+ docs: [
2763
+ "The PDA whose user record we're creating — must be system-owned (no program data)."
2764
+ ]
2765
+ },
2766
+ {
2767
+ name: "pda_ata"
2768
+ },
2769
+ {
2770
+ name: "user_record",
2771
+ writable: true
2772
+ },
2773
+ {
2774
+ name: "distribution_state",
2775
+ writable: true
2776
+ },
2777
+ {
2778
+ name: "bucket_authority"
2779
+ },
2780
+ {
2781
+ name: "bucket_token_account",
2782
+ docs: [
2783
+ "The bucket's associated token account holding liqSOL (for index sync)"
2784
+ ],
2785
+ writable: true
2786
+ },
2787
+ {
2788
+ name: "system_program"
2789
+ }
2790
+ ],
2791
+ args: [
2792
+ ]
2793
+ },
2794
+ {
2795
+ name: "register_user",
2796
+ discriminator: [
2797
+ 2,
2798
+ 241,
2799
+ 150,
2800
+ 223,
2801
+ 99,
2802
+ 214,
2803
+ 116,
2804
+ 97
2805
+ ],
2806
+ accounts: [
2807
+ {
2808
+ name: "payer",
2809
+ writable: true,
2810
+ signer: true
2811
+ },
2812
+ {
2813
+ name: "user_ata"
2814
+ },
2815
+ {
2816
+ name: "user_record",
2817
+ writable: true
2818
+ },
2819
+ {
2820
+ name: "distribution_state",
2821
+ writable: true
2822
+ },
2823
+ {
2824
+ name: "bucket_authority"
2825
+ },
2826
+ {
2827
+ name: "bucket_token_account",
2828
+ docs: [
2829
+ "The bucket's associated token account holding liqSOL (for index sync)"
2830
+ ],
2492
2831
  writable: true
2493
2832
  },
2494
2833
  {
@@ -2642,7 +2981,8 @@ var instructions$7 = [
2642
2981
  name: "bucket_token_account",
2643
2982
  docs: [
2644
2983
  "The bucket's token account holding liqSOL (for sync_index balance)"
2645
- ]
2984
+ ],
2985
+ writable: true
2646
2986
  },
2647
2987
  {
2648
2988
  name: "reserve_pool",
@@ -2991,7 +3331,8 @@ var instructions$7 = [
2991
3331
  name: "global_config"
2992
3332
  },
2993
3333
  {
2994
- name: "global_state"
3334
+ name: "global_state",
3335
+ writable: true
2995
3336
  },
2996
3337
  {
2997
3338
  name: "user",
@@ -3084,7 +3425,7 @@ var instructions$7 = [
3084
3425
  name: "sync_main_stake_accounts",
3085
3426
  docs: [
3086
3427
  "V2: Sync main stake accounts using PDA architecture (batched)",
3087
- "Processes up to 10 validators per transaction via remaining_accounts",
3428
+ "Processes validators in batches via remaining_accounts (batch size is enforced client-side)",
3088
3429
  "Note: Only syncs primary delegated stakes, not transient stakes"
3089
3430
  ],
3090
3431
  discriminator: [
@@ -3252,6 +3593,10 @@ var instructions$7 = [
3252
3593
  ],
3253
3594
  writable: true
3254
3595
  },
3596
+ {
3597
+ name: "pretoken_purchase_history",
3598
+ writable: true
3599
+ },
3255
3600
  {
3256
3601
  name: "token_program"
3257
3602
  },
@@ -3654,6 +3999,19 @@ var accounts$5 = [
3654
3999
  150
3655
4000
  ]
3656
4001
  },
4002
+ {
4003
+ name: "PretokenPurchaseHistory",
4004
+ discriminator: [
4005
+ 33,
4006
+ 71,
4007
+ 113,
4008
+ 206,
4009
+ 33,
4010
+ 180,
4011
+ 236,
4012
+ 131
4013
+ ]
4014
+ },
3657
4015
  {
3658
4016
  name: "PriceHistory",
3659
4017
  discriminator: [
@@ -4166,12 +4524,24 @@ var types$9 = [
4166
4524
  ],
4167
4525
  type: "u16"
4168
4526
  },
4527
+ {
4528
+ name: "aggregate_mode_tag",
4529
+ docs: [
4530
+ "Tracks which aggregation mode currently owns the shared temp fields.",
4531
+ "0 = idle,",
4532
+ "1 = Normal,",
4533
+ "2 = PostSync,",
4534
+ "3 = PostLateEpoch.",
4535
+ "Prevents cross-mode state contamination when modes share the same vars."
4536
+ ],
4537
+ type: "u8"
4538
+ },
4169
4539
  {
4170
4540
  name: "_reserved",
4171
4541
  type: {
4172
4542
  array: [
4173
4543
  "u8",
4174
- 32
4544
+ 31
4175
4545
  ]
4176
4546
  }
4177
4547
  }
@@ -4404,7 +4774,9 @@ var types$9 = [
4404
4774
  {
4405
4775
  name: "authority",
4406
4776
  docs: [
4407
- "Authority that can update serviceable_epoch"
4777
+ "DEPRECATED: Originally intended as authority for serviceable_epoch updates,",
4778
+ "but serviceable_epoch is updated by merge_deactivated_stakes gated via GlobalConfig.cranky.",
4779
+ "Retained to preserve account layout."
4408
4780
  ],
4409
4781
  type: "pubkey"
4410
4782
  },
@@ -4720,9 +5092,10 @@ var types$9 = [
4720
5092
  type: "u64"
4721
5093
  },
4722
5094
  {
4723
- name: "last_pool_liqsol_balance",
5095
+ name: "expected_pool_balance",
4724
5096
  docs: [
4725
- "Last observed liqSOL pool balance (for yield calculation)"
5097
+ "Expected liqSOL pool balance (tracked by protocol operations, not read from on-chain balance).",
5098
+ "Any discrepancy vs actual on-chain balance is treated as unsolicited donations, not yield."
4726
5099
  ],
4727
5100
  type: "u64"
4728
5101
  },
@@ -4935,6 +5308,9 @@ var types$9 = [
4935
5308
  },
4936
5309
  {
4937
5310
  name: "last_active_infos_synced_epoch",
5311
+ docs: [
5312
+ "DEPRECATED: ActiveInfosSynced removed in WIN-134. Retained to preserve account layout."
5313
+ ],
4938
5314
  type: "u16"
4939
5315
  },
4940
5316
  {
@@ -4949,6 +5325,9 @@ var types$9 = [
4949
5325
  },
4950
5326
  {
4951
5327
  name: "last_distribution_slot",
5328
+ docs: [
5329
+ "DEPRECATED: Distribution slot tracking removed in PR113. Retained to preserve account layout."
5330
+ ],
4952
5331
  type: {
4953
5332
  option: "u64"
4954
5333
  }
@@ -5113,6 +5492,24 @@ var types$9 = [
5113
5492
  {
5114
5493
  name: "bump",
5115
5494
  type: "u8"
5495
+ },
5496
+ {
5497
+ name: "accumulated_pretoken_yield",
5498
+ type: {
5499
+ option: "u64"
5500
+ }
5501
+ },
5502
+ {
5503
+ name: "last_epoch_synd_liqsol",
5504
+ type: {
5505
+ option: "u64"
5506
+ }
5507
+ },
5508
+ {
5509
+ name: "last_synd_epoch",
5510
+ type: {
5511
+ option: "u64"
5512
+ }
5116
5513
  }
5117
5514
  ]
5118
5515
  }
@@ -5207,6 +5604,57 @@ var types$9 = [
5207
5604
  ]
5208
5605
  }
5209
5606
  },
5607
+ {
5608
+ name: "PretokenPurchaseHistory",
5609
+ serialization: "bytemuck",
5610
+ repr: {
5611
+ kind: "c"
5612
+ },
5613
+ type: {
5614
+ kind: "struct",
5615
+ fields: [
5616
+ {
5617
+ name: "starting_epoch",
5618
+ type: "u64"
5619
+ },
5620
+ {
5621
+ name: "latest_epoch",
5622
+ type: "u64"
5623
+ },
5624
+ {
5625
+ name: "purchased_per_epoch",
5626
+ type: {
5627
+ array: [
5628
+ "u64",
5629
+ 100
5630
+ ]
5631
+ }
5632
+ },
5633
+ {
5634
+ name: "synd_per_epoch",
5635
+ type: {
5636
+ array: [
5637
+ "u64",
5638
+ 100
5639
+ ]
5640
+ }
5641
+ },
5642
+ {
5643
+ name: "bump",
5644
+ type: "u8"
5645
+ },
5646
+ {
5647
+ name: "_padding",
5648
+ type: {
5649
+ array: [
5650
+ "u8",
5651
+ 7
5652
+ ]
5653
+ }
5654
+ }
5655
+ ]
5656
+ }
5657
+ },
5210
5658
  {
5211
5659
  name: "PretokenPurchased",
5212
5660
  type: {
@@ -5467,56 +5915,56 @@ var types$9 = [
5467
5915
  {
5468
5916
  name: "addition_in_progress",
5469
5917
  docs: [
5470
- "Whether validator addition selection is currently in progress (batched processing)"
5918
+ "DEPRECATED see BatchOrchestrator. Always false."
5471
5919
  ],
5472
5920
  type: "bool"
5473
5921
  },
5474
5922
  {
5475
5923
  name: "addition_next_rank",
5476
5924
  docs: [
5477
- "Next rank to process in leaderboard sorted_indices"
5925
+ "DEPRECATED see BatchOrchestrator.addition_next_rank. Always 0."
5478
5926
  ],
5479
5927
  type: "u16"
5480
5928
  },
5481
5929
  {
5482
5930
  name: "addition_target_rank",
5483
5931
  docs: [
5484
- "Target rank to process up to (inclusive)"
5932
+ "DEPRECATED see BatchOrchestrator.addition_target_rank. Always 0."
5485
5933
  ],
5486
5934
  type: "u16"
5487
5935
  },
5488
5936
  {
5489
5937
  name: "validators_added_this_selection",
5490
5938
  docs: [
5491
- "Number of validators added in the current selection cycle"
5939
+ "DEPRECATED see BatchOrchestrator. Always 0."
5492
5940
  ],
5493
5941
  type: "u16"
5494
5942
  },
5495
5943
  {
5496
5944
  name: "removal_in_progress",
5497
5945
  docs: [
5498
- "Whether validator removal selection is currently in progress (batched processing)"
5946
+ "DEPRECATED see BatchOrchestrator. Always false."
5499
5947
  ],
5500
5948
  type: "bool"
5501
5949
  },
5502
5950
  {
5503
5951
  name: "removal_next_index",
5504
5952
  docs: [
5505
- "Next index in active list to check for removal"
5953
+ "DEPRECATED see BatchOrchestrator.removal_next_index. Always 0."
5506
5954
  ],
5507
5955
  type: "u16"
5508
5956
  },
5509
5957
  {
5510
5958
  name: "removal_active_list_snapshot",
5511
5959
  docs: [
5512
- "Snapshot of active list count at start of removal (frozen)"
5960
+ "DEPRECATED see BatchOrchestrator. Always 0."
5513
5961
  ],
5514
5962
  type: "u16"
5515
5963
  },
5516
5964
  {
5517
5965
  name: "validators_removed_this_selection",
5518
5966
  docs: [
5519
- "Number of validators removed in the current selection cycle"
5967
+ "DEPRECATED see BatchOrchestrator. Always 0."
5520
5968
  ],
5521
5969
  type: "u16"
5522
5970
  }
@@ -6372,6 +6820,41 @@ var instructions$6 = [
6372
6820
  }
6373
6821
  }
6374
6822
  ]
6823
+ },
6824
+ {
6825
+ name: "update_liqsol_metadata_permissionless",
6826
+ discriminator: [
6827
+ 21,
6828
+ 255,
6829
+ 26,
6830
+ 184,
6831
+ 136,
6832
+ 110,
6833
+ 214,
6834
+ 33
6835
+ ],
6836
+ accounts: [
6837
+ {
6838
+ name: "payer",
6839
+ writable: true,
6840
+ signer: true
6841
+ },
6842
+ {
6843
+ name: "mint_authority"
6844
+ },
6845
+ {
6846
+ name: "mint",
6847
+ writable: true
6848
+ },
6849
+ {
6850
+ name: "token_program"
6851
+ },
6852
+ {
6853
+ name: "system_program"
6854
+ }
6855
+ ],
6856
+ args: [
6857
+ ]
6375
6858
  }
6376
6859
  ];
6377
6860
  var errors$6 = [
@@ -7129,6 +7612,41 @@ var instructions$4 = [
7129
7612
  type: "u64"
7130
7613
  }
7131
7614
  ]
7615
+ },
7616
+ {
7617
+ name: "update_extra_account_meta_list",
7618
+ discriminator: [
7619
+ 44,
7620
+ 125,
7621
+ 141,
7622
+ 226,
7623
+ 97,
7624
+ 179,
7625
+ 166,
7626
+ 96
7627
+ ],
7628
+ accounts: [
7629
+ {
7630
+ name: "payer",
7631
+ writable: true,
7632
+ signer: true
7633
+ },
7634
+ {
7635
+ name: "extra_account_meta_list",
7636
+ writable: true
7637
+ },
7638
+ {
7639
+ name: "mint"
7640
+ },
7641
+ {
7642
+ name: "system_program"
7643
+ },
7644
+ {
7645
+ name: "liqsol_core"
7646
+ }
7647
+ ],
7648
+ args: [
7649
+ ]
7132
7650
  }
7133
7651
  ];
7134
7652
  var accounts$3 = [
@@ -7300,10 +7818,55 @@ var instructions$3 = [
7300
7818
  ]
7301
7819
  },
7302
7820
  {
7303
- name: "aggregate_stake_metrics",
7304
- docs: [
7305
- "V2: Aggregate stake metrics across all validators using PDA architecture"
7306
- ],
7821
+ name: "admin_force_unbond_role",
7822
+ discriminator: [
7823
+ 80,
7824
+ 107,
7825
+ 27,
7826
+ 49,
7827
+ 126,
7828
+ 25,
7829
+ 31,
7830
+ 238
7831
+ ],
7832
+ accounts: [
7833
+ {
7834
+ name: "admin",
7835
+ signer: true
7836
+ },
7837
+ {
7838
+ name: "global_config"
7839
+ },
7840
+ {
7841
+ name: "global_state"
7842
+ },
7843
+ {
7844
+ name: "user",
7845
+ docs: [
7846
+ "The user whose role bond is being force-unbonded"
7847
+ ]
7848
+ },
7849
+ {
7850
+ name: "outpost_account",
7851
+ writable: true
7852
+ }
7853
+ ],
7854
+ args: [
7855
+ {
7856
+ name: "role",
7857
+ type: {
7858
+ defined: {
7859
+ name: "Role"
7860
+ }
7861
+ }
7862
+ }
7863
+ ]
7864
+ },
7865
+ {
7866
+ name: "aggregate_stake_metrics",
7867
+ docs: [
7868
+ "V2: Aggregate stake metrics across all validators using PDA architecture"
7869
+ ],
7307
7870
  discriminator: [
7308
7871
  13,
7309
7872
  245,
@@ -8073,6 +8636,72 @@ var instructions$3 = [
8073
8636
  }
8074
8637
  ]
8075
8638
  },
8639
+ {
8640
+ name: "deposit_to_reserve",
8641
+ discriminator: [
8642
+ 8,
8643
+ 79,
8644
+ 123,
8645
+ 129,
8646
+ 146,
8647
+ 140,
8648
+ 178,
8649
+ 128
8650
+ ],
8651
+ accounts: [
8652
+ {
8653
+ name: "admin",
8654
+ signer: true
8655
+ },
8656
+ {
8657
+ name: "global_config"
8658
+ },
8659
+ {
8660
+ name: "depositor",
8661
+ writable: true,
8662
+ signer: true
8663
+ },
8664
+ {
8665
+ name: "reserve_pool",
8666
+ writable: true
8667
+ },
8668
+ {
8669
+ name: "vault"
8670
+ },
8671
+ {
8672
+ name: "ephemeral_stake",
8673
+ writable: true
8674
+ },
8675
+ {
8676
+ name: "controller_state"
8677
+ },
8678
+ {
8679
+ name: "stake_program"
8680
+ },
8681
+ {
8682
+ name: "system_program"
8683
+ },
8684
+ {
8685
+ name: "clock"
8686
+ },
8687
+ {
8688
+ name: "stake_history"
8689
+ },
8690
+ {
8691
+ name: "rent"
8692
+ }
8693
+ ],
8694
+ args: [
8695
+ {
8696
+ name: "amount",
8697
+ type: "u64"
8698
+ },
8699
+ {
8700
+ name: "seed",
8701
+ type: "u32"
8702
+ }
8703
+ ]
8704
+ },
8076
8705
  {
8077
8706
  name: "desynd",
8078
8707
  discriminator: [
@@ -8149,6 +8778,10 @@ var instructions$3 = [
8149
8778
  ],
8150
8779
  writable: true
8151
8780
  },
8781
+ {
8782
+ name: "pretoken_purchase_history",
8783
+ writable: true
8784
+ },
8152
8785
  {
8153
8786
  name: "token_program"
8154
8787
  },
@@ -8191,6 +8824,44 @@ var instructions$3 = [
8191
8824
  ],
8192
8825
  returns: "u16"
8193
8826
  },
8827
+ {
8828
+ name: "has_role",
8829
+ discriminator: [
8830
+ 218,
8831
+ 136,
8832
+ 44,
8833
+ 87,
8834
+ 142,
8835
+ 247,
8836
+ 141,
8837
+ 195
8838
+ ],
8839
+ accounts: [
8840
+ {
8841
+ name: "user",
8842
+ docs: [
8843
+ "User whose role status is being checked."
8844
+ ]
8845
+ },
8846
+ {
8847
+ name: "outpost_account"
8848
+ },
8849
+ {
8850
+ name: "global_state"
8851
+ }
8852
+ ],
8853
+ args: [
8854
+ {
8855
+ name: "role",
8856
+ type: {
8857
+ defined: {
8858
+ name: "Role"
8859
+ }
8860
+ }
8861
+ }
8862
+ ],
8863
+ returns: "bool"
8864
+ },
8194
8865
  {
8195
8866
  name: "init_bucket",
8196
8867
  docs: [
@@ -8542,6 +9213,52 @@ var instructions$3 = [
8542
9213
  args: [
8543
9214
  ]
8544
9215
  },
9216
+ {
9217
+ name: "initialize_pretoken_purchase_history",
9218
+ docs: [
9219
+ "Admin-only: initialize PretokenPurchaseHistory PDA for a pool"
9220
+ ],
9221
+ discriminator: [
9222
+ 140,
9223
+ 166,
9224
+ 196,
9225
+ 128,
9226
+ 189,
9227
+ 240,
9228
+ 159,
9229
+ 1
9230
+ ],
9231
+ accounts: [
9232
+ {
9233
+ name: "admin",
9234
+ writable: true,
9235
+ signer: true
9236
+ },
9237
+ {
9238
+ name: "global_config"
9239
+ },
9240
+ {
9241
+ name: "pretoken_purchase_history",
9242
+ writable: true
9243
+ },
9244
+ {
9245
+ name: "pool_authority"
9246
+ },
9247
+ {
9248
+ name: "global_state",
9249
+ writable: true
9250
+ },
9251
+ {
9252
+ name: "pool_pretoken_record",
9253
+ writable: true
9254
+ },
9255
+ {
9256
+ name: "system_program"
9257
+ }
9258
+ ],
9259
+ args: [
9260
+ ]
9261
+ },
8545
9262
  {
8546
9263
  name: "initialize_processing_state",
8547
9264
  docs: [
@@ -9423,6 +10140,10 @@ var instructions$3 = [
9423
10140
  },
9424
10141
  {
9425
10142
  name: "system_program"
10143
+ },
10144
+ {
10145
+ name: "pretoken_purchase_history",
10146
+ writable: true
9426
10147
  }
9427
10148
  ],
9428
10149
  args: [
@@ -9517,6 +10238,10 @@ var instructions$3 = [
9517
10238
  },
9518
10239
  {
9519
10240
  name: "chainlink_program"
10241
+ },
10242
+ {
10243
+ name: "pretoken_purchase_history",
10244
+ writable: true
9520
10245
  }
9521
10246
  ],
9522
10247
  args: [
@@ -9584,72 +10309,212 @@ var instructions$3 = [
9584
10309
  signer: true
9585
10310
  },
9586
10311
  {
9587
- name: "stake_metrics",
10312
+ name: "stake_metrics",
10313
+ writable: true
10314
+ },
10315
+ {
10316
+ name: "epoch_state",
10317
+ writable: true
10318
+ },
10319
+ {
10320
+ name: "processing_state",
10321
+ writable: true
10322
+ },
10323
+ {
10324
+ name: "active_list"
10325
+ },
10326
+ {
10327
+ name: "global_config",
10328
+ docs: [
10329
+ "Global config for late epoch slot gate"
10330
+ ]
10331
+ }
10332
+ ],
10333
+ args: [
10334
+ ]
10335
+ },
10336
+ {
10337
+ name: "refresh_stake_metrics_post_sync",
10338
+ docs: [
10339
+ "V2: Refresh stake metrics after removal selection + PDA setup",
10340
+ "Requires ValidatorAdditionSelection + ValidatorPdaSetup as prerequisites",
10341
+ "Tracks completion in last_post_sync_stake_metrics_refresh_epoch"
10342
+ ],
10343
+ discriminator: [
10344
+ 177,
10345
+ 250,
10346
+ 32,
10347
+ 155,
10348
+ 196,
10349
+ 199,
10350
+ 199,
10351
+ 249
10352
+ ],
10353
+ accounts: [
10354
+ {
10355
+ name: "admin",
10356
+ signer: true
10357
+ },
10358
+ {
10359
+ name: "stake_metrics",
10360
+ writable: true
10361
+ },
10362
+ {
10363
+ name: "epoch_state",
10364
+ writable: true
10365
+ },
10366
+ {
10367
+ name: "processing_state",
10368
+ writable: true
10369
+ },
10370
+ {
10371
+ name: "active_list"
10372
+ },
10373
+ {
10374
+ name: "global_config",
10375
+ docs: [
10376
+ "Global config for late epoch slot gate"
10377
+ ]
10378
+ }
10379
+ ],
10380
+ args: [
10381
+ ]
10382
+ },
10383
+ {
10384
+ name: "refund",
10385
+ discriminator: [
10386
+ 2,
10387
+ 96,
10388
+ 183,
10389
+ 251,
10390
+ 63,
10391
+ 208,
10392
+ 46,
10393
+ 46
10394
+ ],
10395
+ accounts: [
10396
+ {
10397
+ name: "associated_token_program"
10398
+ },
10399
+ {
10400
+ name: "user",
10401
+ writable: true,
10402
+ signer: true
10403
+ },
10404
+ {
10405
+ name: "global_state",
10406
+ writable: true
10407
+ },
10408
+ {
10409
+ name: "outpost_account",
10410
+ writable: true
10411
+ },
10412
+ {
10413
+ name: "distribution_state",
10414
+ writable: true
10415
+ },
10416
+ {
10417
+ name: "pool_authority"
10418
+ },
10419
+ {
10420
+ name: "liqsol_pool_ata",
10421
+ writable: true
10422
+ },
10423
+ {
10424
+ name: "refund_liqsol_ata",
10425
+ writable: true
10426
+ },
10427
+ {
10428
+ name: "liqsol_pool_user_record",
10429
+ writable: true
10430
+ },
10431
+ {
10432
+ name: "user_record",
9588
10433
  writable: true
9589
10434
  },
9590
10435
  {
9591
- name: "epoch_state",
9592
- writable: true
10436
+ name: "extra_account_meta_list"
9593
10437
  },
9594
10438
  {
9595
- name: "processing_state",
10439
+ name: "liqsol_core_program"
10440
+ },
10441
+ {
10442
+ name: "transfer_hook_program"
10443
+ },
10444
+ {
10445
+ name: "liqsol_mint"
10446
+ },
10447
+ {
10448
+ name: "token_program"
10449
+ },
10450
+ {
10451
+ name: "bucket_authority"
10452
+ },
10453
+ {
10454
+ name: "bucket_token_account",
9596
10455
  writable: true
9597
10456
  },
9598
10457
  {
9599
- name: "active_list"
10458
+ name: "bucket_user_record",
10459
+ writable: true
9600
10460
  },
9601
10461
  {
9602
- name: "global_config",
9603
- docs: [
9604
- "Global config for late epoch slot gate"
9605
- ]
10462
+ name: "system_program"
9606
10463
  }
9607
10464
  ],
9608
10465
  args: [
9609
10466
  ]
9610
10467
  },
9611
10468
  {
9612
- name: "refresh_stake_metrics_post_sync",
9613
- docs: [
9614
- "V2: Refresh stake metrics after removal selection + PDA setup",
9615
- "Requires ActiveInfosSynced + ValidatorPdaSetup as prerequisites",
9616
- "Tracks completion in last_post_sync_stake_metrics_refresh_epoch"
9617
- ],
10469
+ name: "register_system_pda",
9618
10470
  discriminator: [
9619
- 177,
9620
- 250,
9621
- 32,
9622
- 155,
9623
- 196,
9624
- 199,
9625
- 199,
9626
- 249
10471
+ 110,
10472
+ 93,
10473
+ 36,
10474
+ 156,
10475
+ 179,
10476
+ 69,
10477
+ 54,
10478
+ 210
9627
10479
  ],
9628
10480
  accounts: [
9629
10481
  {
9630
10482
  name: "admin",
10483
+ writable: true,
9631
10484
  signer: true
9632
10485
  },
9633
10486
  {
9634
- name: "stake_metrics",
9635
- writable: true
10487
+ name: "global_config"
9636
10488
  },
9637
10489
  {
9638
- name: "epoch_state",
10490
+ name: "pda_owner",
10491
+ docs: [
10492
+ "The PDA whose user record we're creating — must be system-owned (no program data)."
10493
+ ]
10494
+ },
10495
+ {
10496
+ name: "pda_ata"
10497
+ },
10498
+ {
10499
+ name: "user_record",
9639
10500
  writable: true
9640
10501
  },
9641
10502
  {
9642
- name: "processing_state",
10503
+ name: "distribution_state",
9643
10504
  writable: true
9644
10505
  },
9645
10506
  {
9646
- name: "active_list"
10507
+ name: "bucket_authority"
9647
10508
  },
9648
10509
  {
9649
- name: "global_config",
10510
+ name: "bucket_token_account",
9650
10511
  docs: [
9651
- "Global config for late epoch slot gate"
9652
- ]
10512
+ "The bucket's associated token account holding liqSOL (for index sync)"
10513
+ ],
10514
+ writable: true
10515
+ },
10516
+ {
10517
+ name: "system_program"
9653
10518
  }
9654
10519
  ],
9655
10520
  args: [
@@ -9669,25 +10534,17 @@ var instructions$3 = [
9669
10534
  ],
9670
10535
  accounts: [
9671
10536
  {
9672
- name: "user",
9673
- writable: true
10537
+ name: "payer",
10538
+ writable: true,
10539
+ signer: true
9674
10540
  },
9675
10541
  {
9676
- name: "user_ata",
9677
- writable: true
10542
+ name: "user_ata"
9678
10543
  },
9679
10544
  {
9680
10545
  name: "user_record",
9681
10546
  writable: true
9682
10547
  },
9683
- {
9684
- name: "payer",
9685
- docs: [
9686
- "Payer for the user record PDA creation (always the user)"
9687
- ],
9688
- writable: true,
9689
- signer: true
9690
- },
9691
10548
  {
9692
10549
  name: "distribution_state",
9693
10550
  writable: true
@@ -9853,7 +10710,8 @@ var instructions$3 = [
9853
10710
  name: "bucket_token_account",
9854
10711
  docs: [
9855
10712
  "The bucket's token account holding liqSOL (for sync_index balance)"
9856
- ]
10713
+ ],
10714
+ writable: true
9857
10715
  },
9858
10716
  {
9859
10717
  name: "reserve_pool",
@@ -10202,7 +11060,8 @@ var instructions$3 = [
10202
11060
  name: "global_config"
10203
11061
  },
10204
11062
  {
10205
- name: "global_state"
11063
+ name: "global_state",
11064
+ writable: true
10206
11065
  },
10207
11066
  {
10208
11067
  name: "user",
@@ -10295,7 +11154,7 @@ var instructions$3 = [
10295
11154
  name: "sync_main_stake_accounts",
10296
11155
  docs: [
10297
11156
  "V2: Sync main stake accounts using PDA architecture (batched)",
10298
- "Processes up to 10 validators per transaction via remaining_accounts",
11157
+ "Processes validators in batches via remaining_accounts (batch size is enforced client-side)",
10299
11158
  "Note: Only syncs primary delegated stakes, not transient stakes"
10300
11159
  ],
10301
11160
  discriminator: [
@@ -10463,6 +11322,10 @@ var instructions$3 = [
10463
11322
  ],
10464
11323
  writable: true
10465
11324
  },
11325
+ {
11326
+ name: "pretoken_purchase_history",
11327
+ writable: true
11328
+ },
10466
11329
  {
10467
11330
  name: "token_program"
10468
11331
  },
@@ -10865,6 +11728,19 @@ var accounts$2 = [
10865
11728
  150
10866
11729
  ]
10867
11730
  },
11731
+ {
11732
+ name: "PretokenPurchaseHistory",
11733
+ discriminator: [
11734
+ 33,
11735
+ 71,
11736
+ 113,
11737
+ 206,
11738
+ 33,
11739
+ 180,
11740
+ 236,
11741
+ 131
11742
+ ]
11743
+ },
10868
11744
  {
10869
11745
  name: "PriceHistory",
10870
11746
  discriminator: [
@@ -11377,12 +12253,24 @@ var types$5 = [
11377
12253
  ],
11378
12254
  type: "u16"
11379
12255
  },
12256
+ {
12257
+ name: "aggregate_mode_tag",
12258
+ docs: [
12259
+ "Tracks which aggregation mode currently owns the shared temp fields.",
12260
+ "0 = idle,",
12261
+ "1 = Normal,",
12262
+ "2 = PostSync,",
12263
+ "3 = PostLateEpoch.",
12264
+ "Prevents cross-mode state contamination when modes share the same vars."
12265
+ ],
12266
+ type: "u8"
12267
+ },
11380
12268
  {
11381
12269
  name: "_reserved",
11382
12270
  type: {
11383
12271
  array: [
11384
12272
  "u8",
11385
- 32
12273
+ 31
11386
12274
  ]
11387
12275
  }
11388
12276
  }
@@ -11615,7 +12503,9 @@ var types$5 = [
11615
12503
  {
11616
12504
  name: "authority",
11617
12505
  docs: [
11618
- "Authority that can update serviceable_epoch"
12506
+ "DEPRECATED: Originally intended as authority for serviceable_epoch updates,",
12507
+ "but serviceable_epoch is updated by merge_deactivated_stakes gated via GlobalConfig.cranky.",
12508
+ "Retained to preserve account layout."
11619
12509
  ],
11620
12510
  type: "pubkey"
11621
12511
  },
@@ -11931,9 +12821,10 @@ var types$5 = [
11931
12821
  type: "u64"
11932
12822
  },
11933
12823
  {
11934
- name: "last_pool_liqsol_balance",
12824
+ name: "expected_pool_balance",
11935
12825
  docs: [
11936
- "Last observed liqSOL pool balance (for yield calculation)"
12826
+ "Expected liqSOL pool balance (tracked by protocol operations, not read from on-chain balance).",
12827
+ "Any discrepancy vs actual on-chain balance is treated as unsolicited donations, not yield."
11937
12828
  ],
11938
12829
  type: "u64"
11939
12830
  },
@@ -12146,6 +13037,9 @@ var types$5 = [
12146
13037
  },
12147
13038
  {
12148
13039
  name: "last_active_infos_synced_epoch",
13040
+ docs: [
13041
+ "DEPRECATED: ActiveInfosSynced removed in WIN-134. Retained to preserve account layout."
13042
+ ],
12149
13043
  type: "u16"
12150
13044
  },
12151
13045
  {
@@ -12160,6 +13054,9 @@ var types$5 = [
12160
13054
  },
12161
13055
  {
12162
13056
  name: "last_distribution_slot",
13057
+ docs: [
13058
+ "DEPRECATED: Distribution slot tracking removed in PR113. Retained to preserve account layout."
13059
+ ],
12163
13060
  type: {
12164
13061
  option: "u64"
12165
13062
  }
@@ -12324,6 +13221,24 @@ var types$5 = [
12324
13221
  {
12325
13222
  name: "bump",
12326
13223
  type: "u8"
13224
+ },
13225
+ {
13226
+ name: "accumulated_pretoken_yield",
13227
+ type: {
13228
+ option: "u64"
13229
+ }
13230
+ },
13231
+ {
13232
+ name: "last_epoch_synd_liqsol",
13233
+ type: {
13234
+ option: "u64"
13235
+ }
13236
+ },
13237
+ {
13238
+ name: "last_synd_epoch",
13239
+ type: {
13240
+ option: "u64"
13241
+ }
12327
13242
  }
12328
13243
  ]
12329
13244
  }
@@ -12418,6 +13333,57 @@ var types$5 = [
12418
13333
  ]
12419
13334
  }
12420
13335
  },
13336
+ {
13337
+ name: "PretokenPurchaseHistory",
13338
+ serialization: "bytemuck",
13339
+ repr: {
13340
+ kind: "c"
13341
+ },
13342
+ type: {
13343
+ kind: "struct",
13344
+ fields: [
13345
+ {
13346
+ name: "starting_epoch",
13347
+ type: "u64"
13348
+ },
13349
+ {
13350
+ name: "latest_epoch",
13351
+ type: "u64"
13352
+ },
13353
+ {
13354
+ name: "purchased_per_epoch",
13355
+ type: {
13356
+ array: [
13357
+ "u64",
13358
+ 100
13359
+ ]
13360
+ }
13361
+ },
13362
+ {
13363
+ name: "synd_per_epoch",
13364
+ type: {
13365
+ array: [
13366
+ "u64",
13367
+ 100
13368
+ ]
13369
+ }
13370
+ },
13371
+ {
13372
+ name: "bump",
13373
+ type: "u8"
13374
+ },
13375
+ {
13376
+ name: "_padding",
13377
+ type: {
13378
+ array: [
13379
+ "u8",
13380
+ 7
13381
+ ]
13382
+ }
13383
+ }
13384
+ ]
13385
+ }
13386
+ },
12421
13387
  {
12422
13388
  name: "PretokenPurchased",
12423
13389
  type: {
@@ -12678,56 +13644,56 @@ var types$5 = [
12678
13644
  {
12679
13645
  name: "addition_in_progress",
12680
13646
  docs: [
12681
- "Whether validator addition selection is currently in progress (batched processing)"
13647
+ "DEPRECATED see BatchOrchestrator. Always false."
12682
13648
  ],
12683
13649
  type: "bool"
12684
13650
  },
12685
13651
  {
12686
13652
  name: "addition_next_rank",
12687
13653
  docs: [
12688
- "Next rank to process in leaderboard sorted_indices"
13654
+ "DEPRECATED see BatchOrchestrator.addition_next_rank. Always 0."
12689
13655
  ],
12690
13656
  type: "u16"
12691
13657
  },
12692
13658
  {
12693
13659
  name: "addition_target_rank",
12694
13660
  docs: [
12695
- "Target rank to process up to (inclusive)"
13661
+ "DEPRECATED see BatchOrchestrator.addition_target_rank. Always 0."
12696
13662
  ],
12697
13663
  type: "u16"
12698
13664
  },
12699
13665
  {
12700
13666
  name: "validators_added_this_selection",
12701
13667
  docs: [
12702
- "Number of validators added in the current selection cycle"
13668
+ "DEPRECATED see BatchOrchestrator. Always 0."
12703
13669
  ],
12704
13670
  type: "u16"
12705
13671
  },
12706
13672
  {
12707
13673
  name: "removal_in_progress",
12708
13674
  docs: [
12709
- "Whether validator removal selection is currently in progress (batched processing)"
13675
+ "DEPRECATED see BatchOrchestrator. Always false."
12710
13676
  ],
12711
13677
  type: "bool"
12712
13678
  },
12713
13679
  {
12714
13680
  name: "removal_next_index",
12715
13681
  docs: [
12716
- "Next index in active list to check for removal"
13682
+ "DEPRECATED see BatchOrchestrator.removal_next_index. Always 0."
12717
13683
  ],
12718
13684
  type: "u16"
12719
13685
  },
12720
13686
  {
12721
13687
  name: "removal_active_list_snapshot",
12722
13688
  docs: [
12723
- "Snapshot of active list count at start of removal (frozen)"
13689
+ "DEPRECATED see BatchOrchestrator. Always 0."
12724
13690
  ],
12725
13691
  type: "u16"
12726
13692
  },
12727
13693
  {
12728
13694
  name: "validators_removed_this_selection",
12729
13695
  docs: [
12730
- "Number of validators removed in the current selection cycle"
13696
+ "DEPRECATED see BatchOrchestrator. Always 0."
12731
13697
  ],
12732
13698
  type: "u16"
12733
13699
  }
@@ -13583,6 +14549,41 @@ var instructions$2 = [
13583
14549
  }
13584
14550
  }
13585
14551
  ]
14552
+ },
14553
+ {
14554
+ name: "update_liqsol_metadata_permissionless",
14555
+ discriminator: [
14556
+ 21,
14557
+ 255,
14558
+ 26,
14559
+ 184,
14560
+ 136,
14561
+ 110,
14562
+ 214,
14563
+ 33
14564
+ ],
14565
+ accounts: [
14566
+ {
14567
+ name: "payer",
14568
+ writable: true,
14569
+ signer: true
14570
+ },
14571
+ {
14572
+ name: "mint_authority"
14573
+ },
14574
+ {
14575
+ name: "mint",
14576
+ writable: true
14577
+ },
14578
+ {
14579
+ name: "token_program"
14580
+ },
14581
+ {
14582
+ name: "system_program"
14583
+ }
14584
+ ],
14585
+ args: [
14586
+ ]
13586
14587
  }
13587
14588
  ];
13588
14589
  var errors$2 = [
@@ -14340,6 +15341,41 @@ var instructions = [
14340
15341
  type: "u64"
14341
15342
  }
14342
15343
  ]
15344
+ },
15345
+ {
15346
+ name: "update_extra_account_meta_list",
15347
+ discriminator: [
15348
+ 44,
15349
+ 125,
15350
+ 141,
15351
+ 226,
15352
+ 97,
15353
+ 179,
15354
+ 166,
15355
+ 96
15356
+ ],
15357
+ accounts: [
15358
+ {
15359
+ name: "payer",
15360
+ writable: true,
15361
+ signer: true
15362
+ },
15363
+ {
15364
+ name: "extra_account_meta_list",
15365
+ writable: true
15366
+ },
15367
+ {
15368
+ name: "mint"
15369
+ },
15370
+ {
15371
+ name: "system_program"
15372
+ },
15373
+ {
15374
+ name: "liqsol_core"
15375
+ }
15376
+ ],
15377
+ args: [
15378
+ ]
14343
15379
  }
14344
15380
  ];
14345
15381
  var accounts = [
@@ -14525,7 +15561,8 @@ const PDA_SEEDS = {
14525
15561
  WITHDRAW_MINT_AUTHORITY: "mint_authority",
14526
15562
  MINT_METADATA: "mint_metadata",
14527
15563
  LIQ_RECEIPT_DATA: "liq_receipt_data",
14528
- WITHDRAW_MINT: "mint"
15564
+ WITHDRAW_MINT: "mint",
15565
+ PRETOKEN_PURCHASE_HISTORY: "pretoken_purchase_history"
14529
15566
  };
14530
15567
  const deriveEphemeralStakeAddress = (user, seed) => __async$h(null, null, function* () {
14531
15568
  const seedStr = `ephemeral_${seed}`;
@@ -14731,6 +15768,7 @@ function buildOutpostAccounts(connection, user, pgs) {
14731
15768
  const liqsolPoolUserRecord = pgs.deriveUserRecordPda(liqsolPoolAta);
14732
15769
  const userUserRecord = pgs.deriveUserRecordPda(userAta);
14733
15770
  const extraAccountMetaList = pgs.deriveExtraAccountMetaListPda(liqsolMint);
15771
+ const pretokenPurchaseHistory = pgs.derivePretokenPurchaseHistoryPda(poolAuthority);
14734
15772
  let chainLinkFeed = CHAINLINK_FEED;
14735
15773
  let chainLinkProgram = CHAINLINK_PROGRAM;
14736
15774
  try {
@@ -14760,7 +15798,8 @@ function buildOutpostAccounts(connection, user, pgs) {
14760
15798
  trancheState,
14761
15799
  chainLinkFeed,
14762
15800
  chainLinkProgram,
14763
- extraAccountMetaList
15801
+ extraAccountMetaList,
15802
+ pretokenPurchaseHistory
14764
15803
  };
14765
15804
  });
14766
15805
  }
@@ -15599,7 +16638,8 @@ class OutpostClient {
15599
16638
  outpostAccount: a.outpostAccount,
15600
16639
  tokenProgram: splToken.TOKEN_2022_PROGRAM_ID,
15601
16640
  associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID,
15602
- systemProgram: web3_js.SystemProgram.programId
16641
+ systemProgram: web3_js.SystemProgram.programId,
16642
+ pretokenPurchaseHistory: a.pretokenPurchaseHistory
15603
16643
  }).instruction();
15604
16644
  });
15605
16645
  }
@@ -15629,7 +16669,8 @@ class OutpostClient {
15629
16669
  outpostAccount: a.outpostAccount,
15630
16670
  tokenProgram: splToken.TOKEN_2022_PROGRAM_ID,
15631
16671
  systemProgram: web3_js.SystemProgram.programId,
15632
- associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID
16672
+ associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID,
16673
+ pretokenPurchaseHistory: a.pretokenPurchaseHistory
15633
16674
  }).instruction();
15634
16675
  });
15635
16676
  }
@@ -15761,7 +16802,8 @@ class TokenClient {
15761
16802
  chainlinkProgram: (_b = a.chainLinkProgram) != null ? _b : CHAINLINK_PROGRAM,
15762
16803
  tokenProgram: splToken.TOKEN_2022_PROGRAM_ID,
15763
16804
  associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID,
15764
- systemProgram: web3_js.SystemProgram.programId
16805
+ systemProgram: web3_js.SystemProgram.programId,
16806
+ pretokenPurchaseHistory: a.pretokenPurchaseHistory
15765
16807
  }).instruction();
15766
16808
  });
15767
16809
  }
@@ -16006,6 +17048,12 @@ class SolanaProgramService {
16006
17048
  this.ids.LIQSOL_CORE
16007
17049
  )[0];
16008
17050
  }
17051
+ derivePretokenPurchaseHistoryPda(poolAuthority) {
17052
+ return web3_js.PublicKey.findProgramAddressSync(
17053
+ [Buffer.from(PDA_SEEDS.PRETOKEN_PURCHASE_HISTORY), poolAuthority.toBuffer()],
17054
+ this.ids.LIQSOL_CORE
17055
+ )[0];
17056
+ }
16009
17057
  deriveWithdrawNftMintPda(receiptId) {
16010
17058
  const receiptIdBytes = Buffer.alloc(8);
16011
17059
  const asBigInt = typeof receiptId === "bigint" ? receiptId : BigInt(receiptId.toString());