@berachain/config 0.0.3 → 0.0.5

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 +30 -11
  3. package/dist/bepolia.d.ts +30 -11
  4. package/dist/bepolia.mjs +1 -0
  5. package/dist/chunk-2OLL4MUY.cjs +1 -0
  6. package/dist/chunk-2X5W4YR4.mjs +1 -0
  7. package/dist/chunk-32CWUFQY.cjs +1 -0
  8. package/dist/chunk-3LFM4QG6.cjs +1 -0
  9. package/dist/chunk-5Q5FZIMO.cjs +2 -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-JVJKB7V7.mjs +1 -0
  15. package/dist/chunk-LJCOMNTL.cjs +1 -0
  16. package/dist/chunk-MHNEK2A2.cjs +1 -0
  17. package/dist/chunk-MS6UGFXI.mjs +1 -0
  18. package/dist/chunk-OQFLFE3X.cjs +1 -0
  19. package/dist/chunk-TSH4FNVH.mjs +1 -0
  20. package/dist/chunk-WKOAF2ML.mjs +1 -0
  21. package/dist/chunk-WNGB3G3V.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 +93 -32
  31. package/dist/internal/edge-config/index.d.ts +93 -32
  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 +19 -7
  35. package/dist/internal/flags/index.d.ts +19 -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 +278 -131
  43. package/dist/internal/index.d.ts +278 -131
  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 +30 -11
  71. package/dist/mainnet.d.ts +30 -11
  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,54 @@ 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
+ $schema?: string;
34
+ flags: {
25
35
  [k: string]: DynamicEnabled;
26
36
  };
27
- pol?: {
37
+ bex: {
38
+ /**
39
+ * An object of aggregators and their enabled status. The key is the aggregator name in lowercase and without spaces and must be in the Aggregators enum.
40
+ */
41
+ aggregators?: {
42
+ [k: string]: DynamicEnabled;
43
+ };
44
+ /**
45
+ * Labels for the emergency messages and banners. (e.g. pool or vaults are paused)
46
+ */
47
+ emergencyLabels?: {
48
+ /**
49
+ * This interface was referenced by `undefined`'s JSON-Schema definition
50
+ * via the `patternProperty` "^(vaultPaused|poolRecovery|poolPaused|poolInRecoveryMode|poolPausedAndInRecoveryMode)$".
51
+ */
52
+ [k: string]: {
53
+ title?: string;
54
+ description?: string;
55
+ banner?: string;
56
+ };
57
+ };
58
+ /**
59
+ * If true, weighted pool creation will be disabled.
60
+ */
61
+ disableWeightedPoolCreation?: boolean;
62
+ };
63
+ pol: {
28
64
  /**
29
65
  * @minItems 2
30
66
  */
@@ -49,17 +85,26 @@ interface EdgeConfigSchema {
49
85
  */
50
86
  swberaAprWindow?: "DAY" | "WEEK";
51
87
  };
52
- dex?: {
88
+ honey: {
53
89
  /**
54
- * 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.
90
+ * Object containing the collateral order for mainnet & bepolia.
55
91
  */
56
- aggregators?: {
57
- [k: string]: DynamicEnabled;
92
+ preferredCollateralOrder?: {
93
+ mainnet: {
94
+ address: Address;
95
+ _label?: string;
96
+ }[];
97
+ bepolia: {
98
+ address: Address;
99
+ _label?: string;
100
+ }[];
58
101
  };
102
+ /**
103
+ * The label for the Honey protocol paused message.
104
+ */
105
+ pausedBannerLabel?: string;
59
106
  };
60
- banners?: {
61
- [k: string]: BannerItem;
62
- };
107
+ banners: MixedBannerItem[];
63
108
  maintenance?: {
64
109
  /**
65
110
  * This interface was referenced by `undefined`'s JSON-Schema definition
@@ -70,20 +115,35 @@ interface EdgeConfigSchema {
70
115
  [k: string]: unknown;
71
116
  };
72
117
  };
118
+ wagmi: {
119
+ /**
120
+ * The list of external chains that are approved for multi chain zapping.
121
+ */
122
+ externalChainList: {
123
+ chainId: number;
124
+ _name?: string;
125
+ enabled: DynamicEnabled;
126
+ }[];
127
+ };
73
128
  }
74
129
  interface VaultItem {
75
130
  address: Address;
76
131
  enabled: DynamicEnabled;
77
132
  _name?: string;
78
133
  }
79
- /**
80
- * This interface was referenced by `undefined`'s JSON-Schema definition
81
- * via the `patternProperty` "^(hub|honey|bridge|boyco)$".
82
- */
83
- interface BannerItem {
134
+ interface BannerItemV2 {
84
135
  text: string;
85
- className: string;
136
+ className?: string;
137
+ linkClassName?: string;
86
138
  enabled: DynamicEnabled;
139
+ href?: string;
140
+ icon?: "bend";
141
+ paths?: string[];
142
+ variant?: "info" | "warning" | "bend" | "honey" | "hub";
143
+ }
144
+ interface StandardBannerItem {
145
+ enabled: DynamicEnabled;
146
+ type: "rpc" | "bepolia" | "slow";
87
147
  }
88
148
 
89
149
  /**
@@ -95,40 +155,41 @@ interface BannerItem {
95
155
  * @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
96
156
  * @returns True if the flag is enabled for the given chain and environment, false otherwise.
97
157
  */
98
- declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, }?: {
158
+ declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
99
159
  chain?: ChainId;
100
160
  environment?: string;
161
+ app?: AppName$1;
101
162
  }): boolean;
102
163
 
103
164
  /**
104
- * Safely retrieves a value from the Vercel Edge Config by key.
165
+ * Safely retrieves all values from the Vercel Edge Config.
105
166
  *
106
- * @template T - The key of the EdgeConfigSchema to retrieve.
107
- * @param flagName - The name of the config flag to retrieve.
167
+ * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
108
168
  * @param options - Optional parameters.
109
169
  * @param options.chain - The chain ID to check against (not currently used).
110
170
  * @param options.environment - The environment to check against (not currently used).
111
171
  * @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.
172
+ * @returns A promise that resolves to the config object, or undefined if retrieval fails.
113
173
  */
114
- declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
115
- chain?: ChainId;
116
- environment?: string;
174
+ declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
117
175
  onError?: (error: unknown) => void;
118
- }): Promise<EdgeConfigSchema[T] | undefined>;
176
+ }): Promise<T | undefined>;
119
177
 
120
178
  /**
121
- * Safely retrieves all values from the Vercel Edge Config.
179
+ * Safely retrieves a value from the Vercel Edge Config by key.
122
180
  *
123
- * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
181
+ * @template T - The key of the EdgeConfigSchema to retrieve.
182
+ * @param flagName - The name of the config flag to retrieve.
124
183
  * @param options - Optional parameters.
125
184
  * @param options.chain - The chain ID to check against (not currently used).
126
185
  * @param options.environment - The environment to check against (not currently used).
127
186
  * @param options.onError - Optional error handler callback.
128
- * @returns A promise that resolves to the config object, or undefined if retrieval fails.
187
+ * @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
129
188
  */
130
- declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
189
+ declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
190
+ chain?: ChainId;
191
+ environment?: string;
131
192
  onError?: (error: unknown) => void;
132
- }): Promise<T | undefined>;
193
+ }): Promise<EdgeConfigSchema[T] | undefined>;
133
194
 
134
- export { type Address, type BannerItem, type DynamicEnabled, type EdgeConfigSchema, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
195
+ 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,54 @@ 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
+ $schema?: string;
34
+ flags: {
25
35
  [k: string]: DynamicEnabled;
26
36
  };
27
- pol?: {
37
+ bex: {
38
+ /**
39
+ * An object of aggregators and their enabled status. The key is the aggregator name in lowercase and without spaces and must be in the Aggregators enum.
40
+ */
41
+ aggregators?: {
42
+ [k: string]: DynamicEnabled;
43
+ };
44
+ /**
45
+ * Labels for the emergency messages and banners. (e.g. pool or vaults are paused)
46
+ */
47
+ emergencyLabels?: {
48
+ /**
49
+ * This interface was referenced by `undefined`'s JSON-Schema definition
50
+ * via the `patternProperty` "^(vaultPaused|poolRecovery|poolPaused|poolInRecoveryMode|poolPausedAndInRecoveryMode)$".
51
+ */
52
+ [k: string]: {
53
+ title?: string;
54
+ description?: string;
55
+ banner?: string;
56
+ };
57
+ };
58
+ /**
59
+ * If true, weighted pool creation will be disabled.
60
+ */
61
+ disableWeightedPoolCreation?: boolean;
62
+ };
63
+ pol: {
28
64
  /**
29
65
  * @minItems 2
30
66
  */
@@ -49,17 +85,26 @@ interface EdgeConfigSchema {
49
85
  */
50
86
  swberaAprWindow?: "DAY" | "WEEK";
51
87
  };
52
- dex?: {
88
+ honey: {
53
89
  /**
54
- * 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.
90
+ * Object containing the collateral order for mainnet & bepolia.
55
91
  */
56
- aggregators?: {
57
- [k: string]: DynamicEnabled;
92
+ preferredCollateralOrder?: {
93
+ mainnet: {
94
+ address: Address;
95
+ _label?: string;
96
+ }[];
97
+ bepolia: {
98
+ address: Address;
99
+ _label?: string;
100
+ }[];
58
101
  };
102
+ /**
103
+ * The label for the Honey protocol paused message.
104
+ */
105
+ pausedBannerLabel?: string;
59
106
  };
60
- banners?: {
61
- [k: string]: BannerItem;
62
- };
107
+ banners: MixedBannerItem[];
63
108
  maintenance?: {
64
109
  /**
65
110
  * This interface was referenced by `undefined`'s JSON-Schema definition
@@ -70,20 +115,35 @@ interface EdgeConfigSchema {
70
115
  [k: string]: unknown;
71
116
  };
72
117
  };
118
+ wagmi: {
119
+ /**
120
+ * The list of external chains that are approved for multi chain zapping.
121
+ */
122
+ externalChainList: {
123
+ chainId: number;
124
+ _name?: string;
125
+ enabled: DynamicEnabled;
126
+ }[];
127
+ };
73
128
  }
74
129
  interface VaultItem {
75
130
  address: Address;
76
131
  enabled: DynamicEnabled;
77
132
  _name?: string;
78
133
  }
79
- /**
80
- * This interface was referenced by `undefined`'s JSON-Schema definition
81
- * via the `patternProperty` "^(hub|honey|bridge|boyco)$".
82
- */
83
- interface BannerItem {
134
+ interface BannerItemV2 {
84
135
  text: string;
85
- className: string;
136
+ className?: string;
137
+ linkClassName?: string;
86
138
  enabled: DynamicEnabled;
139
+ href?: string;
140
+ icon?: "bend";
141
+ paths?: string[];
142
+ variant?: "info" | "warning" | "bend" | "honey" | "hub";
143
+ }
144
+ interface StandardBannerItem {
145
+ enabled: DynamicEnabled;
146
+ type: "rpc" | "bepolia" | "slow";
87
147
  }
88
148
 
89
149
  /**
@@ -95,40 +155,41 @@ interface BannerItem {
95
155
  * @param options.environment - The environment to check against (defaults to process.env.VERCEL_TARGET_ENV).
96
156
  * @returns True if the flag is enabled for the given chain and environment, false otherwise.
97
157
  */
98
- declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, }?: {
158
+ declare function isFlagEnabled(flag: DynamicEnabled, { chain, environment, app, }?: {
99
159
  chain?: ChainId;
100
160
  environment?: string;
161
+ app?: AppName$1;
101
162
  }): boolean;
102
163
 
103
164
  /**
104
- * Safely retrieves a value from the Vercel Edge Config by key.
165
+ * Safely retrieves all values from the Vercel Edge Config.
105
166
  *
106
- * @template T - The key of the EdgeConfigSchema to retrieve.
107
- * @param flagName - The name of the config flag to retrieve.
167
+ * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
108
168
  * @param options - Optional parameters.
109
169
  * @param options.chain - The chain ID to check against (not currently used).
110
170
  * @param options.environment - The environment to check against (not currently used).
111
171
  * @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.
172
+ * @returns A promise that resolves to the config object, or undefined if retrieval fails.
113
173
  */
114
- declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
115
- chain?: ChainId;
116
- environment?: string;
174
+ declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
117
175
  onError?: (error: unknown) => void;
118
- }): Promise<EdgeConfigSchema[T] | undefined>;
176
+ }): Promise<T | undefined>;
119
177
 
120
178
  /**
121
- * Safely retrieves all values from the Vercel Edge Config.
179
+ * Safely retrieves a value from the Vercel Edge Config by key.
122
180
  *
123
- * @template T - The type of the config schema to retrieve (defaults to EdgeConfigSchema).
181
+ * @template T - The key of the EdgeConfigSchema to retrieve.
182
+ * @param flagName - The name of the config flag to retrieve.
124
183
  * @param options - Optional parameters.
125
184
  * @param options.chain - The chain ID to check against (not currently used).
126
185
  * @param options.environment - The environment to check against (not currently used).
127
186
  * @param options.onError - Optional error handler callback.
128
- * @returns A promise that resolves to the config object, or undefined if retrieval fails.
187
+ * @returns A promise that resolves to the value of the config flag, or undefined if retrieval fails.
129
188
  */
130
- declare function safeGetAll<T = EdgeConfigSchema>({ onError, }?: {
189
+ declare function safeGetConfig<T extends keyof EdgeConfigSchema>(flagName: T, { onError, }?: {
190
+ chain?: ChainId;
191
+ environment?: string;
131
192
  onError?: (error: unknown) => void;
132
- }): Promise<T | undefined>;
193
+ }): Promise<EdgeConfigSchema[T] | undefined>;
133
194
 
134
- export { type Address, type BannerItem, type DynamicEnabled, type EdgeConfigSchema, type VaultItem, isFlagEnabled, safeGetAll, safeGetConfig };
195
+ 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:()=>h,isDefaultStakingPoolEnabled:()=>E,isEmbeddedWalletsEnabled:()=>f,isGovernanceEnabled:()=>s,isHoneyPythWrapperEnabled:()=>m,isMultiChainZapBendEnabled:()=>k,isPoolsMerged:()=>V,isRefundInExplorer:()=>b,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()}),b=_next.flag.call(void 0, {key:"isRefundInExplorer",description:"Show Refund link in the Explorer dropdown",defaultValue:!1,adapter:e()}),f=_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()}),h=_next.flag.call(void 0, {key:"isBendVaultDataHourly",description:"Enable bend vault data to be fetched hourly",defaultValue:!0,adapter:e()}),m=_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()}),k=_next.flag.call(void 0, {key:"isMultiChainZapBendEnabled",description:"Enable multi chain zap for Bend",defaultValue:!1,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,28 @@ 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>;
20
+ declare const isMultiChainZapBendEnabled: flags_next.Flag<boolean, any>;
15
21
 
22
+ declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
16
23
  declare const flags_enableEip5792: typeof enableEip5792;
24
+ declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
17
25
  declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
18
- declare const flags_isBendLive: typeof isBendLive;
26
+ declare const flags_isBendNew: typeof isBendNew;
27
+ declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
19
28
  declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
29
+ declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
20
30
  declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
21
- declare const flags_isRewardAllocatorRoleActive: typeof isRewardAllocatorRoleActive;
22
- declare const flags_isVaultChartsEnabled: typeof isVaultChartsEnabled;
31
+ declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
32
+ declare const flags_isMultiChainZapBendEnabled: typeof isMultiChainZapBendEnabled;
33
+ declare const flags_isPoolsMerged: typeof isPoolsMerged;
34
+ declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
23
35
  declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
24
36
  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 };
37
+ 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_isMultiChainZapBendEnabled as isMultiChainZapBendEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
26
38
  }
27
39
 
28
40
  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,28 @@ 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>;
20
+ declare const isMultiChainZapBendEnabled: flags_next.Flag<boolean, any>;
15
21
 
22
+ declare const flags_enableBexFundsRecovery: typeof enableBexFundsRecovery;
16
23
  declare const flags_enableEip5792: typeof enableEip5792;
24
+ declare const flags_enableSimulateCalls: typeof enableSimulateCalls;
17
25
  declare const flags_hideStakeForSingleHolderVaults: typeof hideStakeForSingleHolderVaults;
18
- declare const flags_isBendLive: typeof isBendLive;
26
+ declare const flags_isBendNew: typeof isBendNew;
27
+ declare const flags_isBendVaultDataHourly: typeof isBendVaultDataHourly;
19
28
  declare const flags_isDefaultStakingPoolEnabled: typeof isDefaultStakingPoolEnabled;
29
+ declare const flags_isEmbeddedWalletsEnabled: typeof isEmbeddedWalletsEnabled;
20
30
  declare const flags_isGovernanceEnabled: typeof isGovernanceEnabled;
21
- declare const flags_isRewardAllocatorRoleActive: typeof isRewardAllocatorRoleActive;
22
- declare const flags_isVaultChartsEnabled: typeof isVaultChartsEnabled;
31
+ declare const flags_isHoneyPythWrapperEnabled: typeof isHoneyPythWrapperEnabled;
32
+ declare const flags_isMultiChainZapBendEnabled: typeof isMultiChainZapBendEnabled;
33
+ declare const flags_isPoolsMerged: typeof isPoolsMerged;
34
+ declare const flags_isRefundInExplorer: typeof isRefundInExplorer;
23
35
  declare const flags_proxyAggregatorsThroughVercel: typeof proxyAggregatorsThroughVercel;
24
36
  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 };
37
+ 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_isMultiChainZapBendEnabled as isMultiChainZapBendEnabled, flags_isPoolsMerged as isPoolsMerged, flags_isRefundInExplorer as isRefundInExplorer, flags_proxyAggregatorsThroughVercel as proxyAggregatorsThroughVercel };
26
38
  }
27
39
 
28
40
  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:()=>h,isDefaultStakingPoolEnabled:()=>E,isEmbeddedWalletsEnabled:()=>f,isGovernanceEnabled:()=>s,isHoneyPythWrapperEnabled:()=>m,isMultiChainZapBendEnabled:()=>k,isPoolsMerged:()=>V,isRefundInExplorer:()=>b,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()}),b=a({key:"isRefundInExplorer",description:"Show Refund link in the Explorer dropdown",defaultValue:!1,adapter:e()}),f=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()}),h=a({key:"isBendVaultDataHourly",description:"Enable bend vault data to be fetched hourly",defaultValue:!0,adapter:e()}),m=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()}),k=a({key:"isMultiChainZapBendEnabled",description:"Enable multi chain zap for Bend",defaultValue:!1,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 _chunkWNGB3G3Vcjs = require('../chunk-WNGB3G3V.cjs');require('../chunk-MHNEK2A2.cjs');require('../chunk-32CWUFQY.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 v({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/","wss://www.walletlink.org/rpc",`https://*.dynamicauth.com/api/v0/sdk/${_chunkWNGB3G3Vcjs.b.apiKeys.public.dynamicWallet}/`,`https://logs.dynamicauth.com/api/v1/${_chunkWNGB3G3Vcjs.b.apiKeys.public.dynamicWallet}`,"https://dynamic-static-assets.com/wallet-book/v1/","https://*.thirdweb.com/","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,_chunkWNGB3G3Vcjs.b.governance.subgraph,_chunkWNGB3G3Vcjs.b.honey.subgraph,_chunkWNGB3G3Vcjs.b.pol.subgraph,_chunkWNGB3G3Vcjs.b.pol.bribeBoostApi,_chunkWNGB3G3Vcjs.b.bex.subgraph,_chunkWNGB3G3Vcjs.b.api,_chunkWNGB3G3Vcjs.b.blocksSubgraph,_chunkZYHYMHGNcjs.e,_chunkZYHYMHGNcjs.d,_chunkZYHYMHGNcjs.f,"https://open-api.openocean.finance/","https://api.haiku.trade/","https://api.magpiefi.xyz/",`${_chunkWNGB3G3Vcjs.b.bex.aggregatorsProxyUrl}/`,"wss://relay.walletconnect.com/","wss://relay.walletconnect.org/","https://verify.walletconnect.org/v3/public-key","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://api-mainnet.layerzero-scan.com/","https://api-testnet.layerzero-scan.com/","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://eth.merkle.io","https://mainnet.base.org/","https://api.enso.finance/","wss://www.walletlink.org/rpc"].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://static.debank.com/","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://embedded-wallet.thirdweb.com/","https://*.posthog.com","https://vercel.live/","https://id.porto.sh"].concat(_nullishCoalesce(o.frameSources, () => ([]))),w=["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, () => ([]))),k=["https://*.posthog.com","https://vercel.live"].concat(_nullishCoalesce(o.styleSources, () => ([]))),m=`
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' ${w.join(" ")};
9
+ style-src 'self' ${k.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&&(m+=`
14
+ report-uri ${s};
15
+ report-to csp-endpoint;
16
+ `),m.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 z({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:v({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 = z; exports.getContentSecurityPolicy = v; 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 };