@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.
Files changed (117) hide show
  1. package/dist/bepolia.cjs +1 -1
  2. package/dist/bepolia.d.cts +29 -10
  3. package/dist/bepolia.d.ts +29 -10
  4. package/dist/bepolia.mjs +1 -0
  5. package/dist/chunk-2OLL4MUY.cjs +1 -0
  6. package/dist/chunk-3LFM4QG6.cjs +1 -0
  7. package/dist/chunk-5Q5FZIMO.cjs +2 -0
  8. package/dist/chunk-6CMG5CBG.cjs +1 -0
  9. package/dist/chunk-BQFHWAJZ.mjs +1 -0
  10. package/dist/chunk-CENF5RZA.mjs +1 -0
  11. package/dist/chunk-CM7FGHYU.mjs +2 -0
  12. package/dist/chunk-D2FG64PF.mjs +1 -0
  13. package/dist/chunk-DMFHUBNY.cjs +1 -0
  14. package/dist/chunk-FFCLEC63.mjs +1 -0
  15. package/dist/chunk-G2LROWQ2.mjs +1 -0
  16. package/dist/chunk-G3P5QJ2Y.cjs +1 -0
  17. package/dist/chunk-IV4GOAZB.cjs +1 -0
  18. package/dist/chunk-JVJKB7V7.mjs +1 -0
  19. package/dist/chunk-LJCOMNTL.cjs +1 -0
  20. package/dist/chunk-MS6UGFXI.mjs +1 -0
  21. package/dist/chunk-OQFLFE3X.cjs +1 -0
  22. package/dist/chunk-XTBMK2TL.mjs +1 -0
  23. package/dist/chunk-YUUHPTW6.mjs +1 -0
  24. package/dist/chunk-ZYHYMHGN.cjs +1 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.cts +35 -7
  27. package/dist/index.d.ts +35 -7
  28. package/dist/index.mjs +1 -0
  29. package/dist/internal/edge-config/index.cjs +1 -1
  30. package/dist/internal/edge-config/index.d.cts +81 -28
  31. package/dist/internal/edge-config/index.d.ts +81 -28
  32. package/dist/internal/edge-config/index.mjs +1 -0
  33. package/dist/internal/flags/index.cjs +1 -1
  34. package/dist/internal/flags/index.d.cts +17 -7
  35. package/dist/internal/flags/index.d.ts +17 -7
  36. package/dist/internal/flags/index.mjs +1 -0
  37. package/dist/internal/header-sources.cjs +11 -8
  38. package/dist/internal/header-sources.d.cts +9 -2
  39. package/dist/internal/header-sources.d.ts +9 -2
  40. package/dist/internal/header-sources.mjs +16 -0
  41. package/dist/internal/index.cjs +1 -1
  42. package/dist/internal/index.d.cts +206 -69
  43. package/dist/internal/index.d.ts +206 -69
  44. package/dist/internal/index.mjs +1 -0
  45. package/dist/internal/maintenance.cjs +1 -1
  46. package/dist/internal/maintenance.mjs +1 -0
  47. package/dist/internal/nextjs/index.cjs +1 -1
  48. package/dist/internal/nextjs/index.d.cts +21 -1
  49. package/dist/internal/nextjs/index.d.ts +21 -1
  50. package/dist/internal/nextjs/index.mjs +1 -0
  51. package/dist/internal/nextjs/utils/index.cjs +1 -0
  52. package/dist/internal/nextjs/utils/index.d.cts +9 -0
  53. package/dist/internal/nextjs/utils/index.d.ts +9 -0
  54. package/dist/internal/nextjs/utils/index.mjs +1 -0
  55. package/dist/internal/sentry/index.cjs +1 -1
  56. package/dist/internal/sentry/index.d.cts +4 -2
  57. package/dist/internal/sentry/index.d.ts +4 -2
  58. package/dist/internal/sentry/index.mjs +1 -0
  59. package/dist/internal/sentry/sentry.client.config.cjs +1 -1
  60. package/dist/internal/sentry/sentry.client.config.d.cts +5 -1
  61. package/dist/internal/sentry/sentry.client.config.d.ts +5 -1
  62. package/dist/internal/sentry/sentry.client.config.mjs +1 -0
  63. package/dist/internal/tailwind/index.cjs +1 -1
  64. package/dist/internal/tailwind/index.d.cts +3 -3
  65. package/dist/internal/tailwind/index.d.ts +3 -3
  66. package/dist/internal/tailwind/index.mjs +1 -0
  67. package/dist/internal/tsup/index.cjs +1 -1
  68. package/dist/internal/tsup/index.mjs +1 -0
  69. package/dist/mainnet.cjs +1 -1
  70. package/dist/mainnet.d.cts +29 -10
  71. package/dist/mainnet.d.ts +29 -10
  72. package/dist/mainnet.mjs +1 -0
  73. package/dist/sentry.edge.config-M3L3XSD6.cjs +1 -0
  74. package/dist/sentry.edge.config-XKXCGZO7.mjs +1 -0
  75. package/dist/sentry.server.config-535N36OR.cjs +1 -0
  76. package/dist/sentry.server.config-HGGCJWT2.mjs +1 -0
  77. package/package.json +29 -26
  78. package/dist/bepolia.js +0 -1
  79. package/dist/chunk-3IPYHDYK.cjs +0 -1
  80. package/dist/chunk-4XX7D27F.cjs +0 -1
  81. package/dist/chunk-4ZZXDAVS.js +0 -1
  82. package/dist/chunk-6RLCJYH2.cjs +0 -1
  83. package/dist/chunk-BGHO3T7U.js +0 -1
  84. package/dist/chunk-BJUR72F2.js +0 -1
  85. package/dist/chunk-BLIYP7AF.cjs +0 -1
  86. package/dist/chunk-DC57JNAC.js +0 -1
  87. package/dist/chunk-E3O7UH5M.js +0 -1
  88. package/dist/chunk-EG5OHLHP.js +0 -1
  89. package/dist/chunk-GTGNP2XV.cjs +0 -1
  90. package/dist/chunk-HC2ORLQ3.cjs +0 -1
  91. package/dist/chunk-HNEK54FE.cjs +0 -2
  92. package/dist/chunk-K62SDMWX.cjs +0 -1
  93. package/dist/chunk-NDMUG2ND.js +0 -2
  94. package/dist/chunk-RS6KOT3C.js +0 -1
  95. package/dist/chunk-WL6PVJKK.js +0 -1
  96. package/dist/chunk-X73HWW5T.cjs +0 -1
  97. package/dist/index.js +0 -1
  98. package/dist/internal/edge-config/index.js +0 -1
  99. package/dist/internal/flags/index.js +0 -1
  100. package/dist/internal/header-sources.js +0 -13
  101. package/dist/internal/index.js +0 -1
  102. package/dist/internal/maintenance.js +0 -1
  103. package/dist/internal/nextjs/index.js +0 -1
  104. package/dist/internal/sentry/esbuild.plugin.cjs +0 -1
  105. package/dist/internal/sentry/esbuild.plugin.d.cts +0 -3
  106. package/dist/internal/sentry/esbuild.plugin.d.ts +0 -3
  107. package/dist/internal/sentry/esbuild.plugin.js +0 -1
  108. package/dist/internal/sentry/index.js +0 -1
  109. package/dist/internal/sentry/sentry.client.config.js +0 -1
  110. package/dist/internal/tailwind/index.js +0 -1
  111. package/dist/internal/tsup/index.js +0 -1
  112. package/dist/mainnet.js +0 -1
  113. package/dist/sentry.edge.config-UQQHM7RP.cjs +0 -1
  114. package/dist/sentry.edge.config-V6Q3YAS2.js +0 -1
  115. package/dist/sentry.server.config-45GGQXOQ.js +0 -1
  116. package/dist/sentry.server.config-7JEUQ6QA.cjs +0 -1
  117. /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
- pol?: {
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
- banners?: {
61
- [k: string]: BannerItem;
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: string;
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 a value from the Vercel Edge Config by key.
157
+ * Safely retrieves all values from the Vercel Edge Config.
105
158
  *
106
- * @template T - The key of the EdgeConfigSchema to retrieve.
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 value of the config flag, or undefined if retrieval fails.
164
+ * @returns A promise that resolves to the config object, or undefined if retrieval fails.
113
165
  */
114
- declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
115
- chain?: ChainId;
116
- environment?: string;
166
+ declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
117
167
  onError?: (error: unknown) => void;
118
- }): Promise<EdgeConfigSchema[T] | undefined>;
168
+ }): Promise<T | undefined>;
119
169
 
120
170
  /**
121
- * Safely retrieves all values from the Vercel Edge Config.
171
+ * Safely retrieves a value from the Vercel Edge Config by key.
122
172
  *
123
- * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
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 object, or undefined if retrieval fails.
179
+ * @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
129
180
  */
130
- declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
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 BannerItem, type DynamicEnabled, type EdgeConfigSchema, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
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
- pol?: {
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
- banners?: {
61
- [k: string]: BannerItem;
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: string;
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 a value from the Vercel Edge Config by key.
157
+ * Safely retrieves all values from the Vercel Edge Config.
105
158
  *
106
- * @template T - The key of the EdgeConfigSchema to retrieve.
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 value of the config flag, or undefined if retrieval fails.
164
+ * @returns A promise that resolves to the config object, or undefined if retrieval fails.
113
165
  */
114
- declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
115
- chain?: ChainId;
116
- environment?: string;
166
+ declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
117
167
  onError?: (error: unknown) => void;
118
- }): Promise<EdgeConfigSchema[T] | undefined>;
168
+ }): Promise<T | undefined>;
119
169
 
120
170
  /**
121
- * Safely retrieves all values from the Vercel Edge Config.
171
+ * Safely retrieves a value from the Vercel Edge Config by key.
122
172
  *
123
- * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
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 object, or undefined if retrieval fails.
179
+ * @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
129
180
  */
130
- declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
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 BannerItem, type DynamicEnabled, type EdgeConfigSchema, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
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 _chunkHC2ORLQ3cjs = require('../../chunk-HC2ORLQ3.cjs');require('../../chunk-HNEK54FE.cjs');require('../../chunk-3IPYHDYK.cjs');var _chunk4VDLQK6Fcjs = require('../../chunk-4VDLQK6F.cjs');var r={};_chunk4VDLQK6Fcjs.a.call(void 0, r,{enableEip5792:()=>c,hideStakeForSingleHolderVaults:()=>p,isBendLive:()=>b,isDefaultStakingPoolEnabled:()=>g,isGovernanceEnabled:()=>s,isRewardAllocatorRoleActive:()=>E,isVaultChartsEnabled:()=>f,proxyAggregatorsThroughVercel:()=>u});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 _chunkHC2ORLQ3cjs.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()}),c=_next.flag.call(void 0, {key:"enableEip5792",description:"Enable EIP-5792 to allow batch transactions if wallet supports it",defaultValue:!0,adapter:e()}),u=_next.flag.call(void 0, {key:"proxyAggregatorsThroughVercel",description:"Proxy aggregators quotes through Vercel instead of proxy gateway",defaultValue:!1,adapter:e()}),g=_next.flag.call(void 0, {key:"isDefaultStakingPoolEnabled",description:"Enable default staking pools",defaultValue:!0,adapter:e()}),f=_next.flag.call(void 0, {key:"isVaultChartsEnabled",description:"Enable vault historical tvl and apr charts",defaultValue:!0,adapter:e()}),b=_next.flag.call(void 0, {key:"isBendLive",description:"Enable Bend live",defaultValue:!0,adapter:e()}),E=_next.flag.call(void 0, {key:"isRewardAllocatorRoleActive",description:"Reward Allocator role is active on BeraChef contract or not",defaultValue:!0,adapter:e()});exports.flags = r;
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 isVaultChartsEnabled: flags_next.Flag<boolean, any>;
13
- declare const isBendLive: flags_next.Flag<boolean, any>;
14
- declare const isRewardAllocatorRoleActive: flags_next.Flag<boolean, any>;
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 flags_isBendLive: typeof isBendLive;
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 flags_isRewardAllocatorRoleActive: typeof isRewardAllocatorRoleActive;
22
- declare const flags_isVaultChartsEnabled: typeof isVaultChartsEnabled;
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, flags_isBendLive as isBendLive, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isRewardAllocatorRoleActive as isRewardAllocatorRoleActive, flags_isVaultChartsEnabled as isVaultChartsEnabled, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
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 isVaultChartsEnabled: flags_next.Flag<boolean, any>;
13
- declare const isBendLive: flags_next.Flag<boolean, any>;
14
- declare const isRewardAllocatorRoleActive: flags_next.Flag<boolean, any>;
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 flags_isBendLive: typeof isBendLive;
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 flags_isRewardAllocatorRoleActive: typeof isRewardAllocatorRoleActive;
22
- declare const flags_isVaultChartsEnabled: typeof isVaultChartsEnabled;
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, flags_isBendLive as isBendLive, flags_isDefaultStakingPoolEnabled as isDefaultStakingPoolEnabled, flags_isGovernanceEnabled as isGovernanceEnabled, flags_isRewardAllocatorRoleActive as isRewardAllocatorRoleActive, flags_isVaultChartsEnabled as isVaultChartsEnabled, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
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 _chunk4XX7D27Fcjs = require('../chunk-4XX7D27F.cjs');var _chunkX73HWW5Tcjs = require('../chunk-X73HWW5T.cjs');require('../chunk-K62SDMWX.cjs');require('../chunk-6RLCJYH2.cjs');require('../chunk-HNEK54FE.cjs');require('../chunk-3IPYHDYK.cjs');require('../chunk-4VDLQK6F.cjs');function b({isDevelopment:o,nonce:a,...s}){let i=["https://*.berachain.com/","https://*.berachain-staging.com/","wss://www.walletlink.org/rpc",`https://*.dynamicauth.com/api/v0/sdk/${_chunk4XX7D27Fcjs.b.apiKeys.public.dynamicWallet}/`,`https://logs.dynamicauth.com/api/v1/${_chunk4XX7D27Fcjs.b.apiKeys.public.dynamicWallet}`,"https://dynamic-static-assets.com/wallet-book/v1/stable/wallet-book.json","https://raw.githubusercontent.com/berachain/metadata/","https://*.bera-network.quiknode.pro","https://*.bepolia-network.quiknode.pro",_chunk4XX7D27Fcjs.b.governance.subgraph,_chunk4XX7D27Fcjs.b.honey.subgraph,_chunk4XX7D27Fcjs.b.pol.subgraph,_chunk4XX7D27Fcjs.b.pol.bribeBoostApi,_chunk4XX7D27Fcjs.b.bex.subgraph,_chunk4XX7D27Fcjs.b.api,_chunk4XX7D27Fcjs.b.blocksSubgraph,_chunkX73HWW5Tcjs.c,_chunkX73HWW5Tcjs.b,_chunkX73HWW5Tcjs.d,"https://open-api.openocean.finance/","https://api.haiku.trade/","https://api.magpiefi.xyz/",`${_chunk4XX7D27Fcjs.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://*.posthog.com","https://vercel.live","wss://ws-us3.pusher.com","https://cdn.markfi.xyz/scripts/analytics/","https://a.markfi.xyz/"].concat(_nullishCoalesce(s.connectionSources, () => ([]))).filter((e,u)=>!e||e.trim()===""?(process.env.NODE_ENV==="production"&&console.warn("One of connectionSources is empty or undefined. Idx:",u),!1):!0),p=["https://res.cloudinary.com/duv0g402y/","https://raw.githubusercontent.com/berachain/default-lists/","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://*.posthog.com","https://vercel.live","https://vercel.com"].concat(_nullishCoalesce(s.pictureSources, () => ([]))).filter(e=>!e||e.trim()===""?(process.env.NODE_ENV==="production"&&console.warn("One of pictureSources is empty or undefined"),!1):!0),l=["https://verify.walletconnect.com/","https://verify.walletconnect.org/","https://*.posthog.com","https://vercel.live/"].concat(_nullishCoalesce(s.frameSources, () => ([]))),h=["https://cdn.jsdelivr.net/npm/@fontsource/","https://*.posthog.com","https://vercel.live","https://assets.vercel.com"].concat(_nullishCoalesce(s.fontSources, () => ([]))),m=["https://*.posthog.com","https://vercel.live"].concat(_nullishCoalesce(s.styleSources, () => ([])));return`
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' ${l.join(" ")};
4
+ frame-src 'self' ${i.join(" ")};
5
5
  frame-ancestors 'self' https://*.posthog.com;
6
- script-src 'self' 'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o=' 'nonce-${a}' https://*.posthog.com 'strict-dynamic' ${o?"'unsafe-eval'":""};
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' ${h.join(" ")};
9
- style-src 'self' ${m.join(" ")} 'unsafe-inline';
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' ${i.join(" ")};
11
+ connect-src 'self' ${r.join(" ")};
12
12
  media-src https://*.posthog.com;
13
- `.replace(/\s{2,}/g," ").trim()}var y=[_nullishCoalesce((_optionalChain([_chunk4XX7D27Fcjs.b, 'access', _ => _.urls, 'access', _2 => _2.cloudinary, 'optionalAccess', _3 => _3.split, 'call', _4 => _4("image"), 'access', _5 => _5[0]])||_optionalChain([_chunk4XX7D27Fcjs.b, 'access', _6 => _6.urls, 'access', _7 => _7.cloudinary, 'optionalAccess', _8 => _8.split, 'call', _9 => _9("raw"), 'access', _10 => _10[0]])), () => ("")),"https://raw.githubusercontent.com/berachain/default-lists/","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(o=>!o||o.trim()===""?(console.warn("One of pictureSources is empty or undefined"),!1):!0);exports.getContentSecurityPolicy = b; exports.staticPictureSources = y;
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
- declare function getContentSecurityPolicy({ isDevelopment, nonce, ...args }: {
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
- declare function getContentSecurityPolicy({ isDevelopment, nonce, ...args }: {
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};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4XX7D27Fcjs = require('../chunk-4XX7D27F.cjs');var _chunkX73HWW5Tcjs = require('../chunk-X73HWW5T.cjs');require('../chunk-K62SDMWX.cjs');require('../chunk-6RLCJYH2.cjs');var _chunkHNEK54FEcjs = require('../chunk-HNEK54FE.cjs');var _chunk3IPYHDYKcjs = require('../chunk-3IPYHDYK.cjs');require('../chunk-4VDLQK6F.cjs');exports.ChainId = _chunk3IPYHDYKcjs.a; exports.alchemyJsonRpcUrl = _chunkX73HWW5Tcjs.d; exports.chainConfigs = _chunk4XX7D27Fcjs.a; exports.chainId = _chunkHNEK54FEcjs.a; exports.config = _chunk4XX7D27Fcjs.b; exports.defaultChainId = _chunkHNEK54FEcjs.a; exports.getRpcUrls = _chunkX73HWW5Tcjs.a; exports.jsonRpcUrl = _chunkX73HWW5Tcjs.c; exports.privateRcpUrl = _chunkX73HWW5Tcjs.e; exports.publicJsonRpcUrl = _chunkX73HWW5Tcjs.b;
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;