@wireio/stake 0.5.1 → 0.5.2

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.d.ts CHANGED
@@ -8099,6 +8099,942 @@ declare class TokenClient {
8099
8099
  getSolPriceUsd(): Promise<bigint>;
8100
8100
  }
8101
8101
 
8102
+ /**
8103
+ * Program IDL in camelCase format in order to be used in JS/TS.
8104
+ *
8105
+ * Note that this is only a type helper and is not the actual IDL. The original
8106
+ * IDL can be found at `target/idl/liqsol_token.json`.
8107
+ */
8108
+ type LiqsolToken = {
8109
+ "address": "5MRFSLCkXPEzfR6gkcZCVttq9g83mMUHyTZ85Z3TSpvU";
8110
+ "metadata": {
8111
+ "name": "liqsolToken";
8112
+ "version": "0.1.0";
8113
+ "spec": "0.1.0";
8114
+ "description": "Liquidity Staking Token Program";
8115
+ };
8116
+ "instructions": [
8117
+ {
8118
+ "name": "createMintAccount";
8119
+ "discriminator": [
8120
+ 76,
8121
+ 184,
8122
+ 50,
8123
+ 62,
8124
+ 162,
8125
+ 141,
8126
+ 47,
8127
+ 103
8128
+ ];
8129
+ "accounts": [
8130
+ {
8131
+ "name": "payer";
8132
+ "writable": true;
8133
+ "signer": true;
8134
+ },
8135
+ {
8136
+ "name": "mintAuthority";
8137
+ },
8138
+ {
8139
+ "name": "receiver";
8140
+ },
8141
+ {
8142
+ "name": "mint";
8143
+ "docs": [
8144
+ "The mint PDA - deterministic address for liqSOL token"
8145
+ ];
8146
+ "writable": true;
8147
+ },
8148
+ {
8149
+ "name": "mintTokenAccount";
8150
+ "writable": true;
8151
+ },
8152
+ {
8153
+ "name": "systemProgram";
8154
+ },
8155
+ {
8156
+ "name": "associatedTokenProgram";
8157
+ },
8158
+ {
8159
+ "name": "tokenProgram";
8160
+ }
8161
+ ];
8162
+ "args": [
8163
+ {
8164
+ "name": "args";
8165
+ "type": {
8166
+ "defined": {
8167
+ "name": "createMintAccountArgs";
8168
+ };
8169
+ };
8170
+ }
8171
+ ];
8172
+ },
8173
+ {
8174
+ "name": "mintForAuthorizedProgram";
8175
+ "discriminator": [
8176
+ 116,
8177
+ 208,
8178
+ 64,
8179
+ 189,
8180
+ 2,
8181
+ 60,
8182
+ 50,
8183
+ 41
8184
+ ];
8185
+ "accounts": [
8186
+ {
8187
+ "name": "mint";
8188
+ "writable": true;
8189
+ },
8190
+ {
8191
+ "name": "recipientTokenAccount";
8192
+ "writable": true;
8193
+ },
8194
+ {
8195
+ "name": "programAuthority";
8196
+ "docs": [
8197
+ "The calling program's authority PDA that proves authorization to mint"
8198
+ ];
8199
+ "writable": true;
8200
+ "signer": true;
8201
+ },
8202
+ {
8203
+ "name": "mintAuthority";
8204
+ },
8205
+ {
8206
+ "name": "instructions";
8207
+ },
8208
+ {
8209
+ "name": "tokenProgram";
8210
+ }
8211
+ ];
8212
+ "args": [
8213
+ {
8214
+ "name": "args";
8215
+ "type": {
8216
+ "defined": {
8217
+ "name": "mintTokenArgs";
8218
+ };
8219
+ };
8220
+ }
8221
+ ];
8222
+ }
8223
+ ];
8224
+ "errors": [
8225
+ {
8226
+ "code": 6000;
8227
+ "name": "invalidMintAuthority";
8228
+ "msg": "Invalid mint authority";
8229
+ },
8230
+ {
8231
+ "code": 6001;
8232
+ "name": "unauthorizedProgram";
8233
+ "msg": "Unauthorized program attempting to mint";
8234
+ },
8235
+ {
8236
+ "code": 6002;
8237
+ "name": "cannotDetermineCallingProgram";
8238
+ "msg": "Cannot determine calling program";
8239
+ },
8240
+ {
8241
+ "code": 6003;
8242
+ "name": "directCallNotAllowed";
8243
+ "msg": "Direct calls not allowed, must be called via CPI";
8244
+ },
8245
+ {
8246
+ "code": 6004;
8247
+ "name": "invalidProgramId";
8248
+ "msg": "Invalid program ID";
8249
+ },
8250
+ {
8251
+ "code": 6005;
8252
+ "name": "unauthorizedAuthority";
8253
+ "msg": "Unauthorized authority PDA";
8254
+ }
8255
+ ];
8256
+ "types": [
8257
+ {
8258
+ "name": "createMintAccountArgs";
8259
+ "type": {
8260
+ "kind": "struct";
8261
+ "fields": [
8262
+ {
8263
+ "name": "name";
8264
+ "type": "string";
8265
+ },
8266
+ {
8267
+ "name": "symbol";
8268
+ "type": "string";
8269
+ },
8270
+ {
8271
+ "name": "uri";
8272
+ "type": "string";
8273
+ }
8274
+ ];
8275
+ };
8276
+ },
8277
+ {
8278
+ "name": "mintTokenArgs";
8279
+ "type": {
8280
+ "kind": "struct";
8281
+ "fields": [
8282
+ {
8283
+ "name": "amount";
8284
+ "type": "u64";
8285
+ }
8286
+ ];
8287
+ };
8288
+ }
8289
+ ];
8290
+ };
8291
+
8292
+ /**
8293
+ * Program IDL in camelCase format in order to be used in JS/TS.
8294
+ *
8295
+ * Note that this is only a type helper and is not the actual IDL. The original
8296
+ * IDL can be found at `target/idl/validator_leaderboard.json`.
8297
+ */
8298
+ type ValidatorLeaderboard = {
8299
+ "address": "5v7mWL1735qp2Th9B5WNf7spGynR5ZaxwyCYoQw13DP2";
8300
+ "metadata": {
8301
+ "name": "validatorLeaderboard";
8302
+ "version": "0.1.0";
8303
+ "spec": "0.1.0";
8304
+ "description": "Created with Anchor";
8305
+ };
8306
+ "instructions": [
8307
+ {
8308
+ "name": "initializeLeaderboard";
8309
+ "discriminator": [
8310
+ 47,
8311
+ 23,
8312
+ 34,
8313
+ 39,
8314
+ 46,
8315
+ 108,
8316
+ 91,
8317
+ 176
8318
+ ];
8319
+ "accounts": [
8320
+ {
8321
+ "name": "authority";
8322
+ "writable": true;
8323
+ "signer": true;
8324
+ },
8325
+ {
8326
+ "name": "leaderboardState";
8327
+ "writable": true;
8328
+ },
8329
+ {
8330
+ "name": "systemProgram";
8331
+ }
8332
+ ];
8333
+ "args": [];
8334
+ },
8335
+ {
8336
+ "name": "reallocLeaderboard";
8337
+ "discriminator": [
8338
+ 2,
8339
+ 70,
8340
+ 106,
8341
+ 94,
8342
+ 81,
8343
+ 225,
8344
+ 113,
8345
+ 152
8346
+ ];
8347
+ "accounts": [
8348
+ {
8349
+ "name": "leaderboardState";
8350
+ "writable": true;
8351
+ },
8352
+ {
8353
+ "name": "payer";
8354
+ "writable": true;
8355
+ "signer": true;
8356
+ },
8357
+ {
8358
+ "name": "systemProgram";
8359
+ }
8360
+ ];
8361
+ "args": [];
8362
+ },
8363
+ {
8364
+ "name": "testClearLeaderboard";
8365
+ "discriminator": [
8366
+ 118,
8367
+ 207,
8368
+ 26,
8369
+ 205,
8370
+ 180,
8371
+ 7,
8372
+ 75,
8373
+ 244
8374
+ ];
8375
+ "accounts": [
8376
+ {
8377
+ "name": "leaderboardState";
8378
+ "writable": true;
8379
+ },
8380
+ {
8381
+ "name": "authority";
8382
+ "signer": true;
8383
+ }
8384
+ ];
8385
+ "args": [];
8386
+ },
8387
+ {
8388
+ "name": "testForceRegisterValidator";
8389
+ "discriminator": [
8390
+ 136,
8391
+ 156,
8392
+ 132,
8393
+ 32,
8394
+ 96,
8395
+ 240,
8396
+ 7,
8397
+ 115
8398
+ ];
8399
+ "accounts": [
8400
+ {
8401
+ "name": "registrant";
8402
+ "writable": true;
8403
+ "signer": true;
8404
+ },
8405
+ {
8406
+ "name": "voteAccount";
8407
+ },
8408
+ {
8409
+ "name": "validatorRecord";
8410
+ "writable": true;
8411
+ },
8412
+ {
8413
+ "name": "leaderboardState";
8414
+ "writable": true;
8415
+ },
8416
+ {
8417
+ "name": "systemProgram";
8418
+ },
8419
+ {
8420
+ "name": "clock";
8421
+ }
8422
+ ];
8423
+ "args": [
8424
+ {
8425
+ "name": "vpp";
8426
+ "type": "u8";
8427
+ }
8428
+ ];
8429
+ },
8430
+ {
8431
+ "name": "testForceUpdateVpp";
8432
+ "discriminator": [
8433
+ 67,
8434
+ 51,
8435
+ 28,
8436
+ 174,
8437
+ 200,
8438
+ 214,
8439
+ 203,
8440
+ 162
8441
+ ];
8442
+ "accounts": [
8443
+ {
8444
+ "name": "registrant";
8445
+ "writable": true;
8446
+ "signer": true;
8447
+ },
8448
+ {
8449
+ "name": "voteAccount";
8450
+ },
8451
+ {
8452
+ "name": "validatorRecord";
8453
+ "writable": true;
8454
+ },
8455
+ {
8456
+ "name": "leaderboardState";
8457
+ "writable": true;
8458
+ }
8459
+ ];
8460
+ "args": [
8461
+ {
8462
+ "name": "vpp";
8463
+ "type": "u8";
8464
+ }
8465
+ ];
8466
+ },
8467
+ {
8468
+ "name": "testSeedRandomValidators";
8469
+ "discriminator": [
8470
+ 48,
8471
+ 155,
8472
+ 181,
8473
+ 112,
8474
+ 163,
8475
+ 242,
8476
+ 43,
8477
+ 146
8478
+ ];
8479
+ "accounts": [
8480
+ {
8481
+ "name": "registrant";
8482
+ "writable": true;
8483
+ "signer": true;
8484
+ },
8485
+ {
8486
+ "name": "leaderboardState";
8487
+ "writable": true;
8488
+ }
8489
+ ];
8490
+ "args": [
8491
+ {
8492
+ "name": "count";
8493
+ "type": "u16";
8494
+ },
8495
+ {
8496
+ "name": "seed";
8497
+ "type": "u64";
8498
+ },
8499
+ {
8500
+ "name": "minVpp";
8501
+ "type": "u8";
8502
+ },
8503
+ {
8504
+ "name": "maxVpp";
8505
+ "type": "u8";
8506
+ }
8507
+ ];
8508
+ },
8509
+ {
8510
+ "name": "updateCommission";
8511
+ "discriminator": [
8512
+ 2,
8513
+ 202,
8514
+ 72,
8515
+ 156,
8516
+ 19,
8517
+ 253,
8518
+ 91,
8519
+ 174
8520
+ ];
8521
+ "accounts": [
8522
+ {
8523
+ "name": "registrant";
8524
+ "writable": true;
8525
+ "signer": true;
8526
+ },
8527
+ {
8528
+ "name": "voteAccount";
8529
+ },
8530
+ {
8531
+ "name": "validatorRecord";
8532
+ "writable": true;
8533
+ },
8534
+ {
8535
+ "name": "systemProgram";
8536
+ }
8537
+ ];
8538
+ "args": [];
8539
+ },
8540
+ {
8541
+ "name": "updateMevCommission";
8542
+ "discriminator": [
8543
+ 107,
8544
+ 65,
8545
+ 238,
8546
+ 108,
8547
+ 183,
8548
+ 47,
8549
+ 236,
8550
+ 203
8551
+ ];
8552
+ "accounts": [
8553
+ {
8554
+ "name": "signer";
8555
+ "signer": true;
8556
+ },
8557
+ {
8558
+ "name": "validatorRecord";
8559
+ "writable": true;
8560
+ },
8561
+ {
8562
+ "name": "tipDistributionAccount";
8563
+ }
8564
+ ];
8565
+ "args": [];
8566
+ },
8567
+ {
8568
+ "name": "updateValidator";
8569
+ "discriminator": [
8570
+ 105,
8571
+ 192,
8572
+ 4,
8573
+ 98,
8574
+ 236,
8575
+ 115,
8576
+ 108,
8577
+ 192
8578
+ ];
8579
+ "accounts": [
8580
+ {
8581
+ "name": "registrant";
8582
+ "writable": true;
8583
+ "signer": true;
8584
+ },
8585
+ {
8586
+ "name": "voteAccount";
8587
+ },
8588
+ {
8589
+ "name": "validatorRecord";
8590
+ "writable": true;
8591
+ },
8592
+ {
8593
+ "name": "leaderboardState";
8594
+ "writable": true;
8595
+ },
8596
+ {
8597
+ "name": "systemProgram";
8598
+ }
8599
+ ];
8600
+ "args": [
8601
+ {
8602
+ "name": "vpp";
8603
+ "type": "u8";
8604
+ },
8605
+ {
8606
+ "name": "proposedRank";
8607
+ "type": "u16";
8608
+ }
8609
+ ];
8610
+ }
8611
+ ];
8612
+ "accounts": [
8613
+ {
8614
+ "name": "leaderboardState";
8615
+ "discriminator": [
8616
+ 211,
8617
+ 181,
8618
+ 29,
8619
+ 120,
8620
+ 189,
8621
+ 4,
8622
+ 106,
8623
+ 111
8624
+ ];
8625
+ },
8626
+ {
8627
+ "name": "validatorRecord";
8628
+ "discriminator": [
8629
+ 105,
8630
+ 248,
8631
+ 112,
8632
+ 34,
8633
+ 71,
8634
+ 224,
8635
+ 21,
8636
+ 71
8637
+ ];
8638
+ }
8639
+ ];
8640
+ "errors": [
8641
+ {
8642
+ "code": 6000;
8643
+ "name": "missingPreviousValidator";
8644
+ "msg": "Missing previous validator account";
8645
+ },
8646
+ {
8647
+ "code": 6001;
8648
+ "name": "missingNextValidator";
8649
+ "msg": "Missing next validator account";
8650
+ },
8651
+ {
8652
+ "code": 6002;
8653
+ "name": "invalidVppScore";
8654
+ "msg": "Invalid VPP score provided.";
8655
+ },
8656
+ {
8657
+ "code": 6003;
8658
+ "name": "invalidInsertPosition";
8659
+ "msg": "Invalid insertion position.";
8660
+ },
8661
+ {
8662
+ "code": 6004;
8663
+ "name": "invalidCurrentPrev";
8664
+ "msg": "Invalid current previous validator.";
8665
+ },
8666
+ {
8667
+ "code": 6005;
8668
+ "name": "invalidCurrentNext";
8669
+ "msg": "Invalid current next validator.";
8670
+ },
8671
+ {
8672
+ "code": 6006;
8673
+ "name": "invalidHeadValidator";
8674
+ "msg": "Head validator cannot have a previous validator";
8675
+ },
8676
+ {
8677
+ "code": 6007;
8678
+ "name": "invalidTailValidator";
8679
+ "msg": "Tail validator cannot have a next validator";
8680
+ },
8681
+ {
8682
+ "code": 6008;
8683
+ "name": "validatorNotInLeaderboard";
8684
+ "msg": "Cannot remove validator that is not in the leaderboard";
8685
+ },
8686
+ {
8687
+ "code": 6009;
8688
+ "name": "validatorAlreadyExists";
8689
+ "msg": "Validator already exists in the leaderboard";
8690
+ },
8691
+ {
8692
+ "code": 6010;
8693
+ "name": "overflow";
8694
+ "msg": "Arithmetic overflow";
8695
+ },
8696
+ {
8697
+ "code": 6011;
8698
+ "name": "invalidVoteAccount";
8699
+ "msg": "Invalid vote account - must be owned by vote program";
8700
+ },
8701
+ {
8702
+ "code": 6012;
8703
+ "name": "vppVerificationFailed";
8704
+ "msg": "VPP verification failed";
8705
+ },
8706
+ {
8707
+ "code": 6013;
8708
+ "name": "vppUnchanged";
8709
+ "msg": "VPP score unchanged - update not needed";
8710
+ },
8711
+ {
8712
+ "code": 6014;
8713
+ "name": "invalidAccountCount";
8714
+ "msg": "Invalid account count for top 10 verification";
8715
+ },
8716
+ {
8717
+ "code": 6015;
8718
+ "name": "invalidVppOrdering";
8719
+ "msg": "Validators not in correct VPP order";
8720
+ },
8721
+ {
8722
+ "code": 6016;
8723
+ "name": "brokenLinkage";
8724
+ "msg": "Broken linked list continuity";
8725
+ },
8726
+ {
8727
+ "code": 6017;
8728
+ "name": "commissionNotUpdated";
8729
+ "msg": "Commission must be updated for current epoch before updating validator";
8730
+ },
8731
+ {
8732
+ "code": 6018;
8733
+ "name": "mevCommissionNotUpdated";
8734
+ "msg": "MEV commission must be updated for current epoch before updating validator";
8735
+ },
8736
+ {
8737
+ "code": 6019;
8738
+ "name": "invalidCurrentNeighbor";
8739
+ "msg": "Current neighbor account doesn't match validator's stored links";
8740
+ },
8741
+ {
8742
+ "code": 6020;
8743
+ "name": "nonAdjacentInsertionPosition";
8744
+ "msg": "Insertion position accounts are not actually adjacent in leaderboard";
8745
+ },
8746
+ {
8747
+ "code": 6021;
8748
+ "name": "staleAccountReference";
8749
+ "msg": "Account reference is outdated due to concurrent update";
8750
+ },
8751
+ {
8752
+ "code": 6022;
8753
+ "name": "invalidStakeAmount";
8754
+ "msg": "Invalid stake amount - exceeds maximum allowed";
8755
+ },
8756
+ {
8757
+ "code": 6023;
8758
+ "name": "invalidTipDistributionAccount";
8759
+ "msg": "Invalid Tip Distribution Account provided";
8760
+ },
8761
+ {
8762
+ "code": 6024;
8763
+ "name": "invalidRankPosition";
8764
+ "msg": "Proposed rank position violates sorted ordering";
8765
+ },
8766
+ {
8767
+ "code": 6025;
8768
+ "name": "leaderboardFull";
8769
+ "msg": "Leaderboard is full - cannot add more validators";
8770
+ },
8771
+ {
8772
+ "code": 6026;
8773
+ "name": "validatorNotInRankings";
8774
+ "msg": "Validator not found in rankings";
8775
+ },
8776
+ {
8777
+ "code": 6027;
8778
+ "name": "arithmeticOverflow";
8779
+ "msg": "Arithmetic overflow";
8780
+ }
8781
+ ];
8782
+ "types": [
8783
+ {
8784
+ "name": "leaderboardState";
8785
+ "docs": [
8786
+ "Central leaderboard state using parallel arrays for efficient ranking and CPI access",
8787
+ "Stores VPP scores and sorted rankings for up to 1024 validators",
8788
+ "Uses zero-copy for efficient access from other programs via CPI"
8789
+ ];
8790
+ "serialization": "bytemuck";
8791
+ "repr": {
8792
+ "kind": "c";
8793
+ };
8794
+ "type": {
8795
+ "kind": "struct";
8796
+ "fields": [
8797
+ {
8798
+ "name": "scores";
8799
+ "docs": [
8800
+ "VPP scores indexed by registry_index (0-100 range)",
8801
+ "registry_index is assigned on first validator registration and never changes"
8802
+ ];
8803
+ "type": {
8804
+ "array": [
8805
+ "u8",
8806
+ 1024
8807
+ ];
8808
+ };
8809
+ },
8810
+ {
8811
+ "name": "sortedIndices";
8812
+ "docs": [
8813
+ "Validator indices sorted by VPP score descending",
8814
+ "sorted_indices[0] = registry_index of highest VPP validator",
8815
+ "sorted_indices[1] = registry_index of 2nd highest VPP validator, etc."
8816
+ ];
8817
+ "type": {
8818
+ "array": [
8819
+ "u16",
8820
+ 1024
8821
+ ];
8822
+ };
8823
+ },
8824
+ {
8825
+ "name": "voteAccounts";
8826
+ "docs": [
8827
+ "Vote account pubkeys indexed by registry_index",
8828
+ "Allows CPI callers to get vote accounts for top N validators"
8829
+ ];
8830
+ "type": {
8831
+ "array": [
8832
+ {
8833
+ "defined": {
8834
+ "name": "pubkeyBytes";
8835
+ };
8836
+ },
8837
+ 1024
8838
+ ];
8839
+ };
8840
+ },
8841
+ {
8842
+ "name": "numValidators";
8843
+ "docs": [
8844
+ "Number of active validators currently in the leaderboard"
8845
+ ];
8846
+ "type": "u16";
8847
+ },
8848
+ {
8849
+ "name": "bump";
8850
+ "docs": [
8851
+ "PDA bump seed"
8852
+ ];
8853
+ "type": "u8";
8854
+ },
8855
+ {
8856
+ "name": "padding";
8857
+ "docs": [
8858
+ "Reserved space for future upgrades"
8859
+ ];
8860
+ "type": {
8861
+ "array": [
8862
+ "u8",
8863
+ 5
8864
+ ];
8865
+ };
8866
+ }
8867
+ ];
8868
+ };
8869
+ },
8870
+ {
8871
+ "name": "pubkeyBytes";
8872
+ "docs": [
8873
+ "Fixed-size representation of a `Pubkey` that satisfies Anchor's zero-copy rules.",
8874
+ "Stores the raw 32-byte array and offers helpers to convert to/from `Pubkey`."
8875
+ ];
8876
+ "serialization": "bytemuck";
8877
+ "repr": {
8878
+ "kind": "transparent";
8879
+ };
8880
+ "type": {
8881
+ "kind": "struct";
8882
+ "fields": [
8883
+ {
8884
+ "name": "bytes";
8885
+ "type": {
8886
+ "array": [
8887
+ "u8",
8888
+ 32
8889
+ ];
8890
+ };
8891
+ }
8892
+ ];
8893
+ };
8894
+ },
8895
+ {
8896
+ "name": "validatorRecord";
8897
+ "docs": [
8898
+ "Per-validator record account storing commission data and metadata"
8899
+ ];
8900
+ "type": {
8901
+ "kind": "struct";
8902
+ "fields": [
8903
+ {
8904
+ "name": "voteAccount";
8905
+ "docs": [
8906
+ "The validator's vote account pubkey"
8907
+ ];
8908
+ "type": "pubkey";
8909
+ },
8910
+ {
8911
+ "name": "registryIndex";
8912
+ "docs": [
8913
+ "Immutable index into LeaderboardState arrays",
8914
+ "Assigned on first registration, never changes"
8915
+ ];
8916
+ "type": "u16";
8917
+ },
8918
+ {
8919
+ "name": "creditsObserved";
8920
+ "docs": [
8921
+ "Current cumulative credits from vote account"
8922
+ ];
8923
+ "type": "u64";
8924
+ },
8925
+ {
8926
+ "name": "commissionHistory";
8927
+ "docs": [
8928
+ "Circular buffer of past 10 commission values (0-100)",
8929
+ "Used to penalize validators who increase commission"
8930
+ ];
8931
+ "type": {
8932
+ "array": [
8933
+ "u8",
8934
+ 10
8935
+ ];
8936
+ };
8937
+ },
8938
+ {
8939
+ "name": "commissionIndex";
8940
+ "docs": [
8941
+ "Current index in commission_history circular buffer (0-9)"
8942
+ ];
8943
+ "type": "u8";
8944
+ },
8945
+ {
8946
+ "name": "lastCommissionUpdate";
8947
+ "docs": [
8948
+ "Last epoch when commission was updated"
8949
+ ];
8950
+ "type": "u64";
8951
+ },
8952
+ {
8953
+ "name": "epoch";
8954
+ "docs": [
8955
+ "Last epoch this validator was updated"
8956
+ ];
8957
+ "type": "u64";
8958
+ },
8959
+ {
8960
+ "name": "slot";
8961
+ "docs": [
8962
+ "Last slot this validator was updated"
8963
+ ];
8964
+ "type": "u64";
8965
+ },
8966
+ {
8967
+ "name": "wireOperator";
8968
+ "docs": [
8969
+ "Whether this validator is a Wire operator (5% bonus)"
8970
+ ];
8971
+ "type": "bool";
8972
+ },
8973
+ {
8974
+ "name": "mevCommission";
8975
+ "docs": [
8976
+ "Current MEV commission in basis points"
8977
+ ];
8978
+ "type": "u16";
8979
+ },
8980
+ {
8981
+ "name": "mevCommissionHistory";
8982
+ "docs": [
8983
+ "Circular buffer of past 10 MEV commission values"
8984
+ ];
8985
+ "type": {
8986
+ "array": [
8987
+ "u16",
8988
+ 10
8989
+ ];
8990
+ };
8991
+ },
8992
+ {
8993
+ "name": "mevCommissionIndex";
8994
+ "docs": [
8995
+ "Current index in mev_commission_history circular buffer (0-9)"
8996
+ ];
8997
+ "type": "u8";
8998
+ },
8999
+ {
9000
+ "name": "lastMevCommissionUpdate";
9001
+ "docs": [
9002
+ "Last epoch when MEV commission was updated"
9003
+ ];
9004
+ "type": "u64";
9005
+ },
9006
+ {
9007
+ "name": "bump";
9008
+ "docs": [
9009
+ "PDA bump seed"
9010
+ ];
9011
+ "type": "u8";
9012
+ }
9013
+ ];
9014
+ };
9015
+ }
9016
+ ];
9017
+ };
9018
+
9019
+ type Entry<IDL> = {
9020
+ idl: IDL & {
9021
+ address: string;
9022
+ };
9023
+ address: string;
9024
+ };
9025
+ declare const PROGRAMS: {
9026
+ readonly liqsolCore: Entry<LiqsolCore>;
9027
+ readonly liqsolToken: Entry<LiqsolToken>;
9028
+ readonly validatorLeaderboard: Entry<ValidatorLeaderboard>;
9029
+ };
9030
+ type SolanaProgramName = keyof typeof PROGRAMS;
9031
+ declare class SolanaProgramService {
9032
+ private provider;
9033
+ constructor(provider: AnchorProvider);
9034
+ getProgram<K extends SolanaProgramName>(name: K): Program<(typeof PROGRAMS)[K]['idl']>;
9035
+ listProgramNames(): SolanaProgramName[];
9036
+ }
9037
+
8102
9038
  declare const SCALE: any;
8103
9039
  /**
8104
9040
  * Solana implementation of IStakingClient.
@@ -8121,6 +9057,7 @@ declare class SolanaStakingClient implements IStakingClient {
8121
9057
  leaderboardClient: LeaderboardClient;
8122
9058
  outpostClient: OutpostClient;
8123
9059
  tokenClient: TokenClient;
9060
+ program: SolanaProgramService;
8124
9061
  get solPubKey(): PublicKey$1;
8125
9062
  get network(): ExternalNetwork;
8126
9063
  constructor(config: StakerConfig);
@@ -8170,7 +9107,28 @@ declare class SolanaStakingClient implements IStakingClient {
8170
9107
  * Used by balance-correction flows and debugging.
8171
9108
  */
8172
9109
  getUserRecord(): Promise<DistributionUserRecord | null>;
9110
+ /**
9111
+ * Returns the system APY (percent) for Solana,
9112
+ * using compound interest per epoch and a
9113
+ * cluster-derived epochs-per-year.
9114
+ */
8173
9115
  getSystemAPY(): Promise<number>;
9116
+ /**
9117
+ * Reads the liqsol_core stakeMetrics account and returns the
9118
+ * Solana per-epoch system rate as a **decimal** (not BPS),
9119
+ * de-scaled using PAY_RATE_SCALE_FACTOR (1e12).
9120
+ */
9121
+ private getEpochRateDecimalFromProgram;
9122
+ private epochsPerYearCache?;
9123
+ private static readonly EPOCHS_PER_YEAR_TTL_MS;
9124
+ /**
9125
+ * Derive "epochs per year" from the live Solana cluster.
9126
+ *
9127
+ * Uses:
9128
+ * - getRecentPerformanceSamples() to estimate slots/second
9129
+ * - getEpochInfo() to read slotsInEpoch
9130
+ */
9131
+ private getEpochsPerYearFromCluster;
8174
9132
  /**
8175
9133
  * Estimate the protocol deposit fee in lamports for a given SOL amount,
8176
9134
  * based on recent pay rates and globalConfig.depositFeeMultiplier.