@berachain/config 0.1.22 → 0.1.24-beta.0

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 (88) hide show
  1. package/dist/bepolia.d.ts +3 -5
  2. package/dist/bepolia.d.ts.map +1 -0
  3. package/dist/index.d.ts +3 -6
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/internal/edge-config/{index.d.cts → edgeConfig.codegen.d.ts} +14 -63
  6. package/dist/internal/edge-config/edgeConfig.codegen.d.ts.map +1 -0
  7. package/dist/internal/edge-config/index.d.ts +5 -393
  8. package/dist/internal/edge-config/index.d.ts.map +1 -0
  9. package/dist/internal/edge-config/isFlagEnabled.d.ts +17 -0
  10. package/dist/internal/edge-config/isFlagEnabled.d.ts.map +1 -0
  11. package/dist/internal/edge-config/safeGetAll.d.ts +15 -0
  12. package/dist/internal/edge-config/safeGetAll.d.ts.map +1 -0
  13. package/dist/internal/edge-config/safeGetConfig.d.ts +19 -0
  14. package/dist/internal/edge-config/safeGetConfig.d.ts.map +1 -0
  15. package/dist/internal/flags/beraEdgeConfigAdapter.d.ts +9 -0
  16. package/dist/internal/flags/beraEdgeConfigAdapter.d.ts.map +1 -0
  17. package/dist/internal/flags/flags.d.ts +29 -0
  18. package/dist/internal/flags/flags.d.ts.map +1 -0
  19. package/dist/internal/flags/index.d.ts +2 -60
  20. package/dist/internal/flags/index.d.ts.map +1 -0
  21. package/dist/internal/header-sources.cjs +4 -6
  22. package/dist/internal/header-sources.d.ts +14 -8
  23. package/dist/internal/header-sources.d.ts.map +1 -0
  24. package/dist/internal/header-sources.mjs +4 -6
  25. package/dist/internal/index.d.ts +139 -173
  26. package/dist/internal/index.d.ts.map +1 -0
  27. package/dist/internal/maintenance.d.ts +5 -7
  28. package/dist/internal/maintenance.d.ts.map +1 -0
  29. package/dist/internal/nextjs/const.d.ts +3 -0
  30. package/dist/internal/nextjs/const.d.ts.map +1 -0
  31. package/dist/internal/nextjs/index.cjs +2 -2
  32. package/dist/internal/nextjs/index.d.ts +5 -6
  33. package/dist/internal/nextjs/index.d.ts.map +1 -0
  34. package/dist/internal/nextjs/index.mjs +1 -1
  35. package/dist/internal/nextjs/utils/index.cjs +3 -1
  36. package/dist/internal/nextjs/utils/index.d.ts +2 -3
  37. package/dist/internal/nextjs/utils/index.d.ts.map +1 -0
  38. package/dist/internal/nextjs/utils/index.mjs +3 -1
  39. package/dist/internal/sentry/getSentryKeys.d.ts +16 -0
  40. package/dist/internal/sentry/getSentryKeys.d.ts.map +1 -0
  41. package/dist/internal/sentry/index.cjs +2 -2
  42. package/dist/internal/sentry/index.d.ts +6 -8
  43. package/dist/internal/sentry/index.d.ts.map +1 -0
  44. package/dist/internal/sentry/index.mjs +1 -1
  45. package/dist/internal/sentry/sentry.client.config.d.ts +3 -6
  46. package/dist/internal/sentry/sentry.client.config.d.ts.map +1 -0
  47. package/dist/internal/sentry/sentry.edge.config.d.ts +3 -0
  48. package/dist/internal/sentry/sentry.edge.config.d.ts.map +1 -0
  49. package/dist/internal/sentry/sentry.server.config.d.ts +3 -0
  50. package/dist/internal/sentry/sentry.server.config.d.ts.map +1 -0
  51. package/dist/internal/sentry/sentryEnvironment.d.ts +6 -0
  52. package/dist/internal/sentry/sentryEnvironment.d.ts.map +1 -0
  53. package/dist/internal/tailwind/{index.d.cts → config.d.ts} +14 -16
  54. package/dist/internal/tailwind/config.d.ts.map +1 -0
  55. package/dist/internal/tailwind/index.d.ts +6 -8
  56. package/dist/internal/tailwind/index.d.ts.map +1 -0
  57. package/dist/internal/wagmi/index.d.ts +6 -8
  58. package/dist/internal/wagmi/index.d.ts.map +1 -0
  59. package/dist/mainnet.d.ts +3 -5
  60. package/dist/mainnet.d.ts.map +1 -0
  61. package/dist/{types-Drv0VlAi.d.cts → types.d.ts} +8 -8
  62. package/dist/types.d.ts.map +1 -0
  63. package/dist/utils/dynamicEnvVariable.d.ts +21 -0
  64. package/dist/utils/dynamicEnvVariable.d.ts.map +1 -0
  65. package/dist/utils/env.d.ts +29 -0
  66. package/dist/utils/env.d.ts.map +1 -0
  67. package/dist/utils/getUriFromLink.d.ts +3 -0
  68. package/dist/utils/getUriFromLink.d.ts.map +1 -0
  69. package/package.json +9 -8
  70. package/dist/bepolia.d.cts +0 -169
  71. package/dist/index.d.cts +0 -6
  72. package/dist/internal/flags/index.d.cts +0 -60
  73. package/dist/internal/header-sources.d.cts +0 -22
  74. package/dist/internal/index.d.cts +0 -749
  75. package/dist/internal/maintenance.d.cts +0 -11
  76. package/dist/internal/nextjs/index.d.cts +0 -34
  77. package/dist/internal/nextjs/utils/index.d.cts +0 -9
  78. package/dist/internal/sentry/index.d.cts +0 -13
  79. package/dist/internal/sentry/sentry.client.config.d.cts +0 -6
  80. package/dist/internal/tsup/index.cjs +0 -73
  81. package/dist/internal/tsup/index.d.cts +0 -6
  82. package/dist/internal/tsup/index.d.ts +0 -6
  83. package/dist/internal/tsup/index.mjs +0 -73
  84. package/dist/internal/wagmi/index.d.cts +0 -12
  85. package/dist/mainnet.d.cts +0 -154
  86. package/dist/types-Drv0VlAi.d.ts +0 -214
  87. /package/dist/{chunk-UOFOM6N7.cjs → chunk-3NQ3NFWW.cjs} +0 -0
  88. /package/dist/{chunk-EGAVWXNC.mjs → chunk-4UCGQIWY.mjs} +0 -0
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Parses the Sentry DSN and returns the keys and csp endpoint.
3
+ *
4
+ * NEXT_PUBLIC_SENTRY_DSN is usually set by Sentry Vercel integration.
5
+ */
6
+ export declare function getSentryKeys({ dsn, }?: {
7
+ dsn?: string;
8
+ }): {
9
+ dsn: string;
10
+ projectId: string;
11
+ deprecatedSecret: string | undefined;
12
+ cspEndpoint: URL;
13
+ org: string;
14
+ publicKey: string;
15
+ } | undefined;
16
+ //# sourceMappingURL=getSentryKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSentryKeys.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/getSentryKeys.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAwC,GACzC,GAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;CACT;;;;;;;cAuCL"}
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkUOFOM6N7cjs = require('../../chunk-UOFOM6N7.cjs');
5
+ var _chunk3NQ3NFWWcjs = require('../../chunk-3NQ3NFWW.cjs');
6
6
  require('../../chunk-75ZPJI57.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.onRequestError = _chunkUOFOM6N7cjs.onRequestError; exports.registerSentry = _chunkUOFOM6N7cjs.registerSentry; exports.withSentryConfig = _chunkUOFOM6N7cjs.withSentryConfig;
11
+ exports.onRequestError = _chunk3NQ3NFWWcjs.onRequestError; exports.registerSentry = _chunk3NQ3NFWWcjs.registerSentry; exports.withSentryConfig = _chunk3NQ3NFWWcjs.withSentryConfig;
@@ -1,13 +1,11 @@
1
- import * as Sentry from '@sentry/nextjs';
2
- import { NextConfig } from 'next';
3
-
1
+ import * as Sentry from "@sentry/nextjs";
2
+ import type { NextConfig } from "next";
4
3
  /**
5
4
  * This function registers Sentry in nextjs instrumentation.
6
5
  *
7
6
  * @link https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files
8
7
  */
9
- declare function registerSentry(opt?: Parameters<typeof Sentry.init>[0]): Promise<void>;
10
- declare function withSentryConfig(config: NextConfig): NextConfig;
11
- declare const onRequestError: typeof Sentry.captureRequestError;
12
-
13
- export { onRequestError, registerSentry, withSentryConfig };
8
+ export declare function registerSentry(opt?: Parameters<typeof Sentry.init>[0]): Promise<void>;
9
+ export declare function withSentryConfig(config: NextConfig): NextConfig;
10
+ export declare const onRequestError: typeof Sentry.captureRequestError;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,GAAG,GAAE,UAAU,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAM,iBAa5C;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,cAoElD;AAED,eAAO,MAAM,cAAc,mCAA6B,CAAC"}
@@ -2,7 +2,7 @@ import {
2
2
  onRequestError,
3
3
  registerSentry,
4
4
  withSentryConfig
5
- } from "../../chunk-EGAVWXNC.mjs";
5
+ } from "../../chunk-4UCGQIWY.mjs";
6
6
  import "../../chunk-7P6ASYW6.mjs";
7
7
  export {
8
8
  onRequestError,
@@ -1,6 +1,3 @@
1
- import * as _sentry_core from '@sentry/core';
2
- import * as Sentry from '@sentry/nextjs';
3
-
4
- declare function initSentryClient(Sentry: typeof Sentry, opt?: Sentry.BrowserOptions): _sentry_core.Client<_sentry_core.ClientOptions<_sentry_core.BaseTransportOptions>> | undefined;
5
-
6
- export { initSentryClient };
1
+ import type * as SentryType from "@sentry/nextjs";
2
+ export declare function initSentryClient(Sentry: typeof SentryType, opt?: SentryType.BrowserOptions): import("@sentry/core").Client<import("@sentry/core").ClientOptions<import("@sentry/core").BaseTransportOptions>> | undefined;
3
+ //# sourceMappingURL=sentry.client.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.client.config.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/sentry.client.config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAelD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,OAAO,UAAU,EACzB,GAAG,GAAE,UAAU,CAAC,cAAmB,gIAoDpC"}
@@ -0,0 +1,3 @@
1
+ import type * as SentryType from "@sentry/nextjs";
2
+ export declare function initSentryEdge(Sentry: typeof SentryType, opt?: SentryType.EdgeOptions): import("@sentry/core").Client<import("@sentry/core").ClientOptions<import("@sentry/core").BaseTransportOptions>> | undefined;
3
+ //# sourceMappingURL=sentry.edge.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.edge.config.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/sentry.edge.config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAIlD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,OAAO,UAAU,EACzB,GAAG,GAAE,UAAU,CAAC,WAAgB,gIAajC"}
@@ -0,0 +1,3 @@
1
+ import type * as SentryType from "@sentry/nextjs";
2
+ export declare function initSentryServer(Sentry: typeof SentryType, opt?: SentryType.NodeOptions): import("@sentry/core").Client<import("@sentry/core").ClientOptions<import("@sentry/core").BaseTransportOptions>> | undefined;
3
+ //# sourceMappingURL=sentry.server.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.server.config.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/sentry.server.config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAIlD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,OAAO,UAAU,EACzB,GAAG,GAAE,UAAU,CAAC,WAAgB,gIAcjC"}
@@ -0,0 +1,6 @@
1
+ declare let sentryEnvironment: string;
2
+ export { sentryEnvironment };
3
+ export declare const tracesSampleRate: number;
4
+ export declare const sentryRelease: string;
5
+ export declare const sentryDebug: boolean;
6
+ //# sourceMappingURL=sentryEnvironment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentryEnvironment.d.ts","sourceRoot":"","sources":["../../../src/internal/sentry/sentryEnvironment.ts"],"names":[],"mappings":"AAIA,QAAA,IAAI,iBAAiB,QAAwD,CAAC;AAU9E,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,eAAO,MAAM,gBAAgB,QAAyB,CAAC;AAEvD,eAAO,MAAM,aAAa,QAAoC,CAAC;AAE/D,eAAO,MAAM,WAAW,SAAkD,CAAC"}
@@ -1,17 +1,13 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
- import typography from '@tailwindcss/typography';
3
-
4
- declare const config: {
5
- plugins: ({
6
- handler: tailwindcss_types_config.PluginCreator;
7
- config?: Partial<tailwindcss_types_config.Config> | undefined;
8
- } | typeof typography | {
9
- handler: () => void;
10
- })[];
11
- darkMode: ["class"];
12
- safelist: ["dark", "light"];
13
- content: ["src/**/*.{js,ts,jsx,tsx,mdx}", "../../packages/ui/src/*.{ts,tsx}", "../../packages/ui/src/**/*.{ts,tsx}", "../../packages/shared-ui/src/*.{ts,tsx}", "../../packages/shared-ui/src/**/*.{ts,tsx}"];
14
- theme: {
1
+ /**
2
+ * This is the tailwind config without any use of require().
3
+ * This makes it easier to import it in storybook. It should not be imported
4
+ * by projects. It still can have plugin configs though as long as `require` is not used.
5
+ */
6
+ export declare const configWithNoPlugins: {
7
+ readonly darkMode: ["class"];
8
+ readonly safelist: ["dark", "light"];
9
+ readonly content: ["src/**/*.{js,ts,jsx,tsx,mdx}", "../../packages/ui/src/*.{ts,tsx}", "../../packages/ui/src/**/*.{ts,tsx}", "../../packages/shared-ui/src/*.{ts,tsx}", "../../packages/shared-ui/src/**/*.{ts,tsx}"];
10
+ readonly theme: {
15
11
  readonly fontSize: {
16
12
  readonly xs: ["0.75rem", {
17
13
  readonly lineHeight: "1rem";
@@ -53,6 +49,9 @@ declare const config: {
53
49
  readonly "9xl": ["8rem", {
54
50
  readonly lineHeight: "1";
55
51
  }];
52
+ /**
53
+ * Typography sizes
54
+ */
56
55
  readonly h1: ["3rem", {
57
56
  readonly lineHeight: "3.5rem";
58
57
  readonly fontWeight: "700";
@@ -253,5 +252,4 @@ declare const config: {
253
252
  };
254
253
  };
255
254
  };
256
-
257
- export { config, config as default };
255
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/tailwind/config.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA0B1B;;eAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LkB,CAAC"}
@@ -1,10 +1,8 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
- import typography from '@tailwindcss/typography';
3
-
4
- declare const config: {
1
+ import typography from "@tailwindcss/typography";
2
+ export declare const config: {
5
3
  plugins: ({
6
- handler: tailwindcss_types_config.PluginCreator;
7
- config?: Partial<tailwindcss_types_config.Config> | undefined;
4
+ handler: import("tailwindcss/types/config").PluginCreator;
5
+ config?: Partial<import("tailwindcss/types/config").Config> | undefined;
8
6
  } | typeof typography | {
9
7
  handler: () => void;
10
8
  })[];
@@ -253,5 +251,5 @@ declare const config: {
253
251
  };
254
252
  };
255
253
  };
256
-
257
- export { config, config as default };
254
+ export default config;
255
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/tailwind/index.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAMjD,eAAO,MAAM,MAAM;;wBAP2B,0BACrC;gCACL,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQZ,CAAC;AAEnB,eAAe,MAAM,CAAC"}
@@ -1,12 +1,10 @@
1
- import { Chain } from 'viem/chains';
2
-
3
- declare const defaultChain: Chain;
4
- declare const urls: string[];
1
+ import { type Chain } from "viem/chains";
2
+ export declare const defaultChain: Chain;
3
+ export declare const urls: string[];
5
4
  /**
6
5
  * This are the chains that have been approved by the Bera team to be used in the BeraHub,
7
6
  * for multi chain zapping.
8
7
  */
9
- declare const externalChains: Chain[];
10
- declare const chainIdToName: Record<Chain["id"], string>;
11
-
12
- export { chainIdToName, defaultChain, externalChains, urls };
8
+ export declare const externalChains: Chain[];
9
+ export declare const chainIdToName: Record<Chain["id"], string>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/wagmi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,KAAK,EAIX,MAAM,aAAa,CAAC;AAUrB,eAAO,MAAM,YAAY,EAAE,KACqC,CAAC;AAEjE,eAAO,MAAM,IAAI,EAKI,MAAM,EAAE,CAAC;AAC9B;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,EAQjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,CAUrD,CAAC"}
package/dist/mainnet.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { C as ChainId } from './types-Drv0VlAi.js';
2
-
3
- declare const mainnet: {
1
+ import { ChainId } from "./types";
2
+ export declare const mainnet: {
4
3
  readonly chainId: ChainId.MAINNET;
5
4
  readonly tokens: {
6
5
  readonly wbera: "0x6969696969696969696969696969696969696969";
@@ -150,5 +149,4 @@ declare const mainnet: {
150
149
  };
151
150
  readonly faucet: null;
152
151
  };
153
-
154
- export { mainnet };
152
+ //# sourceMappingURL=mainnet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainnet.d.ts","sourceRoot":"","sources":["../src/mainnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,OAAO,EAAE,MAAM,SAAS,CAAC;AAGjE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAsJQ,KAAK,MAAM,EAAE,EAAE;oCAMf,KAAK,MAAM,EAAE,EAAE;;;;;;;;;sCAcf,KAAK,MAAM,EAAE,EAAE;oCAKf,KAAK,MAAM,EAAE,EAAE;;;;;;;;;;;;;;;;;;;CAmBZ,CAAC"}
@@ -1,15 +1,15 @@
1
- type Address = `0x${string}`;
1
+ export type Address = `0x${string}`;
2
2
  /**
3
3
  * List of app names in monobera. For a broader list of project names, see ProjectNames.
4
4
  *
5
5
  * All of these projects have a nextjs set up with `withBeraConfig` and have access to edge config.
6
6
  */
7
- type AppName = "BeraHub" | "Honey" | "Bend";
7
+ export type AppName = "BeraHub" | "Honey" | "Bend";
8
8
  /**
9
9
  * List of projects.
10
10
  */
11
- type ProjectName = AppName | "BeraBridge" | "Faucet" | "BeraBridge NFT" | "Berachain Foundation" | "Explore" | "Berascan";
12
- type HttpLink = string | {
11
+ export type ProjectName = AppName | "BeraBridge" | "Faucet" | "BeraBridge NFT" | "Berachain Foundation" | "Explore" | "Berascan";
12
+ export type HttpLink = string | {
13
13
  uri: string;
14
14
  headers?: Record<string, string>;
15
15
  /**
@@ -40,7 +40,7 @@ type BendAddresses = {
40
40
  supportedVaults: Array<Address>;
41
41
  curatorVaults: Array<Address>;
42
42
  };
43
- interface BeraConfig {
43
+ export interface BeraConfig {
44
44
  chainId: ChainId;
45
45
  /**
46
46
  * Some common token addresses available on the chain.
@@ -206,9 +206,9 @@ interface BeraConfig {
206
206
  endpoint: string;
207
207
  }) | null;
208
208
  }
209
- declare enum ChainId {
209
+ export declare enum ChainId {
210
210
  MAINNET = 80094,
211
211
  BEPOLIA = 80069
212
212
  }
213
-
214
- export { type Address as A, type BeraConfig as B, ChainId as C, type HttpLink as H, type ProjectName as P, type AppName as a };
213
+ export {};
214
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAEpC;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,gBAAgB,GAChB,sBAAsB,GACtB,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN;;GAEG;AACH,KAAK,OAAO,GAAG;IACb;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,eAAe,EAA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CAAC;QAChC,sBAAsB,EAAE,OAAO,GAAG,IAAI,CAAC;KACxC,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE;QACL;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF;;;;OAIG;IACH,MAAM,EACF,CAAC,OAAO,GAAG;QACT;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,GACF,IAAI,CAAC;CACV;AAED,oBAAY,OAAO;IACjB,OAAO,QAAQ;IACf,OAAO,QAAQ;CAChB"}
@@ -0,0 +1,21 @@
1
+ import { type AppName, ChainId } from "../types";
2
+ declare const defaultChainId: ChainId;
3
+ export { defaultChainId as chainId };
4
+ export declare const isProduction: boolean;
5
+ /**
6
+ * Environment is development if it is localhost.
7
+ */
8
+ export declare const isLocalHost: boolean;
9
+ /**
10
+ * Environment is preview if it is development or preview.
11
+ */
12
+ export declare const isPreview: boolean;
13
+ /**
14
+ * Environment is staging if it is development or staging.
15
+ */
16
+ export declare const isStaging: boolean;
17
+ /**
18
+ * Name of the current dapp. Available only if using `withBeraConfig` from @berachain/config/internal/nextjs.
19
+ */
20
+ export declare const currentDapp: AppName | undefined;
21
+ //# sourceMappingURL=dynamicEnvVariable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamicEnvVariable.d.ts","sourceRoot":"","sources":["../../src/utils/dynamicEnvVariable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIjD,QAAA,MAAM,cAAc,EAAE,OAEH,CAAC;AASpB,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,CAAC;AAErC,eAAO,MAAM,YAAY,SAAiD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW,SAAyC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,SAAS,SACsC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,SAAS,SAA8C,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,WAAW,EACpB,OAAO,GACP,SAAS,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Exporting here all variables that are used in the frontend.
3
+ * Avoids circular dependency with the config object.
4
+ */
5
+ import { ChainId } from "../types";
6
+ import { chainId } from "./dynamicEnvVariable";
7
+ export { chainId };
8
+ export declare const imageBaseUrl = "https://imagedelivery.net/qNj7Q3MCke89zoKzav7eDQ";
9
+ export declare const goldskyBaseUrl = "https://api.goldsky.com/api/public/project_clq1h5ct0g4a201x18tfte5iv/subgraphs/";
10
+ /**
11
+ * Returns the RPC URLs for the given chain ID. If anvil is set, it will just return the anvil RPC URLs.
12
+ */
13
+ export declare function getRpcUrls(chainId?: ChainId): {
14
+ publicJsonRpcUrl: string;
15
+ jsonRpcUrl: string;
16
+ alchemyJsonRpcUrl: string | undefined;
17
+ privateRcpUrl: string | undefined;
18
+ /**
19
+ * Whether the RPC URLs are for anvil.
20
+ */
21
+ isAnvil: boolean;
22
+ };
23
+ export declare const publicJsonRpcUrl: string, jsonRpcUrl: string, alchemyJsonRpcUrl: string | undefined,
24
+ /**
25
+ * Dedicated private RPC URL for server side with higher rate limits.
26
+ * Not available on client side.
27
+ */
28
+ privateRcpUrl: string | undefined;
29
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,CAAC;AAQnB,eAAO,MAAM,YAAY,qDAAqD,CAAC;AAE/E,eAAO,MAAM,cAAc,oFACwD,CAAC;AACpF;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,OAAyB,GAAG;IAC9D,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAkDA;AAED,eAAO,MACL,gBAAgB,UAChB,UAAU,UACV,iBAAiB;AACjB;;;GAGG;AACH,aAAa,oBACQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { HttpLink } from "../types";
2
+ export declare function getUriFromLink(link: HttpLink): string;
3
+ //# sourceMappingURL=getUriFromLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUriFromLink.d.ts","sourceRoot":"","sources":["../../src/utils/getUriFromLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAErD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@berachain/config",
3
- "version": "0.1.22",
3
+ "version": "0.1.24-beta.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -15,27 +15,28 @@
15
15
  "@tailwindcss/container-queries": "0.1.1",
16
16
  "@tailwindcss/typography": "0.5.16",
17
17
  "@types/node": "24.1.0",
18
- "next": "16.2.6",
19
18
  "json-schema-to-typescript": "15.0.4",
19
+ "next": "16.2.6",
20
20
  "tailwindcss": "3.4.17",
21
21
  "tailwindcss-animate": "1.0.7",
22
22
  "tsup": "8.5.1",
23
23
  "typescript": "5.5.4",
24
- "vitest": "3.2.6"
24
+ "vitest": "3.2.6",
25
+ "@berachain/utils": "^0.1.0"
25
26
  },
26
27
  "peerDependencies": {
27
28
  "@flags-sdk/edge-config": "0.1.0",
28
- "@vercel/edge-config": "1.4.3",
29
29
  "@sentry/nextjs": "^10.16",
30
30
  "@tailwindcss/aspect-ratio": "~0.4.2",
31
31
  "@tailwindcss/container-queries": "~0.4.1",
32
32
  "@tailwindcss/typography": "~0.5.15",
33
- "next": "^16.1",
34
- "viem": "^2.41.2",
35
- "flags": "4.0.6",
33
+ "@vercel/edge-config": "1.4.3",
36
34
  "dotenv": "16.6.1",
35
+ "flags": "4.0.6",
36
+ "next": "^16.1",
37
37
  "tailwindcss-animate": "1.0.7",
38
- "tsup": "^8.4.0"
38
+ "tsup": "^8.4.0",
39
+ "viem": "^2.41.2"
39
40
  },
40
41
  "peerDependenciesMeta": {
41
42
  "@flags-sdk/edge-config": {
@@ -1,169 +0,0 @@
1
- import { C as ChainId, A as Address } from './types-Drv0VlAi.cjs';
2
-
3
- declare const bepolia: {
4
- readonly chainId: ChainId.BEPOLIA;
5
- readonly tokens: {
6
- readonly wbera: "0x6969696969696969696969696969696969696969";
7
- readonly swbera: "0x118D2cEeE9785eaf70C15Cd74CD84c9f8c3EeC9a";
8
- readonly bgt: "0x656b95E550C07a9ffe548bd4085c72418Ceb1dba";
9
- readonly wbtc: "0x";
10
- readonly weth: "0x";
11
- };
12
- readonly depositContract: "0x4242424242424242424242424242424242424242";
13
- readonly pol: {
14
- readonly rewardVaultHelper: "0xEe233a69A36Db7fC10E03e921D90DEC52Cdce6e2";
15
- readonly beraChef: "0xdf960E8F3F19C481dDE769edEDD439ea1a63426a";
16
- readonly factory: "0x94Ad6Ac84f6C6FbA8b8CCbD71d9f4f101def52a8";
17
- readonly rewardAllocationFactory: "0x7f09Cf6958631513aF0400488F65c7B5c0313F52";
18
- readonly staker: "0x44F07Ce5AfeCbCC406e6beFD40cc2998eEb8c7C6";
19
- readonly subgraph: {
20
- readonly name: "pol-subgraph";
21
- readonly uri: string;
22
- readonly headers: {
23
- Authorization: string;
24
- } | undefined;
25
- };
26
- readonly bribeBoostApi: string;
27
- readonly supplyMonitor: {
28
- readonly name: "supply-monitor";
29
- readonly uri: string;
30
- };
31
- readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
32
- readonly lstStakerVaultFactory: "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178";
33
- };
34
- readonly api: {
35
- readonly name: "Berachain API";
36
- readonly uri: string;
37
- readonly headers: {
38
- "x-api-key": string;
39
- } | undefined;
40
- };
41
- readonly beep: {
42
- readonly name: "Berachain Beep";
43
- readonly uri: string;
44
- };
45
- readonly bex: {
46
- readonly chainName: "BEPOLIA";
47
- readonly vault: "0x708cA656b68A6b7384a488A36aD33505a77241FE";
48
- readonly helper: "0xC7c981ADcDC5d48fed0CD52807fb2bAB22676C8f";
49
- readonly queries: "0xE3723383a0EA73D5c0dE424BAA97F97f86f6cF92";
50
- readonly relayer: "0x343215E156Ff586711a5B8C49Fe3099BAF22624C";
51
- readonly factories: {
52
- readonly composableStable: "0xB60DbBaCEaeC23486a64d12089F467ef949f1bb1";
53
- readonly weighted: "0xf1d23276C7b271B2aC595C78977b2312E9954D57";
54
- };
55
- readonly poolCreationHelper: "0x0dC9964F6CA33d9EF38DEB4925234766127C6B36";
56
- readonly aggregatorsRouter: "0x0000000000000000000000000000000000000000";
57
- readonly aggregatorsRouterExecutor: "0x0000000000000000000000000000000000000000";
58
- readonly haikuRouter: null;
59
- readonly haikuAgentAddress: null;
60
- readonly aggregatorsProxyUrl: string;
61
- readonly recoverFundsApi: "https://t3stbe4i5d40p.testnet.berachain.com";
62
- readonly recoverFundsContract: "0x0eFeC4379805fAFA7269Ec599a6921f388C8841a";
63
- readonly balancerDelegatedOwnership: "0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b";
64
- };
65
- readonly honey: {
66
- readonly name: "Honey";
67
- readonly url: "https://bepolia.honey.berachain.com";
68
- readonly factory: "0xA4aFef880F5cE1f63c9fb48F661E27F8B4216401";
69
- readonly pythOracle: "0x5CA67e134c52B1d11E038A5a4eD8Ddcdb1238943";
70
- readonly pythWrapper: "0xE5Ad9BA751714ec8cdd554b5a9f12BFcA13980cB";
71
- readonly reader: "0x285e147060CDc5ba902786d3A471224ee6cE0F91";
72
- readonly token: "0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce";
73
- };
74
- readonly hub: {
75
- readonly name: "BeraHub";
76
- readonly url: "https://bepolia.hub.berachain.com";
77
- };
78
- readonly governance: {
79
- readonly governor: `0x${string}`;
80
- readonly timelock: `0x${string}`;
81
- };
82
- readonly lists: {
83
- readonly rewardVaultList: "https://raw.githubusercontent.com/berachain/metadata/refs/heads/main/src/vaults/bepolia.json";
84
- readonly tokenList: "https://raw.githubusercontent.com/berachain/metadata/refs/heads/main/src/tokens/bepolia.json";
85
- readonly validatorList: "https://raw.githubusercontent.com/berachain/metadata/refs/heads/main/src/validators/bepolia.json";
86
- };
87
- readonly external: {
88
- readonly pyth: "0x2880aB155794e7179c9eE2e38200202908C17B43";
89
- };
90
- readonly averageBlockTime: 2;
91
- readonly bridge: {
92
- readonly name: "BeraBridge";
93
- readonly url: "https://bepolia.bridge.berachain.com";
94
- readonly nft: {
95
- readonly name: "BeraBridge NFT";
96
- readonly url: "#";
97
- readonly eth: {
98
- readonly subgraph: "#";
99
- };
100
- readonly berachain: {
101
- readonly subgraph: "#";
102
- };
103
- };
104
- };
105
- readonly bend: {
106
- readonly name: "Bend";
107
- readonly url: "https://bepolia.bend.berachain.com";
108
- readonly whiskApi: null;
109
- readonly production: {
110
- readonly morpho: null;
111
- readonly adaptiveCurveIrm: null;
112
- readonly metaMorphoFactory: null;
113
- readonly publicAllocator: null;
114
- readonly bundler3: null;
115
- readonly generalAdapter1: null;
116
- readonly supportedVaults: Address[];
117
- readonly curatorVaults: Address[];
118
- };
119
- readonly staging: {
120
- readonly morpho: null;
121
- readonly adaptiveCurveIrm: null;
122
- readonly metaMorphoFactory: null;
123
- readonly publicAllocator: null;
124
- readonly bundler3: null;
125
- readonly generalAdapter1: null;
126
- readonly supportedVaults: Address[];
127
- readonly curatorVaults: Address[];
128
- };
129
- };
130
- readonly enso: {
131
- readonly walletV2Factory: null;
132
- readonly walletFlashloanAdapter: null;
133
- };
134
- readonly explore: {
135
- readonly name: "Explore";
136
- readonly url: "https://explore.berachain.com";
137
- };
138
- readonly explorer: {
139
- readonly name: "Berascan";
140
- readonly url: "https://testnet.berascan.com";
141
- };
142
- readonly chain: {
143
- readonly name: string;
144
- };
145
- /**
146
- * Public faucet configuration.
147
- *
148
- * Mainly used in static-monobera.
149
- */
150
- readonly faucet: {
151
- readonly name: "Faucet";
152
- readonly url: "https://bepolia.faucet.berachain.com";
153
- /**
154
- * Amount of BERA the user will receive when using the faucet
155
- */
156
- readonly dripAmount: 1;
157
- /**
158
- * Time in hours between each drip
159
- */
160
- readonly timeGap: 8;
161
- readonly cloudflareKey: string;
162
- /**
163
- * API endpoint to send the request to the faucet
164
- */
165
- readonly endpoint: "https://faucet-api.testnet.berachain.com";
166
- };
167
- };
168
-
169
- export { bepolia };
package/dist/index.d.cts DELETED
@@ -1,6 +0,0 @@
1
- import { H as HttpLink } from './types-Drv0VlAi.cjs';
2
- export { A as Address, a as AppName, B as BeraConfig, C as ChainId, P as ProjectName } from './types-Drv0VlAi.cjs';
3
-
4
- declare function getUriFromLink(link: HttpLink): string;
5
-
6
- export { HttpLink, getUriFromLink };