@berachain/config 0.1.22-beta.1 → 0.1.22
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.cts +169 -0
- package/dist/bepolia.d.ts +5 -3
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -3
- package/dist/internal/edge-config/{edgeConfig.codegen.d.ts → index.d.cts} +122 -15
- package/dist/internal/edge-config/index.d.ts +393 -5
- package/dist/internal/flags/index.d.cts +60 -0
- package/dist/internal/flags/index.d.ts +60 -2
- package/dist/internal/header-sources.d.cts +22 -0
- package/dist/internal/header-sources.d.ts +7 -5
- package/dist/internal/index.d.cts +749 -0
- package/dist/internal/index.d.ts +173 -139
- package/dist/internal/maintenance.d.cts +11 -0
- package/dist/internal/maintenance.d.ts +7 -5
- package/dist/internal/nextjs/index.d.cts +34 -0
- package/dist/internal/nextjs/index.d.ts +6 -5
- package/dist/internal/nextjs/utils/index.d.cts +9 -0
- package/dist/internal/nextjs/utils/index.d.ts +3 -2
- package/dist/internal/sentry/index.d.cts +13 -0
- package/dist/internal/sentry/index.d.ts +8 -6
- package/dist/internal/sentry/sentry.client.config.d.cts +6 -0
- package/dist/internal/sentry/sentry.client.config.d.ts +6 -3
- package/dist/internal/tailwind/{config.d.ts → index.d.cts} +16 -14
- package/dist/internal/tailwind/index.d.ts +8 -6
- package/dist/internal/tsup/index.cjs +4 -30
- package/dist/internal/tsup/index.d.cts +6 -0
- package/dist/internal/tsup/index.d.ts +6 -3
- package/dist/internal/tsup/index.mjs +4 -30
- package/dist/internal/wagmi/index.d.cts +12 -0
- package/dist/internal/wagmi/index.d.ts +8 -6
- package/dist/mainnet.d.cts +154 -0
- package/dist/mainnet.d.ts +5 -3
- package/dist/{types.d.ts → types-Drv0VlAi.d.cts} +8 -8
- package/dist/types-Drv0VlAi.d.ts +214 -0
- package/package.json +1 -1
- package/dist/bepolia.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/edge-config/edgeConfig.codegen.d.ts.map +0 -1
- package/dist/internal/edge-config/index.d.ts.map +0 -1
- package/dist/internal/edge-config/isFlagEnabled.d.ts +0 -17
- package/dist/internal/edge-config/isFlagEnabled.d.ts.map +0 -1
- package/dist/internal/edge-config/safeGetAll.d.ts +0 -15
- package/dist/internal/edge-config/safeGetAll.d.ts.map +0 -1
- package/dist/internal/edge-config/safeGetConfig.d.ts +0 -19
- package/dist/internal/edge-config/safeGetConfig.d.ts.map +0 -1
- package/dist/internal/flags/beraEdgeConfigAdapter.d.ts +0 -9
- package/dist/internal/flags/beraEdgeConfigAdapter.d.ts.map +0 -1
- package/dist/internal/flags/flags.d.ts +0 -29
- package/dist/internal/flags/flags.d.ts.map +0 -1
- package/dist/internal/flags/index.d.ts.map +0 -1
- package/dist/internal/header-sources.d.ts.map +0 -1
- package/dist/internal/index.d.ts.map +0 -1
- package/dist/internal/maintenance.d.ts.map +0 -1
- package/dist/internal/nextjs/const.d.ts +0 -3
- package/dist/internal/nextjs/const.d.ts.map +0 -1
- package/dist/internal/nextjs/index.d.ts.map +0 -1
- package/dist/internal/nextjs/utils/index.d.ts.map +0 -1
- package/dist/internal/sentry/getSentryKeys.d.ts +0 -16
- package/dist/internal/sentry/getSentryKeys.d.ts.map +0 -1
- package/dist/internal/sentry/index.d.ts.map +0 -1
- package/dist/internal/sentry/sentry.client.config.d.ts.map +0 -1
- package/dist/internal/sentry/sentry.edge.config.d.ts +0 -3
- package/dist/internal/sentry/sentry.edge.config.d.ts.map +0 -1
- package/dist/internal/sentry/sentry.server.config.d.ts +0 -3
- package/dist/internal/sentry/sentry.server.config.d.ts.map +0 -1
- package/dist/internal/sentry/sentryEnvironment.d.ts +0 -6
- package/dist/internal/sentry/sentryEnvironment.d.ts.map +0 -1
- package/dist/internal/tailwind/config.d.ts.map +0 -1
- package/dist/internal/tailwind/index.d.ts.map +0 -1
- package/dist/internal/tsup/index.d.ts.map +0 -1
- package/dist/internal/wagmi/index.d.ts.map +0 -1
- package/dist/mainnet.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/dynamicEnvVariable.d.ts +0 -21
- package/dist/utils/dynamicEnvVariable.d.ts.map +0 -1
- package/dist/utils/env.d.ts +0 -29
- package/dist/utils/env.d.ts.map +0 -1
- package/dist/utils/getUriFromLink.d.ts +0 -3
- package/dist/utils/getUriFromLink.d.ts.map +0 -1
|
@@ -1,5 +1,393 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { C as ChainId, a as AppName$1 } from '../../types-Drv0VlAi.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
5
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
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
|
+
unstakeExternal?: BgtMigrationStep;
|
|
133
|
+
withdraw?: BgtMigrationStep;
|
|
134
|
+
redeem?: BgtMigrationStep;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Copy for the Incentives tab.
|
|
138
|
+
*/
|
|
139
|
+
incentives?: {
|
|
140
|
+
title?: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
alertText?: string;
|
|
143
|
+
claimCta?: string;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Copy for the BGT derivatives tab.
|
|
147
|
+
*/
|
|
148
|
+
derivatives?: {
|
|
149
|
+
title?: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
convertCta?: string;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* 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.
|
|
155
|
+
*/
|
|
156
|
+
derivativeTokens?: {
|
|
157
|
+
/**
|
|
158
|
+
* Derivative tokens for Berachain mainnet.
|
|
159
|
+
*/
|
|
160
|
+
mainnet?: BgtDerivative[];
|
|
161
|
+
/**
|
|
162
|
+
* Derivative tokens for the Bepolia testnet.
|
|
163
|
+
*/
|
|
164
|
+
bepolia?: BgtDerivative[];
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* 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.
|
|
168
|
+
*/
|
|
169
|
+
derivativePools?: {
|
|
170
|
+
/**
|
|
171
|
+
* Derivative pools for Berachain mainnet.
|
|
172
|
+
*/
|
|
173
|
+
mainnet?: DerivativePool[];
|
|
174
|
+
/**
|
|
175
|
+
* Derivative pools for the Bepolia testnet.
|
|
176
|
+
*/
|
|
177
|
+
bepolia?: DerivativePool[];
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Copy for the site-wide nudge banner shown when a user has un-migrated BGT positions.
|
|
181
|
+
*/
|
|
182
|
+
banner?: {
|
|
183
|
+
/**
|
|
184
|
+
* Banner text; the whole strip links to the portfolio migration widget.
|
|
185
|
+
*/
|
|
186
|
+
text?: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
honey: {
|
|
191
|
+
/**
|
|
192
|
+
* Object containing the collateral order for mainnet & bepolia.
|
|
193
|
+
*/
|
|
194
|
+
preferredCollateralOrder?: {
|
|
195
|
+
mainnet: {
|
|
196
|
+
address: Address;
|
|
197
|
+
_label?: string;
|
|
198
|
+
}[];
|
|
199
|
+
bepolia: {
|
|
200
|
+
address: Address;
|
|
201
|
+
_label?: string;
|
|
202
|
+
}[];
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* The label for the Honey protocol paused message.
|
|
206
|
+
*/
|
|
207
|
+
pausedBannerLabel?: string;
|
|
208
|
+
};
|
|
209
|
+
banners: MixedBannerItem[];
|
|
210
|
+
tokens?: TokenItem[];
|
|
211
|
+
lstStakingVaults?: LstStakingVaultItem[];
|
|
212
|
+
maintenance?: {
|
|
213
|
+
/**
|
|
214
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
215
|
+
* via the `patternProperty` "^(hub|honey|bridge|boyco)$".
|
|
216
|
+
*/
|
|
217
|
+
[k: string]: {
|
|
218
|
+
enabled?: DynamicEnabled;
|
|
219
|
+
[k: string]: unknown;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
wagmi: {
|
|
223
|
+
/**
|
|
224
|
+
* The list of external chains that are approved for multi chain zapping.
|
|
225
|
+
*/
|
|
226
|
+
externalChainList: {
|
|
227
|
+
chainId: number;
|
|
228
|
+
_name?: string;
|
|
229
|
+
enabled: DynamicEnabled;
|
|
230
|
+
}[];
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
interface VaultItem {
|
|
234
|
+
address: Address;
|
|
235
|
+
enabled: DynamicEnabled;
|
|
236
|
+
_name?: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Copy for a single step in the BGT migration widget. Each field is optional — missing fields fall back to the in-code defaults.
|
|
240
|
+
*/
|
|
241
|
+
interface BgtMigrationStep {
|
|
242
|
+
/**
|
|
243
|
+
* Label shown in the stepper sidebar.
|
|
244
|
+
*/
|
|
245
|
+
label?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Title shown at the top of the step card.
|
|
248
|
+
*/
|
|
249
|
+
title?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Informational text shown in a muted alert row inside the step card.
|
|
252
|
+
*/
|
|
253
|
+
alertText?: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* 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.
|
|
257
|
+
*/
|
|
258
|
+
interface BgtDerivative {
|
|
259
|
+
/**
|
|
260
|
+
* Token symbol shown in the UI (e.g. 'iBGT').
|
|
261
|
+
*/
|
|
262
|
+
symbol: string;
|
|
263
|
+
/**
|
|
264
|
+
* Human-readable token name (e.g. 'Infrared BGT').
|
|
265
|
+
*/
|
|
266
|
+
tokenName?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Human-readable source protocol (e.g. 'Infrared'), shown on the 'Unstake on {protocol}' link.
|
|
269
|
+
*/
|
|
270
|
+
protocol: string;
|
|
271
|
+
/**
|
|
272
|
+
* 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.
|
|
273
|
+
*/
|
|
274
|
+
tokenAddress: string;
|
|
275
|
+
/**
|
|
276
|
+
* The derivative's own single-asset staking contract; its staked balance surfaces an Unstake row. Omit when the derivative has no native staking.
|
|
277
|
+
*/
|
|
278
|
+
stakingContract?: string;
|
|
279
|
+
/**
|
|
280
|
+
* External page where the user unstakes this derivative from its own staking (Unstake step, derivative-staking rows).
|
|
281
|
+
*/
|
|
282
|
+
unstakeUrl: string;
|
|
283
|
+
/**
|
|
284
|
+
* External page where the user redeems this derivative for BERA (Redeem step). Falls back to `unstakeUrl` when omitted.
|
|
285
|
+
*/
|
|
286
|
+
redeemUrl?: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* 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.
|
|
290
|
+
*/
|
|
291
|
+
interface DerivativePool {
|
|
292
|
+
/**
|
|
293
|
+
* Pool display name (e.g. 'osBGT / sWBERA').
|
|
294
|
+
*/
|
|
295
|
+
name: string;
|
|
296
|
+
/**
|
|
297
|
+
* Pool protocol — determines the withdraw mechanism.
|
|
298
|
+
*/
|
|
299
|
+
protocol: "Kodiak" | "HUB";
|
|
300
|
+
/**
|
|
301
|
+
* Pool / LP-token address; the idle LP balance is read from here and liquidity is withdrawn from it.
|
|
302
|
+
*/
|
|
303
|
+
poolAddress: string;
|
|
304
|
+
/**
|
|
305
|
+
* Berachain Hub/Kodiak/Bera reward vault that stakes this pool's LP token. Omit when the pool has none.
|
|
306
|
+
*/
|
|
307
|
+
rewardVault?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Infrared vault that stakes this pool's LP token. Omit when the pool has none.
|
|
310
|
+
*/
|
|
311
|
+
infraredVault?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Infrared reward-vault page for `infraredVault` (Infrared uses slug URLs, not address-based). Falls back to the Infrared vaults list when omitted.
|
|
314
|
+
*/
|
|
315
|
+
infraredUrl?: string;
|
|
316
|
+
}
|
|
317
|
+
interface BannerItemV2 {
|
|
318
|
+
text: string;
|
|
319
|
+
className?: string;
|
|
320
|
+
linkClassName?: string;
|
|
321
|
+
enabled: DynamicEnabled;
|
|
322
|
+
href?: string;
|
|
323
|
+
icon?: "bend";
|
|
324
|
+
paths?: string[];
|
|
325
|
+
variant?: "info" | "warning" | "bend" | "honey" | "hub";
|
|
326
|
+
}
|
|
327
|
+
interface StandardBannerItem {
|
|
328
|
+
enabled: DynamicEnabled;
|
|
329
|
+
type: "rpc" | "bepolia" | "slow";
|
|
330
|
+
}
|
|
331
|
+
interface TokenItem {
|
|
332
|
+
address: Address;
|
|
333
|
+
decimals: number;
|
|
334
|
+
symbol: string;
|
|
335
|
+
name: string;
|
|
336
|
+
tags?: string[];
|
|
337
|
+
base64?: string;
|
|
338
|
+
logoURI?: string;
|
|
339
|
+
chainId?: number;
|
|
340
|
+
enabled: DynamicEnabled;
|
|
341
|
+
}
|
|
342
|
+
interface LstStakingVaultItem {
|
|
343
|
+
address: Address;
|
|
344
|
+
enabled: DynamicEnabled;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Checks if a dynamic feature flag is enabled based on the provided chain and environment.
|
|
349
|
+
*
|
|
350
|
+
* @param flag - The dynamic flag value, which can be a boolean or an object specifying conditions.
|
|
351
|
+
* @param options - Optional parameters to override the default chain and environment.
|
|
352
|
+
* @param options.chain - The chain ID to check against (defaults to current chainId).
|
|
353
|
+
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
354
|
+
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
355
|
+
*/
|
|
356
|
+
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
357
|
+
chain?: ChainId;
|
|
358
|
+
environment?: string;
|
|
359
|
+
app?: AppName$1;
|
|
360
|
+
}): boolean;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Safely retrieves all values from the Vercel Edge Config.
|
|
364
|
+
*
|
|
365
|
+
* @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
|
|
366
|
+
* @param options - Optional parameters.
|
|
367
|
+
* @param options.chain - The chain ID to check against (not currently used).
|
|
368
|
+
* @param options.environment - The environment to check against (not currently used).
|
|
369
|
+
* @param options.onError - Optional error handler callback.
|
|
370
|
+
* @returns A promise that resolves to the config object, or undefined if retrieval fails.
|
|
371
|
+
*/
|
|
372
|
+
declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
|
|
373
|
+
onError?: (error: unknown) => void;
|
|
374
|
+
}): Promise<T | undefined>;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Safely retrieves a value from the Vercel Edge Config by key.
|
|
378
|
+
*
|
|
379
|
+
* @template T - The key of the EdgeConfigSchema to retrieve.
|
|
380
|
+
* @param flagName - The name of the config flag to retrieve.
|
|
381
|
+
* @param options - Optional parameters.
|
|
382
|
+
* @param options.chain - The chain ID to check against (not currently used).
|
|
383
|
+
* @param options.environment - The environment to check against (not currently used).
|
|
384
|
+
* @param options.onError - Optional error handler callback.
|
|
385
|
+
* @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
|
|
386
|
+
*/
|
|
387
|
+
declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
|
|
388
|
+
chain?: ChainId;
|
|
389
|
+
environment?: string;
|
|
390
|
+
onError?: (error: unknown) => void;
|
|
391
|
+
}): Promise<EdgeConfigSchema[T] | undefined>;
|
|
392
|
+
|
|
393
|
+
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 };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as flags_next from 'flags/next';
|
|
2
|
+
|
|
3
|
+
declare const isGovernanceEnabled: flags_next.Flag<boolean, any>;
|
|
4
|
+
declare const hideStakeForSingleHolderVaults: flags_next.Flag<boolean, any>;
|
|
5
|
+
declare const enableSimulateCalls: flags_next.Flag<boolean, any>;
|
|
6
|
+
declare const enableBexFundsRecovery: flags_next.Flag<boolean, any>;
|
|
7
|
+
declare const isRefundInExplorer: flags_next.Flag<boolean, any>;
|
|
8
|
+
declare const isAirdropLive: flags_next.Flag<boolean, any>;
|
|
9
|
+
declare const isEmbeddedWalletsEnabled: flags_next.Flag<boolean, any>;
|
|
10
|
+
declare const sponsorGas: flags_next.Flag<boolean, any>;
|
|
11
|
+
/**
|
|
12
|
+
* If false, EIP-5792 will be disabled.
|
|
13
|
+
* This is useful for testing purposes.
|
|
14
|
+
*/
|
|
15
|
+
declare const enableEip5792: flags_next.Flag<boolean, any>;
|
|
16
|
+
declare const proxyAggregatorsThroughVercel: flags_next.Flag<boolean, any>;
|
|
17
|
+
declare const isDefaultStakingPoolEnabled: flags_next.Flag<boolean, any>;
|
|
18
|
+
declare const isBendVaultDataHourly: flags_next.Flag<boolean, any>;
|
|
19
|
+
declare const showBendVaultCap: flags_next.Flag<boolean, any>;
|
|
20
|
+
declare const isHoneyPythWrapperEnabled: flags_next.Flag<boolean, any>;
|
|
21
|
+
declare const isBendNew: flags_next.Flag<boolean, any>;
|
|
22
|
+
declare const isPoolsMerged: flags_next.Flag<boolean, any>;
|
|
23
|
+
declare const isBendLoopingEnabled: flags_next.Flag<boolean, any>;
|
|
24
|
+
declare const isMultiChainZapBendEnabled: flags_next.Flag<boolean, any>;
|
|
25
|
+
declare const isZapStakeBeraEnabled: flags_next.Flag<boolean, any>;
|
|
26
|
+
declare const isBgtPolRewardToken: flags_next.Flag<boolean, any>;
|
|
27
|
+
declare const mockValidatorOperator: flags_next.Flag<boolean, any>;
|
|
28
|
+
declare const mockValidatorRewardAllocator: flags_next.Flag<boolean, any>;
|
|
29
|
+
declare const mockRewardDurationManager: flags_next.Flag<boolean, any>;
|
|
30
|
+
declare const mockIncentiveManager: flags_next.Flag<boolean, any>;
|
|
31
|
+
|
|
32
|
+
declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
|
|
33
|
+
declare const flags_enableEip5792: typeof enableEip5792;
|
|
34
|
+
declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
|
|
35
|
+
declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
|
|
36
|
+
declare const flags_isAirdropLive: typeof isAirdropLive;
|
|
37
|
+
declare const flags_isBendLoopingEnabled: typeof isBendLoopingEnabled;
|
|
38
|
+
declare const flags_isBendNew: typeof isBendNew;
|
|
39
|
+
declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
|
|
40
|
+
declare const flags_isBgtPolRewardToken: typeof isBgtPolRewardToken;
|
|
41
|
+
declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
|
|
42
|
+
declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
|
|
43
|
+
declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
|
|
44
|
+
declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
|
|
45
|
+
declare const flags_isMultiChainZapBendEnabled: typeof isMultiChainZapBendEnabled;
|
|
46
|
+
declare const flags_isPoolsMerged: typeof isPoolsMerged;
|
|
47
|
+
declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
|
|
48
|
+
declare const flags_isZapStakeBeraEnabled: typeof isZapStakeBeraEnabled;
|
|
49
|
+
declare const flags_mockIncentiveManager: typeof mockIncentiveManager;
|
|
50
|
+
declare const flags_mockRewardDurationManager: typeof mockRewardDurationManager;
|
|
51
|
+
declare const flags_mockValidatorOperator: typeof mockValidatorOperator;
|
|
52
|
+
declare const flags_mockValidatorRewardAllocator: typeof mockValidatorRewardAllocator;
|
|
53
|
+
declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
|
|
54
|
+
declare const flags_showBendVaultCap: typeof showBendVaultCap;
|
|
55
|
+
declare const flags_sponsorGas: typeof sponsorGas;
|
|
56
|
+
declare namespace flags {
|
|
57
|
+
export { flags_enableBexFundsRecovery as enableBexFundsRecovery, flags_enableEip5792 as enableEip5792, flags_enableSimulateCalls as enableSimulateCalls, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults, flags_isAirdropLive as isAirdropLive, flags_isBendLoopingEnabled as isBendLoopingEnabled, flags_isBendNew as isBendNew, flags_isBendVaultDataHourly as isBendVaultDataHourly, flags_isBgtPolRewardToken as isBgtPolRewardToken, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isEmbeddedWalletsEnabled as isEmbeddedWalletsEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isHoneyPythWrapperEnabled as isHoneyPythWrapperEnabled, flags_isMultiChainZapBendEnabled as isMultiChainZapBendEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_isZapStakeBeraEnabled as isZapStakeBeraEnabled, flags_mockIncentiveManager as mockIncentiveManager, flags_mockRewardDurationManager as mockRewardDurationManager, flags_mockValidatorOperator as mockValidatorOperator, flags_mockValidatorRewardAllocator as mockValidatorRewardAllocator, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel, flags_showBendVaultCap as showBendVaultCap, flags_sponsorGas as sponsorGas };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { flags };
|
|
@@ -1,2 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as flags_next from 'flags/next';
|
|
2
|
+
|
|
3
|
+
declare const isGovernanceEnabled: flags_next.Flag<boolean, any>;
|
|
4
|
+
declare const hideStakeForSingleHolderVaults: flags_next.Flag<boolean, any>;
|
|
5
|
+
declare const enableSimulateCalls: flags_next.Flag<boolean, any>;
|
|
6
|
+
declare const enableBexFundsRecovery: flags_next.Flag<boolean, any>;
|
|
7
|
+
declare const isRefundInExplorer: flags_next.Flag<boolean, any>;
|
|
8
|
+
declare const isAirdropLive: flags_next.Flag<boolean, any>;
|
|
9
|
+
declare const isEmbeddedWalletsEnabled: flags_next.Flag<boolean, any>;
|
|
10
|
+
declare const sponsorGas: flags_next.Flag<boolean, any>;
|
|
11
|
+
/**
|
|
12
|
+
* If false, EIP-5792 will be disabled.
|
|
13
|
+
* This is useful for testing purposes.
|
|
14
|
+
*/
|
|
15
|
+
declare const enableEip5792: flags_next.Flag<boolean, any>;
|
|
16
|
+
declare const proxyAggregatorsThroughVercel: flags_next.Flag<boolean, any>;
|
|
17
|
+
declare const isDefaultStakingPoolEnabled: flags_next.Flag<boolean, any>;
|
|
18
|
+
declare const isBendVaultDataHourly: flags_next.Flag<boolean, any>;
|
|
19
|
+
declare const showBendVaultCap: flags_next.Flag<boolean, any>;
|
|
20
|
+
declare const isHoneyPythWrapperEnabled: flags_next.Flag<boolean, any>;
|
|
21
|
+
declare const isBendNew: flags_next.Flag<boolean, any>;
|
|
22
|
+
declare const isPoolsMerged: flags_next.Flag<boolean, any>;
|
|
23
|
+
declare const isBendLoopingEnabled: flags_next.Flag<boolean, any>;
|
|
24
|
+
declare const isMultiChainZapBendEnabled: flags_next.Flag<boolean, any>;
|
|
25
|
+
declare const isZapStakeBeraEnabled: flags_next.Flag<boolean, any>;
|
|
26
|
+
declare const isBgtPolRewardToken: flags_next.Flag<boolean, any>;
|
|
27
|
+
declare const mockValidatorOperator: flags_next.Flag<boolean, any>;
|
|
28
|
+
declare const mockValidatorRewardAllocator: flags_next.Flag<boolean, any>;
|
|
29
|
+
declare const mockRewardDurationManager: flags_next.Flag<boolean, any>;
|
|
30
|
+
declare const mockIncentiveManager: flags_next.Flag<boolean, any>;
|
|
31
|
+
|
|
32
|
+
declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
|
|
33
|
+
declare const flags_enableEip5792: typeof enableEip5792;
|
|
34
|
+
declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
|
|
35
|
+
declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
|
|
36
|
+
declare const flags_isAirdropLive: typeof isAirdropLive;
|
|
37
|
+
declare const flags_isBendLoopingEnabled: typeof isBendLoopingEnabled;
|
|
38
|
+
declare const flags_isBendNew: typeof isBendNew;
|
|
39
|
+
declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
|
|
40
|
+
declare const flags_isBgtPolRewardToken: typeof isBgtPolRewardToken;
|
|
41
|
+
declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
|
|
42
|
+
declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
|
|
43
|
+
declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
|
|
44
|
+
declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
|
|
45
|
+
declare const flags_isMultiChainZapBendEnabled: typeof isMultiChainZapBendEnabled;
|
|
46
|
+
declare const flags_isPoolsMerged: typeof isPoolsMerged;
|
|
47
|
+
declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
|
|
48
|
+
declare const flags_isZapStakeBeraEnabled: typeof isZapStakeBeraEnabled;
|
|
49
|
+
declare const flags_mockIncentiveManager: typeof mockIncentiveManager;
|
|
50
|
+
declare const flags_mockRewardDurationManager: typeof mockRewardDurationManager;
|
|
51
|
+
declare const flags_mockValidatorOperator: typeof mockValidatorOperator;
|
|
52
|
+
declare const flags_mockValidatorRewardAllocator: typeof mockValidatorRewardAllocator;
|
|
53
|
+
declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
|
|
54
|
+
declare const flags_showBendVaultCap: typeof showBendVaultCap;
|
|
55
|
+
declare const flags_sponsorGas: typeof sponsorGas;
|
|
56
|
+
declare namespace flags {
|
|
57
|
+
export { flags_enableBexFundsRecovery as enableBexFundsRecovery, flags_enableEip5792 as enableEip5792, flags_enableSimulateCalls as enableSimulateCalls, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults, flags_isAirdropLive as isAirdropLive, flags_isBendLoopingEnabled as isBendLoopingEnabled, flags_isBendNew as isBendNew, flags_isBendVaultDataHourly as isBendVaultDataHourly, flags_isBgtPolRewardToken as isBgtPolRewardToken, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isEmbeddedWalletsEnabled as isEmbeddedWalletsEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isHoneyPythWrapperEnabled as isHoneyPythWrapperEnabled, flags_isMultiChainZapBendEnabled as isMultiChainZapBendEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_isZapStakeBeraEnabled as isZapStakeBeraEnabled, flags_mockIncentiveManager as mockIncentiveManager, flags_mockRewardDurationManager as mockRewardDurationManager, flags_mockValidatorOperator as mockValidatorOperator, flags_mockValidatorRewardAllocator as mockValidatorRewardAllocator, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel, flags_showBendVaultCap as showBendVaultCap, flags_sponsorGas as sponsorGas };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { flags };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
declare function getContentSecurityPolicy({ isDevelopment, nonce, cspReporting, ...args }: {
|
|
4
|
+
isDevelopment: boolean;
|
|
5
|
+
nonce: string;
|
|
6
|
+
frameSources?: string[];
|
|
7
|
+
fontSources?: string[];
|
|
8
|
+
pictureSources?: string[];
|
|
9
|
+
connectionSources?: string[];
|
|
10
|
+
styleSources?: string[];
|
|
11
|
+
cspReporting?: string;
|
|
12
|
+
}): string;
|
|
13
|
+
/**
|
|
14
|
+
* Static picture sources that are used in static-monobera.
|
|
15
|
+
*/
|
|
16
|
+
declare const staticPictureSources: string[];
|
|
17
|
+
declare function cspMiddleware({ response, }: {
|
|
18
|
+
request: NextRequest;
|
|
19
|
+
response: NextResponse;
|
|
20
|
+
}): NextResponse<unknown>;
|
|
21
|
+
|
|
22
|
+
export { cspMiddleware, getContentSecurityPolicy, staticPictureSources };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
declare function getContentSecurityPolicy({ isDevelopment, nonce, cspReporting, ...args }: {
|
|
3
4
|
isDevelopment: boolean;
|
|
4
5
|
nonce: string;
|
|
5
6
|
frameSources?: string[];
|
|
@@ -12,9 +13,10 @@ export declare function getContentSecurityPolicy({ isDevelopment, nonce, cspRepo
|
|
|
12
13
|
/**
|
|
13
14
|
* Static picture sources that are used in static-monobera.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
declare const staticPictureSources: string[];
|
|
17
|
+
declare function cspMiddleware({ response, }: {
|
|
17
18
|
request: NextRequest;
|
|
18
19
|
response: NextResponse;
|
|
19
20
|
}): NextResponse<unknown>;
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
export { cspMiddleware, getContentSecurityPolicy, staticPictureSources };
|