@berachain/berajs 0.2.8-beta.0 → 0.2.8-beta.10
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/RequestError-BRIiJgHk.d.ts +144 -0
- package/dist/RequestError-DSUzJ1Iy.d.cts +144 -0
- package/dist/abi/exports.cjs.map +1 -1
- package/dist/actions/exports.cjs +1 -1
- package/dist/actions/exports.cjs.map +1 -1
- package/dist/actions/exports.d.cts +22 -105
- package/dist/actions/exports.d.ts +22 -105
- package/dist/actions/exports.mjs +1 -1
- package/dist/actions/exports.mjs.map +1 -1
- package/dist/actions/governance/exports.cjs +2 -0
- package/dist/actions/governance/exports.cjs.map +1 -0
- package/dist/actions/governance/exports.d.cts +140 -0
- package/dist/actions/governance/exports.d.ts +140 -0
- package/dist/actions/governance/exports.mjs +2 -0
- package/dist/actions/governance/exports.mjs.map +1 -0
- package/dist/chunk-33XNWMPP.cjs +2 -0
- package/dist/chunk-33XNWMPP.cjs.map +1 -0
- package/dist/chunk-4TALWNXE.cjs +2 -0
- package/dist/chunk-4TALWNXE.cjs.map +1 -0
- package/dist/chunk-54BTOQE3.cjs +2 -0
- package/dist/chunk-54BTOQE3.cjs.map +1 -0
- package/dist/chunk-5QAFKFM5.mjs +2 -0
- package/dist/chunk-5QAFKFM5.mjs.map +1 -0
- package/dist/chunk-6DIA6PXV.cjs +2 -0
- package/dist/chunk-6DIA6PXV.cjs.map +1 -0
- package/dist/{chunk-NMH7LHPW.cjs → chunk-6JJIZCVY.cjs} +2 -2
- package/dist/chunk-6JJIZCVY.cjs.map +1 -0
- package/dist/chunk-BE6B4PQF.cjs +2 -0
- package/dist/chunk-BE6B4PQF.cjs.map +1 -0
- package/dist/chunk-CHFETMC6.cjs +4 -0
- package/dist/chunk-CHFETMC6.cjs.map +1 -0
- package/dist/{chunk-I7M43BB4.cjs → chunk-D6L7LTA2.cjs} +2 -2
- package/dist/chunk-D6L7LTA2.cjs.map +1 -0
- package/dist/chunk-DDEQFR3M.cjs.map +1 -1
- package/dist/chunk-ENT2OSXT.mjs +2 -0
- package/dist/chunk-ENT2OSXT.mjs.map +1 -0
- package/dist/{chunk-74QD4JAH.mjs → chunk-GXV2JA36.mjs} +2 -2
- package/dist/chunk-GXV2JA36.mjs.map +1 -0
- package/dist/chunk-H6ZO4SLB.mjs +4 -0
- package/dist/chunk-H6ZO4SLB.mjs.map +1 -0
- package/dist/chunk-JDDRTHFG.mjs +2 -0
- package/dist/chunk-JDDRTHFG.mjs.map +1 -0
- package/dist/{chunk-T5FSQ3YE.mjs → chunk-JDZGYU5T.mjs} +2 -2
- package/dist/{chunk-T5FSQ3YE.mjs.map → chunk-JDZGYU5T.mjs.map} +1 -1
- package/dist/chunk-JIPSTWKO.mjs +2 -0
- package/dist/{chunk-COMMLZ3O.mjs.map → chunk-JIPSTWKO.mjs.map} +1 -1
- package/dist/chunk-JSTCUTXP.cjs +2 -0
- package/dist/chunk-JSTCUTXP.cjs.map +1 -0
- package/dist/{chunk-MJZHJFZO.mjs → chunk-JXM5S4IU.mjs} +2 -2
- package/dist/chunk-K5L2B4DU.mjs +2 -0
- package/dist/{chunk-FM3WDBFH.mjs.map → chunk-K5L2B4DU.mjs.map} +1 -1
- package/dist/chunk-KUQEX7H3.mjs +2 -0
- package/dist/chunk-KUQEX7H3.mjs.map +1 -0
- package/dist/chunk-NXXMW2O7.mjs +2 -0
- package/dist/chunk-NXXMW2O7.mjs.map +1 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -1
- package/dist/chunk-OUD27MU7.cjs.map +1 -1
- package/dist/chunk-PRLVZIKD.mjs +2 -0
- package/dist/chunk-PRLVZIKD.mjs.map +1 -0
- package/dist/chunk-QVIAMSZ6.cjs +2 -0
- package/dist/chunk-QVIAMSZ6.cjs.map +1 -0
- package/dist/chunk-RCWM55DE.cjs +2 -0
- package/dist/chunk-RCWM55DE.cjs.map +1 -0
- package/dist/chunk-REWME3FY.cjs +2 -0
- package/dist/chunk-REWME3FY.cjs.map +1 -0
- package/dist/chunk-RJN36GBU.mjs +2 -0
- package/dist/chunk-RJN36GBU.mjs.map +1 -0
- package/dist/chunk-RWOICHRW.cjs.map +1 -1
- package/dist/chunk-S4CDSVLK.cjs +2 -0
- package/dist/chunk-S4CDSVLK.cjs.map +1 -0
- package/dist/chunk-WLJHFHKF.mjs +2 -0
- package/dist/chunk-WLJHFHKF.mjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
- package/dist/chunk-XNJLSA6P.cjs.map +1 -1
- package/dist/chunk-XZC34BHM.cjs +2 -0
- package/dist/chunk-XZC34BHM.cjs.map +1 -0
- package/dist/chunk-Y2FETC6T.cjs +2 -0
- package/dist/chunk-Y2FETC6T.cjs.map +1 -0
- package/dist/chunk-ZW2N63FI.mjs +2 -0
- package/dist/chunk-ZW2N63FI.mjs.map +1 -0
- package/dist/contexts/exports.cjs +1 -1
- package/dist/contexts/exports.cjs.map +1 -1
- package/dist/contexts/exports.mjs +1 -1
- package/dist/contexts/exports.mjs.map +1 -1
- package/dist/enum/exports.cjs +1 -1
- package/dist/enum/exports.cjs.map +1 -1
- package/dist/enum/exports.d.cts +1 -1
- package/dist/enum/exports.d.ts +1 -1
- package/dist/enum/exports.mjs +1 -1
- package/dist/enum/exports.mjs.map +1 -1
- package/dist/enum/governance/exports.cjs +2 -0
- package/dist/enum/governance/exports.cjs.map +1 -0
- package/dist/enum/governance/exports.d.cts +60 -0
- package/dist/enum/governance/exports.d.ts +60 -0
- package/dist/enum/governance/exports.mjs +2 -0
- package/dist/enum/governance/exports.mjs.map +1 -0
- package/dist/errors/exports.cjs +1 -1
- package/dist/errors/exports.cjs.map +1 -1
- package/dist/errors/exports.d.cts +3 -89
- package/dist/errors/exports.d.ts +3 -89
- package/dist/errors/exports.mjs +1 -1
- package/dist/{getValidatorQueuedOperatorAddress-BfKrMaui.d.cts → getValidatorQueuedOperatorAddress-CPuIw7n5.d.cts} +2 -2
- package/dist/{getValidatorQueuedOperatorAddress-Bef1e1c_.d.ts → getValidatorQueuedOperatorAddress-CbZQ0kv2.d.ts} +2 -2
- package/dist/{global.d-DW7dpBsz.d.cts → global.d-B2WavzCY.d.cts} +3 -239
- package/dist/{global.d-CrPSEwwf.d.ts → global.d-D8byjWYx.d.ts} +3 -239
- package/dist/hooks/exports.cjs +3 -3
- package/dist/hooks/exports.cjs.map +1 -1
- package/dist/hooks/exports.d.cts +19 -198
- package/dist/hooks/exports.d.ts +19 -198
- package/dist/hooks/exports.mjs +3 -3
- package/dist/hooks/exports.mjs.map +1 -1
- package/dist/hooks/governance/exports.cjs +2 -0
- package/dist/hooks/governance/exports.cjs.map +1 -0
- package/dist/hooks/governance/exports.d.cts +181 -0
- package/dist/hooks/governance/exports.d.ts +181 -0
- package/dist/hooks/governance/exports.mjs +2 -0
- package/dist/hooks/governance/exports.mjs.map +1 -0
- package/dist/pol.d-o6Iw75bK.d.cts +134 -0
- package/dist/pol.d-qR8bGEP5.d.ts +134 -0
- package/dist/{txnEnum-CCuQUFlh.d.cts → txnEnum-CwAJN4zV.d.cts} +3 -60
- package/dist/{txnEnum-CCuQUFlh.d.ts → txnEnum-CwAJN4zV.d.ts} +3 -60
- package/dist/types/exports.cjs.map +1 -1
- package/dist/types/exports.d.cts +7 -7
- package/dist/types/exports.d.ts +7 -7
- package/dist/types/governance/exports.cjs +1 -0
- package/dist/types/governance/exports.cjs.map +1 -0
- package/dist/types/governance/exports.d.cts +109 -0
- package/dist/types/governance/exports.d.ts +109 -0
- package/dist/types/governance/exports.mjs +1 -0
- package/dist/types/governance/exports.mjs.map +1 -0
- package/dist/utils/exports.cjs +1 -1
- package/dist/utils/exports.cjs.map +1 -1
- package/dist/utils/exports.d.cts +10 -2
- package/dist/utils/exports.d.ts +10 -2
- package/dist/utils/exports.mjs +1 -1
- package/dist/utils/exports.mjs.map +1 -1
- package/package.json +16 -7
- package/src/actions/clients/BeraApolloClient.ts +9 -0
- package/src/actions/clients/getApolloClient.ts +23 -6
- package/src/actions/dex/getOnChainPool.ts +1 -1
- package/src/actions/enso/getBendMultiplyBundle.ts +9 -2
- package/src/actions/enso/util.ts +6 -8
- package/src/actions/exports.ts +1 -10
- package/src/actions/governance/checkProposalField.ts +108 -54
- package/src/actions/governance/computeActualStatus.ts +7 -3
- package/src/actions/governance/exports.ts +9 -0
- package/src/actions/governance/getAllProposals.ts +15 -8
- package/src/actions/governance/getBodyErrors.ts +13 -5
- package/src/actions/governance/getDecodedFunctionData.ts +31 -22
- package/src/actions/governance/getProposalDetails.ts +8 -4
- package/src/actions/governance/getProposalFromTx.ts +19 -10
- package/src/actions/governance/getProposalParams.ts +17 -17
- package/src/actions/governance/getProposalVotes.ts +7 -3
- package/src/actions/governance/getQuorum.ts +7 -7
- package/src/actions/governance/parseProposalBody.ts +19 -9
- package/src/actions/honey/getChartData.ts +5 -5
- package/src/actions/honey/getHoney24hVolume.ts +30 -0
- package/src/actions/honey/getHoneyPythPriceOracle.ts +1 -1
- package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
- package/src/actions/pol/getEarnedStakedBeraVault.ts +12 -2
- package/src/actions/pol/getRewardVaultBeaconImplementation.ts +1 -1
- package/src/actions/pol/getRewardVaultIncentives.ts +15 -15
- package/src/actions/pol/getStakingDailyAssets.ts +7 -1
- package/src/actions/pol/getTotalStakedAmount.ts +1 -1
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaultsReward.ts +1 -1
- package/src/actions/tokens/getTokenInformation.ts +8 -15
- package/src/actions/tokens/getUnderlyingToken.ts +1 -1
- package/src/actions/validators/getUserBoosts.ts +1 -1
- package/src/enum/exports.ts +0 -1
- package/src/enum/governance/exports.ts +1 -0
- package/src/enum/txnEnum.ts +2 -0
- package/src/errors/BeraError.ts +7 -2
- package/src/errors/RequestError.ts +2 -1
- package/src/hooks/dex/usePoolHistoricalData.ts +1 -1
- package/src/hooks/enso/useBendZapSupply.ts +1 -1
- package/src/hooks/exports.ts +1 -15
- package/src/hooks/governance/exports.ts +14 -0
- package/src/hooks/honey/useHoney24hVolume.ts +16 -0
- package/src/hooks/perps/usePythUpdateFee.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/src/types/exports.ts +0 -1
- package/src/types/governance/exports.ts +1 -0
- package/src/utils/beraFetch.ts +70 -15
- package/src/utils/getErrorResponse.ts +1 -1
- package/dist/RequestError-A8XJ6QR9.d.cts +0 -57
- package/dist/RequestError-Dk97z8rm.d.ts +0 -57
- package/dist/chunk-2YBHAMDV.cjs +0 -2
- package/dist/chunk-2YBHAMDV.cjs.map +0 -1
- package/dist/chunk-57RINXU6.cjs +0 -2
- package/dist/chunk-57RINXU6.cjs.map +0 -1
- package/dist/chunk-74QD4JAH.mjs.map +0 -1
- package/dist/chunk-74WA35RI.cjs +0 -2
- package/dist/chunk-74WA35RI.cjs.map +0 -1
- package/dist/chunk-BEKH5EYT.mjs +0 -2
- package/dist/chunk-BEKH5EYT.mjs.map +0 -1
- package/dist/chunk-CF3LFNXG.cjs +0 -2
- package/dist/chunk-CF3LFNXG.cjs.map +0 -1
- package/dist/chunk-COMMLZ3O.mjs +0 -2
- package/dist/chunk-DK42F2ZM.cjs +0 -2
- package/dist/chunk-DK42F2ZM.cjs.map +0 -1
- package/dist/chunk-FCZ72ML6.mjs +0 -4
- package/dist/chunk-FCZ72ML6.mjs.map +0 -1
- package/dist/chunk-FM3WDBFH.mjs +0 -2
- package/dist/chunk-I7M43BB4.cjs.map +0 -1
- package/dist/chunk-IDFMLLDY.mjs +0 -2
- package/dist/chunk-IDFMLLDY.mjs.map +0 -1
- package/dist/chunk-LHR24OO7.cjs +0 -4
- package/dist/chunk-LHR24OO7.cjs.map +0 -1
- package/dist/chunk-LNVR4BW6.cjs +0 -2
- package/dist/chunk-LNVR4BW6.cjs.map +0 -1
- package/dist/chunk-NMH7LHPW.cjs.map +0 -1
- package/dist/chunk-NVHV2LDK.cjs +0 -2
- package/dist/chunk-NVHV2LDK.cjs.map +0 -1
- package/dist/chunk-PLIH6KQM.mjs +0 -2
- package/dist/chunk-PLIH6KQM.mjs.map +0 -1
- package/dist/chunk-QRAIGQF2.mjs +0 -2
- package/dist/chunk-QRAIGQF2.mjs.map +0 -1
- package/src/actions/honey/getHoneyGlobalData.ts +0 -21
- package/src/hooks/honey/useHoneyGlobalData.ts +0 -23
- /package/dist/{chunk-MJZHJFZO.mjs.map → chunk-JXM5S4IU.mjs.map} +0 -0
package/dist/hooks/exports.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as swr__internal from 'swr/_internal';
|
|
2
2
|
import * as swr from 'swr';
|
|
3
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,
|
|
6
|
-
export { T as TxnEventKeys } from '../global.d-
|
|
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-CbZQ0kv2.js';
|
|
5
|
+
import { D as DefaultHookOptions, a as DefaultHookReturnType, b as IUseContractWriteArgs, U as UseContractWriteApi } from '../global.d-D8byjWYx.js';
|
|
6
|
+
export { T as TxnEventKeys } from '../global.d-D8byjWYx.js';
|
|
7
7
|
import { S as SwapReferrer, A as Aggregators, a as PoolCreationStep } from '../dex-C_BB0b0O.js';
|
|
8
8
|
import * as viem from 'viem';
|
|
9
9
|
import { Address, Hex } from 'viem';
|
|
@@ -15,24 +15,20 @@ import { PoolType } from '@berachain-foundation/berancer-sdk';
|
|
|
15
15
|
import { SubgraphPoolFragment } from '@berachain/graphql/dex/subgraph';
|
|
16
16
|
import { P as POLLING } from '../polling-BKnyavLI.js';
|
|
17
17
|
import { BendDemultiplyBundleResponse, BendMultiplyBundleResponse, GetZapTransactionResponse } from '../types/exports.js';
|
|
18
|
-
import * as react from 'react';
|
|
19
|
-
import * as swr_infinite from 'swr/infinite';
|
|
20
|
-
import { SWRInfiniteResponse, SWRInfiniteKeyLoader } from 'swr/infinite';
|
|
21
|
-
import * as _berachain_graphql_governance from '@berachain/graphql/governance';
|
|
22
|
-
import { Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalStatus, ProposalSelectionFragment, ProposalWithVotesFragment, GetProposalVotesQueryVariables } from '@berachain/graphql/governance';
|
|
23
18
|
import { I as IHoneySwapState } from '../useHoneySwapState-B494PQDl.js';
|
|
24
19
|
export { r as reducer, u as useHoneySwapState } from '../useHoneySwapState-B494PQDl.js';
|
|
25
20
|
import * as _berachain_graphql_honey from '@berachain/graphql/honey';
|
|
26
|
-
import BigNumber from '@berachain/utils/pkg/bignumber.js';
|
|
27
21
|
import * as _berachain_graphql_pol_api from '@berachain/graphql/pol/api';
|
|
28
22
|
import { GqlRewardVaultFilter, ApiVaultFragment, GetVaultsQueryVariables, GetVaultHistoryQuery, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, GqlChain, GetValidatorQuery, ApiValidatorMinimalFragment } from '@berachain/graphql/pol/api';
|
|
23
|
+
import { S as StakingConfig, b as StakedBeraAsset, U as UserVaultInfo, B as BribeBoostRewardProof } from '../pol.d-qR8bGEP5.js';
|
|
29
24
|
import { Address as Address$1 } from '@berachain/config';
|
|
30
25
|
import { GetValidatorBlockStatsQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
31
26
|
import '@berachain/config/internal';
|
|
32
|
-
import '../txnEnum-CCuQUFlh.js';
|
|
33
27
|
import '@wagmi/core';
|
|
28
|
+
import '../txnEnum-CwAJN4zV.js';
|
|
34
29
|
import '../BeraError-_mQdkanr.js';
|
|
35
30
|
import 'react/jsx-runtime';
|
|
31
|
+
import 'react';
|
|
36
32
|
import '../honey-CYm0RWf4.js';
|
|
37
33
|
import '@berachain/config/internal/edge-config';
|
|
38
34
|
import '@ensofinance/sdk';
|
|
@@ -733,168 +729,6 @@ declare function useZapStakeBera({ inputToken, amount, underlyingToken, slippage
|
|
|
733
729
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
734
730
|
};
|
|
735
731
|
|
|
736
|
-
declare const useCreateProposal: ({ initialData, currentTopic, onError, }: {
|
|
737
|
-
initialData?: any;
|
|
738
|
-
currentTopic: GovernanceTopic;
|
|
739
|
-
onError: (e: CustomProposalErrors) => void;
|
|
740
|
-
}) => {
|
|
741
|
-
proposal: CustomProposal;
|
|
742
|
-
setProposal: react.Dispatch<react.SetStateAction<CustomProposal>>;
|
|
743
|
-
addProposalAction: () => void;
|
|
744
|
-
removeProposalAction: (idx: number) => void;
|
|
745
|
-
computeParamsAndErrors: () => readonly [`0x${string}`[], bigint[], `0x${string}`[], string] | undefined;
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Returns the amount of voting power that a wallet had when the voting period began.
|
|
750
|
-
* {@link https://docs.openzeppelin.com/contracts/5.x/api/governance#Votes-getPastVotes-address-uint256-}
|
|
751
|
-
*/
|
|
752
|
-
declare const useGetPastVotes: (args: {
|
|
753
|
-
wallet?: Address;
|
|
754
|
-
} & ({
|
|
755
|
-
proposalId?: bigint;
|
|
756
|
-
timepoint: number | bigint;
|
|
757
|
-
} | {
|
|
758
|
-
proposalId: bigint;
|
|
759
|
-
timepoint?: number | bigint;
|
|
760
|
-
})) => swr.SWRResponse<string, any, any>;
|
|
761
|
-
|
|
762
|
-
declare const useHasVoted: ({ proposalId, wallet, }: {
|
|
763
|
-
proposalId: string;
|
|
764
|
-
wallet?: Address;
|
|
765
|
-
}) => swr.SWRResponse<boolean, any, any>;
|
|
766
|
-
|
|
767
|
-
declare const useIsCanceller: ({ account, ...baseArgs }: {
|
|
768
|
-
account: Address | undefined;
|
|
769
|
-
} & BeraJS.BaseFunctionArgs) => swr.SWRResponse<boolean, any, {
|
|
770
|
-
refreshInterval: POLLING;
|
|
771
|
-
revalidateOnFocus: false;
|
|
772
|
-
}>;
|
|
773
|
-
|
|
774
|
-
type UsePollAllProposalsArgs = {
|
|
775
|
-
topic: string;
|
|
776
|
-
where?: Proposal_Filter;
|
|
777
|
-
perPage?: number;
|
|
778
|
-
orderBy?: Proposal_OrderBy;
|
|
779
|
-
orderDirection?: OrderDirection;
|
|
780
|
-
status_in?: ProposalStatus[];
|
|
781
|
-
text?: string;
|
|
782
|
-
autoRefreshProposals?: boolean;
|
|
783
|
-
};
|
|
784
|
-
type ProposalResult = {
|
|
785
|
-
data: ProposalSelectionFragment[][];
|
|
786
|
-
hasMore: boolean;
|
|
787
|
-
} & Omit<SWRInfiniteResponse<ProposalSelectionFragment[]>, "data">;
|
|
788
|
-
type PollAllProposalsKey = [
|
|
789
|
-
"usePollAllProposals",
|
|
790
|
-
number,
|
|
791
|
-
string,
|
|
792
|
-
Proposal_Filter | undefined,
|
|
793
|
-
ProposalStatus[] | undefined,
|
|
794
|
-
Proposal_OrderBy | undefined,
|
|
795
|
-
OrderDirection | undefined,
|
|
796
|
-
number,
|
|
797
|
-
string | undefined
|
|
798
|
-
] | null;
|
|
799
|
-
declare function usePollAllProposalsQueryKey(topic: string, args?: Partial<UsePollAllProposalsArgs>): (pageIndex: number, previousPageData?: ProposalSelectionFragment[]) => PollAllProposalsKey;
|
|
800
|
-
/**
|
|
801
|
-
* Fetch all proposals for a given topic
|
|
802
|
-
*/
|
|
803
|
-
declare function usePollAllProposals(args: UsePollAllProposalsArgs, options?: DefaultHookOptions & {
|
|
804
|
-
autoRefresh?: boolean;
|
|
805
|
-
}): ProposalResult;
|
|
806
|
-
|
|
807
|
-
interface UsePollProposalResponse extends DefaultHookReturnType<ProposalWithVotesFragment> {
|
|
808
|
-
}
|
|
809
|
-
/**
|
|
810
|
-
* Polls a proposal and returns the proposal details.
|
|
811
|
-
* Pulls data from the subgraph and onchain.
|
|
812
|
-
*
|
|
813
|
-
* @param proposalId - The ID of the proposal to poll
|
|
814
|
-
* @param options - Optional configuration options
|
|
815
|
-
* @param options.autoRefresh - If true, the data will be refreshed automatically based on the block number and status threshold
|
|
816
|
-
* @returns {UsePollProposalResponse} Object containing:
|
|
817
|
-
* - data: ProposalWithVotesFragment | undefined - The proposal data if successful
|
|
818
|
-
* - error: Error | undefined - Error object if request failed
|
|
819
|
-
* - isLoading: boolean - True while data is being fetched
|
|
820
|
-
* - isValidating: boolean - True while data is being revalidated
|
|
821
|
-
* - mutate: () => Promise<ProposalWithVotesFragment | undefined> - Function to manually refresh the data
|
|
822
|
-
* - refresh: () => Promise<void> - Function to manually refresh the data
|
|
823
|
-
*/
|
|
824
|
-
declare const usePollProposal: (proposalId: string, options?: DefaultHookOptions & {
|
|
825
|
-
autoRefresh?: boolean;
|
|
826
|
-
}) => UsePollProposalResponse;
|
|
827
|
-
|
|
828
|
-
declare const usePollProposalThreshold: (governorAddress: Address) => DefaultHookReturnType<{
|
|
829
|
-
votesThreshold: string;
|
|
830
|
-
}>;
|
|
831
|
-
|
|
832
|
-
type UsePollProposalVotesArgs = Omit<GetProposalVotesQueryVariables, "offset" | "limit">;
|
|
833
|
-
/**
|
|
834
|
-
* Fetches all the votes for a proposal from the Subgraph
|
|
835
|
-
* @param args - The arguments to pass to the query
|
|
836
|
-
* @param total - The total amount of pages of votes to fetch
|
|
837
|
-
*/
|
|
838
|
-
declare const usePollProposalVotes: (args: UsePollProposalVotesArgs, total: number) => swr_infinite.SWRInfiniteResponse<{
|
|
839
|
-
data: _berachain_graphql_governance.GetProposalVotesQuery;
|
|
840
|
-
}, any>;
|
|
841
|
-
declare const usePollProposalVotesQueryKey: ({ ...args }: UsePollProposalVotesArgs, total: number) => SWRInfiniteKeyLoader;
|
|
842
|
-
|
|
843
|
-
declare const usePollUserDelegates: (options?: DefaultHookOptions) => DefaultHookReturnType<{
|
|
844
|
-
delegate: Address;
|
|
845
|
-
currentVotes: string | undefined;
|
|
846
|
-
}>;
|
|
847
|
-
|
|
848
|
-
declare const useProposalFromTx: (txHash?: Address) => SWRResponse<ProposalWithVotesFragment | null>;
|
|
849
|
-
|
|
850
|
-
/**
|
|
851
|
-
* Timepoint used to retrieve user’s votes and quorum. If using block
|
|
852
|
-
* number (as per Compound’s Comp), the snapshot is performed at
|
|
853
|
-
* the end of this block. Hence, voting for this proposal starts at the beginning of the following block.
|
|
854
|
-
*
|
|
855
|
-
* {@link https://docs.openzeppelin.com/contracts/5.x/api/governance#IGovernor-proposalSnapshot-uint256-}
|
|
856
|
-
*/
|
|
857
|
-
declare const useProposalSnapshot: ({ proposalId, }: {
|
|
858
|
-
proposalId: number | bigint | string | undefined;
|
|
859
|
-
}) => SWRResponse<string>;
|
|
860
|
-
|
|
861
|
-
declare const useProposalState: ({ proposalId, governorAddress, }: {
|
|
862
|
-
proposalId: number | bigint | string | undefined;
|
|
863
|
-
governorAddress: Address;
|
|
864
|
-
}) => SWRResponse<string>;
|
|
865
|
-
|
|
866
|
-
declare const TimelockOperationState: {
|
|
867
|
-
readonly 0: "unset";
|
|
868
|
-
readonly 1: "waiting";
|
|
869
|
-
readonly 2: "ready";
|
|
870
|
-
readonly 3: "done";
|
|
871
|
-
};
|
|
872
|
-
/**
|
|
873
|
-
* Fetches the state of a proposal timelock
|
|
874
|
-
* @returns state of the proposal timelock (unset, waiting, ready, done)
|
|
875
|
-
*/
|
|
876
|
-
declare function useProposalTimelockState({ proposalTimelockId, timelockAddress, }: {
|
|
877
|
-
proposalTimelockId: Address | undefined;
|
|
878
|
-
timelockAddress: Address;
|
|
879
|
-
}): SWRResponse<(typeof TimelockOperationState)[keyof typeof TimelockOperationState]>;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* Queries the quorum for a given timestamp.
|
|
883
|
-
*
|
|
884
|
-
* @returns current quorum if timestamp is in the future.
|
|
885
|
-
*/
|
|
886
|
-
declare function useQuorum({ at }: {
|
|
887
|
-
at: number | string;
|
|
888
|
-
}, { isEnabled, }: {
|
|
889
|
-
isEnabled?: boolean;
|
|
890
|
-
}): {
|
|
891
|
-
data: number | undefined;
|
|
892
|
-
error: any;
|
|
893
|
-
mutate: swr.KeyedMutator<string>;
|
|
894
|
-
isValidating: boolean;
|
|
895
|
-
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
896
|
-
};
|
|
897
|
-
|
|
898
732
|
interface UseCappedGloballyResponse extends DefaultHookReturnType<boolean | undefined> {
|
|
899
733
|
}
|
|
900
734
|
declare const useCappedGlobally: ({ asset, amount, isMint, isBasketModeEnabled, }: {
|
|
@@ -919,6 +753,15 @@ declare const useCollateralWeights: ({ collateralList, }: {
|
|
|
919
753
|
collateralList: Token[] | undefined;
|
|
920
754
|
}, options?: DefaultHookOptions) => UseCollateralWeightsResponse;
|
|
921
755
|
|
|
756
|
+
declare function useHoney24hVolume(): {
|
|
757
|
+
refresh: () => Promise<BigNumber | undefined>;
|
|
758
|
+
data: BigNumber | undefined;
|
|
759
|
+
error: any;
|
|
760
|
+
mutate: swr.KeyedMutator<BigNumber>;
|
|
761
|
+
isValidating: boolean;
|
|
762
|
+
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
763
|
+
};
|
|
764
|
+
|
|
922
765
|
/**
|
|
923
766
|
* Interface defining the state props that we need without the entire IHoneySwapState
|
|
924
767
|
*/
|
|
@@ -989,32 +832,10 @@ declare const useHoneyBalances: () => DefaultHookReturnType<Record<Address, Bala
|
|
|
989
832
|
declare function useHoneyChartData({ days }: {
|
|
990
833
|
days: number;
|
|
991
834
|
}): {
|
|
992
|
-
refresh: () => Promise<_berachain_graphql_honey.
|
|
993
|
-
data: _berachain_graphql_honey.
|
|
994
|
-
error: any;
|
|
995
|
-
mutate: swr.KeyedMutator<_berachain_graphql_honey.GetChartDataQuery>;
|
|
996
|
-
isValidating: boolean;
|
|
997
|
-
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
declare function useHoneyGlobalData(): {
|
|
1001
|
-
data: {
|
|
1002
|
-
dailyVolume: BigNumber | undefined;
|
|
1003
|
-
__typename?: "Query";
|
|
1004
|
-
honeySnapshots?: {
|
|
1005
|
-
__typename?: "HoneySnapshot";
|
|
1006
|
-
id: string;
|
|
1007
|
-
allTimeVolume: string;
|
|
1008
|
-
totalVolume: string;
|
|
1009
|
-
timestamp: string;
|
|
1010
|
-
totalSupply: string;
|
|
1011
|
-
mintVolume: string;
|
|
1012
|
-
redeemVolume: string;
|
|
1013
|
-
}[] | undefined;
|
|
1014
|
-
};
|
|
1015
|
-
refresh: () => Promise<_berachain_graphql_honey.GetGlobalDataQuery | undefined>;
|
|
835
|
+
refresh: () => Promise<_berachain_graphql_honey.GetSnapshotsQuery | undefined>;
|
|
836
|
+
data: _berachain_graphql_honey.GetSnapshotsQuery | undefined;
|
|
1016
837
|
error: any;
|
|
1017
|
-
mutate: swr.KeyedMutator<_berachain_graphql_honey.
|
|
838
|
+
mutate: swr.KeyedMutator<_berachain_graphql_honey.GetSnapshotsQuery>;
|
|
1018
839
|
isValidating: boolean;
|
|
1019
840
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1020
841
|
};
|
|
@@ -1745,4 +1566,4 @@ declare function useValidatorRewardAllocation(pubKey: Address, options?: Default
|
|
|
1745
1566
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1746
1567
|
};
|
|
1747
1568
|
|
|
1748
|
-
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
|
|
1569
|
+
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, useBaselineRewardAllocation, useBendDemultiply, useBendMultiply, useBendZapSupply, useBendZapSupplyHelper, useBeraContractWrite, useBeraCurrentPrice, useBgtAprSimulation, useBgtUnstakedBalance, useBlockToTimestamp, useCappedGlobally, useCappedRelatively, useClaimableFees, useCollateralWeights, useCreatePool, useDailyValidatorBlockStats, useDefaultRewardAllocation, useEnsoSwapBundle, useEnsoUserTokensWithBalances, useExploitedTokens, useExploitedTokensQueryKey, 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, useValidatorQueuedCommission, useValidatorQueuedOperatorAddress, useValidatorQueuedRewardAllocation, useValidatorRewardAllocation, useVaultAddress, useVaultHistory, useVaultValidators, useZapStakeBera };
|