@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,1650 +0,0 @@
|
|
|
1
|
-
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-Cql_D50j.cjs';
|
|
2
|
-
export { B as BaseAggregator, G as GetBgtAprSimulationArgs, a as GetBgtAprSimulationResult, b as GetConvertToAssetsProps, c as GetGaugeData, d as GetHoneyVaultsBalanceResponse, e as GetMarkets, f as GetRewardVaultRewardsReturn, g as GetUserVaultsResponse, h as GetVaultHistoryArgs, i as GlobalData, I as IsBadCollateralArgs, j as IsBadCollateralResponse, O as OnChainPool, P as PoolStatus, R as RewardVaultDistributionMode, k as RewardVaultIncentive, S as StakedBeraWithdrawal, U as UserBoostsOnValidator, l as UserStakingPoolPosition, m as UserVault, n as ValidatorQueuedCommission, o as ValidatorQueuedOperatorAddress, p as ValidatorRewardAllocationRaw, q as ValidatorRewardAllocationUpdate, r as ValidatorRewardAllocationUpdateWithExpiration, s as ValidatorWithUserBoost, t as VaultMetadata, u as formatValidatorRewardAllocation, v as getBgtAprSimulation, w as getConvertToAssets, x as getGlobalData, y as getHoneyVaultsBalance, z as getMarkets, A as getOnChainPool, C as getPoolPausedState, D as getRewardVaultIncentives, E as getRewardVaultRewards, F as getRewardVaults, H as getSWBeraVaultMetadata, J as getSWBeraWithdrawal, K as getUserActiveValidators, L as getUserBoostsOnValidator, M as getUserStakingPositions, N as getUserVaults, Q as getValidatorQueuedCommission, T as getValidatorQueuedOperatorAddress, W as getValidatorRewardAllocation, X as getVaultHistory, Y as isBadCollateralAsset, Z as isSameRewardAllocation } from '../getValidatorQueuedOperatorAddress-Cql_D50j.cjs';
|
|
3
|
-
import { Address, PublicClient, AbiParameter, AbiFunction, TransactionReceipt, Abi, ContractFunctionArgs, ContractFunctionName, WalletCallReceipt } from 'viem';
|
|
4
|
-
import { ApolloClient, OperationVariables, FetchPolicy } from '@apollo/client';
|
|
5
|
-
export { gql } from '@apollo/client';
|
|
6
|
-
import { EnsoClient } from '@ensofinance/sdk';
|
|
7
|
-
import { PoolState } from '@berachain-foundation/berancer-sdk';
|
|
8
|
-
export { BalancerApi } from '@berachain-foundation/berancer-sdk';
|
|
9
|
-
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
10
|
-
import { GetPoolsQueryVariables, GetGlobalLiquidityAndSwapVolumeQuery, GetPoolEventsQuery, GqlChain, PoolHistoricalDataFragment, MinimalPoolFragment } from '@berachain/graphql/dex/api';
|
|
11
|
-
import { GqlPoolEventType, GqlChain as GqlChain$1, ApiVaultFragment, GqlVaultSnapshotDataRange, GetSWberaVaultSnapshotsQuery, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, ApiRewardAllocationWeightFragment, GetValidatorQuery, ApiValidatorMinimalFragment, ApiValidatorRewardAllocationWeightFragment, ApiMinimalVaultIncentiveFragment } from '@berachain/graphql/pol/api';
|
|
12
|
-
import { P as ProposalErrorCodes, a as ProposalState } from '../txnEnum-7_o92X3N.cjs';
|
|
13
|
-
import { ProposalStatus, ProposalSelectionFragment, Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalWithVotesFragment, GetProposalVotesQueryVariables, GetProposalVotesQuery } from '@berachain/graphql/governance';
|
|
14
|
-
import { C as CustomProposal, G as GovernanceTopic, a as CustomProposalErrors, S as StakingConfig, B as BribeBoostRewardProof, b as BribeBoostRewardItem, U as UserVaultInfo, I as IContractWrite } from '../global.d-B7IeayVX.cjs';
|
|
15
|
-
import graymatter from 'gray-matter';
|
|
16
|
-
import { GetSnapshotsQuery } from '@berachain/graphql/honey';
|
|
17
|
-
import { b as Token, P as PythLatestUpdates, a as TokenWithMetadata, T as TokenWithOrder, h as PythPriceFeedMap, i as TokenCurrentPriceMap, A as AllowanceQueryItem, j as AllowanceToken, M as MinimalERC20, B as BalanceToken } from '../HoneyConfigProvider-DfkjmzEf.cjs';
|
|
18
|
-
export { C as CollateralRates, k as CollateralRatesArgs, l as HoneyFeeMap, m as HoneyPreviewArgs, n as HoneyPreviewMethod, o as HoneyPreviewReadResult, p as HoneyPreviewResult, q as getHoneyFees, r as getHoneyPreview, s as getPythLatestPrices } from '../HoneyConfigProvider-DfkjmzEf.cjs';
|
|
19
|
-
import BigNumber from '@berachain/utils/pkg/bignumber.js';
|
|
20
|
-
import { EdgeConfigSchema } from '@berachain/config/internal/edge-config';
|
|
21
|
-
import { honeyFactoryAbi } from '@berachain/abis/honey/honeyFactory';
|
|
22
|
-
import { honeyFactoryPythWrapperAbi } from '@berachain/abis/honey/honeyFactoryPythWrapper';
|
|
23
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-D6vpv19r.cjs';
|
|
24
|
-
import { Address as Address$1, ChainId } from '@berachain/config';
|
|
25
|
-
import { Config } from '@wagmi/core';
|
|
26
|
-
import { GetValidatorBlockStatsQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
27
|
-
import '@berachain/config/internal';
|
|
28
|
-
import '../dex-C_BB0b0O.cjs';
|
|
29
|
-
import 'swr';
|
|
30
|
-
import '../BeraError-_mQdkanr.cjs';
|
|
31
|
-
import 'react/jsx-runtime';
|
|
32
|
-
import 'react';
|
|
33
|
-
import '../honey-CYm0RWf4.cjs';
|
|
34
|
-
|
|
35
|
-
interface GetMaxDepositProps {
|
|
36
|
-
vaultAddress: Address;
|
|
37
|
-
publicClient: PublicClient;
|
|
38
|
-
}
|
|
39
|
-
declare function getMaxDeposit({ vaultAddress, publicClient, }: GetMaxDepositProps): Promise<string>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* This is a wrapper around the ApolloClient that throws a BeraError if the query returns an error or no data.
|
|
43
|
-
*
|
|
44
|
-
* It's mostly a typescript helper that keeps data always defined since we use errorPolicy: "none" by default.
|
|
45
|
-
* Such setting will throw an error if the query returns an error, rather than returning an object with undefined data and an error property.
|
|
46
|
-
*/
|
|
47
|
-
declare class BeraApolloClient extends ApolloClient {
|
|
48
|
-
/**
|
|
49
|
-
* The URL of the endpoint. Used for error reporting only.
|
|
50
|
-
*/
|
|
51
|
-
protected url: string;
|
|
52
|
-
protected serviceName: string;
|
|
53
|
-
constructor(options: ApolloClient.Options & {
|
|
54
|
-
/**
|
|
55
|
-
* The URL of the endpoint. Used for error reporting only.
|
|
56
|
-
*/
|
|
57
|
-
url: string;
|
|
58
|
-
/**
|
|
59
|
-
* The name of the graphql service. Used for error reporting only.
|
|
60
|
-
*/
|
|
61
|
-
name: string;
|
|
62
|
-
});
|
|
63
|
-
query<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: Omit<ApolloClient.QueryOptions<TData, TVariables>, "errorPolicy">): Promise<{
|
|
64
|
-
data: TData;
|
|
65
|
-
}>;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
type GraphqlClient = "honey.subgraph" | "pol.subgraph" | "pol.fees" | "governance.subgraph" | "bex.subgraph" | "api" | "bend.whisk";
|
|
69
|
-
declare function getApolloClient(clientName: GraphqlClient, { ...args }: BeraJS.BaseFunctionArgs): BeraApolloClient;
|
|
70
|
-
|
|
71
|
-
declare function getEnsoClient({ useProxy, ...args }?: BeraJS.BaseFunctionArgs & {
|
|
72
|
-
useProxy?: boolean;
|
|
73
|
-
}): EnsoClient;
|
|
74
|
-
|
|
75
|
-
declare function getAllPools({ textSearch, chain, first, orderBy, orderDirection, skip, fetchPolicy, userAddress, blacklistedPoolIds, ...args }?: Partial<GetPoolsQueryVariables & {
|
|
76
|
-
fetchPolicy: FetchPolicy;
|
|
77
|
-
}> & BeraJS.BaseFunctionArgs): Promise<{
|
|
78
|
-
pools: {
|
|
79
|
-
__typename?: "GqlPoolMinimal";
|
|
80
|
-
id: string;
|
|
81
|
-
name: string;
|
|
82
|
-
address: `0x${string}`;
|
|
83
|
-
factory?: `0x${string}` | null;
|
|
84
|
-
protocolVersion: number;
|
|
85
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
86
|
-
tokens: Array<{
|
|
87
|
-
__typename?: "GqlPoolTokenExpanded";
|
|
88
|
-
address: `0x${string}`;
|
|
89
|
-
symbol: string;
|
|
90
|
-
name: string;
|
|
91
|
-
decimals: number;
|
|
92
|
-
}>;
|
|
93
|
-
dynamicData: {
|
|
94
|
-
__typename?: "GqlPoolDynamicData";
|
|
95
|
-
totalShares: string;
|
|
96
|
-
fees24h: string;
|
|
97
|
-
volume24h: string;
|
|
98
|
-
swapFee: string;
|
|
99
|
-
isInRecoveryMode: boolean;
|
|
100
|
-
isPaused: boolean;
|
|
101
|
-
totalLiquidity: string;
|
|
102
|
-
aprItems: Array<{
|
|
103
|
-
__typename?: "GqlPoolAprItem";
|
|
104
|
-
apr: number;
|
|
105
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
106
|
-
id: string;
|
|
107
|
-
}>;
|
|
108
|
-
};
|
|
109
|
-
userBalance?: {
|
|
110
|
-
__typename?: "GqlPoolUserBalance";
|
|
111
|
-
totalBalanceUsd: number;
|
|
112
|
-
walletBalance: any;
|
|
113
|
-
walletBalanceUsd: number;
|
|
114
|
-
} | null;
|
|
115
|
-
rewardVault?: {
|
|
116
|
-
__typename?: "GqlRewardVault";
|
|
117
|
-
isVaultWhitelisted: boolean;
|
|
118
|
-
vaultAddress: `0x${string}`;
|
|
119
|
-
stakingTokenAddress: `0x${string}`;
|
|
120
|
-
dynamicData?: {
|
|
121
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
122
|
-
activeIncentivesValueUsd: string;
|
|
123
|
-
apr?: number | null;
|
|
124
|
-
bgtCapturePercentage: string;
|
|
125
|
-
allTimeReceivedBGTAmount: string;
|
|
126
|
-
} | null;
|
|
127
|
-
} | null;
|
|
128
|
-
}[];
|
|
129
|
-
count: number;
|
|
130
|
-
}>;
|
|
131
|
-
|
|
132
|
-
declare function getApiPool({ poolId, account, ...args }: {
|
|
133
|
-
poolId: string;
|
|
134
|
-
account?: Address | undefined;
|
|
135
|
-
} & BeraJS.BaseFunctionArgs): Promise<{
|
|
136
|
-
__typename?: "GqlPoolComposableStable";
|
|
137
|
-
id: string;
|
|
138
|
-
name: string;
|
|
139
|
-
address: `0x${string}`;
|
|
140
|
-
factory?: `0x${string}` | null;
|
|
141
|
-
protocolVersion: number;
|
|
142
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
143
|
-
createTime: number;
|
|
144
|
-
tokens: Array<{
|
|
145
|
-
__typename?: "GqlPoolTokenDetail";
|
|
146
|
-
index: number;
|
|
147
|
-
address: `0x${string}`;
|
|
148
|
-
symbol: string;
|
|
149
|
-
name: string;
|
|
150
|
-
decimals: number;
|
|
151
|
-
weight?: string | null;
|
|
152
|
-
balance: string;
|
|
153
|
-
balanceUSD: string;
|
|
154
|
-
}>;
|
|
155
|
-
dynamicData: {
|
|
156
|
-
__typename?: "GqlPoolDynamicData";
|
|
157
|
-
totalShares: string;
|
|
158
|
-
fees24h: string;
|
|
159
|
-
volume24h: string;
|
|
160
|
-
swapFee: string;
|
|
161
|
-
isInRecoveryMode: boolean;
|
|
162
|
-
isPaused: boolean;
|
|
163
|
-
totalLiquidity: string;
|
|
164
|
-
aprItems: Array<{
|
|
165
|
-
__typename?: "GqlPoolAprItem";
|
|
166
|
-
apr: number;
|
|
167
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
168
|
-
id: string;
|
|
169
|
-
}>;
|
|
170
|
-
};
|
|
171
|
-
rewardVault?: {
|
|
172
|
-
__typename?: "GqlRewardVault";
|
|
173
|
-
isVaultWhitelisted: boolean;
|
|
174
|
-
vaultAddress: `0x${string}`;
|
|
175
|
-
stakingTokenAddress: `0x${string}`;
|
|
176
|
-
dynamicData?: {
|
|
177
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
178
|
-
activeIncentivesValueUsd: string;
|
|
179
|
-
apr?: number | null;
|
|
180
|
-
bgtCapturePercentage: string;
|
|
181
|
-
allTimeReceivedBGTAmount: string;
|
|
182
|
-
} | null;
|
|
183
|
-
} | null;
|
|
184
|
-
} | {
|
|
185
|
-
__typename?: "GqlPoolElement";
|
|
186
|
-
id: string;
|
|
187
|
-
name: string;
|
|
188
|
-
address: `0x${string}`;
|
|
189
|
-
factory?: `0x${string}` | null;
|
|
190
|
-
protocolVersion: number;
|
|
191
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
192
|
-
createTime: number;
|
|
193
|
-
tokens: Array<{
|
|
194
|
-
__typename?: "GqlPoolTokenDetail";
|
|
195
|
-
index: number;
|
|
196
|
-
address: `0x${string}`;
|
|
197
|
-
symbol: string;
|
|
198
|
-
name: string;
|
|
199
|
-
decimals: number;
|
|
200
|
-
weight?: string | null;
|
|
201
|
-
balance: string;
|
|
202
|
-
balanceUSD: string;
|
|
203
|
-
}>;
|
|
204
|
-
dynamicData: {
|
|
205
|
-
__typename?: "GqlPoolDynamicData";
|
|
206
|
-
totalShares: string;
|
|
207
|
-
fees24h: string;
|
|
208
|
-
volume24h: string;
|
|
209
|
-
swapFee: string;
|
|
210
|
-
isInRecoveryMode: boolean;
|
|
211
|
-
isPaused: boolean;
|
|
212
|
-
totalLiquidity: string;
|
|
213
|
-
aprItems: Array<{
|
|
214
|
-
__typename?: "GqlPoolAprItem";
|
|
215
|
-
apr: number;
|
|
216
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
217
|
-
id: string;
|
|
218
|
-
}>;
|
|
219
|
-
};
|
|
220
|
-
rewardVault?: {
|
|
221
|
-
__typename?: "GqlRewardVault";
|
|
222
|
-
isVaultWhitelisted: boolean;
|
|
223
|
-
vaultAddress: `0x${string}`;
|
|
224
|
-
stakingTokenAddress: `0x${string}`;
|
|
225
|
-
dynamicData?: {
|
|
226
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
227
|
-
activeIncentivesValueUsd: string;
|
|
228
|
-
apr?: number | null;
|
|
229
|
-
bgtCapturePercentage: string;
|
|
230
|
-
allTimeReceivedBGTAmount: string;
|
|
231
|
-
} | null;
|
|
232
|
-
} | null;
|
|
233
|
-
} | {
|
|
234
|
-
__typename?: "GqlPoolFx";
|
|
235
|
-
id: string;
|
|
236
|
-
name: string;
|
|
237
|
-
address: `0x${string}`;
|
|
238
|
-
factory?: `0x${string}` | null;
|
|
239
|
-
protocolVersion: number;
|
|
240
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
241
|
-
createTime: number;
|
|
242
|
-
tokens: Array<{
|
|
243
|
-
__typename?: "GqlPoolTokenDetail";
|
|
244
|
-
index: number;
|
|
245
|
-
address: `0x${string}`;
|
|
246
|
-
symbol: string;
|
|
247
|
-
name: string;
|
|
248
|
-
decimals: number;
|
|
249
|
-
weight?: string | null;
|
|
250
|
-
balance: string;
|
|
251
|
-
balanceUSD: string;
|
|
252
|
-
}>;
|
|
253
|
-
dynamicData: {
|
|
254
|
-
__typename?: "GqlPoolDynamicData";
|
|
255
|
-
totalShares: string;
|
|
256
|
-
fees24h: string;
|
|
257
|
-
volume24h: string;
|
|
258
|
-
swapFee: string;
|
|
259
|
-
isInRecoveryMode: boolean;
|
|
260
|
-
isPaused: boolean;
|
|
261
|
-
totalLiquidity: string;
|
|
262
|
-
aprItems: Array<{
|
|
263
|
-
__typename?: "GqlPoolAprItem";
|
|
264
|
-
apr: number;
|
|
265
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
266
|
-
id: string;
|
|
267
|
-
}>;
|
|
268
|
-
};
|
|
269
|
-
rewardVault?: {
|
|
270
|
-
__typename?: "GqlRewardVault";
|
|
271
|
-
isVaultWhitelisted: boolean;
|
|
272
|
-
vaultAddress: `0x${string}`;
|
|
273
|
-
stakingTokenAddress: `0x${string}`;
|
|
274
|
-
dynamicData?: {
|
|
275
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
276
|
-
activeIncentivesValueUsd: string;
|
|
277
|
-
apr?: number | null;
|
|
278
|
-
bgtCapturePercentage: string;
|
|
279
|
-
allTimeReceivedBGTAmount: string;
|
|
280
|
-
} | null;
|
|
281
|
-
} | null;
|
|
282
|
-
} | {
|
|
283
|
-
__typename?: "GqlPoolGyro";
|
|
284
|
-
id: string;
|
|
285
|
-
name: string;
|
|
286
|
-
address: `0x${string}`;
|
|
287
|
-
factory?: `0x${string}` | null;
|
|
288
|
-
protocolVersion: number;
|
|
289
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
290
|
-
createTime: number;
|
|
291
|
-
tokens: Array<{
|
|
292
|
-
__typename?: "GqlPoolTokenDetail";
|
|
293
|
-
index: number;
|
|
294
|
-
address: `0x${string}`;
|
|
295
|
-
symbol: string;
|
|
296
|
-
name: string;
|
|
297
|
-
decimals: number;
|
|
298
|
-
weight?: string | null;
|
|
299
|
-
balance: string;
|
|
300
|
-
balanceUSD: string;
|
|
301
|
-
}>;
|
|
302
|
-
dynamicData: {
|
|
303
|
-
__typename?: "GqlPoolDynamicData";
|
|
304
|
-
totalShares: string;
|
|
305
|
-
fees24h: string;
|
|
306
|
-
volume24h: string;
|
|
307
|
-
swapFee: string;
|
|
308
|
-
isInRecoveryMode: boolean;
|
|
309
|
-
isPaused: boolean;
|
|
310
|
-
totalLiquidity: string;
|
|
311
|
-
aprItems: Array<{
|
|
312
|
-
__typename?: "GqlPoolAprItem";
|
|
313
|
-
apr: number;
|
|
314
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
315
|
-
id: string;
|
|
316
|
-
}>;
|
|
317
|
-
};
|
|
318
|
-
rewardVault?: {
|
|
319
|
-
__typename?: "GqlRewardVault";
|
|
320
|
-
isVaultWhitelisted: boolean;
|
|
321
|
-
vaultAddress: `0x${string}`;
|
|
322
|
-
stakingTokenAddress: `0x${string}`;
|
|
323
|
-
dynamicData?: {
|
|
324
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
325
|
-
activeIncentivesValueUsd: string;
|
|
326
|
-
apr?: number | null;
|
|
327
|
-
bgtCapturePercentage: string;
|
|
328
|
-
allTimeReceivedBGTAmount: string;
|
|
329
|
-
} | null;
|
|
330
|
-
} | null;
|
|
331
|
-
} | {
|
|
332
|
-
__typename?: "GqlPoolLiquidityBootstrapping";
|
|
333
|
-
id: string;
|
|
334
|
-
name: string;
|
|
335
|
-
address: `0x${string}`;
|
|
336
|
-
factory?: `0x${string}` | null;
|
|
337
|
-
protocolVersion: number;
|
|
338
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
339
|
-
createTime: number;
|
|
340
|
-
tokens: Array<{
|
|
341
|
-
__typename?: "GqlPoolTokenDetail";
|
|
342
|
-
index: number;
|
|
343
|
-
address: `0x${string}`;
|
|
344
|
-
symbol: string;
|
|
345
|
-
name: string;
|
|
346
|
-
decimals: number;
|
|
347
|
-
weight?: string | null;
|
|
348
|
-
balance: string;
|
|
349
|
-
balanceUSD: string;
|
|
350
|
-
}>;
|
|
351
|
-
dynamicData: {
|
|
352
|
-
__typename?: "GqlPoolDynamicData";
|
|
353
|
-
totalShares: string;
|
|
354
|
-
fees24h: string;
|
|
355
|
-
volume24h: string;
|
|
356
|
-
swapFee: string;
|
|
357
|
-
isInRecoveryMode: boolean;
|
|
358
|
-
isPaused: boolean;
|
|
359
|
-
totalLiquidity: string;
|
|
360
|
-
aprItems: Array<{
|
|
361
|
-
__typename?: "GqlPoolAprItem";
|
|
362
|
-
apr: number;
|
|
363
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
364
|
-
id: string;
|
|
365
|
-
}>;
|
|
366
|
-
};
|
|
367
|
-
rewardVault?: {
|
|
368
|
-
__typename?: "GqlRewardVault";
|
|
369
|
-
isVaultWhitelisted: boolean;
|
|
370
|
-
vaultAddress: `0x${string}`;
|
|
371
|
-
stakingTokenAddress: `0x${string}`;
|
|
372
|
-
dynamicData?: {
|
|
373
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
374
|
-
activeIncentivesValueUsd: string;
|
|
375
|
-
apr?: number | null;
|
|
376
|
-
bgtCapturePercentage: string;
|
|
377
|
-
allTimeReceivedBGTAmount: string;
|
|
378
|
-
} | null;
|
|
379
|
-
} | null;
|
|
380
|
-
} | {
|
|
381
|
-
__typename?: "GqlPoolMetaStable";
|
|
382
|
-
id: string;
|
|
383
|
-
name: string;
|
|
384
|
-
address: `0x${string}`;
|
|
385
|
-
factory?: `0x${string}` | null;
|
|
386
|
-
protocolVersion: number;
|
|
387
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
388
|
-
createTime: number;
|
|
389
|
-
tokens: Array<{
|
|
390
|
-
__typename?: "GqlPoolTokenDetail";
|
|
391
|
-
index: number;
|
|
392
|
-
address: `0x${string}`;
|
|
393
|
-
symbol: string;
|
|
394
|
-
name: string;
|
|
395
|
-
decimals: number;
|
|
396
|
-
weight?: string | null;
|
|
397
|
-
balance: string;
|
|
398
|
-
balanceUSD: string;
|
|
399
|
-
}>;
|
|
400
|
-
dynamicData: {
|
|
401
|
-
__typename?: "GqlPoolDynamicData";
|
|
402
|
-
totalShares: string;
|
|
403
|
-
fees24h: string;
|
|
404
|
-
volume24h: string;
|
|
405
|
-
swapFee: string;
|
|
406
|
-
isInRecoveryMode: boolean;
|
|
407
|
-
isPaused: boolean;
|
|
408
|
-
totalLiquidity: string;
|
|
409
|
-
aprItems: Array<{
|
|
410
|
-
__typename?: "GqlPoolAprItem";
|
|
411
|
-
apr: number;
|
|
412
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
413
|
-
id: string;
|
|
414
|
-
}>;
|
|
415
|
-
};
|
|
416
|
-
rewardVault?: {
|
|
417
|
-
__typename?: "GqlRewardVault";
|
|
418
|
-
isVaultWhitelisted: boolean;
|
|
419
|
-
vaultAddress: `0x${string}`;
|
|
420
|
-
stakingTokenAddress: `0x${string}`;
|
|
421
|
-
dynamicData?: {
|
|
422
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
423
|
-
activeIncentivesValueUsd: string;
|
|
424
|
-
apr?: number | null;
|
|
425
|
-
bgtCapturePercentage: string;
|
|
426
|
-
allTimeReceivedBGTAmount: string;
|
|
427
|
-
} | null;
|
|
428
|
-
} | null;
|
|
429
|
-
} | {
|
|
430
|
-
__typename?: "GqlPoolStable";
|
|
431
|
-
id: string;
|
|
432
|
-
name: string;
|
|
433
|
-
address: `0x${string}`;
|
|
434
|
-
factory?: `0x${string}` | null;
|
|
435
|
-
protocolVersion: number;
|
|
436
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
437
|
-
createTime: number;
|
|
438
|
-
tokens: Array<{
|
|
439
|
-
__typename?: "GqlPoolTokenDetail";
|
|
440
|
-
index: number;
|
|
441
|
-
address: `0x${string}`;
|
|
442
|
-
symbol: string;
|
|
443
|
-
name: string;
|
|
444
|
-
decimals: number;
|
|
445
|
-
weight?: string | null;
|
|
446
|
-
balance: string;
|
|
447
|
-
balanceUSD: string;
|
|
448
|
-
}>;
|
|
449
|
-
dynamicData: {
|
|
450
|
-
__typename?: "GqlPoolDynamicData";
|
|
451
|
-
totalShares: string;
|
|
452
|
-
fees24h: string;
|
|
453
|
-
volume24h: string;
|
|
454
|
-
swapFee: string;
|
|
455
|
-
isInRecoveryMode: boolean;
|
|
456
|
-
isPaused: boolean;
|
|
457
|
-
totalLiquidity: string;
|
|
458
|
-
aprItems: Array<{
|
|
459
|
-
__typename?: "GqlPoolAprItem";
|
|
460
|
-
apr: number;
|
|
461
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
462
|
-
id: string;
|
|
463
|
-
}>;
|
|
464
|
-
};
|
|
465
|
-
rewardVault?: {
|
|
466
|
-
__typename?: "GqlRewardVault";
|
|
467
|
-
isVaultWhitelisted: boolean;
|
|
468
|
-
vaultAddress: `0x${string}`;
|
|
469
|
-
stakingTokenAddress: `0x${string}`;
|
|
470
|
-
dynamicData?: {
|
|
471
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
472
|
-
activeIncentivesValueUsd: string;
|
|
473
|
-
apr?: number | null;
|
|
474
|
-
bgtCapturePercentage: string;
|
|
475
|
-
allTimeReceivedBGTAmount: string;
|
|
476
|
-
} | null;
|
|
477
|
-
} | null;
|
|
478
|
-
} | {
|
|
479
|
-
__typename?: "GqlPoolWeighted";
|
|
480
|
-
id: string;
|
|
481
|
-
name: string;
|
|
482
|
-
address: `0x${string}`;
|
|
483
|
-
factory?: `0x${string}` | null;
|
|
484
|
-
protocolVersion: number;
|
|
485
|
-
type: _berachain_graphql_dex_api.GqlPoolType;
|
|
486
|
-
createTime: number;
|
|
487
|
-
tokens: Array<{
|
|
488
|
-
__typename?: "GqlPoolTokenDetail";
|
|
489
|
-
index: number;
|
|
490
|
-
address: `0x${string}`;
|
|
491
|
-
symbol: string;
|
|
492
|
-
name: string;
|
|
493
|
-
decimals: number;
|
|
494
|
-
weight?: string | null;
|
|
495
|
-
balance: string;
|
|
496
|
-
balanceUSD: string;
|
|
497
|
-
}>;
|
|
498
|
-
dynamicData: {
|
|
499
|
-
__typename?: "GqlPoolDynamicData";
|
|
500
|
-
totalShares: string;
|
|
501
|
-
fees24h: string;
|
|
502
|
-
volume24h: string;
|
|
503
|
-
swapFee: string;
|
|
504
|
-
isInRecoveryMode: boolean;
|
|
505
|
-
isPaused: boolean;
|
|
506
|
-
totalLiquidity: string;
|
|
507
|
-
aprItems: Array<{
|
|
508
|
-
__typename?: "GqlPoolAprItem";
|
|
509
|
-
apr: number;
|
|
510
|
-
type: _berachain_graphql_dex_api.GqlPoolAprItemType;
|
|
511
|
-
id: string;
|
|
512
|
-
}>;
|
|
513
|
-
};
|
|
514
|
-
rewardVault?: {
|
|
515
|
-
__typename?: "GqlRewardVault";
|
|
516
|
-
isVaultWhitelisted: boolean;
|
|
517
|
-
vaultAddress: `0x${string}`;
|
|
518
|
-
stakingTokenAddress: `0x${string}`;
|
|
519
|
-
dynamicData?: {
|
|
520
|
-
__typename?: "GqlRewardVaultDynamicData";
|
|
521
|
-
activeIncentivesValueUsd: string;
|
|
522
|
-
apr?: number | null;
|
|
523
|
-
bgtCapturePercentage: string;
|
|
524
|
-
allTimeReceivedBGTAmount: string;
|
|
525
|
-
} | null;
|
|
526
|
-
} | null;
|
|
527
|
-
}>;
|
|
528
|
-
|
|
529
|
-
declare function getGlobalLiquidityAndSwapVolume(args?: BeraJS.BaseFunctionArgs): Promise<GetGlobalLiquidityAndSwapVolumeQuery>;
|
|
530
|
-
|
|
531
|
-
declare function getPoolEvents({ poolId, typeInArray, ...args }: {
|
|
532
|
-
poolId: string;
|
|
533
|
-
typeInArray: GqlPoolEventType[];
|
|
534
|
-
} & BeraJS.BaseFunctionArgs): Promise<GetPoolEventsQuery>;
|
|
535
|
-
|
|
536
|
-
/** @deprecated */
|
|
537
|
-
type PoolDayData = {
|
|
538
|
-
date: number;
|
|
539
|
-
tvlUsd: string;
|
|
540
|
-
volumeUsd: string;
|
|
541
|
-
feesUsd: string;
|
|
542
|
-
};
|
|
543
|
-
interface GetPoolHistoricalDataProps {
|
|
544
|
-
poolId: string;
|
|
545
|
-
chain: GqlChain;
|
|
546
|
-
}
|
|
547
|
-
declare function getPoolHistoricalData({ poolId, chain, ...args }: GetPoolHistoricalDataProps & BeraJS.BaseFunctionArgs): Promise<PoolHistoricalDataFragment[] | undefined>;
|
|
548
|
-
|
|
549
|
-
declare const getPoolState: (apiPool: MinimalPoolFragment) => PoolState;
|
|
550
|
-
|
|
551
|
-
declare function getVaultPausedState({ publicClient, ...args }: BeraJS.BaseFunctionArgs & {
|
|
552
|
-
publicClient: PublicClient;
|
|
553
|
-
}): Promise<boolean>;
|
|
554
|
-
|
|
555
|
-
type CheckProposalFieldResultMinimal = ProposalErrorCodes | null;
|
|
556
|
-
type CheckProposalFieldResult = ProposalErrorCodes | null | CheckProposalFieldResultMinimal[] | Record<string, CheckProposalFieldResultMinimal>;
|
|
557
|
-
/**
|
|
558
|
-
* Validates a single proposal field or ABI-typed value.
|
|
559
|
-
* Returns `null` if valid, or a `ProposalErrorCodes` value describing the problem.
|
|
560
|
-
*/
|
|
561
|
-
declare function checkProposalField(arg: {
|
|
562
|
-
fieldOrType: "address" | "hex" | "abi" | "string" | "bool" | `uint${string}` | `int${string}` | "action" | "title" | "forumLink" | "description" | "logoURI" | "url";
|
|
563
|
-
value: unknown;
|
|
564
|
-
required?: boolean;
|
|
565
|
-
baseUrl?: string;
|
|
566
|
-
components?: readonly (AbiParameter | readonly AbiParameter[])[];
|
|
567
|
-
}): CheckProposalFieldResultMinimal;
|
|
568
|
-
/**
|
|
569
|
-
* For tuple/tuple[] types, may return nested error structures.
|
|
570
|
-
*/
|
|
571
|
-
declare function checkProposalField(arg: {
|
|
572
|
-
fieldOrType: "tuple[]" | "tuple";
|
|
573
|
-
value: unknown;
|
|
574
|
-
required?: boolean;
|
|
575
|
-
baseUrl?: string;
|
|
576
|
-
components?: readonly (AbiParameter | readonly AbiParameter[])[];
|
|
577
|
-
}): CheckProposalFieldResult;
|
|
578
|
-
|
|
579
|
-
declare const MOCKED_PROPOSAL_STATUSES: readonly ProposalStatus[];
|
|
580
|
-
/**
|
|
581
|
-
* Derives the effective `ProposalStatus` by reconciling subgraph data with the
|
|
582
|
-
* on-chain contract state. Falls back to subgraph timestamps when the on-chain
|
|
583
|
-
* state is unavailable.
|
|
584
|
-
*/
|
|
585
|
-
declare function computeActualStatus(
|
|
586
|
-
/** Subgraph proposal data */
|
|
587
|
-
proposal: ProposalSelectionFragment,
|
|
588
|
-
/** Value returned by the `state` function of the governance contract */
|
|
589
|
-
proposalOnChainState?: ProposalState): ProposalStatus;
|
|
590
|
-
|
|
591
|
-
type GetAllProposalsArgs = BeraJS.BaseFunctionArgs & {
|
|
592
|
-
/** Subgraph filter applied to the proposals query */
|
|
593
|
-
where: Proposal_Filter;
|
|
594
|
-
/** Number of proposals to skip (for pagination) */
|
|
595
|
-
offset?: number;
|
|
596
|
-
/** Maximum proposals per page; must be ≤ 1000 */
|
|
597
|
-
perPage?: number;
|
|
598
|
-
orderBy?: Proposal_OrderBy;
|
|
599
|
-
orderDirection?: OrderDirection;
|
|
600
|
-
/** Full-text search query; switches to the search endpoint when provided */
|
|
601
|
-
text?: string;
|
|
602
|
-
};
|
|
603
|
-
/** Fetches a paginated list of governance proposals from the subgraph */
|
|
604
|
-
declare function getAllProposals({ where, orderBy, orderDirection, offset, perPage, text, ...args }: GetAllProposalsArgs): Promise<ProposalSelectionFragment[] | undefined>;
|
|
605
|
-
|
|
606
|
-
interface GetBodyErrorsArgs {
|
|
607
|
-
/** The proposal to validate */
|
|
608
|
-
proposal: CustomProposal;
|
|
609
|
-
/** The current governance topic, used for forum link base URL validation */
|
|
610
|
-
currentTopic: GovernanceTopic;
|
|
611
|
-
}
|
|
612
|
-
/** Validates the body fields (title, description, forum link) of a proposal */
|
|
613
|
-
declare function getBodyErrors({ proposal, currentTopic, }: GetBodyErrorsArgs): CustomProposalErrors;
|
|
614
|
-
|
|
615
|
-
interface GetDecodedFunctionDataArgs {
|
|
616
|
-
/** Contract address that emitted the calldata */
|
|
617
|
-
address: Address;
|
|
618
|
-
/** Raw calldata to decode */
|
|
619
|
-
callData: `0x${string}`;
|
|
620
|
-
/** @default defaultChainId */
|
|
621
|
-
chainId?: number;
|
|
622
|
-
publicClient: PublicClient;
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* Decodes the function data from a given contract address and calldata.
|
|
626
|
-
*
|
|
627
|
-
* Attempts to decode using a known set of ABIs first, then falls back to
|
|
628
|
-
* fetching the ABI from the block-explorer API.
|
|
629
|
-
*
|
|
630
|
-
* @returns An object with the decoded ABI item, function signature, function name, and arguments.
|
|
631
|
-
*/
|
|
632
|
-
declare function getDecodedFunctionData({ address, callData, chainId, publicClient, }: GetDecodedFunctionDataArgs): Promise<{
|
|
633
|
-
args: never[];
|
|
634
|
-
abiItem?: undefined;
|
|
635
|
-
functionSignature?: undefined;
|
|
636
|
-
functionName?: undefined;
|
|
637
|
-
} | {
|
|
638
|
-
abiItem: AbiFunction | undefined;
|
|
639
|
-
functionSignature: string | undefined;
|
|
640
|
-
functionName: string;
|
|
641
|
-
args: unknown[];
|
|
642
|
-
}>;
|
|
643
|
-
|
|
644
|
-
type GetProposalDetailsArgs = BeraJS.BaseFunctionArgs & {
|
|
645
|
-
/** On-chain proposal ID */
|
|
646
|
-
proposalId: string;
|
|
647
|
-
client?: PublicClient;
|
|
648
|
-
};
|
|
649
|
-
/** Fetches a single proposal with its vote data from the subgraph */
|
|
650
|
-
declare function getProposalDetails({ proposalId, ...args }: GetProposalDetailsArgs): Promise<ProposalWithVotesFragment | undefined>;
|
|
651
|
-
|
|
652
|
-
type GetProposalFromTxArgs = {
|
|
653
|
-
/** Viem public client used to fetch block and receipt data */
|
|
654
|
-
publicClient: PublicClient | undefined;
|
|
655
|
-
} & ({
|
|
656
|
-
/** Pre-fetched transaction receipt */
|
|
657
|
-
tx: TransactionReceipt;
|
|
658
|
-
} | {
|
|
659
|
-
/** Transaction hash to look up */
|
|
660
|
-
txHash: Address;
|
|
661
|
-
});
|
|
662
|
-
/**
|
|
663
|
-
* Reconstructs a `ProposalWithVotesFragment` from the `ProposalCreated` event
|
|
664
|
-
* emitted in a given transaction. Returns `null` if the event is not found.
|
|
665
|
-
*/
|
|
666
|
-
declare function getProposalFromTx(args: GetProposalFromTxArgs): Promise<ProposalWithVotesFragment | null>;
|
|
667
|
-
|
|
668
|
-
type GetProposalVotesArgs = BeraJS.BaseFunctionArgs & {
|
|
669
|
-
/** GraphQL variables forwarded to the GetProposalVotes query */
|
|
670
|
-
variables: GetProposalVotesQueryVariables;
|
|
671
|
-
};
|
|
672
|
-
/** Fetches the votes for a proposal from the subgraph */
|
|
673
|
-
declare function getProposalVotes({ variables, ...args }: GetProposalVotesArgs): Promise<{
|
|
674
|
-
data: GetProposalVotesQuery;
|
|
675
|
-
}>;
|
|
676
|
-
|
|
677
|
-
type ParseProposalBodyResult = graymatter.GrayMatterFile<string> & {
|
|
678
|
-
/** Whether the body uses YAML front-matter (true) or legacy heading format (false) */
|
|
679
|
-
isFrontMatter: boolean;
|
|
680
|
-
};
|
|
681
|
-
/**
|
|
682
|
-
* Parses the body of a governance proposal into structured front-matter and content.
|
|
683
|
-
* Supports YAML front-matter format and a legacy heading-based format.
|
|
684
|
-
* Falls back to raw description on parse failure.
|
|
685
|
-
*/
|
|
686
|
-
declare function parseProposalBody(proposal?: Pick<ProposalSelectionFragment, "description">): ParseProposalBodyResult;
|
|
687
|
-
|
|
688
|
-
declare function getChartData({ days, ...args }: BeraJS.BaseFunctionArgs & {
|
|
689
|
-
days: number;
|
|
690
|
-
}): Promise<GetSnapshotsQuery>;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* Arguments for the getCollateralWeights function.
|
|
694
|
-
*/
|
|
695
|
-
interface GetCollateralWeightsArgs extends BeraJS.BaseFunctionArgs {
|
|
696
|
-
client: PublicClient;
|
|
697
|
-
collateralList: Token[];
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Fetches the weights of collaterals from the honey factory contract.
|
|
701
|
-
* and returns a record of collateral addresses and their weights.
|
|
702
|
-
*
|
|
703
|
-
* @param {getCollateralWeightsArgs} args - The arguments for the function.
|
|
704
|
-
* @returns {Promise<Record<Address, bigint> | undefined>} A promise that resolves to a record of collateral addresses and their weights, or undefined if an error occurs.
|
|
705
|
-
*/
|
|
706
|
-
declare function getCollateralWeights({ client, collateralList, ...args }: GetCollateralWeightsArgs): Promise<Record<Address, bigint> | undefined>;
|
|
707
|
-
|
|
708
|
-
interface GetGlobalCapLimitArgs extends BeraJS.BaseFunctionArgs {
|
|
709
|
-
client: PublicClient;
|
|
710
|
-
asset: Token;
|
|
711
|
-
amount: string;
|
|
712
|
-
isMint: boolean;
|
|
713
|
-
latestPrices: PythLatestUpdates | undefined;
|
|
714
|
-
isPythWrapperEnabled: boolean;
|
|
715
|
-
}
|
|
716
|
-
/**
|
|
717
|
-
* Get the global cap limit for the Honey protocol.
|
|
718
|
-
*
|
|
719
|
-
* @param {Object} args - The arguments object.
|
|
720
|
-
* @param {PublicClient} args.client - The client used to interact with the blockchain.
|
|
721
|
-
* @param {Token} args.asset - The asset that is being provided for the exchange.
|
|
722
|
-
* @param {string} args.amount - The amount of the asset.
|
|
723
|
-
*
|
|
724
|
-
* @returns {Promise<boolean | undefined>} If the exchange will trigger the global cap limit or get close to it.
|
|
725
|
-
*/
|
|
726
|
-
declare function getGlobalCapLimit({ client, asset, amount, isMint, isPythWrapperEnabled, latestPrices, ...args }: GetGlobalCapLimitArgs): Promise<boolean | undefined>;
|
|
727
|
-
|
|
728
|
-
declare function getHoney24hVolume({ ...args }?: BeraJS.BaseFunctionArgs): Promise<BigNumber>;
|
|
729
|
-
|
|
730
|
-
interface GetHoneyCollateralsArgs extends BeraJS.BaseFunctionArgs {
|
|
731
|
-
/**
|
|
732
|
-
* The public client for blockchain interactions
|
|
733
|
-
*/
|
|
734
|
-
client: PublicClient;
|
|
735
|
-
/**
|
|
736
|
-
* Optional pre-fetched token data to avoid redundant contract calls
|
|
737
|
-
*/
|
|
738
|
-
tokenData?: TokenWithMetadata[];
|
|
739
|
-
/**
|
|
740
|
-
* preferred collateral order coming from edge config
|
|
741
|
-
*/
|
|
742
|
-
preferredCollateralOrder?: NonNullable<NonNullable<EdgeConfigSchema["honey"]>["preferredCollateralOrder"]>["mainnet"];
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Retrieves and processes collateral tokens for the Honey factory contract.
|
|
746
|
-
* Fetches registered collateral assets from the contract, enriches them with token metadata,
|
|
747
|
-
* and applies configurable ordering overrides.
|
|
748
|
-
*
|
|
749
|
-
* @returns
|
|
750
|
-
* - `collaterals`: Array of collateral tokens with metadata, sorted by contract order and any overrides
|
|
751
|
-
* - `referenceCollateral`: The reference collateral token used for relative & global cap limit
|
|
752
|
-
*/
|
|
753
|
-
declare function getHoneyCollaterals({ client, tokenData, preferredCollateralOrder, ...args }: GetHoneyCollateralsArgs): Promise<{
|
|
754
|
-
collaterals: TokenWithOrder[];
|
|
755
|
-
referenceCollateral: TokenWithOrder;
|
|
756
|
-
}>;
|
|
757
|
-
|
|
758
|
-
/**
|
|
759
|
-
* Gets the pause state of the Honey protocol
|
|
760
|
-
* @returns boolean
|
|
761
|
-
*/
|
|
762
|
-
declare function getHoneyPausedState({ client, ...args }: BeraJS.BaseFunctionArgs & {
|
|
763
|
-
client: PublicClient;
|
|
764
|
-
}): Promise<boolean>;
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Gets the address of the Honey Pyth Oracle, which is called by the Honey Root Price Oracle to get the price of the collaterals
|
|
768
|
-
* @returns
|
|
769
|
-
*/
|
|
770
|
-
declare function getHoneyPythOracle({ pythOracle, publicClient, }: {
|
|
771
|
-
publicClient: PublicClient;
|
|
772
|
-
pythOracle: Address;
|
|
773
|
-
}): Promise<`0x${string}`>;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Gets the address of the Honey Root Price Oracle, which keeps the logic to price the collaterals
|
|
777
|
-
*/
|
|
778
|
-
declare function getHoneyRootPriceOracle({ publicClient, factory, ...args }: BeraJS.BaseFunctionArgs & {
|
|
779
|
-
publicClient: PublicClient;
|
|
780
|
-
factory?: Address;
|
|
781
|
-
}): Promise<Address>;
|
|
782
|
-
|
|
783
|
-
interface GetRelativeCapLimitArgs extends BeraJS.BaseFunctionArgs {
|
|
784
|
-
client: PublicClient;
|
|
785
|
-
asset: Address;
|
|
786
|
-
amount: string;
|
|
787
|
-
isMint: boolean;
|
|
788
|
-
referenceCollateral: TokenWithOrder;
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* Get the relative cap limit for a given asset.
|
|
792
|
-
*
|
|
793
|
-
* @param {Object} args - The arguments object.
|
|
794
|
-
* @param {PublicClient} args.client - The client used to interact with the blockchain.
|
|
795
|
-
* @param {Address} args.asset - The address of the asset to get the relative cap limit for.
|
|
796
|
-
* @param {string} args.amount - The amount of the asset to get the relative cap limit for.
|
|
797
|
-
* @param {boolean} args.isMint - Whether the transaction is a mint or a redeem.
|
|
798
|
-
*
|
|
799
|
-
* @returns {Promise<boolean | undefined>} If the asset is relatively capped.
|
|
800
|
-
*/
|
|
801
|
-
declare function getRelativeCapLimit({ client, asset, amount, isMint, referenceCollateral, ...args }: GetRelativeCapLimitArgs): Promise<boolean | undefined>;
|
|
802
|
-
|
|
803
|
-
interface GetSwapPayloadReturn {
|
|
804
|
-
address: Address;
|
|
805
|
-
abi: Abi;
|
|
806
|
-
functionName: "mint" | "redeem";
|
|
807
|
-
params: ContractFunctionArgs<typeof honeyFactoryPythWrapperAbi, "payable", "mint" | "redeem"> | ContractFunctionArgs<typeof honeyFactoryAbi, "nonpayable", "mint" | "redeem">;
|
|
808
|
-
value: bigint;
|
|
809
|
-
}
|
|
810
|
-
declare const getSwapPayload: ({ state, publicClient, priceFeedMap, collateralList, isPythWrapperEnabled, ...args }: BeraJS.BaseFunctionArgs & {
|
|
811
|
-
state: Pick<IHoneySwapState, "actionType" | "fromAmount" | "collaterals" | "isBasketModeEnabled">;
|
|
812
|
-
collateralList: TokenWithMetadata[];
|
|
813
|
-
publicClient: PublicClient | undefined;
|
|
814
|
-
priceFeedMap?: PythPriceFeedMap;
|
|
815
|
-
isPythWrapperEnabled: boolean;
|
|
816
|
-
}) => Promise<({ account }: {
|
|
817
|
-
account: Address;
|
|
818
|
-
}) => GetSwapPayloadReturn>;
|
|
819
|
-
|
|
820
|
-
declare function isBasketModeEnabled({ client, isMint, collateralList, latestPrices, isPythWrapperEnabled, ...args }: {
|
|
821
|
-
client: PublicClient;
|
|
822
|
-
isMint: boolean;
|
|
823
|
-
collateralList: Token[];
|
|
824
|
-
latestPrices: PythLatestUpdates | undefined;
|
|
825
|
-
isPythWrapperEnabled: boolean;
|
|
826
|
-
} & BeraJS.BaseFunctionArgs): Promise<boolean | undefined>;
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Gets the timestamp of a block or an estimated timestamp if the block is in the future.
|
|
830
|
-
* @returns
|
|
831
|
-
*/
|
|
832
|
-
declare function getBlockTimestamp({ block, currentBlock, blockTime, publicClient, }: {
|
|
833
|
-
block: number | bigint | string;
|
|
834
|
-
currentBlock: number | bigint | string;
|
|
835
|
-
blockTime: number;
|
|
836
|
-
publicClient: PublicClient;
|
|
837
|
-
}): Promise<{
|
|
838
|
-
timestamp: number;
|
|
839
|
-
}>;
|
|
840
|
-
|
|
841
|
-
declare function getBlockTime({ defaultBlockTime, publicClient, blocksSpan, ...args }: {
|
|
842
|
-
defaultBlockTime?: number;
|
|
843
|
-
blocksSpan?: number;
|
|
844
|
-
publicClient: PublicClient | undefined;
|
|
845
|
-
} & BeraJS.BaseFunctionArgs): Promise<number>;
|
|
846
|
-
|
|
847
|
-
type StakingHistoryData = {
|
|
848
|
-
currentDepositRate: string;
|
|
849
|
-
earningsRealized: string;
|
|
850
|
-
earningsTotal: string;
|
|
851
|
-
};
|
|
852
|
-
type GetEarnedStakedBeraVaultArgs = {
|
|
853
|
-
/**
|
|
854
|
-
* The token that the user has staked
|
|
855
|
-
*/
|
|
856
|
-
address: Address;
|
|
857
|
-
/**
|
|
858
|
-
* The account that the user has staked
|
|
859
|
-
*/
|
|
860
|
-
account: Address;
|
|
861
|
-
};
|
|
862
|
-
declare function getEarnedStakedBeraVault({ address, account, ...args }: BeraJS.BaseFunctionArgs & GetEarnedStakedBeraVaultArgs): Promise<StakingHistoryData>;
|
|
863
|
-
|
|
864
|
-
declare function getIncentiveFeeClaimStats({ ...args }: BeraJS.BaseFunctionArgs): Promise<{
|
|
865
|
-
sumAllClaims: number;
|
|
866
|
-
sumClaimsInLast24Hours: number;
|
|
867
|
-
}>;
|
|
868
|
-
|
|
869
|
-
type GetLSTStakeConfigArgs = {
|
|
870
|
-
tokenList: TokenWithMetadata[];
|
|
871
|
-
publicClient?: PublicClient;
|
|
872
|
-
lstStakingVaults: Address[];
|
|
873
|
-
} & BeraJS.BaseFunctionArgs;
|
|
874
|
-
/**
|
|
875
|
-
* Builds staking configs from on-chain LST vaults and optional native configs.
|
|
876
|
-
*/
|
|
877
|
-
declare function getLSTStakeConfig({ tokenList, publicClient, lstStakingVaults, ...args }: GetLSTStakeConfigArgs): Promise<StakingConfig[]>;
|
|
878
|
-
|
|
879
|
-
declare function getRewardProofsByValidator({ account, validator, page, perPage, ...args }: {
|
|
880
|
-
account: Address;
|
|
881
|
-
validator: Address;
|
|
882
|
-
page?: number;
|
|
883
|
-
perPage?: number;
|
|
884
|
-
} & BeraJS.BaseFunctionArgs): Promise<BribeBoostRewardProof>;
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
*
|
|
888
|
-
* @param address - The address of the vault
|
|
889
|
-
* @throws {Error} If the vault is not found
|
|
890
|
-
* @returns
|
|
891
|
-
*/
|
|
892
|
-
declare function getRewardTokenToBeraRate({ address, publicClient, }: {
|
|
893
|
-
address: Address;
|
|
894
|
-
publicClient?: PublicClient;
|
|
895
|
-
}): Promise<number>;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
*
|
|
899
|
-
* @param address - The address of the vault
|
|
900
|
-
* @throws {Error} If the vault is not found
|
|
901
|
-
* @returns
|
|
902
|
-
*/
|
|
903
|
-
declare function getRewardVault({ address, chainName, ...args }: {
|
|
904
|
-
address: Address;
|
|
905
|
-
chainName?: GqlChain$1;
|
|
906
|
-
} & BeraJS.BaseFunctionArgs): Promise<ApiVaultFragment>;
|
|
907
|
-
|
|
908
|
-
interface RewardVaultDurationConstants {
|
|
909
|
-
minRewardDuration: number;
|
|
910
|
-
maxRewardDuration: number;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Returns the minimum and maximum reward duration constants for all reward vaults.
|
|
914
|
-
*/
|
|
915
|
-
declare function getRewardVaultDurationConstants({ publicClient, ...baseArgs }: BeraJS.BaseFunctionArgs & {
|
|
916
|
-
publicClient: PublicClient;
|
|
917
|
-
}): Promise<RewardVaultDurationConstants>;
|
|
918
|
-
|
|
919
|
-
declare function getRewardVaultFromToken({ tokenAddress, publicClient, factoryAddress, ...args }: {
|
|
920
|
-
tokenAddress: Address;
|
|
921
|
-
publicClient: PublicClient;
|
|
922
|
-
factoryAddress?: Address;
|
|
923
|
-
} & BeraJS.BaseFunctionArgs): Promise<`0x${string}` | null>;
|
|
924
|
-
|
|
925
|
-
declare function getRewardVaultStakingToken({ address, publicClient, }: {
|
|
926
|
-
address: Address;
|
|
927
|
-
publicClient: NonNullable<PublicClient>;
|
|
928
|
-
}): Promise<`0x${string}`>;
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
*
|
|
932
|
-
* @throws {Error} If the vault is not found
|
|
933
|
-
* @returns
|
|
934
|
-
*/
|
|
935
|
-
declare function getStakedBeraAPR({ window, ...args }: {
|
|
936
|
-
/**
|
|
937
|
-
* APR might vary depending on the annualized time window (day or week)
|
|
938
|
-
*/
|
|
939
|
-
window: "DAY" | "WEEK";
|
|
940
|
-
} & BeraJS.BaseFunctionArgs): Promise<number>;
|
|
941
|
-
|
|
942
|
-
type GetStakedBeraSnapshotsArgs = {
|
|
943
|
-
chain?: GqlChain$1;
|
|
944
|
-
range?: GqlVaultSnapshotDataRange;
|
|
945
|
-
} & BeraJS.BaseFunctionArgs;
|
|
946
|
-
/**
|
|
947
|
-
*
|
|
948
|
-
* @throws {Error} If the vault is not found
|
|
949
|
-
* @returns
|
|
950
|
-
*/
|
|
951
|
-
declare function getStakedBeraSnapshots({ chain, range, ...args }?: GetStakedBeraSnapshotsArgs): Promise<GetSWberaVaultSnapshotsQuery["polGetSWberaVaultSnapshots"]>;
|
|
952
|
-
|
|
953
|
-
declare function getStakeWithdrawalCooldown({ publicClient, address, }: {
|
|
954
|
-
publicClient: PublicClient;
|
|
955
|
-
address: Address;
|
|
956
|
-
}): Promise<number>;
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* Get the total staked amount for a given vault address
|
|
960
|
-
* @param vaultAddresses - The addresses of the vaults to get the total staked amount for
|
|
961
|
-
* @param publicClient - The public client to use to get the total staked amount
|
|
962
|
-
* @returns The total staked amount for the given vault addresses
|
|
963
|
-
*/
|
|
964
|
-
declare function getTotalStakedAmount({ vaultAddresses, publicClient, }: {
|
|
965
|
-
vaultAddresses: Address$1[];
|
|
966
|
-
publicClient?: PublicClient;
|
|
967
|
-
} & BeraJS.BaseFunctionArgs): Promise<Record<Address$1, bigint>>;
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* Server-side function to get user claimable incentives grouped by validator
|
|
971
|
-
*/
|
|
972
|
-
declare function getUserClaimableIncentives({ account, ...args }: {
|
|
973
|
-
account: Address;
|
|
974
|
-
} & BeraJS.BaseFunctionArgs): Promise<BribeBoostRewardItem[] | null>;
|
|
975
|
-
|
|
976
|
-
interface GetUserVaultInfoParams {
|
|
977
|
-
account: Address;
|
|
978
|
-
vaultAddress: Address;
|
|
979
|
-
publicClient: PublicClient | undefined;
|
|
980
|
-
}
|
|
981
|
-
declare function getUserVaultInfo({ account, vaultAddress, publicClient, }: GetUserVaultInfoParams): Promise<UserVaultInfo>;
|
|
982
|
-
|
|
983
|
-
interface GetUserVaultsInfo {
|
|
984
|
-
account: string | undefined;
|
|
985
|
-
vaultAddress: Address;
|
|
986
|
-
publicClient: PublicClient | undefined;
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
|
-
* Gets claimable rewards for a user's vault.
|
|
990
|
-
*
|
|
991
|
-
* It can also be used to get the claimable fees from the BGT staker
|
|
992
|
-
* @returns
|
|
993
|
-
*/
|
|
994
|
-
declare function getUserVaultsReward({ account, vaultAddress, publicClient, }: GetUserVaultsInfo): Promise<bigint>;
|
|
995
|
-
|
|
996
|
-
declare function getVaultValidators({ address, onlyActiveValidators, ...args }: {
|
|
997
|
-
address: Address;
|
|
998
|
-
onlyActiveValidators?: boolean;
|
|
999
|
-
} & BeraJS.BaseFunctionArgs): Promise<ApiValidatorFragment[]>;
|
|
1000
|
-
|
|
1001
|
-
declare function getTokenCurrentPrices({ addressIn: _addressIn, ...args }: {
|
|
1002
|
-
addressIn: string[];
|
|
1003
|
-
} & BeraJS.BaseFunctionArgs): Promise<TokenCurrentPriceMap>;
|
|
1004
|
-
|
|
1005
|
-
/**
|
|
1006
|
-
* Given a list of tokens, it will return the price feed ids for each token according to honey priceOracle
|
|
1007
|
-
* @returns
|
|
1008
|
-
*/
|
|
1009
|
-
declare function getHoneyPythFeeds({ tokenList, publicClient, ...args }: {
|
|
1010
|
-
tokenList: readonly Address$1[];
|
|
1011
|
-
publicClient: PublicClient;
|
|
1012
|
-
} & BeraJS.BaseFunctionArgs): Promise<PythPriceFeedMap>;
|
|
1013
|
-
|
|
1014
|
-
declare function getPythUpdateFee({ client, priceFeedId, ...args }: {
|
|
1015
|
-
client: PublicClient;
|
|
1016
|
-
priceFeedId: Address[];
|
|
1017
|
-
} & BeraJS.BaseFunctionArgs): Promise<bigint>;
|
|
1018
|
-
|
|
1019
|
-
interface GetAllowances {
|
|
1020
|
-
items: AllowanceQueryItem[] | undefined;
|
|
1021
|
-
account: `0x${string}` | undefined;
|
|
1022
|
-
config: Config | undefined;
|
|
1023
|
-
}
|
|
1024
|
-
type GetAllowancesResponse = AllowanceToken[] | undefined;
|
|
1025
|
-
declare function getAllowances({ items: itemsList, account, config, }: GetAllowances): Promise<GetAllowancesResponse>;
|
|
1026
|
-
|
|
1027
|
-
interface GetTokenInformation {
|
|
1028
|
-
address: Address;
|
|
1029
|
-
publicClient: PublicClient;
|
|
1030
|
-
chainId: ChainId;
|
|
1031
|
-
}
|
|
1032
|
-
type GetTokenInformationResponse = MinimalERC20;
|
|
1033
|
-
declare function getTokenInformation({ address, publicClient, chainId, }: GetTokenInformation): Promise<GetTokenInformationResponse>;
|
|
1034
|
-
|
|
1035
|
-
declare function getTokens({ url, ...args }?: BeraJS.BaseFunctionArgs & {
|
|
1036
|
-
url?: string;
|
|
1037
|
-
}): Promise<TokenWithMetadata[]>;
|
|
1038
|
-
|
|
1039
|
-
interface GetWalletBalances {
|
|
1040
|
-
account: string | undefined;
|
|
1041
|
-
tokenList: Token[] | undefined;
|
|
1042
|
-
wagmiConfig: Config | undefined;
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* Returns the payload for the balanceOf call for a given token and account.
|
|
1046
|
-
*
|
|
1047
|
-
* @internal
|
|
1048
|
-
* @returns
|
|
1049
|
-
*/
|
|
1050
|
-
declare function getBalanceCall({ token, account, multicallAddress, }: {
|
|
1051
|
-
token: Token;
|
|
1052
|
-
account: Address;
|
|
1053
|
-
multicallAddress: Address;
|
|
1054
|
-
}): {
|
|
1055
|
-
readonly address: `0x${string}`;
|
|
1056
|
-
readonly abi: readonly [{
|
|
1057
|
-
readonly inputs: readonly [{
|
|
1058
|
-
readonly components: readonly [{
|
|
1059
|
-
readonly internalType: "address";
|
|
1060
|
-
readonly name: "target";
|
|
1061
|
-
readonly type: "address";
|
|
1062
|
-
}, {
|
|
1063
|
-
readonly internalType: "bytes";
|
|
1064
|
-
readonly name: "callData";
|
|
1065
|
-
readonly type: "bytes";
|
|
1066
|
-
}];
|
|
1067
|
-
readonly internalType: "struct Multicall3.Call[]";
|
|
1068
|
-
readonly name: "calls";
|
|
1069
|
-
readonly type: "tuple[]";
|
|
1070
|
-
}];
|
|
1071
|
-
readonly name: "aggregate";
|
|
1072
|
-
readonly outputs: readonly [{
|
|
1073
|
-
readonly internalType: "uint256";
|
|
1074
|
-
readonly name: "blockNumber";
|
|
1075
|
-
readonly type: "uint256";
|
|
1076
|
-
}, {
|
|
1077
|
-
readonly internalType: "bytes[]";
|
|
1078
|
-
readonly name: "returnData";
|
|
1079
|
-
readonly type: "bytes[]";
|
|
1080
|
-
}];
|
|
1081
|
-
readonly stateMutability: "payable";
|
|
1082
|
-
readonly type: "function";
|
|
1083
|
-
}, {
|
|
1084
|
-
readonly inputs: readonly [{
|
|
1085
|
-
readonly components: readonly [{
|
|
1086
|
-
readonly internalType: "address";
|
|
1087
|
-
readonly name: "target";
|
|
1088
|
-
readonly type: "address";
|
|
1089
|
-
}, {
|
|
1090
|
-
readonly internalType: "bool";
|
|
1091
|
-
readonly name: "allowFailure";
|
|
1092
|
-
readonly type: "bool";
|
|
1093
|
-
}, {
|
|
1094
|
-
readonly internalType: "bytes";
|
|
1095
|
-
readonly name: "callData";
|
|
1096
|
-
readonly type: "bytes";
|
|
1097
|
-
}];
|
|
1098
|
-
readonly internalType: "struct Multicall3.Call3[]";
|
|
1099
|
-
readonly name: "calls";
|
|
1100
|
-
readonly type: "tuple[]";
|
|
1101
|
-
}];
|
|
1102
|
-
readonly name: "aggregate3";
|
|
1103
|
-
readonly outputs: readonly [{
|
|
1104
|
-
readonly components: readonly [{
|
|
1105
|
-
readonly internalType: "bool";
|
|
1106
|
-
readonly name: "success";
|
|
1107
|
-
readonly type: "bool";
|
|
1108
|
-
}, {
|
|
1109
|
-
readonly internalType: "bytes";
|
|
1110
|
-
readonly name: "returnData";
|
|
1111
|
-
readonly type: "bytes";
|
|
1112
|
-
}];
|
|
1113
|
-
readonly internalType: "struct Multicall3.Result[]";
|
|
1114
|
-
readonly name: "returnData";
|
|
1115
|
-
readonly type: "tuple[]";
|
|
1116
|
-
}];
|
|
1117
|
-
readonly stateMutability: "payable";
|
|
1118
|
-
readonly type: "function";
|
|
1119
|
-
}, {
|
|
1120
|
-
readonly inputs: readonly [{
|
|
1121
|
-
readonly components: readonly [{
|
|
1122
|
-
readonly internalType: "address";
|
|
1123
|
-
readonly name: "target";
|
|
1124
|
-
readonly type: "address";
|
|
1125
|
-
}, {
|
|
1126
|
-
readonly internalType: "bool";
|
|
1127
|
-
readonly name: "allowFailure";
|
|
1128
|
-
readonly type: "bool";
|
|
1129
|
-
}, {
|
|
1130
|
-
readonly internalType: "uint256";
|
|
1131
|
-
readonly name: "value";
|
|
1132
|
-
readonly type: "uint256";
|
|
1133
|
-
}, {
|
|
1134
|
-
readonly internalType: "bytes";
|
|
1135
|
-
readonly name: "callData";
|
|
1136
|
-
readonly type: "bytes";
|
|
1137
|
-
}];
|
|
1138
|
-
readonly internalType: "struct Multicall3.Call3Value[]";
|
|
1139
|
-
readonly name: "calls";
|
|
1140
|
-
readonly type: "tuple[]";
|
|
1141
|
-
}];
|
|
1142
|
-
readonly name: "aggregate3Value";
|
|
1143
|
-
readonly outputs: readonly [{
|
|
1144
|
-
readonly components: readonly [{
|
|
1145
|
-
readonly internalType: "bool";
|
|
1146
|
-
readonly name: "success";
|
|
1147
|
-
readonly type: "bool";
|
|
1148
|
-
}, {
|
|
1149
|
-
readonly internalType: "bytes";
|
|
1150
|
-
readonly name: "returnData";
|
|
1151
|
-
readonly type: "bytes";
|
|
1152
|
-
}];
|
|
1153
|
-
readonly internalType: "struct Multicall3.Result[]";
|
|
1154
|
-
readonly name: "returnData";
|
|
1155
|
-
readonly type: "tuple[]";
|
|
1156
|
-
}];
|
|
1157
|
-
readonly stateMutability: "payable";
|
|
1158
|
-
readonly type: "function";
|
|
1159
|
-
}, {
|
|
1160
|
-
readonly inputs: readonly [{
|
|
1161
|
-
readonly components: readonly [{
|
|
1162
|
-
readonly internalType: "address";
|
|
1163
|
-
readonly name: "target";
|
|
1164
|
-
readonly type: "address";
|
|
1165
|
-
}, {
|
|
1166
|
-
readonly internalType: "bytes";
|
|
1167
|
-
readonly name: "callData";
|
|
1168
|
-
readonly type: "bytes";
|
|
1169
|
-
}];
|
|
1170
|
-
readonly internalType: "struct Multicall3.Call[]";
|
|
1171
|
-
readonly name: "calls";
|
|
1172
|
-
readonly type: "tuple[]";
|
|
1173
|
-
}];
|
|
1174
|
-
readonly name: "blockAndAggregate";
|
|
1175
|
-
readonly outputs: readonly [{
|
|
1176
|
-
readonly internalType: "uint256";
|
|
1177
|
-
readonly name: "blockNumber";
|
|
1178
|
-
readonly type: "uint256";
|
|
1179
|
-
}, {
|
|
1180
|
-
readonly internalType: "bytes32";
|
|
1181
|
-
readonly name: "blockHash";
|
|
1182
|
-
readonly type: "bytes32";
|
|
1183
|
-
}, {
|
|
1184
|
-
readonly components: readonly [{
|
|
1185
|
-
readonly internalType: "bool";
|
|
1186
|
-
readonly name: "success";
|
|
1187
|
-
readonly type: "bool";
|
|
1188
|
-
}, {
|
|
1189
|
-
readonly internalType: "bytes";
|
|
1190
|
-
readonly name: "returnData";
|
|
1191
|
-
readonly type: "bytes";
|
|
1192
|
-
}];
|
|
1193
|
-
readonly internalType: "struct Multicall3.Result[]";
|
|
1194
|
-
readonly name: "returnData";
|
|
1195
|
-
readonly type: "tuple[]";
|
|
1196
|
-
}];
|
|
1197
|
-
readonly stateMutability: "payable";
|
|
1198
|
-
readonly type: "function";
|
|
1199
|
-
}, {
|
|
1200
|
-
readonly inputs: readonly [];
|
|
1201
|
-
readonly name: "getBasefee";
|
|
1202
|
-
readonly outputs: readonly [{
|
|
1203
|
-
readonly internalType: "uint256";
|
|
1204
|
-
readonly name: "basefee";
|
|
1205
|
-
readonly type: "uint256";
|
|
1206
|
-
}];
|
|
1207
|
-
readonly stateMutability: "view";
|
|
1208
|
-
readonly type: "function";
|
|
1209
|
-
}, {
|
|
1210
|
-
readonly inputs: readonly [{
|
|
1211
|
-
readonly internalType: "uint256";
|
|
1212
|
-
readonly name: "blockNumber";
|
|
1213
|
-
readonly type: "uint256";
|
|
1214
|
-
}];
|
|
1215
|
-
readonly name: "getBlockHash";
|
|
1216
|
-
readonly outputs: readonly [{
|
|
1217
|
-
readonly internalType: "bytes32";
|
|
1218
|
-
readonly name: "blockHash";
|
|
1219
|
-
readonly type: "bytes32";
|
|
1220
|
-
}];
|
|
1221
|
-
readonly stateMutability: "view";
|
|
1222
|
-
readonly type: "function";
|
|
1223
|
-
}, {
|
|
1224
|
-
readonly inputs: readonly [];
|
|
1225
|
-
readonly name: "getBlockNumber";
|
|
1226
|
-
readonly outputs: readonly [{
|
|
1227
|
-
readonly internalType: "uint256";
|
|
1228
|
-
readonly name: "blockNumber";
|
|
1229
|
-
readonly type: "uint256";
|
|
1230
|
-
}];
|
|
1231
|
-
readonly stateMutability: "view";
|
|
1232
|
-
readonly type: "function";
|
|
1233
|
-
}, {
|
|
1234
|
-
readonly inputs: readonly [];
|
|
1235
|
-
readonly name: "getChainId";
|
|
1236
|
-
readonly outputs: readonly [{
|
|
1237
|
-
readonly internalType: "uint256";
|
|
1238
|
-
readonly name: "chainid";
|
|
1239
|
-
readonly type: "uint256";
|
|
1240
|
-
}];
|
|
1241
|
-
readonly stateMutability: "view";
|
|
1242
|
-
readonly type: "function";
|
|
1243
|
-
}, {
|
|
1244
|
-
readonly inputs: readonly [];
|
|
1245
|
-
readonly name: "getCurrentBlockCoinbase";
|
|
1246
|
-
readonly outputs: readonly [{
|
|
1247
|
-
readonly internalType: "address";
|
|
1248
|
-
readonly name: "coinbase";
|
|
1249
|
-
readonly type: "address";
|
|
1250
|
-
}];
|
|
1251
|
-
readonly stateMutability: "view";
|
|
1252
|
-
readonly type: "function";
|
|
1253
|
-
}, {
|
|
1254
|
-
readonly inputs: readonly [];
|
|
1255
|
-
readonly name: "getCurrentBlockDifficulty";
|
|
1256
|
-
readonly outputs: readonly [{
|
|
1257
|
-
readonly internalType: "uint256";
|
|
1258
|
-
readonly name: "difficulty";
|
|
1259
|
-
readonly type: "uint256";
|
|
1260
|
-
}];
|
|
1261
|
-
readonly stateMutability: "view";
|
|
1262
|
-
readonly type: "function";
|
|
1263
|
-
}, {
|
|
1264
|
-
readonly inputs: readonly [];
|
|
1265
|
-
readonly name: "getCurrentBlockGasLimit";
|
|
1266
|
-
readonly outputs: readonly [{
|
|
1267
|
-
readonly internalType: "uint256";
|
|
1268
|
-
readonly name: "gaslimit";
|
|
1269
|
-
readonly type: "uint256";
|
|
1270
|
-
}];
|
|
1271
|
-
readonly stateMutability: "view";
|
|
1272
|
-
readonly type: "function";
|
|
1273
|
-
}, {
|
|
1274
|
-
readonly inputs: readonly [];
|
|
1275
|
-
readonly name: "getCurrentBlockTimestamp";
|
|
1276
|
-
readonly outputs: readonly [{
|
|
1277
|
-
readonly internalType: "uint256";
|
|
1278
|
-
readonly name: "timestamp";
|
|
1279
|
-
readonly type: "uint256";
|
|
1280
|
-
}];
|
|
1281
|
-
readonly stateMutability: "view";
|
|
1282
|
-
readonly type: "function";
|
|
1283
|
-
}, {
|
|
1284
|
-
readonly inputs: readonly [{
|
|
1285
|
-
readonly internalType: "address";
|
|
1286
|
-
readonly name: "addr";
|
|
1287
|
-
readonly type: "address";
|
|
1288
|
-
}];
|
|
1289
|
-
readonly name: "getEthBalance";
|
|
1290
|
-
readonly outputs: readonly [{
|
|
1291
|
-
readonly internalType: "uint256";
|
|
1292
|
-
readonly name: "balance";
|
|
1293
|
-
readonly type: "uint256";
|
|
1294
|
-
}];
|
|
1295
|
-
readonly stateMutability: "view";
|
|
1296
|
-
readonly type: "function";
|
|
1297
|
-
}, {
|
|
1298
|
-
readonly inputs: readonly [];
|
|
1299
|
-
readonly name: "getLastBlockHash";
|
|
1300
|
-
readonly outputs: readonly [{
|
|
1301
|
-
readonly internalType: "bytes32";
|
|
1302
|
-
readonly name: "blockHash";
|
|
1303
|
-
readonly type: "bytes32";
|
|
1304
|
-
}];
|
|
1305
|
-
readonly stateMutability: "view";
|
|
1306
|
-
readonly type: "function";
|
|
1307
|
-
}, {
|
|
1308
|
-
readonly inputs: readonly [{
|
|
1309
|
-
readonly internalType: "bool";
|
|
1310
|
-
readonly name: "requireSuccess";
|
|
1311
|
-
readonly type: "bool";
|
|
1312
|
-
}, {
|
|
1313
|
-
readonly components: readonly [{
|
|
1314
|
-
readonly internalType: "address";
|
|
1315
|
-
readonly name: "target";
|
|
1316
|
-
readonly type: "address";
|
|
1317
|
-
}, {
|
|
1318
|
-
readonly internalType: "bytes";
|
|
1319
|
-
readonly name: "callData";
|
|
1320
|
-
readonly type: "bytes";
|
|
1321
|
-
}];
|
|
1322
|
-
readonly internalType: "struct Multicall3.Call[]";
|
|
1323
|
-
readonly name: "calls";
|
|
1324
|
-
readonly type: "tuple[]";
|
|
1325
|
-
}];
|
|
1326
|
-
readonly name: "tryAggregate";
|
|
1327
|
-
readonly outputs: readonly [{
|
|
1328
|
-
readonly components: readonly [{
|
|
1329
|
-
readonly internalType: "bool";
|
|
1330
|
-
readonly name: "success";
|
|
1331
|
-
readonly type: "bool";
|
|
1332
|
-
}, {
|
|
1333
|
-
readonly internalType: "bytes";
|
|
1334
|
-
readonly name: "returnData";
|
|
1335
|
-
readonly type: "bytes";
|
|
1336
|
-
}];
|
|
1337
|
-
readonly internalType: "struct Multicall3.Result[]";
|
|
1338
|
-
readonly name: "returnData";
|
|
1339
|
-
readonly type: "tuple[]";
|
|
1340
|
-
}];
|
|
1341
|
-
readonly stateMutability: "payable";
|
|
1342
|
-
readonly type: "function";
|
|
1343
|
-
}, {
|
|
1344
|
-
readonly inputs: readonly [{
|
|
1345
|
-
readonly internalType: "bool";
|
|
1346
|
-
readonly name: "requireSuccess";
|
|
1347
|
-
readonly type: "bool";
|
|
1348
|
-
}, {
|
|
1349
|
-
readonly components: readonly [{
|
|
1350
|
-
readonly internalType: "address";
|
|
1351
|
-
readonly name: "target";
|
|
1352
|
-
readonly type: "address";
|
|
1353
|
-
}, {
|
|
1354
|
-
readonly internalType: "bytes";
|
|
1355
|
-
readonly name: "callData";
|
|
1356
|
-
readonly type: "bytes";
|
|
1357
|
-
}];
|
|
1358
|
-
readonly internalType: "struct Multicall3.Call[]";
|
|
1359
|
-
readonly name: "calls";
|
|
1360
|
-
readonly type: "tuple[]";
|
|
1361
|
-
}];
|
|
1362
|
-
readonly name: "tryBlockAndAggregate";
|
|
1363
|
-
readonly outputs: readonly [{
|
|
1364
|
-
readonly internalType: "uint256";
|
|
1365
|
-
readonly name: "blockNumber";
|
|
1366
|
-
readonly type: "uint256";
|
|
1367
|
-
}, {
|
|
1368
|
-
readonly internalType: "bytes32";
|
|
1369
|
-
readonly name: "blockHash";
|
|
1370
|
-
readonly type: "bytes32";
|
|
1371
|
-
}, {
|
|
1372
|
-
readonly components: readonly [{
|
|
1373
|
-
readonly internalType: "bool";
|
|
1374
|
-
readonly name: "success";
|
|
1375
|
-
readonly type: "bool";
|
|
1376
|
-
}, {
|
|
1377
|
-
readonly internalType: "bytes";
|
|
1378
|
-
readonly name: "returnData";
|
|
1379
|
-
readonly type: "bytes";
|
|
1380
|
-
}];
|
|
1381
|
-
readonly internalType: "struct Multicall3.Result[]";
|
|
1382
|
-
readonly name: "returnData";
|
|
1383
|
-
readonly type: "tuple[]";
|
|
1384
|
-
}];
|
|
1385
|
-
readonly stateMutability: "payable";
|
|
1386
|
-
readonly type: "function";
|
|
1387
|
-
}];
|
|
1388
|
-
readonly functionName: "getEthBalance";
|
|
1389
|
-
readonly args: readonly [`0x${string}`];
|
|
1390
|
-
} | {
|
|
1391
|
-
readonly address: Address;
|
|
1392
|
-
readonly abi: readonly [{
|
|
1393
|
-
readonly type: "event";
|
|
1394
|
-
readonly name: "Approval";
|
|
1395
|
-
readonly inputs: readonly [{
|
|
1396
|
-
readonly indexed: true;
|
|
1397
|
-
readonly name: "owner";
|
|
1398
|
-
readonly type: "address";
|
|
1399
|
-
}, {
|
|
1400
|
-
readonly indexed: true;
|
|
1401
|
-
readonly name: "spender";
|
|
1402
|
-
readonly type: "address";
|
|
1403
|
-
}, {
|
|
1404
|
-
readonly indexed: false;
|
|
1405
|
-
readonly name: "value";
|
|
1406
|
-
readonly type: "uint256";
|
|
1407
|
-
}];
|
|
1408
|
-
}, {
|
|
1409
|
-
readonly type: "event";
|
|
1410
|
-
readonly name: "Transfer";
|
|
1411
|
-
readonly inputs: readonly [{
|
|
1412
|
-
readonly indexed: true;
|
|
1413
|
-
readonly name: "from";
|
|
1414
|
-
readonly type: "address";
|
|
1415
|
-
}, {
|
|
1416
|
-
readonly indexed: true;
|
|
1417
|
-
readonly name: "to";
|
|
1418
|
-
readonly type: "address";
|
|
1419
|
-
}, {
|
|
1420
|
-
readonly indexed: false;
|
|
1421
|
-
readonly name: "value";
|
|
1422
|
-
readonly type: "uint256";
|
|
1423
|
-
}];
|
|
1424
|
-
}, {
|
|
1425
|
-
readonly type: "function";
|
|
1426
|
-
readonly name: "allowance";
|
|
1427
|
-
readonly stateMutability: "view";
|
|
1428
|
-
readonly inputs: readonly [{
|
|
1429
|
-
readonly name: "owner";
|
|
1430
|
-
readonly type: "address";
|
|
1431
|
-
}, {
|
|
1432
|
-
readonly name: "spender";
|
|
1433
|
-
readonly type: "address";
|
|
1434
|
-
}];
|
|
1435
|
-
readonly outputs: readonly [{
|
|
1436
|
-
readonly type: "uint256";
|
|
1437
|
-
}];
|
|
1438
|
-
}, {
|
|
1439
|
-
readonly type: "function";
|
|
1440
|
-
readonly name: "approve";
|
|
1441
|
-
readonly stateMutability: "nonpayable";
|
|
1442
|
-
readonly inputs: readonly [{
|
|
1443
|
-
readonly name: "spender";
|
|
1444
|
-
readonly type: "address";
|
|
1445
|
-
}, {
|
|
1446
|
-
readonly name: "amount";
|
|
1447
|
-
readonly type: "uint256";
|
|
1448
|
-
}];
|
|
1449
|
-
readonly outputs: readonly [{
|
|
1450
|
-
readonly type: "bool";
|
|
1451
|
-
}];
|
|
1452
|
-
}, {
|
|
1453
|
-
readonly type: "function";
|
|
1454
|
-
readonly name: "balanceOf";
|
|
1455
|
-
readonly stateMutability: "view";
|
|
1456
|
-
readonly inputs: readonly [{
|
|
1457
|
-
readonly name: "account";
|
|
1458
|
-
readonly type: "address";
|
|
1459
|
-
}];
|
|
1460
|
-
readonly outputs: readonly [{
|
|
1461
|
-
readonly type: "uint256";
|
|
1462
|
-
}];
|
|
1463
|
-
}, {
|
|
1464
|
-
readonly type: "function";
|
|
1465
|
-
readonly name: "decimals";
|
|
1466
|
-
readonly stateMutability: "view";
|
|
1467
|
-
readonly inputs: readonly [];
|
|
1468
|
-
readonly outputs: readonly [{
|
|
1469
|
-
readonly type: "uint8";
|
|
1470
|
-
}];
|
|
1471
|
-
}, {
|
|
1472
|
-
readonly type: "function";
|
|
1473
|
-
readonly name: "name";
|
|
1474
|
-
readonly stateMutability: "view";
|
|
1475
|
-
readonly inputs: readonly [];
|
|
1476
|
-
readonly outputs: readonly [{
|
|
1477
|
-
readonly type: "string";
|
|
1478
|
-
}];
|
|
1479
|
-
}, {
|
|
1480
|
-
readonly type: "function";
|
|
1481
|
-
readonly name: "symbol";
|
|
1482
|
-
readonly stateMutability: "view";
|
|
1483
|
-
readonly inputs: readonly [];
|
|
1484
|
-
readonly outputs: readonly [{
|
|
1485
|
-
readonly type: "string";
|
|
1486
|
-
}];
|
|
1487
|
-
}, {
|
|
1488
|
-
readonly type: "function";
|
|
1489
|
-
readonly name: "totalSupply";
|
|
1490
|
-
readonly stateMutability: "view";
|
|
1491
|
-
readonly inputs: readonly [];
|
|
1492
|
-
readonly outputs: readonly [{
|
|
1493
|
-
readonly type: "uint256";
|
|
1494
|
-
}];
|
|
1495
|
-
}, {
|
|
1496
|
-
readonly type: "function";
|
|
1497
|
-
readonly name: "transfer";
|
|
1498
|
-
readonly stateMutability: "nonpayable";
|
|
1499
|
-
readonly inputs: readonly [{
|
|
1500
|
-
readonly name: "recipient";
|
|
1501
|
-
readonly type: "address";
|
|
1502
|
-
}, {
|
|
1503
|
-
readonly name: "amount";
|
|
1504
|
-
readonly type: "uint256";
|
|
1505
|
-
}];
|
|
1506
|
-
readonly outputs: readonly [{
|
|
1507
|
-
readonly type: "bool";
|
|
1508
|
-
}];
|
|
1509
|
-
}, {
|
|
1510
|
-
readonly type: "function";
|
|
1511
|
-
readonly name: "transferFrom";
|
|
1512
|
-
readonly stateMutability: "nonpayable";
|
|
1513
|
-
readonly inputs: readonly [{
|
|
1514
|
-
readonly name: "sender";
|
|
1515
|
-
readonly type: "address";
|
|
1516
|
-
}, {
|
|
1517
|
-
readonly name: "recipient";
|
|
1518
|
-
readonly type: "address";
|
|
1519
|
-
}, {
|
|
1520
|
-
readonly name: "amount";
|
|
1521
|
-
readonly type: "uint256";
|
|
1522
|
-
}];
|
|
1523
|
-
readonly outputs: readonly [{
|
|
1524
|
-
readonly type: "bool";
|
|
1525
|
-
}];
|
|
1526
|
-
}];
|
|
1527
|
-
readonly functionName: "balanceOf";
|
|
1528
|
-
readonly args: readonly [`0x${string}`];
|
|
1529
|
-
};
|
|
1530
|
-
/**
|
|
1531
|
-
* fetch the balances of a given wallet address
|
|
1532
|
-
*/
|
|
1533
|
-
declare function getWalletBalances({ account, tokenList, wagmiConfig: config, }: GetWalletBalances): Promise<BalanceToken[] | undefined>;
|
|
1534
|
-
|
|
1535
|
-
declare function isImpersonateAccount(chainId?: number): boolean;
|
|
1536
|
-
declare function beraWriteContract<abi extends Abi | undefined = undefined, functionName extends abi extends Abi ? ContractFunctionName<abi> : never = abi extends Abi ? ContractFunctionName<abi> : never, params extends abi extends Abi ? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName> : never = abi extends Abi ? ContractFunctionArgs<abi, "payable" | "nonpayable", functionName> : never>(args: IContractWrite<abi, functionName, params> & {
|
|
1537
|
-
enableSimulateCalls?: boolean;
|
|
1538
|
-
chainId?: number;
|
|
1539
|
-
impersonateAccount?: boolean;
|
|
1540
|
-
/**
|
|
1541
|
-
* The polling interval in milliseconds to fetch the on-chain transaction status
|
|
1542
|
-
* @default 1000 (1 second)
|
|
1543
|
-
*/
|
|
1544
|
-
pollingInterval?: number;
|
|
1545
|
-
/**
|
|
1546
|
-
* The timeout in milliseconds to wait for the transaction to be confirmed.
|
|
1547
|
-
* @default 120_000 (2 minutes)
|
|
1548
|
-
*/
|
|
1549
|
-
txConfirmationTimeout?: number;
|
|
1550
|
-
}): Promise<TransactionReceipt | WalletCallReceipt<bigint, "success" | "reverted"> | undefined>;
|
|
1551
|
-
|
|
1552
|
-
interface ActiveBoostAndCommissionChangeDelay {
|
|
1553
|
-
boostDelay: number;
|
|
1554
|
-
unboostDelay: number;
|
|
1555
|
-
commissionChangeDelay: number;
|
|
1556
|
-
rewardAllocationBlockDelay: number;
|
|
1557
|
-
maxWeightPerVault: number;
|
|
1558
|
-
maxNumWeightsPerRewardAllocation: number;
|
|
1559
|
-
/**
|
|
1560
|
-
* Percentage of the validator's commission rate that can be changed at once.
|
|
1561
|
-
*
|
|
1562
|
-
* @example 1 => 100%
|
|
1563
|
-
*/
|
|
1564
|
-
maxCommissionRate: number;
|
|
1565
|
-
/**
|
|
1566
|
-
* The number of blocks after which a reward allocation is considered stale and will fallback
|
|
1567
|
-
* to baseline reward allocation.
|
|
1568
|
-
*
|
|
1569
|
-
*/
|
|
1570
|
-
rewardAllocationInactivityBlockSpan: number;
|
|
1571
|
-
/**
|
|
1572
|
-
* The number of hours in advance to warn the operator that the reward allocation is expiring.
|
|
1573
|
-
*/
|
|
1574
|
-
ui: EdgeConfigSchema["pol"]["automatedRewardAllocation"];
|
|
1575
|
-
}
|
|
1576
|
-
declare function getActiveBoostAndCommissionChangeDelay({ publicClient, ui, ...args }: BeraJS.BaseFunctionArgs & Pick<ActiveBoostAndCommissionChangeDelay, "ui"> & {
|
|
1577
|
-
publicClient: PublicClient;
|
|
1578
|
-
}): Promise<ActiveBoostAndCommissionChangeDelay>;
|
|
1579
|
-
|
|
1580
|
-
declare function getAllValidators({ variables, ...args }?: {
|
|
1581
|
-
variables?: GetValidatorsQueryVariables;
|
|
1582
|
-
} & BeraJS.BaseFunctionArgs): Promise<GetValidatorsQuery | undefined>;
|
|
1583
|
-
|
|
1584
|
-
declare function getApiEnrichedAllocation({ allocation, }: {
|
|
1585
|
-
allocation: ValidatorRewardAllocation;
|
|
1586
|
-
}): Promise<ApiRewardAllocationWeightFragment[]>;
|
|
1587
|
-
|
|
1588
|
-
declare function getApiValidator({ id, ...args }: {
|
|
1589
|
-
/**
|
|
1590
|
-
* The validator keccak256 pubkey
|
|
1591
|
-
*/
|
|
1592
|
-
id: Address;
|
|
1593
|
-
} & BeraJS.BaseFunctionArgs): Promise<GetValidatorQuery>;
|
|
1594
|
-
|
|
1595
|
-
declare function getDailyValidatorBlockStats({ pubKey, first, ...args }: BeraJS.BaseFunctionArgs & {
|
|
1596
|
-
pubKey: Address;
|
|
1597
|
-
first?: number;
|
|
1598
|
-
}): Promise<GetValidatorBlockStatsQuery | undefined>;
|
|
1599
|
-
|
|
1600
|
-
declare function isDefaultRewardAllocation(rewardAllocation: ValidatorRewardAllocation): boolean;
|
|
1601
|
-
declare function getDefaultRewardAllocation({ client, ...args }: {
|
|
1602
|
-
client: PublicClient;
|
|
1603
|
-
}): Promise<ValidatorRewardAllocation>;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* Get the current number of BERA in the batch for a validator's staking pool
|
|
1607
|
-
* The batch can contain at most 10K BERA, then the batch will be sent to the contract
|
|
1608
|
-
* @param client - The public client
|
|
1609
|
-
* @param valPubKey - The public key of the validator
|
|
1610
|
-
* @returns The current batch number
|
|
1611
|
-
*/
|
|
1612
|
-
declare function getStakingPoolBatch({ client, valPubKey, }: {
|
|
1613
|
-
client: PublicClient;
|
|
1614
|
-
valPubKey: `0x${string}`;
|
|
1615
|
-
}): Promise<number>;
|
|
1616
|
-
|
|
1617
|
-
declare function getValidatorAnalytics({ pubkey, dayRange, ...args }: BeraJS.BaseFunctionArgs & {
|
|
1618
|
-
pubkey: Address;
|
|
1619
|
-
dayRange: number;
|
|
1620
|
-
}): Promise<GetValidatorAnalyticsQuery | undefined>;
|
|
1621
|
-
|
|
1622
|
-
declare function getValidatorCommission({ client, pubKey, ...args }: {
|
|
1623
|
-
client: PublicClient;
|
|
1624
|
-
pubKey: Address;
|
|
1625
|
-
} & BeraJS.BaseFunctionArgs): Promise<number | undefined | null>;
|
|
1626
|
-
|
|
1627
|
-
declare const getValidatorEstimatedBgtPerYear: (validator: ApiValidatorMinimalFragment, totalStakedBeraAmount: number, blockTime: number) => number;
|
|
1628
|
-
|
|
1629
|
-
declare function getValidatorOperatorAddress({ client, pubKey, ...args }: BeraJS.BaseFunctionArgs & {
|
|
1630
|
-
client: PublicClient;
|
|
1631
|
-
pubKey: Address;
|
|
1632
|
-
}): Promise<Address | undefined>;
|
|
1633
|
-
|
|
1634
|
-
declare function getValidatorQueuedRewardAllocation({ client, pubKey, ...args }: BeraJS.BaseFunctionArgs & {
|
|
1635
|
-
client: PublicClient;
|
|
1636
|
-
pubKey: Address;
|
|
1637
|
-
}): Promise<ValidatorRewardAllocation | undefined>;
|
|
1638
|
-
|
|
1639
|
-
declare function aggregateValidatorIncentives({ rewardAllocationWeights, activeOnly, }: {
|
|
1640
|
-
rewardAllocationWeights: ApiValidatorRewardAllocationWeightFragment[];
|
|
1641
|
-
activeOnly?: boolean;
|
|
1642
|
-
}): ApiMinimalVaultIncentiveFragment[];
|
|
1643
|
-
|
|
1644
|
-
declare function getValidatorReturnPerBgt(validator: Pick<ApiValidatorFragment, "dynamicData" | "rewardAllocationWeights">): number;
|
|
1645
|
-
declare function getValidatorBoostApy({ validator, bgtPrice, }: {
|
|
1646
|
-
validator: Pick<ApiValidatorFragment, "dynamicData" | "rewardAllocationWeights">;
|
|
1647
|
-
bgtPrice: number;
|
|
1648
|
-
}): number;
|
|
1649
|
-
|
|
1650
|
-
export { type ActiveBoostAndCommissionChangeDelay, BeraApolloClient, type GetAllProposalsArgs, type GetAllowances, type GetAllowancesResponse, type GetBodyErrorsArgs, type GetDecodedFunctionDataArgs, type GetLSTStakeConfigArgs, type GetProposalDetailsArgs, type GetProposalFromTxArgs, type GetProposalVotesArgs, type GetStakedBeraSnapshotsArgs, type GetTokenInformation, type GetTokenInformationResponse, type GetUserVaultInfoParams, type GetUserVaultsInfo, type GetWalletBalances, MOCKED_PROPOSAL_STATUSES, type ParseProposalBodyResult, type PoolDayData, PythLatestUpdates, type RewardVaultDurationConstants, ValidatorRewardAllocation, aggregateValidatorIncentives, beraWriteContract, checkProposalField, computeActualStatus, getActiveBoostAndCommissionChangeDelay, getAllPools, getAllProposals, getAllValidators, getAllowances, getApiEnrichedAllocation, getApiPool, getApiValidator, getApolloClient, getBalanceCall, getBlockTime, getBlockTimestamp, getBodyErrors, getChartData, getCollateralWeights, getDailyValidatorBlockStats, getDecodedFunctionData, getDefaultRewardAllocation, getEarnedStakedBeraVault, getEnsoClient, getGlobalCapLimit, getGlobalLiquidityAndSwapVolume, getHoney24hVolume, getHoneyCollaterals, getHoneyPausedState, getHoneyPythFeeds, getHoneyPythOracle, getHoneyRootPriceOracle, getIncentiveFeeClaimStats, getLSTStakeConfig, getMaxDeposit, getPoolEvents, getPoolHistoricalData, getPoolState, getProposalDetails, getProposalFromTx, getProposalVotes, getPythUpdateFee, getRelativeCapLimit, getRewardProofsByValidator, getRewardTokenToBeraRate, getRewardVault, getRewardVaultDurationConstants, getRewardVaultFromToken, getRewardVaultStakingToken, getStakeWithdrawalCooldown, getStakedBeraAPR, getStakedBeraSnapshots, getStakingPoolBatch, getSwapPayload, getTokenCurrentPrices, getTokenInformation, getTokens, getTotalStakedAmount, getUserClaimableIncentives, getUserVaultInfo, getUserVaultsReward, getValidatorAnalytics, getValidatorBoostApy, getValidatorCommission, getValidatorEstimatedBgtPerYear, getValidatorOperatorAddress, getValidatorQueuedRewardAllocation, getValidatorReturnPerBgt, getVaultPausedState, getVaultValidators, getWalletBalances, isBasketModeEnabled, isDefaultRewardAllocation, isImpersonateAccount, parseProposalBody };
|