@berachain/config 0.0.3-beta.8 → 0.0.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/bepolia.cjs +1 -1
- package/dist/bepolia.d.cts +29 -10
- package/dist/bepolia.d.ts +29 -10
- package/dist/bepolia.mjs +1 -0
- package/dist/chunk-2OLL4MUY.cjs +1 -0
- package/dist/chunk-3LFM4QG6.cjs +1 -0
- package/dist/chunk-5Q5FZIMO.cjs +2 -0
- package/dist/chunk-6CMG5CBG.cjs +1 -0
- package/dist/chunk-BQFHWAJZ.mjs +1 -0
- package/dist/chunk-CENF5RZA.mjs +1 -0
- package/dist/chunk-CM7FGHYU.mjs +2 -0
- package/dist/chunk-D2FG64PF.mjs +1 -0
- package/dist/chunk-DMFHUBNY.cjs +1 -0
- package/dist/chunk-FFCLEC63.mjs +1 -0
- package/dist/chunk-G2LROWQ2.mjs +1 -0
- package/dist/chunk-G3P5QJ2Y.cjs +1 -0
- package/dist/chunk-IV4GOAZB.cjs +1 -0
- package/dist/chunk-JVJKB7V7.mjs +1 -0
- package/dist/chunk-LJCOMNTL.cjs +1 -0
- package/dist/chunk-MS6UGFXI.mjs +1 -0
- package/dist/chunk-OQFLFE3X.cjs +1 -0
- package/dist/chunk-XTBMK2TL.mjs +1 -0
- package/dist/chunk-YUUHPTW6.mjs +1 -0
- package/dist/chunk-ZYHYMHGN.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +35 -7
- package/dist/index.d.ts +35 -7
- package/dist/index.mjs +1 -0
- package/dist/internal/edge-config/index.cjs +1 -1
- package/dist/internal/edge-config/index.d.cts +81 -28
- package/dist/internal/edge-config/index.d.ts +81 -28
- package/dist/internal/edge-config/index.mjs +1 -0
- package/dist/internal/flags/index.cjs +1 -1
- package/dist/internal/flags/index.d.cts +17 -7
- package/dist/internal/flags/index.d.ts +17 -7
- package/dist/internal/flags/index.mjs +1 -0
- package/dist/internal/header-sources.cjs +11 -8
- package/dist/internal/header-sources.d.cts +9 -2
- package/dist/internal/header-sources.d.ts +9 -2
- package/dist/internal/header-sources.mjs +16 -0
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +206 -69
- package/dist/internal/index.d.ts +206 -69
- package/dist/internal/index.mjs +1 -0
- package/dist/internal/maintenance.cjs +1 -1
- package/dist/internal/maintenance.mjs +1 -0
- package/dist/internal/nextjs/index.cjs +1 -1
- package/dist/internal/nextjs/index.d.cts +21 -1
- package/dist/internal/nextjs/index.d.ts +21 -1
- package/dist/internal/nextjs/index.mjs +1 -0
- package/dist/internal/nextjs/utils/index.cjs +1 -0
- package/dist/internal/nextjs/utils/index.d.cts +9 -0
- package/dist/internal/nextjs/utils/index.d.ts +9 -0
- package/dist/internal/nextjs/utils/index.mjs +1 -0
- package/dist/internal/sentry/index.cjs +1 -1
- package/dist/internal/sentry/index.d.cts +4 -2
- package/dist/internal/sentry/index.d.ts +4 -2
- package/dist/internal/sentry/index.mjs +1 -0
- package/dist/internal/sentry/sentry.client.config.cjs +1 -1
- package/dist/internal/sentry/sentry.client.config.d.cts +5 -1
- package/dist/internal/sentry/sentry.client.config.d.ts +5 -1
- package/dist/internal/sentry/sentry.client.config.mjs +1 -0
- package/dist/internal/tailwind/index.cjs +1 -1
- package/dist/internal/tailwind/index.d.cts +3 -3
- package/dist/internal/tailwind/index.d.ts +3 -3
- package/dist/internal/tailwind/index.mjs +1 -0
- package/dist/internal/tsup/index.cjs +1 -1
- package/dist/internal/tsup/index.mjs +1 -0
- package/dist/mainnet.cjs +1 -1
- package/dist/mainnet.d.cts +29 -10
- package/dist/mainnet.d.ts +29 -10
- package/dist/mainnet.mjs +1 -0
- package/dist/sentry.edge.config-M3L3XSD6.cjs +1 -0
- package/dist/sentry.edge.config-XKXCGZO7.mjs +1 -0
- package/dist/sentry.server.config-535N36OR.cjs +1 -0
- package/dist/sentry.server.config-HGGCJWT2.mjs +1 -0
- package/package.json +29 -26
- package/dist/bepolia.js +0 -1
- package/dist/chunk-3IPYHDYK.cjs +0 -1
- package/dist/chunk-4XX7D27F.cjs +0 -1
- package/dist/chunk-4ZZXDAVS.js +0 -1
- package/dist/chunk-6RLCJYH2.cjs +0 -1
- package/dist/chunk-BGHO3T7U.js +0 -1
- package/dist/chunk-BJUR72F2.js +0 -1
- package/dist/chunk-BLIYP7AF.cjs +0 -1
- package/dist/chunk-DC57JNAC.js +0 -1
- package/dist/chunk-E3O7UH5M.js +0 -1
- package/dist/chunk-EG5OHLHP.js +0 -1
- package/dist/chunk-GTGNP2XV.cjs +0 -1
- package/dist/chunk-HC2ORLQ3.cjs +0 -1
- package/dist/chunk-HNEK54FE.cjs +0 -2
- package/dist/chunk-K62SDMWX.cjs +0 -1
- package/dist/chunk-NDMUG2ND.js +0 -2
- package/dist/chunk-RS6KOT3C.js +0 -1
- package/dist/chunk-WL6PVJKK.js +0 -1
- package/dist/chunk-X73HWW5T.cjs +0 -1
- package/dist/index.js +0 -1
- package/dist/internal/edge-config/index.js +0 -1
- package/dist/internal/flags/index.js +0 -1
- package/dist/internal/header-sources.js +0 -13
- package/dist/internal/index.js +0 -1
- package/dist/internal/maintenance.js +0 -1
- package/dist/internal/nextjs/index.js +0 -1
- package/dist/internal/sentry/esbuild.plugin.cjs +0 -1
- package/dist/internal/sentry/esbuild.plugin.d.cts +0 -3
- package/dist/internal/sentry/esbuild.plugin.d.ts +0 -3
- package/dist/internal/sentry/esbuild.plugin.js +0 -1
- package/dist/internal/sentry/index.js +0 -1
- package/dist/internal/sentry/sentry.client.config.js +0 -1
- package/dist/internal/tailwind/index.js +0 -1
- package/dist/internal/tsup/index.js +0 -1
- package/dist/mainnet.js +0 -1
- package/dist/sentry.edge.config-UQQHM7RP.cjs +0 -1
- package/dist/sentry.edge.config-V6Q3YAS2.js +0 -1
- package/dist/sentry.server.config-45GGQXOQ.js +0 -1
- package/dist/sentry.server.config-7JEUQ6QA.cjs +0 -1
- /package/dist/{chunk-WOT6VMZA.js → chunk-JZXLCA2E.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '../../index.cjs';
|
|
1
|
+
import { ChainId, AppName as AppName$1 } from '../../index.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -13,18 +13,44 @@ type DynamicEnabled = boolean | {
|
|
|
13
13
|
* @minItems 1
|
|
14
14
|
*/
|
|
15
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;
|
|
16
24
|
condition?: "AND" | "OR";
|
|
17
|
-
[k: string]: unknown;
|
|
18
25
|
};
|
|
26
|
+
type AppName = "BeraHub" | "Honey" | "Bend";
|
|
19
27
|
type Address = string;
|
|
28
|
+
type MixedBannerItem = BannerItemV2 | StandardBannerItem;
|
|
20
29
|
/**
|
|
21
30
|
* Edge config schema. Please update this in the @berachain/config package first and keep it stored there.
|
|
22
31
|
*/
|
|
23
32
|
interface EdgeConfigSchema {
|
|
24
|
-
flags
|
|
33
|
+
flags: {
|
|
25
34
|
[k: string]: DynamicEnabled;
|
|
26
35
|
};
|
|
27
|
-
|
|
36
|
+
bex?: {
|
|
37
|
+
/**
|
|
38
|
+
* Labels for the emergency messages and banners. (e.g. pool or vaults are paused)
|
|
39
|
+
*/
|
|
40
|
+
emergencyLabels?: {
|
|
41
|
+
/**
|
|
42
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
43
|
+
* via the `patternProperty` "^(vaultPaused|poolRecovery|poolPaused|poolInRecoveryMode|poolPausedAndInRecoveryMode)$".
|
|
44
|
+
*/
|
|
45
|
+
[k: string]: {
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
banner?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
pol: {
|
|
28
54
|
/**
|
|
29
55
|
* @minItems 2
|
|
30
56
|
*/
|
|
@@ -49,7 +75,7 @@ interface EdgeConfigSchema {
|
|
|
49
75
|
*/
|
|
50
76
|
swberaAprWindow?: "DAY" | "WEEK";
|
|
51
77
|
};
|
|
52
|
-
dex
|
|
78
|
+
dex: {
|
|
53
79
|
/**
|
|
54
80
|
* 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.
|
|
55
81
|
*/
|
|
@@ -57,9 +83,22 @@ interface EdgeConfigSchema {
|
|
|
57
83
|
[k: string]: DynamicEnabled;
|
|
58
84
|
};
|
|
59
85
|
};
|
|
60
|
-
|
|
61
|
-
|
|
86
|
+
honey: {
|
|
87
|
+
/**
|
|
88
|
+
* Object containing the collateral order for mainnet & bepolia.
|
|
89
|
+
*/
|
|
90
|
+
preferredCollateralOrder?: {
|
|
91
|
+
mainnet: {
|
|
92
|
+
address: Address;
|
|
93
|
+
_label?: string;
|
|
94
|
+
}[];
|
|
95
|
+
bepolia: {
|
|
96
|
+
address: Address;
|
|
97
|
+
_label?: string;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
62
100
|
};
|
|
101
|
+
bannersV2: MixedBannerItem[];
|
|
63
102
|
maintenance?: {
|
|
64
103
|
/**
|
|
65
104
|
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
@@ -70,20 +109,33 @@ interface EdgeConfigSchema {
|
|
|
70
109
|
[k: string]: unknown;
|
|
71
110
|
};
|
|
72
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* The list of external chains that are approved for multi chain zapping.
|
|
114
|
+
*/
|
|
115
|
+
externalChainList: {
|
|
116
|
+
chainId: number;
|
|
117
|
+
_name?: string;
|
|
118
|
+
enabled: DynamicEnabled;
|
|
119
|
+
}[];
|
|
73
120
|
}
|
|
74
121
|
interface VaultItem {
|
|
75
122
|
address: Address;
|
|
76
123
|
enabled: DynamicEnabled;
|
|
77
124
|
_name?: string;
|
|
78
125
|
}
|
|
79
|
-
|
|
80
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
81
|
-
* via the `patternProperty` "^(hub|honey|bridge|boyco)$".
|
|
82
|
-
*/
|
|
83
|
-
interface BannerItem {
|
|
126
|
+
interface BannerItemV2 {
|
|
84
127
|
text: string;
|
|
85
|
-
className
|
|
128
|
+
className?: string;
|
|
129
|
+
linkClassName?: string;
|
|
130
|
+
enabled: DynamicEnabled;
|
|
131
|
+
href?: string;
|
|
132
|
+
icon?: "bend";
|
|
133
|
+
paths?: string[];
|
|
134
|
+
variant?: "info" | "warning" | "bend" | "honey" | "hub";
|
|
135
|
+
}
|
|
136
|
+
interface StandardBannerItem {
|
|
86
137
|
enabled: DynamicEnabled;
|
|
138
|
+
type: "rpc" | "bepolia" | "slow";
|
|
87
139
|
}
|
|
88
140
|
|
|
89
141
|
/**
|
|
@@ -95,40 +147,41 @@ interface BannerItem {
|
|
|
95
147
|
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
96
148
|
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
97
149
|
*/
|
|
98
|
-
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, }?: {
|
|
150
|
+
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
99
151
|
chain?: ChainId;
|
|
100
152
|
environment?: string;
|
|
153
|
+
app?: AppName$1;
|
|
101
154
|
}): boolean;
|
|
102
155
|
|
|
103
156
|
/**
|
|
104
|
-
* Safely retrieves
|
|
157
|
+
* Safely retrieves all values from the Vercel Edge Config.
|
|
105
158
|
*
|
|
106
|
-
* @template T - The
|
|
107
|
-
* @param flagName - The name of the config flag to retrieve.
|
|
159
|
+
* @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
|
|
108
160
|
* @param options - Optional parameters.
|
|
109
161
|
* @param options.chain - The chain ID to check against (not currently used).
|
|
110
162
|
* @param options.environment - The environment to check against (not currently used).
|
|
111
163
|
* @param options.onError - Optional error handler callback.
|
|
112
|
-
* @returns A promise that resolves to the
|
|
164
|
+
* @returns A promise that resolves to the config object, or undefined if retrieval fails.
|
|
113
165
|
*/
|
|
114
|
-
declare function
|
|
115
|
-
chain?: ChainId;
|
|
116
|
-
environment?: string;
|
|
166
|
+
declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
|
|
117
167
|
onError?: (error: unknown) => void;
|
|
118
|
-
}): Promise<
|
|
168
|
+
}): Promise<T | undefined>;
|
|
119
169
|
|
|
120
170
|
/**
|
|
121
|
-
* Safely retrieves
|
|
171
|
+
* Safely retrieves a value from the Vercel Edge Config by key.
|
|
122
172
|
*
|
|
123
|
-
* @template T - The
|
|
173
|
+
* @template T - The key of the EdgeConfigSchema to retrieve.
|
|
174
|
+
* @param flagName - The name of the config flag to retrieve.
|
|
124
175
|
* @param options - Optional parameters.
|
|
125
176
|
* @param options.chain - The chain ID to check against (not currently used).
|
|
126
177
|
* @param options.environment - The environment to check against (not currently used).
|
|
127
178
|
* @param options.onError - Optional error handler callback.
|
|
128
|
-
* @returns A promise that resolves to the config
|
|
179
|
+
* @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
|
|
129
180
|
*/
|
|
130
|
-
declare function
|
|
181
|
+
declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
|
|
182
|
+
chain?: ChainId;
|
|
183
|
+
environment?: string;
|
|
131
184
|
onError?: (error: unknown) => void;
|
|
132
|
-
}): Promise<T | undefined>;
|
|
185
|
+
}): Promise<EdgeConfigSchema[T] | undefined>;
|
|
133
186
|
|
|
134
|
-
export { type Address, type
|
|
187
|
+
export { type Address, type AppName, type BannerItemV2, type DynamicEnabled, type EdgeConfigSchema, type MixedBannerItem, type StandardBannerItem, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '../../index.js';
|
|
1
|
+
import { ChainId, AppName as AppName$1 } from '../../index.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -13,18 +13,44 @@ type DynamicEnabled = boolean | {
|
|
|
13
13
|
* @minItems 1
|
|
14
14
|
*/
|
|
15
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;
|
|
16
24
|
condition?: "AND" | "OR";
|
|
17
|
-
[k: string]: unknown;
|
|
18
25
|
};
|
|
26
|
+
type AppName = "BeraHub" | "Honey" | "Bend";
|
|
19
27
|
type Address = string;
|
|
28
|
+
type MixedBannerItem = BannerItemV2 | StandardBannerItem;
|
|
20
29
|
/**
|
|
21
30
|
* Edge config schema. Please update this in the @berachain/config package first and keep it stored there.
|
|
22
31
|
*/
|
|
23
32
|
interface EdgeConfigSchema {
|
|
24
|
-
flags
|
|
33
|
+
flags: {
|
|
25
34
|
[k: string]: DynamicEnabled;
|
|
26
35
|
};
|
|
27
|
-
|
|
36
|
+
bex?: {
|
|
37
|
+
/**
|
|
38
|
+
* Labels for the emergency messages and banners. (e.g. pool or vaults are paused)
|
|
39
|
+
*/
|
|
40
|
+
emergencyLabels?: {
|
|
41
|
+
/**
|
|
42
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
43
|
+
* via the `patternProperty` "^(vaultPaused|poolRecovery|poolPaused|poolInRecoveryMode|poolPausedAndInRecoveryMode)$".
|
|
44
|
+
*/
|
|
45
|
+
[k: string]: {
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
banner?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
pol: {
|
|
28
54
|
/**
|
|
29
55
|
* @minItems 2
|
|
30
56
|
*/
|
|
@@ -49,7 +75,7 @@ interface EdgeConfigSchema {
|
|
|
49
75
|
*/
|
|
50
76
|
swberaAprWindow?: "DAY" | "WEEK";
|
|
51
77
|
};
|
|
52
|
-
dex
|
|
78
|
+
dex: {
|
|
53
79
|
/**
|
|
54
80
|
* 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.
|
|
55
81
|
*/
|
|
@@ -57,9 +83,22 @@ interface EdgeConfigSchema {
|
|
|
57
83
|
[k: string]: DynamicEnabled;
|
|
58
84
|
};
|
|
59
85
|
};
|
|
60
|
-
|
|
61
|
-
|
|
86
|
+
honey: {
|
|
87
|
+
/**
|
|
88
|
+
* Object containing the collateral order for mainnet & bepolia.
|
|
89
|
+
*/
|
|
90
|
+
preferredCollateralOrder?: {
|
|
91
|
+
mainnet: {
|
|
92
|
+
address: Address;
|
|
93
|
+
_label?: string;
|
|
94
|
+
}[];
|
|
95
|
+
bepolia: {
|
|
96
|
+
address: Address;
|
|
97
|
+
_label?: string;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
62
100
|
};
|
|
101
|
+
bannersV2: MixedBannerItem[];
|
|
63
102
|
maintenance?: {
|
|
64
103
|
/**
|
|
65
104
|
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
@@ -70,20 +109,33 @@ interface EdgeConfigSchema {
|
|
|
70
109
|
[k: string]: unknown;
|
|
71
110
|
};
|
|
72
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* The list of external chains that are approved for multi chain zapping.
|
|
114
|
+
*/
|
|
115
|
+
externalChainList: {
|
|
116
|
+
chainId: number;
|
|
117
|
+
_name?: string;
|
|
118
|
+
enabled: DynamicEnabled;
|
|
119
|
+
}[];
|
|
73
120
|
}
|
|
74
121
|
interface VaultItem {
|
|
75
122
|
address: Address;
|
|
76
123
|
enabled: DynamicEnabled;
|
|
77
124
|
_name?: string;
|
|
78
125
|
}
|
|
79
|
-
|
|
80
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
81
|
-
* via the `patternProperty` "^(hub|honey|bridge|boyco)$".
|
|
82
|
-
*/
|
|
83
|
-
interface BannerItem {
|
|
126
|
+
interface BannerItemV2 {
|
|
84
127
|
text: string;
|
|
85
|
-
className
|
|
128
|
+
className?: string;
|
|
129
|
+
linkClassName?: string;
|
|
130
|
+
enabled: DynamicEnabled;
|
|
131
|
+
href?: string;
|
|
132
|
+
icon?: "bend";
|
|
133
|
+
paths?: string[];
|
|
134
|
+
variant?: "info" | "warning" | "bend" | "honey" | "hub";
|
|
135
|
+
}
|
|
136
|
+
interface StandardBannerItem {
|
|
86
137
|
enabled: DynamicEnabled;
|
|
138
|
+
type: "rpc" | "bepolia" | "slow";
|
|
87
139
|
}
|
|
88
140
|
|
|
89
141
|
/**
|
|
@@ -95,40 +147,41 @@ interface BannerItem {
|
|
|
95
147
|
* @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
|
|
96
148
|
* @returns True if the flag is enabled for the given chain and environment, false otherwise.
|
|
97
149
|
*/
|
|
98
|
-
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, }?: {
|
|
150
|
+
declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
|
|
99
151
|
chain?: ChainId;
|
|
100
152
|
environment?: string;
|
|
153
|
+
app?: AppName$1;
|
|
101
154
|
}): boolean;
|
|
102
155
|
|
|
103
156
|
/**
|
|
104
|
-
* Safely retrieves
|
|
157
|
+
* Safely retrieves all values from the Vercel Edge Config.
|
|
105
158
|
*
|
|
106
|
-
* @template T - The
|
|
107
|
-
* @param flagName - The name of the config flag to retrieve.
|
|
159
|
+
* @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
|
|
108
160
|
* @param options - Optional parameters.
|
|
109
161
|
* @param options.chain - The chain ID to check against (not currently used).
|
|
110
162
|
* @param options.environment - The environment to check against (not currently used).
|
|
111
163
|
* @param options.onError - Optional error handler callback.
|
|
112
|
-
* @returns A promise that resolves to the
|
|
164
|
+
* @returns A promise that resolves to the config object, or undefined if retrieval fails.
|
|
113
165
|
*/
|
|
114
|
-
declare function
|
|
115
|
-
chain?: ChainId;
|
|
116
|
-
environment?: string;
|
|
166
|
+
declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
|
|
117
167
|
onError?: (error: unknown) => void;
|
|
118
|
-
}): Promise<
|
|
168
|
+
}): Promise<T | undefined>;
|
|
119
169
|
|
|
120
170
|
/**
|
|
121
|
-
* Safely retrieves
|
|
171
|
+
* Safely retrieves a value from the Vercel Edge Config by key.
|
|
122
172
|
*
|
|
123
|
-
* @template T - The
|
|
173
|
+
* @template T - The key of the EdgeConfigSchema to retrieve.
|
|
174
|
+
* @param flagName - The name of the config flag to retrieve.
|
|
124
175
|
* @param options - Optional parameters.
|
|
125
176
|
* @param options.chain - The chain ID to check against (not currently used).
|
|
126
177
|
* @param options.environment - The environment to check against (not currently used).
|
|
127
178
|
* @param options.onError - Optional error handler callback.
|
|
128
|
-
* @returns A promise that resolves to the config
|
|
179
|
+
* @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
|
|
129
180
|
*/
|
|
130
|
-
declare function
|
|
181
|
+
declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
|
|
182
|
+
chain?: ChainId;
|
|
183
|
+
environment?: string;
|
|
131
184
|
onError?: (error: unknown) => void;
|
|
132
|
-
}): Promise<T | undefined>;
|
|
185
|
+
}): Promise<EdgeConfigSchema[T] | undefined>;
|
|
133
186
|
|
|
134
|
-
export { type Address, type
|
|
187
|
+
export { type Address, type AppName, type BannerItemV2, type DynamicEnabled, type EdgeConfigSchema, type MixedBannerItem, type StandardBannerItem, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"../../chunk-D2FG64PF.mjs";import"../../chunk-CM7FGHYU.mjs";import"../../chunk-MS6UGFXI.mjs";import"../../chunk-JZXLCA2E.mjs";import{getAll as n}from"@vercel/edge-config";async function d({onError:e}={}){try{return await n()}catch(o){e?.(o);return}}import{get as t}from"@vercel/edge-config";async function a(e,{onError:o}={}){try{return await t(e)}catch(r){o?.(r);return}}export{i as isFlagEnabled,d as safeGetAll,a as safeGetConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDMFHUBNYcjs = require('../../chunk-DMFHUBNY.cjs');require('../../chunk-5Q5FZIMO.cjs');require('../../chunk-2OLL4MUY.cjs');var _chunk4VDLQK6Fcjs = require('../../chunk-4VDLQK6F.cjs');var r={};_chunk4VDLQK6Fcjs.a.call(void 0, r,{enableBexFundsRecovery:()=>c,enableEip5792:()=>g,enableSimulateCalls:()=>u,hideStakeForSingleHolderVaults:()=>p,isBendNew:()=>x,isBendVaultDataHourly:()=>m,isDefaultStakingPoolEnabled:()=>E,isEmbeddedWalletsEnabled:()=>b,isGovernanceEnabled:()=>s,isHoneyPythWrapperEnabled:()=>h,isPoolsMerged:()=>V,isRefundInExplorer:()=>f,proxyAggregatorsThroughVercel:()=>y});var _next = require('flags/next');var _edgeconfig = require('@flags-sdk/edge-config');function e(){let o=_edgeconfig.edgeConfigAdapter.call(void 0, );return{...o,async decide(l){let n=await o.decide(l);return _chunkDMFHUBNYcjs.a.call(void 0, n)}}}var s=_next.flag.call(void 0, {key:"isGovernanceEnabled",description:"Enable Governance proposals",defaultValue:!0,adapter:e()}),p=_next.flag.call(void 0, {key:"hideStakeForSingleHolderVaults",description:"Hide stake for single holder vaults",defaultValue:!0,adapter:e()}),u=_next.flag.call(void 0, {key:"enableSimulateCalls",description:"Controls the support of eth_simulateV1 from bera-reth/bera-geth",defaultValue:!1,adapter:e()}),c=_next.flag.call(void 0, {key:"enableBexFundsRecovery",description:"Enable BEX funds recovery",defaultValue:!0,adapter:e()}),f=_next.flag.call(void 0, {key:"isRefundInExplorer",description:"Show Refund link in the Explorer dropdown",defaultValue:!1,adapter:e()}),b=_next.flag.call(void 0, {key:"isEmbeddedWalletsEnabled",description:"Enable embedded wallets",defaultValue:!0,adapter:e()}),g=_next.flag.call(void 0, {key:"enableEip5792",description:"Enable EIP-5792 to allow batch transactions if wallet supports it",defaultValue:!0,adapter:e()}),y=_next.flag.call(void 0, {key:"proxyAggregatorsThroughVercel",description:"Proxy aggregators quotes through Vercel instead of proxy gateway",defaultValue:!1,adapter:e()}),E=_next.flag.call(void 0, {key:"isDefaultStakingPoolEnabled",description:"Enable default staking pools",defaultValue:!0,adapter:e()}),m=_next.flag.call(void 0, {key:"isBendVaultDataHourly",description:"Enable bend vault data to be fetched hourly",defaultValue:!0,adapter:e()}),h=_next.flag.call(void 0, {key:"isHoneyPythWrapperEnabled",description:"Update pyth prices when minting or redeeming Honey",defaultValue:!0,adapter:e()}),x=_next.flag.call(void 0, {key:"isBendNew",description:"Enable Bend live",defaultValue:!1,adapter:e()}),V=_next.flag.call(void 0, {key:"isPoolsMerged",description:"Enable Pools merged",defaultValue:!0,adapter:e()});exports.flags = r;
|
|
@@ -2,6 +2,10 @@ import * as flags_next from 'flags/next';
|
|
|
2
2
|
|
|
3
3
|
declare const isGovernanceEnabled: flags_next.Flag<boolean, any>;
|
|
4
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 isEmbeddedWalletsEnabled: flags_next.Flag<boolean, any>;
|
|
5
9
|
/**
|
|
6
10
|
* If false, EIP-5792 will be disabled.
|
|
7
11
|
* This is useful for testing purposes.
|
|
@@ -9,20 +13,26 @@ declare const hideStakeForSingleHolderVaults: flags_next.Flag<boolean, any>;
|
|
|
9
13
|
declare const enableEip5792: flags_next.Flag<boolean, any>;
|
|
10
14
|
declare const proxyAggregatorsThroughVercel: flags_next.Flag<boolean, any>;
|
|
11
15
|
declare const isDefaultStakingPoolEnabled: flags_next.Flag<boolean, any>;
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
16
|
+
declare const isBendVaultDataHourly: flags_next.Flag<boolean, any>;
|
|
17
|
+
declare const isHoneyPythWrapperEnabled: flags_next.Flag<boolean, any>;
|
|
18
|
+
declare const isBendNew: flags_next.Flag<boolean, any>;
|
|
19
|
+
declare const isPoolsMerged: flags_next.Flag<boolean, any>;
|
|
15
20
|
|
|
21
|
+
declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
|
|
16
22
|
declare const flags_enableEip5792: typeof enableEip5792;
|
|
23
|
+
declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
|
|
17
24
|
declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
|
|
18
|
-
declare const
|
|
25
|
+
declare const flags_isBendNew: typeof isBendNew;
|
|
26
|
+
declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
|
|
19
27
|
declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
|
|
28
|
+
declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
|
|
20
29
|
declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
|
|
21
|
-
declare const
|
|
22
|
-
declare const
|
|
30
|
+
declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
|
|
31
|
+
declare const flags_isPoolsMerged: typeof isPoolsMerged;
|
|
32
|
+
declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
|
|
23
33
|
declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
|
|
24
34
|
declare namespace flags {
|
|
25
|
-
export { flags_enableEip5792 as enableEip5792, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults,
|
|
35
|
+
export { flags_enableBexFundsRecovery as enableBexFundsRecovery, flags_enableEip5792 as enableEip5792, flags_enableSimulateCalls as enableSimulateCalls, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults, flags_isBendNew as isBendNew, flags_isBendVaultDataHourly as isBendVaultDataHourly, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isEmbeddedWalletsEnabled as isEmbeddedWalletsEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isHoneyPythWrapperEnabled as isHoneyPythWrapperEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
|
|
26
36
|
}
|
|
27
37
|
|
|
28
38
|
export { flags };
|
|
@@ -2,6 +2,10 @@ import * as flags_next from 'flags/next';
|
|
|
2
2
|
|
|
3
3
|
declare const isGovernanceEnabled: flags_next.Flag<boolean, any>;
|
|
4
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 isEmbeddedWalletsEnabled: flags_next.Flag<boolean, any>;
|
|
5
9
|
/**
|
|
6
10
|
* If false, EIP-5792 will be disabled.
|
|
7
11
|
* This is useful for testing purposes.
|
|
@@ -9,20 +13,26 @@ declare const hideStakeForSingleHolderVaults: flags_next.Flag<boolean, any>;
|
|
|
9
13
|
declare const enableEip5792: flags_next.Flag<boolean, any>;
|
|
10
14
|
declare const proxyAggregatorsThroughVercel: flags_next.Flag<boolean, any>;
|
|
11
15
|
declare const isDefaultStakingPoolEnabled: flags_next.Flag<boolean, any>;
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
16
|
+
declare const isBendVaultDataHourly: flags_next.Flag<boolean, any>;
|
|
17
|
+
declare const isHoneyPythWrapperEnabled: flags_next.Flag<boolean, any>;
|
|
18
|
+
declare const isBendNew: flags_next.Flag<boolean, any>;
|
|
19
|
+
declare const isPoolsMerged: flags_next.Flag<boolean, any>;
|
|
15
20
|
|
|
21
|
+
declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
|
|
16
22
|
declare const flags_enableEip5792: typeof enableEip5792;
|
|
23
|
+
declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
|
|
17
24
|
declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
|
|
18
|
-
declare const
|
|
25
|
+
declare const flags_isBendNew: typeof isBendNew;
|
|
26
|
+
declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
|
|
19
27
|
declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
|
|
28
|
+
declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
|
|
20
29
|
declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
|
|
21
|
-
declare const
|
|
22
|
-
declare const
|
|
30
|
+
declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
|
|
31
|
+
declare const flags_isPoolsMerged: typeof isPoolsMerged;
|
|
32
|
+
declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
|
|
23
33
|
declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
|
|
24
34
|
declare namespace flags {
|
|
25
|
-
export { flags_enableEip5792 as enableEip5792, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults,
|
|
35
|
+
export { flags_enableBexFundsRecovery as enableBexFundsRecovery, flags_enableEip5792 as enableEip5792, flags_enableSimulateCalls as enableSimulateCalls, flags_hideStakeForSingleHolderVaults as hideStakeForSingleHolderVaults, flags_isBendNew as isBendNew, flags_isBendVaultDataHourly as isBendVaultDataHourly, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isEmbeddedWalletsEnabled as isEmbeddedWalletsEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isHoneyPythWrapperEnabled as isHoneyPythWrapperEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
|
|
26
36
|
}
|
|
27
37
|
|
|
28
38
|
export { flags };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"../../chunk-D2FG64PF.mjs";import"../../chunk-CM7FGHYU.mjs";import"../../chunk-MS6UGFXI.mjs";import{a as d}from"../../chunk-JZXLCA2E.mjs";var r={};d(r,{enableBexFundsRecovery:()=>c,enableEip5792:()=>g,enableSimulateCalls:()=>u,hideStakeForSingleHolderVaults:()=>p,isBendNew:()=>x,isBendVaultDataHourly:()=>m,isDefaultStakingPoolEnabled:()=>E,isEmbeddedWalletsEnabled:()=>b,isGovernanceEnabled:()=>s,isHoneyPythWrapperEnabled:()=>h,isPoolsMerged:()=>V,isRefundInExplorer:()=>f,proxyAggregatorsThroughVercel:()=>y});import{flag as a}from"flags/next";import{edgeConfigAdapter as i}from"@flags-sdk/edge-config";function e(){let o=i();return{...o,async decide(l){let n=await o.decide(l);return t(n)}}}var s=a({key:"isGovernanceEnabled",description:"Enable Governance proposals",defaultValue:!0,adapter:e()}),p=a({key:"hideStakeForSingleHolderVaults",description:"Hide stake for single holder vaults",defaultValue:!0,adapter:e()}),u=a({key:"enableSimulateCalls",description:"Controls the support of eth_simulateV1 from bera-reth/bera-geth",defaultValue:!1,adapter:e()}),c=a({key:"enableBexFundsRecovery",description:"Enable BEX funds recovery",defaultValue:!0,adapter:e()}),f=a({key:"isRefundInExplorer",description:"Show Refund link in the Explorer dropdown",defaultValue:!1,adapter:e()}),b=a({key:"isEmbeddedWalletsEnabled",description:"Enable embedded wallets",defaultValue:!0,adapter:e()}),g=a({key:"enableEip5792",description:"Enable EIP-5792 to allow batch transactions if wallet supports it",defaultValue:!0,adapter:e()}),y=a({key:"proxyAggregatorsThroughVercel",description:"Proxy aggregators quotes through Vercel instead of proxy gateway",defaultValue:!1,adapter:e()}),E=a({key:"isDefaultStakingPoolEnabled",description:"Enable default staking pools",defaultValue:!0,adapter:e()}),m=a({key:"isBendVaultDataHourly",description:"Enable bend vault data to be fetched hourly",defaultValue:!0,adapter:e()}),h=a({key:"isHoneyPythWrapperEnabled",description:"Update pyth prices when minting or redeeming Honey",defaultValue:!0,adapter:e()}),x=a({key:"isBendNew",description:"Enable Bend live",defaultValue:!1,adapter:e()}),V=a({key:"isPoolsMerged",description:"Enable Pools merged",defaultValue:!0,adapter:e()});export{r as flags};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var
|
|
2
|
-
default-src 'self';
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk3LFM4QG6cjs = require('../chunk-3LFM4QG6.cjs');var _chunkIV4GOAZBcjs = require('../chunk-IV4GOAZB.cjs');require('../chunk-G3P5QJ2Y.cjs');require('../chunk-6CMG5CBG.cjs');var _chunkZYHYMHGNcjs = require('../chunk-ZYHYMHGN.cjs');require('../chunk-5Q5FZIMO.cjs');require('../chunk-2OLL4MUY.cjs');require('../chunk-4VDLQK6F.cjs');function b({dsn:e=process.env.NEXT_PUBLIC_SENTRY_DSN}={}){if(!e)return;let n=/^(?:https:\/\/)([A-z0-9]{32})(?::{0,1})([A-z0-9]*)(?:@)(o[a-z0-9]+)(?:\.ingest\.us\.sentry\.io)\/([0-9]{16})/i,s=_optionalChain([e, 'optionalAccess', _ => _.match, 'call', _2 => _2(n)]);if(!s)return;let[,o,c,r,p]=s,i=new URL(`https://${r}.ingest.us.sentry.io/api/${p}/security/?sentry_key=${o}`);return i.searchParams.set("sentry_key",o),i.searchParams.set("sentry_env",_chunk3LFM4QG6cjs.a),i.searchParams.set("sentry_release",_chunk3LFM4QG6cjs.c),{dsn:s[0],projectId:p,deprecatedSecret:c||void 0,cspEndpoint:i,org:r,publicKey:s[1]}}function w({isDevelopment:e,nonce:n,cspReporting:s,...o}){let c=["https://*.dynamic-static-assets.com/","https://app.dynamicauth.com/api/"],r=["https://*.sentry.io/","https://*.berachain.com/","https://*.berachain-staging.com/",`https://*.dynamicauth.com/api/v0/sdk/${_chunkIV4GOAZBcjs.b.apiKeys.public.dynamicWallet}/`,`https://logs.dynamicauth.com/api/v1/${_chunkIV4GOAZBcjs.b.apiKeys.public.dynamicWallet}`,"https://dynamic-static-assets.com/wallet-book/v1/","https://raw.githubusercontent.com/berachain/metadata/",_chunkZYHYMHGNcjs.a,"https://*.bera-network.quiknode.pro","https://*.bepolia-network.quiknode.pro","https://*.bera-mainnet.quiknode.pro","https://beranames-assets-berachain.s3.eu-central-003.backblazeb2.com/",_chunkZYHYMHGNcjs.b,_chunkIV4GOAZBcjs.b.governance.subgraph,_chunkIV4GOAZBcjs.b.honey.subgraph,_chunkIV4GOAZBcjs.b.pol.subgraph,_chunkIV4GOAZBcjs.b.pol.bribeBoostApi,_chunkIV4GOAZBcjs.b.bex.subgraph,_chunkIV4GOAZBcjs.b.api,_chunkIV4GOAZBcjs.b.blocksSubgraph,_chunkZYHYMHGNcjs.e,_chunkZYHYMHGNcjs.d,_chunkZYHYMHGNcjs.f,"https://open-api.openocean.finance/","https://api.haiku.trade/","https://api.magpiefi.xyz/",`${_chunkIV4GOAZBcjs.b.bex.aggregatorsProxyUrl}/`,"wss://relay.walletconnect.com/","wss://relay.walletconnect.org/","https://api.routescan.io/v2/network/","wss://metamask-sdk.api.cx.metamask.io/socket.io/","https://metamask-sdk.api.cx.metamask.io","https://app.dynamicauth.com/api","https://www.walletlink.org/events","https://api.trongrid.io/","https://chain-proxy.wallet.coinbase.com/","https://wallet.binance.com/tonbridge/","https://*.thirdweb.com/","https://eth.merkle.io/","https://cdn.whisk.so/","https://*.posthog.com","https://vercel.live","wss://ws-us3.pusher.com","https://cdn.markfi.xyz/scripts/analytics/","https://a.markfi.xyz/","https://hermes.pyth.network/v2/","https://rpc.porto.sh","https://api.avax.network/ext/bc/C/rpc","https://polygon-rpc.com","https://mainnet.optimism.io/","https://arb1.arbitrum.io/rpc","wss://www.walletlink.org/rpc","https://api.enso.finance/"].concat(_nullishCoalesce(o.connectionSources, () => ([]))).filter(a=>!(!a||a.trim()===""||a.startsWith(_chunkZYHYMHGNcjs.b)&&a!==_chunkZYHYMHGNcjs.b)),p=[_chunkZYHYMHGNcjs.a,"https://raw.githubusercontent.com/berachain/metadata/","https://assets.coingecko.com/coins/images/","https://coin-images.coingecko.com/coins/images/","https://iconic.dynamic-static-assets.com/","https://beranames-assets-berachain.s3.eu-central-003.backblazeb2.com/","https://icons.llama.fi/","https://icons.llamao.fi/","https://cdn.whisk.so/","https://cdn.morpho.org/","https://raw.githubusercontent.com/trustwallet/assets/","https://pelaguswallet.io/docs/img","https://*.posthog.com","https://vercel.live","https://vercel.com"].concat(_nullishCoalesce(o.pictureSources, () => ([]))).filter(a=>!(!a||a.trim()==="")),i=["https://verify.walletconnect.com/","https://verify.walletconnect.org/","https://*.posthog.com","https://vercel.live/","https://id.porto.sh"].concat(_nullishCoalesce(o.frameSources, () => ([]))),k=["https://cdn.jsdelivr.net/npm/@fontsource/","https://*.posthog.com","https://vercel.live","https://assets.vercel.com","https://fonts.gstatic.com","https://use.typekit.net/"].concat(_nullishCoalesce(o.fontSources, () => ([]))),v=["https://*.posthog.com","https://vercel.live"].concat(_nullishCoalesce(o.styleSources, () => ([]))),l=`
|
|
2
|
+
default-src 'self' ${c.join(" ")};
|
|
3
3
|
base-uri 'self';
|
|
4
|
-
frame-src 'self' ${
|
|
4
|
+
frame-src 'self' ${i.join(" ")};
|
|
5
5
|
frame-ancestors 'self' https://*.posthog.com;
|
|
6
|
-
script-src 'self' 'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o=' 'nonce-${
|
|
6
|
+
script-src 'self' 'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o=' 'nonce-${n}' https://*.posthog.com 'strict-dynamic' ${e?"'unsafe-eval'":""};
|
|
7
7
|
worker-src 'self' blob: data:;
|
|
8
|
-
font-src 'self' ${
|
|
9
|
-
style-src 'self' ${
|
|
8
|
+
font-src 'self' ${k.join(" ")};
|
|
9
|
+
style-src 'self' ${v.join(" ")} 'unsafe-inline';
|
|
10
10
|
img-src 'self' data: ${p.join(" ")};
|
|
11
|
-
connect-src 'self' ${
|
|
11
|
+
connect-src 'self' ${r.join(" ")};
|
|
12
12
|
media-src https://*.posthog.com;
|
|
13
|
-
|
|
13
|
+
`;return s&&(l+=`
|
|
14
|
+
report-uri ${s};
|
|
15
|
+
report-to csp-endpoint;
|
|
16
|
+
`),l.replace(/\s{2,}/g," ").trim()}var N=[_chunkZYHYMHGNcjs.a,"https://raw.githubusercontent.com/berachain/metadata/","https://assets.coingecko.com/coins/images/","https://iconic.dynamic-static-assets.com/","https://berachain.ghost.io/content/images/"].filter(e=>!(!e||e.trim()===""));function U({response:e}){let n=_optionalChain([b, 'call', _3 => _3(), 'optionalAccess', _4 => _4.cspEndpoint]),s=Buffer.from(crypto.randomUUID()).toString("base64"),o=process.env.NODE_ENV==="development",c=[{key:"Content-Security-Policy",value:w({isDevelopment:o,cspReporting:_optionalChain([n, 'optionalAccess', _5 => _5.toString, 'call', _6 => _6()]),nonce:s})},{key:"X-Frame-Options",value:"DENY"},{key:"X-Content-Type-Options",value:"nosniff"},{key:"X-Nonce",value:s}];n&&(c.push({key:"Reporting-To",value:`{"group":"csp-endpoint","max_age":10886400,"endpoints":[{"url":"${n}"}],"include_subdomains":true}"`}),c.push({key:"Reporting-Endpoints",value:`csp-endpoint="${n}"`}));for(let r of c)e.headers.set(r.key,r.value);return e}exports.cspMiddleware = U; exports.getContentSecurityPolicy = w; exports.staticPictureSources = N;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
declare function getContentSecurityPolicy({ isDevelopment, nonce, cspReporting, ...args }: {
|
|
2
4
|
isDevelopment: boolean;
|
|
3
5
|
nonce: string;
|
|
4
6
|
frameSources?: string[];
|
|
@@ -6,10 +8,15 @@ declare function getContentSecurityPolicy({ isDevelopment, nonce, ...args }: {
|
|
|
6
8
|
pictureSources?: string[];
|
|
7
9
|
connectionSources?: string[];
|
|
8
10
|
styleSources?: string[];
|
|
11
|
+
cspReporting?: string;
|
|
9
12
|
}): string;
|
|
10
13
|
/**
|
|
11
14
|
* Static picture sources that are used in static-monobera.
|
|
12
15
|
*/
|
|
13
16
|
declare const staticPictureSources: string[];
|
|
17
|
+
declare function cspMiddleware({ response, }: {
|
|
18
|
+
request: NextRequest;
|
|
19
|
+
response: NextResponse;
|
|
20
|
+
}): NextResponse<unknown>;
|
|
14
21
|
|
|
15
|
-
export { getContentSecurityPolicy, staticPictureSources };
|
|
22
|
+
export { cspMiddleware, getContentSecurityPolicy, staticPictureSources };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
declare function getContentSecurityPolicy({ isDevelopment, nonce, cspReporting, ...args }: {
|
|
2
4
|
isDevelopment: boolean;
|
|
3
5
|
nonce: string;
|
|
4
6
|
frameSources?: string[];
|
|
@@ -6,10 +8,15 @@ declare function getContentSecurityPolicy({ isDevelopment, nonce, ...args }: {
|
|
|
6
8
|
pictureSources?: string[];
|
|
7
9
|
connectionSources?: string[];
|
|
8
10
|
styleSources?: string[];
|
|
11
|
+
cspReporting?: string;
|
|
9
12
|
}): string;
|
|
10
13
|
/**
|
|
11
14
|
* Static picture sources that are used in static-monobera.
|
|
12
15
|
*/
|
|
13
16
|
declare const staticPictureSources: string[];
|
|
17
|
+
declare function cspMiddleware({ response, }: {
|
|
18
|
+
request: NextRequest;
|
|
19
|
+
response: NextResponse;
|
|
20
|
+
}): NextResponse<unknown>;
|
|
14
21
|
|
|
15
|
-
export { getContentSecurityPolicy, staticPictureSources };
|
|
22
|
+
export { cspMiddleware, getContentSecurityPolicy, staticPictureSources };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{a as g,c as y}from"../chunk-XTBMK2TL.mjs";import{b as t}from"../chunk-G2LROWQ2.mjs";import"../chunk-FFCLEC63.mjs";import"../chunk-BQFHWAJZ.mjs";import{a as h,b as m,d as u,e as d,f}from"../chunk-YUUHPTW6.mjs";import"../chunk-CM7FGHYU.mjs";import"../chunk-MS6UGFXI.mjs";import"../chunk-JZXLCA2E.mjs";function b({dsn:e=process.env.NEXT_PUBLIC_SENTRY_DSN}={}){if(!e)return;let n=/^(?:https:\/\/)([A-z0-9]{32})(?::{0,1})([A-z0-9]*)(?:@)(o[a-z0-9]+)(?:\.ingest\.us\.sentry\.io)\/([0-9]{16})/i,s=e?.match(n);if(!s)return;let[,o,c,r,p]=s,i=new URL(`https://${r}.ingest.us.sentry.io/api/${p}/security/?sentry_key=${o}`);return i.searchParams.set("sentry_key",o),i.searchParams.set("sentry_env",g),i.searchParams.set("sentry_release",y),{dsn:s[0],projectId:p,deprecatedSecret:c||void 0,cspEndpoint:i,org:r,publicKey:s[1]}}function w({isDevelopment:e,nonce:n,cspReporting:s,...o}){let c=["https://*.dynamic-static-assets.com/","https://app.dynamicauth.com/api/"],r=["https://*.sentry.io/","https://*.berachain.com/","https://*.berachain-staging.com/",`https://*.dynamicauth.com/api/v0/sdk/${t.apiKeys.public.dynamicWallet}/`,`https://logs.dynamicauth.com/api/v1/${t.apiKeys.public.dynamicWallet}`,"https://dynamic-static-assets.com/wallet-book/v1/","https://raw.githubusercontent.com/berachain/metadata/",h,"https://*.bera-network.quiknode.pro","https://*.bepolia-network.quiknode.pro","https://*.bera-mainnet.quiknode.pro","https://beranames-assets-berachain.s3.eu-central-003.backblazeb2.com/",m,t.governance.subgraph,t.honey.subgraph,t.pol.subgraph,t.pol.bribeBoostApi,t.bex.subgraph,t.api,t.blocksSubgraph,d,u,f,"https://open-api.openocean.finance/","https://api.haiku.trade/","https://api.magpiefi.xyz/",`${t.bex.aggregatorsProxyUrl}/`,"wss://relay.walletconnect.com/","wss://relay.walletconnect.org/","https://api.routescan.io/v2/network/","wss://metamask-sdk.api.cx.metamask.io/socket.io/","https://metamask-sdk.api.cx.metamask.io","https://app.dynamicauth.com/api","https://www.walletlink.org/events","https://api.trongrid.io/","https://chain-proxy.wallet.coinbase.com/","https://wallet.binance.com/tonbridge/","https://*.thirdweb.com/","https://eth.merkle.io/","https://cdn.whisk.so/","https://*.posthog.com","https://vercel.live","wss://ws-us3.pusher.com","https://cdn.markfi.xyz/scripts/analytics/","https://a.markfi.xyz/","https://hermes.pyth.network/v2/","https://rpc.porto.sh","https://api.avax.network/ext/bc/C/rpc","https://polygon-rpc.com","https://mainnet.optimism.io/","https://arb1.arbitrum.io/rpc","wss://www.walletlink.org/rpc","https://api.enso.finance/"].concat(o.connectionSources??[]).filter(a=>!(!a||a.trim()===""||a.startsWith(m)&&a!==m)),p=[h,"https://raw.githubusercontent.com/berachain/metadata/","https://assets.coingecko.com/coins/images/","https://coin-images.coingecko.com/coins/images/","https://iconic.dynamic-static-assets.com/","https://beranames-assets-berachain.s3.eu-central-003.backblazeb2.com/","https://icons.llama.fi/","https://icons.llamao.fi/","https://cdn.whisk.so/","https://cdn.morpho.org/","https://raw.githubusercontent.com/trustwallet/assets/","https://pelaguswallet.io/docs/img","https://*.posthog.com","https://vercel.live","https://vercel.com"].concat(o.pictureSources??[]).filter(a=>!(!a||a.trim()==="")),i=["https://verify.walletconnect.com/","https://verify.walletconnect.org/","https://*.posthog.com","https://vercel.live/","https://id.porto.sh"].concat(o.frameSources??[]),k=["https://cdn.jsdelivr.net/npm/@fontsource/","https://*.posthog.com","https://vercel.live","https://assets.vercel.com","https://fonts.gstatic.com","https://use.typekit.net/"].concat(o.fontSources??[]),v=["https://*.posthog.com","https://vercel.live"].concat(o.styleSources??[]),l=`
|
|
2
|
+
default-src 'self' ${c.join(" ")};
|
|
3
|
+
base-uri 'self';
|
|
4
|
+
frame-src 'self' ${i.join(" ")};
|
|
5
|
+
frame-ancestors 'self' https://*.posthog.com;
|
|
6
|
+
script-src 'self' 'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o=' 'nonce-${n}' https://*.posthog.com 'strict-dynamic' ${e?"'unsafe-eval'":""};
|
|
7
|
+
worker-src 'self' blob: data:;
|
|
8
|
+
font-src 'self' ${k.join(" ")};
|
|
9
|
+
style-src 'self' ${v.join(" ")} 'unsafe-inline';
|
|
10
|
+
img-src 'self' data: ${p.join(" ")};
|
|
11
|
+
connect-src 'self' ${r.join(" ")};
|
|
12
|
+
media-src https://*.posthog.com;
|
|
13
|
+
`;return s&&(l+=`
|
|
14
|
+
report-uri ${s};
|
|
15
|
+
report-to csp-endpoint;
|
|
16
|
+
`),l.replace(/\s{2,}/g," ").trim()}var N=[h,"https://raw.githubusercontent.com/berachain/metadata/","https://assets.coingecko.com/coins/images/","https://iconic.dynamic-static-assets.com/","https://berachain.ghost.io/content/images/"].filter(e=>!(!e||e.trim()===""));function U({response:e}){let n=b()?.cspEndpoint,s=Buffer.from(crypto.randomUUID()).toString("base64"),o=process.env.NODE_ENV==="development",c=[{key:"Content-Security-Policy",value:w({isDevelopment:o,cspReporting:n?.toString(),nonce:s})},{key:"X-Frame-Options",value:"DENY"},{key:"X-Content-Type-Options",value:"nosniff"},{key:"X-Nonce",value:s}];n&&(c.push({key:"Reporting-To",value:`{"group":"csp-endpoint","max_age":10886400,"endpoints":[{"url":"${n}"}],"include_subdomains":true}"`}),c.push({key:"Reporting-Endpoints",value:`csp-endpoint="${n}"`}));for(let r of c)e.headers.set(r.key,r.value);return e}export{U as cspMiddleware,w as getContentSecurityPolicy,N as staticPictureSources};
|
package/dist/internal/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 _chunkIV4GOAZBcjs = require('../chunk-IV4GOAZB.cjs');require('../chunk-G3P5QJ2Y.cjs');require('../chunk-6CMG5CBG.cjs');var _chunkZYHYMHGNcjs = require('../chunk-ZYHYMHGN.cjs');var _chunk5Q5FZIMOcjs = require('../chunk-5Q5FZIMO.cjs');var _chunk2OLL4MUYcjs = require('../chunk-2OLL4MUY.cjs');require('../chunk-4VDLQK6F.cjs');exports.ChainId = _chunk2OLL4MUYcjs.a; exports.alchemyJsonRpcUrl = _chunkZYHYMHGNcjs.f; exports.chainConfigs = _chunkIV4GOAZBcjs.a; exports.chainId = _chunk5Q5FZIMOcjs.a; exports.cloudinaryBaseUrl = _chunkZYHYMHGNcjs.a; exports.config = _chunkIV4GOAZBcjs.b; exports.currentDapp = _chunk5Q5FZIMOcjs.b; exports.defaultChainId = _chunk5Q5FZIMOcjs.a; exports.getRpcUrls = _chunkZYHYMHGNcjs.c; exports.goldskyBaseUrl = _chunkZYHYMHGNcjs.b; exports.jsonRpcUrl = _chunkZYHYMHGNcjs.e; exports.privateRcpUrl = _chunkZYHYMHGNcjs.g; exports.publicJsonRpcUrl = _chunkZYHYMHGNcjs.d;
|