@berachain/berajs 0.2.12 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/{getApolloClient-MWm_iq4u.d.ts → actions/clients/BeraApolloClient.d.ts} +3 -14
- package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -0
- package/dist/actions/clients/clientName.d.ts +10 -0
- package/dist/actions/clients/clientName.d.ts.map +1 -0
- package/dist/actions/clients/exports.d.ts +6 -62
- package/dist/actions/clients/exports.d.ts.map +1 -0
- package/dist/actions/clients/exports.mjs +30 -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/fetchEnso.d.ts +17 -0
- package/dist/actions/clients/fetchEnso.d.ts.map +1 -0
- package/dist/actions/clients/fetchLayerzero.d.ts +12 -0
- package/dist/actions/clients/fetchLayerzero.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.d.ts +51 -0
- package/dist/actions/clients/fetchOpenApi.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/aggregators/base.d.ts +114 -0
- package/dist/actions/dex/aggregators/base.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/bex.d.ts +36 -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 +15 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.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 +20 -0
- package/dist/actions/dex/aggregators/haiku.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 +18 -0
- package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -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__/helpers.d.ts +24 -0
- package/dist/actions/enso/__tests__/helpers.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/getEnsoUserTokensWithBalances.d.ts +16 -0
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -0
- package/dist/actions/enso/util.d.ts +35 -0
- package/dist/actions/enso/util.d.ts.map +1 -0
- package/dist/actions/exports.d.ts +98 -1682
- package/dist/actions/exports.d.ts.map +1 -0
- package/dist/actions/exports.mjs +40 -40
- package/dist/actions/exports.mjs.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/misc/getBlockTimestamp.d.ts +14 -0
- package/dist/actions/misc/getBlockTimestamp.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/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/getEarnedStakedBeraVault.d.ts +19 -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/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/getRewardVaultDurationConstants.d.ts +12 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.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 +19 -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/getStakedBeraAPY.d.ts +14 -0
- package/dist/actions/pol/getStakedBeraAPY.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts +22 -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/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/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/transactions/beraWriteContract.d.ts +19 -0
- package/dist/actions/transactions/beraWriteContract.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/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 +48 -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/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 +56 -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/aggregateValidatorIncentives.d.ts +6 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.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-T43JPYQS.mjs → chunk-4576RF2K.mjs} +30 -4
- package/dist/chunk-4576RF2K.mjs.map +1 -0
- package/dist/{chunk-W2VODV76.mjs → chunk-5PBYMJRG.mjs} +97 -25
- package/dist/chunk-5PBYMJRG.mjs.map +1 -0
- package/dist/{chunk-QVHEM4BG.mjs → chunk-7KN7TDUC.mjs} +10 -4
- package/dist/chunk-7KN7TDUC.mjs.map +1 -0
- package/dist/chunk-7OESHTBN.mjs +29 -0
- package/dist/chunk-7OESHTBN.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-O2NQFKJK.mjs → chunk-BSLXKPX4.mjs} +4 -47
- package/dist/chunk-BSLXKPX4.mjs.map +1 -0
- package/dist/{chunk-MKSFQIKC.mjs → chunk-BZKA6DBM.mjs} +15 -16
- package/dist/chunk-BZKA6DBM.mjs.map +1 -0
- package/dist/{chunk-FGION6F6.mjs → chunk-FWRYUIJK.mjs} +3 -2
- package/dist/chunk-FWRYUIJK.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-IXIBY5FP.mjs → chunk-HPRLNT6R.mjs} +3 -2
- package/dist/chunk-HPRLNT6R.mjs.map +1 -0
- package/dist/chunk-J6GM7HWX.mjs +19 -0
- package/dist/chunk-J6GM7HWX.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-RFJGL4MF.mjs → chunk-LL7XR2H5.mjs} +41 -3
- package/dist/chunk-LL7XR2H5.mjs.map +1 -0
- package/dist/{chunk-AUOPN6NK.mjs → chunk-M3MIGSH3.mjs} +2 -1
- package/dist/chunk-M3MIGSH3.mjs.map +1 -0
- package/dist/{chunk-KHXJDYA4.mjs → chunk-MVNQY2D4.mjs} +34 -3
- package/dist/chunk-MVNQY2D4.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-SC3BSCTN.mjs} +2 -1
- package/dist/chunk-SC3BSCTN.mjs.map +1 -0
- package/dist/{chunk-XDG26EG6.mjs → chunk-SMBAW7AG.mjs} +436 -434
- package/dist/chunk-SMBAW7AG.mjs.map +1 -0
- package/dist/{chunk-GY6B3PD5.mjs → chunk-TXWDUJOY.mjs} +12 -1
- package/dist/chunk-TXWDUJOY.mjs.map +1 -0
- package/dist/{chunk-GUURQAME.mjs → chunk-UWJQ6UKG.mjs} +2 -1
- package/dist/chunk-UWJQ6UKG.mjs.map +1 -0
- package/dist/chunk-XO2BFPTB.mjs +50 -0
- package/dist/chunk-XO2BFPTB.mjs.map +1 -0
- package/dist/{chunk-BGMRHTBQ.mjs → chunk-XXKPXNQD.mjs} +1 -1
- package/dist/chunk-XXKPXNQD.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-HYDP32P6.mjs → chunk-ZHV3MQ4F.mjs} +6 -6
- package/dist/chunk-ZHV3MQ4F.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/{BexStatusProvider-DRymVlQf.d.ts → contexts/BexStatusProvider.d.ts} +9 -12
- 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/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 +18 -0
- package/dist/enum/contracts.d.ts.map +1 -0
- package/dist/{dex-C_BB0b0O.d.ts → enum/dex.d.ts} +6 -7
- 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 +8 -5
- 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/{honey-CYm0RWf4.d.ts → enum/honey.d.ts} +2 -3
- 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/{txnEnum-ByI5dtDi.d.ts → enum/txnEnum.d.ts} +2 -18
- package/dist/enum/txnEnum.d.ts.map +1 -0
- package/dist/{BeraError-7-A5JYy_.d.ts → errors/BeraError.d.ts} +7 -31
- package/dist/errors/BeraError.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/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 +75 -0
- package/dist/errors/RequestError.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/errorMap.d.ts +1084 -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/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/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/useCrossChainNativeFee.d.ts +32 -0
- package/dist/hooks/dex/useCrossChainNativeFee.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/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 +106 -1332
- package/dist/hooks/exports.d.ts.map +1 -0
- package/dist/hooks/exports.mjs +868 -1247
- 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/{useHoneySwapState-twi7NTaO.d.ts → hooks/honey/useHoneySwapState.d.ts} +7 -9
- 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/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/useStakedAPY.d.ts +11 -0
- package/dist/hooks/pol/useStakedAPY.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 +6 -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 +39 -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 +12 -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/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/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 +13 -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 +10 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -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/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/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/crossChainBridge.d.ts +74 -0
- package/dist/utils/crossChainBridge.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 +165 -84
- 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/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/formatTimestamps.d.ts +20 -0
- package/dist/utils/formatTimestamps.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/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/getServerSideClient.d.ts +6 -0
- package/dist/utils/getServerSideClient.d.ts.map +1 -0
- package/dist/utils/getTestClient.d.ts +75 -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/math.d.ts +15 -0
- package/dist/utils/math.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/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/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/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/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/validatorUptimeStatus.d.ts +19 -0
- package/dist/utils/validatorUptimeStatus.d.ts.map +1 -0
- package/package.json +11 -7
- package/src/actions/clients/BeraApolloClient.ts +8 -4
- package/src/actions/clients/clientName.ts +17 -0
- package/src/actions/clients/clientName.unit.test.ts +39 -0
- package/src/actions/clients/exports.ts +2 -0
- package/src/actions/clients/fetchBeep.ts +4 -1
- package/src/actions/clients/fetchEnso.ts +48 -0
- package/src/actions/clients/fetchLayerzero.ts +34 -0
- package/src/actions/clients/fetchOpenApi.ts +9 -2
- package/src/actions/clients/fetchOpenApi.unit.test.ts +35 -19
- package/src/actions/clients/getApolloClient.ts +3 -11
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +231 -2
- package/src/actions/dex/aggregators/base.ts +78 -18
- package/src/actions/dex/aggregators/bex.ts +44 -11
- package/src/actions/dex/aggregators/bgt.ts +11 -6
- package/src/actions/dex/aggregators/enso/enso.ts +1 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +27 -9
- package/src/actions/dex/aggregators/erc4626.ts +19 -5
- package/src/actions/dex/aggregators/fly.ts +1 -0
- package/src/actions/dex/aggregators/haiku.ts +33 -2
- package/src/actions/dex/aggregators/honey.ts +17 -6
- package/src/actions/dex/aggregators/kyberswap.ts +1 -0
- package/src/actions/dex/aggregators/oogabooga.ts +1 -0
- package/src/actions/dex/aggregators/openOcean.ts +1 -0
- package/src/actions/dex/aggregators/wbera.ts +17 -11
- package/src/actions/dex/getPoolWithState.ts +2 -2
- package/src/actions/enso/__tests__/helpers.ts +15 -10
- package/src/actions/enso/getBendMultiplyBundle.ts +1 -1
- package/src/actions/enso/getEnsoUserTokensWithBalances.ts +4 -8
- package/src/actions/enso/util.ts +0 -59
- package/src/actions/exports.ts +5 -8
- package/src/actions/governance/getDecodedFunctionData.ts +5 -1
- package/src/actions/honey/getHoney24hVolume.ts +3 -12
- package/src/actions/honey/getHoneyCollaterals.ts +1 -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/getBeraTokenTotalSupply.ts +3 -33
- package/src/actions/pol/getLSTStakeConfig.ts +0 -6
- package/src/actions/pol/{getUserVaultsReward.ts → getRewardVaultEarnedRewards.ts} +6 -4
- package/src/actions/pol/getSWBeraVaultMetadata.ts +2 -106
- package/src/actions/pol/getStakedBeraAPY.ts +45 -0
- package/src/actions/pol/getStakedBeraSnapshots.ts +18 -34
- package/src/actions/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/getActiveBoostAndCommissionChangeDelay.ts +1 -1
- package/src/actions/validators/getUserActiveValidators.ts +116 -54
- package/src/actions/validators/getUserBoostsOnValidator.ts +6 -9
- package/src/actions/validators/getValidatorEstimatedBgtPerYear.ts +3 -3
- package/src/actions/validators/getValidatorRewardAllocation.ts +12 -1
- package/src/contexts/BeraFlags/BeraFlags.tsx +1 -4
- package/src/contexts/BeraFlags/defaultFlags.ts +1 -3
- package/src/contexts/BexStatusProvider.tsx +1 -1
- package/src/contexts/TokensProvider.tsx +1 -4
- package/src/contexts/exports.ts +1 -1
- package/src/enum/contracts.ts +3 -0
- package/src/errors/BeraError.ts +51 -1
- package/src/errors/BeraError.unit.test.ts +94 -0
- package/src/errors/BeraTracing.unit.test.ts +17 -18
- package/src/errors/RequestError.ts +61 -10
- package/src/errors/RequestError.unit.test.ts +101 -0
- package/src/errors/assert.ts +29 -0
- package/src/errors/errorMap.ts +8 -3
- package/src/errors/getErrorMessage.unit.test.ts +32 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -3
- package/src/hooks/dex/useAggregatorsQuotes.ts +7 -1
- 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/useCrossChainNativeFee.ts +83 -0
- package/src/hooks/dex/useCrossChainNativeFee.unit.test.ts +63 -0
- 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/useOnChainPoolData.ts +30 -13
- 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/dex/useSingleAggregatorQuote.ts +4 -2
- package/src/hooks/enso/useBendZapSupply.ts +9 -38
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +10 -2
- package/src/hooks/enso/useZapStakeBera.ts +1 -1
- package/src/hooks/exports.ts +2 -9
- 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 +7 -4
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +6 -3
- 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 +11 -18
- package/src/hooks/pol/useRewardVault.ts +6 -5
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +3 -4
- 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/{useStakedAPR.ts → useStakedAPY.ts} +11 -9
- package/src/hooks/pol/useStakedData.ts +15 -16
- package/src/hooks/pol/useStakingVaultsMetadata.ts +5 -10
- 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/useMultipleTokenInformation.ts +64 -21
- package/src/hooks/tokens/useMultipleTokenInformation.unit.test.ts +91 -0
- package/src/hooks/tokens/usePollBalance.ts +4 -2
- package/src/hooks/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 +57 -12
- package/src/hooks/validators/useUserBoostsOnValidator.ts +3 -3
- package/src/hooks/validators/useUserStakingPositions.ts +3 -3
- package/src/hooks/validators/useValidatorCommission.ts +3 -3
- package/src/hooks/validators/useValidatorEstimatedBgtPerYear.ts +4 -4
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +3 -4
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +3 -3
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +3 -3
- package/src/types/bribeBoost.d.ts +20 -0
- package/src/types/dex.d.ts +17 -0
- package/src/types/enso.d.ts +1 -27
- package/src/types/exports.ts +1 -1
- package/src/types/global.d.ts +7 -0
- package/src/types/pol.d.ts +3 -48
- package/src/utils/crossChainBridge.ts +290 -0
- package/src/utils/crossChainBridge.unit.test.ts +177 -0
- package/src/utils/exports.ts +1 -1
- package/src/utils/filter.ts +3 -5
- 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/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/dist/HoneyConfigProvider-COOuDNra.d.ts +0 -390
- package/dist/RequestError-DBOIV65x.d.ts +0 -144
- package/dist/chunk-YLTWPFCJ.mjs +0 -39
- package/dist/defaultFlags-D6KfkTZx.d.ts +0 -10
- package/dist/getProposalVotes-DAUrdX2n.d.ts +0 -12
- package/dist/getValidatorQueuedOperatorAddress-Cc05dlO3.d.ts +0 -511
- package/dist/global.d-CR3zicga.d.ts +0 -231
- package/dist/pol.d-CeRgXBL8.d.ts +0 -167
- package/src/actions/enso/getEnsoSwapBundle.ts +0 -77
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +0 -28
- package/src/actions/pol/getRewardProofsByValidator.ts +0 -49
- package/src/actions/pol/getStakedBeraAPR.ts +0 -56
- package/src/actions/pol/getUserClaimableIncentives.ts +0 -40
- package/src/actions/validators/getDailyValidatorBlockStats.ts +0 -38
- package/src/actions/validators/getValidatorAnalytics.ts +0 -33
- package/src/hooks/enso/useEnsoSwapBundle.ts +0 -121
- package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +0 -34
- 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/hooks/validators/useUserClaimableIncentives.ts +0 -149
- package/src/hooks/validators/useValidatorAnalytics.ts +0 -34
- package/src/types/bribe-boost.d.ts +0 -69
- package/src/utils/formatIncentivesTokenMap.ts +0 -19
- package/src/utils/layerZeroScan.ts +0 -122
- /package/src/actions/dex/{b-sdk.ts → bSdk.ts} +0 -0
- /package/src/contexts/{block-time-provider.tsx → BlockTimeProvider.tsx} +0 -0
package/src/errors/BeraError.ts
CHANGED
|
@@ -37,6 +37,31 @@ export interface IBeraErrorArgs {
|
|
|
37
37
|
|
|
38
38
|
type Primitive = number | string | boolean | bigint | symbol | null | undefined;
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* JSON-RPC error codes that are transient / not actionable by us — provider-side
|
|
42
|
+
* or network failures rather than a bug in our request. Downleveled to "warning"
|
|
43
|
+
* so they don't pollute the Sentry error stream.
|
|
44
|
+
*
|
|
45
|
+
* We use an explicit allowlist rather than the whole -32000..-32099 server-error
|
|
46
|
+
* range, because that range is implementation-defined and includes *actionable*
|
|
47
|
+
* failures too (e.g. providers return -32000 for "invalid input" / "insufficient
|
|
48
|
+
* funds", -32004 for "method not supported"). Downleveling the whole range would
|
|
49
|
+
* hide malformed calls we should fix.
|
|
50
|
+
*
|
|
51
|
+
* @see https://www.jsonrpc.org/specification#error_object
|
|
52
|
+
* @see https://eips.ethereum.org/EIPS/eip-1474#error-codes
|
|
53
|
+
*/
|
|
54
|
+
const TRANSIENT_RPC_CODES = new Set<number>([
|
|
55
|
+
-32603, // internal JSON-RPC error (provider blew up handling a valid request)
|
|
56
|
+
-32002, // resource unavailable / request already pending
|
|
57
|
+
-32005, // limit exceeded (rate limited)
|
|
58
|
+
-32016, // request timed out
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
function isTransientRpcCode(code: number): boolean {
|
|
62
|
+
return TRANSIENT_RPC_CODES.has(code);
|
|
63
|
+
}
|
|
64
|
+
|
|
40
65
|
/**
|
|
41
66
|
* An helper type to make sure we only use the allowed tags. Sync this with docs/errors.md
|
|
42
67
|
*/
|
|
@@ -187,6 +212,10 @@ export class BeraError extends Error {
|
|
|
187
212
|
// ContractFunctionRevertedError → RpcRequestError) and decodes revert data using ABI.
|
|
188
213
|
// The extracted reason (e.g. "NotEnoughBalance", "BAL#508") is the key that drives
|
|
189
214
|
// displayMessage resolution and Sentry fingerprinting.
|
|
215
|
+
// JSON-RPC error code carried by a plain-object cause (set below), used for
|
|
216
|
+
// level inference. Only populated when `cause` isn't a viem/Error.
|
|
217
|
+
let rpcCode: number | undefined;
|
|
218
|
+
|
|
190
219
|
if (reason) {
|
|
191
220
|
this.reason = reason;
|
|
192
221
|
} else if (cause instanceof Error) {
|
|
@@ -202,14 +231,35 @@ export class BeraError extends Error {
|
|
|
202
231
|
// parseViemError throws when it can't identify the error type and revertIfUnknown=true.
|
|
203
232
|
// In that case, reason stays null and displayMessage falls back to GENERAL_ERROR.
|
|
204
233
|
}
|
|
234
|
+
} else if (
|
|
235
|
+
// Plain object carrying a JSON-RPC error code (e.g. a wallet/RPC provider
|
|
236
|
+
// rejecting with `{ code: -32603, message: "Internal JSON-RPC error." }`).
|
|
237
|
+
// These aren't viem errors, so parseViemError never sees them — derive the
|
|
238
|
+
// reason straight from the code instead of dropping it.
|
|
239
|
+
typeof cause === "object" &&
|
|
240
|
+
cause !== null &&
|
|
241
|
+
"code" in cause &&
|
|
242
|
+
typeof cause.code === "number"
|
|
243
|
+
) {
|
|
244
|
+
rpcCode = cause.code;
|
|
245
|
+
this.reason = rpcErrorToReason(cause.code);
|
|
205
246
|
}
|
|
206
247
|
|
|
207
248
|
// ── Level inference ─────────────────────────────────────────────────
|
|
208
|
-
//
|
|
249
|
+
// Priority:
|
|
250
|
+
// 1. Explicit `level` from caller
|
|
251
|
+
// 2. User rejections → "info" (not actionable by devs)
|
|
252
|
+
// 3. Transient/provider JSON-RPC errors → "warning" (see isTransientRpcCode).
|
|
253
|
+
// We deliberately do NOT downlevel the actionable codes (-32600 invalid
|
|
254
|
+
// request, -32601 method not found, -32602 invalid params, -32700 parse
|
|
255
|
+
// error) — those usually mean a bug in our request construction.
|
|
256
|
+
// 4. Everything else → "error"
|
|
209
257
|
if (level) {
|
|
210
258
|
this.level = level;
|
|
211
259
|
} else if (this.reason === rpcErrorToReason("UserRejectedRequestError")) {
|
|
212
260
|
this.level = "info";
|
|
261
|
+
} else if (rpcCode !== undefined && isTransientRpcCode(rpcCode)) {
|
|
262
|
+
this.level = "warning";
|
|
213
263
|
} else {
|
|
214
264
|
this.level = "error";
|
|
215
265
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { WaitForTransactionReceiptTimeoutError } from "viem";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
import { BeraError } from "./BeraError.js";
|
|
5
|
+
|
|
6
|
+
describe("BeraError JSON-RPC code classification", () => {
|
|
7
|
+
it("derives a reason from a plain-object cause carrying a numeric JSON-RPC code", () => {
|
|
8
|
+
// A wallet/RPC provider rejecting with `{ code, message }` (not a viem
|
|
9
|
+
// error) — parseViemError never sees it, so the code is the only signal.
|
|
10
|
+
const err = new BeraError({
|
|
11
|
+
cause: { code: -32000, message: "execution reverted" },
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// -32000 has no errorMap keyword match, so the reason stays the raw RPC key.
|
|
15
|
+
expect(err.reason).toBe("RPC_ERROR_-32000");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("classifies transient JSON-RPC provider errors (-32603) as warning", () => {
|
|
19
|
+
const err = new BeraError({
|
|
20
|
+
cause: { code: -32603, message: "Internal JSON-RPC error." },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Not an actionable bug in our code — should not be a hard error.
|
|
24
|
+
expect(err.level).toBe("warning");
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("classifies known transient provider codes as warning", () => {
|
|
28
|
+
// Allowlisted transient/network failures, not a bug in our request.
|
|
29
|
+
for (const code of [-32603, -32002, -32005, -32016]) {
|
|
30
|
+
const err = new BeraError({ cause: { code, message: "server error" } });
|
|
31
|
+
expect(err.level).toBe("warning");
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("keeps actionable JSON-RPC codes as error (our request is likely wrong)", () => {
|
|
36
|
+
// Standard actionable codes (-32700 parse · -32600 invalid request ·
|
|
37
|
+
// -32601 method not found · -32602 invalid params) plus other
|
|
38
|
+
// implementation-defined codes in the -32000..-32099 range that providers
|
|
39
|
+
// use for actionable failures (e.g. -32000 invalid input, -32004 method
|
|
40
|
+
// not supported) — none of these should be hidden from Sentry error level.
|
|
41
|
+
for (const code of [-32700, -32600, -32601, -32602, -32000, -32004]) {
|
|
42
|
+
const err = new BeraError({ cause: { code, message: "bad request" } });
|
|
43
|
+
expect(err.level).toBe("error");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("classifies code 4001 as a user rejection (info)", () => {
|
|
48
|
+
const err = new BeraError({
|
|
49
|
+
cause: { code: 4001, message: "User rejected the request." },
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
expect(err.reason).toBe("UserRejectedRequestError");
|
|
53
|
+
expect(err.level).toBe("info");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("still extracts the message from the plain-object cause", () => {
|
|
57
|
+
const err = new BeraError({
|
|
58
|
+
cause: { code: -32603, message: "Internal JSON-RPC error." },
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
expect(err.message).toBe("Internal JSON-RPC error.");
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("respects an explicit level over the inferred one", () => {
|
|
65
|
+
const err = new BeraError({
|
|
66
|
+
cause: { code: -32603, message: "Internal JSON-RPC error." },
|
|
67
|
+
level: "fatal",
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
expect(err.level).toBe("fatal");
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// The transaction store (transactionStore.ts) pins a stable Sentry fingerprint
|
|
75
|
+
// on receipt timeouts by keying off exactly this reason string (HUB-97H/HUB-981
|
|
76
|
+
// grouping). If the pipeline ever stops deriving it, that grouping silently
|
|
77
|
+
// breaks — so lock the contract here.
|
|
78
|
+
describe("BeraError reason — receipt timeout fingerprint contract", () => {
|
|
79
|
+
it("derives WaitForTransactionReceiptTimeoutError from viem's timeout error", () => {
|
|
80
|
+
const err = new BeraError({
|
|
81
|
+
cause: new WaitForTransactionReceiptTimeoutError({ hash: "0xdeadbeef" }),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
expect(err.reason).toBe("WaitForTransactionReceiptTimeoutError");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("does not derive that reason for an unrelated transaction error", () => {
|
|
88
|
+
const err = new BeraError({
|
|
89
|
+
cause: { code: 4001, message: "User rejected the request." },
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
expect(err.reason).not.toBe("WaitForTransactionReceiptTimeoutError");
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -19,7 +19,7 @@ describe("BeraTracing", () => {
|
|
|
19
19
|
it("wraps the callback in the handler", async () => {
|
|
20
20
|
const order: string[] = [];
|
|
21
21
|
|
|
22
|
-
const handler = vi.fn(async (
|
|
22
|
+
const handler = vi.fn(async (_context: any, callback: any) => {
|
|
23
23
|
order.push("handler-start");
|
|
24
24
|
const result = await callback();
|
|
25
25
|
order.push("handler-end");
|
|
@@ -53,24 +53,24 @@ describe("BeraTracing", () => {
|
|
|
53
53
|
it("chains handlers so first registered is outermost", async () => {
|
|
54
54
|
const order: string[] = [];
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
async function handler1(_ctx: any, cb: () => Promise<any>) {
|
|
57
57
|
order.push("h1-start");
|
|
58
58
|
const r = await cb();
|
|
59
59
|
order.push("h1-end");
|
|
60
60
|
return r;
|
|
61
|
-
}
|
|
62
|
-
|
|
61
|
+
}
|
|
62
|
+
async function handler2(_ctx: any, cb: () => Promise<any>) {
|
|
63
63
|
order.push("h2-start");
|
|
64
64
|
const r = await cb();
|
|
65
65
|
order.push("h2-end");
|
|
66
66
|
return r;
|
|
67
|
-
}
|
|
68
|
-
|
|
67
|
+
}
|
|
68
|
+
async function handler3(_ctx: any, cb: () => Promise<any>) {
|
|
69
69
|
order.push("h3-start");
|
|
70
70
|
const r = await cb();
|
|
71
71
|
order.push("h3-end");
|
|
72
72
|
return r;
|
|
73
|
-
}
|
|
73
|
+
}
|
|
74
74
|
|
|
75
75
|
const unsub1 = BeraTracing.addSpanHandler(handler1);
|
|
76
76
|
const unsub2 = BeraTracing.addSpanHandler(handler2);
|
|
@@ -133,7 +133,9 @@ describe("BeraTracing", () => {
|
|
|
133
133
|
|
|
134
134
|
describe("error propagation", () => {
|
|
135
135
|
it("propagates errors from the callback through handlers", async () => {
|
|
136
|
-
|
|
136
|
+
async function handler(_ctx: any, cb: () => Promise<any>) {
|
|
137
|
+
return cb();
|
|
138
|
+
}
|
|
137
139
|
const unsub = BeraTracing.addSpanHandler(handler);
|
|
138
140
|
|
|
139
141
|
await expect(
|
|
@@ -149,9 +151,9 @@ describe("BeraTracing", () => {
|
|
|
149
151
|
});
|
|
150
152
|
|
|
151
153
|
it("propagates errors from a handler", async () => {
|
|
152
|
-
|
|
154
|
+
async function handler<T>(): Promise<T> {
|
|
153
155
|
throw new Error("handler error");
|
|
154
|
-
}
|
|
156
|
+
}
|
|
155
157
|
const unsub = BeraTracing.addSpanHandler(handler);
|
|
156
158
|
|
|
157
159
|
await expect(
|
|
@@ -171,10 +173,7 @@ describe("BeraTracing", () => {
|
|
|
171
173
|
const statuses: string[] = [];
|
|
172
174
|
|
|
173
175
|
// Simulates the Sentry adapter wrapper pattern
|
|
174
|
-
|
|
175
|
-
_ctx: any,
|
|
176
|
-
callback: () => Promise<any>,
|
|
177
|
-
) => {
|
|
176
|
+
async function adapterHandler(_ctx: any, callback: () => Promise<any>) {
|
|
178
177
|
try {
|
|
179
178
|
const result = await callback();
|
|
180
179
|
statuses.push("ok");
|
|
@@ -187,7 +186,7 @@ describe("BeraTracing", () => {
|
|
|
187
186
|
statuses.push(status);
|
|
188
187
|
throw error;
|
|
189
188
|
}
|
|
190
|
-
}
|
|
189
|
+
}
|
|
191
190
|
|
|
192
191
|
const unsub = BeraTracing.addSpanHandler(adapterHandler);
|
|
193
192
|
|
|
@@ -234,13 +233,13 @@ describe("BeraTracing", () => {
|
|
|
234
233
|
it("works with a handler that accepts (options, callback) like Sentry.startSpan", async () => {
|
|
235
234
|
// Sentry.startSpan signature: <T>(options, callback: (span) => T) => T
|
|
236
235
|
// When callback returns Promise<T>, the return is Promise<T>
|
|
237
|
-
|
|
236
|
+
function mockSentryStartSpan<T>(
|
|
238
237
|
_options: { name: string },
|
|
239
238
|
callback: (span: unknown) => T,
|
|
240
|
-
): T
|
|
239
|
+
): T {
|
|
241
240
|
// Sentry passes a span object to the callback; our callbacks ignore it
|
|
242
241
|
return callback({ spanId: "mock-span" });
|
|
243
|
-
}
|
|
242
|
+
}
|
|
244
243
|
|
|
245
244
|
const unsub = BeraTracing.addSpanHandler(
|
|
246
245
|
mockSentryStartSpan as typeof BeraTracing.startSpan,
|
|
@@ -20,6 +20,27 @@ export class RequestError extends BeraError {
|
|
|
20
20
|
static isCorsError(error: Error) {
|
|
21
21
|
return error.cause instanceof Response && error.cause.type === "cors";
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Matches the standard error messages browsers produce when fetch fails due
|
|
26
|
+
* to a network or CORS error, as empirically collected from Sentry. The
|
|
27
|
+
* trailing "(host)" suffix is our own annotation and optional: bare fetch
|
|
28
|
+
* TypeErrors are just "Failed to fetch" / "Load failed".
|
|
29
|
+
*/
|
|
30
|
+
private static readonly NETWORK_ERROR_MESSAGE_REGEX =
|
|
31
|
+
/^(?:NetworkError when attempting to fetch resource\.|Failed to fetch|Load failed)(?: \(([a-z0-9-.]+)\))?$/;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Whether a message is a browser fetch network-failure message. Used to tell
|
|
35
|
+
* genuine network TypeErrors apart from ordinary TypeErrors (which must NOT
|
|
36
|
+
* be grouped as network errors — see sentryBeforeSend).
|
|
37
|
+
*/
|
|
38
|
+
static isNetworkErrorMessage(message: string): boolean {
|
|
39
|
+
return (
|
|
40
|
+
message.startsWith("Network Error") ||
|
|
41
|
+
RequestError.NETWORK_ERROR_MESSAGE_REGEX.test(message)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
23
44
|
/**
|
|
24
45
|
* The endpoint that was requested.
|
|
25
46
|
*/
|
|
@@ -54,6 +75,9 @@ export class RequestError extends BeraError {
|
|
|
54
75
|
429: "RATE_LIMITED_429",
|
|
55
76
|
NETWORK_ERROR: "NETWORK_ERROR",
|
|
56
77
|
CORS_ERROR: "CORS",
|
|
78
|
+
// Aggregator/SOR found no route for the requested pair/amount. Expected, not
|
|
79
|
+
// a failure — reported as a warning and grouped into a single Sentry issue.
|
|
80
|
+
NO_SWAP_PATHS: "NO_SWAP_PATHS",
|
|
57
81
|
} as const;
|
|
58
82
|
|
|
59
83
|
constructor(
|
|
@@ -110,6 +134,14 @@ export class RequestError extends BeraError {
|
|
|
110
134
|
}
|
|
111
135
|
}
|
|
112
136
|
|
|
137
|
+
// "No swap paths" means the aggregator/SOR found no route for this token
|
|
138
|
+
// pair/amount — an expected condition, not a failure. Downlevel to "warning"
|
|
139
|
+
// so it stays out of the Sentry error stream. (The SWR error handler also
|
|
140
|
+
// collapses all sources into a single group; see SWRConfig.tsx.)
|
|
141
|
+
if (this.reason === RequestError.REASON_MAP.NO_SWAP_PATHS) {
|
|
142
|
+
this.level = args.level ?? "warning";
|
|
143
|
+
}
|
|
144
|
+
|
|
113
145
|
// ── Span status inference ─────────────────────────────────────────
|
|
114
146
|
// Re-infer from reason since it may have been set after super() ran
|
|
115
147
|
// (e.g. NETWORK_ERROR → unavailable, RATE_LIMITED_429 → resource_exhausted).
|
|
@@ -142,6 +174,19 @@ export class RequestError extends BeraError {
|
|
|
142
174
|
this.message = `${message}${endpointLabel}: ${this.message}`;
|
|
143
175
|
}
|
|
144
176
|
|
|
177
|
+
/**
|
|
178
|
+
* The hostname of the requested endpoint (e.g. "beep.berachain.com"), used to
|
|
179
|
+
* group network errors by domain in Sentry. Falls back to the full url for
|
|
180
|
+
* relative/malformed urls that have no parseable host.
|
|
181
|
+
*/
|
|
182
|
+
get host(): string {
|
|
183
|
+
try {
|
|
184
|
+
return new URL(this.endpoint.url).hostname;
|
|
185
|
+
} catch {
|
|
186
|
+
return this.endpoint.url;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
145
190
|
setEndpoint(
|
|
146
191
|
endpoint:
|
|
147
192
|
| string
|
|
@@ -164,6 +209,14 @@ export class RequestError extends BeraError {
|
|
|
164
209
|
};
|
|
165
210
|
}
|
|
166
211
|
|
|
212
|
+
// Redact 40-hex addresses in the path (e.g. /wallets/0x…/autoclaimed) so
|
|
213
|
+
// per-wallet urls collapse to one Sentry fingerprint. Mirrors the span-url
|
|
214
|
+
// redaction in beraFetch; the error message/title is built from this url.
|
|
215
|
+
this.endpoint.url = this.endpoint.url.replace(
|
|
216
|
+
/0x[a-fA-F0-9]{40}/g,
|
|
217
|
+
":address",
|
|
218
|
+
);
|
|
219
|
+
|
|
167
220
|
if (
|
|
168
221
|
this.queryRichfulDomains.some((domain) =>
|
|
169
222
|
this.endpoint.url.includes(getUriFromLink(domain)),
|
|
@@ -174,7 +227,10 @@ export class RequestError extends BeraError {
|
|
|
174
227
|
const url = new URL(this.endpoint.url);
|
|
175
228
|
url.search = "";
|
|
176
229
|
this.endpoint.url = url.toString();
|
|
177
|
-
} catch {
|
|
230
|
+
} catch {
|
|
231
|
+
// FIXME(coding-standards): error intentionally swallowed; a malformed
|
|
232
|
+
// URL just keeps the original endpoint url. Preserved to avoid behavior change.
|
|
233
|
+
}
|
|
178
234
|
}
|
|
179
235
|
this.tags = {
|
|
180
236
|
...this.tags,
|
|
@@ -209,16 +265,11 @@ export class RequestError extends BeraError {
|
|
|
209
265
|
};
|
|
210
266
|
}
|
|
211
267
|
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
// the list is empirically collected from sentry error logs.
|
|
216
|
-
// The trailing "(host)" suffix is optional: some browsers/transports omit
|
|
217
|
-
// it (e.g. bare "Failed to fetch" / "Load failed"). We normalize all of
|
|
218
|
-
// them to a single NETWORK_ERROR reason so the variants group together,
|
|
219
|
-
// falling back to the endpoint url when no host is present in the message.
|
|
268
|
+
// We normalize all fetch network-failure variants to a single
|
|
269
|
+
// NETWORK_ERROR reason so they group together, falling back to the
|
|
270
|
+
// endpoint url when no host is present in the message.
|
|
220
271
|
const failedToFetchMatch = message.match(
|
|
221
|
-
|
|
272
|
+
RequestError.NETWORK_ERROR_MESSAGE_REGEX,
|
|
222
273
|
);
|
|
223
274
|
if (failedToFetchMatch) {
|
|
224
275
|
return {
|
|
@@ -24,6 +24,27 @@ describe("RequestError endpoint normalization (grouping)", () => {
|
|
|
24
24
|
expect(b.endpoint.url).toBe(base);
|
|
25
25
|
expect(a.endpoint.url).toBe(b.endpoint.url);
|
|
26
26
|
});
|
|
27
|
+
|
|
28
|
+
it("redacts wallet addresses in the path so per-wallet urls group together (HUB-A8T)", () => {
|
|
29
|
+
function mk(addr: string) {
|
|
30
|
+
return new RequestError({
|
|
31
|
+
response: undefined,
|
|
32
|
+
statusCode: 500,
|
|
33
|
+
endpoint: {
|
|
34
|
+
url: `https://api-claim.berachain.com/api/v1/wallets/${addr}/autoclaimed/txhash`,
|
|
35
|
+
type: "rest",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const a = mk("0x9675b119c6907a1d17b4ad9ec14f03d3c4435635");
|
|
40
|
+
const b = mk("0x1111111111111111111111111111111111111111");
|
|
41
|
+
|
|
42
|
+
const expected =
|
|
43
|
+
"https://api-claim.berachain.com/api/v1/wallets/:address/autoclaimed/txhash";
|
|
44
|
+
expect(a.endpoint.url).toBe(expected);
|
|
45
|
+
expect(a.message).toBe(b.message);
|
|
46
|
+
expect(a.host).toBe("api-claim.berachain.com");
|
|
47
|
+
});
|
|
27
48
|
});
|
|
28
49
|
|
|
29
50
|
describe("RequestError network-error normalization (grouping)", () => {
|
|
@@ -52,4 +73,84 @@ describe("RequestError network-error normalization (grouping)", () => {
|
|
|
52
73
|
|
|
53
74
|
expect(err.reason).not.toBe(RequestError.REASON_MAP.NETWORK_ERROR);
|
|
54
75
|
});
|
|
76
|
+
|
|
77
|
+
it("groups network errors by host regardless of path/query (HONEY-1AH)", () => {
|
|
78
|
+
const a = new RequestError({
|
|
79
|
+
response: undefined,
|
|
80
|
+
cause: new TypeError("Failed to fetch"),
|
|
81
|
+
endpoint: {
|
|
82
|
+
url: "https://beep.berachain.com/v1/honey/balances",
|
|
83
|
+
type: "rest",
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
const b = new RequestError({
|
|
87
|
+
response: undefined,
|
|
88
|
+
cause: new TypeError("Failed to fetch"),
|
|
89
|
+
endpoint: {
|
|
90
|
+
url: "https://beep.berachain.com/v1/bonders?start=2025-11-28",
|
|
91
|
+
type: "rest",
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
expect(a.host).toBe("beep.berachain.com");
|
|
96
|
+
expect(a.host).toBe(b.host);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("falls back to the raw url for a relative/malformed endpoint", () => {
|
|
100
|
+
const err = new RequestError({
|
|
101
|
+
response: undefined,
|
|
102
|
+
endpoint: { url: "/api/internal/foo", type: "rest" },
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// No parseable host on a relative url → fall back to the url itself so the
|
|
106
|
+
// fingerprint stays stable rather than throwing.
|
|
107
|
+
expect(err.host).toBe("/api/internal/foo");
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
describe("RequestError NO_SWAP_PATHS leveling", () => {
|
|
112
|
+
it("downlevels NO_SWAP_PATHS to warning (expected, not a failure)", () => {
|
|
113
|
+
const err = new RequestError({
|
|
114
|
+
response: undefined,
|
|
115
|
+
reason: RequestError.REASON_MAP.NO_SWAP_PATHS,
|
|
116
|
+
endpoint: { url: "https://api.berachain.com", type: "graphql" },
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
expect(err.reason).toBe(RequestError.REASON_MAP.NO_SWAP_PATHS);
|
|
120
|
+
expect(err.level).toBe("warning");
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it("keeps the level the same regardless of which source reported it", () => {
|
|
124
|
+
const fromOpenOcean = new RequestError({
|
|
125
|
+
response: undefined,
|
|
126
|
+
reason: RequestError.REASON_MAP.NO_SWAP_PATHS,
|
|
127
|
+
endpoint: {
|
|
128
|
+
url: "https://open-api.openocean.finance/v4/bera/swap",
|
|
129
|
+
type: "rest",
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
expect(fromOpenOcean.level).toBe("warning");
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it("lets an explicit level override the downlevel", () => {
|
|
137
|
+
const err = new RequestError({
|
|
138
|
+
response: undefined,
|
|
139
|
+
reason: RequestError.REASON_MAP.NO_SWAP_PATHS,
|
|
140
|
+
level: "error",
|
|
141
|
+
endpoint: { url: "https://api.berachain.com", type: "graphql" },
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
expect(err.level).toBe("error");
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it("does not downlevel other reasons to warning", () => {
|
|
148
|
+
const err = new RequestError({
|
|
149
|
+
response: undefined,
|
|
150
|
+
reason: "SOME_OTHER_REASON",
|
|
151
|
+
endpoint: { url: "https://api.berachain.com", type: "graphql" },
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
expect(err.level).toBe("error");
|
|
155
|
+
});
|
|
55
156
|
});
|
package/src/errors/assert.ts
CHANGED
|
@@ -124,7 +124,13 @@ export function assertAddress(
|
|
|
124
124
|
* @throws An InvalidArgumentError if the value is not positive.
|
|
125
125
|
*/
|
|
126
126
|
export function assertPositive(
|
|
127
|
+
/**
|
|
128
|
+
* The value to assert.
|
|
129
|
+
*/
|
|
127
130
|
value: string | bigint | number,
|
|
131
|
+
/**
|
|
132
|
+
* The property name.
|
|
133
|
+
*/
|
|
128
134
|
property: string,
|
|
129
135
|
): void {
|
|
130
136
|
const isPositive = typeof value === "bigint" ? value > 0n : Number(value) > 0;
|
|
@@ -137,6 +143,29 @@ export function assertPositive(
|
|
|
137
143
|
}
|
|
138
144
|
}
|
|
139
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Asserts that a value is an integer.
|
|
148
|
+
* @throws An InvalidArgumentError if the value is not an integer.
|
|
149
|
+
*/
|
|
150
|
+
export function assertInteger(
|
|
151
|
+
/**
|
|
152
|
+
* The value to assert.
|
|
153
|
+
*/
|
|
154
|
+
value: number,
|
|
155
|
+
/**
|
|
156
|
+
* The property name.
|
|
157
|
+
*/
|
|
158
|
+
property: string,
|
|
159
|
+
): void {
|
|
160
|
+
if (!Number.isInteger(value)) {
|
|
161
|
+
throw new InvalidArgumentError({
|
|
162
|
+
property,
|
|
163
|
+
value,
|
|
164
|
+
expected: "integer",
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
140
169
|
/**
|
|
141
170
|
* Asserts that a value is a number greater than 0.
|
|
142
171
|
* @throws An InvalidArgumentError if the value is undefined, null, not a string or number, or not a number greater than 0.
|
package/src/errors/errorMap.ts
CHANGED
|
@@ -108,10 +108,15 @@ export const errorMsgMap = {
|
|
|
108
108
|
errorMSG:
|
|
109
109
|
"It seems an RPC error has occurred. Please try your request one more later.",
|
|
110
110
|
},
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
// Tx was broadcast but we timed out waiting for the receipt (RPC lag / dropped
|
|
112
|
+
// tx). Match on viem's error name (exact reason) — NOT a bare "hash" keyword,
|
|
113
|
+
// which used to match any message mentioning a tx/block/typehash and dumped
|
|
114
|
+
// unrelated errors into one meaningless "HASH" group (HUB-A9T).
|
|
115
|
+
TRANSACTION_TIMEOUT: {
|
|
116
|
+
reasons: ["WaitForTransactionReceiptTimeoutError"],
|
|
117
|
+
keywords: ["Timed out while waiting for transaction with hash"],
|
|
113
118
|
errorMSG:
|
|
114
|
-
"
|
|
119
|
+
"Transaction sent, but we couldn't confirm it in time. Check your wallet — if it didn't go through, try again.",
|
|
115
120
|
},
|
|
116
121
|
USER_REJECTION: {
|
|
117
122
|
reasons: ["UserRejectedRequestError"],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { findMatchingError } from "./getErrorMessage.js";
|
|
4
|
+
|
|
5
|
+
describe("findMatchingError — transaction timeout (HUB-A9T)", () => {
|
|
6
|
+
const timeoutMessage =
|
|
7
|
+
'Timed out while waiting for transaction with hash "0x18160719ceffa85166d389a3a075ca081e8925b69d6e73884af01082421d124b" to be confirmed.';
|
|
8
|
+
|
|
9
|
+
it("matches viem's timeout error name via exact reason", () => {
|
|
10
|
+
const matched = findMatchingError({
|
|
11
|
+
reason: "WaitForTransactionReceiptTimeoutError",
|
|
12
|
+
message: timeoutMessage,
|
|
13
|
+
});
|
|
14
|
+
expect(matched?.key).toBe("TRANSACTION_TIMEOUT");
|
|
15
|
+
expect(matched?.matchedByReason).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("still matches the timeout by message keyword when reason is absent", () => {
|
|
19
|
+
const matched = findMatchingError({ message: timeoutMessage });
|
|
20
|
+
expect(matched?.key).toBe("TRANSACTION_TIMEOUT");
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("no longer misfiles unrelated hash-mentioning errors into a HASH bucket", () => {
|
|
24
|
+
// Regression: the old `keywords: ["hash"]` entry swallowed any message
|
|
25
|
+
// containing "hash" (tx hash, block hash, typehash, …).
|
|
26
|
+
const matched = findMatchingError({
|
|
27
|
+
message: "invalid domain separator typehash for permit signature",
|
|
28
|
+
});
|
|
29
|
+
expect(matched?.key).not.toBe("HASH");
|
|
30
|
+
expect(matched?.key).not.toBe("TRANSACTION_TIMEOUT");
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -6,14 +6,14 @@ import { getConvertToAssets } from "../../actions/bend/getConvertToAssets";
|
|
|
6
6
|
import { assertPublicClient } from "../../errors/assert";
|
|
7
7
|
import type { DefaultHookOptions } from "../../types/global";
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export function useGetConvertToAssets(
|
|
10
10
|
{
|
|
11
11
|
sharesAmount,
|
|
12
12
|
vaultAddress,
|
|
13
13
|
vaultChainId,
|
|
14
14
|
}: Omit<GetConvertToAssetsProps, "publicClient"> & { vaultChainId?: number },
|
|
15
15
|
options?: DefaultHookOptions,
|
|
16
|
-
)
|
|
16
|
+
) {
|
|
17
17
|
const publicClient = usePublicClient({ chainId: vaultChainId });
|
|
18
18
|
return useSWR(
|
|
19
19
|
publicClient && sharesAmount && vaultAddress
|
|
@@ -32,4 +32,4 @@ export const useGetConvertToAssets = (
|
|
|
32
32
|
...options,
|
|
33
33
|
},
|
|
34
34
|
);
|
|
35
|
-
}
|
|
35
|
+
}
|
|
@@ -183,7 +183,13 @@ export function useAggregatorsQuotes(
|
|
|
183
183
|
...args,
|
|
184
184
|
aggregator: bex,
|
|
185
185
|
},
|
|
186
|
-
{
|
|
186
|
+
{
|
|
187
|
+
...swrOptions,
|
|
188
|
+
// Compose with the caller's gate (e.g. same-token suppression from
|
|
189
|
+
// useSwap) instead of overwriting it — otherwise bex fetches whenever
|
|
190
|
+
// it's unpaused, regardless of isEnabled (HUB-9FQ).
|
|
191
|
+
isEnabled: (options?.isEnabled ?? true) && bexProtocol.isPaused === false,
|
|
192
|
+
},
|
|
187
193
|
);
|
|
188
194
|
|
|
189
195
|
const wberaSwapResult = raw_useSingleAggregatorQuote({
|
|
@@ -7,7 +7,7 @@ import { useSWRImmutable } from "@berachain/utils/pkg/swr";
|
|
|
7
7
|
|
|
8
8
|
import { parseBaseArgs } from "../../utils/parseBaseArgs";
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export function useAggregatorsRouterFeeBps() {
|
|
11
11
|
const publicClient = usePublicClient() as PublicClient;
|
|
12
12
|
const { config } = parseBaseArgs({
|
|
13
13
|
chainId: publicClient.chain?.id,
|
|
@@ -27,4 +27,4 @@ export const useAggregatorsRouterFeeBps = () => {
|
|
|
27
27
|
return Number(fee);
|
|
28
28
|
},
|
|
29
29
|
);
|
|
30
|
-
}
|
|
30
|
+
}
|