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