@wireio/stake 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/lib/stake.browser.js +13027 -6773
  2. package/lib/stake.browser.js.map +1 -1
  3. package/lib/stake.d.ts +7627 -646
  4. package/lib/stake.js +13406 -7147
  5. package/lib/stake.js.map +1 -1
  6. package/lib/stake.m.js +13027 -6773
  7. package/lib/stake.m.js.map +1 -1
  8. package/package.json +4 -3
  9. package/src/assets/solana/mainnet/idl/liqsol_core.json +6166 -0
  10. package/src/assets/solana/mainnet/idl/liqsol_token.json +183 -0
  11. package/src/assets/solana/mainnet/idl/transfer_hook.json +197 -0
  12. package/src/assets/solana/mainnet/idl/validator_leaderboard.json +574 -0
  13. package/src/assets/solana/mainnet/types/liqsol_core.ts +6172 -0
  14. package/src/assets/solana/mainnet/types/liqsol_token.ts +189 -0
  15. package/src/assets/solana/mainnet/types/transfer_hook.ts +203 -0
  16. package/src/assets/solana/mainnet/types/validator_leaderboard.ts +580 -0
  17. package/src/networks/ethereum/clients/convert.client.ts +30 -1
  18. package/src/networks/ethereum/clients/opp.client.ts +20 -21
  19. package/src/networks/ethereum/clients/receipt.client.ts +89 -4
  20. package/src/networks/ethereum/clients/stake.client.ts +1 -0
  21. package/src/networks/ethereum/contract.ts +260 -222
  22. package/src/networks/ethereum/ethereum.ts +121 -104
  23. package/src/networks/ethereum/types.ts +17 -2
  24. package/src/networks/solana/clients/deposit.client.ts +294 -65
  25. package/src/networks/solana/clients/distribution.client.ts +13 -18
  26. package/src/networks/solana/clients/leaderboard.client.ts +9 -11
  27. package/src/networks/solana/clients/outpost.client.ts +11 -10
  28. package/src/networks/solana/clients/token.client.ts +11 -13
  29. package/src/networks/solana/constants.ts +44 -285
  30. package/src/networks/solana/program.ts +365 -26
  31. package/src/networks/solana/solana.ts +213 -69
  32. package/src/networks/solana/types.ts +4 -4
  33. package/src/networks/solana/utils.ts +16 -301
  34. package/src/staker.ts +11 -2
  35. package/src/types.ts +19 -6
  36. /package/src/assets/ethereum/{ABI → mainnet}/common/Base58.sol/Base58.dbg.json +0 -0
  37. /package/src/assets/ethereum/{ABI → mainnet}/common/Base58.sol/Base58.json +0 -0
  38. /package/src/assets/ethereum/{ABI → mainnet}/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +0 -0
  39. /package/src/assets/ethereum/{ABI → mainnet}/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +0 -0
  40. /package/src/assets/ethereum/{ABI → mainnet}/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +0 -0
  41. /package/src/assets/ethereum/{ABI → mainnet}/common/RestrictedCallers.sol/RestrictedCallers.json +0 -0
  42. /package/src/assets/ethereum/{ABI → mainnet}/common/iodata.sol/iodata.dbg.json +0 -0
  43. /package/src/assets/ethereum/{ABI → mainnet}/common/iodata.sol/iodata.json +0 -0
  44. /package/src/assets/ethereum/{ABI → mainnet}/common/iodata_util.sol/iodata_util.dbg.json +0 -0
  45. /package/src/assets/ethereum/{ABI → mainnet}/common/iodata_util.sol/iodata_util.json +0 -0
  46. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_data.sol/sysio_data.dbg.json +0 -0
  47. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_data.sol/sysio_data.json +0 -0
  48. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_errors.sol/sysio_errors.dbg.json +0 -0
  49. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_errors.sol/sysio_errors.json +0 -0
  50. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_merkle.sol/sysio_merkle.dbg.json +0 -0
  51. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_merkle.sol/sysio_merkle.json +0 -0
  52. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_name.sol/sysio_name.dbg.json +0 -0
  53. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_name.sol/sysio_name.json +0 -0
  54. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +0 -0
  55. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_pubkey.sol/sysio_pubkey.json +0 -0
  56. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_read.sol/sysio_read.dbg.json +0 -0
  57. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_read.sol/sysio_read.json +0 -0
  58. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_tester.sol/SysioTester.dbg.json +0 -0
  59. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_tester.sol/SysioTester.json +0 -0
  60. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_verify.sol/sysio_verify.dbg.json +0 -0
  61. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_verify.sol/sysio_verify.json +0 -0
  62. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_write.sol/sysio_write.dbg.json +0 -0
  63. /package/src/assets/ethereum/{ABI → mainnet}/common/sysio_write.sol/sysio_write.json +0 -0
  64. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/BeaconState.sol/BeaconState.dbg.json +0 -0
  65. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/BeaconState.sol/BeaconState.json +0 -0
  66. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/DepositManager.sol/DepositManager.dbg.json +0 -0
  67. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/DepositManager.sol/DepositManager.json +0 -0
  68. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +0 -0
  69. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +0 -0
  70. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +0 -0
  71. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IAccounting.json +0 -0
  72. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +0 -0
  73. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IDepositContract.json +0 -0
  74. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +0 -0
  75. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IDepositManager.json +0 -0
  76. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +0 -0
  77. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +0 -0
  78. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +0 -0
  79. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IRewardsERC20.json +0 -0
  80. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +0 -0
  81. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +0 -0
  82. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +0 -0
  83. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IStakingModule.json +0 -0
  84. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +0 -0
  85. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +0 -0
  86. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +0 -0
  87. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +0 -0
  88. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +0 -0
  89. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthCommon.sol/LiqEthCommon.json +0 -0
  90. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +0 -0
  91. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/LiqEthManaged.sol/LiqEthManaged.json +0 -0
  92. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +0 -0
  93. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.json +0 -0
  94. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +0 -0
  95. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +0 -0
  96. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/Yield.sol/YieldOracle.dbg.json +0 -0
  97. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/Yield.sol/YieldOracle.json +0 -0
  98. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/accounting.sol/Accounting.dbg.json +0 -0
  99. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/accounting.sol/Accounting.json +0 -0
  100. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/liqEth.sol/LiqEthToken.dbg.json +0 -0
  101. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/liqEth.sol/LiqEthToken.json +0 -0
  102. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/stakingModule.sol/StakingModule.dbg.json +0 -0
  103. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/stakingModule.sol/StakingModule.json +0 -0
  104. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +0 -0
  105. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +0 -0
  106. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +0 -0
  107. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalVault.sol/Uint64BE.json +0 -0
  108. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +0 -0
  109. /package/src/assets/ethereum/{ABI → mainnet}/liqEth/withdrawalVault.sol/WithdrawalVault.json +0 -0
  110. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Aggregator.sol/Aggregator.json +0 -0
  111. /package/src/assets/ethereum/{ABI → mainnet}/outpost/BAR.sol/BAR.dbg.json +0 -0
  112. /package/src/assets/ethereum/{ABI → mainnet}/outpost/BAR.sol/BAR.json +0 -0
  113. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Depositor.sol/Depositor.dbg.json +0 -0
  114. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Depositor.sol/Depositor.json +0 -0
  115. /package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +0 -0
  116. /package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +0 -0
  117. /package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +0 -0
  118. /package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +0 -0
  119. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPP.sol/OPP.dbg.json +0 -0
  120. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPP.sol/OPP.json +0 -0
  121. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPP.dbg.json +0 -0
  122. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPP.json +0 -0
  123. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +0 -0
  124. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPEndpoint.json +0 -0
  125. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPInbound.dbg.json +0 -0
  126. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPInbound.json +0 -0
  127. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +0 -0
  128. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPReceiver.json +0 -0
  129. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPSender.dbg.json +0 -0
  130. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPSender.json +0 -0
  131. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/OPPCommon.dbg.json +0 -0
  132. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/OPPCommon.json +0 -0
  133. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +0 -0
  134. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpoint.sol/OPPEndpoint.json +0 -0
  135. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +0 -0
  136. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +0 -0
  137. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +0 -0
  138. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +0 -0
  139. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPErrors.sol/OPPErrors.dbg.json +0 -0
  140. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPErrors.sol/OPPErrors.json +0 -0
  141. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPInbound.sol/OPPInbound.dbg.json +0 -0
  142. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPInbound.sol/OPPInbound.json +0 -0
  143. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +0 -0
  144. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPReceiver.sol/OPPReceiver.json +0 -0
  145. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPSender.sol/OPPSender.dbg.json +0 -0
  146. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPSender.sol/OPPSender.json +0 -0
  147. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +0 -0
  148. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostErrors.sol/OutpostErrors.json +0 -0
  149. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +0 -0
  150. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManaged.sol/OutpostManaged.json +0 -0
  151. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManager.sol/OutpostManager.dbg.json +0 -0
  152. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManager.sol/OutpostManager.json +0 -0
  153. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +0 -0
  154. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +0 -0
  155. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +0 -0
  156. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostManager.json +0 -0
  157. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +0 -0
  158. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +0 -0
  159. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +0 -0
  160. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.json +0 -0
  161. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +0 -0
  162. /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostOwnable.sol/OutpostOwnable.json +0 -0
  163. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Pool.sol/Pool.dbg.json +0 -0
  164. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Pool.sol/Pool.json +0 -0
  165. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Pretoken.sol/Pretoken.dbg.json +0 -0
  166. /package/src/assets/ethereum/{ABI → mainnet}/outpost/Pretoken.sol/Pretoken.json +0 -0
  167. /package/src/assets/ethereum/{ABI → mainnet}/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +0 -0
  168. /package/src/assets/ethereum/{ABI → mainnet}/outpost/ReceiptNFT.sol/ReceiptNFT.json +0 -0
  169. /package/src/assets/ethereum/{ABI → mainnet}/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +0 -0
  170. /package/src/assets/ethereum/{ABI → mainnet}/outpost/interfaces/IPretoken.sol/IPretoken.json +0 -0
  171. /package/src/assets/ethereum/{ABI → mainnet}/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +0 -0
  172. /package/src/assets/ethereum/{ABI → mainnet}/outpost/interfaces/IWarrant.sol/IWarrant.json +0 -0
  173. /package/src/assets/ethereum/{ABI → mainnet}/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +0 -0
  174. /package/src/assets/ethereum/{ABI → mainnet}/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +0 -0
  175. /package/src/assets/ethereum/{ABI → mainnet}/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +0 -0
  176. /package/src/assets/ethereum/{ABI → mainnet}/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +0 -0
  177. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC1155Token.sol/ERC1155Token.dbg.json +0 -0
  178. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC1155Token.sol/ERC1155Token.json +0 -0
  179. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC20Token.sol/ERC20Token.dbg.json +0 -0
  180. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC20Token.sol/ERC20Token.json +0 -0
  181. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC721Token.sol/ERC721Token.dbg.json +0 -0
  182. /package/src/assets/ethereum/{ABI → mainnet}/token/ERC721Token.sol/ERC721Token.json +0 -0
  183. /package/src/assets/solana/{idl → devnet/idl}/liqsol_core.json +0 -0
  184. /package/src/assets/solana/{idl → devnet/idl}/liqsol_token.json +0 -0
  185. /package/src/assets/solana/{idl → devnet/idl}/transfer_hook.json +0 -0
  186. /package/src/assets/solana/{idl → devnet/idl}/validator_leaderboard.json +0 -0
  187. /package/src/assets/solana/{types → devnet/types}/liqsol_core.ts +0 -0
  188. /package/src/assets/solana/{types → devnet/types}/liqsol_token.ts +0 -0
  189. /package/src/assets/solana/{types → devnet/types}/transfer_hook.ts +0 -0
  190. /package/src/assets/solana/{types → devnet/types}/validator_leaderboard.ts +0 -0
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Program IDL in camelCase format in order to be used in JS/TS.
3
+ *
4
+ * Note that this is only a type helper and is not the actual IDL. The original
5
+ * IDL can be found at `target/idl/liqsol_token.json`.
6
+ */
7
+ export type LiqsolToken = {
8
+ "address": "5MRFSLCkXPEzfR6gkcZCVttq9g83mMUHyTZ85Z3TSpvU",
9
+ "metadata": {
10
+ "name": "liqsolToken",
11
+ "version": "0.1.0",
12
+ "spec": "0.1.0",
13
+ "description": "Liquidity Staking Token Program"
14
+ },
15
+ "instructions": [
16
+ {
17
+ "name": "createMintAccount",
18
+ "discriminator": [
19
+ 76,
20
+ 184,
21
+ 50,
22
+ 62,
23
+ 162,
24
+ 141,
25
+ 47,
26
+ 103
27
+ ],
28
+ "accounts": [
29
+ {
30
+ "name": "payer",
31
+ "writable": true,
32
+ "signer": true
33
+ },
34
+ {
35
+ "name": "mintAuthority"
36
+ },
37
+ {
38
+ "name": "receiver"
39
+ },
40
+ {
41
+ "name": "mint",
42
+ "docs": [
43
+ "The mint PDA - deterministic address for liqSOL token"
44
+ ],
45
+ "writable": true
46
+ },
47
+ {
48
+ "name": "mintTokenAccount",
49
+ "writable": true
50
+ },
51
+ {
52
+ "name": "systemProgram"
53
+ },
54
+ {
55
+ "name": "associatedTokenProgram"
56
+ },
57
+ {
58
+ "name": "tokenProgram"
59
+ }
60
+ ],
61
+ "args": [
62
+ {
63
+ "name": "args",
64
+ "type": {
65
+ "defined": {
66
+ "name": "createMintAccountArgs"
67
+ }
68
+ }
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "name": "mintForAuthorizedProgram",
74
+ "discriminator": [
75
+ 116,
76
+ 208,
77
+ 64,
78
+ 189,
79
+ 2,
80
+ 60,
81
+ 50,
82
+ 41
83
+ ],
84
+ "accounts": [
85
+ {
86
+ "name": "mint",
87
+ "writable": true
88
+ },
89
+ {
90
+ "name": "recipientTokenAccount",
91
+ "writable": true
92
+ },
93
+ {
94
+ "name": "programAuthority",
95
+ "docs": [
96
+ "The calling program's authority PDA that proves authorization to mint"
97
+ ],
98
+ "writable": true,
99
+ "signer": true
100
+ },
101
+ {
102
+ "name": "mintAuthority"
103
+ },
104
+ {
105
+ "name": "instructions"
106
+ },
107
+ {
108
+ "name": "tokenProgram"
109
+ }
110
+ ],
111
+ "args": [
112
+ {
113
+ "name": "args",
114
+ "type": {
115
+ "defined": {
116
+ "name": "mintTokenArgs"
117
+ }
118
+ }
119
+ }
120
+ ]
121
+ }
122
+ ],
123
+ "errors": [
124
+ {
125
+ "code": 6000,
126
+ "name": "invalidMintAuthority",
127
+ "msg": "Invalid mint authority"
128
+ },
129
+ {
130
+ "code": 6001,
131
+ "name": "unauthorizedProgram",
132
+ "msg": "Unauthorized program attempting to mint"
133
+ },
134
+ {
135
+ "code": 6002,
136
+ "name": "cannotDetermineCallingProgram",
137
+ "msg": "Cannot determine calling program"
138
+ },
139
+ {
140
+ "code": 6003,
141
+ "name": "directCallNotAllowed",
142
+ "msg": "Direct calls not allowed, must be called via CPI"
143
+ },
144
+ {
145
+ "code": 6004,
146
+ "name": "invalidProgramId",
147
+ "msg": "Invalid program ID"
148
+ },
149
+ {
150
+ "code": 6005,
151
+ "name": "unauthorizedAuthority",
152
+ "msg": "Unauthorized authority PDA"
153
+ }
154
+ ],
155
+ "types": [
156
+ {
157
+ "name": "createMintAccountArgs",
158
+ "type": {
159
+ "kind": "struct",
160
+ "fields": [
161
+ {
162
+ "name": "name",
163
+ "type": "string"
164
+ },
165
+ {
166
+ "name": "symbol",
167
+ "type": "string"
168
+ },
169
+ {
170
+ "name": "uri",
171
+ "type": "string"
172
+ }
173
+ ]
174
+ }
175
+ },
176
+ {
177
+ "name": "mintTokenArgs",
178
+ "type": {
179
+ "kind": "struct",
180
+ "fields": [
181
+ {
182
+ "name": "amount",
183
+ "type": "u64"
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ ]
189
+ };
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Program IDL in camelCase format in order to be used in JS/TS.
3
+ *
4
+ * Note that this is only a type helper and is not the actual IDL. The original
5
+ * IDL can be found at `target/idl/transfer_hook.json`.
6
+ */
7
+ export type TransferHook = {
8
+ "address": "HbBpH9opFW9gcYVanHLweKuHhWQ8P3Kcc1mbpAx1vojz",
9
+ "metadata": {
10
+ "name": "transferHook",
11
+ "version": "0.1.0",
12
+ "spec": "0.1.0",
13
+ "description": "Created with Anchor"
14
+ },
15
+ "instructions": [
16
+ {
17
+ "name": "initializeExtraAccountMetaList",
18
+ "discriminator": [
19
+ 43,
20
+ 34,
21
+ 13,
22
+ 49,
23
+ 167,
24
+ 88,
25
+ 235,
26
+ 235
27
+ ],
28
+ "accounts": [
29
+ {
30
+ "name": "payer",
31
+ "writable": true,
32
+ "signer": true
33
+ },
34
+ {
35
+ "name": "extraAccountMetaList",
36
+ "writable": true
37
+ },
38
+ {
39
+ "name": "mint"
40
+ },
41
+ {
42
+ "name": "systemProgram"
43
+ },
44
+ {
45
+ "name": "liqsolCore"
46
+ }
47
+ ],
48
+ "args": []
49
+ },
50
+ {
51
+ "name": "transferHook",
52
+ "discriminator": [
53
+ 105,
54
+ 37,
55
+ 101,
56
+ 197,
57
+ 75,
58
+ 251,
59
+ 102,
60
+ 26
61
+ ],
62
+ "accounts": [
63
+ {
64
+ "name": "sourceToken"
65
+ },
66
+ {
67
+ "name": "mint"
68
+ },
69
+ {
70
+ "name": "destinationToken"
71
+ },
72
+ {
73
+ "name": "authority"
74
+ },
75
+ {
76
+ "name": "extraAccountMetaList"
77
+ },
78
+ {
79
+ "name": "liqsolCore"
80
+ },
81
+ {
82
+ "name": "senderUserRecord",
83
+ "writable": true
84
+ },
85
+ {
86
+ "name": "receiverUserRecord",
87
+ "writable": true
88
+ },
89
+ {
90
+ "name": "distributionState",
91
+ "writable": true
92
+ },
93
+ {
94
+ "name": "bucketTokenAccount"
95
+ }
96
+ ],
97
+ "args": [
98
+ {
99
+ "name": "amount",
100
+ "type": "u64"
101
+ }
102
+ ]
103
+ }
104
+ ],
105
+ "accounts": [
106
+ {
107
+ "name": "distributionState",
108
+ "discriminator": [
109
+ 7,
110
+ 25,
111
+ 94,
112
+ 15,
113
+ 208,
114
+ 170,
115
+ 4,
116
+ 103
117
+ ]
118
+ }
119
+ ],
120
+ "errors": [
121
+ {
122
+ "code": 6000,
123
+ "name": "amountTooBig"
124
+ },
125
+ {
126
+ "code": 6001,
127
+ "name": "isNotCurrentlyTransferring"
128
+ },
129
+ {
130
+ "code": 6002,
131
+ "name": "tlvAccountResolutionError"
132
+ },
133
+ {
134
+ "code": 6003,
135
+ "name": "cannotTransferToBucket",
136
+ "msg": "Cannot transfer liqSOL directly to bucket - only protocol minting is allowed"
137
+ }
138
+ ],
139
+ "types": [
140
+ {
141
+ "name": "distributionState",
142
+ "type": {
143
+ "kind": "struct",
144
+ "fields": [
145
+ {
146
+ "name": "liqsolMint",
147
+ "type": "pubkey"
148
+ },
149
+ {
150
+ "name": "currentIndex",
151
+ "type": "u64"
152
+ },
153
+ {
154
+ "name": "totalShares",
155
+ "docs": [
156
+ "Sum of all user shares across the system"
157
+ ],
158
+ "type": "u64"
159
+ },
160
+ {
161
+ "name": "lastBucketBalance",
162
+ "docs": [
163
+ "Last observed bucket balance used for incremental index updates"
164
+ ],
165
+ "type": "u64"
166
+ },
167
+ {
168
+ "name": "bump",
169
+ "type": "u8"
170
+ },
171
+ {
172
+ "name": "bucketBump",
173
+ "docs": [
174
+ "Cached bucket authority bump to avoid repeated find_program_address calls"
175
+ ],
176
+ "type": "u8"
177
+ },
178
+ {
179
+ "name": "poolBump",
180
+ "docs": [
181
+ "Cached pool authority bump to avoid repeated find_program_address calls"
182
+ ],
183
+ "type": "u8"
184
+ },
185
+ {
186
+ "name": "bucketAuthority",
187
+ "docs": [
188
+ "Cached bucket authority pubkey for transfer-hook optimization"
189
+ ],
190
+ "type": "pubkey"
191
+ },
192
+ {
193
+ "name": "poolAuthority",
194
+ "docs": [
195
+ "Cached pool authority pubkey for transfer-hook optimization"
196
+ ],
197
+ "type": "pubkey"
198
+ }
199
+ ]
200
+ }
201
+ }
202
+ ]
203
+ };