@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
|
@@ -10,10 +10,10 @@ import type {
|
|
|
10
10
|
DefaultHookReturnType,
|
|
11
11
|
} from "../../types/global";
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export function useValidatorQueuedRewardAllocation(
|
|
14
14
|
pubKey: Address,
|
|
15
15
|
options?: DefaultHookOptions,
|
|
16
|
-
): DefaultHookReturnType<ValidatorRewardAllocation | undefined>
|
|
16
|
+
): DefaultHookReturnType<ValidatorRewardAllocation | undefined> {
|
|
17
17
|
const publicClient = usePublicClient();
|
|
18
18
|
const QUERY_KEY =
|
|
19
19
|
publicClient && pubKey
|
|
@@ -32,4 +32,4 @@ export const useValidatorQueuedRewardAllocation = (
|
|
|
32
32
|
...options,
|
|
33
33
|
},
|
|
34
34
|
);
|
|
35
|
-
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
|
|
3
|
+
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
|
|
4
|
+
// { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
|
|
5
|
+
// `amount` is a stringified bigint in token base units. The backend now
|
|
6
|
+
// aggregates across validators under a single fake pubkey (`0x000…000`),
|
|
7
|
+
// so consumers can collapse the validator dimension blindly.
|
|
8
|
+
export type AutoclaimedIncentivesResponse = Record<
|
|
9
|
+
Address,
|
|
10
|
+
Record<Address, Record<Address, { amount: string }>>
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
|
|
14
|
+
// nesting, but each token leaf is `{ txhash }`. Tokens still pending are
|
|
15
|
+
// simply absent — when a token from `/autoclaimed` has no entry here, the
|
|
16
|
+
// bot hasn't distributed it yet.
|
|
17
|
+
export type AutoclaimedIncentivesTxHashResponse = Record<
|
|
18
|
+
Address,
|
|
19
|
+
Record<Address, Record<Address, { txhash: string }>>
|
|
20
|
+
>;
|
package/src/types/dex.d.ts
CHANGED
|
@@ -195,6 +195,13 @@ export type Calldata = {
|
|
|
195
195
|
data?: Hex;
|
|
196
196
|
value: bigint;
|
|
197
197
|
gasLimit?: bigint;
|
|
198
|
+
/**
|
|
199
|
+
* Extra Sentry tags to attach when this calldata is submitted via `useTxn`.
|
|
200
|
+
* Aggregators set `{ aggregator: this.name }` so failures like
|
|
201
|
+
* AggregatorNotWhitelisted can be attributed to a source without decoding
|
|
202
|
+
* calldata.
|
|
203
|
+
*/
|
|
204
|
+
extraTags?: Record<string, string>;
|
|
198
205
|
};
|
|
199
206
|
|
|
200
207
|
export type IRawAggregatorQuote = {
|
|
@@ -208,6 +215,16 @@ export type IRawAggregatorQuote = {
|
|
|
208
215
|
isNativeSwap?: boolean;
|
|
209
216
|
priceImpactPercentage?: number | null;
|
|
210
217
|
swapFeeBps: number;
|
|
218
|
+
/** True when the route bridges chains; set by the aggregator (source of truth). */
|
|
219
|
+
isCrossChain?: boolean;
|
|
220
|
+
/** Chain the input token (and therefore the tx) lives on. */
|
|
221
|
+
srcChainId?: number;
|
|
222
|
+
/**
|
|
223
|
+
* Bridge the cross-chain route uses, from Enso's chosen bridge hop
|
|
224
|
+
* (`relay` | `stargate` | `ccip`). Drives which explorer/status API the
|
|
225
|
+
* tracker uses; undefined for same-chain routes.
|
|
226
|
+
*/
|
|
227
|
+
bridgeProtocol?: string;
|
|
211
228
|
getCalldata?: ({ account }: { account: Address }) => Calldata;
|
|
212
229
|
};
|
|
213
230
|
|
package/src/types/enso.d.ts
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import type { BundleData
|
|
1
|
+
import type { BundleData } from "@ensofinance/sdk";
|
|
2
2
|
import type { Address, Hex, PublicClient, TransactionRequest } from "viem";
|
|
3
3
|
|
|
4
4
|
import type { MinimalERC20 } from "./dex";
|
|
5
5
|
|
|
6
6
|
export type Quantity = string | number;
|
|
7
|
-
export type ActionOutputReference<T> = T | StrictOutputReference<T>;
|
|
8
|
-
type StrictOutputReference<T> = {
|
|
9
|
-
useOutputOfCallAt: number;
|
|
10
|
-
index?: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export interface GetEnsoSwapBundleArgs {
|
|
14
|
-
fromAddress: Address;
|
|
15
|
-
amountIn: Quantity;
|
|
16
|
-
tokenIn: Address;
|
|
17
|
-
tokenOut: Address;
|
|
18
|
-
chainId: number;
|
|
19
|
-
ensoClient: EnsoClient;
|
|
20
|
-
slippage: number;
|
|
21
|
-
destinationChainId?: number;
|
|
22
|
-
publicClient: PublicClient;
|
|
23
|
-
}
|
|
24
7
|
|
|
25
8
|
export type GetZapTransaction = TransactionRequest & {
|
|
26
9
|
to: Address;
|
|
@@ -29,15 +12,6 @@ export type GetZapTransaction = TransactionRequest & {
|
|
|
29
12
|
gasLimit?: bigint;
|
|
30
13
|
};
|
|
31
14
|
export type GetZapTransactions = GetZapTransaction[];
|
|
32
|
-
export interface GetZapTransactionsArgs {
|
|
33
|
-
fromAddress: Address;
|
|
34
|
-
amountIn: Quantity;
|
|
35
|
-
tokenIn: Address;
|
|
36
|
-
chainId: number;
|
|
37
|
-
ensoClient: EnsoClient;
|
|
38
|
-
bundle: BundleData;
|
|
39
|
-
publicClient: PublicClient;
|
|
40
|
-
}
|
|
41
15
|
|
|
42
16
|
export interface GetEnsoWalletTransactionsWithApprovalArgs {
|
|
43
17
|
fromAddress: Address;
|
package/src/types/exports.ts
CHANGED
package/src/types/global.d.ts
CHANGED
|
@@ -94,6 +94,13 @@ export type IContractWrite<
|
|
|
94
94
|
*/
|
|
95
95
|
actionType: TransactionActionType;
|
|
96
96
|
txnName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Extra Sentry tags to attach to this transaction's scope, merged under the
|
|
99
|
+
* `operation.txn.*` namespace (e.g. `{ aggregator: "oogabooga" }` becomes the
|
|
100
|
+
* `operation.txn.aggregator` tag). Use for context that helps triage failures
|
|
101
|
+
* without decoding calldata.
|
|
102
|
+
*/
|
|
103
|
+
extraTags?: Record<string, string>;
|
|
97
104
|
gasLimit?: bigint;
|
|
98
105
|
account?: Account | Address;
|
|
99
106
|
/**
|
package/src/types/pol.d.ts
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { ApiValidatorFragment } from "@berachain/graphql/pol/api";
|
|
4
|
-
|
|
5
|
-
import type { Token, TokenWithMetadata } from "./dex";
|
|
6
|
-
|
|
7
|
-
export type IncentiveReward = {
|
|
8
|
-
tokenMetadata: Token | undefined;
|
|
9
|
-
tokenPrice: number;
|
|
10
|
-
tokenValue: number;
|
|
11
|
-
id: string;
|
|
12
|
-
dist_id: string;
|
|
13
|
-
token: string;
|
|
14
|
-
recipient: string;
|
|
15
|
-
formattedAmount: string;
|
|
16
|
-
amount: string;
|
|
17
|
-
merkle_proof: string[];
|
|
18
|
-
available_at: number;
|
|
19
|
-
};
|
|
20
|
-
export interface IncentiveRewardChunksWithValidatorData {
|
|
21
|
-
validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
|
|
22
|
-
maxTimestamp: number | undefined;
|
|
23
|
-
minTimestamp: number | undefined;
|
|
24
|
-
totalValue: number;
|
|
25
|
-
tokenTotals: {
|
|
26
|
-
chainId: number;
|
|
27
|
-
address: Address;
|
|
28
|
-
amount: number;
|
|
29
|
-
value: number;
|
|
30
|
-
metadata: Token | undefined;
|
|
31
|
-
}[];
|
|
32
|
-
rewards: IncentiveReward[];
|
|
33
|
-
isCurrent: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface AggregatedTokenTotals {
|
|
37
|
-
address: Address;
|
|
38
|
-
amount: number;
|
|
39
|
-
value: number;
|
|
40
|
-
metadata: Token | undefined;
|
|
41
|
-
chainId: number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type ClaimedIncentives = Record<string, string>;
|
|
45
|
-
|
|
46
|
-
export type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
1
|
+
import type { TokenWithMetadata } from "./dex";
|
|
47
2
|
|
|
48
3
|
export interface UserVaultInfo {
|
|
49
4
|
balance: bigint;
|
|
@@ -56,11 +11,11 @@ export interface UserVaultInfo {
|
|
|
56
11
|
export type StakedBeraAsset = {
|
|
57
12
|
token: TokenWithMetadata;
|
|
58
13
|
/**
|
|
59
|
-
* Staking
|
|
14
|
+
* Staking APY, or `undefined` when unavailable (e.g. the APY backend is
|
|
60
15
|
* down). `undefined` lets the UI render a "—" placeholder instead of a
|
|
61
16
|
* misleading "0%".
|
|
62
17
|
*/
|
|
63
|
-
|
|
18
|
+
apy: number | undefined;
|
|
64
19
|
stakedAmount: number;
|
|
65
20
|
/**
|
|
66
21
|
* USD value of the staked amount, or `undefined` when the token price is
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { fetchLayerzero } from "../actions/clients/fetchLayerzero";
|
|
2
|
+
import { BeraError } from "../errors/BeraError";
|
|
3
|
+
import { InvalidArgumentError } from "../errors/InvalidArgumentError";
|
|
4
|
+
import { RequestError } from "../errors/RequestError";
|
|
5
|
+
import { beraFetchJson } from "./beraFetch";
|
|
6
|
+
|
|
7
|
+
// Enso routes cross-chain zaps over one of these bridges (from the "bridge"
|
|
8
|
+
// hop's `protocol` in its route response). Each has its own status API +
|
|
9
|
+
// explorer, so tracking has to branch on the bridge.
|
|
10
|
+
export type BridgeProtocol = "relay" | "stargate" | "ccip" | "layerzero";
|
|
11
|
+
|
|
12
|
+
const RELAY_API_URL = "https://api.relay.link";
|
|
13
|
+
|
|
14
|
+
// Public explorer origins for deep-linking a bridged tx. See getBridgeExplorerUrl.
|
|
15
|
+
const LAYERZERO_SCAN_EXPLORER = "https://layerzeroscan.com";
|
|
16
|
+
const RELAY_EXPLORER = "https://relay.link";
|
|
17
|
+
|
|
18
|
+
export enum BridgeMessageStatus {
|
|
19
|
+
INFLIGHT = "INFLIGHT",
|
|
20
|
+
DELIVERED = "DELIVERED",
|
|
21
|
+
FAILED = "FAILED",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type BridgeMessage = {
|
|
25
|
+
srcTxHash?: string;
|
|
26
|
+
dstTxHash?: string;
|
|
27
|
+
status: BridgeMessageStatus;
|
|
28
|
+
statusMessage?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Bridge-specific id for deep-linking the explorer, when the explorer keys
|
|
31
|
+
* on something other than the source tx hash (Relay uses its requestId).
|
|
32
|
+
*/
|
|
33
|
+
explorerId?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type BridgeDeliveredMessage = BridgeMessage & {
|
|
37
|
+
dstTxHash: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// --- LayerZero / Stargate ---------------------------------------------------
|
|
41
|
+
|
|
42
|
+
async function getLayerZeroMessage(srcTxHash: string): Promise<BridgeMessage> {
|
|
43
|
+
const { data } = await fetchLayerzero("/messages/tx/{tx}", {
|
|
44
|
+
path: { tx: srcTxHash },
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const message = data[0];
|
|
48
|
+
if (!message) {
|
|
49
|
+
// not indexed yet — keep polling
|
|
50
|
+
return { srcTxHash, status: BridgeMessageStatus.INFLIGHT };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
srcTxHash: message.source?.tx?.txHash,
|
|
55
|
+
// the destination union has several shapes; only the plain-delivery one
|
|
56
|
+
// carries `tx.txHash`, so narrow before reading it.
|
|
57
|
+
dstTxHash:
|
|
58
|
+
message.destination && "tx" in message.destination
|
|
59
|
+
? message.destination.tx?.txHash
|
|
60
|
+
: undefined,
|
|
61
|
+
statusMessage: message.status?.message,
|
|
62
|
+
// v1 exposes many transient states; anything not DELIVERED/FAILED means
|
|
63
|
+
// "keep polling", so collapse unknown names to INFLIGHT.
|
|
64
|
+
status:
|
|
65
|
+
message.status?.name === "DELIVERED"
|
|
66
|
+
? BridgeMessageStatus.DELIVERED
|
|
67
|
+
: message.status?.name === "FAILED"
|
|
68
|
+
? BridgeMessageStatus.FAILED
|
|
69
|
+
: BridgeMessageStatus.INFLIGHT,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// --- Relay ------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
// Relay has no OpenAPI schema/client yet (unlike LayerZero's fetchLayerzero),
|
|
76
|
+
// so this stays hand-rolled over beraFetchJson with a local response type.
|
|
77
|
+
// Raw shape of the Relay requests API (only the fields we consume).
|
|
78
|
+
type RelayRequestsResponse = {
|
|
79
|
+
requests: {
|
|
80
|
+
id: string;
|
|
81
|
+
status: string;
|
|
82
|
+
data?: {
|
|
83
|
+
failReason?: string;
|
|
84
|
+
outTxs?: { hash?: string }[];
|
|
85
|
+
};
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
async function getRelayMessage(srcTxHash: string): Promise<BridgeMessage> {
|
|
90
|
+
const { requests } = await beraFetchJson<RelayRequestsResponse>({
|
|
91
|
+
url: `${RELAY_API_URL}/requests/v2?hash=${srcTxHash}`,
|
|
92
|
+
type: "rest",
|
|
93
|
+
name: "Relay",
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const request = requests[0];
|
|
97
|
+
if (!request) {
|
|
98
|
+
// not indexed yet — keep polling
|
|
99
|
+
return { srcTxHash, status: BridgeMessageStatus.INFLIGHT };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
srcTxHash,
|
|
104
|
+
dstTxHash: request.data?.outTxs?.[0]?.hash,
|
|
105
|
+
statusMessage: request.data?.failReason,
|
|
106
|
+
// Relay's explorer keys on the requestId, not the source tx hash.
|
|
107
|
+
explorerId: request.id,
|
|
108
|
+
status:
|
|
109
|
+
request.status === "success"
|
|
110
|
+
? BridgeMessageStatus.DELIVERED
|
|
111
|
+
: request.status === "failure" || request.status === "refund"
|
|
112
|
+
? BridgeMessageStatus.FAILED
|
|
113
|
+
: BridgeMessageStatus.INFLIGHT,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// --- Unified poller ---------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
function sleep(ms: number) {
|
|
120
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function getBridgeMessage(
|
|
124
|
+
bridgeProtocol: string,
|
|
125
|
+
srcTxHash: string,
|
|
126
|
+
): Promise<BridgeMessage> {
|
|
127
|
+
switch (bridgeProtocol) {
|
|
128
|
+
case "relay":
|
|
129
|
+
return getRelayMessage(srcTxHash);
|
|
130
|
+
// Enso's "stargate" is LayerZero's Stargate; both track on LayerZero Scan.
|
|
131
|
+
case "stargate":
|
|
132
|
+
case "layerzero":
|
|
133
|
+
return getLayerZeroMessage(srcTxHash);
|
|
134
|
+
default:
|
|
135
|
+
// ccip and anything else aren't tracked (ccip is excluded at routing time
|
|
136
|
+
// via `ignoreBridges` in ensoErc4626) — reject so the caller can decide
|
|
137
|
+
// (the tracker treats this as "can't poll", not "failed").
|
|
138
|
+
throw new InvalidArgumentError({
|
|
139
|
+
property: "bridgeProtocol",
|
|
140
|
+
value: bridgeProtocol,
|
|
141
|
+
expected: "relay | stargate | layerzero",
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface BridgeExplorerUrlArgs {
|
|
147
|
+
/** Bridge Enso routed through; picks which explorer to link. */
|
|
148
|
+
bridgeProtocol?: string;
|
|
149
|
+
/** Source-chain tx hash — how LayerZero/Stargate + the fallback key. */
|
|
150
|
+
srcTxHash?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Relay's requestId, when known. Relay's explorer prefers it but also resolves
|
|
153
|
+
* on the src tx hash, so a missing id still links to the bridge explorer.
|
|
154
|
+
*/
|
|
155
|
+
explorerId?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Source-chain block explorer origin (e.g. https://etherscan.io). Only a
|
|
158
|
+
* last resort for an unknown/untracked bridge; tracked bridges always link to
|
|
159
|
+
* their own bridge explorer (which shows the src→dst delivery still in flight).
|
|
160
|
+
*/
|
|
161
|
+
fallbackExplorerUrl: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Deep-link a bridged tx to the right *bridge* explorer — the one showing the
|
|
166
|
+
* source→destination delivery, which is what's still in flight once a tracker is
|
|
167
|
+
* visible (the source tx already confirmed). Enso picks the bridge per-route, so
|
|
168
|
+
* a single hardcoded explorer is wrong for the others; each keys differently
|
|
169
|
+
* (LayerZero/Stargate on the src tx hash, Relay on its requestId or the src tx
|
|
170
|
+
* hash). Only a genuinely unknown protocol falls back to the source chain's own
|
|
171
|
+
* block explorer.
|
|
172
|
+
*
|
|
173
|
+
* We deliberately don't route this through Enso's `getBridgeStatus`
|
|
174
|
+
* (`/{protocol}/bridge/check`): it normalizes status but doesn't return Relay's
|
|
175
|
+
* requestId, which the Relay deep link prefers — so we'd still branch per bridge.
|
|
176
|
+
*/
|
|
177
|
+
export function getBridgeExplorerUrl({
|
|
178
|
+
bridgeProtocol,
|
|
179
|
+
srcTxHash,
|
|
180
|
+
explorerId,
|
|
181
|
+
fallbackExplorerUrl,
|
|
182
|
+
}: BridgeExplorerUrlArgs): string | undefined {
|
|
183
|
+
switch (bridgeProtocol) {
|
|
184
|
+
case "relay":
|
|
185
|
+
// Relay's explorer resolves on either the requestId or the src tx hash,
|
|
186
|
+
// so stay on the bridge explorer even before we've fetched the id.
|
|
187
|
+
return srcTxHash || explorerId
|
|
188
|
+
? `${RELAY_EXPLORER}/transaction/${explorerId ?? srcTxHash}`
|
|
189
|
+
: undefined;
|
|
190
|
+
case "stargate":
|
|
191
|
+
case "layerzero":
|
|
192
|
+
return srcTxHash
|
|
193
|
+
? `${LAYERZERO_SCAN_EXPLORER}/tx/${srcTxHash}`
|
|
194
|
+
: undefined;
|
|
195
|
+
default:
|
|
196
|
+
// Unknown/untracked bridge (shouldn't surface — ccip is routed out and the
|
|
197
|
+
// tracker needs a known protocol to poll): no bridge explorer exists, so
|
|
198
|
+
// the source chain's block explorer is the only link we can build.
|
|
199
|
+
return srcTxHash ? `${fallbackExplorerUrl}/tx/${srcTxHash}` : undefined;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* One-shot status lookup for a bridged tx. Used to grab the explorer id (e.g.
|
|
205
|
+
* Relay's requestId) for the pending-state link before delivery. Swallows
|
|
206
|
+
* errors into an INFLIGHT result so a not-yet-indexed tx doesn't throw.
|
|
207
|
+
*/
|
|
208
|
+
export async function getBridgeMessageOnce(
|
|
209
|
+
bridgeProtocol: string,
|
|
210
|
+
srcTxHash: string,
|
|
211
|
+
): Promise<BridgeMessage> {
|
|
212
|
+
try {
|
|
213
|
+
return await getBridgeMessage(bridgeProtocol, srcTxHash);
|
|
214
|
+
} catch {
|
|
215
|
+
return { srcTxHash, status: BridgeMessageStatus.INFLIGHT };
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export type WaitForMessageReceivedOptions = {
|
|
220
|
+
/** Which bridge Enso routed through; narrowed at getBridgeMessage's switch. */
|
|
221
|
+
bridgeProtocol: string;
|
|
222
|
+
/** Polling interval in ms (default: 3000). */
|
|
223
|
+
pollInterval?: number;
|
|
224
|
+
/** Timeout in ms (default: 600000 / 10 minutes). */
|
|
225
|
+
timeout?: number;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Polls the bridge's status API until the cross-chain message is delivered or
|
|
230
|
+
* fails, then resolves with the delivered message (incl. destination tx hash).
|
|
231
|
+
* HTTP errors are silently retried until timeout. Throws InvalidArgumentError
|
|
232
|
+
* if srcTxHash/bridgeProtocol is missing or unsupported, or BeraError if the
|
|
233
|
+
* message fails or times out.
|
|
234
|
+
*/
|
|
235
|
+
export async function waitForBridgeMessageReceived(
|
|
236
|
+
srcTxHash: string,
|
|
237
|
+
options: WaitForMessageReceivedOptions,
|
|
238
|
+
): Promise<BridgeDeliveredMessage> {
|
|
239
|
+
const { bridgeProtocol, pollInterval = 3000, timeout = 600_000 } = options;
|
|
240
|
+
|
|
241
|
+
if (!srcTxHash) {
|
|
242
|
+
throw new InvalidArgumentError({
|
|
243
|
+
property: "srcTxHash",
|
|
244
|
+
value: srcTxHash,
|
|
245
|
+
expected: "string",
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const startTime = Date.now();
|
|
250
|
+
|
|
251
|
+
while (true) {
|
|
252
|
+
if (Date.now() - startTime > timeout) {
|
|
253
|
+
throw new BeraError({
|
|
254
|
+
message: `Bridge message tracking timed out after ${timeout}ms`,
|
|
255
|
+
reason: "BRIDGE_TIMEOUT",
|
|
256
|
+
level: "warning",
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
try {
|
|
261
|
+
const message = await getBridgeMessage(bridgeProtocol, srcTxHash);
|
|
262
|
+
|
|
263
|
+
if (message.status === BridgeMessageStatus.FAILED) {
|
|
264
|
+
throw new BeraError({
|
|
265
|
+
message: `Bridge message failed: ${message.statusMessage}`,
|
|
266
|
+
reason: "BRIDGE_MESSAGE_FAILED",
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Only resolve once we actually have the destination tx hash the type
|
|
271
|
+
// promises. A DELIVERED status without one (e.g. LZ's destination union
|
|
272
|
+
// lacking `tx`) means the dst tx isn't indexed yet — keep polling rather
|
|
273
|
+
// than cast a message with `dstTxHash: undefined`.
|
|
274
|
+
if (
|
|
275
|
+
message.status === BridgeMessageStatus.DELIVERED &&
|
|
276
|
+
message.dstTxHash
|
|
277
|
+
) {
|
|
278
|
+
return message as BridgeDeliveredMessage;
|
|
279
|
+
}
|
|
280
|
+
} catch (error) {
|
|
281
|
+
// re-throw non-retryable errors (validation, failed message) but allow
|
|
282
|
+
// RequestError to retry (network issues, temporary API errors)
|
|
283
|
+
if (error instanceof BeraError && !(error instanceof RequestError)) {
|
|
284
|
+
throw error;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
await sleep(pollInterval);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
BridgeMessageStatus,
|
|
5
|
+
getBridgeExplorerUrl,
|
|
6
|
+
getBridgeMessageOnce,
|
|
7
|
+
} from "./crossChainBridge";
|
|
8
|
+
|
|
9
|
+
const mockFetchLayerzero = vi.fn();
|
|
10
|
+
const mockBeraFetchJson = vi.fn();
|
|
11
|
+
|
|
12
|
+
vi.mock("../actions/clients/fetchLayerzero", () => ({
|
|
13
|
+
fetchLayerzero: (...args: unknown[]) => mockFetchLayerzero(...args),
|
|
14
|
+
}));
|
|
15
|
+
vi.mock("./beraFetch", () => ({
|
|
16
|
+
beraFetchJson: (...args: unknown[]) => mockBeraFetchJson(...args),
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
const TX = "0xabc";
|
|
20
|
+
const SRC = "0xsrc";
|
|
21
|
+
const DST = "0xdst";
|
|
22
|
+
const FALLBACK = "https://etherscan.io";
|
|
23
|
+
|
|
24
|
+
describe("getBridgeExplorerUrl", () => {
|
|
25
|
+
it("links LayerZero/Stargate to LZ Scan by src tx hash", () => {
|
|
26
|
+
for (const bridgeProtocol of ["layerzero", "stargate"]) {
|
|
27
|
+
expect(
|
|
28
|
+
getBridgeExplorerUrl({
|
|
29
|
+
bridgeProtocol,
|
|
30
|
+
srcTxHash: TX,
|
|
31
|
+
fallbackExplorerUrl: FALLBACK,
|
|
32
|
+
}),
|
|
33
|
+
).toBe(`https://layerzeroscan.com/tx/${TX}`);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("links Relay to relay.link by explorerId (requestId)", () => {
|
|
38
|
+
expect(
|
|
39
|
+
getBridgeExplorerUrl({
|
|
40
|
+
bridgeProtocol: "relay",
|
|
41
|
+
srcTxHash: TX,
|
|
42
|
+
explorerId: "req-1",
|
|
43
|
+
fallbackExplorerUrl: FALLBACK,
|
|
44
|
+
}),
|
|
45
|
+
).toBe("https://relay.link/transaction/req-1");
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("keeps Relay on its explorer via src tx hash when no explorerId yet", () => {
|
|
49
|
+
expect(
|
|
50
|
+
getBridgeExplorerUrl({
|
|
51
|
+
bridgeProtocol: "relay",
|
|
52
|
+
srcTxHash: TX,
|
|
53
|
+
fallbackExplorerUrl: FALLBACK,
|
|
54
|
+
}),
|
|
55
|
+
).toBe(`https://relay.link/transaction/${TX}`);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("falls back to the src chain for untracked/unknown bridges", () => {
|
|
59
|
+
expect(
|
|
60
|
+
getBridgeExplorerUrl({
|
|
61
|
+
bridgeProtocol: "ccip",
|
|
62
|
+
srcTxHash: TX,
|
|
63
|
+
fallbackExplorerUrl: FALLBACK,
|
|
64
|
+
}),
|
|
65
|
+
).toBe(`${FALLBACK}/tx/${TX}`);
|
|
66
|
+
expect(
|
|
67
|
+
getBridgeExplorerUrl({
|
|
68
|
+
srcTxHash: TX,
|
|
69
|
+
fallbackExplorerUrl: FALLBACK,
|
|
70
|
+
}),
|
|
71
|
+
).toBe(`${FALLBACK}/tx/${TX}`);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("returns undefined when there's no tx hash to key on", () => {
|
|
75
|
+
expect(
|
|
76
|
+
getBridgeExplorerUrl({
|
|
77
|
+
bridgeProtocol: "layerzero",
|
|
78
|
+
fallbackExplorerUrl: FALLBACK,
|
|
79
|
+
}),
|
|
80
|
+
).toBeUndefined();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// Parser tests: feed representative API JSON (shapes captured from the live
|
|
85
|
+
// LayerZero Scan + Relay APIs) through the mappers via getBridgeMessageOnce,
|
|
86
|
+
// which dispatches by protocol. Guards against the response shape / status
|
|
87
|
+
// vocabulary drifting away from what the mappers expect.
|
|
88
|
+
describe("getBridgeMessageOnce parsers", () => {
|
|
89
|
+
beforeEach(() => {
|
|
90
|
+
mockFetchLayerzero.mockReset();
|
|
91
|
+
mockBeraFetchJson.mockReset();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
describe("LayerZero / Stargate", () => {
|
|
95
|
+
it("maps a delivered message with its destination tx hash", async () => {
|
|
96
|
+
mockFetchLayerzero.mockResolvedValue({
|
|
97
|
+
data: [
|
|
98
|
+
{
|
|
99
|
+
source: { tx: { txHash: SRC } },
|
|
100
|
+
destination: { tx: { txHash: DST } },
|
|
101
|
+
status: { name: "DELIVERED" },
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
const msg = await getBridgeMessageOnce("layerzero", SRC);
|
|
106
|
+
expect(msg.status).toBe(BridgeMessageStatus.DELIVERED);
|
|
107
|
+
expect(msg.dstTxHash).toBe(DST);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("maps FAILED and carries the status message", async () => {
|
|
111
|
+
mockFetchLayerzero.mockResolvedValue({
|
|
112
|
+
data: [{ status: { name: "FAILED", message: "revert reason" } }],
|
|
113
|
+
});
|
|
114
|
+
const msg = await getBridgeMessageOnce("stargate", SRC);
|
|
115
|
+
expect(msg.status).toBe(BridgeMessageStatus.FAILED);
|
|
116
|
+
expect(msg.statusMessage).toBe("revert reason");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it("collapses transient states (e.g. CONFIRMING) to INFLIGHT", async () => {
|
|
120
|
+
mockFetchLayerzero.mockResolvedValue({
|
|
121
|
+
data: [{ status: { name: "CONFIRMING" } }],
|
|
122
|
+
});
|
|
123
|
+
const msg = await getBridgeMessageOnce("layerzero", SRC);
|
|
124
|
+
expect(msg.status).toBe(BridgeMessageStatus.INFLIGHT);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("treats a not-yet-indexed (empty) response as INFLIGHT", async () => {
|
|
128
|
+
mockFetchLayerzero.mockResolvedValue({ data: [] });
|
|
129
|
+
const msg = await getBridgeMessageOnce("layerzero", SRC);
|
|
130
|
+
expect(msg.status).toBe(BridgeMessageStatus.INFLIGHT);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
describe("Relay", () => {
|
|
135
|
+
it("maps success -> DELIVERED with requestId + dst tx hash", async () => {
|
|
136
|
+
mockBeraFetchJson.mockResolvedValue({
|
|
137
|
+
requests: [
|
|
138
|
+
{ id: "req-1", status: "success", data: { outTxs: [{ hash: DST }] } },
|
|
139
|
+
],
|
|
140
|
+
});
|
|
141
|
+
const msg = await getBridgeMessageOnce("relay", SRC);
|
|
142
|
+
expect(msg.status).toBe(BridgeMessageStatus.DELIVERED);
|
|
143
|
+
expect(msg.dstTxHash).toBe(DST);
|
|
144
|
+
expect(msg.explorerId).toBe("req-1");
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it("maps failure and refund -> FAILED", async () => {
|
|
148
|
+
for (const status of ["failure", "refund"]) {
|
|
149
|
+
mockBeraFetchJson.mockResolvedValue({
|
|
150
|
+
requests: [{ id: "r", status, data: { failReason: "boom" } }],
|
|
151
|
+
});
|
|
152
|
+
const msg = await getBridgeMessageOnce("relay", SRC);
|
|
153
|
+
expect(msg.status).toBe(BridgeMessageStatus.FAILED);
|
|
154
|
+
expect(msg.statusMessage).toBe("boom");
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it("treats pending / unknown status as INFLIGHT", async () => {
|
|
159
|
+
mockBeraFetchJson.mockResolvedValue({
|
|
160
|
+
requests: [{ id: "r", status: "pending", data: {} }],
|
|
161
|
+
});
|
|
162
|
+
const msg = await getBridgeMessageOnce("relay", SRC);
|
|
163
|
+
expect(msg.status).toBe(BridgeMessageStatus.INFLIGHT);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("treats a not-yet-indexed (empty) response as INFLIGHT", async () => {
|
|
167
|
+
mockBeraFetchJson.mockResolvedValue({ requests: [] });
|
|
168
|
+
const msg = await getBridgeMessageOnce("relay", SRC);
|
|
169
|
+
expect(msg.status).toBe(BridgeMessageStatus.INFLIGHT);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("swallows an unsupported bridge into INFLIGHT (never throws)", async () => {
|
|
174
|
+
const msg = await getBridgeMessageOnce("ccip", SRC);
|
|
175
|
+
expect(msg.status).toBe(BridgeMessageStatus.INFLIGHT);
|
|
176
|
+
});
|
|
177
|
+
});
|
package/src/utils/exports.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { defaultFlags as defaultBeraFlags } from "../contexts/BeraFlags/defaultFlags";
|
|
2
2
|
export * from "./beraFetch";
|
|
3
3
|
export * from "./constants";
|
|
4
|
+
export * from "./crossChainBridge";
|
|
4
5
|
export * from "./formatInputTokenValue";
|
|
5
6
|
export * from "./formatNumber";
|
|
6
7
|
export * from "./formatTimestamps";
|
|
@@ -11,7 +12,6 @@ export * from "./getServerSideClient";
|
|
|
11
12
|
export { getTestClient } from "./getTestClient";
|
|
12
13
|
export * from "./isDifferenceExceedingThreshold";
|
|
13
14
|
export * from "./isSubgraphStale";
|
|
14
|
-
export * from "./layerZeroScan";
|
|
15
15
|
export * from "./math";
|
|
16
16
|
export * from "./parseBaseArgs";
|
|
17
17
|
export * from "./parseWhiskToken";
|