@berachain/berajs 0.1.0-alpha.3 → 0.1.0-alpha.4
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/{dex-D9U93Ib-.d.cts → HoneyConfigProvider-B7pZiyOD.d.cts} +171 -171
- package/dist/{dex-BD7Bq3pJ.d.ts → HoneyConfigProvider-DJ5cZbB5.d.ts} +171 -171
- package/dist/abi/index.cjs +1 -1
- package/dist/abi/index.mjs +1 -1
- package/dist/actions/index.cjs +1 -1
- package/dist/actions/index.d.cts +7 -7
- package/dist/actions/index.d.ts +7 -7
- package/dist/actions/index.mjs +1 -1
- package/dist/{chunk-JQDPAEK2.mjs → chunk-5N57PBAR.mjs} +2 -2
- package/dist/chunk-7DPUKGDT.cjs +1 -0
- package/dist/chunk-7LKILKNX.cjs +1 -0
- package/dist/{chunk-SMZ3PG6A.mjs → chunk-7SDDMT3W.mjs} +1 -1
- package/dist/chunk-DNBQFEY3.mjs +1 -0
- package/dist/chunk-H5477UEM.mjs +3 -0
- package/dist/chunk-HOCEXCQJ.mjs +1 -0
- package/dist/{chunk-ILYYJYGV.cjs → chunk-NNYEN6SA.cjs} +2 -2
- package/dist/{chunk-LHFVY26H.cjs → chunk-QIWSS7FQ.cjs} +2 -2
- package/dist/{chunk-SW47CI6T.cjs → chunk-TYTNDYXV.cjs} +1 -1
- package/dist/contexts/index.cjs +1 -1
- package/dist/contexts/index.d.cts +3 -3
- package/dist/contexts/index.d.ts +3 -3
- package/dist/contexts/index.mjs +1 -1
- package/dist/{getValidatorQueuedOperatorAddress-BbyH7asf.d.cts → getValidatorQueuedOperatorAddress-C2w750UQ.d.ts} +2 -2
- package/dist/{getValidatorQueuedOperatorAddress--AXNo9IY.d.ts → getValidatorQueuedOperatorAddress-CfiY8nIA.d.cts} +2 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.d.cts +6 -6
- package/dist/hooks/index.d.ts +6 -6
- package/dist/hooks/index.mjs +2 -2
- package/dist/{staking-DHCsSRru.d.cts → staking-CimqAVL0.d.ts} +1 -1
- package/dist/{staking-DYbVFigB.d.ts → staking-DbIi5eSK.d.cts} +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/{useHoneySwapState-A9cyIoOS.d.cts → useHoneySwapState-BA96cjbO.d.ts} +1 -1
- package/dist/{useHoneySwapState-CW49RVci.d.ts → useHoneySwapState-BRU2LVkE.d.cts} +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +4 -4
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-AHAZC5K3.mjs +0 -1
- package/dist/chunk-KIA6GUIN.cjs +0 -1
- package/dist/chunk-RNESAHY2.mjs +0 -3
- package/dist/chunk-XX77QPIR.mjs +0 -1
- package/dist/chunk-YKKMWJX5.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SwapKind } from '@berachain-foundation/berancer-sdk';
|
|
2
|
-
import { Address, PublicClient, Hex, Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Account } from 'viem';
|
|
3
|
-
import { a as aggregatorsRouterAbi } from './aggregatorsRouter-Cny4B_MB.js';
|
|
4
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
2
|
import * as react from 'react';
|
|
3
|
+
import { Address, PublicClient, Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Hex, Account } from 'viem';
|
|
6
4
|
import { Token as Token$1 } from '@berachain/graphql/pol/api';
|
|
5
|
+
import { SwapKind } from '@berachain-foundation/berancer-sdk';
|
|
6
|
+
import { a as aggregatorsRouterAbi } from './aggregatorsRouter-Cny4B_MB.js';
|
|
7
7
|
import { Config, GetWalletClientReturnType } from '@wagmi/core';
|
|
8
8
|
import { SWRConfiguration, SWRResponse } from 'swr';
|
|
9
9
|
import { ChainId, BeraConfig } from '@berachain/config';
|
|
@@ -32,174 +32,6 @@ interface CollateralRatesArgs extends BeraJS.BaseFunctionArgs {
|
|
|
32
32
|
*/
|
|
33
33
|
declare function getHoneyFees({ client, collateralList, ...args }: CollateralRatesArgs): Promise<HoneyFeeMap>;
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* Interface representing the latest Pyth price updates
|
|
37
|
-
* @interface PythLatestUpdates
|
|
38
|
-
* @property {`0x${string}`[]} calldata - Array of hex-encoded calldata for price updates
|
|
39
|
-
* @property {string[]} prices - Array of formatted price strings
|
|
40
|
-
*/
|
|
41
|
-
interface PythLatestUpdates {
|
|
42
|
-
calldata: `0x${string}`[];
|
|
43
|
-
prices: string[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Fetches the latest price updates from Pyth Network's Hermes service
|
|
47
|
-
* @param {Object} params - The parameters object
|
|
48
|
-
* @param {string[]} params.priceFeedId - Array of Pyth price feed IDs to fetch updates for
|
|
49
|
-
* @returns {Promise<PythLatestUpdates>} Promise resolving to the latest price updates
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const updates = await getPythLatestPrices({
|
|
53
|
-
* priceFeedId: ["0x123...", "0x456..."]
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
declare function getPythLatestPrices({ priceFeedId, }: {
|
|
58
|
-
priceFeedId: string[];
|
|
59
|
-
}): Promise<PythLatestUpdates>;
|
|
60
|
-
|
|
61
|
-
declare enum HoneyPreviewMethod {
|
|
62
|
-
Mint = "previewMintHoney",
|
|
63
|
-
MintWithPrice = "previewMintHoneyWithPrices",
|
|
64
|
-
RequiredCollateral = "previewMintCollaterals",
|
|
65
|
-
RequiredCollateralWithPrice = "previewMintCollateralsWithPrices",
|
|
66
|
-
Redeem = "previewRedeemCollaterals",
|
|
67
|
-
RedeemWithPrice = "previewRedeemCollateralsWithPrices",
|
|
68
|
-
HoneyToRedeem = "previewRedeemHoney",
|
|
69
|
-
HoneyToRedeemWithPrice = "previewRedeemHoneyWithPrices"
|
|
70
|
-
}
|
|
71
|
-
interface HoneyPreviewArgs extends BeraJS.BaseFunctionArgs {
|
|
72
|
-
client: PublicClient;
|
|
73
|
-
collateral: Token;
|
|
74
|
-
collateralList: TokenWithOrder[];
|
|
75
|
-
amount: string;
|
|
76
|
-
method: HoneyPreviewMethod;
|
|
77
|
-
latestPrices?: PythLatestUpdates;
|
|
78
|
-
isPythWrapperEnabled: boolean;
|
|
79
|
-
}
|
|
80
|
-
interface HoneyPreviewResult {
|
|
81
|
-
collaterals: Record<Address, bigint>;
|
|
82
|
-
honey: bigint;
|
|
83
|
-
}
|
|
84
|
-
interface HoneyPreviewReadResult {
|
|
85
|
-
collaterals: bigint[];
|
|
86
|
-
honey: bigint;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Calculates preview amounts for Honey protocol operations including minting and redeeming.
|
|
90
|
-
* This function handles different preview methods to calculate either the amount of Honey tokens
|
|
91
|
-
* that can be minted with given collateral or the amount of collateral needed to mint/redeem Honey tokens.
|
|
92
|
-
*
|
|
93
|
-
* @param {Object} params - The parameters for the preview calculation
|
|
94
|
-
* @param {PublicClient} params.client - The Viem public client for blockchain interaction
|
|
95
|
-
* @param {Token} params.collateral - The primary collateral token being used
|
|
96
|
-
* @param {Address[]} params.collateralList - List of all supported collateral tokens
|
|
97
|
-
* @param {string} params.amount - The amount to calculate preview for (in token units)
|
|
98
|
-
* @param {HoneyPreviewMethod} params.method - The type of preview calculation to perform
|
|
99
|
-
* @param {PythLatestUpdates | undefined} params.latestPrices - Optional latest price updates from Pyth oracle
|
|
100
|
-
*
|
|
101
|
-
* @returns {Promise<HoneyPreviewResult | undefined>} An object containing:
|
|
102
|
-
* - collaterals: Record mapping collateral token addresses to their respective amounts
|
|
103
|
-
* - honey: The amount of Honey tokens involved in the operation
|
|
104
|
-
*
|
|
105
|
-
* @throws {Error} If there's an error during the contract interaction or calculation
|
|
106
|
-
*/
|
|
107
|
-
declare function getHoneyPreview({ client, collateral, collateralList, amount, method, latestPrices, isPythWrapperEnabled, ...baseArgs }: HoneyPreviewArgs): Promise<HoneyPreviewResult | undefined>;
|
|
108
|
-
|
|
109
|
-
declare enum HoneySwapAction {
|
|
110
|
-
RESET_AMOUNTS = "RESET_AMOUNTS",
|
|
111
|
-
ACTION_TYPE_CHANGE = "ACTION_TYPE_CHANGE",
|
|
112
|
-
COLLATERALS_CHANGE = "COLLATERALS_CHANGE",
|
|
113
|
-
FROM_AMOUNT_CHANGE = "FROM_AMOUNT_CHANGE",
|
|
114
|
-
TO_AMOUNT_CHANGE = "TO_AMOUNT_CHANGE",
|
|
115
|
-
PREVIEW_CHANGE = "PREVIEW_CHANGE",
|
|
116
|
-
IS_BASKET_MODE_ENABLED_CHANGE = "IS_BASKET_MODE_ENABLED_CHANGE",
|
|
117
|
-
IS_TYPING_CHANGE = "IS_TYPING_CHANGE",
|
|
118
|
-
IS_SUBMITTING_CHANGE = "IS_SUBMITTING_CHANGE",
|
|
119
|
-
IS_LOADING_CHANGE = "IS_LOADING_CHANGE"
|
|
120
|
-
}
|
|
121
|
-
type PythPriceFeedMap = Record<Address, Hex>;
|
|
122
|
-
type HoneySwapActions = {
|
|
123
|
-
type: HoneySwapAction.RESET_AMOUNTS;
|
|
124
|
-
} | {
|
|
125
|
-
type: HoneySwapAction.ACTION_TYPE_CHANGE;
|
|
126
|
-
value: "mint" | "redeem";
|
|
127
|
-
} | {
|
|
128
|
-
type: HoneySwapAction.COLLATERALS_CHANGE;
|
|
129
|
-
value: TokenWithOrder[];
|
|
130
|
-
} | {
|
|
131
|
-
type: HoneySwapAction.FROM_AMOUNT_CHANGE;
|
|
132
|
-
index: number;
|
|
133
|
-
value: string;
|
|
134
|
-
} | {
|
|
135
|
-
type: HoneySwapAction.TO_AMOUNT_CHANGE;
|
|
136
|
-
index: number;
|
|
137
|
-
value: string;
|
|
138
|
-
} | {
|
|
139
|
-
type: HoneySwapAction.PREVIEW_CHANGE;
|
|
140
|
-
value: HoneyPreviewResult;
|
|
141
|
-
changedAsset: Address;
|
|
142
|
-
} | {
|
|
143
|
-
type: HoneySwapAction.IS_BASKET_MODE_ENABLED_CHANGE;
|
|
144
|
-
value: boolean;
|
|
145
|
-
} | {
|
|
146
|
-
type: HoneySwapAction.IS_TYPING_CHANGE;
|
|
147
|
-
value: boolean;
|
|
148
|
-
} | {
|
|
149
|
-
type: HoneySwapAction.IS_SUBMITTING_CHANGE;
|
|
150
|
-
value: boolean;
|
|
151
|
-
} | {
|
|
152
|
-
type: HoneySwapAction.IS_LOADING_CHANGE;
|
|
153
|
-
value: boolean;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
declare const HoneyConfigContext: react.Context<HoneyConfigContextReturn | undefined>;
|
|
157
|
-
type TokenWithOrder = TokenWithMetadata & {
|
|
158
|
-
order: number;
|
|
159
|
-
};
|
|
160
|
-
interface HoneyConfigContextReturn {
|
|
161
|
-
/**
|
|
162
|
-
* Map of the Pyth price feed ids for each collateral
|
|
163
|
-
*/
|
|
164
|
-
priceFeedMap: PythPriceFeedMap;
|
|
165
|
-
/**
|
|
166
|
-
* This is the list of all the collaterals that are supported by the Honey protocol
|
|
167
|
-
*/
|
|
168
|
-
collateralList: TokenWithOrder[];
|
|
169
|
-
/**
|
|
170
|
-
* This is the main collateral that is used to calculate the relative cap limit
|
|
171
|
-
*/
|
|
172
|
-
referenceCollateral: TokenWithOrder;
|
|
173
|
-
/**
|
|
174
|
-
* An object that maps the redeem/mint rate for each collateral and the weighted rates for the basket mode
|
|
175
|
-
*/
|
|
176
|
-
feeMap: HoneyFeeMap;
|
|
177
|
-
flags: {
|
|
178
|
-
/**
|
|
179
|
-
* If true, mint/redeem will also update pyth prices
|
|
180
|
-
*/
|
|
181
|
-
isPythWrapperEnabled: boolean;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Honey protocol configs
|
|
185
|
-
*/
|
|
186
|
-
protocol: {
|
|
187
|
-
/**
|
|
188
|
-
* Honey protocol paused state
|
|
189
|
-
*/
|
|
190
|
-
isPaused: boolean;
|
|
191
|
-
/**
|
|
192
|
-
* The label for the Honey protocol paused message
|
|
193
|
-
*/
|
|
194
|
-
pausedBannerLabel?: string;
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
interface HoneyConfigProviderProps extends HoneyConfigContextReturn {
|
|
198
|
-
children: React.ReactNode;
|
|
199
|
-
}
|
|
200
|
-
declare function HoneyConfigProvider({ children, ...props }: HoneyConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
201
|
-
declare function useHoneyConfig(): HoneyConfigContextReturn;
|
|
202
|
-
|
|
203
35
|
interface UseContractWriteApi {
|
|
204
36
|
isLoading: boolean;
|
|
205
37
|
isSubmitting: boolean;
|
|
@@ -559,4 +391,172 @@ declare enum SwapReferrer {
|
|
|
559
391
|
ZAP = "ZAP"
|
|
560
392
|
}
|
|
561
393
|
|
|
394
|
+
/**
|
|
395
|
+
* Interface representing the latest Pyth price updates
|
|
396
|
+
* @interface PythLatestUpdates
|
|
397
|
+
* @property {`0x${string}`[]} calldata - Array of hex-encoded calldata for price updates
|
|
398
|
+
* @property {string[]} prices - Array of formatted price strings
|
|
399
|
+
*/
|
|
400
|
+
interface PythLatestUpdates {
|
|
401
|
+
calldata: `0x${string}`[];
|
|
402
|
+
prices: string[];
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Fetches the latest price updates from Pyth Network's Hermes service
|
|
406
|
+
* @param {Object} params - The parameters object
|
|
407
|
+
* @param {string[]} params.priceFeedId - Array of Pyth price feed IDs to fetch updates for
|
|
408
|
+
* @returns {Promise<PythLatestUpdates>} Promise resolving to the latest price updates
|
|
409
|
+
* @example
|
|
410
|
+
* ```ts
|
|
411
|
+
* const updates = await getPythLatestPrices({
|
|
412
|
+
* priceFeedId: ["0x123...", "0x456..."]
|
|
413
|
+
* });
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
declare function getPythLatestPrices({ priceFeedId, }: {
|
|
417
|
+
priceFeedId: string[];
|
|
418
|
+
}): Promise<PythLatestUpdates>;
|
|
419
|
+
|
|
420
|
+
declare enum HoneyPreviewMethod {
|
|
421
|
+
Mint = "previewMintHoney",
|
|
422
|
+
MintWithPrice = "previewMintHoneyWithPrices",
|
|
423
|
+
RequiredCollateral = "previewMintCollaterals",
|
|
424
|
+
RequiredCollateralWithPrice = "previewMintCollateralsWithPrices",
|
|
425
|
+
Redeem = "previewRedeemCollaterals",
|
|
426
|
+
RedeemWithPrice = "previewRedeemCollateralsWithPrices",
|
|
427
|
+
HoneyToRedeem = "previewRedeemHoney",
|
|
428
|
+
HoneyToRedeemWithPrice = "previewRedeemHoneyWithPrices"
|
|
429
|
+
}
|
|
430
|
+
interface HoneyPreviewArgs extends BeraJS.BaseFunctionArgs {
|
|
431
|
+
client: PublicClient;
|
|
432
|
+
collateral: Token;
|
|
433
|
+
collateralList: TokenWithOrder[];
|
|
434
|
+
amount: string;
|
|
435
|
+
method: HoneyPreviewMethod;
|
|
436
|
+
latestPrices?: PythLatestUpdates;
|
|
437
|
+
isPythWrapperEnabled: boolean;
|
|
438
|
+
}
|
|
439
|
+
interface HoneyPreviewResult {
|
|
440
|
+
collaterals: Record<Address, bigint>;
|
|
441
|
+
honey: bigint;
|
|
442
|
+
}
|
|
443
|
+
interface HoneyPreviewReadResult {
|
|
444
|
+
collaterals: bigint[];
|
|
445
|
+
honey: bigint;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Calculates preview amounts for Honey protocol operations including minting and redeeming.
|
|
449
|
+
* This function handles different preview methods to calculate either the amount of Honey tokens
|
|
450
|
+
* that can be minted with given collateral or the amount of collateral needed to mint/redeem Honey tokens.
|
|
451
|
+
*
|
|
452
|
+
* @param {Object} params - The parameters for the preview calculation
|
|
453
|
+
* @param {PublicClient} params.client - The Viem public client for blockchain interaction
|
|
454
|
+
* @param {Token} params.collateral - The primary collateral token being used
|
|
455
|
+
* @param {Address[]} params.collateralList - List of all supported collateral tokens
|
|
456
|
+
* @param {string} params.amount - The amount to calculate preview for (in token units)
|
|
457
|
+
* @param {HoneyPreviewMethod} params.method - The type of preview calculation to perform
|
|
458
|
+
* @param {PythLatestUpdates | undefined} params.latestPrices - Optional latest price updates from Pyth oracle
|
|
459
|
+
*
|
|
460
|
+
* @returns {Promise<HoneyPreviewResult | undefined>} An object containing:
|
|
461
|
+
* - collaterals: Record mapping collateral token addresses to their respective amounts
|
|
462
|
+
* - honey: The amount of Honey tokens involved in the operation
|
|
463
|
+
*
|
|
464
|
+
* @throws {Error} If there's an error during the contract interaction or calculation
|
|
465
|
+
*/
|
|
466
|
+
declare function getHoneyPreview({ client, collateral, collateralList, amount, method, latestPrices, isPythWrapperEnabled, ...baseArgs }: HoneyPreviewArgs): Promise<HoneyPreviewResult | undefined>;
|
|
467
|
+
|
|
468
|
+
declare enum HoneySwapAction {
|
|
469
|
+
RESET_AMOUNTS = "RESET_AMOUNTS",
|
|
470
|
+
ACTION_TYPE_CHANGE = "ACTION_TYPE_CHANGE",
|
|
471
|
+
COLLATERALS_CHANGE = "COLLATERALS_CHANGE",
|
|
472
|
+
FROM_AMOUNT_CHANGE = "FROM_AMOUNT_CHANGE",
|
|
473
|
+
TO_AMOUNT_CHANGE = "TO_AMOUNT_CHANGE",
|
|
474
|
+
PREVIEW_CHANGE = "PREVIEW_CHANGE",
|
|
475
|
+
IS_BASKET_MODE_ENABLED_CHANGE = "IS_BASKET_MODE_ENABLED_CHANGE",
|
|
476
|
+
IS_TYPING_CHANGE = "IS_TYPING_CHANGE",
|
|
477
|
+
IS_SUBMITTING_CHANGE = "IS_SUBMITTING_CHANGE",
|
|
478
|
+
IS_LOADING_CHANGE = "IS_LOADING_CHANGE"
|
|
479
|
+
}
|
|
480
|
+
type PythPriceFeedMap = Record<Address, Hex>;
|
|
481
|
+
type HoneySwapActions = {
|
|
482
|
+
type: HoneySwapAction.RESET_AMOUNTS;
|
|
483
|
+
} | {
|
|
484
|
+
type: HoneySwapAction.ACTION_TYPE_CHANGE;
|
|
485
|
+
value: "mint" | "redeem";
|
|
486
|
+
} | {
|
|
487
|
+
type: HoneySwapAction.COLLATERALS_CHANGE;
|
|
488
|
+
value: TokenWithOrder[];
|
|
489
|
+
} | {
|
|
490
|
+
type: HoneySwapAction.FROM_AMOUNT_CHANGE;
|
|
491
|
+
index: number;
|
|
492
|
+
value: string;
|
|
493
|
+
} | {
|
|
494
|
+
type: HoneySwapAction.TO_AMOUNT_CHANGE;
|
|
495
|
+
index: number;
|
|
496
|
+
value: string;
|
|
497
|
+
} | {
|
|
498
|
+
type: HoneySwapAction.PREVIEW_CHANGE;
|
|
499
|
+
value: HoneyPreviewResult;
|
|
500
|
+
changedAsset: Address;
|
|
501
|
+
} | {
|
|
502
|
+
type: HoneySwapAction.IS_BASKET_MODE_ENABLED_CHANGE;
|
|
503
|
+
value: boolean;
|
|
504
|
+
} | {
|
|
505
|
+
type: HoneySwapAction.IS_TYPING_CHANGE;
|
|
506
|
+
value: boolean;
|
|
507
|
+
} | {
|
|
508
|
+
type: HoneySwapAction.IS_SUBMITTING_CHANGE;
|
|
509
|
+
value: boolean;
|
|
510
|
+
} | {
|
|
511
|
+
type: HoneySwapAction.IS_LOADING_CHANGE;
|
|
512
|
+
value: boolean;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
declare const HoneyConfigContext: react.Context<HoneyConfigContextReturn | undefined>;
|
|
516
|
+
type TokenWithOrder = TokenWithMetadata & {
|
|
517
|
+
order: number;
|
|
518
|
+
};
|
|
519
|
+
interface HoneyConfigContextReturn {
|
|
520
|
+
/**
|
|
521
|
+
* Map of the Pyth price feed ids for each collateral
|
|
522
|
+
*/
|
|
523
|
+
priceFeedMap: PythPriceFeedMap;
|
|
524
|
+
/**
|
|
525
|
+
* This is the list of all the collaterals that are supported by the Honey protocol
|
|
526
|
+
*/
|
|
527
|
+
collateralList: TokenWithOrder[];
|
|
528
|
+
/**
|
|
529
|
+
* This is the main collateral that is used to calculate the relative cap limit
|
|
530
|
+
*/
|
|
531
|
+
referenceCollateral: TokenWithOrder;
|
|
532
|
+
/**
|
|
533
|
+
* An object that maps the redeem/mint rate for each collateral and the weighted rates for the basket mode
|
|
534
|
+
*/
|
|
535
|
+
feeMap: HoneyFeeMap;
|
|
536
|
+
flags: {
|
|
537
|
+
/**
|
|
538
|
+
* If true, mint/redeem will also update pyth prices
|
|
539
|
+
*/
|
|
540
|
+
isPythWrapperEnabled: boolean;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Honey protocol configs
|
|
544
|
+
*/
|
|
545
|
+
protocol: {
|
|
546
|
+
/**
|
|
547
|
+
* Honey protocol paused state
|
|
548
|
+
*/
|
|
549
|
+
isPaused: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* The label for the Honey protocol paused message
|
|
552
|
+
*/
|
|
553
|
+
pausedBannerLabel?: string;
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
interface HoneyConfigProviderProps extends HoneyConfigContextReturn {
|
|
557
|
+
children: React.ReactNode;
|
|
558
|
+
}
|
|
559
|
+
declare function HoneyConfigProvider({ children, ...props }: HoneyConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
560
|
+
declare function useHoneyConfig(): HoneyConfigContextReturn;
|
|
561
|
+
|
|
562
562
|
export { Aggregators as A, type BalanceToken as B, type CollateralRates as C, type DefaultHookOptions as D, type DefaultHookReturnType as E, type IUserPosition as F, type BalanceTokenWithMetadata as G, type HoneySwapActions as H, type IRawAggregatorQuote as I, type TokenPriceInfo as J, type IUseContractWriteArgs as K, type TxnEventKeys as L, type MinimalERC20 as M, type SwapRequest as N, type BexStatus as O, type PythLatestUpdates as P, type IContractWriteFn as Q, ContractName as R, SwapReferrer as S, type TokenWithOrder as T, type UseContractWriteApi as U, HoneySwapAction as V, type Token as a, type TokenWithMetadata as b, HoneyConfigContext as c, type HoneyConfigContextReturn as d, type HoneyConfigProviderProps as e, HoneyConfigProvider as f, type IAggregatorQuote as g, type TokenBalance as h, type IAggregatorArgs as i, type PythPriceFeedMap as j, type TokenCurrentPriceMap as k, type AllowanceToken as l, type IContractWrite as m, type HoneyFeeMap as n, type CollateralRatesArgs as o, getHoneyFees as p, HoneyPreviewMethod as q, type HoneyPreviewArgs as r, type HoneyPreviewResult as s, type HoneyPreviewReadResult as t, useHoneyConfig as u, getHoneyPreview as v, getPythLatestPrices as w, type TokenInput as x, PoolCreationStep as y, type TokenWithAmount as z };
|
package/dist/abi/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIKAE7CQUcjs = require('../chunk-IKAE7CQU.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIKAE7CQUcjs = require('../chunk-IKAE7CQU.cjs');var _chunk7LKILKNXcjs = require('../chunk-7LKILKNX.cjs');exports.EIP7702StatelessDelegatorAbi = _chunkIKAE7CQUcjs.p; exports.aggregatorsRouterAbi = _chunkIKAE7CQUcjs.f; exports.balancerComposableStablePoolFactoryV6 = _chunkIKAE7CQUcjs.g; exports.balancerPoolCreationHelperAbi = _chunkIKAE7CQUcjs.h; exports.balancerVaultAbi = _chunk7LKILKNXcjs.b; exports.beaconDepositAbi = _chunk7LKILKNXcjs.r; exports.beraChefAbi = _chunk7LKILKNXcjs.c; exports.bgtAbi = _chunk7LKILKNXcjs.m; exports.bgtIncentiveDistributorAbi = _chunkIKAE7CQUcjs.j; exports.bgtStakerAbi = _chunkIKAE7CQUcjs.k; exports.bundlerAbi = _chunkIKAE7CQUcjs.a; exports.collateralVaultAbi = _chunk7LKILKNXcjs.g; exports.generalAdapterAbi = _chunkIKAE7CQUcjs.b; exports.governanceAbi = _chunk7LKILKNXcjs.e; exports.governanceTimelockAbi = _chunkIKAE7CQUcjs.i; exports.honeyAbi = _chunk7LKILKNXcjs.i; exports.honeyFactoryAbi = _chunk7LKILKNXcjs.f; exports.honeyFactoryReaderAbi = _chunk7LKILKNXcjs.h; exports.honeyRootOracleAbi = _chunk7LKILKNXcjs.j; exports.merkleDistributorAbi = _chunkIKAE7CQUcjs.q; exports.metaMorphoAbi = _chunk7LKILKNXcjs.a; exports.morphoAbi = _chunkIKAE7CQUcjs.c; exports.morphoVaultAbi = _chunkIKAE7CQUcjs.d; exports.multicall3Abi = _chunk7LKILKNXcjs.q; exports.publicAllocatorAbi = _chunkIKAE7CQUcjs.e; exports.pythAbi = _chunk7LKILKNXcjs.l; exports.pythErrorsAbi = _chunkIKAE7CQUcjs.o; exports.pythPriceOracleAbi = _chunk7LKILKNXcjs.p; exports.pythWrapperAbi = _chunk7LKILKNXcjs.k; exports.rewardVaultAbi = _chunk7LKILKNXcjs.d; exports.rewardVaultFactoryAbi = _chunk7LKILKNXcjs.o; exports.rewardVaultHelperAbi = _chunkIKAE7CQUcjs.l; exports.stakeBeraVaultAbi = _chunk7LKILKNXcjs.n; exports.stakeBeraVaultWithdrawalRequestAbi = _chunkIKAE7CQUcjs.m; exports.wberaAbi = _chunkIKAE7CQUcjs.n;
|
package/dist/abi/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c as
|
|
1
|
+
import{a as s,b as t,c as u,d as v,e as w,f as x,g as y,h as z,i as A,j as B,k as C,l as D,m as E,n as F,o as G,p as H,q as I}from"../chunk-4IBBLGNS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunk-DNBQFEY3.mjs";export{H as EIP7702StatelessDelegatorAbi,x as aggregatorsRouterAbi,y as balancerComposableStablePoolFactoryV6,z as balancerPoolCreationHelperAbi,b as balancerVaultAbi,r as beaconDepositAbi,c as beraChefAbi,m as bgtAbi,B as bgtIncentiveDistributorAbi,C as bgtStakerAbi,s as bundlerAbi,g as collateralVaultAbi,t as generalAdapterAbi,e as governanceAbi,A as governanceTimelockAbi,i as honeyAbi,f as honeyFactoryAbi,h as honeyFactoryReaderAbi,j as honeyRootOracleAbi,I as merkleDistributorAbi,a as metaMorphoAbi,u as morphoAbi,v as morphoVaultAbi,q as multicall3Abi,w as publicAllocatorAbi,l as pythAbi,G as pythErrorsAbi,p as pythPriceOracleAbi,k as pythWrapperAbi,d as rewardVaultAbi,o as rewardVaultFactoryAbi,D as rewardVaultHelperAbi,n as stakeBeraVaultAbi,E as stakeBeraVaultWithdrawalRequestAbi,F as wberaAbi};
|
package/dist/actions/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNNYEN6SAcjs = require('../chunk-NNYEN6SA.cjs');require('../chunk-7LKILKNX.cjs');require('../chunk-NOV7UCGA.cjs');require('../chunk-TYTNDYXV.cjs');require('../chunk-7DPUKGDT.cjs');require('../chunk-6PL44I45.cjs');require('../chunk-MDA4YT6J.cjs');require('../chunk-33CW5NUN.cjs');exports.BalancerApi = _chunkNNYEN6SAcjs.f; exports.BaseAggregator = _chunkNNYEN6SAcjs.e; exports.HoneyPreviewMethod = _chunkNNYEN6SAcjs.J; exports.MOCKED_PROPOSAL_STATUSES = _chunkNNYEN6SAcjs.r; exports.RewardVaultDistributionMode = _chunkNNYEN6SAcjs.U; exports.beraWriteContract = _chunkNNYEN6SAcjs.za; exports.checkProposalField = _chunkNNYEN6SAcjs.q; exports.computeActualStatus = _chunkNNYEN6SAcjs.s; exports.formatValidatorRewardAllocation = _chunkNNYEN6SAcjs.Fa; exports.getActiveBoostAndCommissionChangeDelay = _chunkNNYEN6SAcjs.Aa; exports.getAllPools = _chunkNNYEN6SAcjs.g; exports.getAllProposals = _chunkNNYEN6SAcjs.t; exports.getAllValidators = _chunkNNYEN6SAcjs.Ba; exports.getAllowances = _chunkNNYEN6SAcjs.ua; exports.getApiEnrichedAllocation = _chunkNNYEN6SAcjs.Ca; exports.getApiPool = _chunkNNYEN6SAcjs.h; exports.getApiValidator = _chunkNNYEN6SAcjs.Da; exports.getApolloClient = _chunkNNYEN6SAcjs.c; exports.getBalanceCall = _chunkNNYEN6SAcjs.wa; exports.getBgtAprSimulation = _chunkNNYEN6SAcjs.W; exports.getBlockTime = _chunkNNYEN6SAcjs.X; exports.getBlockTimestamp = _chunkNNYEN6SAcjs.T; exports.getBodyErrors = _chunkNNYEN6SAcjs.u; exports.getChartData = _chunkNNYEN6SAcjs.A; exports.getCollateralWeights = _chunkNNYEN6SAcjs.B; exports.getConvertToAssets = _chunkNNYEN6SAcjs.a; exports.getDailyValidatorBlockStats = _chunkNNYEN6SAcjs.Ea; exports.getDecodedFunctionData = _chunkNNYEN6SAcjs.v; exports.getDefaultRewardAllocation = _chunkNNYEN6SAcjs.Ja; exports.getGlobalCapLimit = _chunkNNYEN6SAcjs.F; exports.getGlobalData = _chunkNNYEN6SAcjs.Z; exports.getGlobalLiquidityAndSwapVolume = _chunkNNYEN6SAcjs.i; exports.getHoneyCollaterals = _chunkNNYEN6SAcjs.D; exports.getHoneyFees = _chunkNNYEN6SAcjs.G; exports.getHoneyGlobalData = _chunkNNYEN6SAcjs.H; exports.getHoneyPausedState = _chunkNNYEN6SAcjs.I; exports.getHoneyPreview = _chunkNNYEN6SAcjs.K; exports.getHoneyPythFeeds = _chunkNNYEN6SAcjs.ta; exports.getHoneyPythOracle = _chunkNNYEN6SAcjs.L; exports.getHoneyRootPriceOracle = _chunkNNYEN6SAcjs.M; exports.getHoneyVaultsBalance = _chunkNNYEN6SAcjs.N; exports.getIncentiveFeeClaimStats = _chunkNNYEN6SAcjs._; exports.getManagedValidatorByAccount = _chunkNNYEN6SAcjs.Ka; exports.getMarkets = _chunkNNYEN6SAcjs.$; exports.getMaxDeposit = _chunkNNYEN6SAcjs.b; exports.getOnChainPool = _chunkNNYEN6SAcjs.k; exports.getPoolEvents = _chunkNNYEN6SAcjs.l; exports.getPoolHistoricalData = _chunkNNYEN6SAcjs.m; exports.getPoolPausedState = _chunkNNYEN6SAcjs.j; exports.getPoolState = _chunkNNYEN6SAcjs.n; exports.getProposalDetails = _chunkNNYEN6SAcjs.w; exports.getProposalFromTx = _chunkNNYEN6SAcjs.y; exports.getProposalVotes = _chunkNNYEN6SAcjs.z; exports.getPythLatestPrices = _chunkNNYEN6SAcjs.O; exports.getPythUpdateFee = _chunkNNYEN6SAcjs.Q; exports.getRelativeCapLimit = _chunkNNYEN6SAcjs.P; exports.getRewardProofsByValidator = _chunkNNYEN6SAcjs.aa; exports.getRewardTokenToBeraRate = _chunkNNYEN6SAcjs.ba; exports.getRewardVault = _chunkNNYEN6SAcjs.ca; exports.getRewardVaultDurationConstants = _chunkNNYEN6SAcjs.da; exports.getRewardVaultFromToken = _chunkNNYEN6SAcjs.ea; exports.getRewardVaultIncentives = _chunkNNYEN6SAcjs.fa; exports.getRewardVaultRewards = _chunkNNYEN6SAcjs.V; exports.getRewardVaultStakingToken = _chunkNNYEN6SAcjs.ga; exports.getRewardVaults = _chunkNNYEN6SAcjs.Y; exports.getSWBeraVaultMetadata = _chunkNNYEN6SAcjs.ka; exports.getSWBeraWithdrawal = _chunkNNYEN6SAcjs.la; exports.getStakeWithdrawalCooldown = _chunkNNYEN6SAcjs.ja; exports.getStakedBeraAPR = _chunkNNYEN6SAcjs.ha; exports.getStakedBeraSnapshots = _chunkNNYEN6SAcjs.ia; exports.getStakingPoolBatch = _chunkNNYEN6SAcjs.La; exports.getSubgraphPool = _chunkNNYEN6SAcjs.o; exports.getSwapPayload = _chunkNNYEN6SAcjs.R; exports.getTokenCurrentPrices = _chunkNNYEN6SAcjs.sa; exports.getTokenInformation = _chunkNNYEN6SAcjs.C; exports.getTokens = _chunkNNYEN6SAcjs.va; exports.getUserActiveValidators = _chunkNNYEN6SAcjs.Na; exports.getUserBoostsOnValidator = _chunkNNYEN6SAcjs.Ma; exports.getUserClaimableIncentives = _chunkNNYEN6SAcjs.ma; exports.getUserStakingPositions = _chunkNNYEN6SAcjs.Oa; exports.getUserVaultInfo = _chunkNNYEN6SAcjs.oa; exports.getUserVaults = _chunkNNYEN6SAcjs.pa; exports.getUserVaultsReward = _chunkNNYEN6SAcjs.na; exports.getValidatorAnalytics = _chunkNNYEN6SAcjs.Pa; exports.getValidatorBoostApy = _chunkNNYEN6SAcjs.Xa; exports.getValidatorCommission = _chunkNNYEN6SAcjs.Qa; exports.getValidatorEstimatedBgtPerYear = _chunkNNYEN6SAcjs.Ra; exports.getValidatorOperatorAddress = _chunkNNYEN6SAcjs.Sa; exports.getValidatorQueuedCommission = _chunkNNYEN6SAcjs.Ta; exports.getValidatorQueuedOperatorAddress = _chunkNNYEN6SAcjs.Ua; exports.getValidatorQueuedRewardAllocation = _chunkNNYEN6SAcjs.Va; exports.getValidatorReturnPerBgt = _chunkNNYEN6SAcjs.Wa; exports.getValidatorRewardAllocation = _chunkNNYEN6SAcjs.Ha; exports.getVaultHistory = _chunkNNYEN6SAcjs.qa; exports.getVaultPausedState = _chunkNNYEN6SAcjs.p; exports.getVaultValidators = _chunkNNYEN6SAcjs.ra; exports.getWalletBalances = _chunkNNYEN6SAcjs.xa; exports.gql = _chunkNNYEN6SAcjs.d; exports.isBadCollateralAsset = _chunkNNYEN6SAcjs.E; exports.isBasketModeEnabled = _chunkNNYEN6SAcjs.S; exports.isDefaultRewardAllocation = _chunkNNYEN6SAcjs.Ia; exports.isImpersonateAccount = _chunkNNYEN6SAcjs.ya; exports.isSameRewardAllocation = _chunkNNYEN6SAcjs.Ga; exports.parseProposalBody = _chunkNNYEN6SAcjs.x;
|
package/dist/actions/index.d.cts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-
|
|
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-
|
|
1
|
+
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-CfiY8nIA.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-CfiY8nIA.cjs';
|
|
3
3
|
import { Address, PublicClient, AbiParameter, AbiFunction, TransactionReceipt, Abi, ContractFunctionArgs, ContractFunctionName, WalletCallReceipt } from 'viem';
|
|
4
4
|
import { ApolloClient, OperationVariables, FetchPolicy } from '@apollo/client';
|
|
5
5
|
export { gql } from '@apollo/client';
|
|
6
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 '../
|
|
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 '../
|
|
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 '../HoneyConfigProvider-B7pZiyOD.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 '../HoneyConfigProvider-B7pZiyOD.cjs';
|
|
9
9
|
import { PoolState } from '@berachain-foundation/berancer-sdk';
|
|
10
10
|
export { BalancerApi } from '@berachain-foundation/berancer-sdk';
|
|
11
11
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
12
|
import { GetPoolsQueryVariables, GetGlobalLiquidityAndSwapVolumeQuery, GetPoolEventsQuery, GqlChain, PoolHistoricalDataFragment, MinimalPoolFragment } from '@berachain/graphql/dex/api';
|
|
13
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-
|
|
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-DbIi5eSK.cjs';
|
|
15
15
|
import { ProposalStatus, ProposalSelectionFragment, Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalWithVotesFragment, GetProposalVotesQueryVariables, GetProposalVotesQuery } from '@berachain/graphql/governance';
|
|
16
16
|
import { GetPublicClientReturnType } from '@wagmi/core';
|
|
17
17
|
import graymatter from 'gray-matter';
|
|
18
18
|
import { GetChartDataQuery, GetGlobalDataQuery } from '@berachain/graphql/honey';
|
|
19
19
|
import { EdgeConfigSchema } from '@berachain/config/internal/edge-config';
|
|
20
20
|
import { p as pythWrapperAbi, h as honeyFactoryAbi } from '../pythWrapper-CBjsmmsK.cjs';
|
|
21
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-
|
|
21
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-BRU2LVkE.cjs';
|
|
22
22
|
import { Address as Address$1 } from '@berachain/config';
|
|
23
23
|
import { GetValidatorBlockStatsQuery, GetValidatorByAccountQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
24
|
-
import '../aggregatorsRouter-Cny4B_MB.cjs';
|
|
25
24
|
import 'react/jsx-runtime';
|
|
26
25
|
import 'react';
|
|
26
|
+
import '../aggregatorsRouter-Cny4B_MB.cjs';
|
|
27
27
|
import 'swr';
|
|
28
28
|
import '../txnEnum-Diichv9Z.cjs';
|
|
29
29
|
import '../BeraError-CfcNTfpH.cjs';
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress
|
|
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
|
|
1
|
+
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-C2w750UQ.js';
|
|
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-C2w750UQ.js';
|
|
3
3
|
import { Address, PublicClient, AbiParameter, AbiFunction, TransactionReceipt, Abi, ContractFunctionArgs, ContractFunctionName, WalletCallReceipt } from 'viem';
|
|
4
4
|
import { ApolloClient, OperationVariables, FetchPolicy } from '@apollo/client';
|
|
5
5
|
export { gql } from '@apollo/client';
|
|
6
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 '../
|
|
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 '../
|
|
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 '../HoneyConfigProvider-DJ5cZbB5.js';
|
|
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 '../HoneyConfigProvider-DJ5cZbB5.js';
|
|
9
9
|
import { PoolState } from '@berachain-foundation/berancer-sdk';
|
|
10
10
|
export { BalancerApi } from '@berachain-foundation/berancer-sdk';
|
|
11
11
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
12
|
import { GetPoolsQueryVariables, GetGlobalLiquidityAndSwapVolumeQuery, GetPoolEventsQuery, GqlChain, PoolHistoricalDataFragment, MinimalPoolFragment } from '@berachain/graphql/dex/api';
|
|
13
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-
|
|
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-CimqAVL0.js';
|
|
15
15
|
import { ProposalStatus, ProposalSelectionFragment, Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalWithVotesFragment, GetProposalVotesQueryVariables, GetProposalVotesQuery } from '@berachain/graphql/governance';
|
|
16
16
|
import { GetPublicClientReturnType } from '@wagmi/core';
|
|
17
17
|
import graymatter from 'gray-matter';
|
|
18
18
|
import { GetChartDataQuery, GetGlobalDataQuery } from '@berachain/graphql/honey';
|
|
19
19
|
import { EdgeConfigSchema } from '@berachain/config/internal/edge-config';
|
|
20
20
|
import { p as pythWrapperAbi, h as honeyFactoryAbi } from '../pythWrapper-CBjsmmsK.js';
|
|
21
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-
|
|
21
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-BA96cjbO.js';
|
|
22
22
|
import { Address as Address$1 } from '@berachain/config';
|
|
23
23
|
import { GetValidatorBlockStatsQuery, GetValidatorByAccountQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
24
|
-
import '../aggregatorsRouter-Cny4B_MB.js';
|
|
25
24
|
import 'react/jsx-runtime';
|
|
26
25
|
import 'react';
|
|
26
|
+
import '../aggregatorsRouter-Cny4B_MB.js';
|
|
27
27
|
import 'swr';
|
|
28
28
|
import '../txnEnum-Diichv9Z.js';
|
|
29
29
|
import '../BeraError-CfcNTfpH.js';
|
package/dist/actions/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,Ka,L,La,M,Ma,N,Na,O,Oa,P,Pa,Q,Qa,R,Ra,S,Sa,T,Ta,U,Ua,V,Va,W,Wa,X,Xa,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunk-
|
|
1
|
+
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,Ka,L,La,M,Ma,N,Na,O,Oa,P,Pa,Q,Qa,R,Ra,S,Sa,T,Ta,U,Ua,V,Va,W,Wa,X,Xa,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunk-H5477UEM.mjs";import"../chunk-DNBQFEY3.mjs";import"../chunk-K4NZIO2Z.mjs";import"../chunk-7SDDMT3W.mjs";import"../chunk-HOCEXCQJ.mjs";import"../chunk-YKNKCICU.mjs";import"../chunk-5UFI7X4U.mjs";import"../chunk-5GPS724E.mjs";export{f as BalancerApi,e as BaseAggregator,J as HoneyPreviewMethod,r as MOCKED_PROPOSAL_STATUSES,U as RewardVaultDistributionMode,za as beraWriteContract,q as checkProposalField,s as computeActualStatus,Fa as formatValidatorRewardAllocation,Aa as getActiveBoostAndCommissionChangeDelay,g as getAllPools,t as getAllProposals,Ba as getAllValidators,ua as getAllowances,Ca as getApiEnrichedAllocation,h as getApiPool,Da as getApiValidator,c as getApolloClient,wa as getBalanceCall,W as getBgtAprSimulation,X as getBlockTime,T as getBlockTimestamp,u as getBodyErrors,A as getChartData,B as getCollateralWeights,a as getConvertToAssets,Ea as getDailyValidatorBlockStats,v as getDecodedFunctionData,Ja as getDefaultRewardAllocation,F as getGlobalCapLimit,Z as getGlobalData,i as getGlobalLiquidityAndSwapVolume,D as getHoneyCollaterals,G as getHoneyFees,H as getHoneyGlobalData,I as getHoneyPausedState,K as getHoneyPreview,ta as getHoneyPythFeeds,L as getHoneyPythOracle,M as getHoneyRootPriceOracle,N as getHoneyVaultsBalance,_ as getIncentiveFeeClaimStats,Ka as getManagedValidatorByAccount,$ as getMarkets,b as getMaxDeposit,k as getOnChainPool,l as getPoolEvents,m as getPoolHistoricalData,j as getPoolPausedState,n as getPoolState,w as getProposalDetails,y as getProposalFromTx,z as getProposalVotes,O as getPythLatestPrices,Q as getPythUpdateFee,P as getRelativeCapLimit,aa as getRewardProofsByValidator,ba as getRewardTokenToBeraRate,ca as getRewardVault,da as getRewardVaultDurationConstants,ea as getRewardVaultFromToken,fa as getRewardVaultIncentives,V as getRewardVaultRewards,ga as getRewardVaultStakingToken,Y as getRewardVaults,ka as getSWBeraVaultMetadata,la as getSWBeraWithdrawal,ja as getStakeWithdrawalCooldown,ha as getStakedBeraAPR,ia as getStakedBeraSnapshots,La as getStakingPoolBatch,o as getSubgraphPool,R as getSwapPayload,sa as getTokenCurrentPrices,C as getTokenInformation,va as getTokens,Na as getUserActiveValidators,Ma as getUserBoostsOnValidator,ma as getUserClaimableIncentives,Oa as getUserStakingPositions,oa as getUserVaultInfo,pa as getUserVaults,na as getUserVaultsReward,Pa as getValidatorAnalytics,Xa as getValidatorBoostApy,Qa as getValidatorCommission,Ra as getValidatorEstimatedBgtPerYear,Sa as getValidatorOperatorAddress,Ta as getValidatorQueuedCommission,Ua as getValidatorQueuedOperatorAddress,Va as getValidatorQueuedRewardAllocation,Wa as getValidatorReturnPerBgt,Ha as getValidatorRewardAllocation,qa as getVaultHistory,p as getVaultPausedState,ra as getVaultValidators,xa as getWalletBalances,d as gql,E as isBadCollateralAsset,S as isBasketModeEnabled,Ia as isDefaultRewardAllocation,ya as isImpersonateAccount,Ga as isSameRewardAllocation,x as parseProposalBody};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`));m(a,c=>[{...d,status:"pending"},...c.filter(({hash:u})=>u!==d.hash)])}function l(a){m(a,()=>[])}function i(a,d,p){m(a,c=>c.map(u=>u.hash===d?{...u,status:p}:u))}async function f(a){await Promise.all(r(a).filter(d=>d.status==="pending").map(async d=>{let{confirmations:p,hash:c,chainId:u}=d,g=n.get(c);if(g)return await g;let T=z(e,{chainId:u});if(!T)return;let x=T.waitForTransactionReceipt({confirmations:p,hash:c}).then(({status:y})=>{n.delete(c),y!==void 0&&i(a,c,Number(y)===0?"failed":"confirmed")});return n.set(c,x),await x}))}function m(a,d){t=L(),t[a]=t[a]??[];let u=d(t?.[a]??[]).sort((g,T)=>T.timestamp-g.timestamp).slice(0,10);t[a]=u.length>0?u.filter(h):void 0,A(),H(),f(a)}function A(){localStorage.setItem(F,JSON.stringify(t)),localStorage.removeItem(w)}function H(){for(let a of o)a()}function E(a){return o.add(a),()=>{o.delete(a)}}return{addTransaction:s,clearTransactions:l,getTransactions:r,onChange:E,waitForPendingTransactions:f}}import{createContext as Z,useContext as ee,useEffect as te,useState as oe}from"react";import{useBeraWagmi as ne,useConfig as re}from"@berachain/wagmi/hooks";import{jsx as ae}from"react/jsx-runtime";var D,N=Z(null);function Ae({children:e}){let{account:t}=ne(),o=t?.wallet?.address,n=re(),[r]=oe(()=>D??(D=R({config:n})));return te(()=>{o&&r.waitForPendingTransactions(o)},[r,o]),ae(N.Provider,{value:r,children:e})}function He(){let e=ee(N);if(!e)throw new Error("Transaction hooks must be used within ");return e}import{createContext as ie,useContext as se}from"react";import de from"@berachain/config/mainnet";import{jsx as ce}from"react/jsx-runtime";function Xe(){return se(M)}var M=ie(de.averageBlockTime);function _e({children:e,blockTime:t,...o}){let{config:n}=
|
|
1
|
+
import{a as P,b as C,f as v}from"./chunk-HOCEXCQJ.mjs";import{f as k}from"./chunk-5GPS724E.mjs";import{createContext as O,useContext as q}from"react";import{isFlagEnabled as J}from"@berachain/config/internal/edge-config";import{jsx as X}from"react/jsx-runtime";var b=O(void 0);function ke({children:e,flags:t,aggregators:o}){return X(b.Provider,{value:{...P,...t,aggregators:o?Object.entries(o).filter(([,n])=>J(n)).map(([n])=>n):void 0},children:e})}function K(){let e=q(b);if(!e)throw new Error("BeraFlagsProvider not found");return e}function Ce(e){return K()[e]}import{createContext as _,useContext as U,useState as $}from"react";import{jsx as j}from"react/jsx-runtime";var S=_({protocol:{isPaused:!1,factories:{composableStable:"enabled",weighted:"enabled",allPaused:!1}},onPoolChange:()=>{},pool:void 0});function Le(){let e=U(S);if(!e)throw new k({level:"fatal",message:"BexStateContext is not defined"});return e}function we({children:e,isVaultPaused:t,labels:o,factories:n}){let[r,s]=$(),l=(r?.isPaused&&!r?.isInRecoveryMode)??!1,i=t||r?.isPaused;return j(S.Provider,{value:{protocol:{isPaused:t,factories:{...n,allPaused:n.composableStable==="paused"&&n.weighted==="paused"}},labels:o,onPoolChange:s,pool:r?{...r,disablePoolWithdrawals:!!l,disablePoolDeposits:!!i}:void 0},children:e})}import{getPublicClient as z}from"@wagmi/core";var w="rk-transactions",F="transactions";function B(e){try{let t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function G(e){return Object.entries(e).reduce((t,[o,n])=>({...t,[o]:Object.entries(n).reduce((r,[s,l])=>{if(!l)return r;let i=l.map(f=>({...f,chainId:Number(s)}));return r.push(...i),r},[])}),{})}var h=(e,t,o)=>o.findIndex(n=>n.hash===e.hash)===t;function Q(e,t){let o=G(e);for(let[n,r]of Object.entries(t))o[n]&&r?o[n]=[...r,...o[n]].filter(h):o[n]=r?.filter(h);return o}function L(){let e=B(typeof localStorage<"u"?localStorage.getItem(w):null),t=B(typeof localStorage<"u"?localStorage.getItem(F):null);return Q(e,t)}var V=/^0x([A-Fa-f0-9]{64})$/;function Y(e){let t=[];return V.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function R({config:e}){let t=L(),o=new Set,n=new Map;function r(a){return t[a]??[]}function s(a,d){let p=Y(d);if(p.length>0)throw new Error(["Unable to add transaction",...p].join(`
|
|
2
|
+
`));m(a,c=>[{...d,status:"pending"},...c.filter(({hash:u})=>u!==d.hash)])}function l(a){m(a,()=>[])}function i(a,d,p){m(a,c=>c.map(u=>u.hash===d?{...u,status:p}:u))}async function f(a){await Promise.all(r(a).filter(d=>d.status==="pending").map(async d=>{let{confirmations:p,hash:c,chainId:u}=d,g=n.get(c);if(g)return await g;let T=z(e,{chainId:u});if(!T)return;let x=T.waitForTransactionReceipt({confirmations:p,hash:c}).then(({status:y})=>{n.delete(c),y!==void 0&&i(a,c,Number(y)===0?"failed":"confirmed")});return n.set(c,x),await x}))}function m(a,d){t=L(),t[a]=t[a]??[];let u=d(t?.[a]??[]).sort((g,T)=>T.timestamp-g.timestamp).slice(0,10);t[a]=u.length>0?u.filter(h):void 0,A(),H(),f(a)}function A(){localStorage.setItem(F,JSON.stringify(t)),localStorage.removeItem(w)}function H(){for(let a of o)a()}function E(a){return o.add(a),()=>{o.delete(a)}}return{addTransaction:s,clearTransactions:l,getTransactions:r,onChange:E,waitForPendingTransactions:f}}import{createContext as Z,useContext as ee,useEffect as te,useState as oe}from"react";import{useBeraWagmi as ne,useConfig as re}from"@berachain/wagmi/hooks";import{jsx as ae}from"react/jsx-runtime";var D,N=Z(null);function Ae({children:e}){let{account:t}=ne(),o=t?.wallet?.address,n=re(),[r]=oe(()=>D??(D=R({config:n})));return te(()=>{o&&r.waitForPendingTransactions(o)},[r,o]),ae(N.Provider,{value:r,children:e})}function He(){let e=ee(N);if(!e)throw new Error("Transaction hooks must be used within ");return e}import{createContext as ie,useContext as se}from"react";import de from"@berachain/config/mainnet";import{jsx as ce}from"react/jsx-runtime";function Xe(){return se(M)}var M=ie(de.averageBlockTime);function _e({children:e,blockTime:t,...o}){let{config:n}=C(o);return ce(M.Provider,{value:t??n.averageBlockTime,children:e})}import{createContext as ue,useContext as le}from"react";import{jsx as fe}from"react/jsx-runtime";var W=ue(void 0);function ze({children:e,...t}){return fe(W.Provider,{value:t,children:e})}function Ge(){let e=le(W);if(!e)throw new Error("useHoneyConfig must be used within a HoneyConfigProvider");return e}import{createContext as pe,useMemo as me}from"react";import{defaultChainId as ge}from"@berachain/config/internal";function I({defaultTokenList:e=[],externalList:t=[],chainId:o}){if(e.length===0)return{tokenList:t,customTokenList:t,featuredTokenList:[]};let n=e.filter(i=>!i.chainId||Number(i.chainId)===Number(o)).map(i=>({...i,default:!0})),r=n.filter(i=>i.tags?.some(f=>f==="featured")),s=[...n,...t];return{tokenList:s.filter((i,f)=>s.findIndex(m=>v(m,i))===f),customTokenList:t,featuredTokenList:r}}import{jsx as he}from"react/jsx-runtime";var Te=pe(void 0);function nt({children:e,defaultTokens:t,userTokens:o,onAddToken:n,onRemoveToken:r}){let{tokenList:s=[],featuredTokenList:l=[]}=me(()=>I({defaultTokenList:t,externalList:o,chainId:ge}),[t,o]);return he(Te.Provider,{value:{tokenList:s,userTokens:o,featuredTokens:l,onAddToken(i){n(i,{defaultTokens:t,userTokens:o,tokenList:s})},onRemoveToken:r},children:e})}export{ke as a,K as b,Ce as c,S as d,Le as e,we as f,B as g,G as h,h as i,Q as j,R as k,Ae as l,He as m,Xe as n,M as o,_e as p,W as q,ze as r,Ge as s,Te as t,nt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunk33CW5NUNcjs = require('./chunk-33CW5NUN.cjs');var k={isGovernanceEnabled:!0,enableEip5792:!1,proxyAggregatorsThroughVercel:!1,isEmbeddedWalletsEnabled:!0,enableSimulateCalls:!1,isBendVaultDataHourly:!0,isMultiChainZapBendEnabled:!1,mockValidatorOperator:!1,mockValidatorRewardAllocator:!1,mockRewardDurationManager:!1,mockIncentiveManager:!1,isHoneyPythWrapperEnabled:!0};var _internal = require('@berachain/config/internal');function i(o){let a=_nullishCoalesce(o.chainId, () => (_internal.defaultChainId)),e=_nullishCoalesce(o.config, () => (_internal.chainConfigs[a]));if(o.chainId&&o.chainId!==e.chainId)throw new (0, _chunk33CW5NUNcjs.g)({property:"chainId",value:a,expected:`config.chainId: ${e.chainId}`});return{config:e,chainId:e.chainId}}var _viem = require('viem');var _mainnet = require('@berachain/config/mainnet'); var _mainnet2 = _interopRequireDefault(_mainnet);var I={address:_viem.zeroAddress,decimals:18,name:"Bera",symbol:"BERA",logoURI:"https://res.cloudinary.com/duv0g402y/image/upload/v1738720154/brand/berachain-chain-logo.png.png"},R= exports.d ={address:_mainnet2.default.tokens.wbera,decimals:18,name:"WBera",symbol:"WBERA"};function C(o){let{config:a}=i(o);return{address:a.honey.token,symbol:"HONEY",name:"Honey",decimals:18}}function W(...o){let[a,e,t]=o;if(a===void 0)return!1;let n=typeof a=="string"?a:a.address;if(typeof e=="string"&&!_viem.isAddress.call(void 0, e)){if(e==="BERA")return n.toLowerCase()===_viem.zeroAddress;if(e==="WBERA")return n.toLowerCase()===_mainnet2.default.tokens.wbera;if(e==="ETH")return n.toLowerCase()===_viem.ethAddress;if(t===void 0)throw new (0, _chunk33CW5NUNcjs.g)({property:"baseArgs",value:t,expected:"BeraJS.BaseFunctionArgs",message:"baseArgs is required when compared to a known token different than BERA or WBERA"});let{config:s}=i(t),d={BGT:s.tokens.bgt,HONEY:s.honey.token,SWBERA:s.tokens.swbera,ETH:_viem.ethAddress};if(e in d)return n.toLowerCase()===d[e].toLowerCase()}let f=typeof e=="object"?e.address:e;return n.toLowerCase()===f.toLowerCase()}exports.a = k; exports.b = i; exports.c = I; exports.d = R; exports.e = C; exports.f = W;
|