@berachain/berajs 0.2.12 → 0.2.13
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/{RequestError-DBOIV65x.d.ts → RequestError-DkUbo3ro.d.ts} +1 -0
- package/dist/abi/bend/bundler.d.ts +100 -0
- package/dist/abi/bend/bundler.d.ts.map +1 -0
- package/dist/abi/bend/generalAdapter.d.ts +651 -0
- package/dist/abi/bend/generalAdapter.d.ts.map +1 -0
- package/dist/abi/bend/morphoVault.d.ts +1991 -0
- package/dist/abi/bend/morphoVault.d.ts.map +1 -0
- package/dist/abi/bend/publicAllocator.d.ts +448 -0
- package/dist/abi/bend/publicAllocator.d.ts.map +1 -0
- package/dist/abi/enso/ensoRouterAbi.d.ts +215 -0
- package/dist/abi/enso/ensoRouterAbi.d.ts.map +1 -0
- package/dist/abi/enso/ensoWalletV2Factory.d.ts +16 -0
- package/dist/abi/enso/ensoWalletV2Factory.d.ts.map +1 -0
- package/dist/abi/exports.d.ts +13 -6574
- package/dist/abi/exports.d.ts.map +1 -0
- package/dist/abi/exports.mjs +4 -3
- package/dist/abi/exports.mjs.map +1 -0
- package/dist/abi/pyth/pyth.d.ts +434 -0
- package/dist/abi/pyth/pyth.d.ts.map +1 -0
- package/dist/abi/pyth/pythErrors.d.ts +58 -0
- package/dist/abi/pyth/pythErrors.d.ts.map +1 -0
- package/dist/abi/utils/EIP7702StatelessDelegator.d.ts +799 -0
- package/dist/abi/utils/EIP7702StatelessDelegator.d.ts.map +1 -0
- package/dist/abi/utils/bundler3errors.d.ts +18 -0
- package/dist/abi/utils/bundler3errors.d.ts.map +1 -0
- package/dist/abi/utils/commonAbiErrors.d.ts +302 -0
- package/dist/abi/utils/commonAbiErrors.d.ts.map +1 -0
- package/dist/abi/utils/erc20errors.d.ts +167 -0
- package/dist/abi/utils/erc20errors.d.ts.map +1 -0
- package/dist/abi/utils/merkleDistributor.d.ts +655 -0
- package/dist/abi/utils/merkleDistributor.d.ts.map +1 -0
- package/dist/abi/utils/multicall3.d.ts +337 -0
- package/dist/abi/utils/multicall3.d.ts.map +1 -0
- package/dist/abi/utils/openChainErrors.d.ts +126 -0
- package/dist/abi/utils/openChainErrors.d.ts.map +1 -0
- package/dist/abi/utils/thirdwebMinimalAccount.d.ts +869 -0
- package/dist/abi/utils/thirdwebMinimalAccount.d.ts.map +1 -0
- package/dist/abi/utils/upgradableBeacon.d.ts +97 -0
- package/dist/abi/utils/upgradableBeacon.d.ts.map +1 -0
- package/dist/actions/__test/transports.d.ts +18 -0
- package/dist/actions/__test/transports.d.ts.map +1 -0
- package/dist/actions/bend/getConvertToAssets.d.ts +11 -0
- package/dist/actions/bend/getConvertToAssets.d.ts.map +1 -0
- package/dist/actions/bend/getMaxDeposit.d.ts +26 -0
- package/dist/actions/bend/getMaxDeposit.d.ts.map +1 -0
- package/dist/actions/clients/BeraApolloClient.d.ts +28 -0
- package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -0
- package/dist/actions/clients/exports.d.ts +4 -62
- package/dist/actions/clients/exports.d.ts.map +1 -0
- package/dist/actions/clients/exports.mjs +11 -10
- package/dist/actions/clients/exports.mjs.map +1 -0
- package/dist/actions/clients/fetchBeep.d.ts +12 -0
- package/dist/actions/clients/fetchBeep.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.d.ts +48 -0
- package/dist/actions/clients/fetchOpenApi.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts +2 -0
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts.map +1 -0
- package/dist/actions/clients/getApolloClient.d.ts +11 -0
- package/dist/actions/clients/getApolloClient.d.ts.map +1 -0
- package/dist/actions/clients/getEnsoClient.d.ts +11 -0
- package/dist/actions/clients/getEnsoClient.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/base.d.ts +89 -0
- package/dist/actions/dex/aggregators/base.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/bex.d.ts +26 -0
- package/dist/actions/dex/aggregators/bex.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/bgt.d.ts +17 -0
- package/dist/actions/dex/aggregators/bgt.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/enso.d.ts +15 -0
- package/dist/actions/dex/aggregators/enso/enso.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts +14 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts +2 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/erc4626.d.ts +32 -0
- package/dist/actions/dex/aggregators/erc4626.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/fly.d.ts +14 -0
- package/dist/actions/dex/aggregators/fly.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/haiku.d.ts +14 -0
- package/dist/actions/dex/aggregators/haiku.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts +2 -0
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/honey.d.ts +32 -0
- package/dist/actions/dex/aggregators/honey.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/kyberswap.d.ts +14 -0
- package/dist/actions/dex/aggregators/kyberswap.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/oogabooga.d.ts +13 -0
- package/dist/actions/dex/aggregators/oogabooga.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/openOcean.d.ts +15 -0
- package/dist/actions/dex/aggregators/openOcean.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/wbera.d.ts +17 -0
- package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -0
- package/dist/actions/dex/b-sdk.d.ts +3 -0
- package/dist/actions/dex/bSdk.d.ts +3 -0
- package/dist/actions/dex/bSdk.d.ts.map +1 -0
- package/dist/actions/dex/getAllPools.d.ts +58 -0
- package/dist/actions/dex/getAllPools.d.ts.map +1 -0
- package/dist/actions/dex/getApiPool.d.ts +390 -0
- package/dist/actions/dex/getApiPool.d.ts.map +1 -0
- package/dist/actions/dex/getGlobalLiquidityAndSwapVolume.d.ts +3 -0
- package/dist/actions/dex/getGlobalLiquidityAndSwapVolume.d.ts.map +1 -0
- package/dist/actions/dex/getOnChainPool.d.ts +42 -0
- package/dist/actions/dex/getOnChainPool.d.ts.map +1 -0
- package/dist/actions/dex/getPoolEvents.d.ts +7 -0
- package/dist/actions/dex/getPoolEvents.d.ts.map +1 -0
- package/dist/actions/dex/getPoolHistoricalData.d.ts +15 -0
- package/dist/actions/dex/getPoolHistoricalData.d.ts.map +1 -0
- package/dist/actions/dex/getPoolPausedState.d.ts +10 -0
- package/dist/actions/dex/getPoolPausedState.d.ts.map +1 -0
- package/dist/actions/dex/getPoolWithState.d.ts +4 -0
- package/dist/actions/dex/getPoolWithState.d.ts.map +1 -0
- package/dist/actions/dex/getVaultPausedState.d.ts +5 -0
- package/dist/actions/dex/getVaultPausedState.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/helpers.d.ts +24 -0
- package/dist/actions/enso/__tests__/helpers.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/util.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/util.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/flashloan.d.ts +41 -0
- package/dist/actions/enso/flashloan.d.ts.map +1 -0
- package/dist/actions/enso/getBendDemultiplyBundle.d.ts +55 -0
- package/dist/actions/enso/getBendDemultiplyBundle.d.ts.map +1 -0
- package/dist/actions/enso/getBendMultiplyBundle.d.ts +70 -0
- package/dist/actions/enso/getBendMultiplyBundle.d.ts.map +1 -0
- package/dist/actions/enso/getEnsoSwapBundle.d.ts +3 -0
- package/dist/actions/enso/getEnsoSwapBundle.d.ts.map +1 -0
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts +16 -0
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -0
- package/dist/actions/enso/util.d.ts +40 -0
- package/dist/actions/enso/util.d.ts.map +1 -0
- package/dist/actions/exports.d.ts +100 -1682
- package/dist/actions/exports.d.ts.map +1 -0
- package/dist/actions/exports.mjs +45 -26
- package/dist/actions/exports.mjs.map +1 -0
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts.map +1 -0
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts.map +1 -0
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts.map +1 -0
- package/dist/actions/governance/checkProposalField.d.ts +27 -0
- package/dist/actions/governance/checkProposalField.d.ts.map +1 -0
- package/dist/actions/governance/computeActualStatus.d.ts +14 -0
- package/dist/actions/governance/computeActualStatus.d.ts.map +1 -0
- package/dist/actions/governance/constants.d.ts +7 -0
- package/dist/actions/governance/constants.d.ts.map +1 -0
- package/dist/actions/governance/exports.d.ts +10 -132
- package/dist/actions/governance/exports.d.ts.map +1 -0
- package/dist/actions/governance/exports.mjs +5 -4
- package/dist/actions/governance/exports.mjs.map +1 -0
- package/dist/actions/governance/getAllProposals.d.ts +16 -0
- package/dist/actions/governance/getAllProposals.d.ts.map +1 -0
- package/dist/actions/governance/getBodyErrors.d.ts +10 -0
- package/dist/actions/governance/getBodyErrors.d.ts.map +1 -0
- package/dist/actions/governance/getDecodedFunctionData.d.ts +30 -0
- package/dist/actions/governance/getDecodedFunctionData.d.ts.map +1 -0
- package/dist/actions/governance/getProposalDetails.d.ts +10 -0
- package/dist/actions/governance/getProposalDetails.d.ts.map +1 -0
- package/dist/actions/governance/getProposalFromTx.d.ts +18 -0
- package/dist/actions/governance/getProposalFromTx.d.ts.map +1 -0
- package/dist/actions/governance/getProposalParams.d.ts +15 -0
- package/dist/actions/governance/getProposalParams.d.ts.map +1 -0
- package/dist/actions/governance/getProposalVotes.d.ts +10 -0
- package/dist/actions/governance/getProposalVotes.d.ts.map +1 -0
- package/dist/actions/governance/getQuorum.d.ts +13 -0
- package/dist/actions/governance/getQuorum.d.ts.map +1 -0
- package/dist/actions/governance/parseProposalBody.d.ts +13 -0
- package/dist/actions/governance/parseProposalBody.d.ts.map +1 -0
- package/dist/actions/honey/getChartData.d.ts +13 -0
- package/dist/actions/honey/getChartData.d.ts.map +1 -0
- package/dist/actions/honey/getCollateralWeights.d.ts +19 -0
- package/dist/actions/honey/getCollateralWeights.d.ts.map +1 -0
- package/dist/actions/honey/getGlobalCapLimit.d.ts +24 -0
- package/dist/actions/honey/getGlobalCapLimit.d.ts.map +1 -0
- package/dist/actions/honey/getHoney24hVolume.d.ts +9 -0
- package/dist/actions/honey/getHoney24hVolume.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyCollaterals.d.ts +33 -0
- package/dist/actions/honey/getHoneyCollaterals.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyFees.d.ts +24 -0
- package/dist/actions/honey/getHoneyFees.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPausedState.d.ts +9 -0
- package/dist/actions/honey/getHoneyPausedState.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPreview.d.ts +52 -0
- package/dist/actions/honey/getHoneyPreview.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPythPriceOracle.d.ts +10 -0
- package/dist/actions/honey/getHoneyPythPriceOracle.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyRootPriceOracle.d.ts +9 -0
- package/dist/actions/honey/getHoneyRootPriceOracle.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyTxns.d.ts +21 -0
- package/dist/actions/honey/getHoneyTxns.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyVaultsBalance.d.ts +13 -0
- package/dist/actions/honey/getHoneyVaultsBalance.d.ts.map +1 -0
- package/dist/actions/honey/getPythLatestPrices.d.ts +26 -0
- package/dist/actions/honey/getPythLatestPrices.d.ts.map +1 -0
- package/dist/actions/honey/getRelativeCapLimit.d.ts +23 -0
- package/dist/actions/honey/getRelativeCapLimit.d.ts.map +1 -0
- package/dist/actions/honey/getSharesWithoutFees.d.ts +25 -0
- package/dist/actions/honey/getSharesWithoutFees.d.ts.map +1 -0
- package/dist/actions/honey/getSwapPayload.d.ts +24 -0
- package/dist/actions/honey/getSwapPayload.d.ts.map +1 -0
- package/dist/actions/honey/isBadCollateralAsset.d.ts +24 -0
- package/dist/actions/honey/isBadCollateralAsset.d.ts.map +1 -0
- package/dist/actions/honey/isBasketModeEnabled.d.ts +11 -0
- package/dist/actions/honey/isBasketModeEnabled.d.ts.map +1 -0
- package/dist/actions/honey/tests/pyth.integration.test.d.ts +2 -0
- package/dist/actions/honey/tests/pyth.integration.test.d.ts.map +1 -0
- package/dist/actions/misc/getBlockTimestamp.d.ts +14 -0
- package/dist/actions/misc/getBlockTimestamp.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getAutoclaimedIncentives.d.ts +14 -0
- package/dist/actions/pol/getAutoclaimedIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getAutoclaimedIncentivesTxHash.d.ts +14 -0
- package/dist/actions/pol/getAutoclaimedIncentivesTxHash.d.ts.map +1 -0
- package/dist/actions/pol/getBGTGlobalInfo.d.ts +10 -0
- package/dist/actions/pol/getBGTGlobalInfo.d.ts.map +1 -0
- package/dist/actions/pol/getBeraTokenTotalSupply.d.ts +7 -0
- package/dist/actions/pol/getBeraTokenTotalSupply.d.ts.map +1 -0
- package/dist/actions/pol/getBgtAprSimulation.d.ts +88 -0
- package/dist/actions/pol/getBgtAprSimulation.d.ts.map +1 -0
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts +2 -0
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts.map +1 -0
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts +10 -0
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts.map +1 -0
- package/dist/actions/pol/getBgtTokenTotalBoosts.d.ts +6 -0
- package/dist/actions/pol/getBgtTokenTotalBoosts.d.ts.map +1 -0
- package/dist/actions/pol/getBgtTokenTotalSupply.d.ts +6 -0
- package/dist/actions/pol/getBgtTokenTotalSupply.d.ts.map +1 -0
- package/dist/actions/pol/getBlockTime.d.ts +7 -0
- package/dist/actions/pol/getBlockTime.d.ts.map +1 -0
- package/dist/actions/pol/getBlockTime.debug.test.d.ts +2 -0
- package/dist/actions/pol/getBlockTime.debug.test.d.ts.map +1 -0
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts +42 -0
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts.map +1 -0
- package/dist/actions/pol/getGlobalData.d.ts +8 -0
- package/dist/actions/pol/getGlobalData.d.ts.map +1 -0
- package/dist/actions/pol/getHeroEarnVaults.d.ts +35 -0
- package/dist/actions/pol/getHeroEarnVaults.d.ts.map +1 -0
- package/dist/actions/pol/getLSTStakeConfig.d.ts +13 -0
- package/dist/actions/pol/getLSTStakeConfig.d.ts.map +1 -0
- package/dist/actions/pol/getMarkets.d.ts +9 -0
- package/dist/actions/pol/getMarkets.d.ts.map +1 -0
- package/dist/actions/pol/getRewardProofsByValidator.d.ts +9 -0
- package/dist/actions/pol/getRewardProofsByValidator.d.ts.map +1 -0
- package/dist/actions/pol/getRewardTokenToBeraRate.d.ts +12 -0
- package/dist/actions/pol/getRewardTokenToBeraRate.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVault.d.ts +13 -0
- package/dist/actions/pol/getRewardVault.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.d.ts +8 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts +2 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.d.ts +12 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts +2 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultEarnedRewards.d.ts +14 -0
- package/dist/actions/pol/getRewardVaultEarnedRewards.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultFromToken.d.ts +7 -0
- package/dist/actions/pol/getRewardVaultFromToken.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultIncentives.d.ts +23 -0
- package/dist/actions/pol/getRewardVaultIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultRewards.d.ts +38 -0
- package/dist/actions/pol/getRewardVaultRewards.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultStakingToken.d.ts +6 -0
- package/dist/actions/pol/getRewardVaultStakingToken.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaults.d.ts +14 -0
- package/dist/actions/pol/getRewardVaults.d.ts.map +1 -0
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts +32 -0
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts.map +1 -0
- package/dist/actions/pol/getSWBeraWithdrawal.d.ts +30 -0
- package/dist/actions/pol/getSWBeraWithdrawal.d.ts.map +1 -0
- package/dist/actions/pol/getStakeWithdrawalCooldown.d.ts +6 -0
- package/dist/actions/pol/getStakeWithdrawalCooldown.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraAPR.d.ts +12 -0
- package/dist/actions/pol/getStakedBeraAPR.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts +12 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts.map +1 -0
- package/dist/actions/pol/getStakingDailyAssets.d.ts +10 -0
- package/dist/actions/pol/getStakingDailyAssets.d.ts.map +1 -0
- package/dist/actions/pol/getStakingTokenInformation.d.ts +9 -0
- package/dist/actions/pol/getStakingTokenInformation.d.ts.map +1 -0
- package/dist/actions/pol/getTotalStakedAmount.d.ts +13 -0
- package/dist/actions/pol/getTotalStakedAmount.d.ts.map +1 -0
- package/dist/actions/pol/getUserClaimableIncentives.d.ts +9 -0
- package/dist/actions/pol/getUserClaimableIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaultInfo.d.ts +9 -0
- package/dist/actions/pol/getUserVaultInfo.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaults.d.ts +18 -0
- package/dist/actions/pol/getUserVaults.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaultsBalance.d.ts +11 -0
- package/dist/actions/pol/getUserVaultsBalance.d.ts.map +1 -0
- package/dist/actions/pol/getVaultHistory.d.ts +8 -0
- package/dist/actions/pol/getVaultHistory.d.ts.map +1 -0
- package/dist/actions/pol/getVaultValidators.d.ts +7 -0
- package/dist/actions/pol/getVaultValidators.d.ts.map +1 -0
- package/dist/actions/pol/getVaultsSupply.d.ts +7 -0
- package/dist/actions/pol/getVaultsSupply.d.ts.map +1 -0
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts +2 -0
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts.map +1 -0
- package/dist/actions/prices/getTokenCurrentPrices.d.ts +5 -0
- package/dist/actions/prices/getTokenCurrentPrices.d.ts.map +1 -0
- package/dist/actions/pyth/getHoneyPythFeeds.d.ts +12 -0
- package/dist/actions/pyth/getHoneyPythFeeds.d.ts.map +1 -0
- package/dist/actions/pyth/getUpdateFee.d.ts +6 -0
- package/dist/actions/pyth/getUpdateFee.d.ts.map +1 -0
- package/dist/actions/server/exports.d.ts +2 -13
- package/dist/actions/server/exports.d.ts.map +1 -0
- package/dist/actions/server/exports.mjs +28 -17
- package/dist/actions/server/exports.mjs.map +1 -0
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts +14 -0
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts.map +1 -0
- package/dist/actions/tokens/getAllowances.d.ts +10 -0
- package/dist/actions/tokens/getAllowances.d.ts.map +1 -0
- package/dist/actions/tokens/getTokenInformation.d.ts +11 -0
- package/dist/actions/tokens/getTokenInformation.d.ts.map +1 -0
- package/dist/actions/tokens/getTokens.d.ts +5 -0
- package/dist/actions/tokens/getTokens.d.ts.map +1 -0
- package/dist/actions/tokens/getUnderlyingToken.d.ts +12 -0
- package/dist/actions/tokens/getUnderlyingToken.d.ts.map +1 -0
- package/dist/actions/tokens/getWalletBalances.d.ts +499 -0
- package/dist/actions/tokens/getWalletBalances.d.ts.map +1 -0
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts +2 -0
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts.map +1 -0
- package/dist/actions/transactions/beraWriteContract.d.ts +19 -0
- package/dist/actions/transactions/beraWriteContract.d.ts.map +1 -0
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts +2 -0
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts +30 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts.map +1 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts +2 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/getAllValidators.d.ts +5 -0
- package/dist/actions/validators/getAllValidators.d.ts.map +1 -0
- package/dist/actions/validators/getApiEnrichedAllocation.d.ts +6 -0
- package/dist/actions/validators/getApiEnrichedAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getApiValidator.d.ts +9 -0
- package/dist/actions/validators/getApiValidator.d.ts.map +1 -0
- package/dist/actions/validators/getBaselineRewardAllocation.d.ts +5 -0
- package/dist/actions/validators/getBaselineRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getDefaultRewardAllocation.d.ts +7 -0
- package/dist/actions/validators/getDefaultRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getStakingPoolBatch.d.ts +13 -0
- package/dist/actions/validators/getStakingPoolBatch.d.ts.map +1 -0
- package/dist/actions/validators/getUserActiveValidators.d.ts +12 -0
- package/dist/actions/validators/getUserActiveValidators.d.ts.map +1 -0
- package/dist/actions/validators/getUserBoosts.d.ts +7 -0
- package/dist/actions/validators/getUserBoosts.d.ts.map +1 -0
- package/dist/actions/validators/getUserBoostsOnValidator.d.ts +25 -0
- package/dist/actions/validators/getUserBoostsOnValidator.d.ts.map +1 -0
- package/dist/actions/validators/getUserStakingPositions.d.ts +20 -0
- package/dist/actions/validators/getUserStakingPositions.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorAnalytics.d.ts +12 -0
- package/dist/actions/validators/getValidatorAnalytics.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorCommission.d.ts +6 -0
- package/dist/actions/validators/getValidatorCommission.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorEstimatedBgtPerYear.d.ts +3 -0
- package/dist/actions/validators/getValidatorEstimatedBgtPerYear.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts +8 -0
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorOperatorAddress.d.ts +6 -0
- package/dist/actions/validators/getValidatorOperatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedCommission.d.ts +10 -0
- package/dist/actions/validators/getValidatorQueuedCommission.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedOperatorAddress.d.ts +7 -0
- package/dist/actions/validators/getValidatorQueuedOperatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedRewardAllocation.d.ts +7 -0
- package/dist/actions/validators/getValidatorQueuedRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts +52 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorRewardAllocatorAddress.d.ts +12 -0
- package/dist/actions/validators/getValidatorRewardAllocatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts +2 -0
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.d.ts +6 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.d.ts.map +1 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts +2 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts.map +1 -0
- package/dist/actions/validators/utils/getValidatorBoostApy.d.ts +7 -0
- package/dist/actions/validators/utils/getValidatorBoostApy.d.ts.map +1 -0
- package/dist/{chunk-E7YFXBBQ.mjs → chunk-35RACQD4.mjs} +7 -6
- package/dist/chunk-35RACQD4.mjs.map +1 -0
- package/dist/{chunk-BGMRHTBQ.mjs → chunk-7TFV6UKF.mjs} +1 -0
- package/dist/chunk-7TFV6UKF.mjs.map +1 -0
- package/dist/{chunk-QVHEM4BG.mjs → chunk-AEN6IJFU.mjs} +10 -4
- package/dist/chunk-AEN6IJFU.mjs.map +1 -0
- package/dist/{chunk-SZ5C44L5.mjs → chunk-BMNEN4OK.mjs} +1 -0
- package/dist/chunk-BMNEN4OK.mjs.map +1 -0
- package/dist/{chunk-YLTWPFCJ.mjs → chunk-BSOWLS3W.mjs} +3 -2
- package/dist/chunk-BSOWLS3W.mjs.map +1 -0
- package/dist/{chunk-XDG26EG6.mjs → chunk-DOZJB6IJ.mjs} +70 -118
- package/dist/chunk-DOZJB6IJ.mjs.map +1 -0
- package/dist/{chunk-GUURQAME.mjs → chunk-EGAB6NFQ.mjs} +2 -1
- package/dist/chunk-EGAB6NFQ.mjs.map +1 -0
- package/dist/{chunk-AUOPN6NK.mjs → chunk-EJIGERYM.mjs} +2 -1
- package/dist/chunk-EJIGERYM.mjs.map +1 -0
- package/dist/{chunk-SGIJVHZO.mjs → chunk-GLWPRM33.mjs} +1 -0
- package/dist/chunk-GLWPRM33.mjs.map +1 -0
- package/dist/{chunk-CDK4YV3D.mjs → chunk-GWSTVITN.mjs} +1 -0
- package/dist/chunk-GWSTVITN.mjs.map +1 -0
- package/dist/{chunk-O2NQFKJK.mjs → chunk-IFNIPVTZ.mjs} +1 -0
- package/dist/chunk-IFNIPVTZ.mjs.map +1 -0
- package/dist/{chunk-HYDP32P6.mjs → chunk-J3LTASDE.mjs} +6 -6
- package/dist/chunk-J3LTASDE.mjs.map +1 -0
- package/dist/{chunk-NBYLMO2L.mjs → chunk-JA4DHMTG.mjs} +1 -0
- package/dist/chunk-JA4DHMTG.mjs.map +1 -0
- package/dist/{chunk-DKMAIU74.mjs → chunk-KL6YZ5VR.mjs} +1 -0
- package/dist/chunk-KL6YZ5VR.mjs.map +1 -0
- package/dist/{chunk-FGION6F6.mjs → chunk-LE4CYW7S.mjs} +3 -2
- package/dist/chunk-LE4CYW7S.mjs.map +1 -0
- package/dist/{chunk-KHXJDYA4.mjs → chunk-NZAH3SGT.mjs} +26 -0
- package/dist/chunk-NZAH3SGT.mjs.map +1 -0
- package/dist/{chunk-RFJGL4MF.mjs → chunk-P3YZ7F22.mjs} +9 -2
- package/dist/chunk-P3YZ7F22.mjs.map +1 -0
- package/dist/{chunk-MKSFQIKC.mjs → chunk-PHYZRH4I.mjs} +10 -7
- package/dist/chunk-PHYZRH4I.mjs.map +1 -0
- package/dist/{chunk-IXIBY5FP.mjs → chunk-PJRLHTGC.mjs} +3 -2
- package/dist/chunk-PJRLHTGC.mjs.map +1 -0
- package/dist/{chunk-GY6B3PD5.mjs → chunk-QQASX4LJ.mjs} +12 -1
- package/dist/chunk-QQASX4LJ.mjs.map +1 -0
- package/dist/{chunk-4ML4Y6UN.mjs → chunk-RM227WHI.mjs} +1 -0
- package/dist/chunk-RM227WHI.mjs.map +1 -0
- package/dist/{chunk-DQRH5VE3.mjs → chunk-TGN55GKE.mjs} +2 -1
- package/dist/chunk-TGN55GKE.mjs.map +1 -0
- package/dist/{chunk-W2VODV76.mjs → chunk-UA3Z47LT.mjs} +9 -8
- package/dist/chunk-UA3Z47LT.mjs.map +1 -0
- package/dist/{chunk-HQCOU6GY.mjs → chunk-ZCEFC2TK.mjs} +1 -0
- package/dist/chunk-ZCEFC2TK.mjs.map +1 -0
- package/dist/{chunk-T43JPYQS.mjs → chunk-ZWTGVIPJ.mjs} +3 -2
- package/dist/chunk-ZWTGVIPJ.mjs.map +1 -0
- package/dist/contexts/BeraFlags/BeraFlags.d.ts +19 -0
- package/dist/contexts/BeraFlags/BeraFlags.d.ts.map +1 -0
- package/dist/contexts/BeraFlags/defaultFlags.d.ts +9 -0
- package/dist/contexts/BeraFlags/defaultFlags.d.ts.map +1 -0
- package/dist/contexts/BexStatusProvider.d.ts +67 -0
- package/dist/contexts/BexStatusProvider.d.ts.map +1 -0
- package/dist/contexts/BlockTimeProvider.d.ts +10 -0
- package/dist/contexts/BlockTimeProvider.d.ts.map +1 -0
- package/dist/contexts/HoneyConfigProvider.d.ts +50 -0
- package/dist/contexts/HoneyConfigProvider.d.ts.map +1 -0
- package/dist/contexts/SwrFallback.d.ts +6 -0
- package/dist/contexts/SwrFallback.d.ts.map +1 -0
- package/dist/contexts/TokensProvider.d.ts +24 -0
- package/dist/contexts/TokensProvider.d.ts.map +1 -0
- package/dist/contexts/block-time-provider.d.ts +10 -0
- package/dist/contexts/exports.d.ts +7 -66
- package/dist/contexts/exports.d.ts.map +1 -0
- package/dist/contexts/exports.mjs +13 -12
- package/dist/contexts/exports.mjs.map +1 -0
- package/dist/data/contracts.d.ts +345 -0
- package/dist/data/contracts.d.ts.map +1 -0
- package/dist/enum/contracts.d.ts +15 -0
- package/dist/enum/contracts.d.ts.map +1 -0
- package/dist/enum/dex.d.ts +36 -0
- package/dist/enum/dex.d.ts.map +1 -0
- package/dist/enum/exports.d.ts +7 -29
- package/dist/enum/exports.d.ts.map +1 -0
- package/dist/enum/exports.mjs +3 -2
- package/dist/enum/exports.mjs.map +1 -0
- package/dist/enum/governance/exports.d.ts +2 -60
- package/dist/enum/governance/exports.d.ts.map +1 -0
- package/dist/enum/governance/exports.mjs +2 -1
- package/dist/enum/governance/exports.mjs.map +1 -0
- package/dist/enum/governance.d.ts +59 -0
- package/dist/enum/governance.d.ts.map +1 -0
- package/dist/enum/honey.d.ts +13 -0
- package/dist/enum/honey.d.ts.map +1 -0
- package/dist/enum/polling.d.ts +8 -0
- package/dist/enum/polling.d.ts.map +1 -0
- package/dist/enum/slippage.d.ts +17 -0
- package/dist/enum/slippage.d.ts.map +1 -0
- package/dist/enum/txnEnum.d.ts +90 -0
- package/dist/enum/txnEnum.d.ts.map +1 -0
- package/dist/errors/BeraError.d.ts +99 -0
- package/dist/errors/BeraError.d.ts.map +1 -0
- package/dist/errors/BeraError.unit.test.d.ts +2 -0
- package/dist/errors/BeraError.unit.test.d.ts.map +1 -0
- package/dist/errors/BeraMonitoring.d.ts +46 -0
- package/dist/errors/BeraMonitoring.d.ts.map +1 -0
- package/dist/errors/BeraTracing.d.ts +58 -0
- package/dist/errors/BeraTracing.d.ts.map +1 -0
- package/dist/errors/BeraTracing.unit.test.d.ts +2 -0
- package/dist/errors/BeraTracing.unit.test.d.ts.map +1 -0
- package/dist/errors/InvalidArgumentError.d.ts +59 -0
- package/dist/errors/InvalidArgumentError.d.ts.map +1 -0
- package/dist/errors/NotFoundError.d.ts +25 -0
- package/dist/errors/NotFoundError.d.ts.map +1 -0
- package/dist/errors/RequestError.d.ts +56 -0
- package/dist/errors/RequestError.d.ts.map +1 -0
- package/dist/errors/RequestError.unit.test.d.ts +2 -0
- package/dist/errors/RequestError.unit.test.d.ts.map +1 -0
- package/dist/errors/TransactionFailedError.d.ts +49 -0
- package/dist/errors/TransactionFailedError.d.ts.map +1 -0
- package/dist/errors/assert.d.ts +82 -0
- package/dist/errors/assert.d.ts.map +1 -0
- package/dist/errors/assert.unit.test.d.ts +2 -0
- package/dist/errors/assert.unit.test.d.ts.map +1 -0
- package/dist/errors/errorMap.d.ts +1083 -0
- package/dist/errors/errorMap.d.ts.map +1 -0
- package/dist/errors/exports.d.ts +13 -328
- package/dist/errors/exports.d.ts.map +1 -0
- package/dist/errors/exports.mjs +9 -6
- package/dist/errors/exports.mjs.map +1 -0
- package/dist/errors/getErrorMessage.d.ts +46 -0
- package/dist/errors/getErrorMessage.d.ts.map +1 -0
- package/dist/errors/getRevertReason.d.ts +53 -0
- package/dist/errors/getRevertReason.d.ts.map +1 -0
- package/dist/errors/getRevertReason.integration.test.d.ts +2 -0
- package/dist/errors/getRevertReason.integration.test.d.ts.map +1 -0
- package/dist/errors/initBeraError.d.ts +44 -0
- package/dist/errors/initBeraError.d.ts.map +1 -0
- package/dist/errors/parseViemError.d.ts +88 -0
- package/dist/errors/parseViemError.d.ts.map +1 -0
- package/dist/errors/severity.d.ts +7 -0
- package/dist/errors/severity.d.ts.map +1 -0
- package/dist/errors/spanStatus.d.ts +18 -0
- package/dist/errors/spanStatus.d.ts.map +1 -0
- package/dist/errors/spanStatus.unit.test.d.ts +2 -0
- package/dist/errors/spanStatus.unit.test.d.ts.map +1 -0
- package/dist/{getValidatorQueuedOperatorAddress-Cc05dlO3.d.ts → getValidatorQueuedOperatorAddress-N2I7wHd6.d.ts} +1 -1
- package/dist/global.d-CiZJ2eHz.d.ts +231 -0
- package/dist/hooks/bend/useGetConvertToAssets.d.ts +9 -0
- package/dist/hooks/bend/useGetConvertToAssets.d.ts.map +1 -0
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts +29 -0
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts.map +1 -0
- package/dist/hooks/dex/useAggregatorsRouterFeeBps.d.ts +2 -0
- package/dist/hooks/dex/useAggregatorsRouterFeeBps.d.ts.map +1 -0
- package/dist/hooks/dex/useAllUserPools.d.ts +68 -0
- package/dist/hooks/dex/useAllUserPools.d.ts.map +1 -0
- package/dist/hooks/dex/useApiPool.d.ts +11 -0
- package/dist/hooks/dex/useApiPool.d.ts.map +1 -0
- package/dist/hooks/dex/useBexStatus.d.ts +2 -0
- package/dist/hooks/dex/useBexStatus.d.ts.map +1 -0
- package/dist/hooks/dex/useCreatePool.d.ts +32 -0
- package/dist/hooks/dex/useCreatePool.d.ts.map +1 -0
- package/dist/hooks/dex/useGlobalLiquidityAndSwapVolume.d.ts +11 -0
- package/dist/hooks/dex/useGlobalLiquidityAndSwapVolume.d.ts.map +1 -0
- package/dist/hooks/dex/useLiquidityMismatch.d.ts +36 -0
- package/dist/hooks/dex/useLiquidityMismatch.d.ts.map +1 -0
- package/dist/hooks/dex/useLpPosition.d.ts +14 -0
- package/dist/hooks/dex/useLpPosition.d.ts.map +1 -0
- package/dist/hooks/dex/useMultipleTokenApprovalsWithSlippage.d.ts +13 -0
- package/dist/hooks/dex/useMultipleTokenApprovalsWithSlippage.d.ts.map +1 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts +49 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts.map +1 -0
- package/dist/hooks/dex/usePollPoolCreationRelayerApproval.d.ts +8 -0
- package/dist/hooks/dex/usePollPoolCreationRelayerApproval.d.ts.map +1 -0
- package/dist/hooks/dex/usePool.d.ts +10 -0
- package/dist/hooks/dex/usePool.d.ts.map +1 -0
- package/dist/hooks/dex/usePoolEvents.d.ts +6 -0
- package/dist/hooks/dex/usePoolEvents.d.ts.map +1 -0
- package/dist/hooks/dex/usePoolHistoricalData.d.ts +8 -0
- package/dist/hooks/dex/usePoolHistoricalData.d.ts.map +1 -0
- package/dist/hooks/dex/usePools.d.ts +129 -0
- package/dist/hooks/dex/usePools.d.ts.map +1 -0
- package/dist/hooks/dex/usePriceImpact.d.ts +11 -0
- package/dist/hooks/dex/usePriceImpact.d.ts.map +1 -0
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts +53 -0
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts.map +1 -0
- package/dist/hooks/enso/useBendDemultiply.d.ts +18 -0
- package/dist/hooks/enso/useBendDemultiply.d.ts.map +1 -0
- package/dist/hooks/enso/useBendMultiply.d.ts +19 -0
- package/dist/hooks/enso/useBendMultiply.d.ts.map +1 -0
- package/dist/hooks/enso/useBendZapSupply.d.ts +40 -0
- package/dist/hooks/enso/useBendZapSupply.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts +26 -0
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts +6 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoWalletV2Address.d.ts +4 -0
- package/dist/hooks/enso/useEnsoWalletV2Address.d.ts.map +1 -0
- package/dist/hooks/enso/useIsBendAuthorized.d.ts +7 -0
- package/dist/hooks/enso/useIsBendAuthorized.d.ts.map +1 -0
- package/dist/hooks/enso/useZapStakeBera.d.ts +23 -0
- package/dist/hooks/enso/useZapStakeBera.d.ts.map +1 -0
- package/dist/hooks/exports.d.ts +109 -1332
- package/dist/hooks/exports.d.ts.map +1 -0
- package/dist/hooks/exports.mjs +357 -421
- package/dist/hooks/exports.mjs.map +1 -0
- package/dist/hooks/governance/exports.d.ts +15 -186
- package/dist/hooks/governance/exports.d.ts.map +1 -0
- package/dist/hooks/governance/exports.mjs +63 -61
- package/dist/hooks/governance/exports.mjs.map +1 -0
- package/dist/hooks/governance/useCreateProposal.d.ts +13 -0
- package/dist/hooks/governance/useCreateProposal.d.ts.map +1 -0
- package/dist/hooks/governance/useGetPastVotes.d.ts +15 -0
- package/dist/hooks/governance/useGetPastVotes.d.ts.map +1 -0
- package/dist/hooks/governance/useHasVoted.d.ts +6 -0
- package/dist/hooks/governance/useHasVoted.d.ts.map +1 -0
- package/dist/hooks/governance/useIsCanceller.d.ts +5 -0
- package/dist/hooks/governance/useIsCanceller.d.ts.map +1 -0
- package/dist/hooks/governance/usePollAllProposals.d.ts +37 -0
- package/dist/hooks/governance/usePollAllProposals.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposal.d.ts +23 -0
- package/dist/hooks/governance/usePollProposal.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposalThreshold.d.ts +6 -0
- package/dist/hooks/governance/usePollProposalThreshold.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposalVotes.d.ts +23 -0
- package/dist/hooks/governance/usePollProposalVotes.d.ts.map +1 -0
- package/dist/hooks/governance/usePollUserDelegates.d.ts +7 -0
- package/dist/hooks/governance/usePollUserDelegates.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalFromTx.d.ts +5 -0
- package/dist/hooks/governance/useProposalFromTx.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalSnapshot.d.ts +12 -0
- package/dist/hooks/governance/useProposalSnapshot.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalState.d.ts +7 -0
- package/dist/hooks/governance/useProposalState.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalTimelockState.d.ts +18 -0
- package/dist/hooks/governance/useProposalTimelockState.d.ts.map +1 -0
- package/dist/hooks/governance/useQuorum.d.ts +17 -0
- package/dist/hooks/governance/useQuorum.d.ts.map +1 -0
- package/dist/hooks/honey/useCappedGlobally.d.ts +11 -0
- package/dist/hooks/honey/useCappedGlobally.d.ts.map +1 -0
- package/dist/hooks/honey/useCappedRelatively.d.ts +11 -0
- package/dist/hooks/honey/useCappedRelatively.d.ts.map +1 -0
- package/dist/hooks/honey/useCollateralWeights.d.ts +9 -0
- package/dist/hooks/honey/useCollateralWeights.d.ts.map +1 -0
- package/dist/hooks/honey/useHoney24hVolume.d.ts +2 -0
- package/dist/hooks/honey/useHoney24hVolume.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyAlerts.d.ts +47 -0
- package/dist/hooks/honey/useHoneyAlerts.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyBalances.d.ts +26 -0
- package/dist/hooks/honey/useHoneyBalances.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyChartData.d.ts +10 -0
- package/dist/hooks/honey/useHoneyChartData.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneySwapState.d.ts +30 -0
- package/dist/hooks/honey/useHoneySwapState.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyVaultsBalance.d.ts +4 -0
- package/dist/hooks/honey/useHoneyVaultsBalance.d.ts.map +1 -0
- package/dist/hooks/honey/useIsBadCollateralAsset.d.ts +9 -0
- package/dist/hooks/honey/useIsBadCollateralAsset.d.ts.map +1 -0
- package/dist/hooks/honey/useIsBasketModeEnabled.d.ts +6 -0
- package/dist/hooks/honey/useIsBasketModeEnabled.d.ts.map +1 -0
- package/dist/hooks/honey/usePythLatestPrices.d.ts +20 -0
- package/dist/hooks/honey/usePythLatestPrices.d.ts.map +1 -0
- package/dist/hooks/perps/usePythUpdateFee.d.ts +11 -0
- package/dist/hooks/perps/usePythUpdateFee.d.ts.map +1 -0
- package/dist/hooks/pol/useAutoclaimedIncentives.d.ts +8 -0
- package/dist/hooks/pol/useAutoclaimedIncentives.d.ts.map +1 -0
- package/dist/hooks/pol/useAutoclaimedIncentivesTxHash.d.ts +8 -0
- package/dist/hooks/pol/useAutoclaimedIncentivesTxHash.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtAprSimulation.d.ts +7 -0
- package/dist/hooks/pol/useBgtAprSimulation.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts +8 -0
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtUnstakedBalance.d.ts +3 -0
- package/dist/hooks/pol/useBgtUnstakedBalance.d.ts.map +1 -0
- package/dist/hooks/pol/useClaimableFees.d.ts +2 -0
- package/dist/hooks/pol/useClaimableFees.d.ts.map +1 -0
- package/dist/hooks/pol/useHighestVaultsAPR.d.ts +23 -0
- package/dist/hooks/pol/useHighestVaultsAPR.d.ts.map +1 -0
- package/dist/hooks/pol/useOnChainRewardVault.d.ts +7 -0
- package/dist/hooks/pol/useOnChainRewardVault.d.ts.map +1 -0
- package/dist/hooks/pol/usePollGlobalData.d.ts +4 -0
- package/dist/hooks/pol/usePollGlobalData.d.ts.map +1 -0
- package/dist/hooks/pol/usePollMarkets.d.ts +7 -0
- package/dist/hooks/pol/usePollMarkets.d.ts.map +1 -0
- package/dist/hooks/pol/useQueuedBeraUnlock.d.ts +9 -0
- package/dist/hooks/pol/useQueuedBeraUnlock.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts +6 -0
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVault.d.ts +8 -0
- package/dist/hooks/pol/useRewardVault.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts +16 -0
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultFromToken.d.ts +7 -0
- package/dist/hooks/pol/useRewardVaultFromToken.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultIncentives.d.ts +6 -0
- package/dist/hooks/pol/useRewardVaultIncentives.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultRewards.d.ts +4 -0
- package/dist/hooks/pol/useRewardVaultRewards.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaults.d.ts +15 -0
- package/dist/hooks/pol/useRewardVaults.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedAPR.d.ts +11 -0
- package/dist/hooks/pol/useStakedAPR.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedData.d.ts +41 -0
- package/dist/hooks/pol/useStakedData.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedSnapshots.d.ts +10 -0
- package/dist/hooks/pol/useStakedSnapshots.d.ts.map +1 -0
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts +7 -0
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts.map +1 -0
- package/dist/hooks/pol/useTotalStakedAmount.d.ts +6 -0
- package/dist/hooks/pol/useTotalStakedAmount.d.ts.map +1 -0
- package/dist/hooks/pol/useUserVaultInfo.d.ts +7 -0
- package/dist/hooks/pol/useUserVaultInfo.d.ts.map +1 -0
- package/dist/hooks/pol/useUserVaults.d.ts +4 -0
- package/dist/hooks/pol/useUserVaults.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultAddress.d.ts +10 -0
- package/dist/hooks/pol/useVaultAddress.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultHistory.d.ts +5 -0
- package/dist/hooks/pol/useVaultHistory.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultValidators.d.ts +7 -0
- package/dist/hooks/pol/useVaultValidators.d.ts.map +1 -0
- package/dist/hooks/tokens/useBeraCurrentPrice.d.ts +11 -0
- package/dist/hooks/tokens/useBeraCurrentPrice.d.ts.map +1 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts +9 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollAllowances.d.ts +17 -0
- package/dist/hooks/tokens/usePollAllowances.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollBalance.d.ts +12 -0
- package/dist/hooks/tokens/usePollBalance.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollWalletBalances.d.ts +14 -0
- package/dist/hooks/tokens/usePollWalletBalances.d.ts.map +1 -0
- package/dist/hooks/tokens/useStakingTokenInformation.d.ts +8 -0
- package/dist/hooks/tokens/useStakingTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenCurrentPrices.d.ts +16 -0
- package/dist/hooks/tokens/useTokenCurrentPrices.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenInformation.d.ts +9 -0
- package/dist/hooks/tokens/useTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenPrice.d.ts +10 -0
- package/dist/hooks/tokens/useTokenPrice.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenPrices.d.ts +18 -0
- package/dist/hooks/tokens/useTokenPrices.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokens.d.ts +18 -0
- package/dist/hooks/tokens/useTokens.d.ts.map +1 -0
- package/dist/hooks/tokens/useTotalSupply.d.ts +5 -0
- package/dist/hooks/tokens/useTotalSupply.d.ts.map +1 -0
- package/dist/hooks/tokens/useUnderlyingAsset.d.ts +10 -0
- package/dist/hooks/tokens/useUnderlyingAsset.d.ts.map +1 -0
- package/dist/hooks/useBlockToTimestamp.d.ts +6 -0
- package/dist/hooks/useBlockToTimestamp.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/index.d.ts +3 -0
- package/dist/hooks/useContractWrite/index.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/stateReducer.d.ts +28 -0
- package/dist/hooks/useContractWrite/stateReducer.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/types.d.ts +54 -0
- package/dist/hooks/useContractWrite/types.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/useBeraContractWrite.d.ts +10 -0
- package/dist/hooks/useContractWrite/useBeraContractWrite.d.ts.map +1 -0
- package/dist/hooks/useGetVerifiedAbi.d.ts +2 -0
- package/dist/hooks/useGetVerifiedAbi.d.ts.map +1 -0
- package/dist/hooks/useHistoryState.d.ts +17 -0
- package/dist/hooks/useHistoryState.d.ts.map +1 -0
- package/dist/hooks/usePrevious.d.ts +6 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/validators/useAllValidators.d.ts +7 -0
- package/dist/hooks/validators/useAllValidators.d.ts.map +1 -0
- package/dist/hooks/validators/useApiEnrichedAllocation.d.ts +5 -0
- package/dist/hooks/validators/useApiEnrichedAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useApiValidator.d.ts +8 -0
- package/dist/hooks/validators/useApiValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useBaselineRewardAllocation.d.ts +2 -0
- package/dist/hooks/validators/useBaselineRewardAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useManagedValidatorRole.d.ts +13 -0
- package/dist/hooks/validators/useManagedValidatorRole.d.ts.map +1 -0
- package/dist/hooks/validators/useOnChainValidator.d.ts +7 -0
- package/dist/hooks/validators/useOnChainValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useStakingPoolBatch.d.ts +7 -0
- package/dist/hooks/validators/useStakingPoolBatch.d.ts.map +1 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts +7 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts.map +1 -0
- package/dist/hooks/validators/useUserBoostsOnValidator.d.ts +8 -0
- package/dist/hooks/validators/useUserBoostsOnValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts +8 -0
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts.map +1 -0
- package/dist/hooks/validators/useUserStakingPositions.d.ts +31 -0
- package/dist/hooks/validators/useUserStakingPositions.d.ts.map +1 -0
- package/dist/hooks/validators/useValidator.d.ts +112 -0
- package/dist/hooks/validators/useValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorAnalytics.d.ts +11 -0
- package/dist/hooks/validators/useValidatorAnalytics.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorCommission.d.ts +4 -0
- package/dist/hooks/validators/useValidatorCommission.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorEstimatedBgtPerYear.d.ts +6 -0
- package/dist/hooks/validators/useValidatorEstimatedBgtPerYear.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts +14 -0
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedCommission.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedCommission.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedOperatorAddress.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedOperatorAddress.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedRewardAllocation.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedRewardAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts +9 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -0
- package/dist/types/bribeBoost.d.ts +69 -0
- package/dist/types/dex.d.ts +225 -0
- package/dist/types/enso.d.ts +76 -0
- package/dist/types/exports.d.ts +8 -90
- package/dist/types/exports.d.ts.map +1 -0
- package/dist/types/exports.mjs +1 -0
- package/dist/types/exports.mjs.map +1 -0
- package/dist/types/global.d.ts +198 -0
- package/dist/types/governance/exports.d.ts +2 -109
- package/dist/types/governance/exports.d.ts.map +1 -0
- package/dist/types/governance/exports.mjs +1 -0
- package/dist/types/governance/exports.mjs.map +1 -0
- package/dist/types/governance.d.ts +112 -0
- package/dist/types/honeySwap.d.ts +23 -0
- package/dist/types/pol.d.ts +78 -0
- package/dist/types/staking.d.ts +22 -0
- package/dist/useHoneySwapState-CXVWAThr.d.ts +32 -0
- package/dist/utils/beraFetch.d.ts +15 -0
- package/dist/utils/beraFetch.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +27 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/createEmitter.d.ts +88 -0
- package/dist/utils/createEmitter.d.ts.map +1 -0
- package/dist/utils/createEmitter.unit.test.d.ts +2 -0
- package/dist/utils/createEmitter.unit.test.d.ts.map +1 -0
- package/dist/utils/exports.d.ts +25 -429
- package/dist/utils/exports.d.ts.map +1 -0
- package/dist/utils/exports.mjs +33 -22
- package/dist/utils/exports.mjs.map +1 -0
- package/dist/utils/filter.d.ts +10 -0
- package/dist/utils/filter.d.ts.map +1 -0
- package/dist/utils/formatIncentivesTokenMap.d.ts +3 -0
- package/dist/utils/formatIncentivesTokenMap.d.ts.map +1 -0
- package/dist/utils/formatInputTokenValue.d.ts +2 -0
- package/dist/utils/formatInputTokenValue.d.ts.map +1 -0
- package/dist/utils/formatNumber.d.ts +32 -0
- package/dist/utils/formatNumber.d.ts.map +1 -0
- package/dist/utils/formatNumber.unit.test.d.ts +2 -0
- package/dist/utils/formatNumber.unit.test.d.ts.map +1 -0
- package/dist/utils/formatTimestamps.d.ts +20 -0
- package/dist/utils/formatTimestamps.d.ts.map +1 -0
- package/dist/utils/formatTimestamps.unit.test.d.ts +2 -0
- package/dist/utils/formatTimestamps.unit.test.d.ts.map +1 -0
- package/dist/utils/formatTokenList.d.ts +21 -0
- package/dist/utils/formatTokenList.d.ts.map +1 -0
- package/dist/utils/formatUsd.d.ts +5 -0
- package/dist/utils/formatUsd.d.ts.map +1 -0
- package/dist/utils/getContractName.d.ts +10 -0
- package/dist/utils/getContractName.d.ts.map +1 -0
- package/dist/utils/getContractName.unit.test.d.ts +2 -0
- package/dist/utils/getContractName.unit.test.d.ts.map +1 -0
- package/dist/utils/getErrorResponse.d.ts +5 -0
- package/dist/utils/getErrorResponse.d.ts.map +1 -0
- package/dist/utils/getHoneySwapMessage.d.ts +7 -0
- package/dist/utils/getHoneySwapMessage.d.ts.map +1 -0
- package/dist/utils/getHoneySwapMessage.test.d.ts +2 -0
- package/dist/utils/getHoneySwapMessage.test.d.ts.map +1 -0
- package/dist/utils/getServerSideClient.d.ts +6 -0
- package/dist/utils/getServerSideClient.d.ts.map +1 -0
- package/dist/utils/getTestClient.d.ts +73 -0
- package/dist/utils/getTestClient.d.ts.map +1 -0
- package/dist/utils/hasAnyTruthyValues.d.ts +2 -0
- package/dist/utils/hasAnyTruthyValues.d.ts.map +1 -0
- package/dist/utils/isDifferenceExceedingThreshold.d.ts +6 -0
- package/dist/utils/isDifferenceExceedingThreshold.d.ts.map +1 -0
- package/dist/utils/isSubgraphStale.d.ts +5 -0
- package/dist/utils/isSubgraphStale.d.ts.map +1 -0
- package/dist/utils/layerZeroScan.d.ts +39 -0
- package/dist/utils/layerZeroScan.d.ts.map +1 -0
- package/dist/utils/math.d.ts +15 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.unit.test.d.ts +2 -0
- package/dist/utils/math.unit.test.d.ts.map +1 -0
- package/dist/utils/parseBaseArgs.d.ts +6 -0
- package/dist/utils/parseBaseArgs.d.ts.map +1 -0
- package/dist/utils/parseBaseArgs.unit.test.d.ts +2 -0
- package/dist/utils/parseBaseArgs.unit.test.d.ts.map +1 -0
- package/dist/utils/parseWhiskToken.d.ts +21 -0
- package/dist/utils/parseWhiskToken.d.ts.map +1 -0
- package/dist/utils/polyfillAbortSignalAny.d.ts +14 -0
- package/dist/utils/polyfillAbortSignalAny.d.ts.map +1 -0
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts +2 -0
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts.map +1 -0
- package/dist/utils/poolNamings.d.ts +9 -0
- package/dist/utils/poolNamings.d.ts.map +1 -0
- package/dist/utils/pythHoneyUtils.d.ts +2 -0
- package/dist/utils/pythHoneyUtils.d.ts.map +1 -0
- package/dist/utils/sanitizeRpcUrl.d.ts +10 -0
- package/dist/utils/sanitizeRpcUrl.d.ts.map +1 -0
- package/dist/utils/test-utils.d.ts +2 -0
- package/dist/utils/test-utils.d.ts.map +1 -0
- package/dist/utils/time.d.ts +65 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.unit.test.d.ts +2 -0
- package/dist/utils/time.unit.test.d.ts.map +1 -0
- package/dist/utils/tokenWrapping.d.ts +7 -0
- package/dist/utils/tokenWrapping.d.ts.map +1 -0
- package/dist/utils/tokens.d.ts +37 -0
- package/dist/utils/tokens.d.ts.map +1 -0
- package/dist/utils/tokens.unit.test.d.ts +2 -0
- package/dist/utils/tokens.unit.test.d.ts.map +1 -0
- package/dist/utils/tracedTransport.d.ts +10 -0
- package/dist/utils/tracedTransport.d.ts.map +1 -0
- package/dist/utils/truncateHash.d.ts +5 -0
- package/dist/utils/truncateHash.d.ts.map +1 -0
- package/dist/utils/truncateHash.unit.test.d.ts +2 -0
- package/dist/utils/truncateHash.unit.test.d.ts.map +1 -0
- package/dist/utils/validatorUptimeStatus.d.ts +19 -0
- package/dist/utils/validatorUptimeStatus.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/actions/clients/BeraApolloClient.ts +4 -2
- package/src/actions/clients/fetchOpenApi.unit.test.ts +9 -9
- package/src/actions/dex/aggregators/base.ts +3 -1
- package/src/actions/dex/aggregators/bex.ts +3 -10
- package/src/actions/dex/getPoolWithState.ts +2 -2
- package/src/actions/enso/__tests__/helpers.ts +15 -10
- package/src/actions/enso/getEnsoSwapBundle.ts +3 -8
- package/src/actions/exports.ts +2 -3
- package/src/actions/governance/getDecodedFunctionData.ts +5 -1
- package/src/actions/honey/getSwapPayload.ts +4 -4
- package/src/actions/pol/getAutoclaimedIncentives.ts +1 -1
- package/src/actions/pol/getAutoclaimedIncentivesTxHash.ts +1 -1
- package/src/actions/pol/getRewardProofsByValidator.ts +1 -1
- package/src/actions/pol/{getUserVaultsReward.ts → getRewardVaultEarnedRewards.ts} +6 -4
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaultInfo.ts +2 -2
- package/src/actions/pol/getVaultsSupply.ts +5 -2
- package/src/actions/server/getDailyValidatorBlockStats.ts +28 -17
- package/src/actions/tokens/getWalletBalances.ts +1 -3
- package/src/actions/transactions/beraWriteContract.integration.test.ts +16 -3
- package/src/actions/transactions/beraWriteContract.ts +2 -2
- package/src/actions/validators/getUserBoostsOnValidator.ts +6 -9
- package/src/actions/validators/getValidatorAnalytics.ts +5 -1
- package/src/actions/validators/getValidatorEstimatedBgtPerYear.ts +3 -3
- package/src/contexts/exports.ts +1 -1
- package/src/errors/BeraError.ts +51 -1
- package/src/errors/BeraError.unit.test.ts +71 -0
- package/src/errors/BeraTracing.unit.test.ts +17 -18
- package/src/errors/RequestError.ts +15 -1
- package/src/errors/RequestError.unit.test.ts +47 -0
- package/src/errors/assert.ts +29 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -3
- package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +2 -2
- package/src/hooks/dex/useAllUserPools.ts +6 -6
- package/src/hooks/dex/useApiPool.ts +3 -3
- package/src/hooks/dex/useCreatePool.ts +13 -13
- package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +2 -2
- package/src/hooks/dex/useLiquidityMismatch.ts +3 -3
- package/src/hooks/dex/useLpPosition.ts +3 -3
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +3 -3
- package/src/hooks/dex/usePoolEvents.ts +3 -3
- package/src/hooks/dex/usePoolHistoricalData.ts +3 -3
- package/src/hooks/dex/usePools.ts +6 -6
- package/src/hooks/dex/usePriceImpact.ts +6 -6
- package/src/hooks/exports.ts +0 -4
- package/src/hooks/governance/useCreateProposal.ts +4 -4
- package/src/hooks/governance/useGetPastVotes.ts +11 -7
- package/src/hooks/governance/useHasVoted.ts +3 -3
- package/src/hooks/governance/useIsCanceller.ts +3 -3
- package/src/hooks/governance/usePollAllProposals.ts +3 -3
- package/src/hooks/governance/usePollProposal.ts +3 -3
- package/src/hooks/governance/usePollProposalThreshold.ts +3 -3
- package/src/hooks/governance/usePollProposalVotes.ts +12 -12
- package/src/hooks/governance/usePollUserDelegates.ts +18 -14
- package/src/hooks/governance/useProposalFromTx.ts +3 -3
- package/src/hooks/governance/useProposalSnapshot.ts +3 -3
- package/src/hooks/governance/useProposalState.ts +3 -3
- package/src/hooks/honey/useCappedGlobally.ts +3 -3
- package/src/hooks/honey/useCappedRelatively.ts +3 -3
- package/src/hooks/honey/useCollateralWeights.ts +3 -3
- package/src/hooks/honey/useHoneyAlerts.ts +9 -9
- package/src/hooks/honey/useHoneyBalances.ts +3 -3
- package/src/hooks/honey/useHoneySwapState.ts +2 -2
- package/src/hooks/honey/useHoneyVaultsBalance.ts +3 -3
- package/src/hooks/honey/useIsBadCollateralAsset.ts +3 -3
- package/src/hooks/perps/usePythUpdateFee.ts +3 -3
- package/src/hooks/pol/useAutoclaimedIncentives.ts +1 -1
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +1 -1
- package/src/hooks/pol/useBgtUnstakedBalance.ts +3 -3
- package/src/hooks/pol/useClaimableFees.ts +4 -4
- package/src/hooks/pol/useHighestVaultsAPR.ts +3 -3
- package/src/hooks/pol/useOnChainRewardVault.ts +6 -5
- package/src/hooks/pol/usePollGlobalData.ts +3 -3
- package/src/hooks/pol/usePollMarkets.ts +5 -5
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +6 -14
- package/src/hooks/pol/useRewardVault.ts +6 -5
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +3 -3
- package/src/hooks/pol/useRewardVaultFromToken.ts +3 -3
- package/src/hooks/pol/useRewardVaultRewards.ts +3 -3
- package/src/hooks/pol/useRewardVaults.ts +6 -6
- package/src/hooks/pol/useStakedData.ts +2 -2
- package/src/hooks/pol/useStakingVaultsMetadata.ts +3 -3
- package/src/hooks/pol/useUserVaultInfo.ts +3 -3
- package/src/hooks/pol/useUserVaults.ts +3 -3
- package/src/hooks/pol/useVaultAddress.ts +2 -2
- package/src/hooks/pol/useVaultHistory.ts +3 -3
- package/src/hooks/pol/useVaultValidators.ts +3 -3
- package/src/hooks/tokens/useBeraCurrentPrice.ts +8 -4
- package/src/hooks/tokens/useStakingTokenInformation.ts +3 -3
- package/src/hooks/useBlockToTimestamp.ts +1 -1
- package/src/hooks/useContractWrite/index.ts +1 -1
- package/src/hooks/useContractWrite/stateReducer.ts +2 -2
- package/src/hooks/useContractWrite/useBeraContractWrite.ts +1 -3
- package/src/hooks/useGetVerifiedAbi.ts +2 -2
- package/src/hooks/validators/useAllValidators.ts +6 -6
- package/src/hooks/validators/useApiValidator.ts +6 -5
- package/src/hooks/validators/useOnChainValidator.ts +3 -3
- package/src/hooks/validators/useStakingPoolBatch.ts +3 -3
- package/src/hooks/validators/useUserActiveValidators.ts +3 -3
- package/src/hooks/validators/useUserBoostsOnValidator.ts +3 -3
- package/src/hooks/validators/useUserClaimableIncentives.ts +116 -117
- package/src/hooks/validators/useUserStakingPositions.ts +3 -3
- package/src/hooks/validators/useValidatorAnalytics.ts +3 -0
- package/src/hooks/validators/useValidatorCommission.ts +3 -3
- package/src/hooks/validators/useValidatorEstimatedBgtPerYear.ts +4 -4
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +3 -3
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +3 -3
- package/src/types/bribeBoost.d.ts +69 -0
- package/src/types/exports.ts +1 -1
- package/src/utils/filter.ts +3 -5
- package/src/utils/formatIncentivesTokenMap.ts +8 -8
- package/src/utils/formatInputTokenValue.ts +2 -2
- package/src/utils/formatNumber.ts +5 -5
- package/src/utils/formatTimestamps.unit.test.ts +6 -3
- package/src/utils/formatUsd.ts +6 -4
- package/src/utils/getServerSideClient.ts +3 -3
- package/src/utils/isDifferenceExceedingThreshold.ts +10 -6
- package/src/utils/layerZeroScan.ts +3 -1
- package/src/utils/math.ts +12 -7
- package/src/utils/math.unit.test.ts +114 -15
- package/src/utils/polyfillAbortSignalAny.ts +4 -4
- package/src/utils/polyfillAbortSignalAny.unit.test.ts +3 -1
- package/src/utils/poolNamings.ts +14 -10
- package/src/utils/pythHoneyUtils.ts +2 -2
- package/src/utils/truncateHash.ts +3 -3
- package/src/actions/validators/getDailyValidatorBlockStats.ts +0 -38
- package/src/hooks/tokens/useTokenCurrentPrice.ts +0 -21
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +0 -33
- package/src/hooks/validators/useDefaultRewardAllocation.ts +0 -26
- /package/{src → dist}/types/bribe-boost.d.ts +0 -0
- /package/src/actions/dex/{b-sdk.ts → bSdk.ts} +0 -0
- /package/src/contexts/{block-time-provider.tsx → BlockTimeProvider.tsx} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorMap.d.ts","sourceRoot":"","sources":["../../src/errors/errorMap.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAMD,eAAO,MAAM,aAAa,kDAAkD,CAAC;AAE7E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8nCU,CAAC"}
|
package/dist/errors/exports.d.ts
CHANGED
|
@@ -1,328 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
declare function assertDefined<T>(
|
|
15
|
-
/**
|
|
16
|
-
* The value to assert.
|
|
17
|
-
*/
|
|
18
|
-
value: T,
|
|
19
|
-
/**
|
|
20
|
-
* The property name.
|
|
21
|
-
*/
|
|
22
|
-
property: string): asserts value is NonNullable<T>;
|
|
23
|
-
/**
|
|
24
|
-
* Asserts that a value is a PublicClient.
|
|
25
|
-
* @throws An InvalidArgumentError if the value is undefined or not a PublicClient.
|
|
26
|
-
*/
|
|
27
|
-
declare function assertPublicClient(
|
|
28
|
-
/**
|
|
29
|
-
* The value to assert.
|
|
30
|
-
*/
|
|
31
|
-
value: // it's important to have both types here because it helps with typescript build performance
|
|
32
|
-
PublicClient | GetPublicClientReturnType | undefined,
|
|
33
|
-
/**
|
|
34
|
-
* The property name.
|
|
35
|
-
*/
|
|
36
|
-
property?: string): asserts value is PublicClient;
|
|
37
|
-
/**
|
|
38
|
-
* Asserts that a value is an address (20 bytes).
|
|
39
|
-
* @throws An InvalidArgumentError if the value is undefined, null, not a string, or not an address.
|
|
40
|
-
*/
|
|
41
|
-
declare function assertAddress(
|
|
42
|
-
/**
|
|
43
|
-
* The value to assert.
|
|
44
|
-
*/
|
|
45
|
-
value: string | undefined | null,
|
|
46
|
-
/**
|
|
47
|
-
* The property name.
|
|
48
|
-
*/
|
|
49
|
-
property: string): asserts value is Address;
|
|
50
|
-
/**
|
|
51
|
-
* Asserts that a value is positive (> 0).
|
|
52
|
-
* @throws An InvalidArgumentError if the value is not positive.
|
|
53
|
-
*/
|
|
54
|
-
declare function assertPositive(value: string | bigint | number, property: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* Asserts that a value is a number greater than 0.
|
|
57
|
-
* @throws An InvalidArgumentError if the value is undefined, null, not a string or number, or not a number greater than 0.
|
|
58
|
-
*/
|
|
59
|
-
declare function assertAmount(
|
|
60
|
-
/**
|
|
61
|
-
* The value to assert.
|
|
62
|
-
*/
|
|
63
|
-
value: unknown,
|
|
64
|
-
/**
|
|
65
|
-
* The property name.
|
|
66
|
-
*/
|
|
67
|
-
property: string): asserts value is string | number;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Context passed alongside captured exceptions.
|
|
71
|
-
* Mirrors the subset of Sentry's CaptureContext that berajs actually uses.
|
|
72
|
-
*/
|
|
73
|
-
interface CaptureContext {
|
|
74
|
-
level: SeverityLevel;
|
|
75
|
-
extra?: Record<string, unknown>;
|
|
76
|
-
tags?: Record<string, string | number | boolean | null | undefined>;
|
|
77
|
-
fingerprint?: string[];
|
|
78
|
-
data?: Record<string, unknown>;
|
|
79
|
-
}
|
|
80
|
-
interface ErrorEvent {
|
|
81
|
-
exception: BeraError;
|
|
82
|
-
timestamp: number;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* A generic error reporter for berajs.
|
|
86
|
-
*
|
|
87
|
-
* Instead of calling Sentry.captureException directly, berajs calls
|
|
88
|
-
* `BeraMonitoring.captureException()`. Consumer apps subscribe via `.on()` and
|
|
89
|
-
* forward events to their monitoring provider (Sentry, Datadog, etc.).
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* // In berajs code:
|
|
94
|
-
* import { BeraMonitoring } from "./BeraMonitoring";
|
|
95
|
-
* BeraMonitoring.captureExceptionException(error);
|
|
96
|
-
*
|
|
97
|
-
* // In app instrumentation:
|
|
98
|
-
* import { BeraMonitoring } from "@berachain/berajs/errors";
|
|
99
|
-
* BeraMonitoring.on((event) => {
|
|
100
|
-
* if (event.type === "exception") {
|
|
101
|
-
* Sentry.captureException(event.exception);
|
|
102
|
-
* }
|
|
103
|
-
* });
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
declare const BeraMonitoring: {
|
|
107
|
-
captureException: (exception: BeraError) => void;
|
|
108
|
-
} & EmitterMixin<{
|
|
109
|
-
exception: (event: ErrorEvent) => void;
|
|
110
|
-
}>;
|
|
111
|
-
|
|
112
|
-
interface MatchedError {
|
|
113
|
-
/** The error key in the errorMap (e.g. "NOT_ENOUGH_GAS_TOKEN") */
|
|
114
|
-
key: string;
|
|
115
|
-
/** The category in the errorMap (e.g. "RPC", "BEX") */
|
|
116
|
-
category: string;
|
|
117
|
-
/** The user-friendly display message */
|
|
118
|
-
errorMSG: string;
|
|
119
|
-
/** Whether the match was by exact reason (true) or keyword (false) */
|
|
120
|
-
matchedByReason: boolean;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Finds the matching error entry in errorMap by reason or message.
|
|
124
|
-
*
|
|
125
|
-
* ## Matching priority:
|
|
126
|
-
* 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.
|
|
127
|
-
* 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.
|
|
128
|
-
*
|
|
129
|
-
* @returns The matched error entry with key and category, or null if no match found.
|
|
130
|
-
*/
|
|
131
|
-
declare function findMatchingError({ reason, message, }: {
|
|
132
|
-
reason?: string | null;
|
|
133
|
-
message?: string;
|
|
134
|
-
}): MatchedError | null;
|
|
135
|
-
/**
|
|
136
|
-
* Resolves a user-friendly displayMessage by matching `reason` and `message` against `errorMap.ts`.
|
|
137
|
-
*
|
|
138
|
-
* This is the bridge between the automatic reason detection pipeline (parseViemError) and
|
|
139
|
-
* the user-facing error messages. Called by the BeraError constructor.
|
|
140
|
-
*
|
|
141
|
-
* ## Matching priority:
|
|
142
|
-
* 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.
|
|
143
|
-
* This is the most reliable path — contract revert reasons like "NotEnoughBalance" or "BAL#508"
|
|
144
|
-
* are matched deterministically.
|
|
145
|
-
* 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.
|
|
146
|
-
* Use sparingly — keyword matching can cause false positives (e.g. "InsufficientBalance"
|
|
147
|
-
* keyword would also match "InsufficientBalanceToPayPythFee").
|
|
148
|
-
* 3. **GENERAL_ERROR fallback**: "Something went wrong. Please try again later."
|
|
149
|
-
*
|
|
150
|
-
* To ensure new contract errors get good displayMessages, add their reason to `errorMap.ts`.
|
|
151
|
-
* The reason is auto-detected by parseViemError — you only need to map it to a message here.
|
|
152
|
-
*/
|
|
153
|
-
declare function getErrorMessage({ reason, message, }: {
|
|
154
|
-
reason?: string | null;
|
|
155
|
-
message?: string;
|
|
156
|
-
}): string;
|
|
157
|
-
|
|
158
|
-
interface IInvalidArgumentErrorArgs extends IBeraErrorArgs {
|
|
159
|
-
/**
|
|
160
|
-
* The name of the argument that is invalid.
|
|
161
|
-
*/
|
|
162
|
-
property: string;
|
|
163
|
-
/**
|
|
164
|
-
* The value of the argument that is invalid.
|
|
165
|
-
*/
|
|
166
|
-
value: unknown;
|
|
167
|
-
/**
|
|
168
|
-
* The expected type of the value as a string, eg. string, number, boolean, etc.
|
|
169
|
-
*/
|
|
170
|
-
expected: string;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Error thrown when argument validation fails. (e.g. an argument is missing or invalid)
|
|
174
|
-
*
|
|
175
|
-
* Default level is "warning".
|
|
176
|
-
*
|
|
177
|
-
* @example ```ts
|
|
178
|
-
* if (!publicClient) {
|
|
179
|
-
* throw new InvalidArgumentError({
|
|
180
|
-
* property: "publicClient",
|
|
181
|
-
* value: publicClient,
|
|
182
|
-
* expected: "PublicClient",
|
|
183
|
-
* });
|
|
184
|
-
* }
|
|
185
|
-
* if (!address || !isAddress(address)) {
|
|
186
|
-
* throw new InvalidArgumentError({
|
|
187
|
-
* property: "address",
|
|
188
|
-
* value: address,
|
|
189
|
-
* expected: "Address",
|
|
190
|
-
* });
|
|
191
|
-
* }
|
|
192
|
-
* ```
|
|
193
|
-
*
|
|
194
|
-
*/
|
|
195
|
-
declare class InvalidArgumentError extends BeraError {
|
|
196
|
-
/**
|
|
197
|
-
* The name of the argument that is invalid.
|
|
198
|
-
*/
|
|
199
|
-
property: string;
|
|
200
|
-
/**
|
|
201
|
-
* The value of the argument that is invalid.
|
|
202
|
-
*/
|
|
203
|
-
value: unknown;
|
|
204
|
-
/**
|
|
205
|
-
* The expected value of the argument.
|
|
206
|
-
*/
|
|
207
|
-
expected: string;
|
|
208
|
-
constructor(args: IInvalidArgumentErrorArgs);
|
|
209
|
-
get isMissing(): boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Whether the argument is defined but invalid.
|
|
212
|
-
*/
|
|
213
|
-
get isInvalid(): boolean;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The preferred way to normalize any unknown error into a BeraError.
|
|
218
|
-
*
|
|
219
|
-
* This function acts as a smart factory that picks the correct BeraError subclass:
|
|
220
|
-
*
|
|
221
|
-
* 1. If `cause` is already a `BeraError`, returns it as-is (no double-wrapping).
|
|
222
|
-
* 2. If `cause` is a viem `BaseError`, runs `parseViemError` to classify it:
|
|
223
|
-
* - If the root cause is an `HttpRequestError` (RPC transport failure), wraps it
|
|
224
|
-
* in a `RequestError` with the endpoint URL extracted from the error.
|
|
225
|
-
* 3. Otherwise, wraps in a new `BeraError` — which triggers the automatic reason
|
|
226
|
-
* detection pipeline in the BeraError constructor (parseViemError → errorMap → displayMessage).
|
|
227
|
-
*
|
|
228
|
-
* **Use this instead of `new BeraError({ cause })` when you don't know the error type.**
|
|
229
|
-
* It ensures RequestErrors are correctly classified (important for Sentry filtering
|
|
230
|
-
* and fingerprinting — RequestErrors are skipped from transaction error grouping).
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* ```ts
|
|
234
|
-
* try {
|
|
235
|
-
* await someOperation();
|
|
236
|
-
* } catch (error) {
|
|
237
|
-
* // Normalizes to the right subclass, reason auto-detected
|
|
238
|
-
* throw initBeraError({ cause: error });
|
|
239
|
-
* }
|
|
240
|
-
* ```
|
|
241
|
-
*
|
|
242
|
-
* @example
|
|
243
|
-
* ```ts
|
|
244
|
-
* // Reporting to Sentry without rethrowing
|
|
245
|
-
* catch (error) {
|
|
246
|
-
* captureException(initBeraError({ cause: error }));
|
|
247
|
-
* }
|
|
248
|
-
* ```
|
|
249
|
-
*/
|
|
250
|
-
declare function initBeraError({ cause: error, level, }: {
|
|
251
|
-
cause: unknown;
|
|
252
|
-
/**
|
|
253
|
-
* The severity level of the error, only used if the error is not a BeraError.
|
|
254
|
-
*/
|
|
255
|
-
level?: SeverityLevel;
|
|
256
|
-
}): BeraError;
|
|
257
|
-
|
|
258
|
-
interface INotFoundErrorArgs extends IBeraErrorArgs {
|
|
259
|
-
resource: string;
|
|
260
|
-
id: string;
|
|
261
|
-
chainId: number;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Error thrown when a resource is not found.
|
|
265
|
-
*/
|
|
266
|
-
declare class NotFoundError extends BeraError {
|
|
267
|
-
/**
|
|
268
|
-
* The name of the resource that was not found.
|
|
269
|
-
*
|
|
270
|
-
* @example "Reward vault"
|
|
271
|
-
*/
|
|
272
|
-
resource: string;
|
|
273
|
-
/**
|
|
274
|
-
* The id of the resource that was not found.
|
|
275
|
-
*
|
|
276
|
-
* @example "0x1234567890123456789012345678901234567890"
|
|
277
|
-
*/
|
|
278
|
-
id: string;
|
|
279
|
-
constructor(args: INotFoundErrorArgs);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* This error is generally thrown by beraWriteContract when a transaction or simulation fails.
|
|
284
|
-
*/
|
|
285
|
-
declare class TransactionFailedError extends BeraError {
|
|
286
|
-
/**
|
|
287
|
-
* The hash of the transaction that failed.
|
|
288
|
-
*
|
|
289
|
-
* Null if the error is due to a simulation failure.
|
|
290
|
-
*/
|
|
291
|
-
txHash: string | null;
|
|
292
|
-
/**
|
|
293
|
-
* The receipt of the transaction that failed.
|
|
294
|
-
*
|
|
295
|
-
* Null if the error is due to a simulation failure.
|
|
296
|
-
*/
|
|
297
|
-
receipt: TransactionReceipt | null;
|
|
298
|
-
/**
|
|
299
|
-
* The address of the contract that was called.
|
|
300
|
-
*/
|
|
301
|
-
to: Address | undefined;
|
|
302
|
-
/**
|
|
303
|
-
* The data of the transaction that failed.
|
|
304
|
-
*/
|
|
305
|
-
callData: Hex | undefined;
|
|
306
|
-
/**
|
|
307
|
-
* The block number of the transaction that failed.
|
|
308
|
-
*/
|
|
309
|
-
blockNumber: bigint | null;
|
|
310
|
-
/**
|
|
311
|
-
* The input of the transaction that failed.
|
|
312
|
-
*/
|
|
313
|
-
input: object;
|
|
314
|
-
/**
|
|
315
|
-
* The function name of the transaction that failed.
|
|
316
|
-
*/
|
|
317
|
-
functionName: string | undefined;
|
|
318
|
-
constructor(args: IBeraErrorArgs & {
|
|
319
|
-
txHash?: string;
|
|
320
|
-
receipt?: TransactionReceipt;
|
|
321
|
-
to?: Address;
|
|
322
|
-
blockNumber?: bigint;
|
|
323
|
-
functionName?: string;
|
|
324
|
-
input: object;
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export { BeraError, BeraMonitoring, type CaptureContext, type ErrorEvent, IBeraErrorArgs, type IInvalidArgumentErrorArgs, type INotFoundErrorArgs, InvalidArgumentError, type MatchedError, NotFoundError, SeverityLevel, TransactionFailedError, assertAddress, assertAmount, assertDefined, assertPositive, assertPublicClient, findMatchingError, getErrorMessage, initBeraError };
|
|
1
|
+
export * from "./assert";
|
|
2
|
+
export * from "./BeraError";
|
|
3
|
+
export { BeraMonitoring, type CaptureContext, type ErrorEvent, } from "./BeraMonitoring";
|
|
4
|
+
export { BeraTracing, type SpanContext } from "./BeraTracing";
|
|
5
|
+
export * from "./getErrorMessage";
|
|
6
|
+
export * from "./InvalidArgumentError";
|
|
7
|
+
export * from "./initBeraError";
|
|
8
|
+
export * from "./NotFoundError";
|
|
9
|
+
export * from "./RequestError";
|
|
10
|
+
export type { SeverityLevel } from "./severity";
|
|
11
|
+
export { httpStatusToSpanStatus, reasonToSpanStatus, type SpanStatusType, } from "./spanStatus";
|
|
12
|
+
export * from "./TransactionFailedError";
|
|
13
|
+
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/errors/exports.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,cAAc,0BAA0B,CAAC"}
|
package/dist/errors/exports.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NotFoundError,
|
|
3
3
|
TransactionFailedError
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EJIGERYM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
BeraMonitoring,
|
|
7
7
|
initBeraError
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-LE4CYW7S.mjs";
|
|
9
9
|
import {
|
|
10
10
|
assertAddress,
|
|
11
11
|
assertAmount,
|
|
12
12
|
assertDefined,
|
|
13
|
+
assertInteger,
|
|
13
14
|
assertPositive,
|
|
14
15
|
assertPublicClient
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-QQASX4LJ.mjs";
|
|
16
17
|
import {
|
|
17
18
|
BeraTracing
|
|
18
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-BMNEN4OK.mjs";
|
|
19
20
|
import {
|
|
20
21
|
RequestError
|
|
21
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-P3YZ7F22.mjs";
|
|
22
23
|
import {
|
|
23
24
|
BeraError,
|
|
24
25
|
InvalidArgumentError,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
getErrorMessage,
|
|
27
28
|
httpStatusToSpanStatus,
|
|
28
29
|
reasonToSpanStatus
|
|
29
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-NZAH3SGT.mjs";
|
|
30
31
|
export {
|
|
31
32
|
BeraError,
|
|
32
33
|
BeraMonitoring,
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
assertAddress,
|
|
39
40
|
assertAmount,
|
|
40
41
|
assertDefined,
|
|
42
|
+
assertInteger,
|
|
41
43
|
assertPositive,
|
|
42
44
|
assertPublicClient,
|
|
43
45
|
findMatchingError,
|
|
@@ -46,3 +48,4 @@ export {
|
|
|
46
48
|
initBeraError,
|
|
47
49
|
reasonToSpanStatus
|
|
48
50
|
};
|
|
51
|
+
//# sourceMappingURL=exports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface MatchedError {
|
|
2
|
+
/** The error key in the errorMap (e.g. "NOT_ENOUGH_GAS_TOKEN") */
|
|
3
|
+
key: string;
|
|
4
|
+
/** The category in the errorMap (e.g. "RPC", "BEX") */
|
|
5
|
+
category: string;
|
|
6
|
+
/** The user-friendly display message */
|
|
7
|
+
errorMSG: string;
|
|
8
|
+
/** Whether the match was by exact reason (true) or keyword (false) */
|
|
9
|
+
matchedByReason: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Finds the matching error entry in errorMap by reason or message.
|
|
13
|
+
*
|
|
14
|
+
* ## Matching priority:
|
|
15
|
+
* 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.
|
|
16
|
+
* 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.
|
|
17
|
+
*
|
|
18
|
+
* @returns The matched error entry with key and category, or null if no match found.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findMatchingError({ reason, message, }: {
|
|
21
|
+
reason?: string | null;
|
|
22
|
+
message?: string;
|
|
23
|
+
}): MatchedError | null;
|
|
24
|
+
/**
|
|
25
|
+
* Resolves a user-friendly displayMessage by matching `reason` and `message` against `errorMap.ts`.
|
|
26
|
+
*
|
|
27
|
+
* This is the bridge between the automatic reason detection pipeline (parseViemError) and
|
|
28
|
+
* the user-facing error messages. Called by the BeraError constructor.
|
|
29
|
+
*
|
|
30
|
+
* ## Matching priority:
|
|
31
|
+
* 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.
|
|
32
|
+
* This is the most reliable path — contract revert reasons like "NotEnoughBalance" or "BAL#508"
|
|
33
|
+
* are matched deterministically.
|
|
34
|
+
* 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.
|
|
35
|
+
* Use sparingly — keyword matching can cause false positives (e.g. "InsufficientBalance"
|
|
36
|
+
* keyword would also match "InsufficientBalanceToPayPythFee").
|
|
37
|
+
* 3. **GENERAL_ERROR fallback**: "Something went wrong. Please try again later."
|
|
38
|
+
*
|
|
39
|
+
* To ensure new contract errors get good displayMessages, add their reason to `errorMap.ts`.
|
|
40
|
+
* The reason is auto-detected by parseViemError — you only need to map it to a message here.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getErrorMessage({ reason, message, }: {
|
|
43
|
+
reason?: string | null;
|
|
44
|
+
message?: string;
|
|
45
|
+
}): string;
|
|
46
|
+
//# sourceMappingURL=getErrorMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getErrorMessage.d.ts","sourceRoot":"","sources":["../../src/errors/getErrorMessage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,YAAY,GAAG,IAAI,CAyCtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAET"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Abi, type Address, type Hex, type PublicClient } from "viem";
|
|
2
|
+
import { parseViemError } from "./parseViemError";
|
|
3
|
+
export type GetRevertReasonArgs = {
|
|
4
|
+
publicClient: PublicClient;
|
|
5
|
+
abi?: Abi;
|
|
6
|
+
} & ({
|
|
7
|
+
txHash: Hex;
|
|
8
|
+
} | ({
|
|
9
|
+
blockNumber: bigint;
|
|
10
|
+
to: Address;
|
|
11
|
+
account: Address;
|
|
12
|
+
value?: bigint | undefined;
|
|
13
|
+
} & ({
|
|
14
|
+
data: Hex;
|
|
15
|
+
} | {
|
|
16
|
+
value: bigint;
|
|
17
|
+
} | {
|
|
18
|
+
args: readonly unknown[] | undefined;
|
|
19
|
+
functionName: string | undefined;
|
|
20
|
+
value?: bigint;
|
|
21
|
+
})));
|
|
22
|
+
/**
|
|
23
|
+
* Recovers the revert reason for a transaction that failed **on-chain**.
|
|
24
|
+
*
|
|
25
|
+
* When a transaction is mined but reverts, the revert reason is no longer available in the
|
|
26
|
+
* original viem error (we only get `status: "reverted"` in the receipt). This function
|
|
27
|
+
* recovers the reason by **replaying the transaction** at the same block number.
|
|
28
|
+
*
|
|
29
|
+
* ## How it works
|
|
30
|
+
*
|
|
31
|
+
* 1. **Reconstruct the call:** Either from a `txHash` (fetches tx data from chain) or from
|
|
32
|
+
* explicit `blockNumber + to + account + data/functionName+args`.
|
|
33
|
+
* 2. **Replay via simulateContract:** Calls `publicClient.simulateContract` at the original
|
|
34
|
+
* `blockNumber`, which reproduces the exact revert that happened on-chain.
|
|
35
|
+
* 3. **Parse the revert:** The simulated revert throws a viem error, which is caught and
|
|
36
|
+
* parsed by `parseViemError` to extract the reason.
|
|
37
|
+
*
|
|
38
|
+
* ## Usage context
|
|
39
|
+
*
|
|
40
|
+
* This function is called internally by `beraWriteContract` when a transaction receipt has
|
|
41
|
+
* `status: "reverted"`. The recovered reason is passed into `TransactionFailedError`, which
|
|
42
|
+
* then feeds into the standard pipeline (errorMap → displayMessage → Sentry).
|
|
43
|
+
*
|
|
44
|
+
* ## ABI importance
|
|
45
|
+
*
|
|
46
|
+
* Passing the correct ABI is critical here. Without it, custom error names cannot be decoded
|
|
47
|
+
* and the reason falls back to a hex selector. The ABI is merged with `commonAbiErrors`
|
|
48
|
+
* (which includes `Error(string)` and `Panic(uint256)`) to handle standard reverts.
|
|
49
|
+
*
|
|
50
|
+
* @returns Same shape as parseViemError: `{ reason, rootCause }`
|
|
51
|
+
*/
|
|
52
|
+
export declare function getRevertReason({ publicClient, abi: providedAbi, ...params }: GetRevertReasonArgs): Promise<ReturnType<typeof parseViemError>>;
|
|
53
|
+
//# sourceMappingURL=getRevertReason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRevertReason.d.ts","sourceRoot":"","sources":["../../src/errors/getRevertReason.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAER,KAAK,OAAO,EAEZ,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAId,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,GAAG,CACA;IACE,MAAM,EAAE,GAAG,CAAC;CACb,GACD,CAAC;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GAAG,CACA;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,GACb;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IACE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IACrC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CACJ,CAAC,CACL,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,eAAe,CAAC,EACpC,YAAY,EACZ,GAAG,EAAE,WAAW,EAChB,GAAG,MAAM,EACV,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAmJlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRevertReason.integration.test.d.ts","sourceRoot":"","sources":["../../src/errors/getRevertReason.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BeraError } from "./BeraError";
|
|
2
|
+
import type { SeverityLevel } from "./severity";
|
|
3
|
+
/**
|
|
4
|
+
* The preferred way to normalize any unknown error into a BeraError.
|
|
5
|
+
*
|
|
6
|
+
* This function acts as a smart factory that picks the correct BeraError subclass:
|
|
7
|
+
*
|
|
8
|
+
* 1. If `cause` is already a `BeraError`, returns it as-is (no double-wrapping).
|
|
9
|
+
* 2. If `cause` is a viem `BaseError`, runs `parseViemError` to classify it:
|
|
10
|
+
* - If the root cause is an `HttpRequestError` (RPC transport failure), wraps it
|
|
11
|
+
* in a `RequestError` with the endpoint URL extracted from the error.
|
|
12
|
+
* 3. Otherwise, wraps in a new `BeraError` — which triggers the automatic reason
|
|
13
|
+
* detection pipeline in the BeraError constructor (parseViemError → errorMap → displayMessage).
|
|
14
|
+
*
|
|
15
|
+
* **Use this instead of `new BeraError({ cause })` when you don't know the error type.**
|
|
16
|
+
* It ensures RequestErrors are correctly classified (important for Sentry filtering
|
|
17
|
+
* and fingerprinting — RequestErrors are skipped from transaction error grouping).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* try {
|
|
22
|
+
* await someOperation();
|
|
23
|
+
* } catch (error) {
|
|
24
|
+
* // Normalizes to the right subclass, reason auto-detected
|
|
25
|
+
* throw initBeraError({ cause: error });
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* // Reporting to Sentry without rethrowing
|
|
32
|
+
* catch (error) {
|
|
33
|
+
* captureException(initBeraError({ cause: error }));
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function initBeraError({ cause: error, level, }: {
|
|
38
|
+
cause: unknown;
|
|
39
|
+
/**
|
|
40
|
+
* The severity level of the error, only used if the error is not a BeraError.
|
|
41
|
+
*/
|
|
42
|
+
level?: SeverityLevel;
|
|
43
|
+
}): BeraError;
|
|
44
|
+
//# sourceMappingURL=initBeraError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initBeraError.d.ts","sourceRoot":"","sources":["../../src/errors/initBeraError.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EAAE,KAAK,EACZ,KAAK,GACN,EAAE;IACD,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,GAAG,SAAS,CAwCZ"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type Abi, type DecodeErrorResultReturnType, type ProviderRpcErrorCode } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Extracts a human-readable reason string from a decoded Solidity error.
|
|
4
|
+
*
|
|
5
|
+
* Solidity has two kinds of revert errors:
|
|
6
|
+
* - `revert("some message")` → decoded as `Error(string)` where the message is in `args[0]`.
|
|
7
|
+
* In this case we return the string argument (e.g. `"BAL#508"`).
|
|
8
|
+
* - `revert CustomError(...)` → decoded as `CustomError(...)` where `errorName` is the
|
|
9
|
+
* custom error name. In this case we return `errorName` (e.g. `"NotEnoughBalance"`).
|
|
10
|
+
*
|
|
11
|
+
* The returned string is used as the `reason` field in BeraError and is matched against
|
|
12
|
+
* `errorMap.ts` to resolve a user-friendly `displayMessage`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseDecodedError<const abi extends Abi | readonly unknown[]>(error: DecodeErrorResultReturnType<abi>): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The reason extraction engine — recursively unwraps viem error chains to extract
|
|
17
|
+
* a machine-readable `reason` string.
|
|
18
|
+
*
|
|
19
|
+
* This function is the core of the automatic reason detection system. It is called by:
|
|
20
|
+
* - `BeraError` constructor (when `reason` is not manually provided)
|
|
21
|
+
* - `initBeraError` (to detect if the error is a RequestError)
|
|
22
|
+
* - `getRevertReason` (after replaying a failed on-chain transaction)
|
|
23
|
+
*
|
|
24
|
+
* ## Viem error chain structure
|
|
25
|
+
*
|
|
26
|
+
* Viem errors are deeply nested. The typical chains look like:
|
|
27
|
+
*
|
|
28
|
+
* **From `simulateContract`:**
|
|
29
|
+
* ```
|
|
30
|
+
* ContractFunctionExecutionError ← wrapper, skipped
|
|
31
|
+
* └── ContractFunctionRevertedError ← reason extracted here (cause.reason / cause.signature)
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* **From `publicClient.call` (raw call):**
|
|
35
|
+
* ```
|
|
36
|
+
* CallExecutionError ← wrapper, skipped
|
|
37
|
+
* └── ExecutionRevertedError ← wrapper, skipped
|
|
38
|
+
* └── RpcRequestError ← reason decoded from cause.data using ABI
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* **From `writeContract` / `sendTransaction`:**
|
|
42
|
+
* ```
|
|
43
|
+
* TransactionExecutionError ← checked for special wallet errors
|
|
44
|
+
* └── UserRejectedRequestError ← "UserRejectedRequestError"
|
|
45
|
+
* └── AtomicReadyWalletRejectedUpgradeError ← "AtomicReadyWalletRejectedUpgradeError"
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **From RPC transport failures:**
|
|
49
|
+
* ```
|
|
50
|
+
* ContractFunctionExecutionError ← wrapper, skipped
|
|
51
|
+
* └── HttpRequestError ← "HttpRequestError(status:<code>)", isRequestError=true
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* The function walks `cause.cause` in a while loop until it finds an error type it can
|
|
55
|
+
* extract a reason from, or runs out of nested causes.
|
|
56
|
+
*
|
|
57
|
+
* ## Parameters
|
|
58
|
+
*
|
|
59
|
+
* @param error - Any Error instance (typically a viem BaseError).
|
|
60
|
+
* @param abi - Optional contract ABI. Merged with `commonAbiErrors` to decode revert data.
|
|
61
|
+
* Passing the correct ABI enables decoding custom error names (e.g. "SlippageExceeded")
|
|
62
|
+
* instead of falling back to hex selectors (e.g. "0xa3b1e29f").
|
|
63
|
+
* @param revertIfUnknown - If true, throws when the error doesn't match any known pattern.
|
|
64
|
+
* The BeraError constructor calls with `true`; `initBeraError` calls with `false`.
|
|
65
|
+
*
|
|
66
|
+
* @returns `{ reason, rootCause, isRequestError? }` where:
|
|
67
|
+
* - `reason` is the extracted error code/name (matched against errorMap.ts for displayMessage)
|
|
68
|
+
* - `rootCause` is the deepest error in the chain that was identified
|
|
69
|
+
* - `isRequestError` is true if the error is an HTTP/RPC transport failure
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseViemError({ error, abi, revertIfUnknown, }: {
|
|
72
|
+
error: Error;
|
|
73
|
+
abi?: Abi;
|
|
74
|
+
revertIfUnknown: boolean;
|
|
75
|
+
}): {
|
|
76
|
+
reason: string | undefined;
|
|
77
|
+
rootCause: unknown;
|
|
78
|
+
isRequestError?: boolean;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Returns the error code thrown by RpcError.
|
|
82
|
+
*
|
|
83
|
+
* @see {@link RpcError}
|
|
84
|
+
* @param errCode - The error code to get the name for.
|
|
85
|
+
* @returns The name of the error code.
|
|
86
|
+
*/
|
|
87
|
+
export declare function rpcErrorToReason(errCode: number | ProviderRpcErrorCode | "UserRejectedRequestError"): string;
|
|
88
|
+
//# sourceMappingURL=parseViemError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseViemError.d.ts","sourceRoot":"","sources":["../../src/errors/parseViemError.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAKR,KAAK,2BAA2B,EAGhC,KAAK,oBAAoB,EAI1B,MAAM,MAAM,CAAC;AAmDd;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,GAAG,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC1E,KAAK,EAAE,2BAA2B,CAAC,GAAG,CAAC,GACtC,MAAM,GAAG,SAAS,CAYpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,GAAG,EACH,eAAsB,GACvB,EAAE;IACD,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,eAAe,EAAE,OAAO,CAAC;CAC1B,GAAG;IACF,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CA6IA;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EACH,MAAM,GACN,oBAAoB,GAEpB,0BAA0B,GAC7B,MAAM,CASR"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Severity levels for error reporting.
|
|
3
|
+
* Mirrors Sentry's SeverityLevel for compatibility, but owned by berajs
|
|
4
|
+
* so we don't depend on @sentry/nextjs.
|
|
5
|
+
*/
|
|
6
|
+
export type SeverityLevel = "fatal" | "error" | "warning" | "log" | "info" | "debug";
|
|
7
|
+
//# sourceMappingURL=severity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/errors/severity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,OAAO,CAAC"}
|