@berachain/berajs 0.2.9 → 0.2.11
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/{HoneyConfigProvider-Dkj-_a5x.d.ts → HoneyConfigProvider-COOuDNra.d.ts} +1 -1
- package/dist/actions/clients/exports.d.ts +77 -1
- package/dist/actions/clients/exports.mjs +13 -4
- package/dist/actions/exports.d.ts +121 -39
- package/dist/actions/exports.mjs +75 -34
- package/dist/actions/governance/exports.d.ts +3 -11
- package/dist/actions/governance/exports.mjs +3 -3
- package/dist/actions/server/exports.mjs +4 -4
- package/dist/{chunk-4Z4AK6SH.mjs → chunk-3JJLQ2JX.mjs} +3 -3
- package/dist/{chunk-EXIUPSFN.mjs → chunk-7YVNSDXG.mjs} +2 -2
- package/dist/{chunk-WXXOISTU.mjs → chunk-AUOPN6NK.mjs} +1 -1
- package/dist/{chunk-75M6TF7M.mjs → chunk-DQRH5VE3.mjs} +1 -1
- package/dist/{chunk-CDFWPU2R.mjs → chunk-E7YFXBBQ.mjs} +0 -124
- package/dist/{chunk-AFN4CVD3.mjs → chunk-GUURQAME.mjs} +1 -1
- package/dist/{chunk-KQUMKB66.mjs → chunk-GY6B3PD5.mjs} +1 -1
- package/dist/{chunk-HSSJKHZ4.mjs → chunk-HYDP32P6.mjs} +3 -3
- package/dist/{chunk-NPBQLVL3.mjs → chunk-IXIBY5FP.mjs} +2 -2
- package/dist/{chunk-J5I45WGQ.mjs → chunk-KHXJDYA4.mjs} +7 -0
- package/dist/chunk-MRQGHXAN.mjs +54 -0
- package/dist/{chunk-FFB5LFDW.mjs → chunk-QVHEM4BG.mjs} +2 -2
- package/dist/{chunk-3EARVV7K.mjs → chunk-SXUNCX5E.mjs} +22 -9
- package/dist/chunk-UD5IUNCW.mjs +34 -0
- package/dist/{chunk-QJIXTYTZ.mjs → chunk-VAA2FVPP.mjs} +162 -41
- package/dist/chunk-Y6THHG77.mjs +126 -0
- package/dist/{chunk-XIYN6AL6.mjs → chunk-ZLTMIFCZ.mjs} +10 -5
- package/dist/contexts/exports.d.ts +2 -2
- package/dist/contexts/exports.mjs +11 -9
- package/dist/enum/exports.d.ts +8 -2
- package/dist/errors/exports.mjs +5 -5
- package/dist/getProposalVotes-DAUrdX2n.d.ts +12 -0
- package/dist/{getValidatorQueuedOperatorAddress-Dw5KN5sh.d.ts → getValidatorQueuedOperatorAddress-Cxt-DlL_.d.ts} +2 -2
- package/dist/{global.d-BuGDKh4k.d.ts → global.d-q_LQWQqs.d.ts} +2 -4
- package/dist/hooks/exports.d.ts +114 -164
- package/dist/hooks/exports.mjs +535 -522
- package/dist/hooks/governance/exports.d.ts +20 -15
- package/dist/hooks/governance/exports.mjs +43 -41
- package/dist/{pol.d-CqPA9K6m.d.ts → pol.d-CeRgXBL8.d.ts} +33 -8
- package/dist/types/exports.d.ts +5 -5
- package/dist/{useHoneySwapState-vFmuFF0g.d.ts → useHoneySwapState-twi7NTaO.d.ts} +1 -1
- package/dist/utils/exports.d.ts +2 -2
- package/dist/utils/exports.mjs +15 -9
- package/package.json +9 -8
- package/src/actions/bend/getMaxDeposit.ts +28 -2
- package/src/actions/clients/exports.ts +3 -0
- package/src/actions/clients/fetchBeep.ts +34 -0
- package/src/actions/clients/fetchOpenApi.ts +97 -0
- package/src/actions/clients/fetchOpenApi.unit.test.ts +245 -0
- package/src/actions/clients/fetchRailwayBackend.ts +34 -0
- package/src/actions/enso/getEnsoUserTokensWithBalances.ts +18 -0
- package/src/actions/exports.ts +2 -0
- package/src/actions/honey/getChartData.ts +53 -12
- package/src/actions/honey/getHoney24hVolume.ts +34 -6
- package/src/actions/honey/getHoneyTxns.ts +93 -0
- package/src/actions/honey/getPythLatestPrices.ts +7 -0
- package/src/actions/pol/__tests__/rewardVaults.integration.test.ts +1 -1
- package/src/actions/pol/getAutoclaimedIncentives.ts +21 -10
- package/src/actions/pol/getAutoclaimedIncentivesTxHash.ts +41 -0
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +5 -12
- package/src/actions/pol/getEarnedStakedBeraVault.ts +20 -16
- package/src/actions/pol/getRewardVaults.ts +4 -4
- package/src/actions/pol/getStakingDailyAssets.ts +18 -14
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +64 -12
- package/src/actions/validators/utils/getValidatorBoostApy.ts +1 -1
- package/src/contexts/SwrFallback.tsx +2 -1
- package/src/data/contracts.ts +4 -0
- package/src/errors/RequestError.ts +12 -3
- package/src/errors/RequestError.unit.test.ts +55 -0
- package/src/errors/errorMap.ts +8 -0
- package/src/errors/getRevertReason.integration.test.ts +5 -1
- package/src/hooks/bend/useGetConvertToAssets.ts +2 -3
- package/src/hooks/dex/useAggregatorsQuotes.ts +10 -10
- package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +1 -1
- package/src/hooks/dex/useAllUserPools.ts +7 -5
- package/src/hooks/dex/useApiPool.ts +1 -1
- package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +1 -1
- package/src/hooks/dex/useOnChainPoolData.ts +1 -1
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +2 -2
- package/src/hooks/dex/usePoolEvents.ts +1 -2
- package/src/hooks/dex/usePoolHistoricalData.ts +2 -3
- package/src/hooks/dex/usePools.ts +4 -2
- package/src/hooks/dex/useSingleAggregatorQuote.ts +6 -18
- package/src/hooks/enso/useBendDemultiply.ts +3 -4
- package/src/hooks/enso/useBendMultiply.ts +3 -4
- package/src/hooks/enso/useBendZapSupply.ts +3 -4
- package/src/hooks/enso/useEnsoSwapBundle.ts +1 -1
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +3 -5
- package/src/hooks/enso/useEnsoWalletV2Address.ts +1 -1
- package/src/hooks/enso/useIsBendAuthorized.ts +1 -1
- package/src/hooks/enso/useZapStakeBera.ts +2 -2
- package/src/hooks/exports.ts +2 -0
- package/src/hooks/governance/useGetPastVotes.ts +1 -1
- package/src/hooks/governance/useHasVoted.ts +1 -1
- package/src/hooks/governance/useIsCanceller.ts +1 -1
- package/src/hooks/governance/usePollAllProposals.ts +13 -12
- package/src/hooks/governance/usePollProposal.ts +3 -3
- package/src/hooks/governance/usePollProposalThreshold.ts +1 -1
- package/src/hooks/governance/usePollProposalVotes.ts +23 -5
- package/src/hooks/governance/usePollUserDelegates.ts +3 -3
- package/src/hooks/governance/useProposalFromTx.ts +2 -1
- package/src/hooks/governance/useProposalSnapshot.ts +2 -3
- package/src/hooks/governance/useProposalState.ts +2 -2
- package/src/hooks/governance/useProposalTimelockState.ts +2 -1
- package/src/hooks/governance/useQuorum.ts +1 -2
- package/src/hooks/honey/useCappedGlobally.ts +3 -6
- package/src/hooks/honey/useCappedRelatively.ts +2 -2
- package/src/hooks/honey/useCollateralWeights.ts +3 -3
- package/src/hooks/honey/useHoney24hVolume.ts +1 -1
- package/src/hooks/honey/useHoneyBalances.ts +1 -1
- package/src/hooks/honey/useHoneyChartData.ts +1 -1
- package/src/hooks/honey/useHoneyVaultsBalance.ts +2 -3
- package/src/hooks/honey/useIsBadCollateralAsset.ts +4 -7
- package/src/hooks/honey/useIsBasketModeEnabled.ts +4 -7
- package/src/hooks/honey/usePythLatestPrices.ts +13 -9
- package/src/hooks/perps/usePythUpdateFee.ts +13 -11
- package/src/hooks/pol/useAutoclaimedIncentives.ts +2 -12
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +44 -0
- package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +39 -0
- package/src/hooks/pol/useBgtUnstakedBalance.ts +2 -2
- package/src/hooks/pol/useClaimableFees.ts +1 -1
- package/src/hooks/pol/useHighestVaultsAPR.ts +4 -6
- package/src/hooks/pol/useOnChainRewardVault.ts +77 -72
- package/src/hooks/pol/usePollGlobalData.ts +2 -3
- package/src/hooks/pol/usePollMarkets.ts +2 -2
- package/src/hooks/pol/useQueuedBeraUnlock.ts +2 -2
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +2 -2
- package/src/hooks/pol/useRewardVault.ts +7 -6
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +4 -4
- package/src/hooks/pol/useRewardVaultFromToken.ts +1 -1
- package/src/hooks/pol/useRewardVaultIncentives.ts +1 -1
- package/src/hooks/pol/useRewardVaultRewards.ts +2 -2
- package/src/hooks/pol/useRewardVaults.ts +3 -6
- package/src/hooks/pol/useStakedAPR.ts +1 -2
- package/src/hooks/pol/useStakedData.ts +90 -41
- package/src/hooks/pol/useStakedSnapshots.ts +1 -1
- package/src/hooks/pol/useStakingVaultsMetadata.ts +1 -1
- package/src/hooks/pol/useTotalStakedAmount.ts +1 -2
- package/src/hooks/pol/useUserVaultInfo.ts +2 -2
- package/src/hooks/pol/useUserVaults.ts +2 -3
- package/src/hooks/pol/useVaultAddress.ts +1 -1
- package/src/hooks/pol/useVaultHistory.ts +1 -2
- package/src/hooks/pol/useVaultValidators.ts +2 -2
- package/src/hooks/tokens/useMultipleTokenInformation.ts +2 -2
- package/src/hooks/tokens/usePollAllowances.ts +3 -4
- package/src/hooks/tokens/usePollBalance.ts +2 -2
- package/src/hooks/tokens/usePollWalletBalances.ts +2 -2
- package/src/hooks/tokens/useStakingTokenInformation.ts +2 -2
- package/src/hooks/tokens/useTokenCurrentPrices.ts +11 -13
- package/src/hooks/tokens/useTokenInformation.ts +2 -2
- package/src/hooks/tokens/useTokenPrice.ts +2 -1
- package/src/hooks/tokens/useTokenPrices.ts +3 -4
- package/src/hooks/tokens/useTotalSupply.ts +1 -1
- package/src/hooks/tokens/useUnderlyingAsset.ts +1 -2
- package/src/hooks/useBlockToTimestamp.ts +1 -2
- package/src/hooks/useGetVerifiedAbi.ts +2 -1
- package/src/hooks/validators/useAllValidators.ts +2 -3
- package/src/hooks/validators/useApiEnrichedAllocation.ts +1 -1
- package/src/hooks/validators/useApiValidator.ts +3 -6
- package/src/hooks/validators/useBaselineRewardAllocation.ts +1 -2
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +1 -1
- package/src/hooks/validators/useDefaultRewardAllocation.ts +2 -3
- package/src/hooks/validators/useManagedValidatorRole.ts +2 -2
- package/src/hooks/validators/useOnChainValidator.ts +3 -3
- package/src/hooks/validators/useStakingPoolBatch.ts +3 -4
- package/src/hooks/validators/useUserActiveValidators.ts +2 -3
- package/src/hooks/validators/useUserBoostsOnValidator.ts +1 -1
- package/src/hooks/validators/useUserClaimableIncentives.ts +1 -1
- package/src/hooks/validators/useUserStakingPositions.ts +2 -1
- package/src/hooks/validators/useValidator.ts +4 -8
- package/src/hooks/validators/useValidatorAnalytics.ts +1 -1
- package/src/hooks/validators/useValidatorCommission.ts +2 -2
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +3 -3
- package/src/hooks/validators/useValidatorQueuedCommission.ts +2 -2
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +2 -2
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +2 -2
- package/src/hooks/validators/useValidatorRewardAllocation.ts +2 -2
- package/src/types/bribe-boost.d.ts +14 -3
- package/src/types/global.d.ts +3 -4
- package/src/types/pol.d.ts +17 -3
- package/src/utils/polyfillAbortSignalAny.ts +53 -0
- package/src/utils/polyfillAbortSignalAny.unit.test.ts +81 -0
- package/dist/polling-BKnyavLI.d.ts +0 -8
- /package/dist/{exports-BcUTGFUb.d.ts → getApolloClient-BcUTGFUb.d.ts} +0 -0
package/dist/hooks/exports.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import * as swr__internal from 'swr/_internal';
|
|
2
|
-
import * as
|
|
3
|
-
import { SWRResponse } from 'swr';
|
|
4
|
-
import { b as GetConvertToAssetsProps, O as OnChainPool, B as BaseAggregator, d as GetHoneyVaultsBalanceResponse, j as IsBadCollateralResponse, G as GetBgtAprSimulationArgs, a as GetBgtAprSimulationResult, i as GlobalData, e as GetMarkets, S as StakedBeraWithdrawal, k as RewardVaultIncentive, f as GetRewardVaultRewardsReturn, c as GetGaugeData, t as VaultMetadata, g as GetUserVaultsResponse, h as GetVaultHistoryArgs, V as ValidatorRewardAllocation, s as ValidatorWithUserBoost, U as UserBoostsOnValidator, l as UserStakingPoolPosition, n as ValidatorQueuedCommission, o as ValidatorQueuedOperatorAddress } from '../getValidatorQueuedOperatorAddress-
|
|
5
|
-
import { D as DefaultHookOptions, a as DefaultHookReturnType, b as IUseContractWriteArgs, U as UseContractWriteApi } from '../global.d-
|
|
6
|
-
export { T as TxnEventKeys } from '../global.d-
|
|
2
|
+
import * as _berachain_utils_pkg_swr from '@berachain/utils/pkg/swr';
|
|
3
|
+
import { SWRResponse } from '@berachain/utils/pkg/swr';
|
|
4
|
+
import { b as GetConvertToAssetsProps, O as OnChainPool, B as BaseAggregator, d as GetHoneyVaultsBalanceResponse, j as IsBadCollateralResponse, G as GetBgtAprSimulationArgs, a as GetBgtAprSimulationResult, i as GlobalData, e as GetMarkets, S as StakedBeraWithdrawal, k as RewardVaultIncentive, f as GetRewardVaultRewardsReturn, c as GetGaugeData, t as VaultMetadata, g as GetUserVaultsResponse, h as GetVaultHistoryArgs, V as ValidatorRewardAllocation, s as ValidatorWithUserBoost, U as UserBoostsOnValidator, l as UserStakingPoolPosition, n as ValidatorQueuedCommission, o as ValidatorQueuedOperatorAddress } from '../getValidatorQueuedOperatorAddress-Cxt-DlL_.js';
|
|
5
|
+
import { D as DefaultHookOptions, a as DefaultHookReturnType, b as IUseContractWriteArgs, U as UseContractWriteApi } from '../global.d-q_LQWQqs.js';
|
|
6
|
+
export { T as TxnEventKeys } from '../global.d-q_LQWQqs.js';
|
|
7
7
|
import { S as SwapReferrer, A as Aggregators, a as PoolCreationStep } from '../dex-C_BB0b0O.js';
|
|
8
|
-
import * as viem from 'viem';
|
|
9
8
|
import { Address, Hex } from 'viem';
|
|
10
|
-
import { M as MinimalERC20, d as HoneyConfigContextReturn, g as IRawAggregatorQuote, b as Token, t as TokenWithAmount, i as TokenCurrentPriceMap, v as IUserPosition, A as AllowanceQueryItem, j as AllowanceToken, w as TokenPriceInfo, B as BalanceToken,
|
|
9
|
+
import { M as MinimalERC20, d as HoneyConfigContextReturn, g as IRawAggregatorQuote, b as Token, t as TokenWithAmount, i as TokenCurrentPriceMap, v as IUserPosition, A as AllowanceQueryItem, j as AllowanceToken, w as TokenPriceInfo, B as BalanceToken, h as PythPriceFeedMap, P as PythLatestUpdates, a as TokenWithMetadata } from '../HoneyConfigProvider-COOuDNra.js';
|
|
11
10
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
11
|
import { GetPoolsQueryVariables, MinimalPoolFragment, GqlPoolEventType, PoolHistoricalDataFragment, GqlRewardVaultDynamicData, GqlVaultSnapshotDataRange, GqlValidatorDynamicData } from '@berachain/graphql/dex/api';
|
|
13
12
|
export { u as useBexStatus } from '../BexStatusProvider-DRymVlQf.js';
|
|
14
13
|
import { PoolType } from '@berachain-foundation/berancer-sdk';
|
|
15
|
-
import { P as POLLING } from '../polling-BKnyavLI.js';
|
|
16
14
|
import { BendDemultiplyBundleResponse, BendMultiplyBundleResponse, GetZapTransactionResponse } from '../types/exports.js';
|
|
17
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-
|
|
18
|
-
export { r as reducer, u as useHoneySwapState } from '../useHoneySwapState-
|
|
19
|
-
import * as
|
|
20
|
-
import {
|
|
15
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-twi7NTaO.js';
|
|
16
|
+
export { r as reducer, u as useHoneySwapState } from '../useHoneySwapState-twi7NTaO.js';
|
|
17
|
+
import * as _berachain_graphql_beep from '@berachain/graphql/beep';
|
|
18
|
+
import { ValidatorIncentivesResponse } from '@berachain/graphql/beep';
|
|
19
|
+
import { A as AutoclaimedIncentivesResponse, a as AutoclaimedIncentivesTxHashResponse, S as StakingConfig, c as StakedBeraAsset, U as UserVaultInfo, B as BribeBoostRewardProof } from '../pol.d-CeRgXBL8.js';
|
|
21
20
|
import * as _berachain_graphql_pol_api from '@berachain/graphql/pol/api';
|
|
22
21
|
import { GqlRewardVaultFilter, ApiVaultFragment, GetVaultsQueryVariables, GetVaultHistoryQuery, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, GqlChain, GetValidatorQuery, ApiValidatorMinimalFragment } from '@berachain/graphql/pol/api';
|
|
23
22
|
import { VaultStatsByDayResponse } from '@berachain/graphql/api';
|
|
24
23
|
import { Address as Address$1 } from '@berachain/config';
|
|
25
|
-
import
|
|
24
|
+
import * as swr from 'swr';
|
|
25
|
+
import { GetValidatorBlockStatsQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
26
26
|
import '@berachain/config/internal';
|
|
27
27
|
import '@wagmi/core';
|
|
28
28
|
import '../txnEnum-ByI5dtDi.js';
|
|
@@ -42,7 +42,7 @@ declare const useGetConvertToAssets: ({ sharesAmount, vaultAddress, vaultChainId
|
|
|
42
42
|
formatted: string;
|
|
43
43
|
} | undefined;
|
|
44
44
|
error: any;
|
|
45
|
-
mutate:
|
|
45
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<{
|
|
46
46
|
raw: bigint;
|
|
47
47
|
formatted: string;
|
|
48
48
|
}>;
|
|
@@ -74,10 +74,10 @@ declare function useAggregatorsQuotes(args: IUseAggregatorsQuotesArgs$1, options
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
declare const useAggregatorsRouterFeeBps: () => {
|
|
77
|
-
refresh:
|
|
77
|
+
refresh: _berachain_utils_pkg_swr.KeyedMutator<number>;
|
|
78
78
|
data: number | undefined;
|
|
79
79
|
error: any;
|
|
80
|
-
mutate:
|
|
80
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<number>;
|
|
81
81
|
isValidating: boolean;
|
|
82
82
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
83
83
|
};
|
|
@@ -143,15 +143,14 @@ declare const useAllUserPools: (query: GetPoolsQueryVariables, options?: Default
|
|
|
143
143
|
__typename?: "GqlRewardVaultDynamicData";
|
|
144
144
|
activeIncentivesValueUsd: string;
|
|
145
145
|
apr?: number | null;
|
|
146
|
-
|
|
147
|
-
allTimeReceivedBGTAmount: string;
|
|
146
|
+
rewardCapturePercentage: number;
|
|
148
147
|
} | null;
|
|
149
148
|
} | null;
|
|
150
149
|
}[];
|
|
151
150
|
count: number;
|
|
152
151
|
} | undefined;
|
|
153
152
|
error: any;
|
|
154
|
-
mutate:
|
|
153
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<{
|
|
155
154
|
pools: {
|
|
156
155
|
__typename?: "GqlPoolMinimal";
|
|
157
156
|
id: string;
|
|
@@ -198,8 +197,7 @@ declare const useAllUserPools: (query: GetPoolsQueryVariables, options?: Default
|
|
|
198
197
|
__typename?: "GqlRewardVaultDynamicData";
|
|
199
198
|
activeIncentivesValueUsd: string;
|
|
200
199
|
apr?: number | null;
|
|
201
|
-
|
|
202
|
-
allTimeReceivedBGTAmount: string;
|
|
200
|
+
rewardCapturePercentage: number;
|
|
203
201
|
} | null;
|
|
204
202
|
} | null;
|
|
205
203
|
}[];
|
|
@@ -220,7 +218,7 @@ declare function useApiPool({ poolId, account, }: {
|
|
|
220
218
|
refresh: () => void;
|
|
221
219
|
data: MinimalPoolFragment | undefined;
|
|
222
220
|
error: any;
|
|
223
|
-
mutate:
|
|
221
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<MinimalPoolFragment>;
|
|
224
222
|
isValidating: boolean;
|
|
225
223
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
226
224
|
};
|
|
@@ -261,7 +259,7 @@ declare const useGlobalLiquidityAndSwapVolume: () => {
|
|
|
261
259
|
};
|
|
262
260
|
refresh: () => Promise<_berachain_graphql_dex_api.GetGlobalLiquidityAndSwapVolumeQuery | undefined>;
|
|
263
261
|
error: any;
|
|
264
|
-
mutate:
|
|
262
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<_berachain_graphql_dex_api.GetGlobalLiquidityAndSwapVolumeQuery>;
|
|
265
263
|
isValidating: boolean;
|
|
266
264
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
267
265
|
};
|
|
@@ -360,7 +358,7 @@ declare function useOnChainPoolData(poolId: string): {
|
|
|
360
358
|
data: OnChainPoolFragment | undefined;
|
|
361
359
|
error: any;
|
|
362
360
|
isLoading: boolean;
|
|
363
|
-
mutate:
|
|
361
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<OnChainPool>;
|
|
364
362
|
refresh: () => Promise<OnChainPool | undefined>;
|
|
365
363
|
};
|
|
366
364
|
|
|
@@ -373,7 +371,7 @@ declare const usePollPoolCreationRelayerApproval: (options?: DefaultHookOptions)
|
|
|
373
371
|
refreshPoolCreationApproval: () => void;
|
|
374
372
|
data: boolean | undefined;
|
|
375
373
|
error: any;
|
|
376
|
-
mutate:
|
|
374
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<boolean>;
|
|
377
375
|
isValidating: boolean;
|
|
378
376
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
379
377
|
};
|
|
@@ -390,9 +388,7 @@ declare function usePool({ poolId }: {
|
|
|
390
388
|
declare const usePoolEvents: ({ poolId, typeInArray, }: {
|
|
391
389
|
poolId: string | undefined;
|
|
392
390
|
typeInArray: GqlPoolEventType[];
|
|
393
|
-
}) =>
|
|
394
|
-
refreshInterval: POLLING;
|
|
395
|
-
}>;
|
|
391
|
+
}) => _berachain_utils_pkg_swr.SWRResponse<_berachain_graphql_dex_api.GetPoolEventsQuery, any, any>;
|
|
396
392
|
|
|
397
393
|
type UsePoolHistoricalDataArgs = {
|
|
398
394
|
poolId: string | undefined;
|
|
@@ -462,8 +458,7 @@ declare const usePools: (query: GetPoolsQueryVariables, options?: DefaultHookOpt
|
|
|
462
458
|
__typename?: "GqlRewardVaultDynamicData";
|
|
463
459
|
activeIncentivesValueUsd: string;
|
|
464
460
|
apr?: number | null;
|
|
465
|
-
|
|
466
|
-
allTimeReceivedBGTAmount: string;
|
|
461
|
+
rewardCapturePercentage: number;
|
|
467
462
|
} | null;
|
|
468
463
|
} | null;
|
|
469
464
|
}[];
|
|
@@ -513,12 +508,12 @@ declare const usePools: (query: GetPoolsQueryVariables, options?: DefaultHookOpt
|
|
|
513
508
|
__typename?: "GqlRewardVaultDynamicData";
|
|
514
509
|
activeIncentivesValueUsd: string;
|
|
515
510
|
apr?: number | null;
|
|
516
|
-
|
|
517
|
-
allTimeReceivedBGTAmount: string;
|
|
511
|
+
rewardCapturePercentage: number;
|
|
518
512
|
} | null;
|
|
519
513
|
} | null;
|
|
520
514
|
}[];
|
|
521
515
|
isLoading: boolean;
|
|
516
|
+
error: any;
|
|
522
517
|
refresh: () => void;
|
|
523
518
|
pagination: {
|
|
524
519
|
page: number;
|
|
@@ -561,11 +556,7 @@ declare const USE_AGGREGATORS_QUOTES_QUERY_KEY = "useAggregatorsQuotes";
|
|
|
561
556
|
*/
|
|
562
557
|
declare function useSingleAggregatorQuote(args: IUseAggregatorsQuotesArgs & {
|
|
563
558
|
aggregator: BaseAggregator;
|
|
564
|
-
}, options?: DefaultHookOptions):
|
|
565
|
-
provider?: (cache: Readonly<swr.Cache>) => swr.Cache;
|
|
566
|
-
} & {
|
|
567
|
-
isEnabled?: boolean;
|
|
568
|
-
}) | undefined> | null;
|
|
559
|
+
}, options?: DefaultHookOptions): _berachain_utils_pkg_swr.SWRResponse<IRawAggregatorQuote | undefined, any, any> | null;
|
|
569
560
|
|
|
570
561
|
type UseBendDemultiply = {
|
|
571
562
|
collateralToken?: Token;
|
|
@@ -579,7 +570,7 @@ type UseBendDemultiply = {
|
|
|
579
570
|
currentCollateral?: string;
|
|
580
571
|
currentDebt?: string;
|
|
581
572
|
};
|
|
582
|
-
declare function useBendDemultiply({ collateralToken, loanToken, marketId, primaryAddress, repayAmount, slippage, chainId, collateralPriceInLoanAsset, currentCollateral, currentDebt, }: UseBendDemultiply, options?: DefaultHookOptions):
|
|
573
|
+
declare function useBendDemultiply({ collateralToken, loanToken, marketId, primaryAddress, repayAmount, slippage, chainId, collateralPriceInLoanAsset, currentCollateral, currentDebt, }: UseBendDemultiply, options?: DefaultHookOptions): _berachain_utils_pkg_swr.SWRResponse<BendDemultiplyBundleResponse, unknown, any>;
|
|
583
574
|
|
|
584
575
|
type UseBendMultiply = {
|
|
585
576
|
collateralToken?: Token;
|
|
@@ -594,7 +585,7 @@ type UseBendMultiply = {
|
|
|
594
585
|
chainId?: number;
|
|
595
586
|
formattedCollateralPriceInLoanAsset?: string;
|
|
596
587
|
};
|
|
597
|
-
declare function useBendMultiply({ collateralToken, loanToken, marketId, primaryAddress, formattedSupplyCollateralAmount, formattedCurrentCollateralAmount, formattedCurrentBorrowAmount, leverageMultiplier, slippage, chainId, formattedCollateralPriceInLoanAsset, }: UseBendMultiply, options?: DefaultHookOptions):
|
|
588
|
+
declare function useBendMultiply({ collateralToken, loanToken, marketId, primaryAddress, formattedSupplyCollateralAmount, formattedCurrentCollateralAmount, formattedCurrentBorrowAmount, leverageMultiplier, slippage, chainId, formattedCollateralPriceInLoanAsset, }: UseBendMultiply, options?: DefaultHookOptions): _berachain_utils_pkg_swr.SWRResponse<BendMultiplyBundleResponse, unknown, any>;
|
|
598
589
|
|
|
599
590
|
type UseBendZapSupplyArgs = {
|
|
600
591
|
tokenIn?: BalanceToken;
|
|
@@ -625,49 +616,13 @@ declare function useBendZapSupply({ tokenIn, loanToken, bendVault, rewardVault,
|
|
|
625
616
|
isCrossChain: boolean | 0 | undefined;
|
|
626
617
|
nativeFee: string | undefined;
|
|
627
618
|
refresh: () => void;
|
|
628
|
-
data:
|
|
619
|
+
data: any;
|
|
629
620
|
error: any;
|
|
630
|
-
mutate:
|
|
621
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<any>;
|
|
631
622
|
isValidating: boolean;
|
|
632
623
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
633
624
|
};
|
|
634
|
-
declare function useBendZapSupplyHelper({ tokenIn, loanToken, bendVault, rewardVault, amount, slippage, }: UseBendZapSupplyArgs, options?: DefaultHookOptions):
|
|
635
|
-
refreshInterval: POLLING;
|
|
636
|
-
errorRetryInterval?: number | undefined;
|
|
637
|
-
errorRetryCount?: number;
|
|
638
|
-
loadingTimeout?: number | undefined;
|
|
639
|
-
focusThrottleInterval?: number | undefined;
|
|
640
|
-
dedupingInterval?: number | undefined;
|
|
641
|
-
refreshWhenHidden?: boolean;
|
|
642
|
-
refreshWhenOffline?: boolean;
|
|
643
|
-
revalidateOnFocus?: boolean | undefined;
|
|
644
|
-
revalidateOnReconnect?: boolean | undefined;
|
|
645
|
-
revalidateOnMount?: boolean;
|
|
646
|
-
revalidateIfStale?: boolean | undefined;
|
|
647
|
-
shouldRetryOnError?: boolean | ((err: any) => boolean) | undefined;
|
|
648
|
-
keepPreviousData?: boolean;
|
|
649
|
-
suspense?: boolean;
|
|
650
|
-
fallbackData?: any;
|
|
651
|
-
strictServerPrefetchWarning?: boolean;
|
|
652
|
-
fetcher?: swr.BareFetcher<any> | undefined;
|
|
653
|
-
use?: swr.Middleware[];
|
|
654
|
-
fallback?: {
|
|
655
|
-
[key: string]: any;
|
|
656
|
-
} | undefined;
|
|
657
|
-
isPaused?: (() => boolean) | undefined;
|
|
658
|
-
onLoadingSlow?: ((key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
659
|
-
onSuccess?: ((data: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
660
|
-
onError?: ((err: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
661
|
-
onErrorRetry?: ((err: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>, revalidate: swr.Revalidator, revalidateOpts: Required<swr.RevalidatorOptions>) => void) | undefined;
|
|
662
|
-
onDiscarded?: ((key: string) => void) | undefined;
|
|
663
|
-
compare?: ((a: any, b: any) => boolean) | undefined;
|
|
664
|
-
isOnline?: (() => boolean) | undefined;
|
|
665
|
-
isVisible?: (() => boolean) | undefined;
|
|
666
|
-
initFocus?: ((callback: () => void) => (() => void) | void) | undefined;
|
|
667
|
-
initReconnect?: ((callback: () => void) => (() => void) | void) | undefined;
|
|
668
|
-
provider?: (cache: Readonly<swr.Cache>) => swr.Cache;
|
|
669
|
-
isEnabled?: boolean;
|
|
670
|
-
}>;
|
|
625
|
+
declare function useBendZapSupplyHelper({ tokenIn, loanToken, bendVault, rewardVault, amount, slippage, }: UseBendZapSupplyArgs, options?: DefaultHookOptions): _berachain_utils_pkg_swr.SWRResponse<any, any, any>;
|
|
671
626
|
|
|
672
627
|
/**
|
|
673
628
|
* Get the swap bundle for swapping tokens using Enso.
|
|
@@ -689,7 +644,7 @@ declare function useEnsoSwapBundle({ tokenIn, tokenOut, amount, slippage, }: {
|
|
|
689
644
|
refresh: () => void;
|
|
690
645
|
data: GetZapTransactionResponse | undefined;
|
|
691
646
|
error: any;
|
|
692
|
-
mutate:
|
|
647
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<GetZapTransactionResponse>;
|
|
693
648
|
isValidating: boolean;
|
|
694
649
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
695
650
|
};
|
|
@@ -700,7 +655,7 @@ declare function useEnsoUserTokensWithBalances({ chainId }?: {
|
|
|
700
655
|
refresh: () => Promise<BalanceToken[] | undefined>;
|
|
701
656
|
data: BalanceToken[] | undefined;
|
|
702
657
|
error: any;
|
|
703
|
-
mutate:
|
|
658
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<BalanceToken[]>;
|
|
704
659
|
isValidating: boolean;
|
|
705
660
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
706
661
|
};
|
|
@@ -718,22 +673,10 @@ type UseZapStakeBeraArgs = {
|
|
|
718
673
|
* supports cross-chain zaps from any chain to berachain staking.
|
|
719
674
|
*/
|
|
720
675
|
declare function useZapStakeBera({ inputToken, amount, underlyingToken, slippage, tokenOut, }: UseZapStakeBeraArgs, options?: DefaultHookOptions): {
|
|
721
|
-
data:
|
|
722
|
-
priceImpactPercentage: number | null | undefined;
|
|
723
|
-
isCrossChain: boolean | undefined;
|
|
724
|
-
amountOut?: string | undefined;
|
|
725
|
-
amountIn?: string | undefined;
|
|
726
|
-
name?: any;
|
|
727
|
-
allowanceRequirements?: AllowanceQueryItem[] | undefined;
|
|
728
|
-
isNativeSwap?: boolean;
|
|
729
|
-
swapFeeBps?: number | undefined;
|
|
730
|
-
getCalldata?: ({ account }: {
|
|
731
|
-
account: viem.Address;
|
|
732
|
-
}) => Calldata;
|
|
733
|
-
};
|
|
676
|
+
data: any;
|
|
734
677
|
refresh: () => void;
|
|
735
678
|
error: any;
|
|
736
|
-
mutate:
|
|
679
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<any>;
|
|
737
680
|
isValidating: boolean;
|
|
738
681
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
739
682
|
};
|
|
@@ -766,7 +709,7 @@ declare function useHoney24hVolume(): {
|
|
|
766
709
|
refresh: () => Promise<BigNumber | undefined>;
|
|
767
710
|
data: BigNumber | undefined;
|
|
768
711
|
error: any;
|
|
769
|
-
mutate:
|
|
712
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<BigNumber | undefined>;
|
|
770
713
|
isValidating: boolean;
|
|
771
714
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
772
715
|
};
|
|
@@ -841,10 +784,28 @@ declare const useHoneyBalances: () => DefaultHookReturnType<Record<Address, Bala
|
|
|
841
784
|
declare function useHoneyChartData({ days }: {
|
|
842
785
|
days: number;
|
|
843
786
|
}): {
|
|
844
|
-
refresh: () => Promise<
|
|
845
|
-
|
|
787
|
+
refresh: () => Promise<{
|
|
788
|
+
timestamp: number;
|
|
789
|
+
mintVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
790
|
+
redeemVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
791
|
+
totalVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
792
|
+
totalSupply: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
793
|
+
}[] | undefined>;
|
|
794
|
+
data: {
|
|
795
|
+
timestamp: number;
|
|
796
|
+
mintVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
797
|
+
redeemVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
798
|
+
totalVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
799
|
+
totalSupply: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
800
|
+
}[] | undefined;
|
|
846
801
|
error: any;
|
|
847
|
-
mutate:
|
|
802
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<{
|
|
803
|
+
timestamp: number;
|
|
804
|
+
mintVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
805
|
+
redeemVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
806
|
+
totalVolume: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
807
|
+
totalSupply: _berachain_graphql_beep.components["schemas"]["DecimalStr"];
|
|
808
|
+
}[]>;
|
|
848
809
|
isValidating: boolean;
|
|
849
810
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
850
811
|
};
|
|
@@ -891,19 +852,31 @@ interface UseAutoclaimedIncentivesArgs {
|
|
|
891
852
|
}
|
|
892
853
|
declare function useAutoclaimedIncentives({ enabled, }: UseAutoclaimedIncentivesArgs): DefaultHookReturnType<AutoclaimedIncentivesResponse | null>;
|
|
893
854
|
|
|
855
|
+
interface UseAutoclaimedIncentivesTxHashArgs {
|
|
856
|
+
enabled: boolean;
|
|
857
|
+
}
|
|
858
|
+
declare function useAutoclaimedIncentivesTxHash({ enabled, }: UseAutoclaimedIncentivesTxHashArgs): DefaultHookReturnType<AutoclaimedIncentivesTxHashResponse | null>;
|
|
859
|
+
|
|
894
860
|
declare function useBgtAprSimulation(args: GetBgtAprSimulationArgs | undefined): GetBgtAprSimulationResult
|
|
895
861
|
/**
|
|
896
862
|
* Returns undefined if still loading
|
|
897
863
|
*/
|
|
898
864
|
| undefined;
|
|
899
865
|
|
|
866
|
+
/**
|
|
867
|
+
* Client hook around `getBgtIncentiveDistributorPaused`. When `paused()` is
|
|
868
|
+
* true, users can no longer self-claim incentives and the bot distributes them
|
|
869
|
+
* on their behalf. Fails closed (`false`) so a read error never blocks the UI.
|
|
870
|
+
*/
|
|
871
|
+
declare function useBgtIncentiveDistributorPaused(options?: DefaultHookOptions): DefaultHookReturnType<boolean>;
|
|
872
|
+
|
|
900
873
|
declare const useBgtUnstakedBalance: (options?: DefaultHookOptions) => DefaultHookReturnType<string | undefined>;
|
|
901
874
|
|
|
902
875
|
declare const useClaimableFees: () => {
|
|
903
876
|
refresh: () => Promise<string | undefined>;
|
|
904
877
|
data: string | undefined;
|
|
905
878
|
error: any;
|
|
906
|
-
mutate:
|
|
879
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<string>;
|
|
907
880
|
isValidating: boolean;
|
|
908
881
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
909
882
|
};
|
|
@@ -946,50 +919,14 @@ declare function useQueuedBeraUnlock({ receiptTokenAddresses, account, version,
|
|
|
946
919
|
refresh: () => Promise<StakedBeraWithdrawal[] | undefined>;
|
|
947
920
|
data: StakedBeraWithdrawal[] | undefined;
|
|
948
921
|
error: any;
|
|
949
|
-
mutate:
|
|
922
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<StakedBeraWithdrawal[]>;
|
|
950
923
|
isValidating: boolean;
|
|
951
924
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
952
925
|
};
|
|
953
926
|
|
|
954
927
|
declare const useRewardTokenToBeraRate: ({ address, }: {
|
|
955
928
|
address: Address | undefined;
|
|
956
|
-
}, opt?: DefaultHookOptions) =>
|
|
957
|
-
errorRetryInterval?: number | undefined;
|
|
958
|
-
errorRetryCount?: number;
|
|
959
|
-
loadingTimeout?: number | undefined;
|
|
960
|
-
focusThrottleInterval?: number | undefined;
|
|
961
|
-
dedupingInterval?: number | undefined;
|
|
962
|
-
refreshInterval?: number | ((latestData: any) => number) | undefined;
|
|
963
|
-
refreshWhenHidden?: boolean;
|
|
964
|
-
refreshWhenOffline?: boolean;
|
|
965
|
-
revalidateOnFocus?: boolean | undefined;
|
|
966
|
-
revalidateOnReconnect?: boolean | undefined;
|
|
967
|
-
revalidateOnMount?: boolean;
|
|
968
|
-
revalidateIfStale?: boolean | undefined;
|
|
969
|
-
shouldRetryOnError?: boolean | ((err: any) => boolean) | undefined;
|
|
970
|
-
keepPreviousData?: boolean;
|
|
971
|
-
suspense?: boolean;
|
|
972
|
-
fallbackData?: any;
|
|
973
|
-
strictServerPrefetchWarning?: boolean;
|
|
974
|
-
fetcher?: swr.BareFetcher<any> | undefined;
|
|
975
|
-
use?: swr.Middleware[];
|
|
976
|
-
fallback?: {
|
|
977
|
-
[key: string]: any;
|
|
978
|
-
} | undefined;
|
|
979
|
-
isPaused?: (() => boolean) | undefined;
|
|
980
|
-
onLoadingSlow?: ((key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
981
|
-
onSuccess?: ((data: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
982
|
-
onError?: ((err: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>) => void) | undefined;
|
|
983
|
-
onErrorRetry?: ((err: any, key: string, config: Readonly<swr__internal.PublicConfiguration<any, any, swr.BareFetcher<any>>>, revalidate: swr.Revalidator, revalidateOpts: Required<swr.RevalidatorOptions>) => void) | undefined;
|
|
984
|
-
onDiscarded?: ((key: string) => void) | undefined;
|
|
985
|
-
compare?: ((a: any, b: any) => boolean) | undefined;
|
|
986
|
-
isOnline?: (() => boolean) | undefined;
|
|
987
|
-
isVisible?: (() => boolean) | undefined;
|
|
988
|
-
initFocus?: ((callback: () => void) => (() => void) | void) | undefined;
|
|
989
|
-
initReconnect?: ((callback: () => void) => (() => void) | void) | undefined;
|
|
990
|
-
provider?: (cache: Readonly<swr.Cache>) => swr.Cache;
|
|
991
|
-
isEnabled?: boolean;
|
|
992
|
-
}>;
|
|
929
|
+
}, opt?: DefaultHookOptions) => _berachain_utils_pkg_swr.SWRResponse<number, any, any>;
|
|
993
930
|
|
|
994
931
|
interface UseRewardVaultResponse extends DefaultHookReturnType<ApiVaultFragment> {
|
|
995
932
|
}
|
|
@@ -1007,7 +944,7 @@ declare const useRewardVaultBalanceFromStakingToken: ({ stakingToken, rewardVaul
|
|
|
1007
944
|
balance: bigint;
|
|
1008
945
|
} | undefined;
|
|
1009
946
|
error: any;
|
|
1010
|
-
mutate:
|
|
947
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<{
|
|
1011
948
|
address: `0x${string}`;
|
|
1012
949
|
balance: bigint;
|
|
1013
950
|
}>;
|
|
@@ -1022,7 +959,7 @@ declare const useRewardVaultFromToken: ({ tokenAddress, }: {
|
|
|
1022
959
|
refresh: () => Promise<`0x${string}` | undefined>;
|
|
1023
960
|
data: `0x${string}` | undefined;
|
|
1024
961
|
error: any;
|
|
1025
|
-
mutate:
|
|
962
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<`0x${string}` | undefined>;
|
|
1026
963
|
isValidating: boolean;
|
|
1027
964
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1028
965
|
};
|
|
@@ -1034,7 +971,7 @@ declare function useRewardVaultIncentives({ address, stakingToken, }: {
|
|
|
1034
971
|
refresh: () => Promise<RewardVaultIncentive[] | undefined>;
|
|
1035
972
|
data: RewardVaultIncentive[] | undefined;
|
|
1036
973
|
error: any;
|
|
1037
|
-
mutate:
|
|
974
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<RewardVaultIncentive[]>;
|
|
1038
975
|
isValidating: boolean;
|
|
1039
976
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1040
977
|
};
|
|
@@ -1043,7 +980,7 @@ declare const useRewardVaultRewards: (address: Address, options?: DefaultHookOpt
|
|
|
1043
980
|
refresh: () => Promise<GetRewardVaultRewardsReturn | undefined>;
|
|
1044
981
|
data: GetRewardVaultRewardsReturn | undefined;
|
|
1045
982
|
error: any;
|
|
1046
|
-
mutate:
|
|
983
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<GetRewardVaultRewardsReturn>;
|
|
1047
984
|
isValidating: boolean;
|
|
1048
985
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1049
986
|
};
|
|
@@ -1060,10 +997,10 @@ declare const useRewardVaults: (args: {
|
|
|
1060
997
|
filter?: GetVaultsQueryVariables;
|
|
1061
998
|
onChainIncentives?: boolean;
|
|
1062
999
|
}, options?: DefaultHookOptions) => {
|
|
1063
|
-
refresh:
|
|
1000
|
+
refresh: _berachain_utils_pkg_swr.KeyedMutator<GetGaugeData>;
|
|
1064
1001
|
data: GetGaugeData | undefined;
|
|
1065
1002
|
error: any;
|
|
1066
|
-
mutate:
|
|
1003
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<GetGaugeData>;
|
|
1067
1004
|
isValidating: boolean;
|
|
1068
1005
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1069
1006
|
};
|
|
@@ -1098,6 +1035,21 @@ declare const useStakedData: (stakingConfigs: StakingConfig[]) => {
|
|
|
1098
1035
|
isLoadingBalances: boolean;
|
|
1099
1036
|
isLoadingPositions: boolean;
|
|
1100
1037
|
isValidatingPositions: boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
* Hard error: the RPC fast-path could not produce staked balances (wallet
|
|
1040
|
+
* balances or exchange-rate reads failed). Price and earnings backend
|
|
1041
|
+
* failures are intentionally excluded — those degrade gracefully (USD/APR
|
|
1042
|
+
* render as "—", earnings stop loading) so RPC-derived amounts still show.
|
|
1043
|
+
*/
|
|
1044
|
+
error: any;
|
|
1045
|
+
/** Set when the earnings (slow path) request failed. */
|
|
1046
|
+
positionsError: any;
|
|
1047
|
+
/**
|
|
1048
|
+
* True once the earnings (slow path) request has settled — resolved or
|
|
1049
|
+
* errored. Consumers should stop showing an earnings loading state once
|
|
1050
|
+
* this is true, even if `data` never arrives (backend outage).
|
|
1051
|
+
*/
|
|
1052
|
+
earningsSettled: boolean;
|
|
1101
1053
|
};
|
|
1102
1054
|
|
|
1103
1055
|
type UseStakedBeraSnapshot = Record<Address, VaultStatsByDayResponse>;
|
|
@@ -1110,9 +1062,7 @@ type StakingVaultEntry = {
|
|
|
1110
1062
|
address: Address;
|
|
1111
1063
|
underlyingAsset: Address;
|
|
1112
1064
|
};
|
|
1113
|
-
declare const useStakingVaultsMetadata: (vaults?: StakingVaultEntry[]) =>
|
|
1114
|
-
refreshInterval: POLLING;
|
|
1115
|
-
}>;
|
|
1065
|
+
declare const useStakingVaultsMetadata: (vaults?: StakingVaultEntry[]) => _berachain_utils_pkg_swr.SWRResponse<VaultMetadata[], any, any>;
|
|
1116
1066
|
|
|
1117
1067
|
declare function useTotalStakedAmount({ vaultAddresses, }: {
|
|
1118
1068
|
vaultAddresses: Address$1[];
|
|
@@ -1128,7 +1078,7 @@ interface RewardVault {
|
|
|
1128
1078
|
stakeToken: Address;
|
|
1129
1079
|
address: Address;
|
|
1130
1080
|
}
|
|
1131
|
-
declare const useVaultAddress: (vaultAddress: Address) =>
|
|
1081
|
+
declare const useVaultAddress: (vaultAddress: Address) => _berachain_utils_pkg_swr.SWRResponse<{
|
|
1132
1082
|
stakeToken: `0x${string}`;
|
|
1133
1083
|
address: `0x${string}`;
|
|
1134
1084
|
}, any, any>;
|
|
@@ -1222,7 +1172,7 @@ declare function useTokenCurrentPrices({ addressIn, }?: {
|
|
|
1222
1172
|
[x: string]: TokenPriceInfo | undefined;
|
|
1223
1173
|
};
|
|
1224
1174
|
error: any;
|
|
1225
|
-
mutate:
|
|
1175
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<TokenCurrentPriceMap>;
|
|
1226
1176
|
isValidating: boolean;
|
|
1227
1177
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1228
1178
|
};
|
|
@@ -1243,6 +1193,7 @@ declare function useTokenPrices({ tokens, }?: {
|
|
|
1243
1193
|
tokens?: TokenPriceInput[];
|
|
1244
1194
|
}, options?: DefaultHookOptions): {
|
|
1245
1195
|
isLoading: boolean;
|
|
1196
|
+
error: any;
|
|
1246
1197
|
data: TokenPriceOutput[];
|
|
1247
1198
|
priceMap: TokenPriceMap;
|
|
1248
1199
|
getTokenPrice: (token?: TokenPriceInput) => number | undefined;
|
|
@@ -1253,6 +1204,7 @@ declare function useTokenPrice({ token }: {
|
|
|
1253
1204
|
}, options?: DefaultHookOptions): {
|
|
1254
1205
|
data: number | undefined;
|
|
1255
1206
|
isLoading: boolean;
|
|
1207
|
+
error: any;
|
|
1256
1208
|
};
|
|
1257
1209
|
|
|
1258
1210
|
declare function useTokens(): {
|
|
@@ -1275,7 +1227,7 @@ declare function useTokens(): {
|
|
|
1275
1227
|
|
|
1276
1228
|
declare function useTotalSupply({ address }: {
|
|
1277
1229
|
address: Address | undefined;
|
|
1278
|
-
}):
|
|
1230
|
+
}): _berachain_utils_pkg_swr.SWRResponse<bigint, any, any>;
|
|
1279
1231
|
|
|
1280
1232
|
/**
|
|
1281
1233
|
*
|
|
@@ -1292,7 +1244,7 @@ declare function useBeraContractWrite({ onlyPermissionless, onSuccess, onError,
|
|
|
1292
1244
|
onlyPermissionless?: boolean;
|
|
1293
1245
|
}): UseContractWriteApi;
|
|
1294
1246
|
|
|
1295
|
-
declare const useGetVerifiedAbi: (address?: string) =>
|
|
1247
|
+
declare const useGetVerifiedAbi: (address?: string) => _berachain_utils_pkg_swr.SWRResponse<string, any, any>;
|
|
1296
1248
|
|
|
1297
1249
|
type UseHistoryStateOptions<T> = {
|
|
1298
1250
|
key: string;
|
|
@@ -1331,14 +1283,14 @@ declare const useAllValidators: (variables: GetValidatorsQueryVariables & BeraJS
|
|
|
1331
1283
|
|
|
1332
1284
|
declare function useApiEnrichedAllocation({ allocation, }: {
|
|
1333
1285
|
allocation: ValidatorRewardAllocation | undefined;
|
|
1334
|
-
}):
|
|
1286
|
+
}): _berachain_utils_pkg_swr.SWRResponse<_berachain_graphql_pol_api.ApiRewardAllocationWeightFragment[], any, any>;
|
|
1335
1287
|
|
|
1336
1288
|
interface UsePollValidatorInfoResponse extends DefaultHookReturnType<GetValidatorQuery> {
|
|
1337
1289
|
}
|
|
1338
1290
|
declare const useApiValidatorQueryKey: (id: Address) => readonly ["useApiValidator", `0x${string}`] | null;
|
|
1339
1291
|
declare const useApiValidator: (id: Address, options?: DefaultHookOptions) => UsePollValidatorInfoResponse;
|
|
1340
1292
|
|
|
1341
|
-
declare function useBaselineRewardAllocation():
|
|
1293
|
+
declare function useBaselineRewardAllocation(): _berachain_utils_pkg_swr.SWRResponse<ValidatorRewardAllocation, any, any>;
|
|
1342
1294
|
|
|
1343
1295
|
declare const useDailyValidatorBlockStats: ({ pubKey, first, }: {
|
|
1344
1296
|
pubKey: Address | undefined;
|
|
@@ -1349,7 +1301,7 @@ declare function useDefaultRewardAllocation(options?: DefaultHookOptions): {
|
|
|
1349
1301
|
refresh: () => Promise<ValidatorRewardAllocation | undefined>;
|
|
1350
1302
|
data: ValidatorRewardAllocation | undefined;
|
|
1351
1303
|
error: any;
|
|
1352
|
-
mutate:
|
|
1304
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<ValidatorRewardAllocation | undefined>;
|
|
1353
1305
|
isValidating: boolean;
|
|
1354
1306
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1355
1307
|
};
|
|
@@ -1420,7 +1372,7 @@ declare const useUserStakingPositions: ({ account, validatorAddress, }: {
|
|
|
1420
1372
|
refresh: () => void;
|
|
1421
1373
|
data: UserStakingPoolPosition[] | undefined;
|
|
1422
1374
|
error: any;
|
|
1423
|
-
mutate:
|
|
1375
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<UserStakingPoolPosition[]>;
|
|
1424
1376
|
isValidating: boolean;
|
|
1425
1377
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1426
1378
|
};
|
|
@@ -1442,12 +1394,10 @@ declare function useValidator({ pubkey }: {
|
|
|
1442
1394
|
dynamicData: {
|
|
1443
1395
|
activeBoostAmount: string;
|
|
1444
1396
|
queuedBoostAmount: string;
|
|
1445
|
-
|
|
1446
|
-
usersQueuedBoostCount: number;
|
|
1447
|
-
allTimeDistributedBGTAmount: string;
|
|
1397
|
+
allTimeDistributedRewards: string;
|
|
1448
1398
|
rewardRate: string;
|
|
1449
1399
|
stakedBeraAmount: string;
|
|
1450
|
-
|
|
1400
|
+
lastDayDistributedRewards: string;
|
|
1451
1401
|
lastDayProposedBlockCount: number;
|
|
1452
1402
|
activeBoostAmountRank: number;
|
|
1453
1403
|
boostApr: GqlValidatorDynamicData["boostApr"];
|
|
@@ -1476,10 +1426,10 @@ declare function useValidator({ pubkey }: {
|
|
|
1476
1426
|
address: `0x${string}`;
|
|
1477
1427
|
dynamicData?: {
|
|
1478
1428
|
__typename?: "GqlRewardVaultDynamicData";
|
|
1479
|
-
|
|
1429
|
+
allTimeRewards: string;
|
|
1480
1430
|
apr?: number | null;
|
|
1481
|
-
|
|
1482
|
-
|
|
1431
|
+
rewardCapturePercentage: number;
|
|
1432
|
+
rewardCapturePerBlock: number;
|
|
1483
1433
|
activeIncentivesValueUsd: string;
|
|
1484
1434
|
activeIncentivesRateUsd: string;
|
|
1485
1435
|
tvl?: number | null;
|
|
@@ -1557,7 +1507,7 @@ declare const useValidatorEstimatedBgtPerYear: (validator: ApiValidatorMinimalFr
|
|
|
1557
1507
|
declare function useValidatorIncentiveDistribution({ pubkey, dayRange, }: {
|
|
1558
1508
|
pubkey: Address | undefined;
|
|
1559
1509
|
dayRange: number;
|
|
1560
|
-
}): DefaultHookReturnType<
|
|
1510
|
+
}): DefaultHookReturnType<ValidatorIncentivesResponse>;
|
|
1561
1511
|
|
|
1562
1512
|
declare function useValidatorQueuedCommission(pubKey: Address, options?: DefaultHookOptions): DefaultHookReturnType<ValidatorQueuedCommission | undefined | null>;
|
|
1563
1513
|
|
|
@@ -1579,7 +1529,7 @@ declare function useValidatorRewardAllocation(pubKey: Address, options?: Default
|
|
|
1579
1529
|
isNeverSet: boolean;
|
|
1580
1530
|
} | undefined;
|
|
1581
1531
|
error: any;
|
|
1582
|
-
mutate:
|
|
1532
|
+
mutate: _berachain_utils_pkg_swr.KeyedMutator<{
|
|
1583
1533
|
activeRewardAllocation: ValidatorRewardAllocation;
|
|
1584
1534
|
setRewardAllocation: ValidatorRewardAllocation;
|
|
1585
1535
|
isBaseline: boolean;
|
|
@@ -1589,4 +1539,4 @@ declare function useValidatorRewardAllocation(pubKey: Address, options?: Default
|
|
|
1589
1539
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1590
1540
|
};
|
|
1591
1541
|
|
|
1592
|
-
export { IHoneySwapState, IUseContractWriteArgs, type LiquidityMismatchInfo, type ManagedValidatorRole, type OnChainPoolFragment, type Oracle, OracleMode, type RewardVault, type StakingVaultEntry, type TokenPriceInput, type TokenPriceMap, type TokenPriceOutput, USE_AGGREGATORS_QUOTES_QUERY_KEY, type UseBendDemultiply, type UseBendMultiply, type UseCappedGloballyResponse, type UseCappedRelativelyResponse, type UseCollateralWeightsResponse, UseContractWriteApi, type UseIsBadCollateralResponse, type UseMultipleTokenInformationResponse, type UsePollAllowancesArgs, type UsePollAllowancesResponse, type UsePollBalancesResponse, type UsePollMarketsResponse, type UsePollValidatorInfoResponse, type UsePollWalletBalancesArgs, type UseRewardVaultResponse, type UseStakingTokenInformationResponse, type UseTokenInformationArgs, type UseTokenInformationResponse, useAggregatorsQuotes, useAggregatorsRouterFeeBps, useAllUserPools, useAllUserPoolsQueryKey, useAllValidators, useAllValidatorsQueryKey, useApiEnrichedAllocation, useApiPool, useApiPoolQueryKey, useApiValidator, useApiValidatorQueryKey, useAutoclaimedIncentives, useBaselineRewardAllocation, useBendDemultiply, useBendMultiply, useBendZapSupply, useBendZapSupplyHelper, useBeraContractWrite, useBeraCurrentPrice, useBgtAprSimulation, useBgtUnstakedBalance, useBlockToTimestamp, useCappedGlobally, useCappedRelatively, useClaimableFees, useCollateralWeights, useCreatePool, useDailyValidatorBlockStats, useDefaultRewardAllocation, useEnsoSwapBundle, useEnsoUserTokensWithBalances, useGetConvertToAssets, useGetVerifiedAbi, useGlobalLiquidityAndSwapVolume, useHighestVaultsAPR, useHistoryState, useHoney24hVolume, useHoneyAlerts, useHoneyBalances, useHoneyChartData, useHoneyVaultsBalance, useIsBadCollateralAsset, useIsBasketModeEnabled, useLiquidityMismatch, useLpPosition, useManagedValidatorRole, useMultipleTokenApprovalsWithSlippage, useMultipleTokenInformation, type useMultipleTokenInformationArgs, useOnChainPoolData, useOnChainPoolDataQueryKey, useOnChainValidator, usePollAllowances, usePollBalance, usePollGlobalData, usePollMarkets, usePollMarketsQueryKey, usePollPoolCreationRelayerApproval, usePollWalletBalances, usePool, usePoolEvents, usePoolHistoricalData, usePools, usePoolsQueryKey, usePrevious, usePriceImpact, usePythLatestPrices, usePythUpdateFee, useQueuedBeraUnlock, useRewardTokenToBeraRate, useRewardVault, useRewardVaultBalanceFromStakingToken, useRewardVaultFromToken, useRewardVaultIncentives, useRewardVaultQueryKey, useRewardVaultRewards, useRewardVaults, useRewardVaultsQueryKey, useSingleAggregatorQuote, useStakedAPR, useStakedData, useStakedSnapshots, useStakingPoolBatch, useStakingTokenInformation, type useStakingTokenInformationArgs, useStakingVaultsMetadata, useTokenCurrentPrice, useTokenCurrentPrices, useTokenInformation, useTokenPrice, useTokenPrices, useTokens, useTotalStakedAmount, useTotalSupply, useUserActiveValidators, useUserBoostsOnValidator, useUserClaimableIncentives, useUserStakingPositions, useUserVaultInfo, useUserVaults, useValidator, useValidatorAnalytics, useValidatorCommission, useValidatorEstimatedBgtPerYear, useValidatorIncentiveDistribution, useValidatorQueuedCommission, useValidatorQueuedOperatorAddress, useValidatorQueuedRewardAllocation, useValidatorRewardAllocation, useVaultAddress, useVaultHistory, useVaultValidators, useZapStakeBera };
|
|
1542
|
+
export { IHoneySwapState, IUseContractWriteArgs, type LiquidityMismatchInfo, type ManagedValidatorRole, type OnChainPoolFragment, type Oracle, OracleMode, type RewardVault, type StakingVaultEntry, type TokenPriceInput, type TokenPriceMap, type TokenPriceOutput, USE_AGGREGATORS_QUOTES_QUERY_KEY, type UseBendDemultiply, type UseBendMultiply, type UseCappedGloballyResponse, type UseCappedRelativelyResponse, type UseCollateralWeightsResponse, UseContractWriteApi, type UseIsBadCollateralResponse, type UseMultipleTokenInformationResponse, type UsePollAllowancesArgs, type UsePollAllowancesResponse, type UsePollBalancesResponse, type UsePollMarketsResponse, type UsePollValidatorInfoResponse, type UsePollWalletBalancesArgs, type UseRewardVaultResponse, type UseStakingTokenInformationResponse, type UseTokenInformationArgs, type UseTokenInformationResponse, useAggregatorsQuotes, useAggregatorsRouterFeeBps, useAllUserPools, useAllUserPoolsQueryKey, useAllValidators, useAllValidatorsQueryKey, useApiEnrichedAllocation, useApiPool, useApiPoolQueryKey, useApiValidator, useApiValidatorQueryKey, useAutoclaimedIncentives, useAutoclaimedIncentivesTxHash, useBaselineRewardAllocation, useBendDemultiply, useBendMultiply, useBendZapSupply, useBendZapSupplyHelper, useBeraContractWrite, useBeraCurrentPrice, useBgtAprSimulation, useBgtIncentiveDistributorPaused, useBgtUnstakedBalance, useBlockToTimestamp, useCappedGlobally, useCappedRelatively, useClaimableFees, useCollateralWeights, useCreatePool, useDailyValidatorBlockStats, useDefaultRewardAllocation, useEnsoSwapBundle, useEnsoUserTokensWithBalances, useGetConvertToAssets, useGetVerifiedAbi, useGlobalLiquidityAndSwapVolume, useHighestVaultsAPR, useHistoryState, useHoney24hVolume, useHoneyAlerts, useHoneyBalances, useHoneyChartData, useHoneyVaultsBalance, useIsBadCollateralAsset, useIsBasketModeEnabled, useLiquidityMismatch, useLpPosition, useManagedValidatorRole, useMultipleTokenApprovalsWithSlippage, useMultipleTokenInformation, type useMultipleTokenInformationArgs, useOnChainPoolData, useOnChainPoolDataQueryKey, useOnChainValidator, usePollAllowances, usePollBalance, usePollGlobalData, usePollMarkets, usePollMarketsQueryKey, usePollPoolCreationRelayerApproval, usePollWalletBalances, usePool, usePoolEvents, usePoolHistoricalData, usePools, usePoolsQueryKey, usePrevious, usePriceImpact, usePythLatestPrices, usePythUpdateFee, useQueuedBeraUnlock, useRewardTokenToBeraRate, useRewardVault, useRewardVaultBalanceFromStakingToken, useRewardVaultFromToken, useRewardVaultIncentives, useRewardVaultQueryKey, useRewardVaultRewards, useRewardVaults, useRewardVaultsQueryKey, useSingleAggregatorQuote, useStakedAPR, useStakedData, useStakedSnapshots, useStakingPoolBatch, useStakingTokenInformation, type useStakingTokenInformationArgs, useStakingVaultsMetadata, useTokenCurrentPrice, useTokenCurrentPrices, useTokenInformation, useTokenPrice, useTokenPrices, useTokens, useTotalStakedAmount, useTotalSupply, useUserActiveValidators, useUserBoostsOnValidator, useUserClaimableIncentives, useUserStakingPositions, useUserVaultInfo, useUserVaults, useValidator, useValidatorAnalytics, useValidatorCommission, useValidatorEstimatedBgtPerYear, useValidatorIncentiveDistribution, useValidatorQueuedCommission, useValidatorQueuedOperatorAddress, useValidatorQueuedRewardAllocation, useValidatorRewardAllocation, useVaultAddress, useVaultHistory, useVaultValidators, useZapStakeBera };
|