@berachain/config 0.1.22-beta.0 → 0.1.22-beta.1
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/bepolia.d.ts +3 -5
- package/dist/bepolia.d.ts.map +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/internal/edge-config/{index.d.cts → edgeConfig.codegen.d.ts} +15 -121
- package/dist/internal/edge-config/edgeConfig.codegen.d.ts.map +1 -0
- package/dist/internal/edge-config/index.d.ts +5 -392
- package/dist/internal/edge-config/index.d.ts.map +1 -0
- package/dist/internal/edge-config/isFlagEnabled.d.ts +17 -0
- package/dist/internal/edge-config/isFlagEnabled.d.ts.map +1 -0
- package/dist/internal/edge-config/safeGetAll.d.ts +15 -0
- package/dist/internal/edge-config/safeGetAll.d.ts.map +1 -0
- package/dist/internal/edge-config/safeGetConfig.d.ts +19 -0
- package/dist/internal/edge-config/safeGetConfig.d.ts.map +1 -0
- package/dist/internal/flags/beraEdgeConfigAdapter.d.ts +9 -0
- package/dist/internal/flags/beraEdgeConfigAdapter.d.ts.map +1 -0
- package/dist/internal/flags/flags.d.ts +29 -0
- package/dist/internal/flags/flags.d.ts.map +1 -0
- package/dist/internal/flags/index.d.ts +2 -60
- package/dist/internal/flags/index.d.ts.map +1 -0
- package/dist/internal/header-sources.d.ts +5 -7
- package/dist/internal/header-sources.d.ts.map +1 -0
- package/dist/internal/index.d.ts +139 -173
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/maintenance.d.ts +5 -7
- package/dist/internal/maintenance.d.ts.map +1 -0
- package/dist/internal/nextjs/const.d.ts +3 -0
- package/dist/internal/nextjs/const.d.ts.map +1 -0
- package/dist/internal/nextjs/index.d.ts +5 -6
- package/dist/internal/nextjs/index.d.ts.map +1 -0
- package/dist/internal/nextjs/utils/index.d.ts +2 -3
- package/dist/internal/nextjs/utils/index.d.ts.map +1 -0
- package/dist/internal/sentry/getSentryKeys.d.ts +16 -0
- package/dist/internal/sentry/getSentryKeys.d.ts.map +1 -0
- package/dist/internal/sentry/index.d.ts +6 -8
- package/dist/internal/sentry/index.d.ts.map +1 -0
- package/dist/internal/sentry/sentry.client.config.d.ts +3 -6
- package/dist/internal/sentry/sentry.client.config.d.ts.map +1 -0
- package/dist/internal/sentry/sentry.edge.config.d.ts +3 -0
- package/dist/internal/sentry/sentry.edge.config.d.ts.map +1 -0
- package/dist/internal/sentry/sentry.server.config.d.ts +3 -0
- package/dist/internal/sentry/sentry.server.config.d.ts.map +1 -0
- package/dist/internal/sentry/sentryEnvironment.d.ts +6 -0
- package/dist/internal/sentry/sentryEnvironment.d.ts.map +1 -0
- package/dist/internal/tailwind/{index.d.cts → config.d.ts} +14 -16
- package/dist/internal/tailwind/config.d.ts.map +1 -0
- package/dist/internal/tailwind/index.d.ts +6 -8
- package/dist/internal/tailwind/index.d.ts.map +1 -0
- package/dist/internal/tsup/index.cjs +30 -4
- package/dist/internal/tsup/index.d.ts +3 -6
- package/dist/internal/tsup/index.d.ts.map +1 -0
- package/dist/internal/tsup/index.mjs +30 -4
- package/dist/internal/wagmi/index.d.ts +6 -8
- package/dist/internal/wagmi/index.d.ts.map +1 -0
- package/dist/mainnet.d.ts +3 -5
- package/dist/mainnet.d.ts.map +1 -0
- package/dist/{types-Drv0VlAi.d.ts → types.d.ts} +8 -8
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/dynamicEnvVariable.d.ts +21 -0
- package/dist/utils/dynamicEnvVariable.d.ts.map +1 -0
- package/dist/utils/env.d.ts +29 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/getUriFromLink.d.ts +3 -0
- package/dist/utils/getUriFromLink.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/bepolia.d.cts +0 -169
- package/dist/index.d.cts +0 -6
- package/dist/internal/flags/index.d.cts +0 -60
- package/dist/internal/header-sources.d.cts +0 -22
- package/dist/internal/index.d.cts +0 -749
- package/dist/internal/maintenance.d.cts +0 -11
- package/dist/internal/nextjs/index.d.cts +0 -34
- package/dist/internal/nextjs/utils/index.d.cts +0 -9
- package/dist/internal/sentry/index.d.cts +0 -13
- package/dist/internal/sentry/sentry.client.config.d.cts +0 -6
- package/dist/internal/tsup/index.d.cts +0 -6
- package/dist/internal/wagmi/index.d.cts +0 -12
- package/dist/mainnet.d.cts +0 -154
- package/dist/types-Drv0VlAi.d.cts +0 -214
package/dist/bepolia.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const bepolia: {
|
|
1
|
+
import { type Address, ChainId } from "./types";
|
|
2
|
+
export declare const bepolia: {
|
|
4
3
|
readonly chainId: ChainId.BEPOLIA;
|
|
5
4
|
readonly tokens: {
|
|
6
5
|
readonly wbera: "0x6969696969696969696969696969696969696969";
|
|
@@ -165,5 +164,4 @@ declare const bepolia: {
|
|
|
165
164
|
readonly endpoint: "https://faucet-api.testnet.berachain.com";
|
|
166
165
|
};
|
|
167
166
|
};
|
|
168
|
-
|
|
169
|
-
export { bepolia };
|
|
167
|
+
//# sourceMappingURL=bepolia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bepolia.d.ts","sourceRoot":"","sources":["../src/bepolia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAmB,OAAO,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAuIS,OAAO,EAAE;oCACX,OAAO,EAAE;;;;;;;;;sCASP,OAAO,EAAE;oCACX,OAAO,EAAE;;;;;;;;;;;;;;;;;;IAmBlC;;;;OAIG;;;;QAID;;WAEG;;QAEH;;WAEG;;;QAGH;;WAEG;;;CAGwB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
declare function getUriFromLink(link: HttpLink): string;
|
|
5
|
-
|
|
6
|
-
export { HttpLink, getUriFromLink };
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./utils/getUriFromLink";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { C as ChainId, a as AppName$1 } from '../../types-Drv0VlAi.cjs';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* This file was automatically generated by json-schema-to-typescript.
|
|
5
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
6
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
7
5
|
*/
|
|
8
|
-
type DynamicEnabled = boolean | {
|
|
6
|
+
export type DynamicEnabled = boolean | {
|
|
9
7
|
chain?: ("mainnet" | "bepolia")[];
|
|
10
8
|
/**
|
|
11
9
|
* If set, the flag will only be enabled on the specified branch. Otherwise, it will be enabled on all branches.
|
|
@@ -23,13 +21,13 @@ type DynamicEnabled = boolean | {
|
|
|
23
21
|
endAt?: string;
|
|
24
22
|
condition?: "AND" | "OR";
|
|
25
23
|
};
|
|
26
|
-
type AppName = "BeraHub" | "Honey" | "Bend";
|
|
27
|
-
type Address = string;
|
|
28
|
-
type MixedBannerItem = BannerItemV2 | StandardBannerItem;
|
|
24
|
+
export type AppName = "BeraHub" | "Honey" | "Bend";
|
|
25
|
+
export type Address = string;
|
|
26
|
+
export type MixedBannerItem = BannerItemV2 | StandardBannerItem;
|
|
29
27
|
/**
|
|
30
28
|
* Edge config schema. Please update this in the @berachain/config package first and keep it stored there.
|
|
31
29
|
*/
|
|
32
|
-
interface EdgeConfigSchema {
|
|
30
|
+
export interface EdgeConfigSchema {
|
|
33
31
|
$schema?: string;
|
|
34
32
|
flags: {
|
|
35
33
|
[k: string]: DynamicEnabled;
|
|
@@ -128,9 +126,6 @@ interface EdgeConfigSchema {
|
|
|
128
126
|
unboost?: BgtMigrationStep;
|
|
129
127
|
redeemBGT?: BgtMigrationStep;
|
|
130
128
|
stakeBERA?: BgtMigrationStep;
|
|
131
|
-
unstake?: BgtMigrationStep;
|
|
132
|
-
withdraw?: BgtMigrationStep;
|
|
133
|
-
redeem?: BgtMigrationStep;
|
|
134
129
|
};
|
|
135
130
|
/**
|
|
136
131
|
* Copy for the Incentives tab.
|
|
@@ -162,19 +157,6 @@ interface EdgeConfigSchema {
|
|
|
162
157
|
*/
|
|
163
158
|
bepolia?: BgtDerivative[];
|
|
164
159
|
};
|
|
165
|
-
/**
|
|
166
|
-
* Liquidity pools that use BGT-derivative tokens, listed in the 'BGT derivatives' tab (Withdraw step), configured per chain. When a chain has no entries, no LP positions are tracked for that chain. Omit a chain entirely to fall back to the in-code defaults for that chain.
|
|
167
|
-
*/
|
|
168
|
-
derivativePools?: {
|
|
169
|
-
/**
|
|
170
|
-
* Derivative pools for Berachain mainnet.
|
|
171
|
-
*/
|
|
172
|
-
mainnet?: DerivativePool[];
|
|
173
|
-
/**
|
|
174
|
-
* Derivative pools for the Bepolia testnet.
|
|
175
|
-
*/
|
|
176
|
-
bepolia?: DerivativePool[];
|
|
177
|
-
};
|
|
178
160
|
/**
|
|
179
161
|
* Copy for the site-wide nudge banner shown when a user has un-migrated BGT positions.
|
|
180
162
|
*/
|
|
@@ -229,7 +211,7 @@ interface EdgeConfigSchema {
|
|
|
229
211
|
}[];
|
|
230
212
|
};
|
|
231
213
|
}
|
|
232
|
-
interface VaultItem {
|
|
214
|
+
export interface VaultItem {
|
|
233
215
|
address: Address;
|
|
234
216
|
enabled: DynamicEnabled;
|
|
235
217
|
_name?: string;
|
|
@@ -237,7 +219,7 @@ interface VaultItem {
|
|
|
237
219
|
/**
|
|
238
220
|
* Copy for a single step in the BGT migration widget. Each field is optional — missing fields fall back to the in-code defaults.
|
|
239
221
|
*/
|
|
240
|
-
interface BgtMigrationStep {
|
|
222
|
+
export interface BgtMigrationStep {
|
|
241
223
|
/**
|
|
242
224
|
* Label shown in the stepper sidebar.
|
|
243
225
|
*/
|
|
@@ -254,66 +236,25 @@ interface BgtMigrationStep {
|
|
|
254
236
|
/**
|
|
255
237
|
* A deprecated BGT-derivative token surfaced in the migration widget's 'BGT derivatives' tab. Addresses are chain-specific, so this list is configured per chain.
|
|
256
238
|
*/
|
|
257
|
-
interface BgtDerivative {
|
|
239
|
+
export interface BgtDerivative {
|
|
258
240
|
/**
|
|
259
241
|
* Token symbol shown in the UI (e.g. 'iBGT').
|
|
260
242
|
*/
|
|
261
243
|
symbol: string;
|
|
262
|
-
/**
|
|
263
|
-
* Human-readable token name (e.g. 'Infrared BGT').
|
|
264
|
-
*/
|
|
265
|
-
tokenName?: string;
|
|
266
244
|
/**
|
|
267
245
|
* Human-readable source protocol (e.g. 'Infrared'), shown on the 'Unstake on {protocol}' link.
|
|
268
246
|
*/
|
|
269
247
|
protocol: string;
|
|
270
248
|
/**
|
|
271
|
-
* ERC20 address of the derivative token; the in-wallet (idle) balance is read from here
|
|
249
|
+
* ERC20 address of the derivative token; the in-wallet (idle) balance is read from here.
|
|
272
250
|
*/
|
|
273
251
|
tokenAddress: string;
|
|
274
252
|
/**
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
277
|
-
stakingContract?: string;
|
|
278
|
-
/**
|
|
279
|
-
* External page where the user unstakes this derivative from its own staking (Unstake step, derivative-staking rows).
|
|
253
|
+
* External page where the user unstakes / redeems this derivative.
|
|
280
254
|
*/
|
|
281
255
|
unstakeUrl: string;
|
|
282
|
-
/**
|
|
283
|
-
* External page where the user redeems this derivative for BERA (Redeem step). Falls back to `unstakeUrl` when omitted.
|
|
284
|
-
*/
|
|
285
|
-
redeemUrl?: string;
|
|
286
256
|
}
|
|
287
|
-
|
|
288
|
-
* A liquidity pool that uses a BGT-derivative token, surfaced in the migration widget's 'BGT derivatives' tab (Withdraw step). The user may hold the LP token idle, or have it staked in a reward vault and/or an Infrared vault. Addresses are chain-specific, so this list is configured per chain.
|
|
289
|
-
*/
|
|
290
|
-
interface DerivativePool {
|
|
291
|
-
/**
|
|
292
|
-
* Pool display name (e.g. 'osBGT / sWBERA').
|
|
293
|
-
*/
|
|
294
|
-
name: string;
|
|
295
|
-
/**
|
|
296
|
-
* Pool protocol — determines the withdraw mechanism.
|
|
297
|
-
*/
|
|
298
|
-
protocol: "Kodiak" | "HUB";
|
|
299
|
-
/**
|
|
300
|
-
* Pool / LP-token address; the idle LP balance is read from here and liquidity is withdrawn from it.
|
|
301
|
-
*/
|
|
302
|
-
poolAddress: string;
|
|
303
|
-
/**
|
|
304
|
-
* Berachain Hub/Kodiak/Bera reward vault that stakes this pool's LP token. Omit when the pool has none.
|
|
305
|
-
*/
|
|
306
|
-
rewardVault?: string;
|
|
307
|
-
/**
|
|
308
|
-
* Infrared vault that stakes this pool's LP token. Omit when the pool has none.
|
|
309
|
-
*/
|
|
310
|
-
infraredVault?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Infrared reward-vault page for `infraredVault` (Infrared uses slug URLs, not address-based). Falls back to the Infrared vaults list when omitted.
|
|
313
|
-
*/
|
|
314
|
-
infraredUrl?: string;
|
|
315
|
-
}
|
|
316
|
-
interface BannerItemV2 {
|
|
257
|
+
export interface BannerItemV2 {
|
|
317
258
|
text: string;
|
|
318
259
|
className?: string;
|
|
319
260
|
linkClassName?: string;
|
|
@@ -323,11 +264,11 @@ interface BannerItemV2 {
|
|
|
323
264
|
paths?: string[];
|
|
324
265
|
variant?: "info" | "warning" | "bend" | "honey" | "hub";
|
|
325
266
|
}
|
|
326
|
-
interface StandardBannerItem {
|
|
267
|
+
export interface StandardBannerItem {
|
|
327
268
|
enabled: DynamicEnabled;
|
|
328
269
|
type: "rpc" | "bepolia" | "slow";
|
|
329
270
|
}
|
|
330
|
-
interface TokenItem {
|
|
271
|
+
export interface TokenItem {
|
|
331
272
|
address: Address;
|
|
332
273
|
decimals: number;
|
|
333
274
|
symbol: string;
|
|
@@ -338,55 +279,8 @@ interface TokenItem {
|
|
|
338
279
|
chainId?: number;
|
|
339
280
|
enabled: DynamicEnabled;
|
|
340
281
|
}
|
|
341
|
-
interface LstStakingVaultItem {
|
|
282
|
+
export interface LstStakingVaultItem {
|
|
342
283
|
address: Address;
|
|
343
284
|
enabled: DynamicEnabled;
|
|
344
285
|
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Checks if a dynamic feature flag is enabled based on the provided chain and environment.
|
|
348
|
-
*
|
|
349
|
-
* @param flag - The dynamic flag value, which can be a boolean or an object specifying conditions.
|
|
350
|
-
* @param options - Optional parameters to override the default chain and environment.
|
|
351
|
-
* @param options.chain - The chain ID to check against (defaults to current chainId).
|
|
352
|
-
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
353
|
-
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
354
|
-
*/
|
|
355
|
-
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
356
|
-
chain?: ChainId;
|
|
357
|
-
environment?: string;
|
|
358
|
-
app?: AppName$1;
|
|
359
|
-
}): boolean;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Safely retrieves all values from the Vercel Edge Config.
|
|
363
|
-
*
|
|
364
|
-
* @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
|
|
365
|
-
* @param options - Optional parameters.
|
|
366
|
-
* @param options.chain - The chain ID to check against (not currently used).
|
|
367
|
-
* @param options.environment - The environment to check against (not currently used).
|
|
368
|
-
* @param options.onError - Optional error handler callback.
|
|
369
|
-
* @returns A promise that resolves to the config object, or undefined if retrieval fails.
|
|
370
|
-
*/
|
|
371
|
-
declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
|
|
372
|
-
onError?: (error: unknown) => void;
|
|
373
|
-
}): Promise<T | undefined>;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Safely retrieves a value from the Vercel Edge Config by key.
|
|
377
|
-
*
|
|
378
|
-
* @template T - The key of the EdgeConfigSchema to retrieve.
|
|
379
|
-
* @param flagName - The name of the config flag to retrieve.
|
|
380
|
-
* @param options - Optional parameters.
|
|
381
|
-
* @param options.chain - The chain ID to check against (not currently used).
|
|
382
|
-
* @param options.environment - The environment to check against (not currently used).
|
|
383
|
-
* @param options.onError - Optional error handler callback.
|
|
384
|
-
* @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
|
|
385
|
-
*/
|
|
386
|
-
declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
|
|
387
|
-
chain?: ChainId;
|
|
388
|
-
environment?: string;
|
|
389
|
-
onError?: (error: unknown) => void;
|
|
390
|
-
}): Promise<EdgeConfigSchema[T] | undefined>;
|
|
391
|
-
|
|
392
|
-
export { type Address, type AppName, type BannerItemV2, type BgtDerivative, type BgtMigrationStep, type DerivativePool, type DynamicEnabled, type EdgeConfigSchema, type LstStakingVaultItem, type MixedBannerItem, type StandardBannerItem, type TokenItem, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
|
|
286
|
+
//# sourceMappingURL=edgeConfig.codegen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edgeConfig.codegen.d.ts","sourceRoot":"","sources":["../../../src/internal/edge-config/edgeConfig.codegen.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GACtB,OAAO,GACP;IACE,KAAK,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,YAAY,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,CAA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AAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,cAAc,CAAC;CACzB"}
|
|
@@ -1,392 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
7
|
-
*/
|
|
8
|
-
type DynamicEnabled = boolean | {
|
|
9
|
-
chain?: ("mainnet" | "bepolia")[];
|
|
10
|
-
/**
|
|
11
|
-
* If set, the flag will only be enabled on the specified branch. Otherwise, it will be enabled on all branches.
|
|
12
|
-
*
|
|
13
|
-
* @minItems 1
|
|
14
|
-
*/
|
|
15
|
-
branch?: ["production" | "staging" | "preview", ...("production" | "staging" | "preview")[]];
|
|
16
|
-
/**
|
|
17
|
-
* If set, the flag will only be enabled on the specified app. Otherwise, it will be enabled on all apps.
|
|
18
|
-
*
|
|
19
|
-
* @minItems 1
|
|
20
|
-
*/
|
|
21
|
-
app?: [AppName, ...AppName[]];
|
|
22
|
-
startAt?: string;
|
|
23
|
-
endAt?: string;
|
|
24
|
-
condition?: "AND" | "OR";
|
|
25
|
-
};
|
|
26
|
-
type AppName = "BeraHub" | "Honey" | "Bend";
|
|
27
|
-
type Address = string;
|
|
28
|
-
type MixedBannerItem = BannerItemV2 | StandardBannerItem;
|
|
29
|
-
/**
|
|
30
|
-
* Edge config schema. Please update this in the @berachain/config package first and keep it stored there.
|
|
31
|
-
*/
|
|
32
|
-
interface EdgeConfigSchema {
|
|
33
|
-
$schema?: string;
|
|
34
|
-
flags: {
|
|
35
|
-
[k: string]: DynamicEnabled;
|
|
36
|
-
};
|
|
37
|
-
bex: {
|
|
38
|
-
/**
|
|
39
|
-
* An object of aggregators and their enabled status. The key is the aggregator name in lowercase and without spaces and must be in the Aggregators enum.
|
|
40
|
-
*/
|
|
41
|
-
aggregators?: {
|
|
42
|
-
[k: string]: DynamicEnabled;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Labels for the emergency messages and banners. (e.g. pool or vaults are paused)
|
|
46
|
-
*/
|
|
47
|
-
emergencyLabels?: {
|
|
48
|
-
/**
|
|
49
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
50
|
-
* via the `patternProperty` "^(vaultPaused|poolRecovery|poolPaused|poolInRecoveryMode|poolPausedAndInRecoveryMode)$".
|
|
51
|
-
*/
|
|
52
|
-
[k: string]: {
|
|
53
|
-
title?: string;
|
|
54
|
-
description?: string;
|
|
55
|
-
banner?: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* If true, weighted pool creation will be disabled.
|
|
60
|
-
*/
|
|
61
|
-
disableWeightedPoolCreation?: boolean;
|
|
62
|
-
};
|
|
63
|
-
pol: {
|
|
64
|
-
/**
|
|
65
|
-
* @minItems 2
|
|
66
|
-
*/
|
|
67
|
-
featured?: [VaultItem, VaultItem, ...VaultItem[]];
|
|
68
|
-
/**
|
|
69
|
-
* Vault addresses in this list won't show the stake section. This is because stake/unstake is done thought a contract that holds the whole supply.
|
|
70
|
-
*/
|
|
71
|
-
singleHolderVaults?: {
|
|
72
|
-
address: Address;
|
|
73
|
-
_name?: string;
|
|
74
|
-
}[];
|
|
75
|
-
/**
|
|
76
|
-
* The APR for the staked wBera vault. This is used to display the APR in the APR banner.
|
|
77
|
-
*/
|
|
78
|
-
swberaApr?: number;
|
|
79
|
-
/**
|
|
80
|
-
* The version of the staked wBera vault.
|
|
81
|
-
*/
|
|
82
|
-
swberaMainnetVersion?: "V1" | "V2";
|
|
83
|
-
/**
|
|
84
|
-
* the window is DAY or WEEK, its the window for calculating the APR
|
|
85
|
-
*/
|
|
86
|
-
swberaAprWindow?: "DAY" | "WEEK";
|
|
87
|
-
/**
|
|
88
|
-
* X post URL for the vNext onboarding 'Learn more' button. Falls back to the docs URL when unset.
|
|
89
|
-
*/
|
|
90
|
-
vnextOnboardingUrl?: string;
|
|
91
|
-
automatedRewardAllocation: {
|
|
92
|
-
blockDelayLabel: string;
|
|
93
|
-
hoursToWarnInAdvance: number;
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* User-facing copy for the portfolio PoL migration widget (BGT / Incentives / BGT derivatives tabs). Every field is optional; the app merges what's provided here over the in-code defaults, so a partial override leaves everything else intact.
|
|
97
|
-
*/
|
|
98
|
-
bgtMigrationWidget?: {
|
|
99
|
-
/**
|
|
100
|
-
* Always-visible widget header (e.g. 'PoL Migration').
|
|
101
|
-
*/
|
|
102
|
-
widgetTitle?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Header text shown once every tab is complete.
|
|
105
|
-
*/
|
|
106
|
-
completedTitle?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Labels for the three migration tabs.
|
|
109
|
-
*/
|
|
110
|
-
tabs?: {
|
|
111
|
-
bgt?: string;
|
|
112
|
-
incentives?: string;
|
|
113
|
-
derivatives?: string;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* BGT tab heading.
|
|
117
|
-
*/
|
|
118
|
-
title?: string;
|
|
119
|
-
/**
|
|
120
|
-
* BGT tab sub-copy; each entry renders as its own paragraph.
|
|
121
|
-
*/
|
|
122
|
-
description?: string[];
|
|
123
|
-
/**
|
|
124
|
-
* Per-step copy for the BGT tab. Each step id is optional; missing steps (and missing fields within a step) fall back to the in-code defaults. Unknown step ids are rejected so a typo cannot silently break a step's copy.
|
|
125
|
-
*/
|
|
126
|
-
steps?: {
|
|
127
|
-
claimFees?: BgtMigrationStep;
|
|
128
|
-
unboost?: BgtMigrationStep;
|
|
129
|
-
redeemBGT?: BgtMigrationStep;
|
|
130
|
-
stakeBERA?: BgtMigrationStep;
|
|
131
|
-
unstake?: BgtMigrationStep;
|
|
132
|
-
withdraw?: BgtMigrationStep;
|
|
133
|
-
redeem?: BgtMigrationStep;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Copy for the Incentives tab.
|
|
137
|
-
*/
|
|
138
|
-
incentives?: {
|
|
139
|
-
title?: string;
|
|
140
|
-
description?: string;
|
|
141
|
-
alertText?: string;
|
|
142
|
-
claimCta?: string;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Copy for the BGT derivatives tab.
|
|
146
|
-
*/
|
|
147
|
-
derivatives?: {
|
|
148
|
-
title?: string;
|
|
149
|
-
description?: string;
|
|
150
|
-
convertCta?: string;
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* BGT-derivative tokens listed in the 'BGT derivatives' tab, configured per chain (addresses differ between mainnet and bepolia). When a chain has no entries, the derivatives tab is disabled and counts as complete (no work to do). Omit a chain entirely to fall back to the in-code defaults for that chain.
|
|
154
|
-
*/
|
|
155
|
-
derivativeTokens?: {
|
|
156
|
-
/**
|
|
157
|
-
* Derivative tokens for Berachain mainnet.
|
|
158
|
-
*/
|
|
159
|
-
mainnet?: BgtDerivative[];
|
|
160
|
-
/**
|
|
161
|
-
* Derivative tokens for the Bepolia testnet.
|
|
162
|
-
*/
|
|
163
|
-
bepolia?: BgtDerivative[];
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Liquidity pools that use BGT-derivative tokens, listed in the 'BGT derivatives' tab (Withdraw step), configured per chain. When a chain has no entries, no LP positions are tracked for that chain. Omit a chain entirely to fall back to the in-code defaults for that chain.
|
|
167
|
-
*/
|
|
168
|
-
derivativePools?: {
|
|
169
|
-
/**
|
|
170
|
-
* Derivative pools for Berachain mainnet.
|
|
171
|
-
*/
|
|
172
|
-
mainnet?: DerivativePool[];
|
|
173
|
-
/**
|
|
174
|
-
* Derivative pools for the Bepolia testnet.
|
|
175
|
-
*/
|
|
176
|
-
bepolia?: DerivativePool[];
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Copy for the site-wide nudge banner shown when a user has un-migrated BGT positions.
|
|
180
|
-
*/
|
|
181
|
-
banner?: {
|
|
182
|
-
/**
|
|
183
|
-
* Banner text; the whole strip links to the portfolio migration widget.
|
|
184
|
-
*/
|
|
185
|
-
text?: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
honey: {
|
|
190
|
-
/**
|
|
191
|
-
* Object containing the collateral order for mainnet & bepolia.
|
|
192
|
-
*/
|
|
193
|
-
preferredCollateralOrder?: {
|
|
194
|
-
mainnet: {
|
|
195
|
-
address: Address;
|
|
196
|
-
_label?: string;
|
|
197
|
-
}[];
|
|
198
|
-
bepolia: {
|
|
199
|
-
address: Address;
|
|
200
|
-
_label?: string;
|
|
201
|
-
}[];
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* The label for the Honey protocol paused message.
|
|
205
|
-
*/
|
|
206
|
-
pausedBannerLabel?: string;
|
|
207
|
-
};
|
|
208
|
-
banners: MixedBannerItem[];
|
|
209
|
-
tokens?: TokenItem[];
|
|
210
|
-
lstStakingVaults?: LstStakingVaultItem[];
|
|
211
|
-
maintenance?: {
|
|
212
|
-
/**
|
|
213
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
214
|
-
* via the `patternProperty` "^(hub|honey|bridge|boyco)$".
|
|
215
|
-
*/
|
|
216
|
-
[k: string]: {
|
|
217
|
-
enabled?: DynamicEnabled;
|
|
218
|
-
[k: string]: unknown;
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
wagmi: {
|
|
222
|
-
/**
|
|
223
|
-
* The list of external chains that are approved for multi chain zapping.
|
|
224
|
-
*/
|
|
225
|
-
externalChainList: {
|
|
226
|
-
chainId: number;
|
|
227
|
-
_name?: string;
|
|
228
|
-
enabled: DynamicEnabled;
|
|
229
|
-
}[];
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
interface VaultItem {
|
|
233
|
-
address: Address;
|
|
234
|
-
enabled: DynamicEnabled;
|
|
235
|
-
_name?: string;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Copy for a single step in the BGT migration widget. Each field is optional — missing fields fall back to the in-code defaults.
|
|
239
|
-
*/
|
|
240
|
-
interface BgtMigrationStep {
|
|
241
|
-
/**
|
|
242
|
-
* Label shown in the stepper sidebar.
|
|
243
|
-
*/
|
|
244
|
-
label?: string;
|
|
245
|
-
/**
|
|
246
|
-
* Title shown at the top of the step card.
|
|
247
|
-
*/
|
|
248
|
-
title?: string;
|
|
249
|
-
/**
|
|
250
|
-
* Informational text shown in a muted alert row inside the step card.
|
|
251
|
-
*/
|
|
252
|
-
alertText?: string;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* A deprecated BGT-derivative token surfaced in the migration widget's 'BGT derivatives' tab. Addresses are chain-specific, so this list is configured per chain.
|
|
256
|
-
*/
|
|
257
|
-
interface BgtDerivative {
|
|
258
|
-
/**
|
|
259
|
-
* Token symbol shown in the UI (e.g. 'iBGT').
|
|
260
|
-
*/
|
|
261
|
-
symbol: string;
|
|
262
|
-
/**
|
|
263
|
-
* Human-readable token name (e.g. 'Infrared BGT').
|
|
264
|
-
*/
|
|
265
|
-
tokenName?: string;
|
|
266
|
-
/**
|
|
267
|
-
* Human-readable source protocol (e.g. 'Infrared'), shown on the 'Unstake on {protocol}' link.
|
|
268
|
-
*/
|
|
269
|
-
protocol: string;
|
|
270
|
-
/**
|
|
271
|
-
* ERC20 address of the derivative token; the in-wallet (idle) balance is read from here, and native redemption to BERA/WBERA is called on it.
|
|
272
|
-
*/
|
|
273
|
-
tokenAddress: string;
|
|
274
|
-
/**
|
|
275
|
-
* The derivative's own single-asset staking contract; its staked balance surfaces an Unstake row. Omit when the derivative has no native staking.
|
|
276
|
-
*/
|
|
277
|
-
stakingContract?: string;
|
|
278
|
-
/**
|
|
279
|
-
* External page where the user unstakes this derivative from its own staking (Unstake step, derivative-staking rows).
|
|
280
|
-
*/
|
|
281
|
-
unstakeUrl: string;
|
|
282
|
-
/**
|
|
283
|
-
* External page where the user redeems this derivative for BERA (Redeem step). Falls back to `unstakeUrl` when omitted.
|
|
284
|
-
*/
|
|
285
|
-
redeemUrl?: string;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* A liquidity pool that uses a BGT-derivative token, surfaced in the migration widget's 'BGT derivatives' tab (Withdraw step). The user may hold the LP token idle, or have it staked in a reward vault and/or an Infrared vault. Addresses are chain-specific, so this list is configured per chain.
|
|
289
|
-
*/
|
|
290
|
-
interface DerivativePool {
|
|
291
|
-
/**
|
|
292
|
-
* Pool display name (e.g. 'osBGT / sWBERA').
|
|
293
|
-
*/
|
|
294
|
-
name: string;
|
|
295
|
-
/**
|
|
296
|
-
* Pool protocol — determines the withdraw mechanism.
|
|
297
|
-
*/
|
|
298
|
-
protocol: "Kodiak" | "HUB";
|
|
299
|
-
/**
|
|
300
|
-
* Pool / LP-token address; the idle LP balance is read from here and liquidity is withdrawn from it.
|
|
301
|
-
*/
|
|
302
|
-
poolAddress: string;
|
|
303
|
-
/**
|
|
304
|
-
* Berachain Hub/Kodiak/Bera reward vault that stakes this pool's LP token. Omit when the pool has none.
|
|
305
|
-
*/
|
|
306
|
-
rewardVault?: string;
|
|
307
|
-
/**
|
|
308
|
-
* Infrared vault that stakes this pool's LP token. Omit when the pool has none.
|
|
309
|
-
*/
|
|
310
|
-
infraredVault?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Infrared reward-vault page for `infraredVault` (Infrared uses slug URLs, not address-based). Falls back to the Infrared vaults list when omitted.
|
|
313
|
-
*/
|
|
314
|
-
infraredUrl?: string;
|
|
315
|
-
}
|
|
316
|
-
interface BannerItemV2 {
|
|
317
|
-
text: string;
|
|
318
|
-
className?: string;
|
|
319
|
-
linkClassName?: string;
|
|
320
|
-
enabled: DynamicEnabled;
|
|
321
|
-
href?: string;
|
|
322
|
-
icon?: "bend";
|
|
323
|
-
paths?: string[];
|
|
324
|
-
variant?: "info" | "warning" | "bend" | "honey" | "hub";
|
|
325
|
-
}
|
|
326
|
-
interface StandardBannerItem {
|
|
327
|
-
enabled: DynamicEnabled;
|
|
328
|
-
type: "rpc" | "bepolia" | "slow";
|
|
329
|
-
}
|
|
330
|
-
interface TokenItem {
|
|
331
|
-
address: Address;
|
|
332
|
-
decimals: number;
|
|
333
|
-
symbol: string;
|
|
334
|
-
name: string;
|
|
335
|
-
tags?: string[];
|
|
336
|
-
base64?: string;
|
|
337
|
-
logoURI?: string;
|
|
338
|
-
chainId?: number;
|
|
339
|
-
enabled: DynamicEnabled;
|
|
340
|
-
}
|
|
341
|
-
interface LstStakingVaultItem {
|
|
342
|
-
address: Address;
|
|
343
|
-
enabled: DynamicEnabled;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Checks if a dynamic feature flag is enabled based on the provided chain and environment.
|
|
348
|
-
*
|
|
349
|
-
* @param flag - The dynamic flag value, which can be a boolean or an object specifying conditions.
|
|
350
|
-
* @param options - Optional parameters to override the default chain and environment.
|
|
351
|
-
* @param options.chain - The chain ID to check against (defaults to current chainId).
|
|
352
|
-
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
353
|
-
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
354
|
-
*/
|
|
355
|
-
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
356
|
-
chain?: ChainId;
|
|
357
|
-
environment?: string;
|
|
358
|
-
app?: AppName$1;
|
|
359
|
-
}): boolean;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Safely retrieves all values from the Vercel Edge Config.
|
|
363
|
-
*
|
|
364
|
-
* @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
|
|
365
|
-
* @param options - Optional parameters.
|
|
366
|
-
* @param options.chain - The chain ID to check against (not currently used).
|
|
367
|
-
* @param options.environment - The environment to check against (not currently used).
|
|
368
|
-
* @param options.onError - Optional error handler callback.
|
|
369
|
-
* @returns A promise that resolves to the config object, or undefined if retrieval fails.
|
|
370
|
-
*/
|
|
371
|
-
declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
|
|
372
|
-
onError?: (error: unknown) => void;
|
|
373
|
-
}): Promise<T | undefined>;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Safely retrieves a value from the Vercel Edge Config by key.
|
|
377
|
-
*
|
|
378
|
-
* @template T - The key of the EdgeConfigSchema to retrieve.
|
|
379
|
-
* @param flagName - The name of the config flag to retrieve.
|
|
380
|
-
* @param options - Optional parameters.
|
|
381
|
-
* @param options.chain - The chain ID to check against (not currently used).
|
|
382
|
-
* @param options.environment - The environment to check against (not currently used).
|
|
383
|
-
* @param options.onError - Optional error handler callback.
|
|
384
|
-
* @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
|
|
385
|
-
*/
|
|
386
|
-
declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
|
|
387
|
-
chain?: ChainId;
|
|
388
|
-
environment?: string;
|
|
389
|
-
onError?: (error: unknown) => void;
|
|
390
|
-
}): Promise<EdgeConfigSchema[T] | undefined>;
|
|
391
|
-
|
|
392
|
-
export { type Address, type AppName, type BannerItemV2, type BgtDerivative, type BgtMigrationStep, type DerivativePool, type DynamicEnabled, type EdgeConfigSchema, type LstStakingVaultItem, type MixedBannerItem, type StandardBannerItem, type TokenItem, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
|
|
1
|
+
export * from "./edgeConfig.codegen";
|
|
2
|
+
export * from "./isFlagEnabled";
|
|
3
|
+
export * from "./safeGetAll";
|
|
4
|
+
export * from "./safeGetConfig";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/edge-config/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type AppName, ChainId } from "../../types";
|
|
2
|
+
import type { DynamicEnabled } from "./edgeConfig.codegen";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if a dynamic feature flag is enabled based on the provided chain and environment.
|
|
5
|
+
*
|
|
6
|
+
* @param flag - The dynamic flag value, which can be a boolean or an object specifying conditions.
|
|
7
|
+
* @param options - Optional parameters to override the default chain and environment.
|
|
8
|
+
* @param options.chain - The chain ID to check against (defaults to current chainId).
|
|
9
|
+
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
10
|
+
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
13
|
+
chain?: ChainId;
|
|
14
|
+
environment?: string;
|
|
15
|
+
app?: AppName;
|
|
16
|
+
}): boolean;
|
|
17
|
+
//# sourceMappingURL=isFlagEnabled.d.ts.map
|