@berachain/berajs 0.2.13 → 0.3.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 (413) hide show
  1. package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -1
  2. package/dist/actions/clients/clientName.d.ts +10 -0
  3. package/dist/actions/clients/clientName.d.ts.map +1 -0
  4. package/dist/actions/clients/exports.d.ts +2 -0
  5. package/dist/actions/clients/exports.d.ts.map +1 -1
  6. package/dist/actions/clients/exports.mjs +26 -7
  7. package/dist/actions/clients/exports.mjs.map +1 -1
  8. package/dist/actions/clients/fetchBeep.d.ts.map +1 -1
  9. package/dist/actions/clients/fetchEnso.d.ts +17 -0
  10. package/dist/actions/clients/fetchEnso.d.ts.map +1 -0
  11. package/dist/actions/clients/fetchLayerzero.d.ts +12 -0
  12. package/dist/actions/clients/fetchLayerzero.d.ts.map +1 -0
  13. package/dist/actions/clients/fetchOpenApi.d.ts +4 -1
  14. package/dist/actions/clients/fetchOpenApi.d.ts.map +1 -1
  15. package/dist/actions/clients/getApolloClient.d.ts.map +1 -1
  16. package/dist/actions/dex/aggregators/base.d.ts +30 -5
  17. package/dist/actions/dex/aggregators/base.d.ts.map +1 -1
  18. package/dist/actions/dex/aggregators/bex.d.ts +11 -1
  19. package/dist/actions/dex/aggregators/bex.d.ts.map +1 -1
  20. package/dist/actions/dex/aggregators/bgt.d.ts +2 -2
  21. package/dist/actions/dex/aggregators/bgt.d.ts.map +1 -1
  22. package/dist/actions/dex/aggregators/enso/enso.d.ts.map +1 -1
  23. package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts +1 -0
  24. package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts.map +1 -1
  25. package/dist/actions/dex/aggregators/erc4626.d.ts +2 -2
  26. package/dist/actions/dex/aggregators/erc4626.d.ts.map +1 -1
  27. package/dist/actions/dex/aggregators/fly.d.ts.map +1 -1
  28. package/dist/actions/dex/aggregators/haiku.d.ts +7 -1
  29. package/dist/actions/dex/aggregators/haiku.d.ts.map +1 -1
  30. package/dist/actions/dex/aggregators/honey.d.ts +2 -2
  31. package/dist/actions/dex/aggregators/honey.d.ts.map +1 -1
  32. package/dist/actions/dex/aggregators/kyberswap.d.ts.map +1 -1
  33. package/dist/actions/dex/aggregators/oogabooga.d.ts.map +1 -1
  34. package/dist/actions/dex/aggregators/openOcean.d.ts.map +1 -1
  35. package/dist/actions/dex/aggregators/wbera.d.ts +3 -2
  36. package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -1
  37. package/dist/actions/dex/getAllPools.d.ts.map +1 -1
  38. package/dist/actions/dex/getApiPool.d.ts.map +1 -1
  39. package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -1
  40. package/dist/actions/enso/util.d.ts +1 -6
  41. package/dist/actions/enso/util.d.ts.map +1 -1
  42. package/dist/actions/exports.d.ts +3 -5
  43. package/dist/actions/exports.d.ts.map +1 -1
  44. package/dist/actions/exports.mjs +31 -50
  45. package/dist/actions/exports.mjs.map +1 -1
  46. package/dist/actions/governance/exports.mjs +3 -3
  47. package/dist/actions/honey/getHoney24hVolume.d.ts +2 -2
  48. package/dist/actions/honey/getHoney24hVolume.d.ts.map +1 -1
  49. package/dist/actions/honey/getHoneyCollaterals.d.ts +1 -1
  50. package/dist/actions/honey/getHoneyCollaterals.d.ts.map +1 -1
  51. package/dist/actions/pol/getEarnedStakedBeraVault.d.ts +0 -23
  52. package/dist/actions/pol/getEarnedStakedBeraVault.d.ts.map +1 -1
  53. package/dist/actions/pol/getLSTStakeConfig.d.ts.map +1 -1
  54. package/dist/actions/pol/getSWBeraVaultMetadata.d.ts +1 -14
  55. package/dist/actions/pol/getSWBeraVaultMetadata.d.ts.map +1 -1
  56. package/dist/actions/pol/getStakedBeraAPY.d.ts +14 -0
  57. package/dist/actions/pol/getStakedBeraAPY.d.ts.map +1 -0
  58. package/dist/actions/pol/getStakedBeraSnapshots.d.ts +14 -4
  59. package/dist/actions/pol/getStakedBeraSnapshots.d.ts.map +1 -1
  60. package/dist/actions/pol/getStakingDailyAssets.d.ts +2 -2
  61. package/dist/actions/pol/getStakingDailyAssets.d.ts.map +1 -1
  62. package/dist/actions/server/exports.mjs +5 -5
  63. package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts +1 -1
  64. package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts.map +1 -1
  65. package/dist/actions/validators/getUserActiveValidators.d.ts +37 -1
  66. package/dist/actions/validators/getUserActiveValidators.d.ts.map +1 -1
  67. package/dist/actions/validators/getValidatorRewardAllocation.d.ts +4 -0
  68. package/dist/actions/validators/getValidatorRewardAllocation.d.ts.map +1 -1
  69. package/dist/{chunk-ZWTGVIPJ.mjs → chunk-4576RF2K.mjs} +29 -4
  70. package/dist/chunk-4576RF2K.mjs.map +1 -0
  71. package/dist/{chunk-UA3Z47LT.mjs → chunk-5PBYMJRG.mjs} +95 -24
  72. package/dist/chunk-5PBYMJRG.mjs.map +1 -0
  73. package/dist/{chunk-AEN6IJFU.mjs → chunk-7KN7TDUC.mjs} +2 -2
  74. package/dist/chunk-7OESHTBN.mjs +29 -0
  75. package/dist/chunk-7OESHTBN.mjs.map +1 -0
  76. package/dist/{chunk-IFNIPVTZ.mjs → chunk-BSLXKPX4.mjs} +4 -48
  77. package/dist/chunk-BSLXKPX4.mjs.map +1 -0
  78. package/dist/{chunk-PHYZRH4I.mjs → chunk-BZKA6DBM.mjs} +9 -13
  79. package/dist/chunk-BZKA6DBM.mjs.map +1 -0
  80. package/dist/{chunk-LE4CYW7S.mjs → chunk-FWRYUIJK.mjs} +3 -3
  81. package/dist/{chunk-PJRLHTGC.mjs → chunk-HPRLNT6R.mjs} +3 -3
  82. package/dist/chunk-J6GM7HWX.mjs +19 -0
  83. package/dist/chunk-J6GM7HWX.mjs.map +1 -0
  84. package/dist/{chunk-P3YZ7F22.mjs → chunk-LL7XR2H5.mjs} +34 -3
  85. package/dist/chunk-LL7XR2H5.mjs.map +1 -0
  86. package/dist/{chunk-EJIGERYM.mjs → chunk-M3MIGSH3.mjs} +2 -2
  87. package/dist/{chunk-NZAH3SGT.mjs → chunk-MVNQY2D4.mjs} +9 -4
  88. package/dist/chunk-MVNQY2D4.mjs.map +1 -0
  89. package/dist/{chunk-TGN55GKE.mjs → chunk-SC3BSCTN.mjs} +2 -2
  90. package/dist/{chunk-DOZJB6IJ.mjs → chunk-SMBAW7AG.mjs} +394 -344
  91. package/dist/chunk-SMBAW7AG.mjs.map +1 -0
  92. package/dist/{chunk-QQASX4LJ.mjs → chunk-TXWDUJOY.mjs} +2 -2
  93. package/dist/{chunk-EGAB6NFQ.mjs → chunk-UWJQ6UKG.mjs} +2 -2
  94. package/dist/chunk-XO2BFPTB.mjs +50 -0
  95. package/dist/chunk-XO2BFPTB.mjs.map +1 -0
  96. package/dist/{chunk-7TFV6UKF.mjs → chunk-XXKPXNQD.mjs} +1 -2
  97. package/dist/chunk-XXKPXNQD.mjs.map +1 -0
  98. package/dist/{chunk-J3LTASDE.mjs → chunk-ZHV3MQ4F.mjs} +4 -4
  99. package/dist/contexts/BeraFlags/BeraFlags.d.ts +1 -1
  100. package/dist/contexts/BeraFlags/BeraFlags.d.ts.map +1 -1
  101. package/dist/contexts/BeraFlags/defaultFlags.d.ts +2 -2
  102. package/dist/contexts/BeraFlags/defaultFlags.d.ts.map +1 -1
  103. package/dist/contexts/BexStatusProvider.d.ts +1 -1
  104. package/dist/contexts/BexStatusProvider.d.ts.map +1 -1
  105. package/dist/contexts/TokensProvider.d.ts +1 -1
  106. package/dist/contexts/TokensProvider.d.ts.map +1 -1
  107. package/dist/contexts/exports.mjs +9 -9
  108. package/dist/enum/contracts.d.ts +3 -0
  109. package/dist/enum/contracts.d.ts.map +1 -1
  110. package/dist/enum/exports.mjs +6 -4
  111. package/dist/enum/exports.mjs.map +1 -1
  112. package/dist/errors/RequestError.d.ts +19 -0
  113. package/dist/errors/RequestError.d.ts.map +1 -1
  114. package/dist/errors/errorMap.d.ts +4 -3
  115. package/dist/errors/errorMap.d.ts.map +1 -1
  116. package/dist/errors/exports.mjs +5 -5
  117. package/dist/hooks/dex/useAggregatorsQuotes.d.ts.map +1 -1
  118. package/dist/hooks/dex/useAllUserPools.d.ts.map +1 -1
  119. package/dist/hooks/dex/useCrossChainNativeFee.d.ts +32 -0
  120. package/dist/hooks/dex/useCrossChainNativeFee.d.ts.map +1 -0
  121. package/dist/hooks/dex/useOnChainPoolData.d.ts.map +1 -1
  122. package/dist/hooks/dex/usePools.d.ts.map +1 -1
  123. package/dist/hooks/dex/useSingleAggregatorQuote.d.ts.map +1 -1
  124. package/dist/hooks/enso/useBendZapSupply.d.ts +2 -2
  125. package/dist/hooks/enso/useBendZapSupply.d.ts.map +1 -1
  126. package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts.map +1 -1
  127. package/dist/hooks/exports.d.ts +2 -5
  128. package/dist/hooks/exports.d.ts.map +1 -1
  129. package/dist/hooks/exports.mjs +590 -905
  130. package/dist/hooks/exports.mjs.map +1 -1
  131. package/dist/hooks/governance/exports.mjs +4 -4
  132. package/dist/hooks/honey/useHoneyChartData.d.ts.map +1 -1
  133. package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts.map +1 -1
  134. package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts.map +1 -1
  135. package/dist/hooks/pol/useRewardVaults.d.ts.map +1 -1
  136. package/dist/hooks/pol/useStakedAPY.d.ts +11 -0
  137. package/dist/hooks/pol/useStakedAPY.d.ts.map +1 -0
  138. package/dist/hooks/pol/useStakedData.d.ts +2 -2
  139. package/dist/hooks/pol/useStakedData.d.ts.map +1 -1
  140. package/dist/hooks/pol/useStakingVaultsMetadata.d.ts +0 -1
  141. package/dist/hooks/pol/useStakingVaultsMetadata.d.ts.map +1 -1
  142. package/dist/hooks/tokens/useMultipleTokenInformation.d.ts +30 -0
  143. package/dist/hooks/tokens/useMultipleTokenInformation.d.ts.map +1 -1
  144. package/dist/hooks/tokens/usePollBalance.d.ts.map +1 -1
  145. package/dist/hooks/validators/useUserActiveValidators.d.ts +5 -0
  146. package/dist/hooks/validators/useUserActiveValidators.d.ts.map +1 -1
  147. package/dist/hooks/validators/useValidator.d.ts.map +1 -1
  148. package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts +3 -4
  149. package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts.map +1 -1
  150. package/dist/hooks/validators/useValidatorRewardAllocation.d.ts +1 -0
  151. package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -1
  152. package/dist/utils/crossChainBridge.d.ts +74 -0
  153. package/dist/utils/crossChainBridge.d.ts.map +1 -0
  154. package/dist/utils/exports.d.ts +1 -1
  155. package/dist/utils/exports.d.ts.map +1 -1
  156. package/dist/utils/exports.mjs +142 -72
  157. package/dist/utils/exports.mjs.map +1 -1
  158. package/dist/utils/getTestClient.d.ts +5 -3
  159. package/dist/utils/getTestClient.d.ts.map +1 -1
  160. package/dist/utils/parseWhiskToken.d.ts.map +1 -1
  161. package/package.json +8 -6
  162. package/src/actions/clients/BeraApolloClient.ts +4 -2
  163. package/src/actions/clients/clientName.ts +17 -0
  164. package/src/actions/clients/clientName.unit.test.ts +39 -0
  165. package/src/actions/clients/exports.ts +2 -0
  166. package/src/actions/clients/fetchBeep.ts +4 -1
  167. package/src/actions/clients/fetchEnso.ts +48 -0
  168. package/src/actions/clients/fetchLayerzero.ts +34 -0
  169. package/src/actions/clients/fetchOpenApi.ts +9 -2
  170. package/src/actions/clients/fetchOpenApi.unit.test.ts +26 -10
  171. package/src/actions/clients/getApolloClient.ts +3 -11
  172. package/src/actions/dex/__tests__/aggregators.unit.test.ts +231 -2
  173. package/src/actions/dex/aggregators/base.ts +75 -17
  174. package/src/actions/dex/aggregators/bex.ts +41 -1
  175. package/src/actions/dex/aggregators/bgt.ts +11 -6
  176. package/src/actions/dex/aggregators/enso/enso.ts +1 -0
  177. package/src/actions/dex/aggregators/enso/ensoErc4626.ts +27 -9
  178. package/src/actions/dex/aggregators/erc4626.ts +19 -5
  179. package/src/actions/dex/aggregators/fly.ts +1 -0
  180. package/src/actions/dex/aggregators/haiku.ts +33 -2
  181. package/src/actions/dex/aggregators/honey.ts +17 -6
  182. package/src/actions/dex/aggregators/kyberswap.ts +1 -0
  183. package/src/actions/dex/aggregators/oogabooga.ts +1 -0
  184. package/src/actions/dex/aggregators/openOcean.ts +1 -0
  185. package/src/actions/dex/aggregators/wbera.ts +17 -11
  186. package/src/actions/enso/getBendMultiplyBundle.ts +1 -1
  187. package/src/actions/enso/getEnsoUserTokensWithBalances.ts +4 -8
  188. package/src/actions/enso/util.ts +0 -59
  189. package/src/actions/exports.ts +3 -5
  190. package/src/actions/honey/getHoney24hVolume.ts +3 -12
  191. package/src/actions/honey/getHoneyCollaterals.ts +1 -1
  192. package/src/actions/pol/getBeraTokenTotalSupply.ts +3 -33
  193. package/src/actions/pol/getLSTStakeConfig.ts +0 -6
  194. package/src/actions/pol/getSWBeraVaultMetadata.ts +2 -106
  195. package/src/actions/pol/getStakedBeraAPY.ts +45 -0
  196. package/src/actions/pol/getStakedBeraSnapshots.ts +18 -34
  197. package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts +1 -1
  198. package/src/actions/validators/getUserActiveValidators.ts +116 -54
  199. package/src/actions/validators/getValidatorRewardAllocation.ts +12 -1
  200. package/src/contexts/BeraFlags/BeraFlags.tsx +1 -4
  201. package/src/contexts/BeraFlags/defaultFlags.ts +1 -3
  202. package/src/contexts/BexStatusProvider.tsx +1 -1
  203. package/src/contexts/TokensProvider.tsx +1 -4
  204. package/src/enum/contracts.ts +3 -0
  205. package/src/errors/BeraError.unit.test.ts +23 -0
  206. package/src/errors/RequestError.ts +46 -9
  207. package/src/errors/RequestError.unit.test.ts +54 -0
  208. package/src/errors/errorMap.ts +8 -3
  209. package/src/errors/getErrorMessage.unit.test.ts +32 -0
  210. package/src/hooks/dex/useAggregatorsQuotes.ts +7 -1
  211. package/src/hooks/dex/useCrossChainNativeFee.ts +83 -0
  212. package/src/hooks/dex/useCrossChainNativeFee.unit.test.ts +63 -0
  213. package/src/hooks/dex/useOnChainPoolData.ts +30 -13
  214. package/src/hooks/dex/useSingleAggregatorQuote.ts +4 -2
  215. package/src/hooks/enso/useBendZapSupply.ts +9 -38
  216. package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +10 -2
  217. package/src/hooks/enso/useZapStakeBera.ts +1 -1
  218. package/src/hooks/exports.ts +2 -5
  219. package/src/hooks/pol/useAutoclaimedIncentives.ts +6 -3
  220. package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +5 -2
  221. package/src/hooks/pol/useRewardTokenToBeraRate.ts +5 -4
  222. package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +0 -1
  223. package/src/hooks/pol/{useStakedAPR.ts → useStakedAPY.ts} +11 -9
  224. package/src/hooks/pol/useStakedData.ts +13 -14
  225. package/src/hooks/pol/useStakingVaultsMetadata.ts +3 -8
  226. package/src/hooks/tokens/useMultipleTokenInformation.ts +64 -21
  227. package/src/hooks/tokens/useMultipleTokenInformation.unit.test.ts +91 -0
  228. package/src/hooks/tokens/usePollBalance.ts +4 -2
  229. package/src/hooks/validators/useUserActiveValidators.ts +54 -9
  230. package/src/hooks/validators/useValidatorIncentiveDistribution.ts +3 -4
  231. package/src/types/bribeBoost.d.ts +0 -49
  232. package/src/types/dex.d.ts +17 -0
  233. package/src/types/enso.d.ts +1 -27
  234. package/src/types/global.d.ts +7 -0
  235. package/src/types/pol.d.ts +3 -48
  236. package/src/utils/crossChainBridge.ts +290 -0
  237. package/src/utils/crossChainBridge.unit.test.ts +177 -0
  238. package/src/utils/exports.ts +1 -1
  239. package/dist/BeraError-7-A5JYy_.d.ts +0 -123
  240. package/dist/BexStatusProvider-DRymVlQf.d.ts +0 -70
  241. package/dist/HoneyConfigProvider-COOuDNra.d.ts +0 -390
  242. package/dist/RequestError-DkUbo3ro.d.ts +0 -145
  243. package/dist/actions/clients/fetchOpenApi.unit.test.d.ts +0 -2
  244. package/dist/actions/clients/fetchOpenApi.unit.test.d.ts.map +0 -1
  245. package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts +0 -2
  246. package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts.map +0 -1
  247. package/dist/actions/dex/__tests__/allPools.integration.test.d.ts +0 -2
  248. package/dist/actions/dex/__tests__/allPools.integration.test.d.ts.map +0 -1
  249. package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts +0 -2
  250. package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts.map +0 -1
  251. package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts +0 -2
  252. package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts.map +0 -1
  253. package/dist/actions/dex/aggregators/haiku.integration.test.d.ts +0 -2
  254. package/dist/actions/dex/aggregators/haiku.integration.test.d.ts.map +0 -1
  255. package/dist/actions/dex/b-sdk.d.ts +0 -3
  256. package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts +0 -2
  257. package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts.map +0 -1
  258. package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts +0 -2
  259. package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts.map +0 -1
  260. package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts +0 -2
  261. package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts.map +0 -1
  262. package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts +0 -2
  263. package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts.map +0 -1
  264. package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts +0 -2
  265. package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts.map +0 -1
  266. package/dist/actions/enso/__tests__/util.unit.test.d.ts +0 -2
  267. package/dist/actions/enso/__tests__/util.unit.test.d.ts.map +0 -1
  268. package/dist/actions/enso/getEnsoSwapBundle.d.ts +0 -3
  269. package/dist/actions/enso/getEnsoSwapBundle.d.ts.map +0 -1
  270. package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts +0 -2
  271. package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts.map +0 -1
  272. package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts +0 -2
  273. package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts.map +0 -1
  274. package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts +0 -2
  275. package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts.map +0 -1
  276. package/dist/actions/honey/tests/pyth.integration.test.d.ts +0 -2
  277. package/dist/actions/honey/tests/pyth.integration.test.d.ts.map +0 -1
  278. package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts +0 -2
  279. package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts.map +0 -1
  280. package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts +0 -2
  281. package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts.map +0 -1
  282. package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts +0 -2
  283. package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts.map +0 -1
  284. package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts +0 -2
  285. package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts.map +0 -1
  286. package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts +0 -10
  287. package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts.map +0 -1
  288. package/dist/actions/pol/getBlockTime.debug.test.d.ts +0 -2
  289. package/dist/actions/pol/getBlockTime.debug.test.d.ts.map +0 -1
  290. package/dist/actions/pol/getRewardProofsByValidator.d.ts +0 -9
  291. package/dist/actions/pol/getRewardProofsByValidator.d.ts.map +0 -1
  292. package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts +0 -2
  293. package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts.map +0 -1
  294. package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts +0 -2
  295. package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts.map +0 -1
  296. package/dist/actions/pol/getStakedBeraAPR.d.ts +0 -12
  297. package/dist/actions/pol/getStakedBeraAPR.d.ts.map +0 -1
  298. package/dist/actions/pol/getUserClaimableIncentives.d.ts +0 -9
  299. package/dist/actions/pol/getUserClaimableIncentives.d.ts.map +0 -1
  300. package/dist/actions/prices/__tests__/prices.integration.test.d.ts +0 -2
  301. package/dist/actions/prices/__tests__/prices.integration.test.d.ts.map +0 -1
  302. package/dist/actions/tokens/getWalletBalances.integration.test.d.ts +0 -2
  303. package/dist/actions/tokens/getWalletBalances.integration.test.d.ts.map +0 -1
  304. package/dist/actions/transactions/beraWriteContract.integration.test.d.ts +0 -2
  305. package/dist/actions/transactions/beraWriteContract.integration.test.d.ts.map +0 -1
  306. package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts +0 -2
  307. package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts.map +0 -1
  308. package/dist/actions/validators/getValidatorAnalytics.d.ts +0 -12
  309. package/dist/actions/validators/getValidatorAnalytics.d.ts.map +0 -1
  310. package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts +0 -2
  311. package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts.map +0 -1
  312. package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts +0 -2
  313. package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts.map +0 -1
  314. package/dist/chunk-7TFV6UKF.mjs.map +0 -1
  315. package/dist/chunk-BSOWLS3W.mjs +0 -40
  316. package/dist/chunk-BSOWLS3W.mjs.map +0 -1
  317. package/dist/chunk-DOZJB6IJ.mjs.map +0 -1
  318. package/dist/chunk-IFNIPVTZ.mjs.map +0 -1
  319. package/dist/chunk-NZAH3SGT.mjs.map +0 -1
  320. package/dist/chunk-P3YZ7F22.mjs.map +0 -1
  321. package/dist/chunk-PHYZRH4I.mjs.map +0 -1
  322. package/dist/chunk-UA3Z47LT.mjs.map +0 -1
  323. package/dist/chunk-ZWTGVIPJ.mjs.map +0 -1
  324. package/dist/contexts/block-time-provider.d.ts +0 -10
  325. package/dist/defaultFlags-D6KfkTZx.d.ts +0 -10
  326. package/dist/dex-C_BB0b0O.d.ts +0 -37
  327. package/dist/errors/BeraError.unit.test.d.ts +0 -2
  328. package/dist/errors/BeraError.unit.test.d.ts.map +0 -1
  329. package/dist/errors/BeraTracing.unit.test.d.ts +0 -2
  330. package/dist/errors/BeraTracing.unit.test.d.ts.map +0 -1
  331. package/dist/errors/RequestError.unit.test.d.ts +0 -2
  332. package/dist/errors/RequestError.unit.test.d.ts.map +0 -1
  333. package/dist/errors/assert.unit.test.d.ts +0 -2
  334. package/dist/errors/assert.unit.test.d.ts.map +0 -1
  335. package/dist/errors/getRevertReason.integration.test.d.ts +0 -2
  336. package/dist/errors/getRevertReason.integration.test.d.ts.map +0 -1
  337. package/dist/errors/spanStatus.unit.test.d.ts +0 -2
  338. package/dist/errors/spanStatus.unit.test.d.ts.map +0 -1
  339. package/dist/getApolloClient-MWm_iq4u.d.ts +0 -39
  340. package/dist/getProposalVotes-DAUrdX2n.d.ts +0 -12
  341. package/dist/getValidatorQueuedOperatorAddress-N2I7wHd6.d.ts +0 -511
  342. package/dist/global.d-CR3zicga.d.ts +0 -231
  343. package/dist/global.d-CiZJ2eHz.d.ts +0 -231
  344. package/dist/honey-CYm0RWf4.d.ts +0 -14
  345. package/dist/hooks/enso/useEnsoSwapBundle.d.ts +0 -26
  346. package/dist/hooks/enso/useEnsoSwapBundle.d.ts.map +0 -1
  347. package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts +0 -8
  348. package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts.map +0 -1
  349. package/dist/hooks/pol/useStakedAPR.d.ts +0 -11
  350. package/dist/hooks/pol/useStakedAPR.d.ts.map +0 -1
  351. package/dist/hooks/validators/useUserClaimableIncentives.d.ts +0 -8
  352. package/dist/hooks/validators/useUserClaimableIncentives.d.ts.map +0 -1
  353. package/dist/hooks/validators/useValidatorAnalytics.d.ts +0 -11
  354. package/dist/hooks/validators/useValidatorAnalytics.d.ts.map +0 -1
  355. package/dist/pol.d-CeRgXBL8.d.ts +0 -167
  356. package/dist/txnEnum-ByI5dtDi.d.ts +0 -106
  357. package/dist/types/bribe-boost.d.ts +0 -69
  358. package/dist/types/bribeBoost.d.ts +0 -69
  359. package/dist/types/dex.d.ts +0 -225
  360. package/dist/types/enso.d.ts +0 -76
  361. package/dist/types/global.d.ts +0 -198
  362. package/dist/types/governance.d.ts +0 -112
  363. package/dist/types/honeySwap.d.ts +0 -23
  364. package/dist/types/pol.d.ts +0 -78
  365. package/dist/types/staking.d.ts +0 -22
  366. package/dist/useHoneySwapState-CXVWAThr.d.ts +0 -32
  367. package/dist/useHoneySwapState-twi7NTaO.d.ts +0 -32
  368. package/dist/utils/createEmitter.unit.test.d.ts +0 -2
  369. package/dist/utils/createEmitter.unit.test.d.ts.map +0 -1
  370. package/dist/utils/formatIncentivesTokenMap.d.ts +0 -3
  371. package/dist/utils/formatIncentivesTokenMap.d.ts.map +0 -1
  372. package/dist/utils/formatNumber.unit.test.d.ts +0 -2
  373. package/dist/utils/formatNumber.unit.test.d.ts.map +0 -1
  374. package/dist/utils/formatTimestamps.unit.test.d.ts +0 -2
  375. package/dist/utils/formatTimestamps.unit.test.d.ts.map +0 -1
  376. package/dist/utils/getContractName.unit.test.d.ts +0 -2
  377. package/dist/utils/getContractName.unit.test.d.ts.map +0 -1
  378. package/dist/utils/getHoneySwapMessage.test.d.ts +0 -2
  379. package/dist/utils/getHoneySwapMessage.test.d.ts.map +0 -1
  380. package/dist/utils/layerZeroScan.d.ts +0 -39
  381. package/dist/utils/layerZeroScan.d.ts.map +0 -1
  382. package/dist/utils/math.unit.test.d.ts +0 -2
  383. package/dist/utils/math.unit.test.d.ts.map +0 -1
  384. package/dist/utils/parseBaseArgs.unit.test.d.ts +0 -2
  385. package/dist/utils/parseBaseArgs.unit.test.d.ts.map +0 -1
  386. package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts +0 -2
  387. package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts.map +0 -1
  388. package/dist/utils/time.unit.test.d.ts +0 -2
  389. package/dist/utils/time.unit.test.d.ts.map +0 -1
  390. package/dist/utils/tokens.unit.test.d.ts +0 -2
  391. package/dist/utils/tokens.unit.test.d.ts.map +0 -1
  392. package/dist/utils/truncateHash.unit.test.d.ts +0 -2
  393. package/dist/utils/truncateHash.unit.test.d.ts.map +0 -1
  394. package/src/actions/enso/getEnsoSwapBundle.ts +0 -72
  395. package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +0 -28
  396. package/src/actions/pol/getRewardProofsByValidator.ts +0 -49
  397. package/src/actions/pol/getStakedBeraAPR.ts +0 -56
  398. package/src/actions/pol/getUserClaimableIncentives.ts +0 -40
  399. package/src/actions/validators/getValidatorAnalytics.ts +0 -37
  400. package/src/hooks/enso/useEnsoSwapBundle.ts +0 -121
  401. package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +0 -34
  402. package/src/hooks/validators/useUserClaimableIncentives.ts +0 -148
  403. package/src/hooks/validators/useValidatorAnalytics.ts +0 -37
  404. package/src/utils/formatIncentivesTokenMap.ts +0 -19
  405. package/src/utils/layerZeroScan.ts +0 -124
  406. /package/dist/{chunk-AEN6IJFU.mjs.map → chunk-7KN7TDUC.mjs.map} +0 -0
  407. /package/dist/{chunk-LE4CYW7S.mjs.map → chunk-FWRYUIJK.mjs.map} +0 -0
  408. /package/dist/{chunk-PJRLHTGC.mjs.map → chunk-HPRLNT6R.mjs.map} +0 -0
  409. /package/dist/{chunk-EJIGERYM.mjs.map → chunk-M3MIGSH3.mjs.map} +0 -0
  410. /package/dist/{chunk-TGN55GKE.mjs.map → chunk-SC3BSCTN.mjs.map} +0 -0
  411. /package/dist/{chunk-QQASX4LJ.mjs.map → chunk-TXWDUJOY.mjs.map} +0 -0
  412. /package/dist/{chunk-EGAB6NFQ.mjs.map → chunk-UWJQ6UKG.mjs.map} +0 -0
  413. /package/dist/{chunk-J3LTASDE.mjs.map → chunk-ZHV3MQ4F.mjs.map} +0 -0
@@ -1,167 +0,0 @@
1
- import { Address } from 'viem';
2
- import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-COOuDNra.js';
3
- import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
4
-
5
- interface BribeBoostReward {
6
- token: string;
7
- total_unclaimed: string;
8
- }
9
-
10
- interface BribeBoostRewardItem {
11
- rewards: BribeBoostReward[];
12
- validator: string;
13
- }
14
-
15
- interface BribeBoostRewardProof {
16
- validator?: string;
17
- pagination: {
18
- next: number;
19
- previous: number;
20
- record_per_page: number;
21
- current_page: number;
22
- total_page: number;
23
- };
24
- rewards:
25
- | {
26
- id: string;
27
- dist_id: string;
28
- token: Address;
29
- recipient: string;
30
- amount: string;
31
- merkle_proof: string[];
32
- available_at: number;
33
- }[]
34
- | null;
35
- }
36
-
37
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
38
- // { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
39
- // `amount` is a stringified bigint in token base units. The backend now
40
- // aggregates across validators under a single fake pubkey (`0x000…000`),
41
- // so consumers can collapse the validator dimension blindly.
42
- type AutoclaimedIncentivesResponse = Record<
43
- Address,
44
- Record<Address, Record<Address, { amount: string }>>
45
- >;
46
-
47
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
48
- // nesting, but each token leaf is `{ txhash }`. Tokens still pending are
49
- // simply absent — when a token from `/autoclaimed` has no entry here, the
50
- // bot hasn't distributed it yet.
51
- type AutoclaimedIncentivesTxHashResponse = Record<
52
- Address,
53
- Record<Address, Record<Address, { txhash: string }>>
54
- >;
55
-
56
- interface BribeBoostValidatorApr {
57
- id: string;
58
- boost_total_bgt: string;
59
- rewards_total_usd: string;
60
- daily_rate: string;
61
- apr: string;
62
- apy: string;
63
- tokens: Address[]; // Confirm this type with backend real data
64
- validator: string;
65
- start_block: number;
66
- end_block: number;
67
- start_timestamp: number;
68
- end_timestamp: number;
69
- created_at: string;
70
- updated_at: string;
71
- }
72
-
73
- interface ProtocolMetadata {
74
- name: string;
75
- logoURI: string;
76
- url: string;
77
- description: string;
78
- tags?: string[];
79
- }
80
-
81
- /**
82
- * Configuration for a single staking option.
83
- * Maps receipt tokens to their accepted input tokens.
84
- */
85
- type StakingConfig = {
86
- /** Unique identifier for this staking config */
87
- id: string;
88
- /** The token received when staking (e.g., sWBERA, siBERA) */
89
- receiptToken: TokenWithMetadata;
90
- /** Tokens that can be staked to receive the receipt token */
91
- inputTokens: TokenWithMetadata[];
92
- };
93
-
94
- type IncentiveReward = {
95
- tokenMetadata: Token | undefined;
96
- tokenPrice: number;
97
- tokenValue: number;
98
- id: string;
99
- dist_id: string;
100
- token: string;
101
- recipient: string;
102
- formattedAmount: string;
103
- amount: string;
104
- merkle_proof: string[];
105
- available_at: number;
106
- };
107
- interface IncentiveRewardChunksWithValidatorData {
108
- validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
109
- maxTimestamp: number | undefined;
110
- minTimestamp: number | undefined;
111
- totalValue: number;
112
- tokenTotals: {
113
- chainId: number;
114
- address: Address;
115
- amount: number;
116
- value: number;
117
- metadata: Token | undefined;
118
- }[];
119
- rewards: IncentiveReward[];
120
- isCurrent: boolean;
121
- }
122
-
123
- interface AggregatedTokenTotals {
124
- address: Address;
125
- amount: number;
126
- value: number;
127
- metadata: Token | undefined;
128
- chainId: number;
129
- }
130
-
131
- type ClaimedIncentives = Record<string, string>;
132
-
133
- type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
134
-
135
- interface UserVaultInfo {
136
- balance: bigint;
137
- delegatedBalance: bigint;
138
- withdrawableBalance: bigint;
139
- rewards: string;
140
- percentage: string;
141
- }
142
-
143
- type StakedBeraAsset = {
144
- token: TokenWithMetadata;
145
- /**
146
- * Staking APR, or `undefined` when unavailable (e.g. the APR backend is
147
- * down). `undefined` lets the UI render a "—" placeholder instead of a
148
- * misleading "0%".
149
- */
150
- apr: number | undefined;
151
- stakedAmount: number;
152
- /**
153
- * USD value of the staked amount, or `undefined` when the token price is
154
- * unavailable (e.g. the price backend is down). `undefined` lets the UI
155
- * render a "—" placeholder instead of a misleading "$0.00".
156
- */
157
- stakedAmountUsd: number | undefined;
158
- earnedAmount: number;
159
- /**
160
- * USD value of the earned amount, or `undefined` when the token price is
161
- * unavailable. See {@link stakedAmountUsd}.
162
- */
163
- earnedAmountUsd: number | undefined;
164
- isLoadingEarnings?: boolean;
165
- };
166
-
167
- export type { AutoclaimedIncentivesResponse as A, BribeBoostRewardProof as B, ClaimedIncentives as C, IncentiveReward as I, ProtocolMetadata as P, StakingConfig as S, UserVaultInfo as U, AutoclaimedIncentivesTxHashResponse as a, BribeBoostRewardItem as b, StakedBeraAsset as c, AggregatedTokenTotals as d, BribeBoostReward as e, BribeBoostValidatorApr as f, ClaimedIncentivesLocalState as g, IncentiveRewardChunksWithValidatorData as h };
@@ -1,106 +0,0 @@
1
- /**
2
- * A list of contract names that are not mapped in the devrel's contract mapping or that are generated by factories (e.g. RewardVault).
3
- */
4
- declare enum ContractName {
5
- ENSO_ROUTER = "enso.router",
6
- POL_REWARD_VAULT = "pol.rewardVault",
7
- POL_REWARD_VAULT_HELPER = "pol.rewardVaultHelper",
8
- BEX_POOL = "bex.pool",
9
- ERC20 = "others.erc20",
10
- ERC4626 = "others.erc4626",
11
- POL_STAKE_VAULT = "pol.stakeVault",
12
- BEX_EXPLOITED_FUND_DISTRIBUTOR = "bex.exploitedFundDistributor",
13
- TW_MINIMAL_ACCOUNT = "thirdweb.minimalAccount"
14
- }
15
-
16
- declare enum TransactionActionType {
17
- /**
18
- * Used for testing purposes.
19
- */
20
- TEST = "Test",
21
- SEND = "Send tokens",
22
- APPROVAL = "Approval",
23
- SWAP = "Swap",
24
- WRAP = "Wrap",
25
- UNWRAP = "Unwrap",
26
- CREATE_POOL = "Create Pool",
27
- ADD_LIQUIDITY = "Add Liquidity",
28
- WITHDRAW_LIQUIDITY = "Withdraw Liquidity",
29
- DELEGATE = "Delegate",
30
- REDELEGATE = "Redelegate",
31
- QUEUE_BOOST = "Queue Boost",
32
- ACTIVATE_BOOST = "Activate Boost",
33
- QUEUE_UNBOOSTING_ALL = "Queue Drop Boost All",
34
- UNBOOST = "Drop Boost",
35
- QUEUE_UNBOOST = "Queue Drop Boost",
36
- CANCEL_UNBOOST = "Cancel Drop Boost",
37
- CANCEL_BOOST = "Cancel Boost",
38
- UNBONDING = "Unbonding",
39
- CANCEL_UNBONDING = "Cancel Unbonding",
40
- SUBMIT_PROPOSAL = "Submit Proposal",
41
- CANCEL_PROPOSAL = "Cancel Proposal",
42
- EXECUTE_PROPOSAL = "Execute Proposal",
43
- QUEUE_PROPOSAL = "Queue Proposal",
44
- VOTE = "Vote",
45
- MODIFY_REWARD_DURATION = "Change Reward Duration",
46
- MODIFY_REWARD_RATE = "Change Reward Rate",
47
- RESET_REWARD_MODE = "Reset Reward Mode",
48
- CREATE_BRIBE = "Add Incentives",
49
- CLAIMING_BRIBES = "Claiming Incentives",// claiming others
50
- CLAIMING_REWARDS = "Claiming BGT",
51
- CLAIM_ALL_REWARDS = "Claim All Rewards",
52
- RECOVER_FUNDS = "Recover Bex Funds",
53
- REDEEM_BGT = "Redeem BGT",
54
- MINT_HONEY = "Mint Honey",
55
- REDEEM_HONEY = "Redeem Honey",
56
- SUPPLY = "Supply",
57
- WITHDRAW = "Withdraw",
58
- BORROW = "Borrow",
59
- REPAY = "Repay",
60
- STAKE = "Stake",
61
- UNSTAKE = "Unstake",
62
- ENSO_ROUTE = "Enso Route",
63
- MARKET_LONG = "Market Long",
64
- MARKET_SHORT = "Market Short",
65
- LIMIT_LONG = "Limit Long",
66
- LIMIT_SHORT = "Limit Short",
67
- CANCEL_ORDER = "Cancel Order",
68
- CANCEL_ALL_ORDERS = "Cancel All Orders",
69
- EDIT_PERPS_ORDER = "Edit Perps Order",
70
- DEPOSIT_HONEY = "Deposit Honey",
71
- START_WITHDRAW_REQUEST = "Start Withdraw Request",
72
- CANCEL_WITHDRAW_REQUEST = "Cancel Withdraw Request",
73
- WITHDRAW_HONEY = "Withdraw Honey",
74
- DELEGATE_OCT = "Delegate",
75
- REVOKE_OCT = "Revoke",
76
- REFER = "Refer",
77
- CREATE_REWARDS_VAULT = "Create Reward Vault",
78
- APPLYING_REWARD_ALLOCATION = "Apply Reward Allocation",
79
- APPLYING_OPERATOR_CHANGE = "Apply Operator Change",
80
- CANCELING_OPERATOR_CHANGE = "Cancel Operator Change",
81
- REQUEST_OPERATOR_CHANGE = "Request Operator Change",
82
- APPLYING_REWARD_ALLOCATOR_CHANGE = "Apply Reward Allocator Change",
83
- APPLYING_COMMISSION_CHANGE = "Apply Commission Change",
84
- BONDING_BERA = "Stake BERA",
85
- ZAP_STAKE_BERA = "Zap Stake BERA",
86
- UNBONDING_BERA = "Unstake BERA",
87
- QUEUE_UNBONDING_BERA = "Queue Unstake BERA",
88
- BEND_MARKET_REPAY_AND_WITHDRAW_COLLATERAL = "Bend Market Repay and Withdraw Collateral",
89
- BEND_MARKET_SUPPLY_COLLATERAL_AND_BORROW = "Bend Market Supply Collateral and Borrow",
90
- BEND_MARKET_MULTIPLY = "Bend Market Multiply",
91
- BEND_MARKET_DEMULTIPLY = "Bend Market Demultiply",
92
- BEND_VAULT_SUPPLY = "Bend Vault Supply",
93
- BEND_VAULT_WITHDRAW = "Bend Vault Withdraw",
94
- BEND_CURATOR_REALLOCATE = "Bend Curator Reallocate",
95
- BEND_CURATOR_UPDATE_MARKET_SUPPLY_CAP = "Bend Curator Update Market Supply Cap",
96
- BEND_CURATOR_REVOKE_PENDING_SUPPLY_CAP = "Bend Curator Revoke Pending Supply Cap",
97
- BEND_CURATOR_ACCEPT_PENDING_SUPPLY_CAP = "Bend Curator Accept Pending Supply Cap",
98
- BEND_CURATOR_UPDATE_SUPPLY_QUEUE = "Bend Curator Update Supply Queue",
99
- BEND_CURATOR_UPDATE_WITHDRAW_QUEUE = "Bend Curator Update Withdraw Queue",
100
- BEND_CURATOR_TRANSFER_OWNER = "Bend Curator Transfer Owner",
101
- BEND_CURATOR_CHANGE_GUARDIAN = "Bend Curator Change Guardian",
102
- BEND_CURATOR_SET_CURATOR = "Bend Curator Set Curator",
103
- BEND_CURATOR_SET_ALLOCATOR = "Bend Curator Set Allocator"
104
- }
105
-
106
- export { ContractName as C, TransactionActionType as T };
@@ -1,69 +0,0 @@
1
- import type { Address } from "viem";
2
-
3
- export interface BribeBoostReward {
4
- token: string;
5
- total_unclaimed: string;
6
- }
7
-
8
- export interface BribeBoostRewardItem {
9
- rewards: BribeBoostReward[];
10
- validator: string;
11
- }
12
-
13
- export interface BribeBoostRewardProof {
14
- validator?: string;
15
- pagination: {
16
- next: number;
17
- previous: number;
18
- record_per_page: number;
19
- current_page: number;
20
- total_page: number;
21
- };
22
- rewards:
23
- | {
24
- id: string;
25
- dist_id: string;
26
- token: Address;
27
- recipient: string;
28
- amount: string;
29
- merkle_proof: string[];
30
- available_at: number;
31
- }[]
32
- | null;
33
- }
34
-
35
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
36
- // { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
37
- // `amount` is a stringified bigint in token base units. The backend now
38
- // aggregates across validators under a single fake pubkey (`0x000…000`),
39
- // so consumers can collapse the validator dimension blindly.
40
- export type AutoclaimedIncentivesResponse = Record<
41
- Address,
42
- Record<Address, Record<Address, { amount: string }>>
43
- >;
44
-
45
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
46
- // nesting, but each token leaf is `{ txhash }`. Tokens still pending are
47
- // simply absent — when a token from `/autoclaimed` has no entry here, the
48
- // bot hasn't distributed it yet.
49
- export type AutoclaimedIncentivesTxHashResponse = Record<
50
- Address,
51
- Record<Address, Record<Address, { txhash: string }>>
52
- >;
53
-
54
- export interface BribeBoostValidatorApr {
55
- id: string;
56
- boost_total_bgt: string;
57
- rewards_total_usd: string;
58
- daily_rate: string;
59
- apr: string;
60
- apy: string;
61
- tokens: Address[]; // Confirm this type with backend real data
62
- validator: string;
63
- start_block: number;
64
- end_block: number;
65
- start_timestamp: number;
66
- end_timestamp: number;
67
- created_at: string;
68
- updated_at: string;
69
- }
@@ -1,69 +0,0 @@
1
- import type { Address } from "viem";
2
-
3
- export interface BribeBoostReward {
4
- token: string;
5
- total_unclaimed: string;
6
- }
7
-
8
- export interface BribeBoostRewardItem {
9
- rewards: BribeBoostReward[];
10
- validator: string;
11
- }
12
-
13
- export interface BribeBoostRewardProof {
14
- validator?: string;
15
- pagination: {
16
- next: number;
17
- previous: number;
18
- record_per_page: number;
19
- current_page: number;
20
- total_page: number;
21
- };
22
- rewards:
23
- | {
24
- id: string;
25
- dist_id: string;
26
- token: Address;
27
- recipient: string;
28
- amount: string;
29
- merkle_proof: string[];
30
- available_at: number;
31
- }[]
32
- | null;
33
- }
34
-
35
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
36
- // { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
37
- // `amount` is a stringified bigint in token base units. The backend now
38
- // aggregates across validators under a single fake pubkey (`0x000…000`),
39
- // so consumers can collapse the validator dimension blindly.
40
- export type AutoclaimedIncentivesResponse = Record<
41
- Address,
42
- Record<Address, Record<Address, { amount: string }>>
43
- >;
44
-
45
- // Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
46
- // nesting, but each token leaf is `{ txhash }`. Tokens still pending are
47
- // simply absent — when a token from `/autoclaimed` has no entry here, the
48
- // bot hasn't distributed it yet.
49
- export type AutoclaimedIncentivesTxHashResponse = Record<
50
- Address,
51
- Record<Address, Record<Address, { txhash: string }>>
52
- >;
53
-
54
- export interface BribeBoostValidatorApr {
55
- id: string;
56
- boost_total_bgt: string;
57
- rewards_total_usd: string;
58
- daily_rate: string;
59
- apr: string;
60
- apy: string;
61
- tokens: Address[]; // Confirm this type with backend real data
62
- validator: string;
63
- start_block: number;
64
- end_block: number;
65
- start_timestamp: number;
66
- end_timestamp: number;
67
- created_at: string;
68
- updated_at: string;
69
- }
@@ -1,225 +0,0 @@
1
- import type { SwapKind } from "@berachain-foundation/berancer-sdk";
2
- import type { Abi, Address, Hex, PublicClient } from "viem";
3
-
4
- import type { HoneyConfigContextReturn } from "../contexts/HoneyConfigProvider";
5
-
6
- export type MinimalERC20 = {
7
- address: Address;
8
- decimals: number;
9
- symbol: string;
10
- name: string;
11
- chainId: number;
12
- };
13
-
14
- export type TokenWithMetadata = MinimalERC20 & {
15
- tags?: string[];
16
- base64?: string;
17
- logoURI?: string;
18
- };
19
-
20
- export type Token = TokenWithMetadata & {
21
- totalSupply?: string;
22
- weight?: number | string | null;
23
- };
24
-
25
- export interface TokenPriceInfo {
26
- price: number;
27
- updatedAt: number;
28
- chainId: number;
29
- }
30
-
31
- export type TokenCurrentPriceMap = Record<
32
- Lowercase<Address> | string,
33
- TokenPriceInfo | undefined
34
- >;
35
-
36
- export interface TokenWithAmount extends Token {
37
- amount: string;
38
- exceeding?: boolean;
39
- }
40
-
41
- export interface TokenWithPrice extends Token {
42
- price: number;
43
- }
44
-
45
- export interface BalanceToken extends Token {
46
- balance: {
47
- /**
48
- * This is the string representation of the balance in wei.
49
- *
50
- * It can be safely parsed to a bigint, but we're returning it as a string to avoid serialization issues.
51
- *
52
- * @example "1200000000000000000"
53
- */
54
- raw: string;
55
- /**
56
- * This is the formatted representation of the balance in the token's decimals.
57
- *
58
- * @example "1.2"
59
- */
60
- formatted: string;
61
- };
62
- /**
63
- * Price of the token in USD.
64
- */
65
- price?: number;
66
- /**
67
- * Balance value in USD.
68
- * Calculated as balance * price.
69
- */
70
- usdValue?: number;
71
- }
72
-
73
- export interface SwapRequest {
74
- tokenIn: Address;
75
- tokenOut: Address;
76
- tokenInDecimals: number;
77
- tokenOutDecimals: number;
78
- amount: string;
79
- wberaIsBera: boolean;
80
- swapKind: SwapKind;
81
- }
82
-
83
- /**
84
- * Object with properties to check the allowance of a token.
85
- */
86
- export interface AllowanceQueryItem {
87
- token: MinimalERC20;
88
- /**
89
- * The amount of the token to approve.
90
- */
91
- amount: {
92
- raw: string;
93
- formatted: string;
94
- };
95
- /**
96
- * The address to approve the tokens to.
97
- */
98
- spender: Address;
99
- }
100
-
101
- export interface AllowanceToken extends AllowanceQueryItem {
102
- /**
103
- * The current allowance of the token.
104
- */
105
- allowance: {
106
- raw: string;
107
- formatted: string;
108
- };
109
- /**
110
- * Whether the allowance is needed to perform the transaction.
111
- */
112
- needsApproval: boolean;
113
- }
114
-
115
- export interface IUserPosition {
116
- lpBalance?: BalanceToken;
117
- tokenBalances?: Omit<BalanceToken, "chainId">[];
118
- userSharePercentage?: number;
119
- stakedBalance?: Pick<BalanceToken, "address" | "balance" | "usdValue">;
120
- /**
121
- * Just a utility to detect if there is a price for the LP token.
122
- */
123
- lpTokenPrice?: number;
124
- }
125
- export type BexStatus = {
126
- protocol: {
127
- /**
128
- * If the whole protocol is paused (i.e. ~the~ vault contract) disable any functionality except withdrawing proportional
129
- * liquidity (provided that pool's recovery mode is enabled). Specifically we disable swaps and pool creation.
130
- */
131
- isPaused: boolean;
132
- };
133
- /**
134
- * Pool is undefined if pool status is still loading if no pool address was provided.
135
- */
136
- pool?: {
137
- /**
138
- * Pool should be put into recovery mode if tx are reverting on-chain to do with fee computation or pool exits.
139
- * It reduces the computation needed to withdraw liquidity and does not charge protocol fees on exits while enabled.
140
- *
141
- * NOTE: that you can potentially still do regular exits/joins/etc in recovery mode, but if the flag is true will only
142
- * present the safe exit option to the user in FE.
143
- */
144
- isInRecoveryMode: boolean;
145
- /**
146
- * If the pool is paused you cannot do anything unless you also enable recovery mode (then you can withdraw safely).
147
- */
148
- isPaused: boolean;
149
- /**
150
- * Disable withdrawals for a pool due to a combination of pool and vault statuses.
151
- */
152
- disablePoolWithdrawals: boolean;
153
- /**
154
- * Disable deposits for a pool due to a combination of pool and vault statuses.
155
- */
156
- disablePoolDeposits: boolean;
157
- };
158
- };
159
-
160
- export type IAggregatorArgs = {
161
- tokenIn: MinimalERC20;
162
- tokenOut: MinimalERC20;
163
- /**
164
- * Amount of tokenIn to swap in wei.
165
- */
166
- amount: string;
167
- slippage: number;
168
- account?: Address;
169
- publicClient?: PublicClient;
170
- aggregatorsFeeBps?: number;
171
- proxyAggregatorsThroughVercel?: boolean;
172
- referrer?: SwapReferrer;
173
- /**
174
- * If provided, the aggregator will swap to the underlying token and deposit it into the vault (tokenOut).
175
- *
176
- * The aggregator won't check if the tokenOut is an ERC4626 vault, so this needs to be asserted by the caller.
177
- * This is used for Staked BERA/iBera and Bend Vaults.
178
- */
179
- underlyingToken?: MinimalERC20 | null;
180
- /**
181
- * If provided, the aggregator will stake into the reward vault after the swap.
182
- */
183
- rewardVault?: Address;
184
- /**
185
- * Only needed by the honey mint/redeem aggregator.
186
- */
187
- honeyNativeState?: Pick<HoneyConfigContextReturn, "collateralList">;
188
- };
189
-
190
- export type Calldata = {
191
- params?: readonly unknown[] | undefined;
192
- functionName?: string;
193
- abi?: Abi;
194
- address: Address;
195
- data?: Hex;
196
- value: bigint;
197
- gasLimit?: bigint;
198
- };
199
-
200
- export type IRawAggregatorQuote = {
201
- amountOut: string;
202
- amountIn: string;
203
- name: Aggregators;
204
- allowanceRequirements: AllowanceQueryItem[];
205
- /**
206
- * True if it's bera wrap/unwrap or bgt redeem.
207
- */
208
- isNativeSwap?: boolean;
209
- priceImpactPercentage?: number | null;
210
- swapFeeBps: number;
211
- getCalldata?: ({ account }: { account: Address }) => Calldata;
212
- };
213
-
214
- export type IAggregatorQuote =
215
- // no need to force to swapAndStake as type check is done on each getQuote
216
- IRawAggregatorQuote & {
217
- amountOut: string;
218
- amountOutUsd: string;
219
- amountIn: string;
220
- amountInUsd: string;
221
- priceImpactPercentage: number;
222
- exchangeRate: number;
223
- relativeLossPercentage: number;
224
- isBest?: boolean;
225
- };