@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.
- package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -1
- package/dist/actions/clients/clientName.d.ts +10 -0
- package/dist/actions/clients/clientName.d.ts.map +1 -0
- package/dist/actions/clients/exports.d.ts +2 -0
- package/dist/actions/clients/exports.d.ts.map +1 -1
- package/dist/actions/clients/exports.mjs +26 -7
- package/dist/actions/clients/exports.mjs.map +1 -1
- package/dist/actions/clients/fetchBeep.d.ts.map +1 -1
- package/dist/actions/clients/fetchEnso.d.ts +17 -0
- package/dist/actions/clients/fetchEnso.d.ts.map +1 -0
- package/dist/actions/clients/fetchLayerzero.d.ts +12 -0
- package/dist/actions/clients/fetchLayerzero.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.d.ts +4 -1
- package/dist/actions/clients/fetchOpenApi.d.ts.map +1 -1
- package/dist/actions/clients/getApolloClient.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/base.d.ts +30 -5
- package/dist/actions/dex/aggregators/base.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/bex.d.ts +11 -1
- package/dist/actions/dex/aggregators/bex.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/bgt.d.ts +2 -2
- package/dist/actions/dex/aggregators/bgt.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/enso/enso.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/erc4626.d.ts +2 -2
- package/dist/actions/dex/aggregators/erc4626.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/fly.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/haiku.d.ts +7 -1
- package/dist/actions/dex/aggregators/haiku.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/honey.d.ts +2 -2
- package/dist/actions/dex/aggregators/honey.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/kyberswap.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/oogabooga.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/openOcean.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/wbera.d.ts +3 -2
- package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -1
- package/dist/actions/dex/getAllPools.d.ts.map +1 -1
- package/dist/actions/dex/getApiPool.d.ts.map +1 -1
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -1
- package/dist/actions/enso/util.d.ts +1 -6
- package/dist/actions/enso/util.d.ts.map +1 -1
- package/dist/actions/exports.d.ts +3 -5
- package/dist/actions/exports.d.ts.map +1 -1
- package/dist/actions/exports.mjs +31 -50
- package/dist/actions/exports.mjs.map +1 -1
- package/dist/actions/governance/exports.mjs +3 -3
- package/dist/actions/honey/getHoney24hVolume.d.ts +2 -2
- package/dist/actions/honey/getHoney24hVolume.d.ts.map +1 -1
- package/dist/actions/honey/getHoneyCollaterals.d.ts +1 -1
- package/dist/actions/honey/getHoneyCollaterals.d.ts.map +1 -1
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts +0 -23
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts.map +1 -1
- package/dist/actions/pol/getLSTStakeConfig.d.ts.map +1 -1
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts +1 -14
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts.map +1 -1
- package/dist/actions/pol/getStakedBeraAPY.d.ts +14 -0
- package/dist/actions/pol/getStakedBeraAPY.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts +14 -4
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts.map +1 -1
- package/dist/actions/pol/getStakingDailyAssets.d.ts +2 -2
- package/dist/actions/pol/getStakingDailyAssets.d.ts.map +1 -1
- package/dist/actions/server/exports.mjs +5 -5
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts +1 -1
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts.map +1 -1
- package/dist/actions/validators/getUserActiveValidators.d.ts +37 -1
- package/dist/actions/validators/getUserActiveValidators.d.ts.map +1 -1
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts +4 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts.map +1 -1
- package/dist/{chunk-ZWTGVIPJ.mjs → chunk-4576RF2K.mjs} +29 -4
- package/dist/chunk-4576RF2K.mjs.map +1 -0
- package/dist/{chunk-UA3Z47LT.mjs → chunk-5PBYMJRG.mjs} +95 -24
- package/dist/chunk-5PBYMJRG.mjs.map +1 -0
- package/dist/{chunk-AEN6IJFU.mjs → chunk-7KN7TDUC.mjs} +2 -2
- package/dist/chunk-7OESHTBN.mjs +29 -0
- package/dist/chunk-7OESHTBN.mjs.map +1 -0
- package/dist/{chunk-IFNIPVTZ.mjs → chunk-BSLXKPX4.mjs} +4 -48
- package/dist/chunk-BSLXKPX4.mjs.map +1 -0
- package/dist/{chunk-PHYZRH4I.mjs → chunk-BZKA6DBM.mjs} +9 -13
- package/dist/chunk-BZKA6DBM.mjs.map +1 -0
- package/dist/{chunk-LE4CYW7S.mjs → chunk-FWRYUIJK.mjs} +3 -3
- package/dist/{chunk-PJRLHTGC.mjs → chunk-HPRLNT6R.mjs} +3 -3
- package/dist/chunk-J6GM7HWX.mjs +19 -0
- package/dist/chunk-J6GM7HWX.mjs.map +1 -0
- package/dist/{chunk-P3YZ7F22.mjs → chunk-LL7XR2H5.mjs} +34 -3
- package/dist/chunk-LL7XR2H5.mjs.map +1 -0
- package/dist/{chunk-EJIGERYM.mjs → chunk-M3MIGSH3.mjs} +2 -2
- package/dist/{chunk-NZAH3SGT.mjs → chunk-MVNQY2D4.mjs} +9 -4
- package/dist/chunk-MVNQY2D4.mjs.map +1 -0
- package/dist/{chunk-TGN55GKE.mjs → chunk-SC3BSCTN.mjs} +2 -2
- package/dist/{chunk-DOZJB6IJ.mjs → chunk-SMBAW7AG.mjs} +394 -344
- package/dist/chunk-SMBAW7AG.mjs.map +1 -0
- package/dist/{chunk-QQASX4LJ.mjs → chunk-TXWDUJOY.mjs} +2 -2
- package/dist/{chunk-EGAB6NFQ.mjs → chunk-UWJQ6UKG.mjs} +2 -2
- package/dist/chunk-XO2BFPTB.mjs +50 -0
- package/dist/chunk-XO2BFPTB.mjs.map +1 -0
- package/dist/{chunk-7TFV6UKF.mjs → chunk-XXKPXNQD.mjs} +1 -2
- package/dist/chunk-XXKPXNQD.mjs.map +1 -0
- package/dist/{chunk-J3LTASDE.mjs → chunk-ZHV3MQ4F.mjs} +4 -4
- package/dist/contexts/BeraFlags/BeraFlags.d.ts +1 -1
- package/dist/contexts/BeraFlags/BeraFlags.d.ts.map +1 -1
- package/dist/contexts/BeraFlags/defaultFlags.d.ts +2 -2
- package/dist/contexts/BeraFlags/defaultFlags.d.ts.map +1 -1
- package/dist/contexts/BexStatusProvider.d.ts +1 -1
- package/dist/contexts/BexStatusProvider.d.ts.map +1 -1
- package/dist/contexts/TokensProvider.d.ts +1 -1
- package/dist/contexts/TokensProvider.d.ts.map +1 -1
- package/dist/contexts/exports.mjs +9 -9
- package/dist/enum/contracts.d.ts +3 -0
- package/dist/enum/contracts.d.ts.map +1 -1
- package/dist/enum/exports.mjs +6 -4
- package/dist/enum/exports.mjs.map +1 -1
- package/dist/errors/RequestError.d.ts +19 -0
- package/dist/errors/RequestError.d.ts.map +1 -1
- package/dist/errors/errorMap.d.ts +4 -3
- package/dist/errors/errorMap.d.ts.map +1 -1
- package/dist/errors/exports.mjs +5 -5
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts.map +1 -1
- package/dist/hooks/dex/useAllUserPools.d.ts.map +1 -1
- package/dist/hooks/dex/useCrossChainNativeFee.d.ts +32 -0
- package/dist/hooks/dex/useCrossChainNativeFee.d.ts.map +1 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts.map +1 -1
- package/dist/hooks/dex/usePools.d.ts.map +1 -1
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts.map +1 -1
- package/dist/hooks/enso/useBendZapSupply.d.ts +2 -2
- package/dist/hooks/enso/useBendZapSupply.d.ts.map +1 -1
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts.map +1 -1
- package/dist/hooks/exports.d.ts +2 -5
- package/dist/hooks/exports.d.ts.map +1 -1
- package/dist/hooks/exports.mjs +590 -905
- package/dist/hooks/exports.mjs.map +1 -1
- package/dist/hooks/governance/exports.mjs +4 -4
- package/dist/hooks/honey/useHoneyChartData.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardVaults.d.ts.map +1 -1
- package/dist/hooks/pol/useStakedAPY.d.ts +11 -0
- package/dist/hooks/pol/useStakedAPY.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedData.d.ts +2 -2
- package/dist/hooks/pol/useStakedData.d.ts.map +1 -1
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts +0 -1
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts.map +1 -1
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts +30 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts.map +1 -1
- package/dist/hooks/tokens/usePollBalance.d.ts.map +1 -1
- package/dist/hooks/validators/useUserActiveValidators.d.ts +5 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts.map +1 -1
- package/dist/hooks/validators/useValidator.d.ts.map +1 -1
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts +3 -4
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts.map +1 -1
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts +1 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -1
- package/dist/utils/crossChainBridge.d.ts +74 -0
- package/dist/utils/crossChainBridge.d.ts.map +1 -0
- package/dist/utils/exports.d.ts +1 -1
- package/dist/utils/exports.d.ts.map +1 -1
- package/dist/utils/exports.mjs +142 -72
- package/dist/utils/exports.mjs.map +1 -1
- package/dist/utils/getTestClient.d.ts +5 -3
- package/dist/utils/getTestClient.d.ts.map +1 -1
- package/dist/utils/parseWhiskToken.d.ts.map +1 -1
- package/package.json +8 -6
- package/src/actions/clients/BeraApolloClient.ts +4 -2
- package/src/actions/clients/clientName.ts +17 -0
- package/src/actions/clients/clientName.unit.test.ts +39 -0
- package/src/actions/clients/exports.ts +2 -0
- package/src/actions/clients/fetchBeep.ts +4 -1
- package/src/actions/clients/fetchEnso.ts +48 -0
- package/src/actions/clients/fetchLayerzero.ts +34 -0
- package/src/actions/clients/fetchOpenApi.ts +9 -2
- package/src/actions/clients/fetchOpenApi.unit.test.ts +26 -10
- package/src/actions/clients/getApolloClient.ts +3 -11
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +231 -2
- package/src/actions/dex/aggregators/base.ts +75 -17
- package/src/actions/dex/aggregators/bex.ts +41 -1
- package/src/actions/dex/aggregators/bgt.ts +11 -6
- package/src/actions/dex/aggregators/enso/enso.ts +1 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +27 -9
- package/src/actions/dex/aggregators/erc4626.ts +19 -5
- package/src/actions/dex/aggregators/fly.ts +1 -0
- package/src/actions/dex/aggregators/haiku.ts +33 -2
- package/src/actions/dex/aggregators/honey.ts +17 -6
- package/src/actions/dex/aggregators/kyberswap.ts +1 -0
- package/src/actions/dex/aggregators/oogabooga.ts +1 -0
- package/src/actions/dex/aggregators/openOcean.ts +1 -0
- package/src/actions/dex/aggregators/wbera.ts +17 -11
- package/src/actions/enso/getBendMultiplyBundle.ts +1 -1
- package/src/actions/enso/getEnsoUserTokensWithBalances.ts +4 -8
- package/src/actions/enso/util.ts +0 -59
- package/src/actions/exports.ts +3 -5
- package/src/actions/honey/getHoney24hVolume.ts +3 -12
- package/src/actions/honey/getHoneyCollaterals.ts +1 -1
- package/src/actions/pol/getBeraTokenTotalSupply.ts +3 -33
- package/src/actions/pol/getLSTStakeConfig.ts +0 -6
- package/src/actions/pol/getSWBeraVaultMetadata.ts +2 -106
- package/src/actions/pol/getStakedBeraAPY.ts +45 -0
- package/src/actions/pol/getStakedBeraSnapshots.ts +18 -34
- package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts +1 -1
- package/src/actions/validators/getUserActiveValidators.ts +116 -54
- package/src/actions/validators/getValidatorRewardAllocation.ts +12 -1
- package/src/contexts/BeraFlags/BeraFlags.tsx +1 -4
- package/src/contexts/BeraFlags/defaultFlags.ts +1 -3
- package/src/contexts/BexStatusProvider.tsx +1 -1
- package/src/contexts/TokensProvider.tsx +1 -4
- package/src/enum/contracts.ts +3 -0
- package/src/errors/BeraError.unit.test.ts +23 -0
- package/src/errors/RequestError.ts +46 -9
- package/src/errors/RequestError.unit.test.ts +54 -0
- package/src/errors/errorMap.ts +8 -3
- package/src/errors/getErrorMessage.unit.test.ts +32 -0
- package/src/hooks/dex/useAggregatorsQuotes.ts +7 -1
- package/src/hooks/dex/useCrossChainNativeFee.ts +83 -0
- package/src/hooks/dex/useCrossChainNativeFee.unit.test.ts +63 -0
- package/src/hooks/dex/useOnChainPoolData.ts +30 -13
- package/src/hooks/dex/useSingleAggregatorQuote.ts +4 -2
- package/src/hooks/enso/useBendZapSupply.ts +9 -38
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +10 -2
- package/src/hooks/enso/useZapStakeBera.ts +1 -1
- package/src/hooks/exports.ts +2 -5
- package/src/hooks/pol/useAutoclaimedIncentives.ts +6 -3
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +5 -2
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +5 -4
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +0 -1
- package/src/hooks/pol/{useStakedAPR.ts → useStakedAPY.ts} +11 -9
- package/src/hooks/pol/useStakedData.ts +13 -14
- package/src/hooks/pol/useStakingVaultsMetadata.ts +3 -8
- package/src/hooks/tokens/useMultipleTokenInformation.ts +64 -21
- package/src/hooks/tokens/useMultipleTokenInformation.unit.test.ts +91 -0
- package/src/hooks/tokens/usePollBalance.ts +4 -2
- package/src/hooks/validators/useUserActiveValidators.ts +54 -9
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +3 -4
- package/src/types/bribeBoost.d.ts +0 -49
- package/src/types/dex.d.ts +17 -0
- package/src/types/enso.d.ts +1 -27
- package/src/types/global.d.ts +7 -0
- package/src/types/pol.d.ts +3 -48
- package/src/utils/crossChainBridge.ts +290 -0
- package/src/utils/crossChainBridge.unit.test.ts +177 -0
- package/src/utils/exports.ts +1 -1
- package/dist/BeraError-7-A5JYy_.d.ts +0 -123
- package/dist/BexStatusProvider-DRymVlQf.d.ts +0 -70
- package/dist/HoneyConfigProvider-COOuDNra.d.ts +0 -390
- package/dist/RequestError-DkUbo3ro.d.ts +0 -145
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts +0 -2
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts.map +0 -1
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts +0 -2
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts.map +0 -1
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts +0 -2
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts.map +0 -1
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts +0 -2
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts.map +0 -1
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts +0 -2
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts.map +0 -1
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts +0 -2
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts.map +0 -1
- package/dist/actions/dex/b-sdk.d.ts +0 -3
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts.map +0 -1
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts.map +0 -1
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts.map +0 -1
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts.map +0 -1
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts.map +0 -1
- package/dist/actions/enso/__tests__/util.unit.test.d.ts +0 -2
- package/dist/actions/enso/__tests__/util.unit.test.d.ts.map +0 -1
- package/dist/actions/enso/getEnsoSwapBundle.d.ts +0 -3
- package/dist/actions/enso/getEnsoSwapBundle.d.ts.map +0 -1
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts +0 -2
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts.map +0 -1
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts +0 -2
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts.map +0 -1
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts +0 -2
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts.map +0 -1
- package/dist/actions/honey/tests/pyth.integration.test.d.ts +0 -2
- package/dist/actions/honey/tests/pyth.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts +0 -2
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts +0 -2
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts +0 -2
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts +0 -2
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts.map +0 -1
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts +0 -10
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts.map +0 -1
- package/dist/actions/pol/getBlockTime.debug.test.d.ts +0 -2
- package/dist/actions/pol/getBlockTime.debug.test.d.ts.map +0 -1
- package/dist/actions/pol/getRewardProofsByValidator.d.ts +0 -9
- package/dist/actions/pol/getRewardProofsByValidator.d.ts.map +0 -1
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts +0 -2
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts +0 -2
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts.map +0 -1
- package/dist/actions/pol/getStakedBeraAPR.d.ts +0 -12
- package/dist/actions/pol/getStakedBeraAPR.d.ts.map +0 -1
- package/dist/actions/pol/getUserClaimableIncentives.d.ts +0 -9
- package/dist/actions/pol/getUserClaimableIncentives.d.ts.map +0 -1
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts +0 -2
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts.map +0 -1
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts +0 -2
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts.map +0 -1
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts +0 -2
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts.map +0 -1
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts +0 -2
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts.map +0 -1
- package/dist/actions/validators/getValidatorAnalytics.d.ts +0 -12
- package/dist/actions/validators/getValidatorAnalytics.d.ts.map +0 -1
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts +0 -2
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts.map +0 -1
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts +0 -2
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts.map +0 -1
- package/dist/chunk-7TFV6UKF.mjs.map +0 -1
- package/dist/chunk-BSOWLS3W.mjs +0 -40
- package/dist/chunk-BSOWLS3W.mjs.map +0 -1
- package/dist/chunk-DOZJB6IJ.mjs.map +0 -1
- package/dist/chunk-IFNIPVTZ.mjs.map +0 -1
- package/dist/chunk-NZAH3SGT.mjs.map +0 -1
- package/dist/chunk-P3YZ7F22.mjs.map +0 -1
- package/dist/chunk-PHYZRH4I.mjs.map +0 -1
- package/dist/chunk-UA3Z47LT.mjs.map +0 -1
- package/dist/chunk-ZWTGVIPJ.mjs.map +0 -1
- package/dist/contexts/block-time-provider.d.ts +0 -10
- package/dist/defaultFlags-D6KfkTZx.d.ts +0 -10
- package/dist/dex-C_BB0b0O.d.ts +0 -37
- package/dist/errors/BeraError.unit.test.d.ts +0 -2
- package/dist/errors/BeraError.unit.test.d.ts.map +0 -1
- package/dist/errors/BeraTracing.unit.test.d.ts +0 -2
- package/dist/errors/BeraTracing.unit.test.d.ts.map +0 -1
- package/dist/errors/RequestError.unit.test.d.ts +0 -2
- package/dist/errors/RequestError.unit.test.d.ts.map +0 -1
- package/dist/errors/assert.unit.test.d.ts +0 -2
- package/dist/errors/assert.unit.test.d.ts.map +0 -1
- package/dist/errors/getRevertReason.integration.test.d.ts +0 -2
- package/dist/errors/getRevertReason.integration.test.d.ts.map +0 -1
- package/dist/errors/spanStatus.unit.test.d.ts +0 -2
- package/dist/errors/spanStatus.unit.test.d.ts.map +0 -1
- package/dist/getApolloClient-MWm_iq4u.d.ts +0 -39
- package/dist/getProposalVotes-DAUrdX2n.d.ts +0 -12
- package/dist/getValidatorQueuedOperatorAddress-N2I7wHd6.d.ts +0 -511
- package/dist/global.d-CR3zicga.d.ts +0 -231
- package/dist/global.d-CiZJ2eHz.d.ts +0 -231
- package/dist/honey-CYm0RWf4.d.ts +0 -14
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts +0 -26
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts.map +0 -1
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts +0 -8
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts.map +0 -1
- package/dist/hooks/pol/useStakedAPR.d.ts +0 -11
- package/dist/hooks/pol/useStakedAPR.d.ts.map +0 -1
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts +0 -8
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts.map +0 -1
- package/dist/hooks/validators/useValidatorAnalytics.d.ts +0 -11
- package/dist/hooks/validators/useValidatorAnalytics.d.ts.map +0 -1
- package/dist/pol.d-CeRgXBL8.d.ts +0 -167
- package/dist/txnEnum-ByI5dtDi.d.ts +0 -106
- package/dist/types/bribe-boost.d.ts +0 -69
- package/dist/types/bribeBoost.d.ts +0 -69
- package/dist/types/dex.d.ts +0 -225
- package/dist/types/enso.d.ts +0 -76
- package/dist/types/global.d.ts +0 -198
- package/dist/types/governance.d.ts +0 -112
- package/dist/types/honeySwap.d.ts +0 -23
- package/dist/types/pol.d.ts +0 -78
- package/dist/types/staking.d.ts +0 -22
- package/dist/useHoneySwapState-CXVWAThr.d.ts +0 -32
- package/dist/useHoneySwapState-twi7NTaO.d.ts +0 -32
- package/dist/utils/createEmitter.unit.test.d.ts +0 -2
- package/dist/utils/createEmitter.unit.test.d.ts.map +0 -1
- package/dist/utils/formatIncentivesTokenMap.d.ts +0 -3
- package/dist/utils/formatIncentivesTokenMap.d.ts.map +0 -1
- package/dist/utils/formatNumber.unit.test.d.ts +0 -2
- package/dist/utils/formatNumber.unit.test.d.ts.map +0 -1
- package/dist/utils/formatTimestamps.unit.test.d.ts +0 -2
- package/dist/utils/formatTimestamps.unit.test.d.ts.map +0 -1
- package/dist/utils/getContractName.unit.test.d.ts +0 -2
- package/dist/utils/getContractName.unit.test.d.ts.map +0 -1
- package/dist/utils/getHoneySwapMessage.test.d.ts +0 -2
- package/dist/utils/getHoneySwapMessage.test.d.ts.map +0 -1
- package/dist/utils/layerZeroScan.d.ts +0 -39
- package/dist/utils/layerZeroScan.d.ts.map +0 -1
- package/dist/utils/math.unit.test.d.ts +0 -2
- package/dist/utils/math.unit.test.d.ts.map +0 -1
- package/dist/utils/parseBaseArgs.unit.test.d.ts +0 -2
- package/dist/utils/parseBaseArgs.unit.test.d.ts.map +0 -1
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts +0 -2
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts.map +0 -1
- package/dist/utils/time.unit.test.d.ts +0 -2
- package/dist/utils/time.unit.test.d.ts.map +0 -1
- package/dist/utils/tokens.unit.test.d.ts +0 -2
- package/dist/utils/tokens.unit.test.d.ts.map +0 -1
- package/dist/utils/truncateHash.unit.test.d.ts +0 -2
- package/dist/utils/truncateHash.unit.test.d.ts.map +0 -1
- package/src/actions/enso/getEnsoSwapBundle.ts +0 -72
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +0 -28
- package/src/actions/pol/getRewardProofsByValidator.ts +0 -49
- package/src/actions/pol/getStakedBeraAPR.ts +0 -56
- package/src/actions/pol/getUserClaimableIncentives.ts +0 -40
- package/src/actions/validators/getValidatorAnalytics.ts +0 -37
- package/src/hooks/enso/useEnsoSwapBundle.ts +0 -121
- package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +0 -34
- package/src/hooks/validators/useUserClaimableIncentives.ts +0 -148
- package/src/hooks/validators/useValidatorAnalytics.ts +0 -37
- package/src/utils/formatIncentivesTokenMap.ts +0 -19
- package/src/utils/layerZeroScan.ts +0 -124
- /package/dist/{chunk-AEN6IJFU.mjs.map → chunk-7KN7TDUC.mjs.map} +0 -0
- /package/dist/{chunk-LE4CYW7S.mjs.map → chunk-FWRYUIJK.mjs.map} +0 -0
- /package/dist/{chunk-PJRLHTGC.mjs.map → chunk-HPRLNT6R.mjs.map} +0 -0
- /package/dist/{chunk-EJIGERYM.mjs.map → chunk-M3MIGSH3.mjs.map} +0 -0
- /package/dist/{chunk-TGN55GKE.mjs.map → chunk-SC3BSCTN.mjs.map} +0 -0
- /package/dist/{chunk-QQASX4LJ.mjs.map → chunk-TXWDUJOY.mjs.map} +0 -0
- /package/dist/{chunk-EGAB6NFQ.mjs.map → chunk-UWJQ6UKG.mjs.map} +0 -0
- /package/dist/{chunk-J3LTASDE.mjs.map → chunk-ZHV3MQ4F.mjs.map} +0 -0
package/dist/types/enso.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { BundleData, EnsoClient } from "@ensofinance/sdk";
|
|
2
|
-
import type { Address, Hex, PublicClient, TransactionRequest } from "viem";
|
|
3
|
-
|
|
4
|
-
import type { MinimalERC20 } from "./dex";
|
|
5
|
-
|
|
6
|
-
export type Quantity = string | number;
|
|
7
|
-
export type ActionOutputReference<T> = T | StrictOutputReference<T>;
|
|
8
|
-
type StrictOutputReference<T> = {
|
|
9
|
-
useOutputOfCallAt: number;
|
|
10
|
-
index?: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export interface GetEnsoSwapBundleArgs {
|
|
14
|
-
fromAddress: Address;
|
|
15
|
-
amountIn: Quantity;
|
|
16
|
-
tokenIn: Address;
|
|
17
|
-
tokenOut: Address;
|
|
18
|
-
chainId: number;
|
|
19
|
-
ensoClient: EnsoClient;
|
|
20
|
-
slippage: number;
|
|
21
|
-
destinationChainId?: number;
|
|
22
|
-
publicClient: PublicClient;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type GetZapTransaction = TransactionRequest & {
|
|
26
|
-
to: Address;
|
|
27
|
-
data: Hex;
|
|
28
|
-
value?: bigint;
|
|
29
|
-
gasLimit?: bigint;
|
|
30
|
-
};
|
|
31
|
-
export type GetZapTransactions = GetZapTransaction[];
|
|
32
|
-
export interface GetZapTransactionsArgs {
|
|
33
|
-
fromAddress: Address;
|
|
34
|
-
amountIn: Quantity;
|
|
35
|
-
tokenIn: Address;
|
|
36
|
-
chainId: number;
|
|
37
|
-
ensoClient: EnsoClient;
|
|
38
|
-
bundle: BundleData;
|
|
39
|
-
publicClient: PublicClient;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface GetEnsoWalletTransactionsWithApprovalArgs {
|
|
43
|
-
fromAddress: Address;
|
|
44
|
-
amountIn: Quantity;
|
|
45
|
-
tokenIn: MinimalERC20;
|
|
46
|
-
bundle: BundleData;
|
|
47
|
-
publicClient: PublicClient;
|
|
48
|
-
}
|
|
49
|
-
export interface GetZapTransactionResponse {
|
|
50
|
-
bundle: BundleData;
|
|
51
|
-
transactions: GetZapTransactions;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface BendPositionEstimate {
|
|
55
|
-
/**
|
|
56
|
-
* Collateral amount in human-readable format.
|
|
57
|
-
* For multiply: total collateral after leveraging.
|
|
58
|
-
* For demultiply: collateral reduction from unwinding.
|
|
59
|
-
*/
|
|
60
|
-
finalCollateral: string;
|
|
61
|
-
/**
|
|
62
|
-
* Borrow amount in loan tokens (human-readable).
|
|
63
|
-
* For multiply: total debt after leveraging.
|
|
64
|
-
* For demultiply: debt reduction from unwinding.
|
|
65
|
-
*/
|
|
66
|
-
totalBorrow: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface BendMultiplyBundleResponse extends GetZapTransactionResponse {
|
|
70
|
-
positionEstimate: BendPositionEstimate;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface BendDemultiplyBundleResponse
|
|
74
|
-
extends GetZapTransactionResponse {
|
|
75
|
-
positionEstimate: BendPositionEstimate;
|
|
76
|
-
}
|
package/dist/types/global.d.ts
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import type { Config, GetWalletClientReturnType } from "@wagmi/core";
|
|
2
|
-
import type {
|
|
3
|
-
Abi,
|
|
4
|
-
Account,
|
|
5
|
-
Address,
|
|
6
|
-
ContractFunctionArgs,
|
|
7
|
-
ContractFunctionName,
|
|
8
|
-
Hex,
|
|
9
|
-
TransactionReceipt,
|
|
10
|
-
WalletCallReceipt,
|
|
11
|
-
} from "viem";
|
|
12
|
-
|
|
13
|
-
import type { BeraConfig, ChainId } from "@berachain/config";
|
|
14
|
-
|
|
15
|
-
import type {
|
|
16
|
-
BeraSwrResponse,
|
|
17
|
-
SWRConfiguration,
|
|
18
|
-
} from "@berachain/utils/pkg/swr";
|
|
19
|
-
|
|
20
|
-
import type { ContractName } from "../enum/contracts";
|
|
21
|
-
import type { TransactionActionType } from "../enum/txnEnum";
|
|
22
|
-
import type {
|
|
23
|
-
IUseContractWriteArgs,
|
|
24
|
-
TxnEventKeys,
|
|
25
|
-
} from "../hooks/useContractWrite/types";
|
|
26
|
-
|
|
27
|
-
export type DefaultHookOptions = SWRConfiguration & { isEnabled?: boolean };
|
|
28
|
-
|
|
29
|
-
export type DefaultHookReturnType<T = any> = BeraSwrResponse<T, any>;
|
|
30
|
-
|
|
31
|
-
export type IContractWriteFn = <
|
|
32
|
-
abi extends Abi | undefined = undefined,
|
|
33
|
-
functionName extends abi extends Abi
|
|
34
|
-
? ContractFunctionName<abi>
|
|
35
|
-
: never = abi extends Abi ? ContractFunctionName<abi> : never,
|
|
36
|
-
params extends abi extends Abi
|
|
37
|
-
? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>
|
|
38
|
-
: never = abi extends Abi
|
|
39
|
-
? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>
|
|
40
|
-
: never,
|
|
41
|
-
>(
|
|
42
|
-
props: IContractWrite<abi, functionName, params>,
|
|
43
|
-
) => Promise<
|
|
44
|
-
| TransactionReceipt
|
|
45
|
-
| WalletCallReceipt<bigint, "success" | "reverted">
|
|
46
|
-
| undefined
|
|
47
|
-
>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Posthog must be able to serialize this. BigInts are not supported.
|
|
51
|
-
*/
|
|
52
|
-
type AllowedEventData = number | string | boolean | null | undefined;
|
|
53
|
-
|
|
54
|
-
type EventData = Record<
|
|
55
|
-
string,
|
|
56
|
-
| AllowedEventData
|
|
57
|
-
| AllowedEventData[]
|
|
58
|
-
| Record<
|
|
59
|
-
string,
|
|
60
|
-
| AllowedEventData
|
|
61
|
-
| AllowedEventData[]
|
|
62
|
-
| Record<string, AllowedEventData | AllowedEventData[]>
|
|
63
|
-
>
|
|
64
|
-
>;
|
|
65
|
-
|
|
66
|
-
export type IContractWrite<
|
|
67
|
-
abi extends Abi | undefined = undefined,
|
|
68
|
-
functionName extends abi extends Abi
|
|
69
|
-
? ContractFunctionName<abi>
|
|
70
|
-
: never = abi extends Abi ? ContractFunctionName<abi> : never,
|
|
71
|
-
params extends abi extends Abi
|
|
72
|
-
? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>
|
|
73
|
-
: never = abi extends Abi
|
|
74
|
-
? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>
|
|
75
|
-
: never,
|
|
76
|
-
> = {
|
|
77
|
-
/**
|
|
78
|
-
* A message that will be shown to user while the transaction is pending.
|
|
79
|
-
*
|
|
80
|
-
* @example "Sending approvals"
|
|
81
|
-
*/
|
|
82
|
-
message: string;
|
|
83
|
-
/**
|
|
84
|
-
* The chain ID of the transaction.
|
|
85
|
-
*
|
|
86
|
-
* @default berachainChainId
|
|
87
|
-
*/
|
|
88
|
-
chainId?: ChainId;
|
|
89
|
-
/**
|
|
90
|
-
* The type of transaction to be performed. It will be stored in the transaction history.
|
|
91
|
-
*
|
|
92
|
-
* Generally uses infinite tense.
|
|
93
|
-
* @example TransactionActionType.APPROVAL => "Approve tokens"
|
|
94
|
-
*/
|
|
95
|
-
actionType: TransactionActionType;
|
|
96
|
-
txnName?: string;
|
|
97
|
-
gasLimit?: bigint;
|
|
98
|
-
account?: Account | Address;
|
|
99
|
-
/**
|
|
100
|
-
* Wheter the transaction can be sent by any account. Before setting this to true, make sure smart contract doesn't rely on `msg.sender`.
|
|
101
|
-
*
|
|
102
|
-
* Only transaction with permissionless flag set to true can be sent with overriden account.
|
|
103
|
-
* Everything else will throw an error.
|
|
104
|
-
*/
|
|
105
|
-
permissionless?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* The event to be tracked more specifically.
|
|
108
|
-
* If not provided, the event will be tracked with the message and actionType.
|
|
109
|
-
*/
|
|
110
|
-
track?: {
|
|
111
|
-
eventName: string;
|
|
112
|
-
eventData?: EventData;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* A wagmi config used to get wallet clients, switch chains, etc.
|
|
117
|
-
*
|
|
118
|
-
* This is preferred over providing clients as state updates are kept synched in this config object w/o re-rendering.
|
|
119
|
-
*/
|
|
120
|
-
wagmiConfig?: Config;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* walletClient should only be provided for tests or scripts.
|
|
124
|
-
*
|
|
125
|
-
* Wagmi Config is preferred.
|
|
126
|
-
*/
|
|
127
|
-
walletClient?: GetWalletClientReturnType | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* The name of the contract to be used for the transaction. By default, it will be devrel's contract mapping.
|
|
130
|
-
* Custom values will be ignored if the address is already mapped in the devrel's contract mapping.
|
|
131
|
-
*
|
|
132
|
-
* @example "pol.rewardVault"
|
|
133
|
-
*/
|
|
134
|
-
contractName?: ContractName;
|
|
135
|
-
/**
|
|
136
|
-
* This is a canonical list of ABIs that will be used to parse the error.
|
|
137
|
-
*
|
|
138
|
-
* This is an useful way to parse errors when providing raw data with no ABI.
|
|
139
|
-
*/
|
|
140
|
-
errorsAbi?: Abi;
|
|
141
|
-
} & IUseContractWriteArgs<abi, functionName, params> &
|
|
142
|
-
(abi extends Abi
|
|
143
|
-
? {
|
|
144
|
-
abi: abi;
|
|
145
|
-
functionName: functionName;
|
|
146
|
-
params: params;
|
|
147
|
-
address: Address;
|
|
148
|
-
calls?: never;
|
|
149
|
-
value?: bigint;
|
|
150
|
-
}
|
|
151
|
-
:
|
|
152
|
-
| {
|
|
153
|
-
data: Hex;
|
|
154
|
-
address: Address;
|
|
155
|
-
value?: bigint;
|
|
156
|
-
calls?: never;
|
|
157
|
-
}
|
|
158
|
-
| {
|
|
159
|
-
value: bigint;
|
|
160
|
-
address: Address;
|
|
161
|
-
data?: Hex;
|
|
162
|
-
calls?: never;
|
|
163
|
-
}
|
|
164
|
-
| {
|
|
165
|
-
value?: never;
|
|
166
|
-
address?: never;
|
|
167
|
-
calls: (Omit<
|
|
168
|
-
IContractWrite,
|
|
169
|
-
| "calls"
|
|
170
|
-
| "gasLimit"
|
|
171
|
-
| "account"
|
|
172
|
-
| "address"
|
|
173
|
-
| "message"
|
|
174
|
-
| "actionType"
|
|
175
|
-
| TxnEventKeys
|
|
176
|
-
> & {
|
|
177
|
-
address: Address;
|
|
178
|
-
})[];
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
declare global {
|
|
182
|
-
export namespace BeraJS {
|
|
183
|
-
export type BaseFunctionArgs = {
|
|
184
|
-
/**
|
|
185
|
-
* If only chainId is provided, config will be inferred from it
|
|
186
|
-
*
|
|
187
|
-
* @default `import { defaultChainId } from "@berachain/config/internal";`
|
|
188
|
-
*/
|
|
189
|
-
chainId?: ChainId;
|
|
190
|
-
/**
|
|
191
|
-
* A config to infer the default values of the other arguments
|
|
192
|
-
*
|
|
193
|
-
* @default chainConfigs[chainId]
|
|
194
|
-
*/
|
|
195
|
-
config?: BeraConfig;
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { AbiFunction, Address, Hex } from "viem";
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
ProposalVoteFragment,
|
|
5
|
-
ProposalWithVotesFragment,
|
|
6
|
-
} from "@berachain/graphql/governance";
|
|
7
|
-
|
|
8
|
-
import type { ProposalErrorCodes, ProposalTypeEnum } from "../enum/governance";
|
|
9
|
-
|
|
10
|
-
export type Proposal = ProposalWithVotesFragment;
|
|
11
|
-
|
|
12
|
-
export type Vote = ProposalVoteFragment;
|
|
13
|
-
|
|
14
|
-
export type Voter = Address;
|
|
15
|
-
|
|
16
|
-
export type ProposalVotes = {
|
|
17
|
-
yes: number;
|
|
18
|
-
no: number;
|
|
19
|
-
abstain: number;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
|
|
23
|
-
|
|
24
|
-
export type CustomProposalActionErrors = {
|
|
25
|
-
type?: null | ProposalErrorCodes;
|
|
26
|
-
target?: null | ProposalErrorCodes;
|
|
27
|
-
value?: null | ProposalErrorCodes;
|
|
28
|
-
ABI?: null | ProposalErrorCodes;
|
|
29
|
-
functionSignature?: null | ProposalErrorCodes;
|
|
30
|
-
args?: (null | ProposalErrorCodes)[];
|
|
31
|
-
vault?: null | ProposalErrorCodes;
|
|
32
|
-
isFriend?: null | ProposalErrorCodes;
|
|
33
|
-
to?: null | ProposalErrorCodes;
|
|
34
|
-
amount?: null | ProposalErrorCodes;
|
|
35
|
-
minIncentiveRate?: null | ProposalErrorCodes;
|
|
36
|
-
managerAddress?: null | ProposalErrorCodes;
|
|
37
|
-
input?: null | ProposalErrorCodes;
|
|
38
|
-
token?: null | ProposalErrorCodes;
|
|
39
|
-
rawCalldata?: null | ProposalErrorCodes;
|
|
40
|
-
message?: null | ProposalErrorCodes;
|
|
41
|
-
} | null;
|
|
42
|
-
|
|
43
|
-
export type CustomProposalErrors = {
|
|
44
|
-
title?: null | ProposalErrorCodes;
|
|
45
|
-
description?: null | ProposalErrorCodes;
|
|
46
|
-
forumLink?: null | ProposalErrorCodes;
|
|
47
|
-
actions?: CustomProposalActionErrors[];
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type GovernanceTopic = {
|
|
51
|
-
id: PROPOSAL_GENRE;
|
|
52
|
-
color: string;
|
|
53
|
-
icon: React.ReactNode;
|
|
54
|
-
iconBackground?: string;
|
|
55
|
-
name: string;
|
|
56
|
-
slug: string;
|
|
57
|
-
forumLink: string;
|
|
58
|
-
description?: string;
|
|
59
|
-
comingSoon?: boolean;
|
|
60
|
-
};
|
|
61
|
-
export type CustomProposal = {
|
|
62
|
-
title: string;
|
|
63
|
-
description: any;
|
|
64
|
-
actions: ProposalAction[];
|
|
65
|
-
forumLink: string;
|
|
66
|
-
topic: Set<PROPOSAL_GENRE>;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type SafeProposalAction = {
|
|
70
|
-
value: bigint;
|
|
71
|
-
target: "" | Address;
|
|
72
|
-
} & (
|
|
73
|
-
| {
|
|
74
|
-
type: ProposalTypeEnum.CUSTOM_PROPOSAL;
|
|
75
|
-
input: "ABI" | "rawCalldata" | "message";
|
|
76
|
-
ABI: string;
|
|
77
|
-
_isVerifiedAbi?: boolean;
|
|
78
|
-
functionSignature: string;
|
|
79
|
-
args: string[];
|
|
80
|
-
rawCalldata: Hex;
|
|
81
|
-
message: string;
|
|
82
|
-
}
|
|
83
|
-
| {
|
|
84
|
-
type:
|
|
85
|
-
| ProposalTypeEnum.WHITELIST_REWARD_VAULT
|
|
86
|
-
| ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
|
|
87
|
-
vault: Address;
|
|
88
|
-
}
|
|
89
|
-
| {
|
|
90
|
-
type: ProposalTypeEnum.ERC20_TRANSFER;
|
|
91
|
-
to: Address;
|
|
92
|
-
amount: string;
|
|
93
|
-
}
|
|
94
|
-
| {
|
|
95
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
|
|
96
|
-
vault: Address;
|
|
97
|
-
token: Address;
|
|
98
|
-
minIncentiveRate: string;
|
|
99
|
-
managerAddress: Address;
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
export type ProposalAction = Partial<SafeProposalAction> & {
|
|
104
|
-
type: SafeProposalAction["type"];
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export type VerifiedAbi = {
|
|
108
|
-
abiItem?: AbiFunction;
|
|
109
|
-
functionName?: string;
|
|
110
|
-
args: readonly unknown[];
|
|
111
|
-
functionSignature?: string;
|
|
112
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Address, Hex } from "viem";
|
|
2
|
-
|
|
3
|
-
import type { HoneyPreviewResult } from "../actions/honey/getHoneyPreview";
|
|
4
|
-
import type { TokenWithOrder } from "../contexts/HoneyConfigProvider";
|
|
5
|
-
import type { HoneySwapAction } from "../enum/honey";
|
|
6
|
-
|
|
7
|
-
export type PythPriceFeedMap = Record<Address, Hex>;
|
|
8
|
-
|
|
9
|
-
export type HoneySwapActions =
|
|
10
|
-
| { type: HoneySwapAction.RESET_AMOUNTS }
|
|
11
|
-
| { type: HoneySwapAction.ACTION_TYPE_CHANGE; value: "mint" | "redeem" }
|
|
12
|
-
| { type: HoneySwapAction.COLLATERALS_CHANGE; value: TokenWithOrder[] }
|
|
13
|
-
| { type: HoneySwapAction.FROM_AMOUNT_CHANGE; index: number; value: string }
|
|
14
|
-
| { type: HoneySwapAction.TO_AMOUNT_CHANGE; index: number; value: string }
|
|
15
|
-
| {
|
|
16
|
-
type: HoneySwapAction.PREVIEW_CHANGE;
|
|
17
|
-
value: HoneyPreviewResult;
|
|
18
|
-
changedAsset: Address;
|
|
19
|
-
}
|
|
20
|
-
| { type: HoneySwapAction.IS_BASKET_MODE_ENABLED_CHANGE; value: boolean }
|
|
21
|
-
| { type: HoneySwapAction.IS_TYPING_CHANGE; value: boolean }
|
|
22
|
-
| { type: HoneySwapAction.IS_SUBMITTING_CHANGE; value: boolean }
|
|
23
|
-
| { type: HoneySwapAction.IS_LOADING_CHANGE; value: boolean };
|
package/dist/types/pol.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
|
|
3
|
-
import type { ApiValidatorFragment } from "@berachain/graphql/pol/api";
|
|
4
|
-
|
|
5
|
-
import type { Token, TokenWithMetadata } from "./dex";
|
|
6
|
-
|
|
7
|
-
export type IncentiveReward = {
|
|
8
|
-
tokenMetadata: Token | undefined;
|
|
9
|
-
tokenPrice: number;
|
|
10
|
-
tokenValue: number;
|
|
11
|
-
id: string;
|
|
12
|
-
dist_id: string;
|
|
13
|
-
token: string;
|
|
14
|
-
recipient: string;
|
|
15
|
-
formattedAmount: string;
|
|
16
|
-
amount: string;
|
|
17
|
-
merkle_proof: string[];
|
|
18
|
-
available_at: number;
|
|
19
|
-
};
|
|
20
|
-
export interface IncentiveRewardChunksWithValidatorData {
|
|
21
|
-
validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
|
|
22
|
-
maxTimestamp: number | undefined;
|
|
23
|
-
minTimestamp: number | undefined;
|
|
24
|
-
totalValue: number;
|
|
25
|
-
tokenTotals: {
|
|
26
|
-
chainId: number;
|
|
27
|
-
address: Address;
|
|
28
|
-
amount: number;
|
|
29
|
-
value: number;
|
|
30
|
-
metadata: Token | undefined;
|
|
31
|
-
}[];
|
|
32
|
-
rewards: IncentiveReward[];
|
|
33
|
-
isCurrent: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface AggregatedTokenTotals {
|
|
37
|
-
address: Address;
|
|
38
|
-
amount: number;
|
|
39
|
-
value: number;
|
|
40
|
-
metadata: Token | undefined;
|
|
41
|
-
chainId: number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type ClaimedIncentives = Record<string, string>;
|
|
45
|
-
|
|
46
|
-
export type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
47
|
-
|
|
48
|
-
export interface UserVaultInfo {
|
|
49
|
-
balance: bigint;
|
|
50
|
-
delegatedBalance: bigint;
|
|
51
|
-
withdrawableBalance: bigint;
|
|
52
|
-
rewards: string;
|
|
53
|
-
percentage: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type StakedBeraAsset = {
|
|
57
|
-
token: TokenWithMetadata;
|
|
58
|
-
/**
|
|
59
|
-
* Staking APR, or `undefined` when unavailable (e.g. the APR backend is
|
|
60
|
-
* down). `undefined` lets the UI render a "—" placeholder instead of a
|
|
61
|
-
* misleading "0%".
|
|
62
|
-
*/
|
|
63
|
-
apr: number | undefined;
|
|
64
|
-
stakedAmount: number;
|
|
65
|
-
/**
|
|
66
|
-
* USD value of the staked amount, or `undefined` when the token price is
|
|
67
|
-
* unavailable (e.g. the price backend is down). `undefined` lets the UI
|
|
68
|
-
* render a "—" placeholder instead of a misleading "$0.00".
|
|
69
|
-
*/
|
|
70
|
-
stakedAmountUsd: number | undefined;
|
|
71
|
-
earnedAmount: number;
|
|
72
|
-
/**
|
|
73
|
-
* USD value of the earned amount, or `undefined` when the token price is
|
|
74
|
-
* unavailable. See {@link stakedAmountUsd}.
|
|
75
|
-
*/
|
|
76
|
-
earnedAmountUsd: number | undefined;
|
|
77
|
-
isLoadingEarnings?: boolean;
|
|
78
|
-
};
|
package/dist/types/staking.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { TokenWithMetadata } from "./dex";
|
|
2
|
-
|
|
3
|
-
export interface ProtocolMetadata {
|
|
4
|
-
name: string;
|
|
5
|
-
logoURI: string;
|
|
6
|
-
url: string;
|
|
7
|
-
description: string;
|
|
8
|
-
tags?: string[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Configuration for a single staking option.
|
|
13
|
-
* Maps receipt tokens to their accepted input tokens.
|
|
14
|
-
*/
|
|
15
|
-
export type StakingConfig = {
|
|
16
|
-
/** Unique identifier for this staking config */
|
|
17
|
-
id: string;
|
|
18
|
-
/** The token received when staking (e.g., sWBERA, siBERA) */
|
|
19
|
-
receiptToken: TokenWithMetadata;
|
|
20
|
-
/** Tokens that can be staked to receive the receipt token */
|
|
21
|
-
inputTokens: TokenWithMetadata[];
|
|
22
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-COOuDNra.js';
|
|
3
|
-
|
|
4
|
-
interface IHoneySwapState {
|
|
5
|
-
actionType: "mint" | "redeem";
|
|
6
|
-
/**
|
|
7
|
-
* List of current collaterals
|
|
8
|
-
*/
|
|
9
|
-
collaterals: TokenWithOrder[];
|
|
10
|
-
fromAmount: string[];
|
|
11
|
-
toAmount: string[];
|
|
12
|
-
isBasketModeEnabled: boolean | undefined;
|
|
13
|
-
isTyping: boolean;
|
|
14
|
-
isSubmitting: boolean;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function reducer(state: IHoneySwapState, action: HoneySwapActions): IHoneySwapState;
|
|
18
|
-
declare function useHoneySwapState(): {
|
|
19
|
-
state: {
|
|
20
|
-
collaterals: TokenWithOrder[];
|
|
21
|
-
actionType: "mint" | "redeem";
|
|
22
|
-
fromAmount: string[];
|
|
23
|
-
toAmount: string[];
|
|
24
|
-
isBasketModeEnabled: boolean | undefined;
|
|
25
|
-
isTyping: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
};
|
|
29
|
-
dispatch: react.ActionDispatch<[action: HoneySwapActions]>;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { type IHoneySwapState as I, reducer as r, useHoneySwapState as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-COOuDNra.js';
|
|
3
|
-
|
|
4
|
-
interface IHoneySwapState {
|
|
5
|
-
actionType: "mint" | "redeem";
|
|
6
|
-
/**
|
|
7
|
-
* List of current collaterals
|
|
8
|
-
*/
|
|
9
|
-
collaterals: TokenWithOrder[];
|
|
10
|
-
fromAmount: string[];
|
|
11
|
-
toAmount: string[];
|
|
12
|
-
isBasketModeEnabled: boolean | undefined;
|
|
13
|
-
isTyping: boolean;
|
|
14
|
-
isSubmitting: boolean;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function reducer(state: IHoneySwapState, action: HoneySwapActions): IHoneySwapState;
|
|
18
|
-
declare const useHoneySwapState: () => {
|
|
19
|
-
state: {
|
|
20
|
-
collaterals: TokenWithOrder[];
|
|
21
|
-
actionType: "mint" | "redeem";
|
|
22
|
-
fromAmount: string[];
|
|
23
|
-
toAmount: string[];
|
|
24
|
-
isBasketModeEnabled: boolean | undefined;
|
|
25
|
-
isTyping: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
};
|
|
29
|
-
dispatch: react.ActionDispatch<[action: HoneySwapActions]>;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { type IHoneySwapState as I, reducer as r, useHoneySwapState as u };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createEmitter.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/createEmitter.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatIncentivesTokenMap.d.ts","sourceRoot":"","sources":["../../src/utils/formatIncentivesTokenMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,oBAAoB,EAAE,GACjC,GAAG,CAAC,MAAM,CAAC,CAcb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatNumber.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/formatNumber.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatTimestamps.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/formatTimestamps.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getContractName.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/getContractName.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getHoneySwapMessage.test.d.ts","sourceRoot":"","sources":["../../src/utils/getHoneySwapMessage.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare enum LayerZeroMessageStatus {
|
|
2
|
-
INFLIGHT = "INFLIGHT",
|
|
3
|
-
DELIVERED = "DELIVERED",
|
|
4
|
-
FAILED = "FAILED"
|
|
5
|
-
}
|
|
6
|
-
export type LayerZeroMessage = {
|
|
7
|
-
srcUaAddress: string;
|
|
8
|
-
dstUaAddress: string;
|
|
9
|
-
srcChainId: number;
|
|
10
|
-
dstChainId: number;
|
|
11
|
-
dstTxHash?: string;
|
|
12
|
-
dstTxError?: string;
|
|
13
|
-
srcTxHash?: string;
|
|
14
|
-
srcBlockHash?: string;
|
|
15
|
-
srcBlockNumber?: string;
|
|
16
|
-
srcUaNonce: number;
|
|
17
|
-
status: LayerZeroMessageStatus;
|
|
18
|
-
};
|
|
19
|
-
export type LayerZeroDeliveredMessage = LayerZeroMessage & {
|
|
20
|
-
dstTxHash: string;
|
|
21
|
-
};
|
|
22
|
-
export type WaitForMessageReceivedOptions = {
|
|
23
|
-
pollInterval?: number;
|
|
24
|
-
timeout?: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Polls LayerZero scan API until the cross-chain message is delivered or fails.
|
|
28
|
-
* HTTP errors are silently retried until timeout.
|
|
29
|
-
*
|
|
30
|
-
* @param srcTxHash - The source transaction hash to track
|
|
31
|
-
* @param options - Configuration options
|
|
32
|
-
* @param options.pollInterval - Polling interval in ms (default: 3000)
|
|
33
|
-
* @param options.timeout - Timeout in ms (default: 600000 / 10 minutes)
|
|
34
|
-
* @returns The delivered message with destination tx hash
|
|
35
|
-
* @throws InvalidArgumentError if srcTxHash is missing
|
|
36
|
-
* @throws BeraError if message fails, times out, or multiple messages found
|
|
37
|
-
*/
|
|
38
|
-
export declare function waitForLayerZeroMessageReceived(srcTxHash: string, options?: WaitForMessageReceivedOptions): Promise<LayerZeroDeliveredMessage>;
|
|
39
|
-
//# sourceMappingURL=layerZeroScan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layerZeroScan.d.ts","sourceRoot":"","sources":["../../src/utils/layerZeroScan.ts"],"names":[],"mappings":"AAOA,oBAAY,sBAAsB;IAChC,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAoBF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,yBAAyB,CAAC,CAsDpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/math.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseBaseArgs.unit.test.d.ts","sourceRoot":"","sources":["../../src/utils/parseBaseArgs.unit.test.ts"],"names":[],"mappings":""}
|