@berachain/berajs 0.1.2 → 0.2.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/{BeraError-D1HS_rbb.d.cts → BeraError-_mQdkanr.d.cts} +35 -10
- package/dist/{BeraError-D1HS_rbb.d.ts → BeraError-_mQdkanr.d.ts} +35 -10
- package/dist/HoneyConfigProvider-CK6mOKFH.d.ts +390 -0
- package/dist/HoneyConfigProvider-Ca3ouozs.d.cts +390 -0
- package/dist/{RequestError-D8AE6xnI.d.cts → RequestError-A8XJ6QR9.d.cts} +1 -1
- package/dist/{RequestError-m4jxyM7D.d.ts → RequestError-Dk97z8rm.d.ts} +1 -1
- package/dist/abi/exports.cjs +2 -0
- package/dist/abi/exports.cjs.map +1 -0
- package/dist/abi/{index.d.cts → exports.d.cts} +12369 -9122
- package/dist/abi/{index.d.ts → exports.d.ts} +12369 -9122
- package/dist/abi/exports.mjs +2 -0
- package/dist/abi/exports.mjs.map +1 -0
- package/dist/actions/exports.cjs +2 -0
- package/dist/actions/exports.cjs.map +1 -0
- package/dist/actions/{index.d.cts → exports.d.cts} +80 -107
- package/dist/actions/{index.d.ts → exports.d.ts} +80 -107
- package/dist/actions/exports.mjs +2 -0
- package/dist/actions/exports.mjs.map +1 -0
- package/dist/chunk-575OK77P.mjs +2 -0
- package/dist/chunk-575OK77P.mjs.map +1 -0
- package/dist/chunk-7GWTHOLO.mjs +2 -0
- package/dist/chunk-7GWTHOLO.mjs.map +1 -0
- package/dist/chunk-7SC4VD3U.cjs +2 -0
- package/dist/chunk-7SC4VD3U.cjs.map +1 -0
- package/dist/chunk-BHNQX4XC.mjs +2 -0
- package/dist/chunk-BHNQX4XC.mjs.map +1 -0
- package/dist/chunk-BOYZVULX.cjs +2 -0
- package/dist/chunk-BOYZVULX.cjs.map +1 -0
- package/dist/chunk-C3FHGFLK.mjs +2 -0
- package/dist/chunk-C3FHGFLK.mjs.map +1 -0
- package/dist/chunk-C3G5KXCH.mjs +2 -0
- package/dist/chunk-C3G5KXCH.mjs.map +1 -0
- package/dist/chunk-CYKCYPFR.cjs +2 -0
- package/dist/chunk-CYKCYPFR.cjs.map +1 -0
- package/dist/chunk-F4BKSBEM.mjs +2 -0
- package/dist/chunk-F4BKSBEM.mjs.map +1 -0
- package/dist/chunk-FL2N3XHK.cjs +2 -0
- package/dist/chunk-FL2N3XHK.cjs.map +1 -0
- package/dist/chunk-G6NA6NSM.mjs +4 -0
- package/dist/chunk-G6NA6NSM.mjs.map +1 -0
- package/dist/chunk-H2QSRMVS.mjs +2 -0
- package/dist/chunk-H2QSRMVS.mjs.map +1 -0
- package/dist/chunk-IJM76AWK.cjs +4 -0
- package/dist/chunk-IJM76AWK.cjs.map +1 -0
- package/dist/chunk-MTS5SZLA.mjs +2 -0
- package/dist/chunk-MTS5SZLA.mjs.map +1 -0
- package/dist/chunk-MUNAP5TM.cjs +2 -0
- package/dist/chunk-MUNAP5TM.cjs.map +1 -0
- package/dist/chunk-NAXAZJJY.mjs +2 -0
- package/dist/chunk-NAXAZJJY.mjs.map +1 -0
- package/dist/chunk-OGJMSGB2.mjs +2 -0
- package/dist/chunk-OGJMSGB2.mjs.map +1 -0
- package/dist/chunk-OIYXOKTT.cjs +2 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -0
- package/dist/chunk-OS5AJMYJ.cjs +2 -0
- package/dist/chunk-OS5AJMYJ.cjs.map +1 -0
- package/dist/chunk-Q3SCM6WL.mjs +2 -0
- package/dist/chunk-Q3SCM6WL.mjs.map +1 -0
- package/dist/chunk-SWMJQOH6.cjs +2 -0
- package/dist/chunk-SWMJQOH6.cjs.map +1 -0
- package/dist/chunk-TEBJWAVU.mjs +2 -0
- package/dist/chunk-TEBJWAVU.mjs.map +1 -0
- package/dist/chunk-TJWKS54T.mjs +2 -0
- package/dist/chunk-TJWKS54T.mjs.map +1 -0
- package/dist/chunk-UQUWMHVF.cjs +2 -0
- package/dist/chunk-UQUWMHVF.cjs.map +1 -0
- package/dist/chunk-UXUWSRVV.cjs +2 -0
- package/dist/chunk-UXUWSRVV.cjs.map +1 -0
- package/dist/chunk-VP7XUOSI.cjs +2 -0
- package/dist/chunk-VP7XUOSI.cjs.map +1 -0
- package/dist/chunk-VXL2ZZ4X.cjs +2 -0
- package/dist/chunk-VXL2ZZ4X.cjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs +2 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -0
- package/dist/chunk-WTCBORPB.cjs +2 -0
- package/dist/chunk-WTCBORPB.cjs.map +1 -0
- package/dist/chunk-XNJLSA6P.cjs +2 -0
- package/dist/chunk-XNJLSA6P.cjs.map +1 -0
- package/dist/chunk-YQGZMWDT.mjs +2 -0
- package/dist/chunk-YQGZMWDT.mjs.map +1 -0
- package/dist/chunk-YXLFOEZN.mjs +2 -0
- package/dist/chunk-YXLFOEZN.mjs.map +1 -0
- package/dist/chunk-ZAKA4TGK.cjs +2 -0
- package/dist/chunk-ZAKA4TGK.cjs.map +1 -0
- package/dist/chunk-ZQRACIGR.mjs +2 -0
- package/dist/chunk-ZQRACIGR.mjs.map +1 -0
- package/dist/contexts/exports.cjs +2 -0
- package/dist/contexts/exports.cjs.map +1 -0
- package/dist/contexts/{index.d.ts → exports.d.cts} +19 -28
- package/dist/contexts/{index.d.cts → exports.d.ts} +19 -28
- package/dist/contexts/exports.mjs +2 -0
- package/dist/contexts/exports.mjs.map +1 -0
- package/dist/contracts-CQIPk0Jc.d.cts +74 -0
- package/dist/contracts-CQIPk0Jc.d.ts +74 -0
- package/dist/{defaultFlags-V-tJs2K8.d.cts → defaultFlags-d0kPbT0i.d.cts} +1 -1
- package/dist/{defaultFlags-V-tJs2K8.d.ts → defaultFlags-d0kPbT0i.d.ts} +1 -1
- package/dist/dex-C_BB0b0O.d.cts +37 -0
- package/dist/dex-C_BB0b0O.d.ts +37 -0
- package/dist/enum/exports.cjs +2 -0
- package/dist/enum/exports.cjs.map +1 -0
- package/dist/enum/exports.d.cts +24 -0
- package/dist/enum/exports.d.ts +24 -0
- package/dist/enum/exports.mjs +2 -0
- package/dist/enum/exports.mjs.map +1 -0
- package/dist/errors/exports.cjs +2 -0
- package/dist/errors/exports.cjs.map +1 -0
- package/dist/errors/exports.d.cts +385 -0
- package/dist/errors/exports.d.ts +385 -0
- package/dist/errors/exports.mjs +2 -0
- package/dist/{getValidatorQueuedOperatorAddress-9xY2RUGe.d.cts → getValidatorQueuedOperatorAddress-BX35p2Lv.d.ts} +125 -15
- package/dist/{getValidatorQueuedOperatorAddress-Ne2zoiiV.d.ts → getValidatorQueuedOperatorAddress-It0GsdvQ.d.cts} +125 -15
- package/dist/global.d-Ba-NIojH.d.cts +474 -0
- package/dist/global.d-By70bEv2.d.ts +474 -0
- package/dist/honey-CYm0RWf4.d.cts +14 -0
- package/dist/honey-CYm0RWf4.d.ts +14 -0
- package/dist/hooks/exports.cjs +4 -0
- package/dist/hooks/exports.cjs.map +1 -0
- package/dist/hooks/{index.d.cts → exports.d.cts} +223 -173
- package/dist/hooks/{index.d.ts → exports.d.ts} +223 -173
- package/dist/hooks/exports.mjs +4 -0
- package/dist/hooks/exports.mjs.map +1 -0
- package/dist/{BexStatusProvider-nS3NcdxI.d.cts → transactionStore-BvStaXf3.d.ts} +41 -1
- package/dist/{BexStatusProvider-nS3NcdxI.d.ts → transactionStore-CQrGYSY2.d.cts} +41 -1
- package/dist/{txnEnum-BQKDfaeH.d.cts → txnEnum-BYNbCxla.d.cts} +1 -0
- package/dist/{txnEnum-BQKDfaeH.d.ts → txnEnum-BYNbCxla.d.ts} +1 -0
- package/dist/types/exports.cjs +1 -0
- package/dist/types/exports.cjs.map +1 -0
- package/dist/types/exports.d.cts +58 -0
- package/dist/types/exports.d.ts +58 -0
- package/dist/types/exports.mjs +1 -0
- package/dist/{useHoneySwapState-C-9BV4VB.d.cts → useHoneySwapState-B-vmIP1b.d.cts} +1 -1
- package/dist/{useHoneySwapState-CUY5Sm1b.d.ts → useHoneySwapState-D1DKG_Of.d.ts} +1 -1
- package/dist/utils/exports.cjs +2 -0
- package/dist/utils/exports.cjs.map +1 -0
- package/dist/utils/{index.d.cts → exports.d.cts} +83 -20
- package/dist/utils/{index.d.ts → exports.d.ts} +83 -20
- package/dist/utils/exports.mjs +2 -0
- package/dist/utils/exports.mjs.map +1 -0
- package/package.json +16 -17
- package/src/abi/{index.ts → exports.ts} +3 -0
- package/src/abi/pol/LSTStakerVault.ts +2032 -0
- package/src/abi/utils/openChainErrors.ts +71 -30
- package/src/abi/utils/thirdwebMinimalAccount.ts +616 -0
- package/src/actions/clients/BeraApolloClient.ts +8 -6
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +2 -5
- package/src/actions/dex/aggregators/base.ts +74 -16
- package/src/actions/dex/aggregators/bex.ts +54 -74
- package/src/actions/dex/aggregators/bgt.ts +31 -8
- package/src/actions/dex/aggregators/{enso.ts → enso/enso.ts} +18 -14
- package/src/actions/dex/aggregators/enso/ensoErc4626.debug.test.ts +37 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +176 -0
- package/src/actions/dex/aggregators/erc4626.ts +122 -0
- package/src/actions/dex/aggregators/fly.ts +59 -53
- package/src/actions/dex/aggregators/haiku.ts +52 -54
- package/src/actions/dex/aggregators/honey.ts +54 -45
- package/src/actions/dex/aggregators/kyberswap.ts +41 -39
- package/src/actions/dex/aggregators/oogabooga.ts +47 -46
- package/src/actions/dex/aggregators/openOcean.ts +51 -46
- package/src/actions/dex/aggregators/wbera.ts +54 -42
- package/src/actions/dex/b-sdk.ts +5 -2
- package/src/actions/dex/getIsTokenExploited.ts +2 -2
- package/src/actions/enso/{zap.ts → getEnsoSwapBundle.ts} +4 -5
- package/src/actions/enso/getEnsoUserTokensWithBalances.debug.test.ts +73 -0
- package/src/actions/enso/{getEnsoUserToken.ts → getEnsoUserTokensWithBalances.ts} +42 -30
- package/src/actions/enso/util.ts +1 -1
- package/src/actions/{index.ts → exports.ts} +5 -0
- package/src/actions/governance/__tests__/checkProposalField.unit.test.ts +1 -1
- package/src/actions/governance/__tests__/getQuorum.integration.test.ts +1 -1
- package/src/actions/governance/checkProposalField.ts +1 -1
- package/src/actions/governance/computeActualStatus.ts +1 -1
- package/src/actions/governance/getBodyErrors.ts +1 -1
- package/src/actions/governance/getDecodedFunctionData.ts +1 -4
- package/src/actions/governance/getProposalDetails.ts +2 -2
- package/src/actions/governance/getProposalFromTx.ts +1 -2
- package/src/actions/governance/getProposalParams.ts +7 -8
- package/src/actions/governance/getQuorum.ts +1 -2
- package/src/actions/honey/getCollateralWeights.ts +1 -1
- package/src/actions/honey/getHoneyCollaterals.ts +1 -0
- package/src/actions/honey/getHoneyVaultsBalance.ts +51 -55
- package/src/actions/honey/getSwapPayload.ts +37 -35
- package/src/actions/honey/tests/pyth.integration.test.ts +0 -1
- package/src/actions/pol/__tests__/getAllValidators.integration.test.ts +1 -1
- package/src/actions/pol/getEarnedStakedBeraVault.ts +31 -0
- package/src/actions/pol/getGlobalData.ts +14 -13
- package/src/actions/pol/getLSTStakeConfig.ts +67 -0
- package/src/actions/pol/getMarkets.ts +1 -1
- package/src/actions/pol/getRewardProofsByValidator.ts +1 -1
- package/src/actions/pol/getRewardVaultIncentives.ts +3 -5
- package/src/actions/pol/getRewardVaults.ts +2 -3
- package/src/actions/pol/getSWBeraVaultMetadata.ts +7 -5
- package/src/actions/pol/getSWBeraWithdrawal.ts +41 -27
- package/src/actions/pol/getStakeWithdrawalCooldown.ts +5 -7
- package/src/actions/pol/getStakingDailyAssets.ts +21 -0
- package/src/actions/pol/getStakingTokenInformation.ts +3 -4
- package/src/actions/pol/getTotalStakedAmount.ts +47 -0
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaults.ts +8 -6
- package/src/actions/pol/getUserVaultsBalance.ts +4 -16
- package/src/actions/prices/getTokenCurrentPrices.ts +8 -3
- package/src/actions/tokens/getAllowances.ts +68 -41
- package/src/actions/tokens/getTokenInformation.ts +4 -1
- package/src/actions/tokens/getTokens.ts +1 -1
- package/src/actions/tokens/getUnderlyingToken.ts +53 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +53 -14
- package/src/actions/tokens/getWalletBalances.ts +69 -43
- package/src/actions/transactions/beraWriteContract.integration.test.ts +18 -6
- package/src/actions/transactions/beraWriteContract.ts +3 -3
- package/src/actions/validators/getUserActiveValidators.ts +2 -3
- package/src/actions/validators/getUserBoostsOnValidator.ts +2 -3
- package/src/contexts/BeraFlags/defaultFlags.ts +4 -0
- package/src/contexts/SwrFallback.tsx +13 -3
- package/src/contexts/TokensProvider.tsx +35 -8
- package/src/{hooks/transactions → contexts}/TransactionStoreContext.tsx +32 -4
- package/src/contexts/block-time-provider.tsx +1 -1
- package/src/contexts/{index.ts → exports.ts} +1 -1
- package/src/data/contracts.ts +16 -1
- package/src/enum/contracts.ts +13 -0
- package/src/enum/dex.ts +29 -0
- package/src/enum/{index.ts → exports.ts} +3 -0
- package/src/enum/governance.ts +61 -0
- package/src/enum/honey.ts +12 -0
- package/src/enum/txnEnum.ts +1 -0
- package/src/errors/BeraError.ts +50 -11
- package/src/errors/BeraMonitoring.ts +66 -0
- package/src/errors/BeraTracing.ts +79 -0
- package/src/errors/BeraTracing.unit.test.ts +198 -0
- package/src/errors/RequestError.ts +2 -2
- package/src/errors/assert.ts +4 -2
- package/src/errors/assert.unit.test.ts +6 -2
- package/src/errors/errorMap.ts +16 -6
- package/src/errors/{index.ts → exports.ts} +7 -0
- package/src/errors/getErrorMessage.ts +22 -3
- package/src/errors/getRevertReason.integration.test.ts +17 -5
- package/src/errors/getRevertReason.ts +41 -2
- package/src/errors/initBeraError.ts +52 -7
- package/src/errors/parseViemError.ts +114 -27
- package/src/errors/severity.ts +12 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -2
- package/src/hooks/dex/useAggregatorsQuotes.ts +126 -365
- package/src/hooks/dex/useAllUserPools.ts +1 -1
- package/src/hooks/dex/useApiPool.ts +1 -1
- package/src/hooks/dex/useCreatePool.ts +6 -5
- package/src/hooks/dex/useExploitedTokens.ts +1 -1
- package/src/hooks/dex/useLiquidityMismatch.ts +2 -5
- package/src/hooks/dex/useLpPosition.ts +21 -20
- package/src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts +40 -29
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +1 -1
- package/src/hooks/dex/usePoolEvents.ts +1 -1
- package/src/hooks/dex/usePools.ts +1 -1
- package/src/hooks/dex/usePriceImpact.ts +40 -0
- package/src/hooks/dex/useSingleAggregatorQuote.ts +350 -0
- package/src/hooks/enso/useBendZapSupply.ts +216 -0
- package/src/hooks/enso/useEnsoSwapBundle.ts +107 -0
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +43 -0
- package/src/hooks/enso/useZapStakeBera.ts +113 -0
- package/src/hooks/{index.ts → exports.ts} +18 -7
- package/src/hooks/governance/useCreateProposal.ts +8 -8
- package/src/hooks/governance/usePollAllProposals.ts +1 -1
- package/src/hooks/governance/usePollProposal.ts +1 -1
- package/src/hooks/governance/usePollProposalThreshold.ts +1 -1
- package/src/hooks/governance/usePollUserDelegates.ts +1 -1
- package/src/hooks/governance/useProposalState.ts +2 -2
- package/src/hooks/honey/useCappedGlobally.ts +2 -1
- package/src/hooks/honey/useCappedRelatively.ts +1 -1
- package/src/hooks/honey/useCollateralWeights.ts +2 -1
- package/src/hooks/honey/useHoneyAlerts.ts +11 -11
- package/src/hooks/honey/useHoneyBalances.ts +7 -3
- package/src/hooks/honey/useHoneyGlobalData.ts +2 -1
- package/src/hooks/honey/useHoneySwapState.ts +2 -1
- package/src/hooks/honey/useHoneyVaultsBalance.ts +1 -1
- package/src/hooks/honey/useIsBadCollateralAsset.ts +2 -1
- package/src/hooks/honey/useIsBasketModeEnabled.ts +1 -1
- package/src/hooks/honey/usePythLatestPrices.ts +1 -1
- package/src/hooks/pol/useOnChainRewardVault.ts +3 -2
- package/src/hooks/pol/usePollGlobalData.ts +1 -1
- package/src/hooks/pol/usePollMarkets.ts +1 -1
- package/src/hooks/pol/useQueuedBeraUnlock.ts +17 -15
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +6 -3
- package/src/hooks/pol/useRewardVault.ts +1 -1
- package/src/hooks/pol/useRewardVaults.ts +1 -1
- package/src/hooks/pol/useSWBeraVaultMetadata.ts +35 -0
- package/src/hooks/pol/useStakedAPR.ts +38 -0
- package/src/hooks/pol/useStakedData.ts +117 -0
- package/src/hooks/pol/useStakedSnapshots.ts +52 -0
- package/src/hooks/pol/useTotalStakedAmount.ts +30 -0
- package/src/hooks/pol/useUserVaultInfo.ts +1 -1
- package/src/hooks/pol/useVaultValidators.ts +1 -1
- package/src/hooks/tokens/useMultipleTokenInformation.ts +15 -6
- package/src/hooks/tokens/usePollAllowances.ts +15 -19
- package/src/hooks/tokens/usePollBalance.ts +8 -4
- package/src/hooks/tokens/usePollWalletBalances.ts +14 -11
- package/src/hooks/tokens/useStakingTokenInformation.ts +2 -1
- package/src/hooks/tokens/useTokenCurrentPrice.ts +4 -2
- package/src/hooks/tokens/useTokenCurrentPrices.ts +92 -13
- package/src/hooks/tokens/useTokenInformation.ts +11 -6
- package/src/hooks/tokens/useTokenPrice.ts +21 -0
- package/src/hooks/tokens/useTokenPrices.ts +133 -0
- package/src/hooks/tokens/useTokens.ts +1 -0
- package/src/hooks/tokens/useUnderlyingAsset.ts +23 -0
- package/src/hooks/transactions/transactionStore.ts +86 -65
- package/src/hooks/transactions/transactionStore.unit.test.ts +54 -1
- package/src/hooks/transactions/useAddRecentTransaction.ts +1 -1
- package/src/hooks/transactions/useRecentTransactions.ts +1 -1
- package/src/hooks/transactions/useSetTransactionStatus.ts +31 -0
- package/src/hooks/useContractWrite/useBeraContractWrite.ts +2 -1
- package/src/hooks/validators/useAllValidators.ts +1 -1
- package/src/hooks/validators/useApiValidator.ts +1 -1
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +1 -1
- package/src/hooks/validators/useManagedValidatorByAccount.ts +1 -1
- package/src/hooks/validators/useManagedValidatorRole.ts +1 -1
- package/src/hooks/validators/useOnChainValidator.ts +1 -1
- package/src/hooks/validators/useStakingPoolBatch.ts +1 -1
- package/src/hooks/validators/useUserActiveValidators.ts +1 -1
- package/src/hooks/validators/useUserBoostsOnValidator.ts +1 -1
- package/src/hooks/validators/useUserClaimableIncentives.ts +8 -8
- package/src/hooks/validators/useValidator.ts +1 -1
- package/src/hooks/validators/useValidatorAnalytics.ts +1 -1
- package/src/hooks/validators/useValidatorCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/src/types/{dex.ts → dex.d.ts} +96 -67
- package/src/types/{enso.ts → enso.d.ts} +1 -1
- package/src/types/exports.ts +8 -0
- package/src/types/{global.ts → global.d.ts} +1 -30
- package/src/types/{governance.ts → governance.d.ts} +2 -64
- package/src/types/{honeySwap.ts → honeySwap.d.ts} +1 -13
- package/src/types/{pol.ts → pol.d.ts} +12 -1
- package/src/types/staking.d.ts +22 -0
- package/src/utils/createEmitter.ts +122 -0
- package/src/utils/createEmitter.unit.test.ts +149 -0
- package/src/utils/{index.ts → exports.ts} +3 -2
- package/src/utils/filter.ts +34 -0
- package/src/utils/formatNumber.ts +1 -1
- package/src/utils/formatNumber.unit.test.ts +2 -1
- package/src/utils/formatTokenList.ts +4 -10
- package/src/utils/getHoneySwapMessage.test.ts +1 -2
- package/src/utils/getServerSideClient.ts +4 -5
- package/src/utils/isDifferenceExceedingThreshold.ts +1 -1
- package/src/utils/layerZeroScan.ts +122 -0
- package/src/utils/math.ts +1 -1
- package/src/utils/parseWhiskToken.ts +15 -0
- package/src/utils/poolNamings.ts +1 -1
- package/src/utils/tokens.ts +23 -7
- package/dist/HoneyConfigProvider-6PXZJMSU.d.cts +0 -562
- package/dist/HoneyConfigProvider-CwDFrt02.d.ts +0 -562
- package/dist/abi/index.cjs +0 -2
- package/dist/abi/index.cjs.map +0 -1
- package/dist/abi/index.mjs +0 -2
- package/dist/actions/index.cjs +0 -2
- package/dist/actions/index.cjs.map +0 -1
- package/dist/actions/index.mjs +0 -2
- package/dist/aggregatorsRouter-Cny4B_MB.d.cts +0 -593
- package/dist/aggregatorsRouter-Cny4B_MB.d.ts +0 -593
- package/dist/chunk-22MQVFHP.cjs +0 -2
- package/dist/chunk-22MQVFHP.cjs.map +0 -1
- package/dist/chunk-3TKSVFZ3.mjs +0 -2
- package/dist/chunk-3TKSVFZ3.mjs.map +0 -1
- package/dist/chunk-6VF3RF53.cjs +0 -3
- package/dist/chunk-6VF3RF53.cjs.map +0 -1
- package/dist/chunk-6W22TFYA.mjs +0 -2
- package/dist/chunk-6W22TFYA.mjs.map +0 -1
- package/dist/chunk-AMRJ4B36.mjs +0 -2
- package/dist/chunk-AMRJ4B36.mjs.map +0 -1
- package/dist/chunk-DS2ZDVKU.mjs +0 -2
- package/dist/chunk-DS2ZDVKU.mjs.map +0 -1
- package/dist/chunk-ED43NYSE.cjs +0 -2
- package/dist/chunk-ED43NYSE.cjs.map +0 -1
- package/dist/chunk-EU4WFADK.cjs +0 -2
- package/dist/chunk-EU4WFADK.cjs.map +0 -1
- package/dist/chunk-HCTFDGXL.mjs +0 -2
- package/dist/chunk-HCTFDGXL.mjs.map +0 -1
- package/dist/chunk-IOSYBHKU.mjs +0 -2
- package/dist/chunk-IOSYBHKU.mjs.map +0 -1
- package/dist/chunk-JMKLDDKY.cjs +0 -2
- package/dist/chunk-JMKLDDKY.cjs.map +0 -1
- package/dist/chunk-KMKUXP2S.mjs +0 -3
- package/dist/chunk-KMKUXP2S.mjs.map +0 -1
- package/dist/chunk-OJXJ6CZ4.mjs +0 -4
- package/dist/chunk-OJXJ6CZ4.mjs.map +0 -1
- package/dist/chunk-PHIOKO3A.mjs +0 -2
- package/dist/chunk-PHIOKO3A.mjs.map +0 -1
- package/dist/chunk-QCK474XD.cjs +0 -2
- package/dist/chunk-QCK474XD.cjs.map +0 -1
- package/dist/chunk-REDXXUK7.cjs +0 -2
- package/dist/chunk-REDXXUK7.cjs.map +0 -1
- package/dist/chunk-S74ZMG2G.cjs +0 -2
- package/dist/chunk-S74ZMG2G.cjs.map +0 -1
- package/dist/chunk-TOAXF4YW.cjs +0 -2
- package/dist/chunk-TOAXF4YW.cjs.map +0 -1
- package/dist/chunk-UZ5CB33M.cjs +0 -2
- package/dist/chunk-UZ5CB33M.cjs.map +0 -1
- package/dist/chunk-VYWYJR63.mjs +0 -2
- package/dist/chunk-VYWYJR63.mjs.map +0 -1
- package/dist/chunk-XFPTQMAK.cjs +0 -4
- package/dist/chunk-XFPTQMAK.cjs.map +0 -1
- package/dist/chunk-YK4NINF5.mjs +0 -2
- package/dist/chunk-YK4NINF5.mjs.map +0 -1
- package/dist/contexts/index.cjs +0 -2
- package/dist/contexts/index.cjs.map +0 -1
- package/dist/contexts/index.mjs +0 -2
- package/dist/contexts/index.mjs.map +0 -1
- package/dist/enum/index.cjs +0 -2
- package/dist/enum/index.cjs.map +0 -1
- package/dist/enum/index.d.cts +0 -31
- package/dist/enum/index.d.ts +0 -31
- package/dist/enum/index.mjs +0 -2
- package/dist/enum/index.mjs.map +0 -1
- package/dist/errors/index.cjs +0 -2
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.d.cts +0 -204
- package/dist/errors/index.d.ts +0 -204
- package/dist/errors/index.mjs +0 -2
- package/dist/errors/index.mjs.map +0 -1
- package/dist/hooks/index.cjs +0 -4
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.mjs +0 -4
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/staking-F9Nx9TKD.d.ts +0 -246
- package/dist/staking-f4BpYH7l.d.cts +0 -246
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -56
- package/dist/types/index.d.ts +0 -56
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -2
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.mjs +0 -2
- package/dist/utils/index.mjs.map +0 -1
- package/src/actions/dex/getTransactionCount.ts +0 -29
- package/src/actions/enso/bend.ts +0 -143
- package/src/actions/enso/getEnsoUserToken.debug.test.ts +0 -57
- package/src/contexts/berajsProvider/context.tsx +0 -49
- package/src/contexts/berajsProvider/index.ts +0 -2
- package/src/contexts/berajsProvider/useBeraJs.ts +0 -18
- package/src/hooks/dex/usePollVaultIsPaused.ts +0 -30
- package/src/hooks/enso/useBendTransactionRequests.ts +0 -247
- package/src/hooks/enso/useEnsoZap.ts +0 -166
- package/src/hooks/enso/useZapTransactionRequests.ts +0 -81
- package/src/hooks/pol/useEarnedStakedBeraVault.ts +0 -59
- package/src/hooks/pol/useStakedBeraSnapshots.ts +0 -27
- package/src/hooks/validators/validatorRoleManager.ts +0 -0
- package/src/types/index.ts +0 -8
- package/src/types/staking.ts +0 -7
- package/src/utils/formatAggregatorsQuotes.ts +0 -57
- package/src/utils/formatAggregatorsQuotes.unit.test.ts +0 -191
- package/src/utils/sentryBeforeSend.ts +0 -52
- /package/dist/{abi/index.mjs.map → errors/exports.mjs.map} +0 -0
- /package/dist/{actions/index.mjs.map → types/exports.mjs.map} +0 -0
- /package/src/actions/dex/{__tests__ → aggregators}/haiku.integration.test.ts +0 -0
- /package/src/types/{bribe-boost.ts → bribe-boost.d.ts} +0 -0
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { Address, Hex, AbiFunction } from 'viem';
|
|
2
|
-
import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
|
|
3
|
-
import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
|
|
4
|
-
import { a as Token } from './HoneyConfigProvider-CwDFrt02.js';
|
|
5
|
-
|
|
6
|
-
interface BribeBoostReward {
|
|
7
|
-
token: string;
|
|
8
|
-
total_unclaimed: string;
|
|
9
|
-
}
|
|
10
|
-
interface BribeBoostRewardItem {
|
|
11
|
-
rewards: BribeBoostReward[];
|
|
12
|
-
validator: string;
|
|
13
|
-
}
|
|
14
|
-
interface BribeBoostRewardProof {
|
|
15
|
-
validator?: string;
|
|
16
|
-
pagination: {
|
|
17
|
-
next: number;
|
|
18
|
-
previous: number;
|
|
19
|
-
record_per_page: number;
|
|
20
|
-
current_page: number;
|
|
21
|
-
total_page: number;
|
|
22
|
-
};
|
|
23
|
-
rewards: {
|
|
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
|
-
}[] | null;
|
|
32
|
-
}
|
|
33
|
-
interface BribeBoostValidatorApr {
|
|
34
|
-
id: string;
|
|
35
|
-
boost_total_bgt: string;
|
|
36
|
-
rewards_total_usd: string;
|
|
37
|
-
daily_rate: string;
|
|
38
|
-
apr: string;
|
|
39
|
-
apy: string;
|
|
40
|
-
tokens: Address[];
|
|
41
|
-
validator: string;
|
|
42
|
-
start_block: number;
|
|
43
|
-
end_block: number;
|
|
44
|
-
start_timestamp: number;
|
|
45
|
-
end_timestamp: number;
|
|
46
|
-
created_at: string;
|
|
47
|
-
updated_at: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type Proposal = ProposalWithVotesFragment;
|
|
51
|
-
type Vote = ProposalVoteFragment;
|
|
52
|
-
type Voter = Address;
|
|
53
|
-
/**
|
|
54
|
-
* Maps the proposal state from the governor contract to a more human-readable format.
|
|
55
|
-
* Don't edit this enum manually, it's synced with the governor contract.
|
|
56
|
-
*
|
|
57
|
-
* @see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/IGovernor.sol
|
|
58
|
-
*/
|
|
59
|
-
declare enum ProposalState {
|
|
60
|
-
Pending = 0,
|
|
61
|
-
Active = 1,
|
|
62
|
-
Canceled = 2,
|
|
63
|
-
Defeated = 3,
|
|
64
|
-
Succeeded = 4,
|
|
65
|
-
Queued = 5,
|
|
66
|
-
Expired = 6,
|
|
67
|
-
Executed = 7
|
|
68
|
-
}
|
|
69
|
-
type ProposalVotes = {
|
|
70
|
-
yes: number;
|
|
71
|
-
no: number;
|
|
72
|
-
abstain: number;
|
|
73
|
-
};
|
|
74
|
-
declare const VoteColorMap: {
|
|
75
|
-
yes: string;
|
|
76
|
-
1: string;
|
|
77
|
-
no: string;
|
|
78
|
-
2: string;
|
|
79
|
-
veto: string;
|
|
80
|
-
4: string;
|
|
81
|
-
abstain: string;
|
|
82
|
-
3: string;
|
|
83
|
-
yes_secondary: string;
|
|
84
|
-
no_secondary: string;
|
|
85
|
-
veto_secondary: string;
|
|
86
|
-
abstain_secondary: string;
|
|
87
|
-
default: string;
|
|
88
|
-
};
|
|
89
|
-
declare enum VoteEnum {
|
|
90
|
-
AGAINST = "no",
|
|
91
|
-
FOR = "yes",
|
|
92
|
-
ABSTAIN = "abstain"
|
|
93
|
-
}
|
|
94
|
-
type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
|
|
95
|
-
type CustomProposalActionErrors = {
|
|
96
|
-
type?: null | ProposalErrorCodes;
|
|
97
|
-
target?: null | ProposalErrorCodes;
|
|
98
|
-
value?: null | ProposalErrorCodes;
|
|
99
|
-
ABI?: null | ProposalErrorCodes;
|
|
100
|
-
functionSignature?: null | ProposalErrorCodes;
|
|
101
|
-
args?: (null | ProposalErrorCodes)[];
|
|
102
|
-
vault?: null | ProposalErrorCodes;
|
|
103
|
-
isFriend?: null | ProposalErrorCodes;
|
|
104
|
-
to?: null | ProposalErrorCodes;
|
|
105
|
-
amount?: null | ProposalErrorCodes;
|
|
106
|
-
minIncentiveRate?: null | ProposalErrorCodes;
|
|
107
|
-
managerAddress?: null | ProposalErrorCodes;
|
|
108
|
-
input?: null | ProposalErrorCodes;
|
|
109
|
-
token?: null | ProposalErrorCodes;
|
|
110
|
-
rawCalldata?: null | ProposalErrorCodes;
|
|
111
|
-
message?: null | ProposalErrorCodes;
|
|
112
|
-
} | null;
|
|
113
|
-
type CustomProposalErrors = {
|
|
114
|
-
title?: null | ProposalErrorCodes;
|
|
115
|
-
description?: null | ProposalErrorCodes;
|
|
116
|
-
forumLink?: null | ProposalErrorCodes;
|
|
117
|
-
actions?: CustomProposalActionErrors[];
|
|
118
|
-
};
|
|
119
|
-
declare enum ProposalErrorCodes {
|
|
120
|
-
REQUIRED = "Required",
|
|
121
|
-
INVALID_AMOUNT = "Invalid amount",
|
|
122
|
-
NEGATIVE_AMOUNT = "Negative amount",
|
|
123
|
-
INVALID_ADDRESS = "Invalid address",
|
|
124
|
-
INVALID_ACTION = "Invalid action",
|
|
125
|
-
INVALID_ABI = "Invalid ABI",
|
|
126
|
-
MUST_BE_HTTPS = "Must be HTTPS",
|
|
127
|
-
MUST_BE_HTTPS_OR_IPFS = "Must be HTTPS or IPFS",
|
|
128
|
-
INVALID_BASEPATH = "Must be a berachain forum link",
|
|
129
|
-
/**
|
|
130
|
-
* Mainly used when it's not a reward vault
|
|
131
|
-
*/
|
|
132
|
-
INVALID_CONTRACT = "This is not a valid contract"
|
|
133
|
-
}
|
|
134
|
-
type GovernanceTopic = {
|
|
135
|
-
id: PROPOSAL_GENRE;
|
|
136
|
-
color: string;
|
|
137
|
-
icon: React.ReactNode;
|
|
138
|
-
iconBackground?: string;
|
|
139
|
-
name: string;
|
|
140
|
-
slug: string;
|
|
141
|
-
forumLink: string;
|
|
142
|
-
description?: string;
|
|
143
|
-
comingSoon?: boolean;
|
|
144
|
-
};
|
|
145
|
-
declare enum ProposalTypeEnum {
|
|
146
|
-
CUSTOM_PROPOSAL = "custom-action",
|
|
147
|
-
WHITELIST_REWARD_VAULT = "whitelist-reward-vault",
|
|
148
|
-
BLACKLIST_REWARD_VAULT = "blacklist-reward-vault",
|
|
149
|
-
ERC20_TRANSFER = "erc20-transfer",
|
|
150
|
-
WHITELIST_REWARD_VAULT_INCENTIVE = "whitelist-reward-vault-incentive"
|
|
151
|
-
}
|
|
152
|
-
type CustomProposal = {
|
|
153
|
-
title: string;
|
|
154
|
-
description: any;
|
|
155
|
-
actions: ProposalAction[];
|
|
156
|
-
forumLink: string;
|
|
157
|
-
topic: Set<PROPOSAL_GENRE>;
|
|
158
|
-
};
|
|
159
|
-
type SafeProposalAction = {
|
|
160
|
-
value: bigint;
|
|
161
|
-
target: "" | Address;
|
|
162
|
-
} & ({
|
|
163
|
-
type: ProposalTypeEnum.CUSTOM_PROPOSAL;
|
|
164
|
-
input: "ABI" | "rawCalldata" | "message";
|
|
165
|
-
ABI: string;
|
|
166
|
-
_isVerifiedAbi?: boolean;
|
|
167
|
-
functionSignature: string;
|
|
168
|
-
args: string[];
|
|
169
|
-
rawCalldata: Hex;
|
|
170
|
-
message: string;
|
|
171
|
-
} | {
|
|
172
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT | ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
|
|
173
|
-
vault: Address;
|
|
174
|
-
} | {
|
|
175
|
-
type: ProposalTypeEnum.ERC20_TRANSFER;
|
|
176
|
-
to: Address;
|
|
177
|
-
amount: string;
|
|
178
|
-
} | {
|
|
179
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
|
|
180
|
-
vault: Address;
|
|
181
|
-
token: Address;
|
|
182
|
-
minIncentiveRate: string;
|
|
183
|
-
managerAddress: Address;
|
|
184
|
-
});
|
|
185
|
-
type ProposalAction = Partial<SafeProposalAction> & {
|
|
186
|
-
type: SafeProposalAction["type"];
|
|
187
|
-
};
|
|
188
|
-
type VerifiedAbi = {
|
|
189
|
-
abiItem?: AbiFunction;
|
|
190
|
-
functionName?: string;
|
|
191
|
-
args: readonly unknown[];
|
|
192
|
-
functionSignature?: string;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
type IncentiveReward = {
|
|
196
|
-
tokenMetadata: Token | undefined;
|
|
197
|
-
tokenPrice: number;
|
|
198
|
-
tokenValue: number;
|
|
199
|
-
id: string;
|
|
200
|
-
dist_id: string;
|
|
201
|
-
token: string;
|
|
202
|
-
recipient: string;
|
|
203
|
-
formattedAmount: string;
|
|
204
|
-
amount: string;
|
|
205
|
-
merkle_proof: string[];
|
|
206
|
-
available_at: number;
|
|
207
|
-
};
|
|
208
|
-
interface IncentiveRewardChunksWithValidatorData {
|
|
209
|
-
validator: ApiValidatorFragment | undefined;
|
|
210
|
-
maxTimestamp: number | undefined;
|
|
211
|
-
minTimestamp: number | undefined;
|
|
212
|
-
totalValue: number;
|
|
213
|
-
tokenTotals: {
|
|
214
|
-
address: Address;
|
|
215
|
-
amount: number;
|
|
216
|
-
value: number;
|
|
217
|
-
metadata: Token | undefined;
|
|
218
|
-
}[];
|
|
219
|
-
rewards: IncentiveReward[];
|
|
220
|
-
isCurrent: boolean;
|
|
221
|
-
}
|
|
222
|
-
interface AggregatedTokenTotals {
|
|
223
|
-
address: Address;
|
|
224
|
-
amount: number;
|
|
225
|
-
value: number;
|
|
226
|
-
metadata: Token | undefined;
|
|
227
|
-
}
|
|
228
|
-
type ClaimedIncentives = Record<string, string>;
|
|
229
|
-
type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
230
|
-
interface UserVaultInfo {
|
|
231
|
-
balance: bigint;
|
|
232
|
-
delegatedBalance: bigint;
|
|
233
|
-
withdrawableBalance: bigint;
|
|
234
|
-
rewards: string;
|
|
235
|
-
percentage: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
interface ProtocolMetadata {
|
|
239
|
-
name: string;
|
|
240
|
-
logoURI: string;
|
|
241
|
-
url: string;
|
|
242
|
-
description: string;
|
|
243
|
-
tags?: string[];
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export { type AggregatedTokenTotals as A, type BribeBoostRewardProof as B, type CustomProposal as C, type GovernanceTopic as G, type IncentiveReward as I, type ProtocolMetadata as P, type SafeProposalAction as S, type UserVaultInfo as U, type Vote as V, ProposalErrorCodes as a, ProposalState as b, type CustomProposalErrors as c, type BribeBoostRewardItem as d, type BribeBoostReward as e, type BribeBoostValidatorApr as f, type Proposal as g, type Voter as h, type ProposalVotes as i, VoteColorMap as j, VoteEnum as k, type PROPOSAL_GENRE as l, type CustomProposalActionErrors as m, ProposalTypeEnum as n, type ProposalAction as o, type VerifiedAbi as p, type IncentiveRewardChunksWithValidatorData as q, type ClaimedIncentives as r, type ClaimedIncentivesLocalState as s };
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { Address, Hex, AbiFunction } from 'viem';
|
|
2
|
-
import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
|
|
3
|
-
import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
|
|
4
|
-
import { a as Token } from './HoneyConfigProvider-6PXZJMSU.cjs';
|
|
5
|
-
|
|
6
|
-
interface BribeBoostReward {
|
|
7
|
-
token: string;
|
|
8
|
-
total_unclaimed: string;
|
|
9
|
-
}
|
|
10
|
-
interface BribeBoostRewardItem {
|
|
11
|
-
rewards: BribeBoostReward[];
|
|
12
|
-
validator: string;
|
|
13
|
-
}
|
|
14
|
-
interface BribeBoostRewardProof {
|
|
15
|
-
validator?: string;
|
|
16
|
-
pagination: {
|
|
17
|
-
next: number;
|
|
18
|
-
previous: number;
|
|
19
|
-
record_per_page: number;
|
|
20
|
-
current_page: number;
|
|
21
|
-
total_page: number;
|
|
22
|
-
};
|
|
23
|
-
rewards: {
|
|
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
|
-
}[] | null;
|
|
32
|
-
}
|
|
33
|
-
interface BribeBoostValidatorApr {
|
|
34
|
-
id: string;
|
|
35
|
-
boost_total_bgt: string;
|
|
36
|
-
rewards_total_usd: string;
|
|
37
|
-
daily_rate: string;
|
|
38
|
-
apr: string;
|
|
39
|
-
apy: string;
|
|
40
|
-
tokens: Address[];
|
|
41
|
-
validator: string;
|
|
42
|
-
start_block: number;
|
|
43
|
-
end_block: number;
|
|
44
|
-
start_timestamp: number;
|
|
45
|
-
end_timestamp: number;
|
|
46
|
-
created_at: string;
|
|
47
|
-
updated_at: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type Proposal = ProposalWithVotesFragment;
|
|
51
|
-
type Vote = ProposalVoteFragment;
|
|
52
|
-
type Voter = Address;
|
|
53
|
-
/**
|
|
54
|
-
* Maps the proposal state from the governor contract to a more human-readable format.
|
|
55
|
-
* Don't edit this enum manually, it's synced with the governor contract.
|
|
56
|
-
*
|
|
57
|
-
* @see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/IGovernor.sol
|
|
58
|
-
*/
|
|
59
|
-
declare enum ProposalState {
|
|
60
|
-
Pending = 0,
|
|
61
|
-
Active = 1,
|
|
62
|
-
Canceled = 2,
|
|
63
|
-
Defeated = 3,
|
|
64
|
-
Succeeded = 4,
|
|
65
|
-
Queued = 5,
|
|
66
|
-
Expired = 6,
|
|
67
|
-
Executed = 7
|
|
68
|
-
}
|
|
69
|
-
type ProposalVotes = {
|
|
70
|
-
yes: number;
|
|
71
|
-
no: number;
|
|
72
|
-
abstain: number;
|
|
73
|
-
};
|
|
74
|
-
declare const VoteColorMap: {
|
|
75
|
-
yes: string;
|
|
76
|
-
1: string;
|
|
77
|
-
no: string;
|
|
78
|
-
2: string;
|
|
79
|
-
veto: string;
|
|
80
|
-
4: string;
|
|
81
|
-
abstain: string;
|
|
82
|
-
3: string;
|
|
83
|
-
yes_secondary: string;
|
|
84
|
-
no_secondary: string;
|
|
85
|
-
veto_secondary: string;
|
|
86
|
-
abstain_secondary: string;
|
|
87
|
-
default: string;
|
|
88
|
-
};
|
|
89
|
-
declare enum VoteEnum {
|
|
90
|
-
AGAINST = "no",
|
|
91
|
-
FOR = "yes",
|
|
92
|
-
ABSTAIN = "abstain"
|
|
93
|
-
}
|
|
94
|
-
type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
|
|
95
|
-
type CustomProposalActionErrors = {
|
|
96
|
-
type?: null | ProposalErrorCodes;
|
|
97
|
-
target?: null | ProposalErrorCodes;
|
|
98
|
-
value?: null | ProposalErrorCodes;
|
|
99
|
-
ABI?: null | ProposalErrorCodes;
|
|
100
|
-
functionSignature?: null | ProposalErrorCodes;
|
|
101
|
-
args?: (null | ProposalErrorCodes)[];
|
|
102
|
-
vault?: null | ProposalErrorCodes;
|
|
103
|
-
isFriend?: null | ProposalErrorCodes;
|
|
104
|
-
to?: null | ProposalErrorCodes;
|
|
105
|
-
amount?: null | ProposalErrorCodes;
|
|
106
|
-
minIncentiveRate?: null | ProposalErrorCodes;
|
|
107
|
-
managerAddress?: null | ProposalErrorCodes;
|
|
108
|
-
input?: null | ProposalErrorCodes;
|
|
109
|
-
token?: null | ProposalErrorCodes;
|
|
110
|
-
rawCalldata?: null | ProposalErrorCodes;
|
|
111
|
-
message?: null | ProposalErrorCodes;
|
|
112
|
-
} | null;
|
|
113
|
-
type CustomProposalErrors = {
|
|
114
|
-
title?: null | ProposalErrorCodes;
|
|
115
|
-
description?: null | ProposalErrorCodes;
|
|
116
|
-
forumLink?: null | ProposalErrorCodes;
|
|
117
|
-
actions?: CustomProposalActionErrors[];
|
|
118
|
-
};
|
|
119
|
-
declare enum ProposalErrorCodes {
|
|
120
|
-
REQUIRED = "Required",
|
|
121
|
-
INVALID_AMOUNT = "Invalid amount",
|
|
122
|
-
NEGATIVE_AMOUNT = "Negative amount",
|
|
123
|
-
INVALID_ADDRESS = "Invalid address",
|
|
124
|
-
INVALID_ACTION = "Invalid action",
|
|
125
|
-
INVALID_ABI = "Invalid ABI",
|
|
126
|
-
MUST_BE_HTTPS = "Must be HTTPS",
|
|
127
|
-
MUST_BE_HTTPS_OR_IPFS = "Must be HTTPS or IPFS",
|
|
128
|
-
INVALID_BASEPATH = "Must be a berachain forum link",
|
|
129
|
-
/**
|
|
130
|
-
* Mainly used when it's not a reward vault
|
|
131
|
-
*/
|
|
132
|
-
INVALID_CONTRACT = "This is not a valid contract"
|
|
133
|
-
}
|
|
134
|
-
type GovernanceTopic = {
|
|
135
|
-
id: PROPOSAL_GENRE;
|
|
136
|
-
color: string;
|
|
137
|
-
icon: React.ReactNode;
|
|
138
|
-
iconBackground?: string;
|
|
139
|
-
name: string;
|
|
140
|
-
slug: string;
|
|
141
|
-
forumLink: string;
|
|
142
|
-
description?: string;
|
|
143
|
-
comingSoon?: boolean;
|
|
144
|
-
};
|
|
145
|
-
declare enum ProposalTypeEnum {
|
|
146
|
-
CUSTOM_PROPOSAL = "custom-action",
|
|
147
|
-
WHITELIST_REWARD_VAULT = "whitelist-reward-vault",
|
|
148
|
-
BLACKLIST_REWARD_VAULT = "blacklist-reward-vault",
|
|
149
|
-
ERC20_TRANSFER = "erc20-transfer",
|
|
150
|
-
WHITELIST_REWARD_VAULT_INCENTIVE = "whitelist-reward-vault-incentive"
|
|
151
|
-
}
|
|
152
|
-
type CustomProposal = {
|
|
153
|
-
title: string;
|
|
154
|
-
description: any;
|
|
155
|
-
actions: ProposalAction[];
|
|
156
|
-
forumLink: string;
|
|
157
|
-
topic: Set<PROPOSAL_GENRE>;
|
|
158
|
-
};
|
|
159
|
-
type SafeProposalAction = {
|
|
160
|
-
value: bigint;
|
|
161
|
-
target: "" | Address;
|
|
162
|
-
} & ({
|
|
163
|
-
type: ProposalTypeEnum.CUSTOM_PROPOSAL;
|
|
164
|
-
input: "ABI" | "rawCalldata" | "message";
|
|
165
|
-
ABI: string;
|
|
166
|
-
_isVerifiedAbi?: boolean;
|
|
167
|
-
functionSignature: string;
|
|
168
|
-
args: string[];
|
|
169
|
-
rawCalldata: Hex;
|
|
170
|
-
message: string;
|
|
171
|
-
} | {
|
|
172
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT | ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
|
|
173
|
-
vault: Address;
|
|
174
|
-
} | {
|
|
175
|
-
type: ProposalTypeEnum.ERC20_TRANSFER;
|
|
176
|
-
to: Address;
|
|
177
|
-
amount: string;
|
|
178
|
-
} | {
|
|
179
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
|
|
180
|
-
vault: Address;
|
|
181
|
-
token: Address;
|
|
182
|
-
minIncentiveRate: string;
|
|
183
|
-
managerAddress: Address;
|
|
184
|
-
});
|
|
185
|
-
type ProposalAction = Partial<SafeProposalAction> & {
|
|
186
|
-
type: SafeProposalAction["type"];
|
|
187
|
-
};
|
|
188
|
-
type VerifiedAbi = {
|
|
189
|
-
abiItem?: AbiFunction;
|
|
190
|
-
functionName?: string;
|
|
191
|
-
args: readonly unknown[];
|
|
192
|
-
functionSignature?: string;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
type IncentiveReward = {
|
|
196
|
-
tokenMetadata: Token | undefined;
|
|
197
|
-
tokenPrice: number;
|
|
198
|
-
tokenValue: number;
|
|
199
|
-
id: string;
|
|
200
|
-
dist_id: string;
|
|
201
|
-
token: string;
|
|
202
|
-
recipient: string;
|
|
203
|
-
formattedAmount: string;
|
|
204
|
-
amount: string;
|
|
205
|
-
merkle_proof: string[];
|
|
206
|
-
available_at: number;
|
|
207
|
-
};
|
|
208
|
-
interface IncentiveRewardChunksWithValidatorData {
|
|
209
|
-
validator: ApiValidatorFragment | undefined;
|
|
210
|
-
maxTimestamp: number | undefined;
|
|
211
|
-
minTimestamp: number | undefined;
|
|
212
|
-
totalValue: number;
|
|
213
|
-
tokenTotals: {
|
|
214
|
-
address: Address;
|
|
215
|
-
amount: number;
|
|
216
|
-
value: number;
|
|
217
|
-
metadata: Token | undefined;
|
|
218
|
-
}[];
|
|
219
|
-
rewards: IncentiveReward[];
|
|
220
|
-
isCurrent: boolean;
|
|
221
|
-
}
|
|
222
|
-
interface AggregatedTokenTotals {
|
|
223
|
-
address: Address;
|
|
224
|
-
amount: number;
|
|
225
|
-
value: number;
|
|
226
|
-
metadata: Token | undefined;
|
|
227
|
-
}
|
|
228
|
-
type ClaimedIncentives = Record<string, string>;
|
|
229
|
-
type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
230
|
-
interface UserVaultInfo {
|
|
231
|
-
balance: bigint;
|
|
232
|
-
delegatedBalance: bigint;
|
|
233
|
-
withdrawableBalance: bigint;
|
|
234
|
-
rewards: string;
|
|
235
|
-
percentage: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
interface ProtocolMetadata {
|
|
239
|
-
name: string;
|
|
240
|
-
logoURI: string;
|
|
241
|
-
url: string;
|
|
242
|
-
description: string;
|
|
243
|
-
tags?: string[];
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export { type AggregatedTokenTotals as A, type BribeBoostRewardProof as B, type CustomProposal as C, type GovernanceTopic as G, type IncentiveReward as I, type ProtocolMetadata as P, type SafeProposalAction as S, type UserVaultInfo as U, type Vote as V, ProposalErrorCodes as a, ProposalState as b, type CustomProposalErrors as c, type BribeBoostRewardItem as d, type BribeBoostReward as e, type BribeBoostValidatorApr as f, type Proposal as g, type Voter as h, type ProposalVotes as i, VoteColorMap as j, VoteEnum as k, type PROPOSAL_GENRE as l, type CustomProposalActionErrors as m, ProposalTypeEnum as n, type ProposalAction as o, type VerifiedAbi as p, type IncentiveRewardChunksWithValidatorData as q, type ClaimedIncentives as r, type ClaimedIncentivesLocalState as s };
|
package/dist/types/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOAXF4YWcjs = require('../chunk-TOAXF4YW.cjs');exports.Aggregators = _chunkTOAXF4YWcjs.b; exports.ContractName = _chunkTOAXF4YWcjs.d; exports.HoneySwapAction = _chunkTOAXF4YWcjs.j; exports.PoolCreationStep = _chunkTOAXF4YWcjs.a; exports.ProposalErrorCodes = _chunkTOAXF4YWcjs.h; exports.ProposalState = _chunkTOAXF4YWcjs.e; exports.ProposalTypeEnum = _chunkTOAXF4YWcjs.i; exports.SwapReferrer = _chunkTOAXF4YWcjs.c; exports.VoteColorMap = _chunkTOAXF4YWcjs.f; exports.VoteEnum = _chunkTOAXF4YWcjs.g;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/types/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/pong/coding/monobera/packages/berajs/dist/types/index.cjs"],"names":[],"mappings":"AAAA,kIAAsD,ocAAyM","file":"/Users/pong/coding/monobera/packages/berajs/dist/types/index.cjs"}
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export { A as AggregatedTokenTotals, e as BribeBoostReward, d as BribeBoostRewardItem, B as BribeBoostRewardProof, f as BribeBoostValidatorApr, r as ClaimedIncentives, s as ClaimedIncentivesLocalState, C as CustomProposal, m as CustomProposalActionErrors, c as CustomProposalErrors, G as GovernanceTopic, I as IncentiveReward, q as IncentiveRewardChunksWithValidatorData, l as PROPOSAL_GENRE, g as Proposal, o as ProposalAction, a as ProposalErrorCodes, b as ProposalState, n as ProposalTypeEnum, i as ProposalVotes, P as ProtocolMetadata, S as SafeProposalAction, U as UserVaultInfo, p as VerifiedAbi, V as Vote, j as VoteColorMap, k as VoteEnum, h as Voter } from '../staking-f4BpYH7l.cjs';
|
|
2
|
-
export { A as Aggregators, l as AllowanceToken, B as BalanceToken, G as BalanceTokenWithMetadata, O as BexStatus, R as ContractName, D as DefaultHookOptions, E as DefaultHookReturnType, V as HoneySwapAction, H as HoneySwapActions, i as IAggregatorArgs, g as IAggregatorQuote, m as IContractWrite, Q as IContractWriteFn, I as IRawAggregatorQuote, F as IUserPosition, M as MinimalERC20, y as PoolCreationStep, j as PythPriceFeedMap, S as SwapReferrer, N as SwapRequest, a as Token, h as TokenBalance, k as TokenCurrentPriceMap, x as TokenInput, J as TokenPriceInfo, z as TokenWithAmount, b as TokenWithMetadata } from '../HoneyConfigProvider-6PXZJMSU.cjs';
|
|
3
|
-
import { BundleData, EnsoClient } from '@ensofinance/sdk';
|
|
4
|
-
import { TransactionRequest, Address, Hex, PublicClient } from 'viem';
|
|
5
|
-
import '@berachain/graphql/governance';
|
|
6
|
-
import '@berachain/graphql/pol/api';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
|
-
import 'react';
|
|
9
|
-
import '@berachain-foundation/berancer-sdk';
|
|
10
|
-
import '../aggregatorsRouter-Cny4B_MB.cjs';
|
|
11
|
-
import '@wagmi/core';
|
|
12
|
-
import 'swr';
|
|
13
|
-
import '@berachain/config';
|
|
14
|
-
import '../txnEnum-BQKDfaeH.cjs';
|
|
15
|
-
import '../BeraError-D1HS_rbb.cjs';
|
|
16
|
-
import '@sentry/nextjs';
|
|
17
|
-
|
|
18
|
-
type Quantity = string | number;
|
|
19
|
-
type ActionOutputReference<T> = T | StrictOutputReference<T>;
|
|
20
|
-
type StrictOutputReference<T> = {
|
|
21
|
-
useOutputOfCallAt: number;
|
|
22
|
-
index?: number;
|
|
23
|
-
};
|
|
24
|
-
interface GetZapTransactionRequestsArgs {
|
|
25
|
-
fromAddress: Address;
|
|
26
|
-
amountIn: Quantity;
|
|
27
|
-
tokenIn: Address;
|
|
28
|
-
tokenOut: Address;
|
|
29
|
-
chainId: number;
|
|
30
|
-
ensoClient: EnsoClient;
|
|
31
|
-
slippage: number;
|
|
32
|
-
destinationChainId?: number;
|
|
33
|
-
publicClient: PublicClient;
|
|
34
|
-
}
|
|
35
|
-
type GetZapTransaction = TransactionRequest & {
|
|
36
|
-
to: Address;
|
|
37
|
-
data: Hex;
|
|
38
|
-
value?: bigint;
|
|
39
|
-
gasLimit?: bigint;
|
|
40
|
-
};
|
|
41
|
-
type GetZapTransactions = GetZapTransaction[];
|
|
42
|
-
interface GetZapTransactionsArgs {
|
|
43
|
-
fromAddress: Address;
|
|
44
|
-
amountIn: Quantity;
|
|
45
|
-
tokenIn: Address;
|
|
46
|
-
chainId: number;
|
|
47
|
-
ensoClient: EnsoClient;
|
|
48
|
-
bundle: BundleData;
|
|
49
|
-
publicClient: PublicClient;
|
|
50
|
-
}
|
|
51
|
-
interface GetZapTransactionResponse {
|
|
52
|
-
bundle: BundleData;
|
|
53
|
-
transactions: GetZapTransactions;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type { ActionOutputReference, GetZapTransaction, GetZapTransactionRequestsArgs, GetZapTransactionResponse, GetZapTransactions, GetZapTransactionsArgs, Quantity };
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export { A as AggregatedTokenTotals, e as BribeBoostReward, d as BribeBoostRewardItem, B as BribeBoostRewardProof, f as BribeBoostValidatorApr, r as ClaimedIncentives, s as ClaimedIncentivesLocalState, C as CustomProposal, m as CustomProposalActionErrors, c as CustomProposalErrors, G as GovernanceTopic, I as IncentiveReward, q as IncentiveRewardChunksWithValidatorData, l as PROPOSAL_GENRE, g as Proposal, o as ProposalAction, a as ProposalErrorCodes, b as ProposalState, n as ProposalTypeEnum, i as ProposalVotes, P as ProtocolMetadata, S as SafeProposalAction, U as UserVaultInfo, p as VerifiedAbi, V as Vote, j as VoteColorMap, k as VoteEnum, h as Voter } from '../staking-F9Nx9TKD.js';
|
|
2
|
-
export { A as Aggregators, l as AllowanceToken, B as BalanceToken, G as BalanceTokenWithMetadata, O as BexStatus, R as ContractName, D as DefaultHookOptions, E as DefaultHookReturnType, V as HoneySwapAction, H as HoneySwapActions, i as IAggregatorArgs, g as IAggregatorQuote, m as IContractWrite, Q as IContractWriteFn, I as IRawAggregatorQuote, F as IUserPosition, M as MinimalERC20, y as PoolCreationStep, j as PythPriceFeedMap, S as SwapReferrer, N as SwapRequest, a as Token, h as TokenBalance, k as TokenCurrentPriceMap, x as TokenInput, J as TokenPriceInfo, z as TokenWithAmount, b as TokenWithMetadata } from '../HoneyConfigProvider-CwDFrt02.js';
|
|
3
|
-
import { BundleData, EnsoClient } from '@ensofinance/sdk';
|
|
4
|
-
import { TransactionRequest, Address, Hex, PublicClient } from 'viem';
|
|
5
|
-
import '@berachain/graphql/governance';
|
|
6
|
-
import '@berachain/graphql/pol/api';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
|
-
import 'react';
|
|
9
|
-
import '@berachain-foundation/berancer-sdk';
|
|
10
|
-
import '../aggregatorsRouter-Cny4B_MB.js';
|
|
11
|
-
import '@wagmi/core';
|
|
12
|
-
import 'swr';
|
|
13
|
-
import '@berachain/config';
|
|
14
|
-
import '../txnEnum-BQKDfaeH.js';
|
|
15
|
-
import '../BeraError-D1HS_rbb.js';
|
|
16
|
-
import '@sentry/nextjs';
|
|
17
|
-
|
|
18
|
-
type Quantity = string | number;
|
|
19
|
-
type ActionOutputReference<T> = T | StrictOutputReference<T>;
|
|
20
|
-
type StrictOutputReference<T> = {
|
|
21
|
-
useOutputOfCallAt: number;
|
|
22
|
-
index?: number;
|
|
23
|
-
};
|
|
24
|
-
interface GetZapTransactionRequestsArgs {
|
|
25
|
-
fromAddress: Address;
|
|
26
|
-
amountIn: Quantity;
|
|
27
|
-
tokenIn: Address;
|
|
28
|
-
tokenOut: Address;
|
|
29
|
-
chainId: number;
|
|
30
|
-
ensoClient: EnsoClient;
|
|
31
|
-
slippage: number;
|
|
32
|
-
destinationChainId?: number;
|
|
33
|
-
publicClient: PublicClient;
|
|
34
|
-
}
|
|
35
|
-
type GetZapTransaction = TransactionRequest & {
|
|
36
|
-
to: Address;
|
|
37
|
-
data: Hex;
|
|
38
|
-
value?: bigint;
|
|
39
|
-
gasLimit?: bigint;
|
|
40
|
-
};
|
|
41
|
-
type GetZapTransactions = GetZapTransaction[];
|
|
42
|
-
interface GetZapTransactionsArgs {
|
|
43
|
-
fromAddress: Address;
|
|
44
|
-
amountIn: Quantity;
|
|
45
|
-
tokenIn: Address;
|
|
46
|
-
chainId: number;
|
|
47
|
-
ensoClient: EnsoClient;
|
|
48
|
-
bundle: BundleData;
|
|
49
|
-
publicClient: PublicClient;
|
|
50
|
-
}
|
|
51
|
-
interface GetZapTransactionResponse {
|
|
52
|
-
bundle: BundleData;
|
|
53
|
-
transactions: GetZapTransactions;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type { ActionOutputReference, GetZapTransaction, GetZapTransactionRequestsArgs, GetZapTransactionResponse, GetZapTransactions, GetZapTransactionsArgs, Quantity };
|
package/dist/types/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-IOSYBHKU.mjs";export{b as Aggregators,d as ContractName,j as HoneySwapAction,a as PoolCreationStep,h as ProposalErrorCodes,e as ProposalState,i as ProposalTypeEnum,c as SwapReferrer,f as VoteColorMap,g as VoteEnum};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/utils/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkREDXXUK7cjs = require('../chunk-REDXXUK7.cjs');var _chunk22MQVFHPcjs = require('../chunk-22MQVFHP.cjs');require('../chunk-ED43NYSE.cjs');require('../chunk-JMKLDDKY.cjs');exports.CAP_LIMIT_BUFFER = _chunkREDXXUK7cjs.r; exports.DEFAULT_METAMASK_GAS_LIMIT = _chunkREDXXUK7cjs.w; exports.MAX_CUSTOM_DEADLINE = _chunkREDXXUK7cjs.s; exports.MAX_CUSTOM_SLIPPAGE = _chunkREDXXUK7cjs.v; exports.MIN_CUSTOM_DEADLINE = _chunkREDXXUK7cjs.t; exports.MIN_CUSTOM_SLIPPAGE = _chunkREDXXUK7cjs.u; exports.beraFetch = _chunkREDXXUK7cjs.b; exports.beraFetchJson = _chunkREDXXUK7cjs.c; exports.calculateTimestampFromDays = _chunkREDXXUK7cjs.E; exports.days = _chunkREDXXUK7cjs.j; exports.daysInSeconds = _chunkREDXXUK7cjs.k; exports.defaultBeraFlags = _chunk22MQVFHPcjs.a; exports.formatAggregatorsQuotes = _chunkREDXXUK7cjs.z; exports.formatInputTokenValue = _chunkREDXXUK7cjs.A; exports.formatNumber = _chunkREDXXUK7cjs.B; exports.formatTimeLeft = _chunkREDXXUK7cjs.G; exports.formatUnixTimestamp = _chunkREDXXUK7cjs.F; exports.formatUsd = _chunkREDXXUK7cjs.H; exports.getContractName = _chunkREDXXUK7cjs.I; exports.getHoneySwapMessage = _chunkREDXXUK7cjs.J; exports.getHoneyToken = _chunk22MQVFHPcjs.e; exports.getPythDefaultUpdateFee = _chunkREDXXUK7cjs.x; exports.getSafeNumber = _chunkREDXXUK7cjs.C; exports.getServerSidePublicClient = _chunkREDXXUK7cjs.K; exports.getTestClient = _chunkREDXXUK7cjs.L; exports.hours = _chunkREDXXUK7cjs.h; exports.hoursInSeconds = _chunkREDXXUK7cjs.i; exports.internal_beraToken = _chunk22MQVFHPcjs.c; exports.internal_wBeraToken = _chunk22MQVFHPcjs.d; exports.isDifferenceExceedingThreshold = _chunkREDXXUK7cjs.M; exports.isSubgraphStale = _chunkREDXXUK7cjs.N; exports.isToken = _chunk22MQVFHPcjs.f; exports.isValidatorProposer = _chunkREDXXUK7cjs.S; exports.isValidatorSigner = _chunkREDXXUK7cjs.T; exports.minutes = _chunkREDXXUK7cjs.f; exports.minutesInSeconds = _chunkREDXXUK7cjs.g; exports.months = _chunkREDXXUK7cjs.n; exports.monthsInSeconds = _chunkREDXXUK7cjs.o; exports.msToSeconds = _chunkREDXXUK7cjs.d; exports.parseBaseArgs = _chunk22MQVFHPcjs.b; exports.seconds = _chunkREDXXUK7cjs.e; exports.sentryBeforeSend = _chunkREDXXUK7cjs.O; exports.truncateDecimal = _chunkREDXXUK7cjs.D; exports.truncateHash = _chunkREDXXUK7cjs.R; exports.weeks = _chunkREDXXUK7cjs.l; exports.weeksInSeconds = _chunkREDXXUK7cjs.m; exports.wrapNativeToken = _chunkREDXXUK7cjs.P; exports.wrapNativeTokens = _chunkREDXXUK7cjs.Q; exports.years = _chunkREDXXUK7cjs.p; exports.yearsInSeconds = _chunkREDXXUK7cjs.q;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/utils/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/pong/coding/monobera/packages/berajs/dist/utils/index.cjs"],"names":[],"mappings":"AAAA,kIAAsV,yDAA+C,iCAA8B,iCAA8B,4yEAAiiC","file":"/Users/pong/coding/monobera/packages/berajs/dist/utils/index.cjs"}
|
package/dist/utils/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as E,B as F,C as G,D as H,E as I,F as J,G as K,H as L,I as M,J as N,K as O,L as P,M as Q,N as R,O as S,P as T,Q as U,R as V,S as W,T as X,b as g,c as h,d as i,e as j,f as k,g as l,h as m,i as n,j as o,k as p,l as q,m as r,n as s,o as t,p as u,q as v,r as w,s as x,t as y,u as z,v as A,w as B,x as C,z as D}from"../chunk-AMRJ4B36.mjs";import{a,b,c,d,e,f}from"../chunk-VYWYJR63.mjs";import"../chunk-PHIOKO3A.mjs";import"../chunk-HCTFDGXL.mjs";export{w as CAP_LIMIT_BUFFER,B as DEFAULT_METAMASK_GAS_LIMIT,x as MAX_CUSTOM_DEADLINE,A as MAX_CUSTOM_SLIPPAGE,y as MIN_CUSTOM_DEADLINE,z as MIN_CUSTOM_SLIPPAGE,g as beraFetch,h as beraFetchJson,I as calculateTimestampFromDays,o as days,p as daysInSeconds,a as defaultBeraFlags,D as formatAggregatorsQuotes,E as formatInputTokenValue,F as formatNumber,K as formatTimeLeft,J as formatUnixTimestamp,L as formatUsd,M as getContractName,N as getHoneySwapMessage,e as getHoneyToken,C as getPythDefaultUpdateFee,G as getSafeNumber,O as getServerSidePublicClient,P as getTestClient,m as hours,n as hoursInSeconds,c as internal_beraToken,d as internal_wBeraToken,Q as isDifferenceExceedingThreshold,R as isSubgraphStale,f as isToken,W as isValidatorProposer,X as isValidatorSigner,k as minutes,l as minutesInSeconds,s as months,t as monthsInSeconds,i as msToSeconds,b as parseBaseArgs,j as seconds,S as sentryBeforeSend,H as truncateDecimal,V as truncateHash,q as weeks,r as weeksInSeconds,T as wrapNativeToken,U as wrapNativeTokens,u as years,v as yearsInSeconds};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/utils/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type Address, isAddress, type PublicClient } from "viem";
|
|
2
|
-
|
|
3
|
-
import { assertPublicClient, InvalidArgumentError } from "~/errors";
|
|
4
|
-
|
|
5
|
-
export interface GetTransactionCount {
|
|
6
|
-
address: Address | undefined;
|
|
7
|
-
publicClient: PublicClient;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type GetTransactionCountResponse = number | undefined;
|
|
11
|
-
|
|
12
|
-
export async function getTransactionCount({
|
|
13
|
-
address,
|
|
14
|
-
publicClient,
|
|
15
|
-
}: GetTransactionCount): Promise<GetTransactionCountResponse> {
|
|
16
|
-
assertPublicClient(publicClient);
|
|
17
|
-
|
|
18
|
-
if (!address || !isAddress(address))
|
|
19
|
-
throw new InvalidArgumentError({
|
|
20
|
-
property: "address",
|
|
21
|
-
value: address,
|
|
22
|
-
expected: "Address",
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const transactionCount = await publicClient.getTransactionCount({
|
|
26
|
-
address,
|
|
27
|
-
});
|
|
28
|
-
return transactionCount;
|
|
29
|
-
}
|