@wireio/stake 1.0.0 → 1.0.69

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 (585) hide show
  1. package/README.md +195 -243
  2. package/lib/stake.browser.js +48207 -10172
  3. package/lib/stake.browser.js.map +1 -1
  4. package/lib/stake.d.ts +11368 -978
  5. package/lib/stake.js +46986 -8778
  6. package/lib/stake.js.map +1 -1
  7. package/lib/stake.m.js +48207 -10172
  8. package/lib/stake.m.js.map +1 -1
  9. package/package.json +4 -3
  10. package/src/assets/ethereum/hoodi/WNS/BucketWNS.sol/BucketWNS.dbg.json +4 -0
  11. package/src/assets/ethereum/hoodi/WNS/BucketWNS.sol/BucketWNS.json +699 -0
  12. package/src/assets/ethereum/hoodi/WNS/Challenge.sol/Challenge.dbg.json +4 -0
  13. package/src/assets/ethereum/hoodi/WNS/Challenge.sol/Challenge.json +3139 -0
  14. package/src/assets/ethereum/hoodi/WNS/ChallengeLib.sol/ChallengeLib.dbg.json +4 -0
  15. package/src/assets/ethereum/hoodi/WNS/ChallengeLib.sol/ChallengeLib.json +106 -0
  16. package/src/assets/ethereum/hoodi/WNS/Errors.sol/WNSErrs.dbg.json +4 -0
  17. package/src/assets/ethereum/hoodi/WNS/Errors.sol/WNSErrs.json +180 -0
  18. package/src/assets/ethereum/hoodi/WNS/LiqWNS.sol/LiqWNS.dbg.json +4 -0
  19. package/src/assets/ethereum/hoodi/WNS/LiqWNS.sol/LiqWNS.json +470 -0
  20. package/src/assets/ethereum/hoodi/WNS/SChain.sol/SChain.dbg.json +4 -0
  21. package/src/assets/ethereum/hoodi/WNS/SChain.sol/SChain.json +1983 -0
  22. package/src/assets/ethereum/hoodi/WNS/UTXO.sol/UTXO.dbg.json +4 -0
  23. package/src/assets/ethereum/hoodi/WNS/UTXO.sol/UTXO.json +1231 -0
  24. package/src/assets/ethereum/hoodi/WNS/UTXOio.sol/UTXOio.dbg.json +4 -0
  25. package/src/assets/ethereum/hoodi/WNS/UTXOio.sol/UTXOio.json +1524 -0
  26. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IBucketWNS.dbg.json +4 -0
  27. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IBucketWNS.json +119 -0
  28. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IChallenge.dbg.json +4 -0
  29. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IChallenge.json +374 -0
  30. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/ISChain.dbg.json +4 -0
  31. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/ISChain.json +865 -0
  32. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IUTXO.dbg.json +4 -0
  33. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IUTXO.json +524 -0
  34. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/WNSCommon.dbg.json +4 -0
  35. package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/WNSCommon.json +10 -0
  36. package/src/assets/ethereum/hoodi/WNS/WithdrawBatch.sol/WithdrawBatch.dbg.json +4 -0
  37. package/src/assets/ethereum/hoodi/WNS/WithdrawBatch.sol/WithdrawBatch.json +1232 -0
  38. package/src/assets/ethereum/hoodi/common/Base58.sol/Base58.dbg.json +4 -0
  39. package/src/assets/ethereum/hoodi/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
  40. package/src/assets/ethereum/hoodi/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
  41. package/src/assets/ethereum/hoodi/common/iodata.sol/iodata.dbg.json +4 -0
  42. package/src/assets/ethereum/hoodi/common/iodata_util.sol/iodata_util.dbg.json +4 -0
  43. package/src/assets/ethereum/hoodi/common/sysio_data.sol/sysio_data.dbg.json +4 -0
  44. package/src/assets/ethereum/hoodi/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
  45. package/src/assets/ethereum/hoodi/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
  46. package/src/assets/ethereum/hoodi/common/sysio_name.sol/sysio_name.dbg.json +4 -0
  47. package/src/assets/ethereum/hoodi/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
  48. package/src/assets/ethereum/hoodi/common/sysio_read.sol/sysio_read.dbg.json +4 -0
  49. package/src/assets/ethereum/hoodi/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
  50. package/src/assets/ethereum/hoodi/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
  51. package/src/assets/ethereum/hoodi/common/sysio_write.sol/sysio_write.dbg.json +4 -0
  52. package/src/assets/ethereum/hoodi/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
  53. package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.dbg.json +4 -0
  54. package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.json +985 -0
  55. package/src/assets/ethereum/hoodi/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
  56. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
  57. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IAccounting.json +182 -0
  58. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
  59. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
  60. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
  61. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
  62. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20.json +319 -0
  63. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
  64. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +333 -0
  65. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
  66. package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IStakingModule.json +1 -1
  67. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
  68. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
  69. package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
  70. package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/LiqEthCommon.json +2 -2
  71. package/src/assets/ethereum/hoodi/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.dbg.json +4 -0
  72. package/src/assets/ethereum/hoodi/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.json +236 -0
  73. package/src/assets/ethereum/hoodi/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +4 -0
  74. package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthManaged.sol/LiqEthManaged.json +2 -2
  75. package/src/assets/ethereum/hoodi/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.dbg.json +4 -0
  76. package/src/assets/ethereum/hoodi/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.json +957 -0
  77. package/src/assets/ethereum/hoodi/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.dbg.json +4 -0
  78. package/src/assets/ethereum/hoodi/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.json +1020 -0
  79. package/src/assets/ethereum/hoodi/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
  80. package/src/assets/ethereum/{ABI → hoodi}/liqEth/Yield.sol/YieldOracle.json +2 -2
  81. package/src/assets/ethereum/hoodi/liqEth/accounting.sol/AccountingV2.dbg.json +4 -0
  82. package/src/assets/ethereum/hoodi/liqEth/accounting.sol/AccountingV2.json +629 -0
  83. package/src/assets/ethereum/hoodi/liqEth/liqEth.sol/LiqEthTokenV2.dbg.json +4 -0
  84. package/src/assets/ethereum/hoodi/liqEth/liqEth.sol/LiqEthTokenV2.json +1323 -0
  85. package/src/assets/ethereum/hoodi/liqEth/stakingModule.sol/StakingModuleV2.dbg.json +4 -0
  86. package/src/assets/ethereum/hoodi/liqEth/stakingModule.sol/StakingModuleV2.json +1779 -0
  87. package/src/assets/ethereum/hoodi/liqEth/v1/DepositManager.sol/DepositManager.dbg.json +4 -0
  88. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/DepositManager.sol/DepositManager.json +3 -3
  89. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
  90. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IAccounting.json +1 -1
  91. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
  92. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositContract.json +39 -0
  93. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
  94. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositManager.json +64 -0
  95. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
  96. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
  97. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
  98. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IRewardsERC20.json +1 -1
  99. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
  100. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IRewardsERC20Pausable.json +1 -1
  101. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
  102. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IStakingModule.json +344 -0
  103. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
  104. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
  105. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
  106. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
  107. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
  108. package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.json +10 -0
  109. package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +4 -0
  110. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/RewardsERC20.sol/RewardsERC20Upgradeable.json +1 -1
  111. package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
  112. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +1 -1
  113. package/src/assets/ethereum/hoodi/liqEth/v1/accounting.sol/Accounting.dbg.json +4 -0
  114. package/src/assets/ethereum/hoodi/liqEth/v1/accounting.sol/Accounting.json +548 -0
  115. package/src/assets/ethereum/hoodi/liqEth/v1/liqEth.sol/LiqEthToken.dbg.json +4 -0
  116. package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/liqEth.sol/LiqEthToken.json +3 -3
  117. package/src/assets/ethereum/hoodi/liqEth/v1/stakingModule.sol/StakingModule.dbg.json +4 -0
  118. package/src/assets/ethereum/hoodi/liqEth/v1/stakingModule.sol/StakingModule.json +1772 -0
  119. package/src/assets/ethereum/hoodi/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
  120. package/src/assets/ethereum/{ABI → hoodi}/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +2 -2
  121. package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
  122. package/src/assets/ethereum/{ABI → hoodi}/liqEth/withdrawalVault.sol/Uint64BE.json +2 -2
  123. package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
  124. package/src/assets/ethereum/{ABI → hoodi}/liqEth/withdrawalVault.sol/WithdrawalVault.json +2 -2
  125. package/src/assets/ethereum/hoodi/outpost/BAR.sol/BAR.dbg.json +4 -0
  126. package/src/assets/ethereum/hoodi/outpost/BAR.sol/BAR.json +1111 -0
  127. package/src/assets/ethereum/hoodi/outpost/Depositor.sol/Depositor.dbg.json +4 -0
  128. package/src/assets/ethereum/hoodi/outpost/Depositor.sol/Depositor.json +1590 -0
  129. package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +4 -0
  130. package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +4 -0
  131. package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +274 -0
  132. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeDepositCodec.dbg.json +4 -0
  133. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeDepositCodec.json +10 -0
  134. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawCodec.dbg.json +4 -0
  135. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawCodec.json +10 -0
  136. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawConfirmCodec.dbg.json +4 -0
  137. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawConfirmCodec.json +10 -0
  138. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawFailedCodec.dbg.json +4 -0
  139. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawFailedCodec.json +10 -0
  140. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/InstaswapBridgeAttestationTypeLib.dbg.json +4 -0
  141. package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/InstaswapBridgeAttestationTypeLib.json +10 -0
  142. package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/IDepositorBridgeHooks.dbg.json +4 -0
  143. package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/IDepositorBridgeHooks.json +29 -0
  144. package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/LiqEthBridge.dbg.json +4 -0
  145. package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/LiqEthBridge.json +1033 -0
  146. package/src/assets/ethereum/hoodi/outpost/MockAggregator.sol/MockAggregator.json +97 -0
  147. package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.dbg.json +4 -0
  148. package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.json +1055 -0
  149. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
  150. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.json +81 -0
  151. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +4 -0
  152. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.dbg.json +4 -0
  153. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.json +330 -0
  154. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +4 -0
  155. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPReceiver.json +29 -0
  156. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPSender.dbg.json +4 -0
  157. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPSender.json +41 -0
  158. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
  159. package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.json +287 -0
  160. package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
  161. package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.json +294 -0
  162. package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
  163. package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +415 -0
  164. package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
  165. package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +399 -0
  166. package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
  167. package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.json +245 -0
  168. package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
  169. package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.json +1204 -0
  170. package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
  171. package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.json +312 -0
  172. package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
  173. package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.json +324 -0
  174. package/src/assets/ethereum/hoodi/outpost/OperatorRegistry.sol/OperatorRegistry.dbg.json +4 -0
  175. package/src/assets/ethereum/hoodi/outpost/OperatorRegistry.sol/OperatorRegistry.json +1068 -0
  176. package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
  177. package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.json +211 -0
  178. package/src/assets/ethereum/hoodi/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +4 -0
  179. package/src/assets/ethereum/hoodi/outpost/OutpostManaged.sol/OutpostManaged.json +229 -0
  180. package/src/assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManager.dbg.json +4 -0
  181. package/src/assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManager.json +751 -0
  182. package/src/assets/ethereum/hoodi/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +4 -0
  183. package/src/assets/ethereum/hoodi/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +1432 -0
  184. package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +4 -0
  185. package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostManager.json +130 -0
  186. package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +4 -0
  187. package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +4 -0
  188. package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.json +141 -0
  189. package/src/assets/ethereum/hoodi/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +4 -0
  190. package/src/assets/ethereum/hoodi/outpost/OutpostOwnable.sol/OutpostOwnable.json +213 -0
  191. package/src/assets/ethereum/hoodi/outpost/OutpostReserve.sol/OutpostReserve.dbg.json +4 -0
  192. package/src/assets/ethereum/hoodi/outpost/OutpostReserve.sol/OutpostReserve.json +888 -0
  193. package/src/assets/ethereum/hoodi/outpost/Pool.sol/Pool.dbg.json +4 -0
  194. package/src/assets/ethereum/hoodi/outpost/Pool.sol/Pool.json +659 -0
  195. package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/Pretoken.dbg.json +4 -0
  196. package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/Pretoken.json +1393 -0
  197. package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +4 -0
  198. package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.json +1738 -0
  199. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapConfirmCodec.dbg.json +4 -0
  200. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapConfirmCodec.json +10 -0
  201. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapFailedCodec.dbg.json +4 -0
  202. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapFailedCodec.json +10 -0
  203. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapRequestCodec.dbg.json +4 -0
  204. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapRequestCodec.json +10 -0
  205. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapSettlementCodec.dbg.json +4 -0
  206. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapSettlementCodec.json +10 -0
  207. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitConfirmCodec.dbg.json +4 -0
  208. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitConfirmCodec.json +10 -0
  209. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitFailedCodec.dbg.json +4 -0
  210. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitFailedCodec.json +10 -0
  211. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitRequestCodec.dbg.json +4 -0
  212. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitRequestCodec.json +10 -0
  213. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalStakeDeltaCodec.dbg.json +4 -0
  214. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalStakeDeltaCodec.json +10 -0
  215. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAssetCodec.dbg.json +4 -0
  216. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAssetCodec.json +10 -0
  217. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestationTypeLib.dbg.json +4 -0
  218. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestationTypeLib.json +10 -0
  219. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestations.dbg.json +4 -0
  220. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestations.json +1437 -0
  221. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/YieldDepositCodec.dbg.json +4 -0
  222. package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/YieldDepositCodec.json +10 -0
  223. package/src/assets/ethereum/hoodi/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
  224. package/src/assets/ethereum/hoodi/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +4 -0
  225. package/src/assets/ethereum/hoodi/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +4 -0
  226. package/src/assets/ethereum/hoodi/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +4 -0
  227. package/src/assets/ethereum/hoodi/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
  228. package/src/assets/ethereum/hoodi/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
  229. package/src/assets/ethereum/hoodi/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
  230. package/src/assets/ethereum/hoodi/token/Eman1155.sol/Eman1155.dbg.json +4 -0
  231. package/src/assets/ethereum/hoodi/token/Eman1155.sol/Eman1155.json +560 -0
  232. package/src/assets/ethereum/hoodi/token/Eman20.sol/Eman20.dbg.json +4 -0
  233. package/src/assets/ethereum/hoodi/token/Eman20.sol/Eman20.json +460 -0
  234. package/src/assets/ethereum/hoodi/token/Eman721.sol/Eman721.dbg.json +4 -0
  235. package/src/assets/ethereum/hoodi/token/Eman721.sol/Eman721.json +624 -0
  236. package/src/assets/ethereum/mainnet/common/Base58.sol/Base58.dbg.json +4 -0
  237. package/src/assets/ethereum/mainnet/common/Base58.sol/Base58.json +164 -0
  238. package/src/assets/ethereum/mainnet/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
  239. package/src/assets/ethereum/mainnet/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
  240. package/src/assets/ethereum/mainnet/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
  241. package/src/assets/ethereum/mainnet/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
  242. package/src/assets/ethereum/mainnet/common/iodata.sol/iodata.dbg.json +4 -0
  243. package/src/assets/ethereum/mainnet/common/iodata.sol/iodata.json +618 -0
  244. package/src/assets/ethereum/mainnet/common/iodata_util.sol/iodata_util.dbg.json +4 -0
  245. package/src/assets/ethereum/mainnet/common/iodata_util.sol/iodata_util.json +40 -0
  246. package/src/assets/ethereum/mainnet/common/sysio_data.sol/sysio_data.dbg.json +4 -0
  247. package/src/assets/ethereum/mainnet/common/sysio_data.sol/sysio_data.json +10 -0
  248. package/src/assets/ethereum/mainnet/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
  249. package/src/assets/ethereum/mainnet/common/sysio_errors.sol/sysio_errors.json +10 -0
  250. package/src/assets/ethereum/mainnet/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
  251. package/src/assets/ethereum/mainnet/common/sysio_merkle.sol/sysio_merkle.json +233 -0
  252. package/src/assets/ethereum/mainnet/common/sysio_name.sol/sysio_name.dbg.json +4 -0
  253. package/src/assets/ethereum/mainnet/common/sysio_name.sol/sysio_name.json +49 -0
  254. package/src/assets/ethereum/mainnet/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
  255. package/src/assets/ethereum/mainnet/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
  256. package/src/assets/ethereum/mainnet/common/sysio_read.sol/sysio_read.dbg.json +4 -0
  257. package/src/assets/ethereum/mainnet/common/sysio_read.sol/sysio_read.json +1458 -0
  258. package/src/assets/ethereum/mainnet/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
  259. package/src/assets/ethereum/mainnet/common/sysio_tester.sol/SysioTester.json +1532 -0
  260. package/src/assets/ethereum/mainnet/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
  261. package/src/assets/ethereum/mainnet/common/sysio_verify.sol/sysio_verify.json +1525 -0
  262. package/src/assets/ethereum/mainnet/common/sysio_write.sol/sysio_write.dbg.json +4 -0
  263. package/src/assets/ethereum/mainnet/common/sysio_write.sol/sysio_write.json +1076 -0
  264. package/src/assets/ethereum/mainnet/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
  265. package/src/assets/ethereum/mainnet/liqEth/BeaconState.sol/BeaconState.json +807 -0
  266. package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/DepositManagerV2.dbg.json +4 -0
  267. package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/DepositManagerV2.json +1004 -0
  268. package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/IStakingModuleBondLocker.dbg.json +4 -0
  269. package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/IStakingModuleBondLocker.json +29 -0
  270. package/src/assets/ethereum/mainnet/liqEth/KeyBondManager.sol/KeyBondManager.dbg.json +4 -0
  271. package/src/assets/ethereum/mainnet/liqEth/KeyBondManager.sol/KeyBondManager.json +897 -0
  272. package/src/assets/ethereum/mainnet/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
  273. package/src/assets/ethereum/mainnet/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +1289 -0
  274. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
  275. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
  276. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
  277. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
  278. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IKeyBondManager.dbg.json +4 -0
  279. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IKeyBondManager.json +189 -0
  280. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
  281. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
  282. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
  283. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20.json +319 -0
  284. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
  285. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +333 -0
  286. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
  287. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IStakingModule.json +279 -0
  288. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
  289. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
  290. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
  291. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
  292. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
  293. package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
  294. package/src/assets/ethereum/mainnet/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.dbg.json +4 -0
  295. package/src/assets/ethereum/mainnet/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.json +236 -0
  296. package/src/assets/ethereum/mainnet/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +4 -0
  297. package/src/assets/ethereum/mainnet/liqEth/LiqEthManaged.sol/LiqEthManaged.json +229 -0
  298. package/src/assets/ethereum/mainnet/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.dbg.json +4 -0
  299. package/src/assets/ethereum/mainnet/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.json +957 -0
  300. package/src/assets/ethereum/mainnet/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.dbg.json +4 -0
  301. package/src/assets/ethereum/mainnet/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.json +1020 -0
  302. package/src/assets/ethereum/mainnet/liqEth/StakingLib.sol/StakingLib.dbg.json +4 -0
  303. package/src/assets/ethereum/mainnet/liqEth/StakingLib.sol/StakingLib.json +89 -0
  304. package/src/assets/ethereum/mainnet/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
  305. package/src/assets/ethereum/mainnet/liqEth/Yield.sol/YieldOracle.json +1376 -0
  306. package/src/assets/ethereum/mainnet/liqEth/liqEth.sol/LiqEthTokenV2.dbg.json +4 -0
  307. package/src/assets/ethereum/mainnet/liqEth/liqEth.sol/LiqEthTokenV2.json +1323 -0
  308. package/src/assets/ethereum/mainnet/liqEth/stakingModule.sol/StakingModuleV2.dbg.json +4 -0
  309. package/src/assets/ethereum/mainnet/liqEth/stakingModule.sol/StakingModuleV2.json +1896 -0
  310. package/src/assets/ethereum/mainnet/liqEth/v1/DepositManager.sol/DepositManager.dbg.json +4 -0
  311. package/src/assets/ethereum/mainnet/liqEth/v1/DepositManager.sol/DepositManager.json +978 -0
  312. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
  313. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IAccounting.json +176 -0
  314. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
  315. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositContract.json +39 -0
  316. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
  317. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositManager.json +64 -0
  318. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
  319. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
  320. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
  321. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.json +249 -0
  322. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
  323. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.json +263 -0
  324. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
  325. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IStakingModule.json +344 -0
  326. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
  327. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
  328. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
  329. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
  330. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
  331. package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.json +10 -0
  332. package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +4 -0
  333. package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.json +874 -0
  334. package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
  335. package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +937 -0
  336. package/src/assets/ethereum/mainnet/liqEth/v1/accounting.sol/Accounting.dbg.json +4 -0
  337. package/src/assets/ethereum/{ABI/liqEth → mainnet/liqEth/v1}/accounting.sol/Accounting.json +3 -3
  338. package/src/assets/ethereum/mainnet/liqEth/v1/liqEth.sol/LiqEthToken.dbg.json +4 -0
  339. package/src/assets/ethereum/mainnet/liqEth/v1/liqEth.sol/LiqEthToken.json +1233 -0
  340. package/src/assets/ethereum/mainnet/liqEth/v1/stakingModule.sol/StakingModule.dbg.json +4 -0
  341. package/src/assets/ethereum/{ABI/liqEth → mainnet/liqEth/v1}/stakingModule.sol/StakingModule.json +3 -3
  342. package/src/assets/ethereum/mainnet/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
  343. package/src/assets/ethereum/mainnet/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +973 -0
  344. package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
  345. package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
  346. package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
  347. package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/WithdrawalVault.json +441 -0
  348. package/src/assets/ethereum/mainnet/outpost/BAR.sol/BARV2.dbg.json +4 -0
  349. package/src/assets/ethereum/mainnet/outpost/BAR.sol/BARV2.json +1915 -0
  350. package/src/assets/ethereum/mainnet/outpost/Depositor.sol/DepositorV2.dbg.json +4 -0
  351. package/src/assets/ethereum/mainnet/outpost/Depositor.sol/DepositorV2.json +1845 -0
  352. package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +4 -0
  353. package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +122 -0
  354. package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +4 -0
  355. package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +33 -2
  356. package/src/assets/ethereum/mainnet/outpost/OPP.sol/OPP.dbg.json +4 -0
  357. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
  358. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +4 -0
  359. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPEndpoint.json +29 -0
  360. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPInbound.dbg.json +4 -0
  361. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +4 -0
  362. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPSender.dbg.json +4 -0
  363. package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
  364. package/src/assets/ethereum/mainnet/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
  365. package/src/assets/ethereum/mainnet/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
  366. package/src/assets/ethereum/mainnet/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
  367. package/src/assets/ethereum/mainnet/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
  368. package/src/assets/ethereum/mainnet/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
  369. package/src/assets/ethereum/mainnet/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
  370. package/src/assets/ethereum/mainnet/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
  371. package/src/assets/ethereum/mainnet/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
  372. package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostErrors.sol/OutpostErrors.json +33 -2
  373. package/src/assets/ethereum/mainnet/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +4 -0
  374. package/src/assets/ethereum/mainnet/outpost/OutpostManager.sol/OutpostManagerV2.dbg.json +4 -0
  375. package/src/assets/ethereum/mainnet/outpost/OutpostManager.sol/OutpostManagerV2.json +737 -0
  376. package/src/assets/ethereum/mainnet/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +4 -0
  377. package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +4 -0
  378. package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +4 -0
  379. package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +29 -0
  380. package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +4 -0
  381. package/src/assets/ethereum/mainnet/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +4 -0
  382. package/src/assets/ethereum/mainnet/outpost/Pool.sol/PoolV2.dbg.json +4 -0
  383. package/src/assets/ethereum/mainnet/outpost/Pool.sol/PoolV2.json +943 -0
  384. package/src/assets/ethereum/mainnet/outpost/Pretoken.sol/PretokenV2.dbg.json +4 -0
  385. package/src/assets/ethereum/mainnet/outpost/Pretoken.sol/PretokenV2.json +1703 -0
  386. package/src/assets/ethereum/mainnet/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +4 -0
  387. package/src/assets/ethereum/{ABI → mainnet}/outpost/ReceiptNFT.sol/ReceiptNFT.json +33 -2
  388. package/src/assets/ethereum/mainnet/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
  389. package/src/assets/ethereum/mainnet/outpost/interfaces/IPretoken.sol/IPretoken.json +29 -0
  390. package/src/assets/ethereum/mainnet/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +4 -0
  391. package/src/assets/ethereum/mainnet/outpost/interfaces/IWarrant.sol/IWarrant.json +29 -0
  392. package/src/assets/ethereum/mainnet/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +4 -0
  393. package/src/assets/ethereum/mainnet/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +858 -0
  394. package/src/assets/ethereum/mainnet/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +4 -0
  395. package/src/assets/ethereum/mainnet/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +30 -0
  396. package/src/assets/ethereum/mainnet/outpost/v1/BAR.sol/BAR.dbg.json +4 -0
  397. package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/BAR.sol/BAR.json +34 -3
  398. package/src/assets/ethereum/mainnet/outpost/v1/Depositor.sol/Depositor.dbg.json +4 -0
  399. package/src/assets/ethereum/mainnet/outpost/v1/Depositor.sol/Depositor.json +1653 -0
  400. package/src/assets/ethereum/mainnet/outpost/v1/OutpostManager.sol/OutpostManager.dbg.json +4 -0
  401. package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/OutpostManager.sol/OutpostManager.json +3 -3
  402. package/src/assets/ethereum/mainnet/outpost/v1/Pool.sol/Pool.dbg.json +4 -0
  403. package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/Pool.sol/Pool.json +34 -3
  404. package/src/assets/ethereum/mainnet/outpost/v1/Pretoken.sol/Pretoken.dbg.json +4 -0
  405. package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/Pretoken.sol/Pretoken.json +34 -3
  406. package/src/assets/ethereum/mainnet/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
  407. package/src/assets/ethereum/mainnet/token/ERC1155Token.sol/ERC1155Token.json +472 -0
  408. package/src/assets/ethereum/mainnet/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
  409. package/src/assets/ethereum/mainnet/token/ERC20Token.sol/ERC20Token.json +330 -0
  410. package/src/assets/ethereum/mainnet/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
  411. package/src/assets/ethereum/mainnet/token/ERC721Token.sol/ERC721Token.json +449 -0
  412. package/src/assets/solana/devnet/idl/liqsol_core.json +8566 -0
  413. package/src/assets/solana/{idl → devnet/idl}/liqsol_token.json +34 -0
  414. package/src/assets/solana/devnet/idl/transfer_hook.json +490 -0
  415. package/src/assets/solana/devnet/idl/validator_leaderboard.json +735 -0
  416. package/src/assets/solana/devnet/types/liqsol_core.ts +8572 -0
  417. package/src/assets/solana/{types → devnet/types}/liqsol_token.ts +34 -0
  418. package/src/assets/solana/devnet/types/transfer_hook.ts +496 -0
  419. package/src/assets/solana/devnet/types/validator_leaderboard.ts +741 -0
  420. package/src/assets/solana/{idl → mainnet/idl}/liqsol_core.json +542 -30
  421. package/src/assets/solana/mainnet/idl/liqsol_token.json +217 -0
  422. package/src/assets/solana/mainnet/idl/transfer_hook.json +479 -0
  423. package/src/assets/solana/{types → mainnet/types}/liqsol_core.ts +542 -30
  424. package/src/assets/solana/mainnet/types/liqsol_token.ts +223 -0
  425. package/src/assets/solana/mainnet/types/transfer_hook.ts +485 -0
  426. package/src/assets/solana/realdevnet/idl/liqsol_core.json +7112 -0
  427. package/src/assets/solana/realdevnet/idl/liqsol_token.json +217 -0
  428. package/src/assets/solana/realdevnet/idl/transfer_hook.json +479 -0
  429. package/src/assets/solana/realdevnet/idl/validator_leaderboard.json +735 -0
  430. package/src/assets/solana/realdevnet/types/liqsol_core.ts +7118 -0
  431. package/src/assets/solana/realdevnet/types/liqsol_token.ts +223 -0
  432. package/src/assets/solana/realdevnet/types/transfer_hook.ts +485 -0
  433. package/src/assets/solana/realdevnet/types/validator_leaderboard.ts +741 -0
  434. package/src/index.ts +4 -2
  435. package/src/networks/ethereum/clients/convert.client.ts +35 -1
  436. package/src/networks/ethereum/clients/instaswap.client.ts +432 -0
  437. package/src/networks/ethereum/clients/opp.client.ts +20 -21
  438. package/src/networks/ethereum/clients/receipt.client.ts +93 -23
  439. package/src/networks/ethereum/clients/stake.client.ts +192 -20
  440. package/src/networks/ethereum/clients/validator.client.ts +61 -0
  441. package/src/networks/ethereum/contract.ts +423 -239
  442. package/src/networks/ethereum/ethereum.ts +379 -165
  443. package/src/networks/ethereum/types.ts +40 -11
  444. package/src/networks/solana/clients/convert.client.ts +377 -0
  445. package/src/networks/solana/clients/distribution.client.ts +141 -29
  446. package/src/networks/solana/clients/instaswap.client.ts +474 -0
  447. package/src/networks/solana/clients/leaderboard.client.ts +10 -13
  448. package/src/networks/solana/clients/outpost.client.ts +120 -80
  449. package/src/networks/solana/clients/token.client.ts +33 -22
  450. package/src/networks/solana/constants.ts +58 -285
  451. package/src/networks/solana/program.ts +467 -29
  452. package/src/networks/solana/solana.ts +529 -222
  453. package/src/networks/solana/types.ts +41 -15
  454. package/src/networks/solana/utils.ts +74 -306
  455. package/src/staker.ts +23 -2
  456. package/src/types.ts +82 -11
  457. package/src/assets/ethereum/ABI/common/Base58.sol/Base58.dbg.json +0 -4
  458. package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +0 -4
  459. package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +0 -4
  460. package/src/assets/ethereum/ABI/common/iodata.sol/iodata.dbg.json +0 -4
  461. package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.dbg.json +0 -4
  462. package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.dbg.json +0 -4
  463. package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.dbg.json +0 -4
  464. package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.dbg.json +0 -4
  465. package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.dbg.json +0 -4
  466. package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +0 -4
  467. package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.dbg.json +0 -4
  468. package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.dbg.json +0 -4
  469. package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.dbg.json +0 -4
  470. package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.dbg.json +0 -4
  471. package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +0 -4
  472. package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +0 -4
  473. package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +0 -4
  474. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +0 -4
  475. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +0 -4
  476. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +0 -4
  477. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +0 -4
  478. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +0 -4
  479. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +0 -4
  480. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +0 -4
  481. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +0 -4
  482. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +0 -4
  483. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +0 -4
  484. package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +0 -4
  485. package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +0 -4
  486. package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +0 -4
  487. package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +0 -4
  488. package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +0 -4
  489. package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +0 -4
  490. package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +0 -4
  491. package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +0 -4
  492. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +0 -4
  493. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +0 -4
  494. package/src/assets/ethereum/ABI/outpost/Aggregator.sol/Aggregator.json +0 -82
  495. package/src/assets/ethereum/ABI/outpost/BAR.sol/BAR.dbg.json +0 -4
  496. package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +0 -4
  497. package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +0 -1622
  498. package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +0 -4
  499. package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +0 -4
  500. package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +0 -4
  501. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPP.dbg.json +0 -4
  502. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +0 -4
  503. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPInbound.dbg.json +0 -4
  504. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +0 -4
  505. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPSender.dbg.json +0 -4
  506. package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/OPPCommon.dbg.json +0 -4
  507. package/src/assets/ethereum/ABI/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +0 -4
  508. package/src/assets/ethereum/ABI/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +0 -4
  509. package/src/assets/ethereum/ABI/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +0 -4
  510. package/src/assets/ethereum/ABI/outpost/OPPErrors.sol/OPPErrors.dbg.json +0 -4
  511. package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +0 -4
  512. package/src/assets/ethereum/ABI/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +0 -4
  513. package/src/assets/ethereum/ABI/outpost/OPPSender.sol/OPPSender.dbg.json +0 -4
  514. package/src/assets/ethereum/ABI/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +0 -4
  515. package/src/assets/ethereum/ABI/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +0 -4
  516. package/src/assets/ethereum/ABI/outpost/OutpostManager.sol/OutpostManager.dbg.json +0 -4
  517. package/src/assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +0 -4
  518. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +0 -4
  519. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +0 -4
  520. package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +0 -4
  521. package/src/assets/ethereum/ABI/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +0 -4
  522. package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.dbg.json +0 -4
  523. package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +0 -4
  524. package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +0 -4
  525. package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +0 -4
  526. package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +0 -4
  527. package/src/assets/ethereum/ABI/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +0 -4
  528. package/src/assets/ethereum/ABI/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +0 -4
  529. package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.dbg.json +0 -4
  530. package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.dbg.json +0 -4
  531. package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.dbg.json +0 -4
  532. package/src/assets/solana/idl/transfer_hook.json +0 -197
  533. package/src/assets/solana/types/transfer_hook.ts +0 -203
  534. package/src/networks/solana/clients/deposit.client.ts +0 -292
  535. /package/src/assets/ethereum/{ABI → hoodi}/common/Base58.sol/Base58.json +0 -0
  536. /package/src/assets/ethereum/{ABI → hoodi}/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +0 -0
  537. /package/src/assets/ethereum/{ABI → hoodi}/common/RestrictedCallers.sol/RestrictedCallers.json +0 -0
  538. /package/src/assets/ethereum/{ABI → hoodi}/common/iodata.sol/iodata.json +0 -0
  539. /package/src/assets/ethereum/{ABI → hoodi}/common/iodata_util.sol/iodata_util.json +0 -0
  540. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_data.sol/sysio_data.json +0 -0
  541. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_errors.sol/sysio_errors.json +0 -0
  542. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_merkle.sol/sysio_merkle.json +0 -0
  543. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_name.sol/sysio_name.json +0 -0
  544. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_pubkey.sol/sysio_pubkey.json +0 -0
  545. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_read.sol/sysio_read.json +0 -0
  546. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_tester.sol/SysioTester.json +0 -0
  547. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_verify.sol/sysio_verify.json +0 -0
  548. /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_write.sol/sysio_write.json +0 -0
  549. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/BeaconState.sol/BeaconState.json +0 -0
  550. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +0 -0
  551. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IDepositContract.json +0 -0
  552. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IDepositManager.json +0 -0
  553. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +0 -0
  554. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +0 -0
  555. /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +0 -0
  556. /package/src/assets/ethereum/{ABI → hoodi}/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +0 -0
  557. /package/src/assets/ethereum/{ABI → hoodi}/outpost/OPPCommon.sol/IOPPEndpoint.json +0 -0
  558. /package/src/assets/ethereum/{ABI → hoodi}/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +0 -0
  559. /package/src/assets/ethereum/{ABI → hoodi}/outpost/interfaces/IPretoken.sol/IPretoken.json +0 -0
  560. /package/src/assets/ethereum/{ABI → hoodi}/outpost/interfaces/IWarrant.sol/IWarrant.json +0 -0
  561. /package/src/assets/ethereum/{ABI → hoodi}/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +0 -0
  562. /package/src/assets/ethereum/{ABI → hoodi}/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +0 -0
  563. /package/src/assets/ethereum/{ABI → hoodi}/token/ERC1155Token.sol/ERC1155Token.json +0 -0
  564. /package/src/assets/ethereum/{ABI → hoodi}/token/ERC20Token.sol/ERC20Token.json +0 -0
  565. /package/src/assets/ethereum/{ABI → hoodi}/token/ERC721Token.sol/ERC721Token.json +0 -0
  566. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPP.sol/OPP.json +0 -0
  567. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPP.json +0 -0
  568. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPInbound.json +0 -0
  569. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPReceiver.json +0 -0
  570. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPSender.json +0 -0
  571. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/OPPCommon.json +0 -0
  572. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpoint.sol/OPPEndpoint.json +0 -0
  573. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +0 -0
  574. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +0 -0
  575. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPErrors.sol/OPPErrors.json +0 -0
  576. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPInbound.sol/OPPInbound.json +0 -0
  577. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPReceiver.sol/OPPReceiver.json +0 -0
  578. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPSender.sol/OPPSender.json +0 -0
  579. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManaged.sol/OutpostManaged.json +0 -0
  580. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +0 -0
  581. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostManager.json +0 -0
  582. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.json +0 -0
  583. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostOwnable.sol/OutpostOwnable.json +0 -0
  584. /package/src/assets/solana/{idl → mainnet/idl}/validator_leaderboard.json +0 -0
  585. /package/src/assets/solana/{types → mainnet/types}/validator_leaderboard.ts +0 -0
@@ -1,23 +1,32 @@
1
1
  import {
2
+ AddressLookupTableAccount,
2
3
  Commitment,
3
4
  ComputeBudgetProgram,
4
5
  Connection,
5
6
  ConnectionConfig,
6
7
  PerfSample,
8
+ SendTransactionError,
7
9
  PublicKey as SolPubKey,
8
10
  SystemProgram,
9
11
  Transaction,
12
+ TransactionInstruction,
13
+ TransactionMessage,
10
14
  TransactionSignature,
15
+ VersionedTransaction,
11
16
  } from '@solana/web3.js';
12
17
  import { AnchorProvider, BN } from '@coral-xyz/anchor';
13
18
  import { BaseSignerWalletAdapter } from '@solana/wallet-adapter-base';
14
19
  import {
15
20
  ASSOCIATED_TOKEN_PROGRAM_ID,
21
+ createAssociatedTokenAccountInstruction,
16
22
  getAssociatedTokenAddressSync,
17
23
  TOKEN_2022_PROGRAM_ID,
18
24
  } from '@solana/spl-token';
19
25
 
26
+ import * as multisig from "@sqds/multisig";
27
+
20
28
  import {
29
+ Base58,
21
30
  ChainID,
22
31
  ExternalNetwork,
23
32
  KeyType,
@@ -28,28 +37,29 @@ import {
28
37
  import {
29
38
  IStakingClient,
30
39
  Portfolio,
40
+ SquadsXConfig,
31
41
  StakerConfig,
32
42
  TrancheSnapshot,
33
43
  } from '../../types';
34
44
 
35
- import { DepositClient } from './clients/deposit.client';
45
+ import { ConvertClient } from './clients/convert.client';
36
46
  import { DistributionClient } from './clients/distribution.client';
47
+ import { SolanaInstaswapClient } from './clients/instaswap.client';
37
48
  import { LeaderboardClient } from './clients/leaderboard.client';
38
49
  import { OutpostClient } from './clients/outpost.client';
39
50
  import { TokenClient } from './clients/token.client';
40
51
 
41
52
  import {
42
- deriveLiqsolMintPda,
43
- deriveReservePoolPda,
44
- deriveStakeMetricsPda,
45
- deriveVaultPda,
53
+ DEFAULT_AVERAGE_PAY_RATE,
46
54
  INDEX_SCALE,
47
55
  PAY_RATE_SCALE_FACTOR,
48
56
  } from './constants';
49
57
 
50
58
  import { buildSolanaTrancheSnapshot, ceilDiv } from './utils';
51
59
  import { GlobalConfig, PayRateEntry, SolanaTransaction } from './types';
60
+ import { WithdrawReceipt } from '../../types';
52
61
  import { SolanaProgramService } from './program';
62
+ import bs58 from 'bs58';
53
63
 
54
64
  const commitment: Commitment = 'confirmed';
55
65
 
@@ -71,13 +81,17 @@ export class SolanaStakingClient implements IStakingClient {
71
81
  public connection: Connection;
72
82
  public anchor: AnchorProvider;
73
83
 
74
- public depositClient: DepositClient;
84
+ public convertClient: ConvertClient;
75
85
  public distributionClient: DistributionClient;
86
+ public instaswapClient: SolanaInstaswapClient;
76
87
  public leaderboardClient: LeaderboardClient;
77
88
  public outpostClient: OutpostClient;
78
89
  public tokenClient: TokenClient;
79
90
  public program: SolanaProgramService
80
91
 
92
+ private smartAccount?: SolPubKey; // PDA (off-curve)
93
+ private signer?: SolPubKey; // on-curve signer
94
+
81
95
  get solPubKey(): SolPubKey {
82
96
  if (!this.pubKey) throw new Error('pubKey is undefined');
83
97
  return new SolPubKey(this.pubKey.data.array);
@@ -87,6 +101,18 @@ export class SolanaStakingClient implements IStakingClient {
87
101
  return this.config.network;
88
102
  }
89
103
 
104
+ get feePayer(): SolPubKey {
105
+ if (this.signer) return this.signer;
106
+ // fallback for normal wallets
107
+ if (this.anchor.wallet.publicKey) return this.anchor.wallet.publicKey;
108
+ throw new Error('No signing authority available');
109
+ }
110
+
111
+ get squadsX(): SquadsXConfig | null {
112
+ const config = this.config.extras?.squadsX;
113
+ return config ?? null;
114
+ }
115
+
90
116
  constructor(private config: StakerConfig) {
91
117
  const adapter = config.provider as BaseSignerWalletAdapter | undefined;
92
118
 
@@ -185,12 +211,18 @@ export class SolanaStakingClient implements IStakingClient {
185
211
  commitment,
186
212
  });
187
213
 
188
- this.depositClient = new DepositClient(this.anchor);
189
- this.distributionClient = new DistributionClient(this.anchor);
190
- this.leaderboardClient = new LeaderboardClient(this.anchor);
191
- this.outpostClient = new OutpostClient(this.anchor);
192
- this.tokenClient = new TokenClient(this.anchor);
193
- this.program = new SolanaProgramService(this.anchor);
214
+ this.program = new SolanaProgramService(this.anchor, config.network.chainId as SolChainID);
215
+
216
+ this.convertClient = new ConvertClient(this.anchor, this.program);
217
+ this.distributionClient = new DistributionClient(this.anchor, this.program);
218
+ this.instaswapClient = new SolanaInstaswapClient(
219
+ this.anchor,
220
+ this.program,
221
+ this.buildAndSendIx.bind(this),
222
+ );
223
+ this.leaderboardClient = new LeaderboardClient(this.anchor, this.program);
224
+ this.outpostClient = new OutpostClient(this.anchor, this.program);
225
+ this.tokenClient = new TokenClient(this.anchor, this.program);
194
226
  }
195
227
 
196
228
  // ---------------------------------------------------------------------
@@ -203,21 +235,35 @@ export class SolanaStakingClient implements IStakingClient {
203
235
  */
204
236
  async deposit(amountLamports: bigint): Promise<string> {
205
237
  this.ensureUser();
206
- if (amountLamports <= BigInt(0)) {
238
+ if (amountLamports <= BigInt(0))
207
239
  throw new Error('Deposit amount must be greater than zero.');
208
- }
209
240
 
210
241
  try {
211
- const tx = await this.depositClient.buildDepositTx(amountLamports);
212
- const { tx: prepared, blockhash, lastValidBlockHeight } =
213
- await this.prepareTx(tx);
214
- const signed = await this.signTransaction(prepared);
215
- return await this.sendAndConfirmHttp(signed, {
216
- blockhash,
217
- lastValidBlockHeight,
218
- });
242
+ const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
243
+ const submit = async (ix: TransactionInstruction | TransactionInstruction[]) => (
244
+ !!this.squadsX
245
+ ? await this.sendSquadsIxs(ix)
246
+ : await this.buildAndSendIx(ix)
247
+ );
248
+
249
+ try {
250
+ const ix = await this.convertClient.buildDepositTx(amountLamports, user);
251
+ return await submit(ix);
252
+ } catch (err) {
253
+ if (!this.isLegacyUserRecordMigrationRequired(err)) {
254
+ throw err;
255
+ }
256
+
257
+ const registerIx = await this.convertClient.buildRegisterUserIx(user);
258
+ await submit(registerIx);
259
+
260
+ const retryIx = await this.convertClient.buildDepositTx(amountLamports, user);
261
+ return await submit(retryIx);
262
+ }
263
+
219
264
  } catch (err) {
220
- throw new Error(`Failed to deposit Solana: ${err}`);
265
+ console.log(`Failed to deposit Solana: ${err}`);
266
+ throw err;
221
267
  }
222
268
  }
223
269
 
@@ -233,51 +279,89 @@ export class SolanaStakingClient implements IStakingClient {
233
279
  */
234
280
  async withdraw(amountLamports: bigint): Promise<string> {
235
281
  this.ensureUser();
236
- if (amountLamports <= BigInt(0)) {
282
+ if (amountLamports <= BigInt(0))
237
283
  throw new Error('Withdraw amount must be greater than zero.');
238
- }
239
284
 
240
285
  try {
241
- const tx = await this.depositClient.buildWithdrawTx(amountLamports);
242
- const { tx: prepared, blockhash, lastValidBlockHeight } =
243
- await this.prepareTx(tx);
244
- const signed = await this.signTransaction(prepared);
245
- return await this.sendAndConfirmHttp(signed, {
246
- blockhash,
247
- lastValidBlockHeight,
248
- });
286
+ const ix = await this.convertClient.buildWithdrawTx(amountLamports, this.squadsVaultPDA)
287
+ return !!this.squadsX
288
+ ? await this.sendSquadsIxs(ix)
289
+ : await this.buildAndSendIx(ix)
290
+
249
291
  } catch (err) {
250
- throw new Error(`Failed to withdraw Solana: ${err}`);
292
+ console.log(`Failed to withdraw Solana: ${err}`);
293
+ throw err;
251
294
  }
252
295
  }
253
296
 
254
297
  /**
255
- * Stake liqSOL into Outpost (liqSOL pool) via liqsol_core::synd.
298
+ * Enumerate withdrawal receipt NFTs held by the user (queued/ready/claimed).
299
+ * Mirrors the ETH getPendingWithdraws helper for UI parity.
256
300
  */
257
- async stake(amountLamports: bigint): Promise<string> {
301
+ async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
258
302
  this.ensureUser();
303
+ const owner = address ? new SolPubKey(address) :
304
+ this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
305
+ return await this.convertClient.fetchWithdrawReceipts(owner);
306
+ }
259
307
 
260
- if (!amountLamports || amountLamports <= BigInt(0)) {
261
- throw new Error('Stake amount must be greater than zero.');
262
- }
308
+ /**
309
+ * Claim a withdrawal receipt (burn NFT + receive SOL) via claim_withdraw.
310
+ */
311
+ async claimWithdraw(tokenId: bigint): Promise<string> {
312
+ this.ensureUser();
313
+ const owner = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
263
314
 
264
315
  try {
265
- const user = this.solPubKey;
316
+ const ix = await this.convertClient.buildClaimWithdrawTx(tokenId, owner);
317
+ return !!this.squadsX
318
+ ? await this.sendSquadsIxs(ix)
319
+ : await this.buildAndSendIx(ix);
320
+ } catch (err) {
321
+ console.log(`Failed to claim withdraw on Solana: ${err}`);
322
+ throw err;
323
+ }
324
+ }
325
+
326
+ /**
327
+ * Claim accrued liqSOL distribution rewards (liqsol_core::claim_rewards).
328
+ */
329
+ async claimLiqsolRewards(): Promise<string> {
330
+ this.ensureUser();
331
+ const owner = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
266
332
 
267
- // Build compute budget increase instruction
268
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
333
+ try {
334
+ const ix = await this.distributionClient.buildClaimRewardsIx(owner);
335
+ return !!this.squadsX
336
+ ? await this.sendSquadsIxs(ix)
337
+ : await this.buildAndSendIx(ix);
338
+ } catch (err) {
339
+ console.log(`Failed to claim liqSOL rewards on Solana: ${err}`);
340
+ throw err;
341
+ }
342
+ }
269
343
 
270
- // Build the Outpost synd instruction
271
- const ix = await this.outpostClient.buildStakeIx(amountLamports, user);
344
+ /**
345
+ * Stake liqSOL into Outpost (liqSOL → pool) via liqsol_core::synd.
346
+ */
347
+ async stake(amountLamports: bigint, wireAccount?: string): Promise<string> {
348
+ this.ensureUser();
349
+ if (!amountLamports || amountLamports <= BigInt(0))
350
+ throw new Error('Stake amount must be greater than zero.');
272
351
 
273
- // Wrap in a transaction and send
274
- const tx = new Transaction().add(cuIx, ix);
275
- const prepared = await this.prepareTx(tx);
276
- const signed = await this.signTransaction(prepared.tx);
352
+ try {
353
+ const ix = await this.outpostClient.buildStakeIx(
354
+ amountLamports,
355
+ this.squadsVaultPDA,
356
+ wireAccount,
357
+ )
358
+ return !!this.squadsX
359
+ ? await this.sendSquadsIxs(ix)
360
+ : await this.buildAndSendIx(ix)
277
361
 
278
- return this.sendAndConfirmHttp(signed, prepared);
279
362
  } catch (err) {
280
- throw new Error(`Failed to stake Solana: ${err}`);
363
+ console.log(`Failed to stake Solana: ${err}`);
364
+ throw err;
281
365
  }
282
366
  }
283
367
 
@@ -286,29 +370,18 @@ export class SolanaStakingClient implements IStakingClient {
286
370
  */
287
371
  async unstake(amountLamports: bigint): Promise<string> {
288
372
  this.ensureUser();
289
-
290
- if (!amountLamports || amountLamports <= BigInt(0)) {
373
+ if (!amountLamports || amountLamports <= BigInt(0))
291
374
  throw new Error('Unstake amount must be greater than zero.');
292
- }
293
375
 
294
376
  try {
295
- const user = this.solPubKey;
296
-
297
- // Build compute budget increase instruction
298
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
299
-
300
- // Build the Outpost desynd instruction
301
- const ix = await this.outpostClient.buildUnstakeIx(amountLamports, user);
302
-
303
- // Wrap in a transaction and send
304
- const tx = new Transaction().add(cuIx, ix);
305
- const prepared = await this.prepareTx(tx);
306
- const signed = await this.signTransaction(prepared.tx);
307
-
308
- return this.sendAndConfirmHttp(signed, prepared);
377
+ const ix = await this.outpostClient.buildUnstakeIx(amountLamports, this.squadsVaultPDA)
378
+ return !!this.squadsX
379
+ ? await this.sendSquadsIxs(ix)
380
+ : await this.buildAndSendIx(ix)
309
381
  }
310
382
  catch (err) {
311
- throw new Error(`Failed to unstake Solana: ${err}`);
383
+ console.log(`Failed to unstake Solana: ${err}`);
384
+ throw err;
312
385
  }
313
386
  }
314
387
 
@@ -320,25 +393,82 @@ export class SolanaStakingClient implements IStakingClient {
320
393
  */
321
394
  async buy(amountLamports: bigint): Promise<string> {
322
395
  this.ensureUser();
323
- if (!amountLamports || amountLamports <= BigInt(0)) {
396
+ if (!amountLamports || amountLamports <= BigInt(0))
324
397
  throw new Error('liqSOL pretoken purchase requires a positive amount.');
325
- }
326
398
 
327
399
  try {
328
- const user = this.solPubKey;
329
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
330
- const ix = await this.tokenClient.buildPurchaseIx(amountLamports, user);
331
- const tx = new Transaction().add(cuIx, ix);
332
- const { tx: prepared, blockhash, lastValidBlockHeight } =
333
- await this.prepareTx(tx);
334
- const signed = await this.signTransaction(prepared);
335
- return await this.sendAndConfirmHttp(signed, {
336
- blockhash,
337
- lastValidBlockHeight,
338
- });
400
+ const ix = await this.tokenClient.buildPurchaseIx(amountLamports, this.squadsVaultPDA)
401
+ return !!this.squadsX
402
+ ? await this.sendSquadsIxs(ix)
403
+ : await this.buildAndSendIx(ix)
339
404
  }
340
405
  catch (err) {
341
- throw new Error(`Failed to buy liqSOL pretokens: ${err}`);
406
+ console.log(`Failed to buy liqSOL pretokens: ${err}`);
407
+ throw err;
408
+ }
409
+ }
410
+
411
+ /** Deposit SOL to liqSOL, then syndicate that liqSOL in one transaction. Requires enough SOL for the deposit fee. */
412
+ async depositAndStake(amountLamports: bigint, wireAccount?: string): Promise<string> {
413
+ this.ensureUser();
414
+ if (!amountLamports || amountLamports <= BigInt(0))
415
+ throw new Error('Amount must be greater than zero.');
416
+
417
+ try {
418
+ const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
419
+ const depositIx = await this.convertClient.buildDepositTx(amountLamports, user);
420
+ const stakeIx = await this.outpostClient.buildStakeIx(
421
+ amountLamports,
422
+ user,
423
+ wireAccount,
424
+ );
425
+
426
+ return !!this.squadsX
427
+ ? await this.sendSquadsIxs([depositIx, stakeIx])
428
+ : await this.buildAndSendIx([depositIx, stakeIx]);
429
+ } catch (err) {
430
+ console.log(`Failed to deposit and stake: ${err}`);
431
+ throw err;
432
+ }
433
+ }
434
+
435
+ /** Deposit SOL to liqSOL, then buy pretokens with that liqSOL in one transaction. Requires enough SOL for the deposit fee. */
436
+ async depositAndBuy(amountLamports: bigint): Promise<string> {
437
+ this.ensureUser();
438
+ if (!amountLamports || amountLamports <= BigInt(0))
439
+ throw new Error('Amount must be greater than zero.');
440
+
441
+ try {
442
+ const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
443
+ const depositIx = await this.convertClient.buildDepositTx(amountLamports, user);
444
+ const purchaseIx = await this.tokenClient.buildPurchaseIx(amountLamports, user);
445
+
446
+ return !!this.squadsX
447
+ ? await this.sendSquadsIxs([depositIx, purchaseIx])
448
+ : await this.buildAndSendIx([depositIx, purchaseIx]);
449
+ } catch (err) {
450
+ console.log(`Failed to deposit and buy: ${err}`);
451
+ throw err;
452
+ }
453
+ }
454
+
455
+ /** Desyndicate liqSOL, then request withdraw in one transaction. */
456
+ async unstakeAndWithdraw(amountLamports: bigint): Promise<string> {
457
+ this.ensureUser();
458
+ if (!amountLamports || amountLamports <= BigInt(0))
459
+ throw new Error('Amount must be greater than zero.');
460
+
461
+ try {
462
+ const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
463
+ const unstakeIx = await this.outpostClient.buildUnstakeIx(amountLamports, user);
464
+ const withdrawIx = await this.convertClient.buildWithdrawTx(amountLamports, user);
465
+
466
+ return !!this.squadsX
467
+ ? await this.sendSquadsIxs([unstakeIx, withdrawIx])
468
+ : await this.buildAndSendIx([unstakeIx, withdrawIx]);
469
+ } catch (err) {
470
+ console.log(`Failed to unstake and withdraw: ${err}`);
471
+ throw err;
342
472
  }
343
473
  }
344
474
 
@@ -351,20 +481,20 @@ export class SolanaStakingClient implements IStakingClient {
351
481
  * - yield: on-chain index/shares plus an estimated accrued liqSOL yield
352
482
  * - extras: useful internal addresses and raw state for debugging/UX
353
483
  */
354
- async getPortfolio(): Promise<Portfolio> {
355
- if (!this.pubKey) throw new Error('User pubKey is undefined');
356
-
484
+ async getPortfolio(address?: string): Promise<Portfolio> {
485
+ // if (!this.pubKey) throw new Error('User pubKey is undefined');
357
486
  try {
358
- const user = this.solPubKey;
487
+ const user = address ? new SolPubKey(address) :
488
+ !!this.squadsX ? this.squadsVaultPDA! : this.solPubKey;
359
489
 
360
- const reservePoolPDA = deriveReservePoolPda();
361
- const vaultPDA = deriveVaultPda();
362
- const liqsolMint = deriveLiqsolMintPda();
490
+ const reservePoolPDA = this.program.deriveReservePoolPda();
491
+ const vaultPDA = this.program.deriveVaultPda();
492
+ const liqsolMint = this.program.deriveLiqsolMintPda();
363
493
 
364
494
  const userLiqsolAta = getAssociatedTokenAddressSync(
365
495
  liqsolMint,
366
496
  user,
367
- false,
497
+ true,
368
498
  TOKEN_2022_PROGRAM_ID,
369
499
  ASSOCIATED_TOKEN_PROGRAM_ID,
370
500
  );
@@ -373,12 +503,13 @@ export class SolanaStakingClient implements IStakingClient {
373
503
  // - nativeLamports: wallet SOL
374
504
  // - actualBalResp: liqSOL balance in user ATA
375
505
  // - snapshot: Outpost + pretokens + global index/shares
376
- const [nativeLamports, actualBalResp, snapshot] = await Promise.all([
506
+ const [nativeLamports, actualBalResp, snapshot, claimableLamports] = await Promise.all([
377
507
  this.connection.getBalance(user, 'confirmed'),
378
508
  this.connection
379
509
  .getTokenAccountBalance(userLiqsolAta, 'confirmed')
380
510
  .catch(() => null),
381
511
  this.outpostClient.fetchWireState(user).catch(() => null),
512
+ this.distributionClient.getClaimableLiqsol(user).catch(() => new BN(0)),
382
513
  ]);
383
514
 
384
515
  const LIQSOL_DECIMALS = 9;
@@ -454,6 +585,12 @@ export class SolanaStakingClient implements IStakingClient {
454
585
  decimals: LIQSOL_DECIMALS,
455
586
  ata: userLiqsolAta,
456
587
  },
588
+ claimable: {
589
+ amount: BigInt(claimableLamports.toString()),
590
+ symbol: 'LiqSOL',
591
+ decimals: LIQSOL_DECIMALS,
592
+ ata: userLiqsolAta,
593
+ },
457
594
  staked: {
458
595
  // liqSOL staked in Outpost via `synd`
459
596
  amount: stakedLiqsol,
@@ -491,7 +628,8 @@ export class SolanaStakingClient implements IStakingClient {
491
628
  };
492
629
  }
493
630
  catch (err) {
494
- throw new Error(`Failed to get Solana portfolio: ${err}`);
631
+ console.log(`Failed to get Solana portfolio: ${err}`);
632
+ throw err;
495
633
  }
496
634
  }
497
635
 
@@ -504,6 +642,260 @@ export class SolanaStakingClient implements IStakingClient {
504
642
  return this.distributionClient.getUserRecord(this.solPubKey);
505
643
  }
506
644
 
645
+ // ---------------------------------------------------------------------
646
+ // SquadsX Helpers
647
+ // ---------------------------------------------------------------------
648
+
649
+ get squadsMultisigPDA(): SolPubKey | undefined {
650
+ if (!this.squadsX) return undefined;
651
+ return new SolPubKey(this.squadsX.multisigPDA);
652
+ }
653
+
654
+ get squadsVaultPDA(): SolPubKey | undefined {
655
+ if (!this.squadsX || !this.squadsMultisigPDA) return undefined;
656
+ const multisigPda = this.squadsMultisigPDA;
657
+ const index = this.squadsX.vaultIndex ?? 0;
658
+ const pda = multisig.getVaultPda({ multisigPda, index });
659
+ return pda[0];
660
+ }
661
+
662
+ /** Create a Squads vault transaction/proposal for one or more instructions. */
663
+ private async sendSquadsIxs(ix: TransactionInstruction | TransactionInstruction[]): Promise<string> {
664
+ if (!this.squadsX) throw new Error('Attempting to wrap Squads instruction without SquadsX config');
665
+
666
+ const ixs = Array.isArray(ix) ? ix : [ix];
667
+ const multisigPda = this.squadsMultisigPDA!;
668
+ const vaultPda = this.squadsVaultPDA!;
669
+ const vaultIndex = this.squadsX?.vaultIndex ?? 0;
670
+ const creator = this.solPubKey;
671
+
672
+ const ms = await multisig.accounts.Multisig.fromAccountAddress(this.connection, multisigPda);
673
+ const current = BigInt(ms.transactionIndex?.toString() ?? 0);
674
+ const transactionIndex = current + BigInt(1);
675
+
676
+ const altAddress = this.program.PROGRAM_IDS.ALT;
677
+ const altAccount = await this.connection.getAddressLookupTable(altAddress);
678
+ if (!altAccount.value) throw new Error("ALT not found on-chain or not yet active.");
679
+
680
+ const lookupTable: AddressLookupTableAccount = altAccount.value;
681
+ const computeLimitIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 });
682
+ const computePriceIx = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 2000 });
683
+
684
+ const { blockhash } = await this.connection.getLatestBlockhash("confirmed");
685
+ const transactionMessage = new TransactionMessage({
686
+ payerKey: vaultPda,
687
+ recentBlockhash: blockhash,
688
+ instructions: [computeLimitIx, computePriceIx, ...ixs],
689
+ });
690
+
691
+ const createVaultTxIx = await multisig.instructions.vaultTransactionCreate({
692
+ multisigPda,
693
+ transactionIndex,
694
+ creator,
695
+ vaultIndex,
696
+ transactionMessage,
697
+ ephemeralSigners: 0,
698
+ addressLookupTableAccounts: [lookupTable],
699
+ });
700
+
701
+ const vaultTransactionCreate = await this.buildAndSendIx(createVaultTxIx)
702
+ console.log('SQUADSX: vaultTransactionCreate', vaultTransactionCreate);
703
+
704
+ const createProposalIx = await multisig.instructions.proposalCreate({
705
+ multisigPda,
706
+ transactionIndex,
707
+ creator,
708
+ });
709
+
710
+ const proposalCreate = await this.buildAndSendIx(createProposalIx)
711
+ console.log('SQUADSX: proposalCreate', proposalCreate);
712
+
713
+ return proposalCreate;
714
+ }
715
+
716
+ // async finish(multisigPda: string, transactionIndex: number): Promise<void> {
717
+ // const vaultExecute = await multisig.instructions.vaultTransactionExecute({
718
+ // connection: this.connection,
719
+ // multisigPda: new SolPubKey(multisigPda),
720
+ // transactionIndex: BigInt(transactionIndex),
721
+ // member: this.solPubKey
722
+ // });
723
+
724
+ // const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
725
+ // const tx1 = new Transaction().add(cuIx, vaultExecute.instruction);
726
+ // const prepared1 = await this.prepareTx(tx1);
727
+ // const signed1 = await this.signTransaction(prepared1.tx);
728
+ // const sent1 = await this.sendAndConfirmHttp(signed1, prepared1);
729
+ // console.log('SENT FINISH', sent1);
730
+ // }
731
+
732
+ // ---------------------------------------------------------------------
733
+ // Tx helpers
734
+ // ---------------------------------------------------------------------
735
+
736
+ async buildAndSendIx(ix: TransactionInstruction | TransactionInstruction[]): Promise<string> {
737
+ const ixs = Array.isArray(ix) ? ix : [ix];
738
+ const computeLimitIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 });
739
+ const computePriceIx = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 2000 });
740
+ const { blockhash, lastValidBlockHeight } =
741
+ await this.connection.getLatestBlockhash('confirmed');
742
+
743
+ const altAddress = this.program.PROGRAM_IDS.ALT;
744
+ const altAccount = await this.connection.getAddressLookupTable(altAddress);
745
+ const lookupTable = altAccount.value;
746
+
747
+ const instructions = [computeLimitIx, computePriceIx, ...ixs];
748
+
749
+ const tx = lookupTable
750
+ ? new VersionedTransaction(
751
+ new TransactionMessage({
752
+ payerKey: this.feePayer,
753
+ recentBlockhash: blockhash,
754
+ instructions,
755
+ }).compileToV0Message([lookupTable]),
756
+ )
757
+ : new Transaction().add(...instructions);
758
+
759
+ const prepared =
760
+ tx instanceof Transaction
761
+ ? await this.prepareTx(tx)
762
+ : { tx, blockhash, lastValidBlockHeight };
763
+
764
+ const signed = await this.signTransaction(prepared.tx);
765
+
766
+ return this.sendAndConfirmHttp(signed, prepared);
767
+ }
768
+
769
+
770
+ /**
771
+ * Send a signed transaction over HTTP RPC.
772
+ *
773
+ * - Returns immediately on successful sendRawTransaction.
774
+ * - If sendRawTransaction throws a SendTransactionError with
775
+ * "already been processed", we treat it as success and
776
+ * just return a derived signature.
777
+ * - No confirmTransaction / polling / blockheight handling.
778
+ */
779
+ private async sendAndConfirmHttp(
780
+ signed: SolanaTransaction,
781
+ _ctx: { blockhash: string; lastValidBlockHeight: number },
782
+ ): Promise<string> {
783
+ this.ensureUser();
784
+
785
+ const rawTx = signed.serialize();
786
+
787
+ try {
788
+ // Normal happy path: RPC accepts the tx and returns a signature
789
+ const signature = await this.connection.sendRawTransaction(rawTx, {
790
+ skipPreflight: false,
791
+ preflightCommitment: commitment,
792
+ maxRetries: 3,
793
+ });
794
+ return signature;
795
+ } catch (e: any) {
796
+ const msg = e?.message ?? '';
797
+ const isSendTxError =
798
+ e instanceof SendTransactionError || e?.name === 'SendTransactionError';
799
+
800
+ // Benign duplicate case: tx is already in the ledger / cache
801
+ if (isSendTxError && msg.includes('already been processed')) {
802
+ console.warn(
803
+ 'sendRawTransaction reports "already been processed"; ' +
804
+ 'treating as success without further confirmation.',
805
+ );
806
+
807
+ // Try to derive a signature from the signed Transaction.
808
+ // If SolanaTransaction is a legacy Transaction, this works.
809
+ const legacy = signed as unknown as Transaction;
810
+ const first = legacy.signatures?.[0]?.signature;
811
+
812
+ if (first) {
813
+ return bs58.encode(first);
814
+ }
815
+
816
+ // Fallback: return a dummy string
817
+ return 'already-processed';
818
+ }
819
+
820
+ // Any other send error is a real failure
821
+ throw e;
822
+ }
823
+ }
824
+
825
+ /**
826
+ * Sign a single Solana transaction using the connected wallet adapter.
827
+ */
828
+ async signTransaction(
829
+ tx: SolanaTransaction,
830
+ ): Promise<SolanaTransaction> {
831
+ this.ensureUser();
832
+ return this.anchor.wallet.signTransaction(tx);
833
+ }
834
+
835
+ /**
836
+ * Generic "fire and forget" send helper if the caller already
837
+ * prepared and signed the transaction.
838
+ */
839
+ async sendTransaction(
840
+ signed: SolanaTransaction,
841
+ ): Promise<TransactionSignature> {
842
+ this.ensureUser();
843
+ return this.anchor.sendAndConfirm(signed);
844
+ }
845
+
846
+ /**
847
+ * Attach recent blockhash + fee payer to a transaction.
848
+ * Required before signing and sending.
849
+ */
850
+ async prepareTx(
851
+ tx: Transaction,
852
+ ): Promise<{
853
+ tx: Transaction;
854
+ blockhash: string;
855
+ lastValidBlockHeight: number;
856
+ }> {
857
+ const { blockhash, lastValidBlockHeight } =
858
+ await this.connection.getLatestBlockhash('confirmed');
859
+ tx.recentBlockhash = blockhash;
860
+ tx.feePayer = this.feePayer;
861
+ return { tx, blockhash, lastValidBlockHeight };
862
+ }
863
+
864
+ /**
865
+ * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
866
+ * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
867
+ */
868
+ ensureUser() {
869
+ if (!this.pubKey) throw new Error('User pubKey is undefined');
870
+
871
+ const wallet = this.anchor?.wallet as any;
872
+ const pk = wallet?.publicKey as SolPubKey | undefined;
873
+
874
+ if (!pk) throw new Error('Wallet not connected');
875
+ if (typeof wallet.signTransaction !== 'function') {
876
+ throw new Error('Wallet does not support signTransaction');
877
+ }
878
+
879
+ // if (!this.pubKey || !this.anchor.wallet.publicKey) {
880
+ // throw new Error('User Authorization required: pubKey is undefined');
881
+ // }
882
+ // if (
883
+ // this.solPubKey.toBase58() !==
884
+ // this.anchor.wallet.publicKey.toBase58()
885
+ // ) {
886
+ // throw new Error(
887
+ // 'Write access requires connected wallet to match pubKey',
888
+ // );
889
+ // }
890
+ }
891
+
892
+ private isLegacyUserRecordMigrationRequired(error: unknown): boolean {
893
+ const message = error instanceof Error ? error.message : String(error ?? '');
894
+ const normalized = message.toLowerCase();
895
+ return normalized.includes('legacyuserrecordmigrationrequired')
896
+ || normalized.includes('legacy user record must be migrated')
897
+ || normalized.includes('custom program error: 0x1784');
898
+ }
507
899
 
508
900
  // ---------------------------------------------------------------------
509
901
  // READ-ONLY Public Methods
@@ -519,18 +911,8 @@ export class SolanaStakingClient implements IStakingClient {
519
911
  *
520
912
  * This is READ-ONLY and works even with no connected wallet.
521
913
  */
522
- async getTrancheSnapshot(options?: {
523
- chainID?: ChainID;
524
- windowBefore?: number;
525
- windowAfter?: number;
526
- }): Promise<TrancheSnapshot> {
914
+ async getTrancheSnapshot(chainID: ChainID): Promise<TrancheSnapshot> {
527
915
  try {
528
- const {
529
- chainID = SolChainID.WireTestnet,
530
- windowBefore,
531
- windowAfter,
532
- } = options ?? {};
533
-
534
916
  const [globalState, trancheState] = await Promise.all([
535
917
  this.tokenClient.fetchGlobalState(),
536
918
  this.tokenClient.fetchTrancheState(),
@@ -545,12 +927,11 @@ export class SolanaStakingClient implements IStakingClient {
545
927
  trancheState,
546
928
  solPriceUsd,
547
929
  nativePriceTimestamp: timestamp,
548
- ladderWindowBefore: windowBefore,
549
- ladderWindowAfter: windowAfter,
550
930
  });
551
931
  }
552
932
  catch (err) {
553
- throw new Error(`Failed to build Solana tranche snapshot: ${err}`);
933
+ console.log(`Failed to build Solana tranche snapshot: ${err}`);
934
+ throw err;
554
935
  }
555
936
  }
556
937
 
@@ -572,7 +953,8 @@ export class SolanaStakingClient implements IStakingClient {
572
953
 
573
954
  return apyPercent;
574
955
  } catch (err) {
575
- throw new Error(`Failed to compute Solana system APY: ${err}`);
956
+ console.log(`Failed to compute Solana system APY: ${err}`);
957
+ throw err;
576
958
  }
577
959
  }
578
960
 
@@ -582,24 +964,48 @@ export class SolanaStakingClient implements IStakingClient {
582
964
  * de-scaled using PAY_RATE_SCALE_FACTOR (1e12).
583
965
  */
584
966
  private async getEpochRateDecimalFromProgram(): Promise<number> {
585
- try {
967
+ const liqSolCoreProgram: any = this.program.getProgram('liqsolCore');
968
+ const payRateHistoryPda = this.program.derivePayRateHistoryPda();
586
969
 
587
- const liqSolCoreProgram = this.program.getProgram('liqsolCore');
588
- const stakeMetricsPda = deriveStakeMetricsPda();
589
- const stakeMetrics =
590
- await liqSolCoreProgram.account.stakeMetrics.fetch(stakeMetricsPda);
970
+ const payRateHistory =
971
+ await liqSolCoreProgram.account.payRateHistory.fetch(payRateHistoryPda);
591
972
 
592
- // solSystemPayRate is stored on-chain with PAY_RATE_SCALE_FACTOR (1e12)
593
- const raw = BigInt(stakeMetrics.solSystemPayRate.toString());
973
+ const totalEntriesAdded = Number(payRateHistory.totalEntriesAdded);
974
+ const maxEntries = Number(payRateHistory.maxEntries);
975
+
976
+ if (totalEntriesAdded === 0) {
977
+ // No real entries yet, fall back to default
978
+ return Number(DEFAULT_AVERAGE_PAY_RATE) / Number(PAY_RATE_SCALE_FACTOR);
979
+ }
594
980
 
595
- // Convert to JS number in **decimal per epoch** units
596
- const rateDecimal = Number(raw) / Number(PAY_RATE_SCALE_FACTOR);
981
+ const currentIndex = Number(payRateHistory.currentIndex);
597
982
 
598
- return rateDecimal;
983
+ // Only average entries that have actually been processed (written by add_entry),
984
+ // not the default-initialized slots. After 10+ entries, processedCount === maxEntries.
985
+ const processedCount = Math.min(totalEntriesAdded, maxEntries);
986
+
987
+ let sum = BigInt(0);
988
+ let validCount = 0;
989
+ // Walk backward from most recent entry
990
+ let idx = (currentIndex - 1 + maxEntries) % maxEntries;
991
+
992
+ for (let i = 0; i < processedCount; i++) {
993
+ const entry = payRateHistory.entries[idx];
994
+ const scaledRate = BigInt(entry.scaledRate.toString());
995
+ if (scaledRate > BigInt(0)) {
996
+ sum += scaledRate;
997
+ validCount++;
998
+ }
999
+ idx = (idx - 1 + maxEntries) % maxEntries;
599
1000
  }
600
- catch (err) {
601
- throw new Error(`Failed to read stakeMetrics from program: ${err}`);
1001
+
1002
+ if (validCount === 0) {
1003
+ return Number(DEFAULT_AVERAGE_PAY_RATE) / Number(PAY_RATE_SCALE_FACTOR);
602
1004
  }
1005
+
1006
+ // Average the processed entries
1007
+ const average = Number(sum / BigInt(validCount));
1008
+ return average / Number(PAY_RATE_SCALE_FACTOR);
603
1009
  }
604
1010
 
605
1011
  // Simple cache so we don’t hammer RPC
@@ -684,7 +1090,7 @@ export class SolanaStakingClient implements IStakingClient {
684
1090
  return BigInt(0);
685
1091
  }
686
1092
 
687
- const [avgPayRate, globalConfig]: [BN, GlobalConfig] = await Promise.all([
1093
+ const [avgPayRate, globalConfig]: [BN, GlobalConfig | null] = await Promise.all([
688
1094
  this.distributionClient.getAverageScaledPayRate(windowSize),
689
1095
  this.distributionClient.getGlobalConfig(),
690
1096
  ]);
@@ -735,14 +1141,12 @@ export class SolanaStakingClient implements IStakingClient {
735
1141
  }): Promise<bigint> {
736
1142
  this.ensureUser();
737
1143
 
738
- const payer = this.solPubKey;
739
-
740
1144
  // -------------------------------------------------------------
741
1145
  // 1) Current wallet balance (prefer caller override)
742
1146
  // -------------------------------------------------------------
743
1147
  const balanceLamports: bigint =
744
1148
  options?.balanceOverrideLamports ??
745
- BigInt(await this.connection.getBalance(payer, commitment));
1149
+ BigInt(await this.connection.getBalance(this.feePayer, commitment));
746
1150
 
747
1151
  if (balanceLamports <= BigInt(0)) {
748
1152
  return BigInt(0);
@@ -853,7 +1257,7 @@ export class SolanaStakingClient implements IStakingClient {
853
1257
  return this.cachedTxFee.value;
854
1258
  }
855
1259
 
856
- const payer = this.solPubKey;
1260
+ const payer = this.feePayer;
857
1261
 
858
1262
  const dummyIx = SystemProgram.transfer({
859
1263
  fromPubkey: payer,
@@ -879,102 +1283,5 @@ export class SolanaStakingClient implements IStakingClient {
879
1283
  return singleTxFeeLamports;
880
1284
  }
881
1285
 
882
- // ---------------------------------------------------------------------
883
- // Tx helpers
884
- // ---------------------------------------------------------------------
885
-
886
- /**
887
- * Send a signed transaction over HTTP RPC and wait for confirmation.
888
- * Throws if the transaction fails.
889
- */
890
- private async sendAndConfirmHttp(
891
- signed: SolanaTransaction,
892
- ctx: { blockhash: string; lastValidBlockHeight: number },
893
- ): Promise<string> {
894
- this.ensureUser();
895
-
896
- const signature = await this.connection.sendRawTransaction(
897
- signed.serialize(),
898
- {
899
- skipPreflight: false,
900
- preflightCommitment: commitment,
901
- maxRetries: 3,
902
- },
903
- );
904
-
905
- const conf = await this.connection.confirmTransaction(
906
- {
907
- signature,
908
- blockhash: ctx.blockhash,
909
- lastValidBlockHeight: ctx.lastValidBlockHeight,
910
- },
911
- commitment,
912
- );
913
-
914
- if (conf.value.err) {
915
- throw new Error(
916
- `Transaction failed: ${JSON.stringify(conf.value.err)}`,
917
- );
918
- }
919
-
920
- return signature;
921
- }
922
-
923
- /**
924
- * Sign a single Solana transaction using the connected wallet adapter.
925
- */
926
- async signTransaction(
927
- tx: SolanaTransaction,
928
- ): Promise<SolanaTransaction> {
929
- this.ensureUser();
930
- return this.anchor.wallet.signTransaction(tx);
931
- }
932
-
933
- /**
934
- * Generic "fire and forget" send helper if the caller already
935
- * prepared and signed the transaction.
936
- */
937
- async sendTransaction(
938
- signed: SolanaTransaction,
939
- ): Promise<TransactionSignature> {
940
- this.ensureUser();
941
- return this.anchor.sendAndConfirm(signed);
942
- }
943
-
944
- /**
945
- * Attach recent blockhash + fee payer to a transaction.
946
- * Required before signing and sending.
947
- */
948
- async prepareTx(
949
- tx: Transaction,
950
- ): Promise<{
951
- tx: Transaction;
952
- blockhash: string;
953
- lastValidBlockHeight: number;
954
- }> {
955
- const { blockhash, lastValidBlockHeight } =
956
- await this.connection.getLatestBlockhash('confirmed');
957
- tx.recentBlockhash = blockhash;
958
- tx.feePayer = this.solPubKey;
959
- return { tx, blockhash, lastValidBlockHeight };
960
- }
961
-
962
- /**
963
- * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
964
- * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
965
- */
966
- ensureUser() {
967
- if (!this.pubKey || !this.anchor.wallet.publicKey) {
968
- throw new Error('User Authorization required: pubKey is undefined');
969
- }
970
- if (
971
- this.solPubKey.toBase58() !==
972
- this.anchor.wallet.publicKey.toBase58()
973
- ) {
974
- throw new Error(
975
- 'Write access requires connected wallet to match pubKey',
976
- );
977
- }
978
- }
979
1286
 
980
- }
1287
+ }