@berachain/berajs 0.2.13 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -1
- package/dist/actions/clients/clientName.d.ts +10 -0
- package/dist/actions/clients/clientName.d.ts.map +1 -0
- package/dist/actions/clients/clientName.unit.test.d.ts +2 -0
- package/dist/actions/clients/clientName.unit.test.d.ts.map +1 -0
- package/dist/actions/clients/exports.d.ts +2 -0
- package/dist/actions/clients/exports.d.ts.map +1 -1
- package/dist/actions/clients/exports.mjs +26 -7
- package/dist/actions/clients/exports.mjs.map +1 -1
- package/dist/actions/clients/fetchBeep.d.ts +2 -2
- package/dist/actions/clients/fetchBeep.d.ts.map +1 -1
- package/dist/actions/clients/fetchEnso.d.ts +17 -0
- package/dist/actions/clients/fetchEnso.d.ts.map +1 -0
- package/dist/actions/clients/fetchLayerzero.d.ts +12 -0
- package/dist/actions/clients/fetchLayerzero.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.d.ts +4 -1
- package/dist/actions/clients/fetchOpenApi.d.ts.map +1 -1
- package/dist/actions/clients/getApolloClient.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/base.d.ts +30 -5
- package/dist/actions/dex/aggregators/base.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/bex.d.ts +11 -1
- package/dist/actions/dex/aggregators/bex.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/bgt.d.ts +2 -2
- package/dist/actions/dex/aggregators/bgt.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/enso/enso.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/erc4626.d.ts +2 -2
- package/dist/actions/dex/aggregators/erc4626.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/fly.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/haiku.d.ts +7 -1
- package/dist/actions/dex/aggregators/haiku.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/honey.d.ts +2 -2
- package/dist/actions/dex/aggregators/honey.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/kyberswap.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/oogabooga.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/openOcean.d.ts.map +1 -1
- package/dist/actions/dex/aggregators/wbera.d.ts +3 -2
- package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -1
- package/dist/actions/dex/getAllPools.d.ts.map +1 -1
- package/dist/actions/dex/getApiPool.d.ts.map +1 -1
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -1
- package/dist/actions/enso/util.d.ts +1 -6
- package/dist/actions/enso/util.d.ts.map +1 -1
- package/dist/actions/exports.d.ts +3 -5
- package/dist/actions/exports.d.ts.map +1 -1
- package/dist/actions/exports.mjs +33 -64
- package/dist/actions/exports.mjs.map +1 -1
- package/dist/actions/governance/exports.mjs +3 -3
- package/dist/actions/honey/getChartData.d.ts +1 -1
- package/dist/actions/honey/getChartData.d.ts.map +1 -1
- package/dist/actions/honey/getHoney24hVolume.d.ts +2 -2
- package/dist/actions/honey/getHoney24hVolume.d.ts.map +1 -1
- package/dist/actions/honey/getHoneyCollaterals.d.ts +1 -1
- package/dist/actions/honey/getHoneyCollaterals.d.ts.map +1 -1
- package/dist/actions/honey/getHoneyTxns.d.ts +1 -1
- package/dist/actions/honey/getHoneyTxns.d.ts.map +1 -1
- package/dist/actions/pol/getBGTGlobalInfo.d.ts +0 -1
- package/dist/actions/pol/getBGTGlobalInfo.d.ts.map +1 -1
- package/dist/actions/pol/getBeraTokenTotalSupply.d.ts.map +1 -1
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts +4 -27
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts.map +1 -1
- package/dist/actions/pol/getLSTStakeConfig.d.ts.map +1 -1
- package/dist/actions/pol/getRewardVaults.d.ts.map +1 -1
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts +1 -14
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts.map +1 -1
- package/dist/actions/pol/getStakedBeraAPY.d.ts +14 -0
- package/dist/actions/pol/getStakedBeraAPY.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts +14 -4
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts.map +1 -1
- package/dist/actions/pol/getStakingDailyAssets.d.ts +2 -2
- package/dist/actions/pol/getStakingDailyAssets.d.ts.map +1 -1
- package/dist/actions/server/exports.mjs +5 -5
- package/dist/actions/server/exports.mjs.map +1 -1
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts +1 -1
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts.map +1 -1
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts +1 -1
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts.map +1 -1
- package/dist/actions/validators/getUserActiveValidators.d.ts +37 -1
- package/dist/actions/validators/getUserActiveValidators.d.ts.map +1 -1
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts +1 -1
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts.map +1 -1
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts +4 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts.map +1 -1
- package/dist/chunk-3TRTSTDH.mjs +19 -0
- package/dist/chunk-3TRTSTDH.mjs.map +1 -0
- package/dist/{chunk-ZWTGVIPJ.mjs → chunk-4576RF2K.mjs} +29 -4
- package/dist/chunk-4576RF2K.mjs.map +1 -0
- package/dist/{chunk-PHYZRH4I.mjs → chunk-5MUCX35C.mjs} +9 -13
- package/dist/chunk-5MUCX35C.mjs.map +1 -0
- package/dist/{chunk-UA3Z47LT.mjs → chunk-6D4S3EAC.mjs} +97 -26
- package/dist/chunk-6D4S3EAC.mjs.map +1 -0
- package/dist/{chunk-AEN6IJFU.mjs → chunk-7KN7TDUC.mjs} +2 -2
- package/dist/{chunk-LE4CYW7S.mjs → chunk-FWRYUIJK.mjs} +3 -3
- package/dist/chunk-GDUKRUHE.mjs +29 -0
- package/dist/chunk-GDUKRUHE.mjs.map +1 -0
- package/dist/{chunk-PJRLHTGC.mjs → chunk-HPRLNT6R.mjs} +3 -3
- package/dist/{chunk-DOZJB6IJ.mjs → chunk-KY7JMIIS.mjs} +394 -346
- package/dist/chunk-KY7JMIIS.mjs.map +1 -0
- package/dist/{chunk-P3YZ7F22.mjs → chunk-LL7XR2H5.mjs} +34 -3
- package/dist/chunk-LL7XR2H5.mjs.map +1 -0
- package/dist/{chunk-EJIGERYM.mjs → chunk-M3MIGSH3.mjs} +2 -2
- package/dist/{chunk-NZAH3SGT.mjs → chunk-MVNQY2D4.mjs} +9 -4
- package/dist/chunk-MVNQY2D4.mjs.map +1 -0
- package/dist/{chunk-TGN55GKE.mjs → chunk-SC3BSCTN.mjs} +2 -2
- package/dist/{chunk-QQASX4LJ.mjs → chunk-TXWDUJOY.mjs} +2 -2
- package/dist/{chunk-EGAB6NFQ.mjs → chunk-UWJQ6UKG.mjs} +2 -2
- package/dist/chunk-XO2BFPTB.mjs +50 -0
- package/dist/chunk-XO2BFPTB.mjs.map +1 -0
- package/dist/{chunk-7TFV6UKF.mjs → chunk-XXKPXNQD.mjs} +1 -2
- package/dist/chunk-XXKPXNQD.mjs.map +1 -0
- package/dist/{chunk-IFNIPVTZ.mjs → chunk-Z337NBBW.mjs} +5 -49
- package/dist/chunk-Z337NBBW.mjs.map +1 -0
- package/dist/{chunk-J3LTASDE.mjs → chunk-ZHV3MQ4F.mjs} +4 -4
- package/dist/contexts/BeraFlags/BeraFlags.d.ts +1 -1
- package/dist/contexts/BeraFlags/BeraFlags.d.ts.map +1 -1
- package/dist/contexts/BeraFlags/defaultFlags.d.ts +2 -2
- package/dist/contexts/BeraFlags/defaultFlags.d.ts.map +1 -1
- package/dist/contexts/BexStatusProvider.d.ts +1 -1
- package/dist/contexts/BexStatusProvider.d.ts.map +1 -1
- package/dist/contexts/TokensProvider.d.ts +1 -1
- package/dist/contexts/TokensProvider.d.ts.map +1 -1
- package/dist/contexts/exports.mjs +9 -9
- package/dist/enum/contracts.d.ts +3 -0
- package/dist/enum/contracts.d.ts.map +1 -1
- package/dist/enum/exports.mjs +6 -4
- package/dist/enum/exports.mjs.map +1 -1
- package/dist/enum/txnEnum.d.ts +1 -1
- package/dist/enum/txnEnum.d.ts.map +1 -1
- package/dist/errors/RequestError.d.ts +19 -0
- package/dist/errors/RequestError.d.ts.map +1 -1
- package/dist/errors/errorMap.d.ts +4 -3
- package/dist/errors/errorMap.d.ts.map +1 -1
- package/dist/errors/exports.mjs +5 -5
- package/dist/errors/getErrorMessage.unit.test.d.ts +2 -0
- package/dist/errors/getErrorMessage.unit.test.d.ts.map +1 -0
- package/dist/generated/beep.d.ts +1597 -0
- package/dist/generated/beep.d.ts.map +1 -0
- package/dist/generated/enso.d.ts +4957 -0
- package/dist/generated/enso.d.ts.map +1 -0
- package/dist/generated/layerzero.d.ts +2057 -0
- package/dist/generated/layerzero.d.ts.map +1 -0
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts.map +1 -1
- package/dist/hooks/dex/useAllUserPools.d.ts.map +1 -1
- package/dist/hooks/dex/useCrossChainNativeFee.d.ts +32 -0
- package/dist/hooks/dex/useCrossChainNativeFee.d.ts.map +1 -0
- package/dist/hooks/dex/useCrossChainNativeFee.unit.test.d.ts +2 -0
- package/dist/hooks/dex/useCrossChainNativeFee.unit.test.d.ts.map +1 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts.map +1 -1
- package/dist/hooks/dex/usePools.d.ts.map +1 -1
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts.map +1 -1
- package/dist/hooks/dex/useSingleAggregatorQuote.unit.test.d.ts +2 -0
- package/dist/hooks/dex/useSingleAggregatorQuote.unit.test.d.ts.map +1 -0
- package/dist/hooks/enso/useBendZapSupply.d.ts +2 -2
- package/dist/hooks/enso/useBendZapSupply.d.ts.map +1 -1
- package/dist/hooks/enso/useBendZapSupply.unit.test.d.ts +2 -0
- package/dist/hooks/enso/useBendZapSupply.unit.test.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts.map +1 -1
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.unit.test.d.ts +2 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.unit.test.d.ts.map +1 -0
- package/dist/hooks/enso/useZapStakeBera.d.ts.map +1 -1
- package/dist/hooks/enso/useZapStakeBera.unit.test.d.ts +2 -0
- package/dist/hooks/enso/useZapStakeBera.unit.test.d.ts.map +1 -0
- package/dist/hooks/exports.d.ts +2 -5
- package/dist/hooks/exports.d.ts.map +1 -1
- package/dist/hooks/exports.mjs +615 -911
- package/dist/hooks/exports.mjs.map +1 -1
- package/dist/hooks/governance/exports.mjs +4 -4
- package/dist/hooks/honey/useHoneyChartData.d.ts +4 -4
- package/dist/hooks/honey/useHoneyChartData.d.ts.map +1 -1
- package/dist/hooks/pol/useAutoclaimedIncentives.d.ts.map +1 -1
- package/dist/hooks/pol/useAutoclaimedIncentivesTxHash.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts.map +1 -1
- package/dist/hooks/pol/useRewardVaults.d.ts.map +1 -1
- package/dist/hooks/pol/useStakedAPY.d.ts +11 -0
- package/dist/hooks/pol/useStakedAPY.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedData.d.ts +4 -2
- package/dist/hooks/pol/useStakedData.d.ts.map +1 -1
- package/dist/hooks/pol/useStakedSnapshots.d.ts +1 -1
- package/dist/hooks/pol/useStakedSnapshots.d.ts.map +1 -1
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts +0 -1
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts.map +1 -1
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts +30 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts.map +1 -1
- package/dist/hooks/tokens/useMultipleTokenInformation.unit.test.d.ts +2 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.unit.test.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollBalance.d.ts.map +1 -1
- package/dist/hooks/validators/useUserActiveValidators.d.ts +5 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts.map +1 -1
- package/dist/hooks/validators/useValidator.d.ts +0 -1
- package/dist/hooks/validators/useValidator.d.ts.map +1 -1
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts +4 -5
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts.map +1 -1
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts +1 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -1
- package/dist/types/beep/exports.d.ts +2 -0
- package/dist/types/beep/exports.d.ts.map +1 -0
- package/dist/types/beep/exports.mjs +1 -0
- package/dist/types/beep/exports.mjs.map +1 -0
- package/dist/types/bribeBoost.d.ts +0 -49
- package/dist/types/dex.d.ts +17 -0
- package/dist/types/enso.d.ts +1 -27
- package/dist/types/global.d.ts +7 -0
- package/dist/types/pol.d.ts +3 -48
- package/dist/utils/crossChainBridge.d.ts +74 -0
- package/dist/utils/crossChainBridge.d.ts.map +1 -0
- package/dist/utils/crossChainBridge.unit.test.d.ts +2 -0
- package/dist/utils/crossChainBridge.unit.test.d.ts.map +1 -0
- package/dist/utils/exports.d.ts +1 -1
- package/dist/utils/exports.d.ts.map +1 -1
- package/dist/utils/exports.mjs +142 -72
- package/dist/utils/exports.mjs.map +1 -1
- package/dist/utils/getTestClient.d.ts +5 -3
- package/dist/utils/getTestClient.d.ts.map +1 -1
- package/dist/utils/parseWhiskToken.d.ts.map +1 -1
- package/package.json +14 -10
- package/src/actions/clients/BeraApolloClient.ts +4 -2
- package/src/actions/clients/clientName.ts +17 -0
- package/src/actions/clients/clientName.unit.test.ts +39 -0
- package/src/actions/clients/exports.ts +2 -0
- package/src/actions/clients/fetchBeep.ts +6 -4
- package/src/actions/clients/fetchEnso.ts +47 -0
- package/src/actions/clients/fetchLayerzero.ts +33 -0
- package/src/actions/clients/fetchOpenApi.ts +9 -2
- package/src/actions/clients/fetchOpenApi.unit.test.ts +27 -12
- package/src/actions/clients/getApolloClient.ts +3 -11
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +231 -2
- package/src/actions/dex/aggregators/base.ts +75 -17
- package/src/actions/dex/aggregators/bex.ts +41 -1
- package/src/actions/dex/aggregators/bgt.ts +11 -6
- package/src/actions/dex/aggregators/enso/enso.ts +1 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +27 -9
- package/src/actions/dex/aggregators/erc4626.ts +19 -5
- package/src/actions/dex/aggregators/fly.ts +1 -0
- package/src/actions/dex/aggregators/haiku.ts +33 -2
- package/src/actions/dex/aggregators/honey.ts +17 -6
- package/src/actions/dex/aggregators/kyberswap.ts +1 -0
- package/src/actions/dex/aggregators/oogabooga.ts +1 -0
- package/src/actions/dex/aggregators/openOcean.ts +1 -0
- package/src/actions/dex/aggregators/wbera.ts +17 -11
- package/src/actions/enso/getBendMultiplyBundle.ts +1 -1
- package/src/actions/enso/getEnsoUserTokensWithBalances.ts +4 -8
- package/src/actions/enso/util.ts +0 -59
- package/src/actions/exports.ts +3 -5
- package/src/actions/honey/getChartData.ts +2 -3
- package/src/actions/honey/getHoney24hVolume.ts +4 -13
- package/src/actions/honey/getHoneyCollaterals.ts +1 -1
- package/src/actions/honey/getHoneyTxns.ts +2 -3
- package/src/actions/pol/getBGTGlobalInfo.ts +0 -2
- package/src/actions/pol/getBeraTokenTotalSupply.ts +3 -33
- package/src/actions/pol/getEarnedStakedBeraVault.ts +1 -1
- package/src/actions/pol/getLSTStakeConfig.ts +0 -6
- package/src/actions/pol/getRewardVaults.ts +0 -1
- package/src/actions/pol/getSWBeraVaultMetadata.ts +2 -106
- package/src/actions/pol/getStakedBeraAPY.ts +44 -0
- package/src/actions/pol/getStakedBeraSnapshots.ts +17 -34
- package/src/actions/pol/getStakingDailyAssets.ts +1 -1
- package/src/actions/server/getDailyValidatorBlockStats.ts +1 -2
- package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts +1 -1
- package/src/actions/validators/getUserActiveValidators.ts +116 -54
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +1 -2
- package/src/actions/validators/getValidatorRewardAllocation.ts +12 -1
- package/src/contexts/BeraFlags/BeraFlags.tsx +1 -4
- package/src/contexts/BeraFlags/defaultFlags.ts +1 -3
- package/src/contexts/BexStatusProvider.tsx +1 -1
- package/src/contexts/TokensProvider.tsx +1 -4
- package/src/enum/contracts.ts +3 -0
- package/src/enum/txnEnum.ts +1 -1
- package/src/errors/BeraError.unit.test.ts +23 -0
- package/src/errors/RequestError.ts +46 -9
- package/src/errors/RequestError.unit.test.ts +54 -0
- package/src/errors/errorMap.ts +8 -3
- package/src/errors/getErrorMessage.unit.test.ts +32 -0
- package/src/generated/beep.ts +1605 -0
- package/src/generated/enso.ts +4965 -0
- package/src/generated/layerzero.ts +2065 -0
- package/src/hooks/dex/useAggregatorsQuotes.ts +7 -1
- package/src/hooks/dex/useCrossChainNativeFee.ts +83 -0
- package/src/hooks/dex/useCrossChainNativeFee.unit.test.ts +63 -0
- package/src/hooks/dex/useOnChainPoolData.ts +30 -13
- package/src/hooks/dex/useSingleAggregatorQuote.ts +10 -5
- package/src/hooks/dex/useSingleAggregatorQuote.unit.test.ts +86 -0
- package/src/hooks/enso/useBendZapSupply.ts +10 -38
- package/src/hooks/enso/useBendZapSupply.unit.test.ts +98 -0
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +13 -3
- package/src/hooks/enso/useEnsoUserTokensWithBalances.unit.test.ts +69 -0
- package/src/hooks/enso/useZapStakeBera.ts +8 -1
- package/src/hooks/enso/useZapStakeBera.unit.test.ts +97 -0
- package/src/hooks/exports.ts +2 -5
- package/src/hooks/pol/useAutoclaimedIncentives.ts +6 -3
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +5 -2
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +5 -4
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +0 -1
- package/src/hooks/pol/{useStakedAPR.ts → useStakedAPY.ts} +11 -9
- package/src/hooks/pol/useStakedData.ts +15 -14
- package/src/hooks/pol/useStakedSnapshots.ts +1 -1
- package/src/hooks/pol/useStakingVaultsMetadata.ts +3 -8
- package/src/hooks/tokens/useMultipleTokenInformation.ts +64 -21
- package/src/hooks/tokens/useMultipleTokenInformation.unit.test.ts +91 -0
- package/src/hooks/tokens/usePollBalance.ts +4 -2
- package/src/hooks/validators/useUserActiveValidators.ts +54 -9
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +4 -5
- package/src/types/beep/exports.ts +4 -0
- package/src/types/bribeBoost.d.ts +0 -49
- package/src/types/dex.d.ts +17 -0
- package/src/types/enso.d.ts +1 -27
- package/src/types/global.d.ts +7 -0
- package/src/types/pol.d.ts +3 -48
- package/src/utils/crossChainBridge.ts +290 -0
- package/src/utils/crossChainBridge.unit.test.ts +177 -0
- package/src/utils/exports.ts +1 -1
- package/dist/BeraError-7-A5JYy_.d.ts +0 -123
- package/dist/BexStatusProvider-DRymVlQf.d.ts +0 -70
- package/dist/HoneyConfigProvider-COOuDNra.d.ts +0 -390
- package/dist/RequestError-DkUbo3ro.d.ts +0 -145
- package/dist/actions/dex/b-sdk.d.ts +0 -3
- package/dist/actions/enso/getEnsoSwapBundle.d.ts +0 -3
- package/dist/actions/enso/getEnsoSwapBundle.d.ts.map +0 -1
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts +0 -10
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts.map +0 -1
- package/dist/actions/pol/getRewardProofsByValidator.d.ts +0 -9
- package/dist/actions/pol/getRewardProofsByValidator.d.ts.map +0 -1
- package/dist/actions/pol/getStakedBeraAPR.d.ts +0 -12
- package/dist/actions/pol/getStakedBeraAPR.d.ts.map +0 -1
- package/dist/actions/pol/getUserClaimableIncentives.d.ts +0 -9
- package/dist/actions/pol/getUserClaimableIncentives.d.ts.map +0 -1
- package/dist/actions/validators/getValidatorAnalytics.d.ts +0 -12
- package/dist/actions/validators/getValidatorAnalytics.d.ts.map +0 -1
- package/dist/chunk-7TFV6UKF.mjs.map +0 -1
- package/dist/chunk-BSOWLS3W.mjs +0 -40
- package/dist/chunk-BSOWLS3W.mjs.map +0 -1
- package/dist/chunk-DOZJB6IJ.mjs.map +0 -1
- package/dist/chunk-IFNIPVTZ.mjs.map +0 -1
- package/dist/chunk-NZAH3SGT.mjs.map +0 -1
- package/dist/chunk-P3YZ7F22.mjs.map +0 -1
- package/dist/chunk-PHYZRH4I.mjs.map +0 -1
- package/dist/chunk-UA3Z47LT.mjs.map +0 -1
- package/dist/chunk-ZWTGVIPJ.mjs.map +0 -1
- package/dist/contexts/block-time-provider.d.ts +0 -10
- package/dist/defaultFlags-D6KfkTZx.d.ts +0 -10
- package/dist/dex-C_BB0b0O.d.ts +0 -37
- package/dist/getApolloClient-MWm_iq4u.d.ts +0 -39
- package/dist/getProposalVotes-DAUrdX2n.d.ts +0 -12
- package/dist/getValidatorQueuedOperatorAddress-N2I7wHd6.d.ts +0 -511
- package/dist/global.d-CR3zicga.d.ts +0 -231
- package/dist/global.d-CiZJ2eHz.d.ts +0 -231
- package/dist/honey-CYm0RWf4.d.ts +0 -14
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts +0 -26
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts.map +0 -1
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts +0 -8
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts.map +0 -1
- package/dist/hooks/pol/useStakedAPR.d.ts +0 -11
- package/dist/hooks/pol/useStakedAPR.d.ts.map +0 -1
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts +0 -8
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts.map +0 -1
- package/dist/hooks/validators/useValidatorAnalytics.d.ts +0 -11
- package/dist/hooks/validators/useValidatorAnalytics.d.ts.map +0 -1
- package/dist/pol.d-CeRgXBL8.d.ts +0 -167
- package/dist/txnEnum-ByI5dtDi.d.ts +0 -106
- package/dist/types/bribe-boost.d.ts +0 -69
- package/dist/useHoneySwapState-CXVWAThr.d.ts +0 -32
- package/dist/useHoneySwapState-twi7NTaO.d.ts +0 -32
- package/dist/utils/formatIncentivesTokenMap.d.ts +0 -3
- package/dist/utils/formatIncentivesTokenMap.d.ts.map +0 -1
- package/dist/utils/layerZeroScan.d.ts +0 -39
- package/dist/utils/layerZeroScan.d.ts.map +0 -1
- package/src/actions/enso/getEnsoSwapBundle.ts +0 -72
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +0 -28
- package/src/actions/pol/getRewardProofsByValidator.ts +0 -49
- package/src/actions/pol/getStakedBeraAPR.ts +0 -56
- package/src/actions/pol/getUserClaimableIncentives.ts +0 -40
- package/src/actions/validators/getValidatorAnalytics.ts +0 -37
- package/src/hooks/enso/useEnsoSwapBundle.ts +0 -121
- package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +0 -34
- package/src/hooks/validators/useUserClaimableIncentives.ts +0 -148
- package/src/hooks/validators/useValidatorAnalytics.ts +0 -37
- package/src/utils/formatIncentivesTokenMap.ts +0 -19
- package/src/utils/layerZeroScan.ts +0 -124
- /package/dist/{chunk-AEN6IJFU.mjs.map → chunk-7KN7TDUC.mjs.map} +0 -0
- /package/dist/{chunk-LE4CYW7S.mjs.map → chunk-FWRYUIJK.mjs.map} +0 -0
- /package/dist/{chunk-PJRLHTGC.mjs.map → chunk-HPRLNT6R.mjs.map} +0 -0
- /package/dist/{chunk-EJIGERYM.mjs.map → chunk-M3MIGSH3.mjs.map} +0 -0
- /package/dist/{chunk-TGN55GKE.mjs.map → chunk-SC3BSCTN.mjs.map} +0 -0
- /package/dist/{chunk-QQASX4LJ.mjs.map → chunk-TXWDUJOY.mjs.map} +0 -0
- /package/dist/{chunk-EGAB6NFQ.mjs.map → chunk-UWJQ6UKG.mjs.map} +0 -0
- /package/dist/{chunk-J3LTASDE.mjs.map → chunk-ZHV3MQ4F.mjs.map} +0 -0
package/dist/pol.d-CeRgXBL8.d.ts
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-COOuDNra.js';
|
|
3
|
-
import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
|
|
4
|
-
|
|
5
|
-
interface BribeBoostReward {
|
|
6
|
-
token: string;
|
|
7
|
-
total_unclaimed: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface BribeBoostRewardItem {
|
|
11
|
-
rewards: BribeBoostReward[];
|
|
12
|
-
validator: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface BribeBoostRewardProof {
|
|
16
|
-
validator?: string;
|
|
17
|
-
pagination: {
|
|
18
|
-
next: number;
|
|
19
|
-
previous: number;
|
|
20
|
-
record_per_page: number;
|
|
21
|
-
current_page: number;
|
|
22
|
-
total_page: number;
|
|
23
|
-
};
|
|
24
|
-
rewards:
|
|
25
|
-
| {
|
|
26
|
-
id: string;
|
|
27
|
-
dist_id: string;
|
|
28
|
-
token: Address;
|
|
29
|
-
recipient: string;
|
|
30
|
-
amount: string;
|
|
31
|
-
merkle_proof: string[];
|
|
32
|
-
available_at: number;
|
|
33
|
-
}[]
|
|
34
|
-
| null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
|
|
38
|
-
// { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
|
|
39
|
-
// `amount` is a stringified bigint in token base units. The backend now
|
|
40
|
-
// aggregates across validators under a single fake pubkey (`0x000…000`),
|
|
41
|
-
// so consumers can collapse the validator dimension blindly.
|
|
42
|
-
type AutoclaimedIncentivesResponse = Record<
|
|
43
|
-
Address,
|
|
44
|
-
Record<Address, Record<Address, { amount: string }>>
|
|
45
|
-
>;
|
|
46
|
-
|
|
47
|
-
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
|
|
48
|
-
// nesting, but each token leaf is `{ txhash }`. Tokens still pending are
|
|
49
|
-
// simply absent — when a token from `/autoclaimed` has no entry here, the
|
|
50
|
-
// bot hasn't distributed it yet.
|
|
51
|
-
type AutoclaimedIncentivesTxHashResponse = Record<
|
|
52
|
-
Address,
|
|
53
|
-
Record<Address, Record<Address, { txhash: string }>>
|
|
54
|
-
>;
|
|
55
|
-
|
|
56
|
-
interface BribeBoostValidatorApr {
|
|
57
|
-
id: string;
|
|
58
|
-
boost_total_bgt: string;
|
|
59
|
-
rewards_total_usd: string;
|
|
60
|
-
daily_rate: string;
|
|
61
|
-
apr: string;
|
|
62
|
-
apy: string;
|
|
63
|
-
tokens: Address[]; // Confirm this type with backend real data
|
|
64
|
-
validator: string;
|
|
65
|
-
start_block: number;
|
|
66
|
-
end_block: number;
|
|
67
|
-
start_timestamp: number;
|
|
68
|
-
end_timestamp: number;
|
|
69
|
-
created_at: string;
|
|
70
|
-
updated_at: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface ProtocolMetadata {
|
|
74
|
-
name: string;
|
|
75
|
-
logoURI: string;
|
|
76
|
-
url: string;
|
|
77
|
-
description: string;
|
|
78
|
-
tags?: string[];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Configuration for a single staking option.
|
|
83
|
-
* Maps receipt tokens to their accepted input tokens.
|
|
84
|
-
*/
|
|
85
|
-
type StakingConfig = {
|
|
86
|
-
/** Unique identifier for this staking config */
|
|
87
|
-
id: string;
|
|
88
|
-
/** The token received when staking (e.g., sWBERA, siBERA) */
|
|
89
|
-
receiptToken: TokenWithMetadata;
|
|
90
|
-
/** Tokens that can be staked to receive the receipt token */
|
|
91
|
-
inputTokens: TokenWithMetadata[];
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
type IncentiveReward = {
|
|
95
|
-
tokenMetadata: Token | undefined;
|
|
96
|
-
tokenPrice: number;
|
|
97
|
-
tokenValue: number;
|
|
98
|
-
id: string;
|
|
99
|
-
dist_id: string;
|
|
100
|
-
token: string;
|
|
101
|
-
recipient: string;
|
|
102
|
-
formattedAmount: string;
|
|
103
|
-
amount: string;
|
|
104
|
-
merkle_proof: string[];
|
|
105
|
-
available_at: number;
|
|
106
|
-
};
|
|
107
|
-
interface IncentiveRewardChunksWithValidatorData {
|
|
108
|
-
validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
|
|
109
|
-
maxTimestamp: number | undefined;
|
|
110
|
-
minTimestamp: number | undefined;
|
|
111
|
-
totalValue: number;
|
|
112
|
-
tokenTotals: {
|
|
113
|
-
chainId: number;
|
|
114
|
-
address: Address;
|
|
115
|
-
amount: number;
|
|
116
|
-
value: number;
|
|
117
|
-
metadata: Token | undefined;
|
|
118
|
-
}[];
|
|
119
|
-
rewards: IncentiveReward[];
|
|
120
|
-
isCurrent: boolean;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
interface AggregatedTokenTotals {
|
|
124
|
-
address: Address;
|
|
125
|
-
amount: number;
|
|
126
|
-
value: number;
|
|
127
|
-
metadata: Token | undefined;
|
|
128
|
-
chainId: number;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
type ClaimedIncentives = Record<string, string>;
|
|
132
|
-
|
|
133
|
-
type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
134
|
-
|
|
135
|
-
interface UserVaultInfo {
|
|
136
|
-
balance: bigint;
|
|
137
|
-
delegatedBalance: bigint;
|
|
138
|
-
withdrawableBalance: bigint;
|
|
139
|
-
rewards: string;
|
|
140
|
-
percentage: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
type StakedBeraAsset = {
|
|
144
|
-
token: TokenWithMetadata;
|
|
145
|
-
/**
|
|
146
|
-
* Staking APR, or `undefined` when unavailable (e.g. the APR backend is
|
|
147
|
-
* down). `undefined` lets the UI render a "—" placeholder instead of a
|
|
148
|
-
* misleading "0%".
|
|
149
|
-
*/
|
|
150
|
-
apr: number | undefined;
|
|
151
|
-
stakedAmount: number;
|
|
152
|
-
/**
|
|
153
|
-
* USD value of the staked amount, or `undefined` when the token price is
|
|
154
|
-
* unavailable (e.g. the price backend is down). `undefined` lets the UI
|
|
155
|
-
* render a "—" placeholder instead of a misleading "$0.00".
|
|
156
|
-
*/
|
|
157
|
-
stakedAmountUsd: number | undefined;
|
|
158
|
-
earnedAmount: number;
|
|
159
|
-
/**
|
|
160
|
-
* USD value of the earned amount, or `undefined` when the token price is
|
|
161
|
-
* unavailable. See {@link stakedAmountUsd}.
|
|
162
|
-
*/
|
|
163
|
-
earnedAmountUsd: number | undefined;
|
|
164
|
-
isLoadingEarnings?: boolean;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export type { AutoclaimedIncentivesResponse as A, BribeBoostRewardProof as B, ClaimedIncentives as C, IncentiveReward as I, ProtocolMetadata as P, StakingConfig as S, UserVaultInfo as U, AutoclaimedIncentivesTxHashResponse as a, BribeBoostRewardItem as b, StakedBeraAsset as c, AggregatedTokenTotals as d, BribeBoostReward as e, BribeBoostValidatorApr as f, ClaimedIncentivesLocalState as g, IncentiveRewardChunksWithValidatorData as h };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A list of contract names that are not mapped in the devrel's contract mapping or that are generated by factories (e.g. RewardVault).
|
|
3
|
-
*/
|
|
4
|
-
declare enum ContractName {
|
|
5
|
-
ENSO_ROUTER = "enso.router",
|
|
6
|
-
POL_REWARD_VAULT = "pol.rewardVault",
|
|
7
|
-
POL_REWARD_VAULT_HELPER = "pol.rewardVaultHelper",
|
|
8
|
-
BEX_POOL = "bex.pool",
|
|
9
|
-
ERC20 = "others.erc20",
|
|
10
|
-
ERC4626 = "others.erc4626",
|
|
11
|
-
POL_STAKE_VAULT = "pol.stakeVault",
|
|
12
|
-
BEX_EXPLOITED_FUND_DISTRIBUTOR = "bex.exploitedFundDistributor",
|
|
13
|
-
TW_MINIMAL_ACCOUNT = "thirdweb.minimalAccount"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare enum TransactionActionType {
|
|
17
|
-
/**
|
|
18
|
-
* Used for testing purposes.
|
|
19
|
-
*/
|
|
20
|
-
TEST = "Test",
|
|
21
|
-
SEND = "Send tokens",
|
|
22
|
-
APPROVAL = "Approval",
|
|
23
|
-
SWAP = "Swap",
|
|
24
|
-
WRAP = "Wrap",
|
|
25
|
-
UNWRAP = "Unwrap",
|
|
26
|
-
CREATE_POOL = "Create Pool",
|
|
27
|
-
ADD_LIQUIDITY = "Add Liquidity",
|
|
28
|
-
WITHDRAW_LIQUIDITY = "Withdraw Liquidity",
|
|
29
|
-
DELEGATE = "Delegate",
|
|
30
|
-
REDELEGATE = "Redelegate",
|
|
31
|
-
QUEUE_BOOST = "Queue Boost",
|
|
32
|
-
ACTIVATE_BOOST = "Activate Boost",
|
|
33
|
-
QUEUE_UNBOOSTING_ALL = "Queue Drop Boost All",
|
|
34
|
-
UNBOOST = "Drop Boost",
|
|
35
|
-
QUEUE_UNBOOST = "Queue Drop Boost",
|
|
36
|
-
CANCEL_UNBOOST = "Cancel Drop Boost",
|
|
37
|
-
CANCEL_BOOST = "Cancel Boost",
|
|
38
|
-
UNBONDING = "Unbonding",
|
|
39
|
-
CANCEL_UNBONDING = "Cancel Unbonding",
|
|
40
|
-
SUBMIT_PROPOSAL = "Submit Proposal",
|
|
41
|
-
CANCEL_PROPOSAL = "Cancel Proposal",
|
|
42
|
-
EXECUTE_PROPOSAL = "Execute Proposal",
|
|
43
|
-
QUEUE_PROPOSAL = "Queue Proposal",
|
|
44
|
-
VOTE = "Vote",
|
|
45
|
-
MODIFY_REWARD_DURATION = "Change Reward Duration",
|
|
46
|
-
MODIFY_REWARD_RATE = "Change Reward Rate",
|
|
47
|
-
RESET_REWARD_MODE = "Reset Reward Mode",
|
|
48
|
-
CREATE_BRIBE = "Add Incentives",
|
|
49
|
-
CLAIMING_BRIBES = "Claiming Incentives",// claiming others
|
|
50
|
-
CLAIMING_REWARDS = "Claiming BGT",
|
|
51
|
-
CLAIM_ALL_REWARDS = "Claim All Rewards",
|
|
52
|
-
RECOVER_FUNDS = "Recover Bex Funds",
|
|
53
|
-
REDEEM_BGT = "Redeem BGT",
|
|
54
|
-
MINT_HONEY = "Mint Honey",
|
|
55
|
-
REDEEM_HONEY = "Redeem Honey",
|
|
56
|
-
SUPPLY = "Supply",
|
|
57
|
-
WITHDRAW = "Withdraw",
|
|
58
|
-
BORROW = "Borrow",
|
|
59
|
-
REPAY = "Repay",
|
|
60
|
-
STAKE = "Stake",
|
|
61
|
-
UNSTAKE = "Unstake",
|
|
62
|
-
ENSO_ROUTE = "Enso Route",
|
|
63
|
-
MARKET_LONG = "Market Long",
|
|
64
|
-
MARKET_SHORT = "Market Short",
|
|
65
|
-
LIMIT_LONG = "Limit Long",
|
|
66
|
-
LIMIT_SHORT = "Limit Short",
|
|
67
|
-
CANCEL_ORDER = "Cancel Order",
|
|
68
|
-
CANCEL_ALL_ORDERS = "Cancel All Orders",
|
|
69
|
-
EDIT_PERPS_ORDER = "Edit Perps Order",
|
|
70
|
-
DEPOSIT_HONEY = "Deposit Honey",
|
|
71
|
-
START_WITHDRAW_REQUEST = "Start Withdraw Request",
|
|
72
|
-
CANCEL_WITHDRAW_REQUEST = "Cancel Withdraw Request",
|
|
73
|
-
WITHDRAW_HONEY = "Withdraw Honey",
|
|
74
|
-
DELEGATE_OCT = "Delegate",
|
|
75
|
-
REVOKE_OCT = "Revoke",
|
|
76
|
-
REFER = "Refer",
|
|
77
|
-
CREATE_REWARDS_VAULT = "Create Reward Vault",
|
|
78
|
-
APPLYING_REWARD_ALLOCATION = "Apply Reward Allocation",
|
|
79
|
-
APPLYING_OPERATOR_CHANGE = "Apply Operator Change",
|
|
80
|
-
CANCELING_OPERATOR_CHANGE = "Cancel Operator Change",
|
|
81
|
-
REQUEST_OPERATOR_CHANGE = "Request Operator Change",
|
|
82
|
-
APPLYING_REWARD_ALLOCATOR_CHANGE = "Apply Reward Allocator Change",
|
|
83
|
-
APPLYING_COMMISSION_CHANGE = "Apply Commission Change",
|
|
84
|
-
BONDING_BERA = "Stake BERA",
|
|
85
|
-
ZAP_STAKE_BERA = "Zap Stake BERA",
|
|
86
|
-
UNBONDING_BERA = "Unstake BERA",
|
|
87
|
-
QUEUE_UNBONDING_BERA = "Queue Unstake BERA",
|
|
88
|
-
BEND_MARKET_REPAY_AND_WITHDRAW_COLLATERAL = "Bend Market Repay and Withdraw Collateral",
|
|
89
|
-
BEND_MARKET_SUPPLY_COLLATERAL_AND_BORROW = "Bend Market Supply Collateral and Borrow",
|
|
90
|
-
BEND_MARKET_MULTIPLY = "Bend Market Multiply",
|
|
91
|
-
BEND_MARKET_DEMULTIPLY = "Bend Market Demultiply",
|
|
92
|
-
BEND_VAULT_SUPPLY = "Bend Vault Supply",
|
|
93
|
-
BEND_VAULT_WITHDRAW = "Bend Vault Withdraw",
|
|
94
|
-
BEND_CURATOR_REALLOCATE = "Bend Curator Reallocate",
|
|
95
|
-
BEND_CURATOR_UPDATE_MARKET_SUPPLY_CAP = "Bend Curator Update Market Supply Cap",
|
|
96
|
-
BEND_CURATOR_REVOKE_PENDING_SUPPLY_CAP = "Bend Curator Revoke Pending Supply Cap",
|
|
97
|
-
BEND_CURATOR_ACCEPT_PENDING_SUPPLY_CAP = "Bend Curator Accept Pending Supply Cap",
|
|
98
|
-
BEND_CURATOR_UPDATE_SUPPLY_QUEUE = "Bend Curator Update Supply Queue",
|
|
99
|
-
BEND_CURATOR_UPDATE_WITHDRAW_QUEUE = "Bend Curator Update Withdraw Queue",
|
|
100
|
-
BEND_CURATOR_TRANSFER_OWNER = "Bend Curator Transfer Owner",
|
|
101
|
-
BEND_CURATOR_CHANGE_GUARDIAN = "Bend Curator Change Guardian",
|
|
102
|
-
BEND_CURATOR_SET_CURATOR = "Bend Curator Set Curator",
|
|
103
|
-
BEND_CURATOR_SET_ALLOCATOR = "Bend Curator Set Allocator"
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { ContractName as C, TransactionActionType as T };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
|
|
3
|
-
export interface BribeBoostReward {
|
|
4
|
-
token: string;
|
|
5
|
-
total_unclaimed: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface BribeBoostRewardItem {
|
|
9
|
-
rewards: BribeBoostReward[];
|
|
10
|
-
validator: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface BribeBoostRewardProof {
|
|
14
|
-
validator?: string;
|
|
15
|
-
pagination: {
|
|
16
|
-
next: number;
|
|
17
|
-
previous: number;
|
|
18
|
-
record_per_page: number;
|
|
19
|
-
current_page: number;
|
|
20
|
-
total_page: number;
|
|
21
|
-
};
|
|
22
|
-
rewards:
|
|
23
|
-
| {
|
|
24
|
-
id: string;
|
|
25
|
-
dist_id: string;
|
|
26
|
-
token: Address;
|
|
27
|
-
recipient: string;
|
|
28
|
-
amount: string;
|
|
29
|
-
merkle_proof: string[];
|
|
30
|
-
available_at: number;
|
|
31
|
-
}[]
|
|
32
|
-
| null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
|
|
36
|
-
// { [wallet]: { [validatorPubkey]: { [tokenAddress]: { amount } } } }
|
|
37
|
-
// `amount` is a stringified bigint in token base units. The backend now
|
|
38
|
-
// aggregates across validators under a single fake pubkey (`0x000…000`),
|
|
39
|
-
// so consumers can collapse the validator dimension blindly.
|
|
40
|
-
export type AutoclaimedIncentivesResponse = Record<
|
|
41
|
-
Address,
|
|
42
|
-
Record<Address, Record<Address, { amount: string }>>
|
|
43
|
-
>;
|
|
44
|
-
|
|
45
|
-
// Response shape of GET /api/v1/wallets/:wallet/autoclaimed/txhash: same
|
|
46
|
-
// nesting, but each token leaf is `{ txhash }`. Tokens still pending are
|
|
47
|
-
// simply absent — when a token from `/autoclaimed` has no entry here, the
|
|
48
|
-
// bot hasn't distributed it yet.
|
|
49
|
-
export type AutoclaimedIncentivesTxHashResponse = Record<
|
|
50
|
-
Address,
|
|
51
|
-
Record<Address, Record<Address, { txhash: string }>>
|
|
52
|
-
>;
|
|
53
|
-
|
|
54
|
-
export interface BribeBoostValidatorApr {
|
|
55
|
-
id: string;
|
|
56
|
-
boost_total_bgt: string;
|
|
57
|
-
rewards_total_usd: string;
|
|
58
|
-
daily_rate: string;
|
|
59
|
-
apr: string;
|
|
60
|
-
apy: string;
|
|
61
|
-
tokens: Address[]; // Confirm this type with backend real data
|
|
62
|
-
validator: string;
|
|
63
|
-
start_block: number;
|
|
64
|
-
end_block: number;
|
|
65
|
-
start_timestamp: number;
|
|
66
|
-
end_timestamp: number;
|
|
67
|
-
created_at: string;
|
|
68
|
-
updated_at: string;
|
|
69
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-COOuDNra.js';
|
|
3
|
-
|
|
4
|
-
interface IHoneySwapState {
|
|
5
|
-
actionType: "mint" | "redeem";
|
|
6
|
-
/**
|
|
7
|
-
* List of current collaterals
|
|
8
|
-
*/
|
|
9
|
-
collaterals: TokenWithOrder[];
|
|
10
|
-
fromAmount: string[];
|
|
11
|
-
toAmount: string[];
|
|
12
|
-
isBasketModeEnabled: boolean | undefined;
|
|
13
|
-
isTyping: boolean;
|
|
14
|
-
isSubmitting: boolean;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function reducer(state: IHoneySwapState, action: HoneySwapActions): IHoneySwapState;
|
|
18
|
-
declare function useHoneySwapState(): {
|
|
19
|
-
state: {
|
|
20
|
-
collaterals: TokenWithOrder[];
|
|
21
|
-
actionType: "mint" | "redeem";
|
|
22
|
-
fromAmount: string[];
|
|
23
|
-
toAmount: string[];
|
|
24
|
-
isBasketModeEnabled: boolean | undefined;
|
|
25
|
-
isTyping: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
};
|
|
29
|
-
dispatch: react.ActionDispatch<[action: HoneySwapActions]>;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { type IHoneySwapState as I, reducer as r, useHoneySwapState as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-COOuDNra.js';
|
|
3
|
-
|
|
4
|
-
interface IHoneySwapState {
|
|
5
|
-
actionType: "mint" | "redeem";
|
|
6
|
-
/**
|
|
7
|
-
* List of current collaterals
|
|
8
|
-
*/
|
|
9
|
-
collaterals: TokenWithOrder[];
|
|
10
|
-
fromAmount: string[];
|
|
11
|
-
toAmount: string[];
|
|
12
|
-
isBasketModeEnabled: boolean | undefined;
|
|
13
|
-
isTyping: boolean;
|
|
14
|
-
isSubmitting: boolean;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function reducer(state: IHoneySwapState, action: HoneySwapActions): IHoneySwapState;
|
|
18
|
-
declare const useHoneySwapState: () => {
|
|
19
|
-
state: {
|
|
20
|
-
collaterals: TokenWithOrder[];
|
|
21
|
-
actionType: "mint" | "redeem";
|
|
22
|
-
fromAmount: string[];
|
|
23
|
-
toAmount: string[];
|
|
24
|
-
isBasketModeEnabled: boolean | undefined;
|
|
25
|
-
isTyping: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
};
|
|
29
|
-
dispatch: react.ActionDispatch<[action: HoneySwapActions]>;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { type IHoneySwapState as I, reducer as r, useHoneySwapState as u };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatIncentivesTokenMap.d.ts","sourceRoot":"","sources":["../../src/utils/formatIncentivesTokenMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,oBAAoB,EAAE,GACjC,GAAG,CAAC,MAAM,CAAC,CAcb"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare enum LayerZeroMessageStatus {
|
|
2
|
-
INFLIGHT = "INFLIGHT",
|
|
3
|
-
DELIVERED = "DELIVERED",
|
|
4
|
-
FAILED = "FAILED"
|
|
5
|
-
}
|
|
6
|
-
export type LayerZeroMessage = {
|
|
7
|
-
srcUaAddress: string;
|
|
8
|
-
dstUaAddress: string;
|
|
9
|
-
srcChainId: number;
|
|
10
|
-
dstChainId: number;
|
|
11
|
-
dstTxHash?: string;
|
|
12
|
-
dstTxError?: string;
|
|
13
|
-
srcTxHash?: string;
|
|
14
|
-
srcBlockHash?: string;
|
|
15
|
-
srcBlockNumber?: string;
|
|
16
|
-
srcUaNonce: number;
|
|
17
|
-
status: LayerZeroMessageStatus;
|
|
18
|
-
};
|
|
19
|
-
export type LayerZeroDeliveredMessage = LayerZeroMessage & {
|
|
20
|
-
dstTxHash: string;
|
|
21
|
-
};
|
|
22
|
-
export type WaitForMessageReceivedOptions = {
|
|
23
|
-
pollInterval?: number;
|
|
24
|
-
timeout?: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Polls LayerZero scan API until the cross-chain message is delivered or fails.
|
|
28
|
-
* HTTP errors are silently retried until timeout.
|
|
29
|
-
*
|
|
30
|
-
* @param srcTxHash - The source transaction hash to track
|
|
31
|
-
* @param options - Configuration options
|
|
32
|
-
* @param options.pollInterval - Polling interval in ms (default: 3000)
|
|
33
|
-
* @param options.timeout - Timeout in ms (default: 600000 / 10 minutes)
|
|
34
|
-
* @returns The delivered message with destination tx hash
|
|
35
|
-
* @throws InvalidArgumentError if srcTxHash is missing
|
|
36
|
-
* @throws BeraError if message fails, times out, or multiple messages found
|
|
37
|
-
*/
|
|
38
|
-
export declare function waitForLayerZeroMessageReceived(srcTxHash: string, options?: WaitForMessageReceivedOptions): Promise<LayerZeroDeliveredMessage>;
|
|
39
|
-
//# sourceMappingURL=layerZeroScan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layerZeroScan.d.ts","sourceRoot":"","sources":["../../src/utils/layerZeroScan.ts"],"names":[],"mappings":"AAOA,oBAAY,sBAAsB;IAChC,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAoBF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,yBAAyB,CAAC,CAsDpC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { BundleAction } from "@ensofinance/sdk";
|
|
2
|
-
import { ethAddress, zeroAddress } from "viem";
|
|
3
|
-
|
|
4
|
-
import { assertAddress } from "../../errors/assert";
|
|
5
|
-
import type {
|
|
6
|
-
GetEnsoSwapBundleArgs,
|
|
7
|
-
GetZapTransactionResponse,
|
|
8
|
-
} from "../../types/enso";
|
|
9
|
-
import { getTransactionsFromBundle } from "./util";
|
|
10
|
-
|
|
11
|
-
export async function getEnsoSwapBundle({
|
|
12
|
-
fromAddress,
|
|
13
|
-
amountIn,
|
|
14
|
-
tokenIn,
|
|
15
|
-
tokenOut,
|
|
16
|
-
chainId,
|
|
17
|
-
ensoClient,
|
|
18
|
-
destinationChainId,
|
|
19
|
-
slippage,
|
|
20
|
-
publicClient,
|
|
21
|
-
}: GetEnsoSwapBundleArgs): Promise<GetZapTransactionResponse> {
|
|
22
|
-
assertAddress(fromAddress, "fromAddress");
|
|
23
|
-
|
|
24
|
-
if (tokenOut === zeroAddress) tokenOut = ethAddress;
|
|
25
|
-
|
|
26
|
-
const bundleAction: BundleAction = {
|
|
27
|
-
protocol: "enso",
|
|
28
|
-
action: "route",
|
|
29
|
-
args: {
|
|
30
|
-
tokenIn,
|
|
31
|
-
tokenOut,
|
|
32
|
-
amountIn,
|
|
33
|
-
slippage: slippage * 100, // Enso expects slippage in basis points
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* If the zap is cross chain, we need to add the destination chain id and the refund receiver.
|
|
38
|
-
*
|
|
39
|
-
* Enso still need to update the sdk types to support this.
|
|
40
|
-
*/
|
|
41
|
-
if (destinationChainId && destinationChainId !== chainId) {
|
|
42
|
-
bundleAction.args = {
|
|
43
|
-
...bundleAction.args,
|
|
44
|
-
destinationChainId: destinationChainId,
|
|
45
|
-
refundReceiver: fromAddress,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const bundle = await ensoClient.getBundleData(
|
|
50
|
-
{
|
|
51
|
-
fromAddress: fromAddress,
|
|
52
|
-
receiver: fromAddress,
|
|
53
|
-
spender: fromAddress,
|
|
54
|
-
chainId: chainId,
|
|
55
|
-
routingStrategy: "router",
|
|
56
|
-
},
|
|
57
|
-
[bundleAction],
|
|
58
|
-
);
|
|
59
|
-
const transactions = await getTransactionsFromBundle({
|
|
60
|
-
fromAddress,
|
|
61
|
-
amountIn,
|
|
62
|
-
tokenIn,
|
|
63
|
-
chainId,
|
|
64
|
-
ensoClient,
|
|
65
|
-
bundle,
|
|
66
|
-
publicClient,
|
|
67
|
-
});
|
|
68
|
-
return {
|
|
69
|
-
bundle,
|
|
70
|
-
transactions,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { PublicClient } from "viem";
|
|
2
|
-
|
|
3
|
-
import { bgtIncentiveDistributorAbi } from "@berachain/abis/pol/rewards/bgtIncentiveDistributor";
|
|
4
|
-
|
|
5
|
-
import { assertPublicClient } from "../../errors/assert";
|
|
6
|
-
import { parseBaseArgs } from "../../utils/parseBaseArgs";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Reads `paused()` on the BGT incentive distributor. Used to gate the
|
|
10
|
-
* autoclaim banner — when `true`, users can no longer self-claim and the
|
|
11
|
-
* bot is responsible for distributing incentives on their behalf.
|
|
12
|
-
*/
|
|
13
|
-
export async function getBgtIncentiveDistributorPaused({
|
|
14
|
-
publicClient,
|
|
15
|
-
...args
|
|
16
|
-
}: {
|
|
17
|
-
publicClient: PublicClient | undefined;
|
|
18
|
-
} & BeraJS.BaseFunctionArgs): Promise<boolean> {
|
|
19
|
-
assertPublicClient(publicClient);
|
|
20
|
-
|
|
21
|
-
const { config } = parseBaseArgs(args);
|
|
22
|
-
|
|
23
|
-
return publicClient.readContract({
|
|
24
|
-
address: config.pol.bgtIncentiveDistributor,
|
|
25
|
-
abi: bgtIncentiveDistributorAbi,
|
|
26
|
-
functionName: "paused",
|
|
27
|
-
});
|
|
28
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
|
|
3
|
-
import { BeraError } from "../../errors/BeraError";
|
|
4
|
-
import type { BribeBoostRewardProof } from "../../types/bribeBoost";
|
|
5
|
-
import { getErrorResponse } from "../../utils/getErrorResponse";
|
|
6
|
-
import { parseBaseArgs } from "../../utils/parseBaseArgs";
|
|
7
|
-
|
|
8
|
-
export async function getRewardProofsByValidator({
|
|
9
|
-
account,
|
|
10
|
-
validator,
|
|
11
|
-
page = 1,
|
|
12
|
-
perPage = 1000,
|
|
13
|
-
...args
|
|
14
|
-
}: {
|
|
15
|
-
account: Address;
|
|
16
|
-
validator: Address;
|
|
17
|
-
page?: number;
|
|
18
|
-
perPage?: number;
|
|
19
|
-
} & BeraJS.BaseFunctionArgs): Promise<BribeBoostRewardProof> {
|
|
20
|
-
const { config } = parseBaseArgs(args);
|
|
21
|
-
|
|
22
|
-
// We'll try to revalidate on the client side by using the cache: "no-store" and swrImmutable
|
|
23
|
-
// In the future, we can look at using cache and tags to invalidate the cache on the server side to prevent stale data
|
|
24
|
-
const result = await fetch(
|
|
25
|
-
`${
|
|
26
|
-
config.pol.bribeBoostApi
|
|
27
|
-
}/api/v1/wallets/${account.toLowerCase()}/proofs/validator/${validator.toLowerCase()}?page=${page}&per_page=${perPage}`,
|
|
28
|
-
{
|
|
29
|
-
cache: "no-store",
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
if (!result.ok) {
|
|
34
|
-
const error = await getErrorResponse(result);
|
|
35
|
-
throw new BeraError({
|
|
36
|
-
message: "Failed to fetch proofs on server",
|
|
37
|
-
cause: {
|
|
38
|
-
error,
|
|
39
|
-
result: result,
|
|
40
|
-
account,
|
|
41
|
-
validator,
|
|
42
|
-
},
|
|
43
|
-
reason: error?.reason,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const data = await result.json();
|
|
48
|
-
return data;
|
|
49
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GetSWberaVaultMetadata,
|
|
3
|
-
type GetSWberaVaultMetadataQuery,
|
|
4
|
-
type GetSWberaVaultMetadataQueryVariables,
|
|
5
|
-
type GqlChain,
|
|
6
|
-
GqlSWberaVaultMetadataResolution,
|
|
7
|
-
} from "@berachain/graphql/pol/api";
|
|
8
|
-
|
|
9
|
-
import { parseBaseArgs } from "../../utils/parseBaseArgs";
|
|
10
|
-
import { getApolloClient } from "../clients/getApolloClient";
|
|
11
|
-
|
|
12
|
-
function getResolution(window: "DAY" | "WEEK") {
|
|
13
|
-
if (window === "DAY") {
|
|
14
|
-
return GqlSWberaVaultMetadataResolution.OneDay;
|
|
15
|
-
}
|
|
16
|
-
return GqlSWberaVaultMetadataResolution.SevenDays;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @throws {Error} If the vault is not found
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
export async function getStakedBeraAPR({
|
|
25
|
-
window,
|
|
26
|
-
...args
|
|
27
|
-
}: {
|
|
28
|
-
/**
|
|
29
|
-
* APR might vary depending on the annualized time window (day or week)
|
|
30
|
-
*/
|
|
31
|
-
window: "DAY" | "WEEK";
|
|
32
|
-
} & BeraJS.BaseFunctionArgs): Promise<number> {
|
|
33
|
-
const { config } = parseBaseArgs(args);
|
|
34
|
-
|
|
35
|
-
const bexApiGraphqlClient = getApolloClient("api", args);
|
|
36
|
-
|
|
37
|
-
try {
|
|
38
|
-
const data = await bexApiGraphqlClient.query<
|
|
39
|
-
GetSWberaVaultMetadataQuery,
|
|
40
|
-
GetSWberaVaultMetadataQueryVariables
|
|
41
|
-
>({
|
|
42
|
-
query: GetSWberaVaultMetadata,
|
|
43
|
-
variables: {
|
|
44
|
-
chain: config.bex.chainName as GqlChain,
|
|
45
|
-
resolution: getResolution(window ?? "DAY"),
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const { apr } = data.data.polGetSWberaVaultMetadata;
|
|
50
|
-
|
|
51
|
-
return Number(apr);
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error("Failed to get SW Bera APR", error);
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
}
|