@berachain/berajs 0.2.8-beta.9 → 0.2.9
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-_mQdkanr.d.cts → BeraError-7-A5JYy_.d.ts} +31 -2
- package/dist/{HoneyConfigProvider-DVP_9KZn.d.ts → HoneyConfigProvider-Dkj-_a5x.d.ts} +1 -1
- package/dist/{RequestError-BRIiJgHk.d.ts → RequestError-DBOIV65x.d.ts} +1 -1
- package/dist/abi/exports.mjs +4452 -2
- package/dist/actions/clients/exports.d.ts +2 -0
- package/dist/actions/clients/exports.mjs +12 -0
- package/dist/actions/exports.d.ts +104 -189
- package/dist/actions/exports.mjs +853 -2
- package/dist/actions/governance/exports.d.ts +140 -0
- package/dist/actions/governance/exports.mjs +226 -0
- package/dist/actions/server/exports.d.ts +13 -0
- package/dist/actions/server/exports.mjs +27 -0
- package/dist/chunk-3EARVV7K.mjs +414 -0
- package/dist/chunk-4Z4AK6SH.mjs +211 -0
- package/dist/chunk-75M6TF7M.mjs +25 -0
- package/dist/chunk-AFN4CVD3.mjs +326 -0
- package/dist/chunk-BGMRHTBQ.mjs +23 -0
- package/dist/chunk-CDFWPU2R.mjs +473 -0
- package/dist/chunk-CDK4YV3D.mjs +571 -0
- package/dist/chunk-DKMAIU74.mjs +62 -0
- package/dist/chunk-EXIUPSFN.mjs +86 -0
- package/dist/chunk-FFB5LFDW.mjs +35 -0
- package/dist/chunk-HQCOU6GY.mjs +243 -0
- package/dist/chunk-HSSJKHZ4.mjs +135 -0
- package/dist/chunk-J5I45WGQ.mjs +1769 -0
- package/dist/chunk-KQUMKB66.mjs +89 -0
- package/dist/chunk-NBYLMO2L.mjs +14 -0
- package/dist/chunk-NPBQLVL3.mjs +80 -0
- package/dist/chunk-O2NQFKJK.mjs +170 -0
- package/dist/chunk-QJIXTYTZ.mjs +4054 -0
- package/dist/chunk-SGIJVHZO.mjs +12 -0
- package/dist/chunk-SZ5C44L5.mjs +35 -0
- package/dist/chunk-WXXOISTU.mjs +96 -0
- package/dist/chunk-XIYN6AL6.mjs +160 -0
- package/dist/contexts/exports.d.ts +2 -2
- package/dist/contexts/exports.mjs +85 -2
- package/dist/enum/exports.d.ts +1 -1
- package/dist/enum/exports.mjs +46 -2
- package/dist/enum/governance/exports.d.ts +60 -0
- package/dist/enum/governance/exports.mjs +14 -0
- package/dist/errors/exports.d.ts +4 -3
- package/dist/errors/exports.mjs +48 -2
- package/dist/exports-BcUTGFUb.d.ts +40 -0
- package/dist/{getValidatorQueuedOperatorAddress-BcyxE9uw.d.ts → getValidatorQueuedOperatorAddress-Dw5KN5sh.d.ts} +2 -2
- package/dist/{global.d-5w_lvl2J.d.ts → global.d-BuGDKh4k.d.ts} +4 -240
- package/dist/hooks/exports.d.ts +69 -211
- package/dist/hooks/exports.mjs +7434 -4
- package/dist/hooks/governance/exports.d.ts +181 -0
- package/dist/hooks/governance/exports.mjs +888 -0
- package/dist/pol.d-CqPA9K6m.d.ts +142 -0
- package/dist/{txnEnum-7_o92X3N.d.cts → txnEnum-ByI5dtDi.d.ts} +2 -60
- package/dist/types/exports.d.ts +9 -9
- package/dist/types/exports.mjs +0 -1
- package/dist/types/governance/exports.d.ts +109 -0
- package/dist/types/governance/exports.mjs +0 -0
- package/dist/{useHoneySwapState-B494PQDl.d.ts → useHoneySwapState-vFmuFF0g.d.ts} +1 -1
- package/dist/utils/exports.d.ts +15 -6
- package/dist/utils/exports.mjs +825 -2
- package/package.json +49 -13
- package/src/actions/__test/transports.ts +61 -0
- package/src/actions/clients/exports.ts +4 -0
- package/src/actions/clients/getApolloClient.ts +58 -23
- package/src/actions/clients/getEnsoClient.ts +20 -9
- package/src/actions/dex/aggregators/enso/enso.ts +27 -17
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +2 -2
- package/src/actions/dex/aggregators/kyberswap.ts +18 -23
- package/src/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.ts +3 -6
- package/src/actions/exports.ts +4 -9
- package/src/actions/governance/exports.ts +9 -0
- package/src/actions/governance/getAllProposals.ts +10 -65
- package/src/actions/governance/getProposalDetails.ts +6 -33
- package/src/actions/governance/getProposalVotes.ts +8 -15
- package/src/actions/honey/getChartData.ts +27 -21
- package/src/actions/honey/getHoney24hVolume.ts +19 -22
- package/src/actions/pol/getAutoclaimedIncentives.ts +30 -0
- package/src/actions/pol/getBeraTokenTotalSupply.ts +45 -0
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +35 -0
- package/src/actions/pol/getEarnedStakedBeraVault.ts +7 -11
- package/src/actions/pol/getGlobalData.ts +1 -0
- package/src/actions/pol/getHeroEarnVaults.ts +62 -0
- package/src/actions/pol/getIncentiveFeeClaimStats.ts +19 -38
- package/src/actions/pol/getSWBeraVaultMetadata.ts +1 -1
- package/src/actions/pol/getStakingDailyAssets.ts +7 -10
- package/src/actions/server/exports.ts +1 -0
- package/src/actions/server/getDailyValidatorBlockStats.ts +33 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +3 -6
- package/src/actions/transactions/beraWriteContract.integration.test.ts +3 -6
- package/src/actions/validators/getDailyValidatorBlockStats.ts +25 -24
- package/src/actions/validators/getValidatorAnalytics.ts +20 -21
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +33 -0
- package/src/enum/contracts.ts +1 -0
- package/src/enum/exports.ts +0 -1
- package/src/enum/governance/exports.ts +1 -0
- package/src/errors/BeraError.ts +47 -7
- package/src/errors/BeraTracing.unit.test.ts +65 -0
- package/src/errors/RequestError.ts +13 -1
- package/src/errors/exports.ts +5 -0
- package/src/errors/getRevertReason.integration.test.ts +3 -3
- package/src/errors/spanStatus.ts +78 -0
- package/src/errors/spanStatus.unit.test.ts +62 -0
- package/src/hooks/dex/useCreatePool.ts +1 -88
- package/src/hooks/dex/useOnChainPoolData.ts +27 -2
- package/src/hooks/dex/usePriceImpact.ts +12 -5
- package/src/hooks/enso/useBendDemultiply.ts +9 -1
- package/src/hooks/enso/useBendMultiply.ts +9 -1
- package/src/hooks/enso/useBendZapSupply.ts +26 -7
- package/src/hooks/enso/useEnsoSwapBundle.ts +17 -3
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +13 -2
- package/src/hooks/exports.ts +2 -15
- package/src/hooks/governance/exports.ts +14 -0
- package/src/hooks/pol/useAutoclaimedIncentives.ts +49 -0
- package/src/hooks/pol/useStakedAPR.ts +2 -2
- package/src/hooks/pol/useStakedSnapshots.ts +5 -9
- package/src/hooks/validators/useValidator.ts +2 -0
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +39 -0
- package/src/types/bribe-boost.d.ts +8 -0
- package/src/types/exports.ts +0 -1
- package/src/types/governance/exports.ts +1 -0
- package/src/utils/beraFetch.ts +9 -3
- package/src/utils/exports.ts +1 -0
- package/src/utils/getServerSideClient.ts +4 -2
- package/src/utils/sanitizeRpcUrl.ts +22 -0
- package/src/utils/tracedTransport.ts +35 -0
- package/dist/BeraError-_mQdkanr.d.ts +0 -94
- package/dist/BexStatusProvider-DRymVlQf.d.cts +0 -70
- package/dist/HoneyConfigProvider-DfkjmzEf.d.cts +0 -390
- package/dist/RequestError-DSUzJ1Iy.d.cts +0 -144
- package/dist/abi/exports.cjs +0 -2
- package/dist/abi/exports.cjs.map +0 -1
- package/dist/abi/exports.d.cts +0 -6574
- package/dist/abi/exports.mjs.map +0 -1
- package/dist/actions/exports.cjs +0 -2
- package/dist/actions/exports.cjs.map +0 -1
- package/dist/actions/exports.d.cts +0 -1650
- package/dist/actions/exports.mjs.map +0 -1
- package/dist/chunk-45HIEVNI.cjs +0 -4
- package/dist/chunk-45HIEVNI.cjs.map +0 -1
- package/dist/chunk-47ILYVHC.mjs +0 -2
- package/dist/chunk-47ILYVHC.mjs.map +0 -1
- package/dist/chunk-575OK77P.mjs +0 -2
- package/dist/chunk-575OK77P.mjs.map +0 -1
- package/dist/chunk-5NVZG5N6.mjs +0 -2
- package/dist/chunk-5NVZG5N6.mjs.map +0 -1
- package/dist/chunk-6DIA6PXV.cjs +0 -2
- package/dist/chunk-6DIA6PXV.cjs.map +0 -1
- package/dist/chunk-6JJIZCVY.cjs +0 -2
- package/dist/chunk-6JJIZCVY.cjs.map +0 -1
- package/dist/chunk-7F72ZH4Q.mjs +0 -2
- package/dist/chunk-7F72ZH4Q.mjs.map +0 -1
- package/dist/chunk-AUA42YIG.mjs +0 -4
- package/dist/chunk-AUA42YIG.mjs.map +0 -1
- package/dist/chunk-BC2WX6O6.cjs +0 -2
- package/dist/chunk-BC2WX6O6.cjs.map +0 -1
- package/dist/chunk-CJOZC5Z2.cjs +0 -2
- package/dist/chunk-CJOZC5Z2.cjs.map +0 -1
- package/dist/chunk-D6L7LTA2.cjs +0 -2
- package/dist/chunk-D6L7LTA2.cjs.map +0 -1
- package/dist/chunk-DDEQFR3M.cjs +0 -2
- package/dist/chunk-DDEQFR3M.cjs.map +0 -1
- package/dist/chunk-GXV2JA36.mjs +0 -2
- package/dist/chunk-GXV2JA36.mjs.map +0 -1
- package/dist/chunk-ISYNEDET.mjs +0 -2
- package/dist/chunk-ISYNEDET.mjs.map +0 -1
- package/dist/chunk-JDDRTHFG.mjs +0 -2
- package/dist/chunk-JDDRTHFG.mjs.map +0 -1
- package/dist/chunk-JDZGYU5T.mjs +0 -2
- package/dist/chunk-JDZGYU5T.mjs.map +0 -1
- package/dist/chunk-LVOXBZMA.cjs +0 -2
- package/dist/chunk-LVOXBZMA.cjs.map +0 -1
- package/dist/chunk-MK5NS5B5.mjs +0 -2
- package/dist/chunk-MK5NS5B5.mjs.map +0 -1
- package/dist/chunk-NAXAZJJY.mjs +0 -2
- package/dist/chunk-NAXAZJJY.mjs.map +0 -1
- package/dist/chunk-NLVWRMGD.mjs +0 -2
- package/dist/chunk-NLVWRMGD.mjs.map +0 -1
- package/dist/chunk-OGBD5YOG.mjs +0 -2
- package/dist/chunk-OGBD5YOG.mjs.map +0 -1
- package/dist/chunk-OGJMSGB2.mjs +0 -2
- package/dist/chunk-OGJMSGB2.mjs.map +0 -1
- package/dist/chunk-OIYXOKTT.cjs +0 -2
- package/dist/chunk-OIYXOKTT.cjs.map +0 -1
- package/dist/chunk-OUD27MU7.cjs +0 -2
- package/dist/chunk-OUD27MU7.cjs.map +0 -1
- package/dist/chunk-PRLVZIKD.mjs +0 -2
- package/dist/chunk-PRLVZIKD.mjs.map +0 -1
- package/dist/chunk-Q2SNRLW3.cjs +0 -2
- package/dist/chunk-Q2SNRLW3.cjs.map +0 -1
- package/dist/chunk-REWME3FY.cjs +0 -2
- package/dist/chunk-REWME3FY.cjs.map +0 -1
- package/dist/chunk-RJN36GBU.mjs +0 -2
- package/dist/chunk-RJN36GBU.mjs.map +0 -1
- package/dist/chunk-RWOICHRW.cjs +0 -2
- package/dist/chunk-RWOICHRW.cjs.map +0 -1
- package/dist/chunk-S4CDSVLK.cjs +0 -2
- package/dist/chunk-S4CDSVLK.cjs.map +0 -1
- package/dist/chunk-SFEULGSX.cjs +0 -2
- package/dist/chunk-SFEULGSX.cjs.map +0 -1
- package/dist/chunk-WBTS6KFG.mjs +0 -2
- package/dist/chunk-WBTS6KFG.mjs.map +0 -1
- package/dist/chunk-WRFDB3QJ.cjs +0 -2
- package/dist/chunk-WRFDB3QJ.cjs.map +0 -1
- package/dist/chunk-XNJLSA6P.cjs +0 -2
- package/dist/chunk-XNJLSA6P.cjs.map +0 -1
- package/dist/contexts/exports.cjs +0 -2
- package/dist/contexts/exports.cjs.map +0 -1
- package/dist/contexts/exports.d.cts +0 -66
- package/dist/contexts/exports.mjs.map +0 -1
- package/dist/defaultFlags-D6KfkTZx.d.cts +0 -10
- package/dist/dex-C_BB0b0O.d.cts +0 -37
- package/dist/enum/exports.cjs +0 -2
- package/dist/enum/exports.cjs.map +0 -1
- package/dist/enum/exports.d.cts +0 -23
- package/dist/enum/exports.mjs.map +0 -1
- package/dist/errors/exports.cjs +0 -2
- package/dist/errors/exports.cjs.map +0 -1
- package/dist/errors/exports.d.cts +0 -327
- package/dist/errors/exports.mjs.map +0 -1
- package/dist/getValidatorQueuedOperatorAddress-Cql_D50j.d.cts +0 -562
- package/dist/global.d-B7IeayVX.d.cts +0 -474
- package/dist/honey-CYm0RWf4.d.cts +0 -14
- package/dist/hooks/exports.cjs +0 -4
- package/dist/hooks/exports.cjs.map +0 -1
- package/dist/hooks/exports.d.cts +0 -1734
- package/dist/hooks/exports.mjs.map +0 -1
- package/dist/polling-BKnyavLI.d.cts +0 -8
- package/dist/txnEnum-7_o92X3N.d.ts +0 -164
- package/dist/types/exports.cjs +0 -1
- package/dist/types/exports.cjs.map +0 -1
- package/dist/types/exports.d.cts +0 -90
- package/dist/types/exports.mjs.map +0 -1
- package/dist/useHoneySwapState-D6vpv19r.d.cts +0 -32
- package/dist/utils/exports.cjs +0 -2
- package/dist/utils/exports.cjs.map +0 -1
- package/dist/utils/exports.d.cts +0 -420
- package/dist/utils/exports.mjs.map +0 -1
- package/src/actions/dex/getIsTokenExploited.ts +0 -63
- package/src/hooks/dex/useExploitedTokens.ts +0 -57
|
@@ -1,245 +1,9 @@
|
|
|
1
|
-
import { Address, Hex, AbiFunction, Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Account } from 'viem';
|
|
2
|
-
import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
|
|
3
|
-
import { b as ProposalTypeEnum, P as ProposalErrorCodes, T as TransactionActionType, C as ContractName } from './txnEnum-7_o92X3N.js';
|
|
4
|
-
import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-DVP_9KZn.js';
|
|
5
|
-
import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
|
|
6
1
|
import { Config, GetWalletClientReturnType } from '@wagmi/core';
|
|
7
2
|
import { SWRResponse, SWRConfiguration } from 'swr';
|
|
3
|
+
import { Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Hex, Account, Address } from 'viem';
|
|
8
4
|
import { ChainId, BeraConfig } from '@berachain/config';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
type Proposal = ProposalWithVotesFragment;
|
|
12
|
-
|
|
13
|
-
type Vote = ProposalVoteFragment;
|
|
14
|
-
|
|
15
|
-
type Voter = Address;
|
|
16
|
-
|
|
17
|
-
type ProposalVotes = {
|
|
18
|
-
yes: number;
|
|
19
|
-
no: number;
|
|
20
|
-
abstain: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
|
|
24
|
-
|
|
25
|
-
type CustomProposalActionErrors = {
|
|
26
|
-
type?: null | ProposalErrorCodes;
|
|
27
|
-
target?: null | ProposalErrorCodes;
|
|
28
|
-
value?: null | ProposalErrorCodes;
|
|
29
|
-
ABI?: null | ProposalErrorCodes;
|
|
30
|
-
functionSignature?: null | ProposalErrorCodes;
|
|
31
|
-
args?: (null | ProposalErrorCodes)[];
|
|
32
|
-
vault?: null | ProposalErrorCodes;
|
|
33
|
-
isFriend?: null | ProposalErrorCodes;
|
|
34
|
-
to?: null | ProposalErrorCodes;
|
|
35
|
-
amount?: null | ProposalErrorCodes;
|
|
36
|
-
minIncentiveRate?: null | ProposalErrorCodes;
|
|
37
|
-
managerAddress?: null | ProposalErrorCodes;
|
|
38
|
-
input?: null | ProposalErrorCodes;
|
|
39
|
-
token?: null | ProposalErrorCodes;
|
|
40
|
-
rawCalldata?: null | ProposalErrorCodes;
|
|
41
|
-
message?: null | ProposalErrorCodes;
|
|
42
|
-
} | null;
|
|
43
|
-
|
|
44
|
-
type CustomProposalErrors = {
|
|
45
|
-
title?: null | ProposalErrorCodes;
|
|
46
|
-
description?: null | ProposalErrorCodes;
|
|
47
|
-
forumLink?: null | ProposalErrorCodes;
|
|
48
|
-
actions?: CustomProposalActionErrors[];
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
type GovernanceTopic = {
|
|
52
|
-
id: PROPOSAL_GENRE;
|
|
53
|
-
color: string;
|
|
54
|
-
icon: React.ReactNode;
|
|
55
|
-
iconBackground?: string;
|
|
56
|
-
name: string;
|
|
57
|
-
slug: string;
|
|
58
|
-
forumLink: string;
|
|
59
|
-
description?: string;
|
|
60
|
-
comingSoon?: boolean;
|
|
61
|
-
};
|
|
62
|
-
type CustomProposal = {
|
|
63
|
-
title: string;
|
|
64
|
-
description: any;
|
|
65
|
-
actions: ProposalAction[];
|
|
66
|
-
forumLink: string;
|
|
67
|
-
topic: Set<PROPOSAL_GENRE>;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
type SafeProposalAction = {
|
|
71
|
-
value: bigint;
|
|
72
|
-
target: "" | Address;
|
|
73
|
-
} & (
|
|
74
|
-
| {
|
|
75
|
-
type: ProposalTypeEnum.CUSTOM_PROPOSAL;
|
|
76
|
-
input: "ABI" | "rawCalldata" | "message";
|
|
77
|
-
ABI: string;
|
|
78
|
-
_isVerifiedAbi?: boolean;
|
|
79
|
-
functionSignature: string;
|
|
80
|
-
args: string[];
|
|
81
|
-
rawCalldata: Hex;
|
|
82
|
-
message: string;
|
|
83
|
-
}
|
|
84
|
-
| {
|
|
85
|
-
type:
|
|
86
|
-
| ProposalTypeEnum.WHITELIST_REWARD_VAULT
|
|
87
|
-
| ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
|
|
88
|
-
vault: Address;
|
|
89
|
-
}
|
|
90
|
-
| {
|
|
91
|
-
type: ProposalTypeEnum.ERC20_TRANSFER;
|
|
92
|
-
to: Address;
|
|
93
|
-
amount: string;
|
|
94
|
-
}
|
|
95
|
-
| {
|
|
96
|
-
type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
|
|
97
|
-
vault: Address;
|
|
98
|
-
token: Address;
|
|
99
|
-
minIncentiveRate: string;
|
|
100
|
-
managerAddress: Address;
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
type ProposalAction = Partial<SafeProposalAction> & {
|
|
105
|
-
type: SafeProposalAction["type"];
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
type VerifiedAbi = {
|
|
109
|
-
abiItem?: AbiFunction;
|
|
110
|
-
functionName?: string;
|
|
111
|
-
args: readonly unknown[];
|
|
112
|
-
functionSignature?: string;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
interface ProtocolMetadata {
|
|
116
|
-
name: string;
|
|
117
|
-
logoURI: string;
|
|
118
|
-
url: string;
|
|
119
|
-
description: string;
|
|
120
|
-
tags?: string[];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Configuration for a single staking option.
|
|
125
|
-
* Maps receipt tokens to their accepted input tokens.
|
|
126
|
-
*/
|
|
127
|
-
type StakingConfig = {
|
|
128
|
-
/** Unique identifier for this staking config */
|
|
129
|
-
id: string;
|
|
130
|
-
/** The token received when staking (e.g., sWBERA, siBERA) */
|
|
131
|
-
receiptToken: TokenWithMetadata;
|
|
132
|
-
/** Tokens that can be staked to receive the receipt token */
|
|
133
|
-
inputTokens: TokenWithMetadata[];
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
interface BribeBoostReward {
|
|
137
|
-
token: string;
|
|
138
|
-
total_unclaimed: string;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
interface BribeBoostRewardItem {
|
|
142
|
-
rewards: BribeBoostReward[];
|
|
143
|
-
validator: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
interface BribeBoostRewardProof {
|
|
147
|
-
validator?: string;
|
|
148
|
-
pagination: {
|
|
149
|
-
next: number;
|
|
150
|
-
previous: number;
|
|
151
|
-
record_per_page: number;
|
|
152
|
-
current_page: number;
|
|
153
|
-
total_page: number;
|
|
154
|
-
};
|
|
155
|
-
rewards:
|
|
156
|
-
| {
|
|
157
|
-
id: string;
|
|
158
|
-
dist_id: string;
|
|
159
|
-
token: Address;
|
|
160
|
-
recipient: string;
|
|
161
|
-
amount: string;
|
|
162
|
-
merkle_proof: string[];
|
|
163
|
-
available_at: number;
|
|
164
|
-
}[]
|
|
165
|
-
| null;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
interface BribeBoostValidatorApr {
|
|
169
|
-
id: string;
|
|
170
|
-
boost_total_bgt: string;
|
|
171
|
-
rewards_total_usd: string;
|
|
172
|
-
daily_rate: string;
|
|
173
|
-
apr: string;
|
|
174
|
-
apy: string;
|
|
175
|
-
tokens: Address[]; // Confirm this type with backend real data
|
|
176
|
-
validator: string;
|
|
177
|
-
start_block: number;
|
|
178
|
-
end_block: number;
|
|
179
|
-
start_timestamp: number;
|
|
180
|
-
end_timestamp: number;
|
|
181
|
-
created_at: string;
|
|
182
|
-
updated_at: string;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
type IncentiveReward = {
|
|
186
|
-
tokenMetadata: Token | undefined;
|
|
187
|
-
tokenPrice: number;
|
|
188
|
-
tokenValue: number;
|
|
189
|
-
id: string;
|
|
190
|
-
dist_id: string;
|
|
191
|
-
token: string;
|
|
192
|
-
recipient: string;
|
|
193
|
-
formattedAmount: string;
|
|
194
|
-
amount: string;
|
|
195
|
-
merkle_proof: string[];
|
|
196
|
-
available_at: number;
|
|
197
|
-
};
|
|
198
|
-
interface IncentiveRewardChunksWithValidatorData {
|
|
199
|
-
validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
|
|
200
|
-
maxTimestamp: number | undefined;
|
|
201
|
-
minTimestamp: number | undefined;
|
|
202
|
-
totalValue: number;
|
|
203
|
-
tokenTotals: {
|
|
204
|
-
chainId: number;
|
|
205
|
-
address: Address;
|
|
206
|
-
amount: number;
|
|
207
|
-
value: number;
|
|
208
|
-
metadata: Token | undefined;
|
|
209
|
-
}[];
|
|
210
|
-
rewards: IncentiveReward[];
|
|
211
|
-
isCurrent: boolean;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
interface AggregatedTokenTotals {
|
|
215
|
-
address: Address;
|
|
216
|
-
amount: number;
|
|
217
|
-
value: number;
|
|
218
|
-
metadata: Token | undefined;
|
|
219
|
-
chainId: number;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
type ClaimedIncentives = Record<string, string>;
|
|
223
|
-
|
|
224
|
-
type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
|
|
225
|
-
|
|
226
|
-
interface UserVaultInfo {
|
|
227
|
-
balance: bigint;
|
|
228
|
-
delegatedBalance: bigint;
|
|
229
|
-
withdrawableBalance: bigint;
|
|
230
|
-
rewards: string;
|
|
231
|
-
percentage: string;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
type StakedBeraAsset = {
|
|
235
|
-
token: TokenWithMetadata;
|
|
236
|
-
apr: number;
|
|
237
|
-
stakedAmount: number;
|
|
238
|
-
stakedAmountUsd: number;
|
|
239
|
-
earnedAmount: number;
|
|
240
|
-
earnedAmountUsd: number;
|
|
241
|
-
isLoadingEarnings?: boolean;
|
|
242
|
-
};
|
|
5
|
+
import { T as TransactionActionType, C as ContractName } from './txnEnum-ByI5dtDi.js';
|
|
6
|
+
import { B as BeraError } from './BeraError-7-A5JYy_.js';
|
|
243
7
|
|
|
244
8
|
interface UseContractWriteApi {
|
|
245
9
|
isLoading: boolean;
|
|
@@ -471,4 +235,4 @@ declare global {
|
|
|
471
235
|
}
|
|
472
236
|
}
|
|
473
237
|
|
|
474
|
-
export type {
|
|
238
|
+
export type { DefaultHookOptions as D, IContractWrite as I, TxnEventKeys as T, UseContractWriteApi as U, DefaultHookReturnType as a, IUseContractWriteArgs as b, IContractWriteFn as c };
|
package/dist/hooks/exports.d.ts
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
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-Dw5KN5sh.js';
|
|
5
|
+
import { D as DefaultHookOptions, a as DefaultHookReturnType, b as IUseContractWriteArgs, U as UseContractWriteApi } from '../global.d-BuGDKh4k.js';
|
|
6
|
+
export { T as TxnEventKeys } from '../global.d-BuGDKh4k.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';
|
|
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, B as BalanceToken,
|
|
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, x as Calldata, h as PythPriceFeedMap, P as PythLatestUpdates, a as TokenWithMetadata } from '../HoneyConfigProvider-Dkj-_a5x.js';
|
|
11
11
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
12
|
import { GetPoolsQueryVariables, MinimalPoolFragment, GqlPoolEventType, PoolHistoricalDataFragment, GqlRewardVaultDynamicData, GqlVaultSnapshotDataRange, GqlValidatorDynamicData } from '@berachain/graphql/dex/api';
|
|
13
13
|
export { u as useBexStatus } from '../BexStatusProvider-DRymVlQf.js';
|
|
14
14
|
import { PoolType } from '@berachain-foundation/berancer-sdk';
|
|
15
|
-
import { SubgraphPoolFragment } from '@berachain/graphql/dex/subgraph';
|
|
16
15
|
import { P as POLLING } from '../polling-BKnyavLI.js';
|
|
17
16
|
import { BendDemultiplyBundleResponse, BendMultiplyBundleResponse, GetZapTransactionResponse } from '../types/exports.js';
|
|
18
|
-
import
|
|
19
|
-
|
|
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
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-B494PQDl.js';
|
|
24
|
-
export { r as reducer, u as useHoneySwapState } from '../useHoneySwapState-B494PQDl.js';
|
|
17
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-vFmuFF0g.js';
|
|
18
|
+
export { r as reducer, u as useHoneySwapState } from '../useHoneySwapState-vFmuFF0g.js';
|
|
25
19
|
import * as _berachain_graphql_honey from '@berachain/graphql/honey';
|
|
20
|
+
import { A as AutoclaimedIncentivesResponse, S as StakingConfig, b as StakedBeraAsset, U as UserVaultInfo, B as BribeBoostRewardProof } from '../pol.d-CqPA9K6m.js';
|
|
26
21
|
import * as _berachain_graphql_pol_api from '@berachain/graphql/pol/api';
|
|
27
22
|
import { GqlRewardVaultFilter, ApiVaultFragment, GetVaultsQueryVariables, GetVaultHistoryQuery, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, GqlChain, GetValidatorQuery, ApiValidatorMinimalFragment } from '@berachain/graphql/pol/api';
|
|
23
|
+
import { VaultStatsByDayResponse } from '@berachain/graphql/api';
|
|
28
24
|
import { Address as Address$1 } from '@berachain/config';
|
|
29
|
-
import { GetValidatorBlockStatsQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
25
|
+
import { GetValidatorBlockStatsQuery, GetValidatorAnalyticsQuery, GetValidatorIncentiveDistributionQuery } from '@berachain/graphql/pol/subgraph';
|
|
30
26
|
import '@berachain/config/internal';
|
|
31
|
-
import '../txnEnum-7_o92X3N.js';
|
|
32
27
|
import '@wagmi/core';
|
|
33
|
-
import '../
|
|
28
|
+
import '../txnEnum-ByI5dtDi.js';
|
|
29
|
+
import '../BeraError-7-A5JYy_.js';
|
|
34
30
|
import 'react/jsx-runtime';
|
|
31
|
+
import 'react';
|
|
35
32
|
import '../honey-CYm0RWf4.js';
|
|
36
33
|
import '@berachain/config/internal/edge-config';
|
|
37
34
|
import '@ensofinance/sdk';
|
|
@@ -238,17 +235,12 @@ interface UseCreatePoolProps extends BeraJS.BaseFunctionArgs {
|
|
|
238
235
|
poolSymbol: string;
|
|
239
236
|
poolName: string;
|
|
240
237
|
amplification: number;
|
|
241
|
-
weightsDuplicationThreshold?: number;
|
|
242
238
|
oracles: Oracle[];
|
|
243
239
|
}
|
|
244
240
|
interface UseCreatePoolReturn {
|
|
245
241
|
generatedPoolName: string;
|
|
246
242
|
generatedPoolSymbol: string;
|
|
247
|
-
isDupePool: boolean;
|
|
248
|
-
dupePool?: SubgraphPoolFragment | null;
|
|
249
243
|
createPoolArgs: any;
|
|
250
|
-
isLoadingPools: boolean;
|
|
251
|
-
errorLoadingPools: boolean;
|
|
252
244
|
}
|
|
253
245
|
declare enum OracleMode {
|
|
254
246
|
None = "None",
|
|
@@ -260,25 +252,7 @@ interface Oracle {
|
|
|
260
252
|
tokenAddress: string;
|
|
261
253
|
cacheDuration: number;
|
|
262
254
|
}
|
|
263
|
-
declare const useCreatePool: ({ poolCreateTokens, initialLiquidityTokens, normalizedWeights, poolType, poolName, poolSymbol, swapFee, owner, amplification, oracles,
|
|
264
|
-
|
|
265
|
-
declare const useExploitedTokensQueryKey: (tokens: Token[] | undefined) => readonly ["useExploitedTokens", Token[]] | null;
|
|
266
|
-
/**
|
|
267
|
-
* This hook checks if any of provided tokens might have been exploited by frontrunning its deployment.
|
|
268
|
-
*
|
|
269
|
-
* @see {@link getIsTokenExploited} for more details
|
|
270
|
-
* @returns a record of tokens and whether they might have been exploited
|
|
271
|
-
*/
|
|
272
|
-
declare const useExploitedTokens: ({ tokens, }: {
|
|
273
|
-
tokens: Token[] | undefined;
|
|
274
|
-
}) => {
|
|
275
|
-
refresh: () => Promise<Record<`0x${string}`, boolean> | undefined>;
|
|
276
|
-
data: Record<`0x${string}`, boolean> | undefined;
|
|
277
|
-
error: any;
|
|
278
|
-
mutate: swr.KeyedMutator<Record<`0x${string}`, boolean>>;
|
|
279
|
-
isValidating: boolean;
|
|
280
|
-
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
281
|
-
};
|
|
255
|
+
declare const useCreatePool: ({ poolCreateTokens, initialLiquidityTokens, normalizedWeights, poolType, poolName, poolSymbol, swapFee, owner, amplification, oracles, ...baseArgs }: UseCreatePoolProps) => UseCreatePoolReturn;
|
|
282
256
|
|
|
283
257
|
declare const useGlobalLiquidityAndSwapVolume: () => {
|
|
284
258
|
data: {
|
|
@@ -348,7 +322,36 @@ declare function useOnChainPoolDataQueryKey(args: {
|
|
|
348
322
|
} | {
|
|
349
323
|
address: Address;
|
|
350
324
|
}): readonly ["useOnChainPoolData", `0x${string}`] | null;
|
|
351
|
-
interface
|
|
325
|
+
interface OnChainPoolToken {
|
|
326
|
+
address: Address;
|
|
327
|
+
name: string;
|
|
328
|
+
decimals: number;
|
|
329
|
+
symbol: string;
|
|
330
|
+
index: number;
|
|
331
|
+
weight?: string;
|
|
332
|
+
balance: string;
|
|
333
|
+
token: {
|
|
334
|
+
__typename: "Token";
|
|
335
|
+
token: {
|
|
336
|
+
address: Address;
|
|
337
|
+
name: string;
|
|
338
|
+
decimals: number;
|
|
339
|
+
symbol: string;
|
|
340
|
+
};
|
|
341
|
+
latestUSDPrice: TokenPriceInfo | undefined;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
interface OnChainPoolFragment {
|
|
345
|
+
id: string;
|
|
346
|
+
name: string;
|
|
347
|
+
address: Address;
|
|
348
|
+
factory: Address;
|
|
349
|
+
swapFee: string;
|
|
350
|
+
totalShares: string;
|
|
351
|
+
totalLiquidity: string;
|
|
352
|
+
createTime: number;
|
|
353
|
+
type: string;
|
|
354
|
+
tokens: OnChainPoolToken[];
|
|
352
355
|
amplificationParameter: {
|
|
353
356
|
currentFormattedValue: number | undefined;
|
|
354
357
|
} | undefined;
|
|
@@ -576,7 +579,7 @@ type UseBendDemultiply = {
|
|
|
576
579
|
currentCollateral?: string;
|
|
577
580
|
currentDebt?: string;
|
|
578
581
|
};
|
|
579
|
-
declare function useBendDemultiply({ collateralToken, loanToken, marketId, primaryAddress, repayAmount, slippage, chainId, collateralPriceInLoanAsset, currentCollateral, currentDebt, }: UseBendDemultiply, options?: DefaultHookOptions): swr.SWRResponse<BendDemultiplyBundleResponse, unknown, swr.SWRConfiguration<BendDemultiplyBundleResponse, unknown, (arg: readonly ["useBendDemultiply", `0x${string}`, Token, Token, `0x${string}`, `0x${string}`, number, string, number, string, string, string, `0x${string}`, boolean]) => swr__internal.FetcherResponse<BendDemultiplyBundleResponse>> | undefined>;
|
|
582
|
+
declare function useBendDemultiply({ collateralToken, loanToken, marketId, primaryAddress, repayAmount, slippage, chainId, collateralPriceInLoanAsset, currentCollateral, currentDebt, }: UseBendDemultiply, options?: DefaultHookOptions): swr.SWRResponse<BendDemultiplyBundleResponse, unknown, swr.SWRConfiguration<BendDemultiplyBundleResponse, unknown, (arg: readonly ["useBendDemultiply", `0x${string}`, Token, Token, `0x${string}`, `0x${string}`, number, string, number, string, string, string, `0x${string}`, boolean, boolean]) => swr__internal.FetcherResponse<BendDemultiplyBundleResponse>> | undefined>;
|
|
580
583
|
|
|
581
584
|
type UseBendMultiply = {
|
|
582
585
|
collateralToken?: Token;
|
|
@@ -591,7 +594,7 @@ type UseBendMultiply = {
|
|
|
591
594
|
chainId?: number;
|
|
592
595
|
formattedCollateralPriceInLoanAsset?: string;
|
|
593
596
|
};
|
|
594
|
-
declare function useBendMultiply({ collateralToken, loanToken, marketId, primaryAddress, formattedSupplyCollateralAmount, formattedCurrentCollateralAmount, formattedCurrentBorrowAmount, leverageMultiplier, slippage, chainId, formattedCollateralPriceInLoanAsset, }: UseBendMultiply, options?: DefaultHookOptions): swr.SWRResponse<BendMultiplyBundleResponse, unknown, swr.SWRConfiguration<BendMultiplyBundleResponse, unknown, (arg: readonly ["useBendMultiply", `0x${string}`, Token, Token, `0x${string}`, `0x${string}`, number, string, string, string, number, number, string, `0x${string}`, boolean]) => swr__internal.FetcherResponse<BendMultiplyBundleResponse>> | undefined>;
|
|
597
|
+
declare function useBendMultiply({ collateralToken, loanToken, marketId, primaryAddress, formattedSupplyCollateralAmount, formattedCurrentCollateralAmount, formattedCurrentBorrowAmount, leverageMultiplier, slippage, chainId, formattedCollateralPriceInLoanAsset, }: UseBendMultiply, options?: DefaultHookOptions): swr.SWRResponse<BendMultiplyBundleResponse, unknown, swr.SWRConfiguration<BendMultiplyBundleResponse, unknown, (arg: readonly ["useBendMultiply", `0x${string}`, Token, Token, `0x${string}`, `0x${string}`, number, string, string, string, number, number, string, `0x${string}`, boolean, boolean]) => swr__internal.FetcherResponse<BendMultiplyBundleResponse>> | undefined>;
|
|
595
598
|
|
|
596
599
|
type UseBendZapSupplyArgs = {
|
|
597
600
|
tokenIn?: BalanceToken;
|
|
@@ -614,7 +617,10 @@ declare function useBendZapSupply({ tokenIn, loanToken, bendVault, rewardVault,
|
|
|
614
617
|
raw: bigint;
|
|
615
618
|
formatted: string;
|
|
616
619
|
} | undefined;
|
|
620
|
+
zapSupplyAmountError: any;
|
|
621
|
+
isZapSupplyAmountLoading: boolean;
|
|
617
622
|
priceImpact: number | null | undefined;
|
|
623
|
+
isPriceImpactLoading: boolean;
|
|
618
624
|
hasInsufficientNativeBalance: boolean | 0 | undefined;
|
|
619
625
|
isCrossChain: boolean | 0 | undefined;
|
|
620
626
|
nativeFee: string | undefined;
|
|
@@ -732,168 +738,6 @@ declare function useZapStakeBera({ inputToken, amount, underlyingToken, slippage
|
|
|
732
738
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
733
739
|
};
|
|
734
740
|
|
|
735
|
-
declare const useCreateProposal: ({ initialData, currentTopic, onError, }: {
|
|
736
|
-
initialData?: any;
|
|
737
|
-
currentTopic: GovernanceTopic;
|
|
738
|
-
onError: (e: CustomProposalErrors) => void;
|
|
739
|
-
}) => {
|
|
740
|
-
proposal: CustomProposal;
|
|
741
|
-
setProposal: react.Dispatch<react.SetStateAction<CustomProposal>>;
|
|
742
|
-
addProposalAction: () => void;
|
|
743
|
-
removeProposalAction: (idx: number) => void;
|
|
744
|
-
computeParamsAndErrors: () => readonly [`0x${string}`[], bigint[], `0x${string}`[], string] | undefined;
|
|
745
|
-
};
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Returns the amount of voting power that a wallet had when the voting period began.
|
|
749
|
-
* {@link https://docs.openzeppelin.com/contracts/5.x/api/governance#Votes-getPastVotes-address-uint256-}
|
|
750
|
-
*/
|
|
751
|
-
declare const useGetPastVotes: (args: {
|
|
752
|
-
wallet?: Address;
|
|
753
|
-
} & ({
|
|
754
|
-
proposalId?: bigint;
|
|
755
|
-
timepoint: number | bigint;
|
|
756
|
-
} | {
|
|
757
|
-
proposalId: bigint;
|
|
758
|
-
timepoint?: number | bigint;
|
|
759
|
-
})) => swr.SWRResponse<string, any, any>;
|
|
760
|
-
|
|
761
|
-
declare const useHasVoted: ({ proposalId, wallet, }: {
|
|
762
|
-
proposalId: string;
|
|
763
|
-
wallet?: Address;
|
|
764
|
-
}) => swr.SWRResponse<boolean, any, any>;
|
|
765
|
-
|
|
766
|
-
declare const useIsCanceller: ({ account, ...baseArgs }: {
|
|
767
|
-
account: Address | undefined;
|
|
768
|
-
} & BeraJS.BaseFunctionArgs) => swr.SWRResponse<boolean, any, {
|
|
769
|
-
refreshInterval: POLLING;
|
|
770
|
-
revalidateOnFocus: false;
|
|
771
|
-
}>;
|
|
772
|
-
|
|
773
|
-
type UsePollAllProposalsArgs = {
|
|
774
|
-
topic: string;
|
|
775
|
-
where?: Proposal_Filter;
|
|
776
|
-
perPage?: number;
|
|
777
|
-
orderBy?: Proposal_OrderBy;
|
|
778
|
-
orderDirection?: OrderDirection;
|
|
779
|
-
status_in?: ProposalStatus[];
|
|
780
|
-
text?: string;
|
|
781
|
-
autoRefreshProposals?: boolean;
|
|
782
|
-
};
|
|
783
|
-
type ProposalResult = {
|
|
784
|
-
data: ProposalSelectionFragment[][];
|
|
785
|
-
hasMore: boolean;
|
|
786
|
-
} & Omit<SWRInfiniteResponse<ProposalSelectionFragment[]>, "data">;
|
|
787
|
-
type PollAllProposalsKey = [
|
|
788
|
-
"usePollAllProposals",
|
|
789
|
-
number,
|
|
790
|
-
string,
|
|
791
|
-
Proposal_Filter | undefined,
|
|
792
|
-
ProposalStatus[] | undefined,
|
|
793
|
-
Proposal_OrderBy | undefined,
|
|
794
|
-
OrderDirection | undefined,
|
|
795
|
-
number,
|
|
796
|
-
string | undefined
|
|
797
|
-
] | null;
|
|
798
|
-
declare function usePollAllProposalsQueryKey(topic: string, args?: Partial<UsePollAllProposalsArgs>): (pageIndex: number, previousPageData?: ProposalSelectionFragment[]) => PollAllProposalsKey;
|
|
799
|
-
/**
|
|
800
|
-
* Fetch all proposals for a given topic
|
|
801
|
-
*/
|
|
802
|
-
declare function usePollAllProposals(args: UsePollAllProposalsArgs, options?: DefaultHookOptions & {
|
|
803
|
-
autoRefresh?: boolean;
|
|
804
|
-
}): ProposalResult;
|
|
805
|
-
|
|
806
|
-
interface UsePollProposalResponse extends DefaultHookReturnType<ProposalWithVotesFragment> {
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Polls a proposal and returns the proposal details.
|
|
810
|
-
* Pulls data from the subgraph and onchain.
|
|
811
|
-
*
|
|
812
|
-
* @param proposalId - The ID of the proposal to poll
|
|
813
|
-
* @param options - Optional configuration options
|
|
814
|
-
* @param options.autoRefresh - If true, the data will be refreshed automatically based on the block number and status threshold
|
|
815
|
-
* @returns {UsePollProposalResponse} Object containing:
|
|
816
|
-
* - data: ProposalWithVotesFragment | undefined - The proposal data if successful
|
|
817
|
-
* - error: Error | undefined - Error object if request failed
|
|
818
|
-
* - isLoading: boolean - True while data is being fetched
|
|
819
|
-
* - isValidating: boolean - True while data is being revalidated
|
|
820
|
-
* - mutate: () => Promise<ProposalWithVotesFragment | undefined> - Function to manually refresh the data
|
|
821
|
-
* - refresh: () => Promise<void> - Function to manually refresh the data
|
|
822
|
-
*/
|
|
823
|
-
declare const usePollProposal: (proposalId: string, options?: DefaultHookOptions & {
|
|
824
|
-
autoRefresh?: boolean;
|
|
825
|
-
}) => UsePollProposalResponse;
|
|
826
|
-
|
|
827
|
-
declare const usePollProposalThreshold: (governorAddress: Address) => DefaultHookReturnType<{
|
|
828
|
-
votesThreshold: string;
|
|
829
|
-
}>;
|
|
830
|
-
|
|
831
|
-
type UsePollProposalVotesArgs = Omit<GetProposalVotesQueryVariables, "offset" | "limit">;
|
|
832
|
-
/**
|
|
833
|
-
* Fetches all the votes for a proposal from the Subgraph
|
|
834
|
-
* @param args - The arguments to pass to the query
|
|
835
|
-
* @param total - The total amount of pages of votes to fetch
|
|
836
|
-
*/
|
|
837
|
-
declare const usePollProposalVotes: (args: UsePollProposalVotesArgs, total: number) => swr_infinite.SWRInfiniteResponse<{
|
|
838
|
-
data: _berachain_graphql_governance.GetProposalVotesQuery;
|
|
839
|
-
}, any>;
|
|
840
|
-
declare const usePollProposalVotesQueryKey: ({ ...args }: UsePollProposalVotesArgs, total: number) => SWRInfiniteKeyLoader;
|
|
841
|
-
|
|
842
|
-
declare const usePollUserDelegates: (options?: DefaultHookOptions) => DefaultHookReturnType<{
|
|
843
|
-
delegate: Address;
|
|
844
|
-
currentVotes: string | undefined;
|
|
845
|
-
}>;
|
|
846
|
-
|
|
847
|
-
declare const useProposalFromTx: (txHash?: Address) => SWRResponse<ProposalWithVotesFragment | null>;
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Timepoint used to retrieve user’s votes and quorum. If using block
|
|
851
|
-
* number (as per Compound’s Comp), the snapshot is performed at
|
|
852
|
-
* the end of this block. Hence, voting for this proposal starts at the beginning of the following block.
|
|
853
|
-
*
|
|
854
|
-
* {@link https://docs.openzeppelin.com/contracts/5.x/api/governance#IGovernor-proposalSnapshot-uint256-}
|
|
855
|
-
*/
|
|
856
|
-
declare const useProposalSnapshot: ({ proposalId, }: {
|
|
857
|
-
proposalId: number | bigint | string | undefined;
|
|
858
|
-
}) => SWRResponse<string>;
|
|
859
|
-
|
|
860
|
-
declare const useProposalState: ({ proposalId, governorAddress, }: {
|
|
861
|
-
proposalId: number | bigint | string | undefined;
|
|
862
|
-
governorAddress: Address;
|
|
863
|
-
}) => SWRResponse<string>;
|
|
864
|
-
|
|
865
|
-
declare const TimelockOperationState: {
|
|
866
|
-
readonly 0: "unset";
|
|
867
|
-
readonly 1: "waiting";
|
|
868
|
-
readonly 2: "ready";
|
|
869
|
-
readonly 3: "done";
|
|
870
|
-
};
|
|
871
|
-
/**
|
|
872
|
-
* Fetches the state of a proposal timelock
|
|
873
|
-
* @returns state of the proposal timelock (unset, waiting, ready, done)
|
|
874
|
-
*/
|
|
875
|
-
declare function useProposalTimelockState({ proposalTimelockId, timelockAddress, }: {
|
|
876
|
-
proposalTimelockId: Address | undefined;
|
|
877
|
-
timelockAddress: Address;
|
|
878
|
-
}): SWRResponse<(typeof TimelockOperationState)[keyof typeof TimelockOperationState]>;
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* Queries the quorum for a given timestamp.
|
|
882
|
-
*
|
|
883
|
-
* @returns current quorum if timestamp is in the future.
|
|
884
|
-
*/
|
|
885
|
-
declare function useQuorum({ at }: {
|
|
886
|
-
at: number | string;
|
|
887
|
-
}, { isEnabled, }: {
|
|
888
|
-
isEnabled?: boolean;
|
|
889
|
-
}): {
|
|
890
|
-
data: number | undefined;
|
|
891
|
-
error: any;
|
|
892
|
-
mutate: swr.KeyedMutator<string>;
|
|
893
|
-
isValidating: boolean;
|
|
894
|
-
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
895
|
-
};
|
|
896
|
-
|
|
897
741
|
interface UseCappedGloballyResponse extends DefaultHookReturnType<boolean | undefined> {
|
|
898
742
|
}
|
|
899
743
|
declare const useCappedGlobally: ({ asset, amount, isMint, isBasketModeEnabled, }: {
|
|
@@ -922,7 +766,7 @@ declare function useHoney24hVolume(): {
|
|
|
922
766
|
refresh: () => Promise<BigNumber | undefined>;
|
|
923
767
|
data: BigNumber | undefined;
|
|
924
768
|
error: any;
|
|
925
|
-
mutate: swr.KeyedMutator<BigNumber>;
|
|
769
|
+
mutate: swr.KeyedMutator<BigNumber | undefined>;
|
|
926
770
|
isValidating: boolean;
|
|
927
771
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
928
772
|
};
|
|
@@ -1042,6 +886,11 @@ declare const usePythUpdateFee: ({ pythPriceFeedCalldata, tokenListLength, }: {
|
|
|
1042
886
|
isLoading: boolean;
|
|
1043
887
|
};
|
|
1044
888
|
|
|
889
|
+
interface UseAutoclaimedIncentivesArgs {
|
|
890
|
+
enabled: boolean;
|
|
891
|
+
}
|
|
892
|
+
declare function useAutoclaimedIncentives({ enabled, }: UseAutoclaimedIncentivesArgs): DefaultHookReturnType<AutoclaimedIncentivesResponse | null>;
|
|
893
|
+
|
|
1045
894
|
declare function useBgtAprSimulation(args: GetBgtAprSimulationArgs | undefined): GetBgtAprSimulationResult
|
|
1046
895
|
/**
|
|
1047
896
|
* Returns undefined if still loading
|
|
@@ -1220,7 +1069,7 @@ declare const useRewardVaults: (args: {
|
|
|
1220
1069
|
};
|
|
1221
1070
|
|
|
1222
1071
|
type UseStakedAPR = {
|
|
1223
|
-
|
|
1072
|
+
timestamp: number;
|
|
1224
1073
|
apr: string;
|
|
1225
1074
|
}[];
|
|
1226
1075
|
declare function useStakedAPR({ range, }: {
|
|
@@ -1251,10 +1100,7 @@ declare const useStakedData: (stakingConfigs: StakingConfig[]) => {
|
|
|
1251
1100
|
isValidatingPositions: boolean;
|
|
1252
1101
|
};
|
|
1253
1102
|
|
|
1254
|
-
type UseStakedBeraSnapshot = Record<Address,
|
|
1255
|
-
_timestamp: number;
|
|
1256
|
-
total_assets: string;
|
|
1257
|
-
}[]>;
|
|
1103
|
+
type UseStakedBeraSnapshot = Record<Address, VaultStatsByDayResponse>;
|
|
1258
1104
|
declare function useStakedSnapshots({ range, addresses, }: {
|
|
1259
1105
|
addresses: Address[];
|
|
1260
1106
|
range: 30 | 60 | 90;
|
|
@@ -1602,6 +1448,7 @@ declare function useValidator({ pubkey }: {
|
|
|
1602
1448
|
rewardRate: string;
|
|
1603
1449
|
stakedBeraAmount: string;
|
|
1604
1450
|
lastDayDistributedBGTAmount: string;
|
|
1451
|
+
lastDayProposedBlockCount: number;
|
|
1605
1452
|
activeBoostAmountRank: number;
|
|
1606
1453
|
boostApr: GqlValidatorDynamicData["boostApr"];
|
|
1607
1454
|
commissionOnIncentives: number;
|
|
@@ -1701,6 +1548,17 @@ declare const useValidatorEstimatedBgtPerYear: (validator: ApiValidatorMinimalFr
|
|
|
1701
1548
|
isLoading: boolean;
|
|
1702
1549
|
};
|
|
1703
1550
|
|
|
1551
|
+
/**
|
|
1552
|
+
* Historical per-validator incentive distribution. Split from
|
|
1553
|
+
* `useValidatorAnalytics` so the IncentivesEarned chart can switch data
|
|
1554
|
+
* sources independently of the other charts that still consume the umbrella
|
|
1555
|
+
* `GetValidatorAnalytics` query.
|
|
1556
|
+
*/
|
|
1557
|
+
declare function useValidatorIncentiveDistribution({ pubkey, dayRange, }: {
|
|
1558
|
+
pubkey: Address | undefined;
|
|
1559
|
+
dayRange: number;
|
|
1560
|
+
}): DefaultHookReturnType<GetValidatorIncentiveDistributionQuery>;
|
|
1561
|
+
|
|
1704
1562
|
declare function useValidatorQueuedCommission(pubKey: Address, options?: DefaultHookOptions): DefaultHookReturnType<ValidatorQueuedCommission | undefined | null>;
|
|
1705
1563
|
|
|
1706
1564
|
declare const useValidatorQueuedOperatorAddress: (pubKey: Address, options?: DefaultHookOptions) => DefaultHookReturnType<ValidatorQueuedOperatorAddress | undefined>;
|
|
@@ -1731,4 +1589,4 @@ declare function useValidatorRewardAllocation(pubKey: Address, options?: Default
|
|
|
1731
1589
|
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
1732
1590
|
};
|
|
1733
1591
|
|
|
1734
|
-
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
|
|
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 };
|