@wireio/stake 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/lib/stake.browser.js +12682 -6721
  2. package/lib/stake.browser.js.map +1 -1
  3. package/lib/stake.d.ts +158 -13
  4. package/lib/stake.js +12356 -6388
  5. package/lib/stake.js.map +1 -1
  6. package/lib/stake.m.js +12682 -6721
  7. package/lib/stake.m.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/assets/ethereum/ABI/common/Base58.sol/Base58.dbg.json +4 -0
  10. package/src/assets/ethereum/ABI/common/Base58.sol/Base58.json +164 -0
  11. package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
  12. package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
  13. package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
  14. package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
  15. package/src/assets/ethereum/ABI/common/iodata.sol/iodata.dbg.json +4 -0
  16. package/src/assets/ethereum/ABI/common/iodata.sol/iodata.json +618 -0
  17. package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.dbg.json +4 -0
  18. package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.json +40 -0
  19. package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.dbg.json +4 -0
  20. package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.json +10 -0
  21. package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
  22. package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.json +10 -0
  23. package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
  24. package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.json +233 -0
  25. package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.dbg.json +4 -0
  26. package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.json +49 -0
  27. package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
  28. package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
  29. package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.dbg.json +4 -0
  30. package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.json +1458 -0
  31. package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
  32. package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.json +1532 -0
  33. package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
  34. package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.json +1525 -0
  35. package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.dbg.json +4 -0
  36. package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.json +1076 -0
  37. package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +1 -1
  38. package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +1 -1
  39. package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +28 -2
  40. package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +1 -1
  41. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +1 -1
  42. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +1 -1
  43. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +1 -1
  44. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +1 -1
  45. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +1 -1
  46. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +1 -1
  47. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +1 -1
  48. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +1 -1
  49. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +1 -1
  50. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +1 -1
  51. package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +1 -1
  52. package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +1 -1
  53. package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +1 -1
  54. package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +1 -1
  55. package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +2 -2
  56. package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +1 -1
  57. package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +2 -15
  58. package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +1 -1
  59. package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +1 -1
  60. package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +6 -25
  61. package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +1 -1
  62. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +1 -1
  63. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +2 -2
  64. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +1 -1
  65. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +6 -25
  66. package/src/assets/ethereum/ABI/outpost/BAR.sol/BAR.dbg.json +1 -1
  67. package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +1 -1
  68. package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +26 -26
  69. package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +1 -1
  70. package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +1 -1
  71. package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +1 -1
  72. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPP.dbg.json +1 -1
  73. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +1 -1
  74. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPInbound.dbg.json +1 -1
  75. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +1 -1
  76. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPSender.dbg.json +1 -1
  77. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/OPPCommon.dbg.json +1 -1
  78. package/src/assets/ethereum/ABI/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +1 -1
  79. package/src/assets/ethereum/ABI/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +1 -1
  80. package/src/assets/ethereum/ABI/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +1 -1
  81. package/src/assets/ethereum/ABI/outpost/OPPErrors.sol/OPPErrors.dbg.json +1 -1
  82. package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +1 -1
  83. package/src/assets/ethereum/ABI/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +1 -1
  84. package/src/assets/ethereum/ABI/outpost/OPPSender.sol/OPPSender.dbg.json +1 -1
  85. package/src/assets/ethereum/ABI/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +1 -1
  86. package/src/assets/ethereum/ABI/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +1 -1
  87. package/src/assets/ethereum/ABI/outpost/OutpostManager.sol/OutpostManager.dbg.json +1 -1
  88. package/src/assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +1 -1
  89. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +1 -1
  90. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +1 -1
  91. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +1 -1
  92. package/src/assets/ethereum/ABI/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +1 -1
  93. package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.dbg.json +1 -1
  94. package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.json +2 -2
  95. package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +1 -1
  96. package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.json +9 -9
  97. package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +1 -1
  98. package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +1 -1
  99. package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +1 -1
  100. package/src/assets/ethereum/ABI/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +1 -1
  101. package/src/assets/ethereum/ABI/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +1 -1
  102. package/src/networks/ethereum/clients/convert.client.ts +2 -2
  103. package/src/networks/ethereum/clients/pretoken.client.ts +6 -4
  104. package/src/networks/ethereum/clients/stake.client.ts +2 -2
  105. package/src/networks/ethereum/contract.ts +102 -49
  106. package/src/networks/ethereum/ethereum.ts +64 -52
  107. package/src/networks/ethereum/types.ts +26 -17
  108. package/src/networks/ethereum/utils.ts +8 -8
  109. package/src/networks/solana/clients/distribution.client.ts +36 -1
  110. package/src/networks/solana/solana.ts +131 -7
  111. package/src/networks/solana/types.ts +129 -0
  112. package/src/types.ts +6 -2
  113. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +0 -4
  114. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +0 -10
  115. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +0 -4
  116. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +0 -10
  117. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.dbg.json +0 -4
  118. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.json +0 -10
  119. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.dbg.json +0 -4
  120. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.json +0 -10
  121. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +0 -4
  122. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +0 -291
  123. package/src/assets/ethereum/ABI/outpost/Aggregator.sol/Aggregator.json +0 -82
package/lib/stake.d.ts CHANGED
@@ -25,6 +25,11 @@ interface IStakingClient {
25
25
  /** Fetch the complete user portfolio */
26
26
  getPortfolio(): Promise<Portfolio>;
27
27
  getSystemAPY(): Promise<number>;
28
+ /**
29
+ * Protocol fee charged for deposit from Native to LIQ
30
+ * in Solana: amount in lamports
31
+ * in Ethereum: amount in wei
32
+ */
28
33
  getDepositFee(amount: bigint): Promise<bigint>;
29
34
  /**
30
35
  * Program-level prelaunch WIRE/tranche snapshot for this chain.
@@ -181,7 +186,7 @@ interface TrancheSnapshot {
181
186
  currentPriceUsd: bigint;
182
187
  /** Tranche curve config (per-chain) */
183
188
  supplyGrowthBps: number;
184
- priceGrowthBps: number;
189
+ priceIncrementUsd: number;
185
190
  totalPretokensSold: bigint;
186
191
  /** Current tranche supply state (1e8 scale) */
187
192
  currentTrancheSupply: bigint;
@@ -248,7 +253,7 @@ declare class Staker {
248
253
  setChain(chainID: ChainID): boolean;
249
254
  }
250
255
 
251
- declare const CONTRACT_NAMES: readonly ["Accounting", "DepositManager", "LiqEth", "StakingModule", "WithdrawalQueue", "WithdrawalVault", "Depositor", "ReceiptNFT", "OutpostManager", "BAR", "OPP", "OPPCommon", "OPPInbound", "Pretoken", "Aggregator", "EthUsdPriceConsumer", "Pool"];
256
+ declare const CONTRACT_NAMES: readonly ["LiqEthAuthority", "BeaconState", "WithdrawalQueue", "LiqEthToken", "Accounting", "DepositManager", "WithdrawalVault", "StakingModule", "YieldOracle", "OutpostManagerAuthority", "iodata", "Base58", "sysio_merkle", "ReceiptNFT", "MockAggregator", "Pool", "OutpostManager", "sysio_write", "EthUsdPriceConsumer", "BAR", "OPPCommon", "OPP", "Pretoken", "OPPInbound", "Depositor"];
252
257
  type ContractName = typeof CONTRACT_NAMES[number];
253
258
  type AddressBook = Record<ContractName, string>;
254
259
  interface Result {
@@ -344,23 +349,31 @@ declare class EthereumStakingClient implements IStakingClient {
344
349
  private oppClient;
345
350
  private receiptClient;
346
351
  get contract(): {
352
+ LiqEthAuthority: ethers.Contract;
353
+ BeaconState: ethers.Contract;
354
+ WithdrawalQueue: ethers.Contract;
355
+ LiqEthToken: ethers.Contract;
347
356
  Accounting: ethers.Contract;
348
357
  DepositManager: ethers.Contract;
349
- LiqEth: ethers.Contract;
350
- StakingModule: ethers.Contract;
351
- WithdrawalQueue: ethers.Contract;
352
358
  WithdrawalVault: ethers.Contract;
353
- Depositor: ethers.Contract;
359
+ StakingModule: ethers.Contract;
360
+ YieldOracle: ethers.Contract;
361
+ OutpostManagerAuthority: ethers.Contract;
362
+ iodata: ethers.Contract;
363
+ Base58: ethers.Contract;
364
+ sysio_merkle: ethers.Contract;
354
365
  ReceiptNFT: ethers.Contract;
366
+ MockAggregator: ethers.Contract;
367
+ Pool: ethers.Contract;
355
368
  OutpostManager: ethers.Contract;
369
+ sysio_write: ethers.Contract;
370
+ EthUsdPriceConsumer: ethers.Contract;
356
371
  BAR: ethers.Contract;
357
- OPP: ethers.Contract;
358
372
  OPPCommon: ethers.Contract;
359
- OPPInbound: ethers.Contract;
373
+ OPP: ethers.Contract;
360
374
  Pretoken: ethers.Contract;
361
- Aggregator: ethers.Contract;
362
- EthUsdPriceConsumer: ethers.Contract;
363
- Pool: ethers.Contract;
375
+ OPPInbound: ethers.Contract;
376
+ Depositor: ethers.Contract;
364
377
  };
365
378
  get network(): _wireio_core.ExternalNetwork;
366
379
  constructor(config: StakerConfig);
@@ -425,6 +438,12 @@ declare class EthereumStakingClient implements IStakingClient {
425
438
  private updateMockAggregatorPrice;
426
439
  }
427
440
 
441
+ /**
442
+ * @module EthereumContractService
443
+ *
444
+ * Provides a unified service for interacting with Ethereum smart contracts using ethers.js.
445
+ */
446
+
428
447
  declare const ERC20Abi: ({
429
448
  inputs: {
430
449
  internalType: string;
@@ -825,6 +844,108 @@ type GlobalState = {
825
844
  /** PDA bump */
826
845
  bump: number;
827
846
  };
847
+ /**
848
+ * IDL: `globalConfig`
849
+ *
850
+ * Zero-copy global config PDA.
851
+ * Authority is taken from StakeControllerState, not stored here.
852
+ */
853
+ type GlobalConfig = {
854
+ /** PDA bump */
855
+ bump: number;
856
+ /** 7-byte padding (unused) */
857
+ padding: number[];
858
+ /** Minimum SOL amount a user can deposit (lamports, u64) */
859
+ minUserDeposit: BN;
860
+ /** Minimum SOL amount for an unstake/withdrawal request (lamports, u64) */
861
+ minUnstakeRequest: BN;
862
+ /** Minimum stake delta to trigger a stake rebalance order (lamports, u64) */
863
+ minRebalanceStakeDelta: BN;
864
+ /** Minimum unstake delta to trigger an unstake rebalance order (lamports, u64) */
865
+ minRebalanceUnstakeDelta: BN;
866
+ /** Minimum transient stake to include in effective stake calculations (lamports, u64) */
867
+ transientThreshold: BN;
868
+ /**
869
+ * Minimum slots that must have elapsed in the epoch before late epoch operations can execute (u64)
870
+ */
871
+ minLateEpochSlotGate: BN;
872
+ /** Reserved u64[2] */
873
+ reservedU64: BN[];
874
+ /**
875
+ * Epochs a validator must wait in the graveyard before it is booted.
876
+ * This begins after the last recorded state change (u16)
877
+ */
878
+ cooldownEpochs: number;
879
+ /**
880
+ * Multiplier for deposit fee calculation (u16).
881
+ * Typically: avg_pay_rate * expected_warmup_epochs
882
+ */
883
+ depositFeeMultiplier: number;
884
+ /**
885
+ * Minimum VPP score required to enter the active validator set,
886
+ * fallback when the validator set is very small (u16)
887
+ */
888
+ minVppEntry: number;
889
+ /**
890
+ * VPP score threshold below which a validator is removed from active set,
891
+ * fallback threshold (u16)
892
+ */
893
+ minVppExit: number;
894
+ /**
895
+ * Max validators for "tiny" network band (uses fixed VPP thresholds) (u16)
896
+ */
897
+ tinyNetworkThreshold: number;
898
+ /**
899
+ * Max validators for "small" network band (uses percentile-based selection) (u16)
900
+ */
901
+ smallNetworkThreshold: number;
902
+ /**
903
+ * Max validators for "medium" network band (uses percentile-based selection) (u16)
904
+ */
905
+ mediumNetworkThreshold: number;
906
+ /**
907
+ * Fixed rank threshold to enter active set in large networks (0-indexed, u16)
908
+ */
909
+ largeNetworkEntryRank: number;
910
+ /**
911
+ * Fixed rank threshold to exit active set in large networks (0-indexed, u16)
912
+ */
913
+ largeNetworkExitRank: number;
914
+ /** Reserved u16[3] */
915
+ reservedU16: number[];
916
+ /**
917
+ * Percentile rank required to enter active set in small networks (u8)
918
+ */
919
+ smallNetworkEntryPercent: number;
920
+ /**
921
+ * Percentile rank below which validators exit in small networks (u8)
922
+ */
923
+ smallNetworkExitPercent: number;
924
+ /**
925
+ * Percentile rank required to enter active set in medium networks (u8)
926
+ */
927
+ mediumNetworkEntryPercent: number;
928
+ /**
929
+ * Percentile rank below which validators exit in medium networks (u8)
930
+ */
931
+ mediumNetworkExitPercent: number;
932
+ /** Reserved u8[2] */
933
+ reservedU8: number[];
934
+ /**
935
+ * Feature flags (u16 bitfield):
936
+ * Bit 0: DepositsEnabled
937
+ * Bit 1: WithdrawalsEnabled
938
+ * Bit 2: ClaimWithdrawalsEnabled
939
+ * Bit 3: ProcessStakeOrdersEnabled
940
+ * Bit 4: ProcessUnstakeOrdersEnabled
941
+ * Bit 5: ProcessPayCycleEnabled
942
+ * Bit 6: RebalancingEnabled
943
+ * Bits 7–15: Reserved
944
+ */
945
+ featureFlags: number;
946
+ /** Reserved flags (u16[1]) */
947
+ reservedFlags: number[];
948
+ };
828
949
  /**
829
950
  * ============================================================
830
951
  * Outpost / Pretoken Accounts
@@ -1099,6 +1220,7 @@ type ValidatorRecord = {
1099
1220
  type types_DistributionState = DistributionState;
1100
1221
  type types_DistributionUserRecord = DistributionUserRecord;
1101
1222
  type types_Global = Global;
1223
+ type types_GlobalConfig = GlobalConfig;
1102
1224
  type types_GlobalState = GlobalState;
1103
1225
  type types_LeaderboardState = LeaderboardState;
1104
1226
  type types_OutpostAccount = OutpostAccount;
@@ -1119,7 +1241,7 @@ type types_WalletLike = WalletLike;
1119
1241
  type types_WireReceipt = WireReceipt;
1120
1242
  type types_WireState = WireState;
1121
1243
  declare namespace types {
1122
- export type { types_DistributionState as DistributionState, types_DistributionUserRecord as DistributionUserRecord, types_Global as Global, types_GlobalState as GlobalState, types_LeaderboardState as LeaderboardState, types_OutpostAccount as OutpostAccount, types_OutpostWireStateSnapshot as OutpostWireStateSnapshot, types_ParsedAccountInfo as ParsedAccountInfo, types_PayRateEntry as PayRateEntry, types_PayRateHistory as PayRateHistory, types_PriceHistory as PriceHistory, types_Role as Role, types_SharesPreview as SharesPreview, types_SolanaTransaction as SolanaTransaction, types_TrancheState as TrancheState, types_UserPretokenRecord as UserPretokenRecord, types_ValidatorRecord as ValidatorRecord, types_ValidatorReputation as ValidatorReputation, types_ValidatorState as ValidatorState, types_WalletLike as WalletLike, types_WireReceipt as WireReceipt, types_WireState as WireState };
1244
+ export type { types_DistributionState as DistributionState, types_DistributionUserRecord as DistributionUserRecord, types_Global as Global, types_GlobalConfig as GlobalConfig, types_GlobalState as GlobalState, types_LeaderboardState as LeaderboardState, types_OutpostAccount as OutpostAccount, types_OutpostWireStateSnapshot as OutpostWireStateSnapshot, types_ParsedAccountInfo as ParsedAccountInfo, types_PayRateEntry as PayRateEntry, types_PayRateHistory as PayRateHistory, types_PriceHistory as PriceHistory, types_Role as Role, types_SharesPreview as SharesPreview, types_SolanaTransaction as SolanaTransaction, types_TrancheState as TrancheState, types_UserPretokenRecord as UserPretokenRecord, types_ValidatorRecord as ValidatorRecord, types_ValidatorReputation as ValidatorReputation, types_ValidatorState as ValidatorState, types_WalletLike as WalletLike, types_WireReceipt as WireReceipt, types_WireState as WireState };
1123
1245
  }
1124
1246
 
1125
1247
  declare class DepositClient {
@@ -1173,6 +1295,18 @@ declare class DistributionClient {
1173
1295
  * IDL account name: "distributionState"
1174
1296
  */
1175
1297
  getDistributionState(): Promise<DistributionState | null>;
1298
+ /**
1299
+ * Fetch the global payRateHistory account (circular buffer of scaled pay rates).
1300
+ *
1301
+ * IDL account name: "payRateHistory"
1302
+ */
1303
+ getPayRateHistory(): Promise<PayRateHistory | null>;
1304
+ /**
1305
+ * Fetch the globalConfig account (contains depositFeeMultiplier, etc).
1306
+ *
1307
+ * IDL account name: "globalConfig"
1308
+ */
1309
+ getGlobalConfig(): Promise<GlobalConfig | null>;
1176
1310
  /**
1177
1311
  * Fetch a user's distribution userRecord (or null if missing).
1178
1312
  *
@@ -8057,7 +8191,17 @@ declare class SolanaStakingClient implements IStakingClient {
8057
8191
  */
8058
8192
  getUserRecord(): Promise<DistributionUserRecord | null>;
8059
8193
  getSystemAPY(): Promise<number>;
8060
- getDepositFee(amount: bigint): Promise<bigint>;
8194
+ /**
8195
+ * Estimate the protocol deposit fee in lamports for a given SOL amount,
8196
+ * based on recent pay rates and globalConfig.depositFeeMultiplier.
8197
+ *
8198
+ * - amountLamports: deposit notional in lamports
8199
+ * - windowSize: how many recent payRate entries to average (default 5)
8200
+ *
8201
+ * Returns 0n if payRateHistory or globalConfig is missing, or if
8202
+ * there are no valid pay-rate entries yet.
8203
+ */
8204
+ getDepositFee(amountLamports: bigint, windowSize?: number): Promise<bigint>;
8061
8205
  /**
8062
8206
  * Unified, chain-agnostic tranche snapshot for Solana.
8063
8207
  *
@@ -8101,6 +8245,7 @@ declare class SolanaStakingClient implements IStakingClient {
8101
8245
  * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
8102
8246
  */
8103
8247
  ensureUser(): void;
8248
+ private ceilDiv;
8104
8249
  }
8105
8250
 
8106
8251
  /**