@xyo-network/xl1-protocol-sdk 1.26.42 → 1.26.44

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.
@@ -78,16 +78,16 @@ export declare const ActorConfigZod: z.ZodObject<{
78
78
  }, z.core.$strip>>;
79
79
  }, z.core.$strip>>;
80
80
  validation: z.ZodDefault<z.ZodObject<{
81
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
81
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
82
82
  readonly __hex: true;
83
83
  } & {
84
84
  readonly __address: true;
85
- }, string>>>>>;
86
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
85
+ }, string>>>>;
86
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
87
87
  readonly __hex: true;
88
88
  } & {
89
89
  readonly __address: true;
90
- }, string>>>>>;
90
+ }, string>>>>;
91
91
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
92
92
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
93
93
  }, z.core.$strip>>;
@@ -67,16 +67,16 @@ export declare const ActorsConfigZod: z.ZodDefault<z.ZodArray<z.ZodObject<{
67
67
  }, z.z.core.$strip>>;
68
68
  }, z.z.core.$strip>>;
69
69
  validation: z.ZodDefault<z.ZodObject<{
70
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
70
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
71
71
  readonly __hex: true;
72
72
  } & {
73
73
  readonly __address: true;
74
- }, string>>>>>;
75
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
74
+ }, string>>>>;
75
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
76
76
  readonly __hex: true;
77
77
  } & {
78
78
  readonly __address: true;
79
- }, string>>>>>;
79
+ }, string>>>>;
80
80
  minCandidates: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
81
81
  backoffMs: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
82
82
  }, z.z.core.$strip>>;
@@ -67,16 +67,16 @@ export declare const BaseConfigZod: z.ZodObject<{
67
67
  }, z.core.$strip>>;
68
68
  }, z.core.$strip>>;
69
69
  validation: z.ZodDefault<z.ZodObject<{
70
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
70
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
71
71
  readonly __hex: true;
72
72
  } & {
73
73
  readonly __address: true;
74
- }, string>>>>>;
75
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
74
+ }, string>>>>;
75
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
76
76
  readonly __hex: true;
77
77
  } & {
78
78
  readonly __address: true;
79
- }, string>>>>>;
79
+ }, string>>>>;
80
80
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
81
81
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
82
82
  }, z.core.$strip>>;
@@ -68,16 +68,16 @@ export declare const ConfigZod: z.ZodObject<{
68
68
  }, z.z.core.$strip>>;
69
69
  }, z.z.core.$strip>>;
70
70
  validation: z.ZodDefault<z.ZodObject<{
71
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
71
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
72
72
  readonly __hex: true;
73
73
  } & {
74
74
  readonly __address: true;
75
- }, string>>>>>;
76
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
75
+ }, string>>>>;
76
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
77
77
  readonly __hex: true;
78
78
  } & {
79
79
  readonly __address: true;
80
- }, string>>>>>;
80
+ }, string>>>>;
81
81
  minCandidates: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
82
82
  backoffMs: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
83
83
  }, z.z.core.$strip>>;
@@ -148,16 +148,16 @@ export declare const ConfigZod: z.ZodObject<{
148
148
  }, z.z.core.$strip>>;
149
149
  }, z.z.core.$strip>>;
150
150
  validation: z.ZodDefault<z.ZodObject<{
151
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
151
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
152
152
  readonly __hex: true;
153
153
  } & {
154
154
  readonly __address: true;
155
- }, string>>>>>;
156
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
155
+ }, string>>>>;
156
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
157
157
  readonly __hex: true;
158
158
  } & {
159
159
  readonly __address: true;
160
- }, string>>>>>;
160
+ }, string>>>>;
161
161
  minCandidates: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
162
162
  backoffMs: z.ZodDefault<z.z.ZodCoercedNumber<unknown>>;
163
163
  }, z.z.core.$strip>>;
@@ -67,16 +67,16 @@ export declare const HostActorConfigZod: z.ZodObject<{
67
67
  }, z.core.$strip>>;
68
68
  }, z.core.$strip>>;
69
69
  validation: z.ZodDefault<z.ZodObject<{
70
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
70
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
71
71
  readonly __hex: true;
72
72
  } & {
73
73
  readonly __address: true;
74
- }, string>>>>>;
75
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
74
+ }, string>>>>;
75
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
76
76
  readonly __hex: true;
77
77
  } & {
78
78
  readonly __address: true;
79
- }, string>>>>>;
79
+ }, string>>>>;
80
80
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
81
81
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
82
82
  }, z.core.$strip>>;
@@ -1,16 +1,16 @@
1
1
  import { z } from 'zod';
2
2
  /** ValidationConfigZod constant. */
3
3
  export declare const ValidationConfigZod: z.ZodObject<{
4
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
4
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
5
5
  readonly __hex: true;
6
6
  } & {
7
7
  readonly __address: true;
8
- }, string>>>>>;
9
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
8
+ }, string>>>>;
9
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
10
10
  readonly __hex: true;
11
11
  } & {
12
12
  readonly __address: true;
13
- }, string>>>>>;
13
+ }, string>>>>;
14
14
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
15
15
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
16
16
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/config/Validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvC,oCAAoC;AACpC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAiC9B,CAAA;AAEF,6BAA6B;AAC7B,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
1
+ {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/config/Validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvC,oCAAoC;AACpC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAuB9B,CAAA;AAEF,6BAA6B;AAC7B,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -75,16 +75,16 @@ export declare const ActorConfigContext: z.ZodObject<{
75
75
  }, z.core.$strip>>;
76
76
  }, z.core.$strip>>;
77
77
  validation: z.ZodDefault<z.ZodObject<{
78
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
78
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
79
79
  readonly __hex: true;
80
80
  } & {
81
81
  readonly __address: true;
82
- }, string>>>>>;
83
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
82
+ }, string>>>>;
83
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
84
84
  readonly __hex: true;
85
85
  } & {
86
86
  readonly __address: true;
87
- }, string>>>>>;
87
+ }, string>>>>;
88
88
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
89
89
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
90
90
  }, z.core.$strip>>;
@@ -75,16 +75,16 @@ export declare const HostActorConfigContext: z.ZodObject<{
75
75
  }, z.core.$strip>>;
76
76
  }, z.core.$strip>>;
77
77
  validation: z.ZodDefault<z.ZodObject<{
78
- allowedRewardRedeemers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
78
+ allowedRewardRedeemers: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
79
79
  readonly __hex: true;
80
80
  } & {
81
81
  readonly __address: true;
82
- }, string>>>>>;
83
- allowedRewardEscrowAccountSigners: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
82
+ }, string>>>>;
83
+ allowedRewardEscrowAccountSigners: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<Lowercase<string> & {
84
84
  readonly __hex: true;
85
85
  } & {
86
86
  readonly __address: true;
87
- }, string>>>>>;
87
+ }, string>>>>;
88
88
  minCandidates: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
89
89
  backoffMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
90
90
  }, z.core.$strip>>;
@@ -254,7 +254,7 @@ var TelemetryConfigZod = z13.object({
254
254
  }).describe("Telemetry configuration options");
255
255
 
256
256
  // src/config/Validation.ts
257
- import { AddressZod as AddressZod2, asAddress } from "@xylabs/sdk-js";
257
+ import { AddressZod as AddressZod2 } from "@xylabs/sdk-js";
258
258
  import { globalRegistry as globalRegistry11, z as z14 } from "zod";
259
259
 
260
260
  // src/primitives/uncle/findBestUncle.ts
@@ -263,26 +263,16 @@ var DEFAULT_BACKOFF_MS = 12e4;
263
263
 
264
264
  // src/config/Validation.ts
265
265
  var ValidationConfigZod = z14.object({
266
- allowedRewardRedeemers: z14.preprocess((val) => {
267
- if (typeof val === "string") {
268
- return val.split(",").map((s) => asAddress(s.trim()));
269
- }
270
- return val;
271
- }, z14.array(AddressZod2).optional().register(globalRegistry11, {
266
+ allowedRewardRedeemers: z14.array(AddressZod2).optional().register(globalRegistry11, {
272
267
  description: "List of allowed reward redeemer addresses, if undefined anyone can participate",
273
268
  title: "allowedRewardRedeemers",
274
269
  type: "array"
275
- })),
276
- allowedRewardEscrowAccountSigners: z14.preprocess((val) => {
277
- if (typeof val === "string") {
278
- return val.split(",").map((s) => asAddress(s.trim()));
279
- }
280
- return val;
281
- }, z14.array(AddressZod2).optional().register(globalRegistry11, {
270
+ }),
271
+ allowedRewardEscrowAccountSigners: z14.array(AddressZod2).optional().register(globalRegistry11, {
282
272
  description: "List of allowed reward escrow account signer addresses, if undefined anyone can participate",
283
273
  title: "allowedRewardEscrowAccountSigners",
284
274
  type: "array"
285
- })),
275
+ }),
286
276
  minCandidates: z14.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry11, {
287
277
  default: DEFAULT_MIN_CANDIDATES,
288
278
  description: "Minimum number of uncle candidates before selecting the best uncle",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getFileConfig.ts","../../src/config/Actor.ts","../../src/config/Base.ts","../../src/config/Chain.ts","../../src/config/DataLake/DataLake.ts","../../src/config/DataLake/RestDataLakeConfig.ts","../../src/config/DataLake/DataLakeRemoteConfig.ts","../../src/config/DataLake/RouterDataLakeConfig.ts","../../src/config/Evm.ts","../../src/config/Log.ts","../../src/config/Providers.ts","../../src/config/Provider.ts","../../src/config/Remote.ts","../../src/config/storage/driver/Mongo.ts","../../src/config/storage/Storage.ts","../../src/config/Telemetry.ts","../../src/config/Validation.ts","../../src/primitives/uncle/findBestUncle.ts","../../src/config/Actors.ts","../../src/config/Config.ts"],"sourcesContent":["import { isDefined, isNull } from '@xylabs/sdk-js'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport { ConfigZod } from './config/index.ts'\n\n/**\n * The name of the configuration file to search for.\n */\nconst configName = 'xyo'\n\n/**\n * The name of the section within the configuration file to parse.\n */\nconst configSection = 'xl1' // Default section in the config file\n\n/**\n * Attempts to parse the configuration from a file using cosmiconfig.\n * @returns The parsed configuration object if found and valid, otherwise undefined.\n */\nexport async function getFileConfig(searchPlaces?: string[]) {\n const explorer = cosmiconfig(\n configName,\n {\n cache: true,\n searchPlaces,\n },\n )\n const result: unknown = (await explorer.search())?.config\n if (!isNull(result)) {\n const section = (result as Record<string, unknown>)[configSection]\n if (isDefined(section) && typeof section === 'object') {\n return ConfigZod.loose().parse(section)\n }\n }\n return ConfigZod.parse({})\n}\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nimport { BaseConfigZod } from './Base.ts'\n\n/**\n * BIP-32 derivation path for an actor wallet.\n *\n * - Absolute form: starts with `m/` (e.g. `m/44'/60'/0'/0/0`). The full path is used as-is,\n * giving the caller complete control over coin type, account, and hardening.\n * - Relative form: a segment list without the `m/` prefix (e.g. `0`, `0/1`, `44'/60'/0'/0/0`).\n * The consumer appends this to its configured root base path.\n *\n * Each segment is a non-negative integer, optionally suffixed with `'` to mark it as hardened.\n */\nexport const AccountPathZod = z.string().regex(\n /^(m(\\/\\d+'?)+|\\d+'?(\\/\\d+'?)*)$/,\n 'Invalid BIP-32 derivation path. Use either an absolute path like \"m/44\\'/60\\'/0\\'/0/0\" or a relative path like \"0\", \"0/1\", or \"44\\'/60\\'/0\\'/0/0\".',\n)\n\n/** ActorConfigZod constant. */\nexport const ActorConfigZod = BaseConfigZod.extend({\n name: z.string(),\n accountPath: AccountPathZod.optional().register(globalRegistry, {\n description: 'BIP-32 derivation path for the actor wallet. Absolute when it starts with \"m/\"; otherwise relative to the root wallet base path. Each actor must derive to a distinct path.',\n title: 'accountPath',\n type: 'string',\n }),\n healthCheckPort: z.coerce.number().optional().register(globalRegistry, {\n description: 'Port for the Producer health checks',\n title: 'producer.healthCheckPort',\n type: 'number',\n }),\n})\n\n/** ActorConfig type. */\nexport type ActorConfig = z.infer<typeof ActorConfigZod>\n\n/** Type guard that checks if a value is a valid ActorConfig. */\nexport const isActorConfig = zodIsFactory(ActorConfigZod)\n/** Converts a value to ActorConfig, throwing if invalid. */\nexport const asActorConfig = zodAsFactory(ActorConfigZod, 'asActorConfig')\n/** toActorConfig constant. */\nexport const toActorConfig = zodToFactory(ActorConfigZod, 'toActorConfig')\n","import { z } from 'zod'\n\nimport { ChainConfigZod } from './Chain.ts'\nimport { DataLakeConfigZod } from './DataLake/index.ts'\nimport { EvmConfigZod } from './Evm.ts'\nimport { LogConfigZod } from './Log.ts'\nimport { ProvidersConfigZod } from './Providers.ts'\nimport { RemoteConfigZod } from './Remote.ts'\nimport { StorageConfigZod } from './storage/index.ts'\nimport { TelemetryConfigZod } from './Telemetry.ts'\nimport { ValidationConfigZod } from './Validation.ts'\n\n/** BaseConfigZod constant. */\nexport const BaseConfigZod = z.object({\n chain: ChainConfigZod.default(ChainConfigZod.parse({})).describe('Configuration for the chain'),\n dataLake: DataLakeConfigZod.optional().describe('Configuration for data lakes'),\n evm: EvmConfigZod.default(EvmConfigZod.parse({})).describe('Configuration for EVM-backed services'),\n log: LogConfigZod.default(LogConfigZod.parse({})).describe('Configuration for logging'),\n providers: ProvidersConfigZod.default(ProvidersConfigZod.parse([])).describe('Configuration for providers'),\n remote: RemoteConfigZod.default(RemoteConfigZod.parse({})).describe('Configuration for remote services'),\n storage: StorageConfigZod.default(StorageConfigZod.parse({})).describe('Configuration for the storage'),\n telemetry: TelemetryConfigZod.default(TelemetryConfigZod.parse({})).describe('Configuration for telemetry'),\n validation: ValidationConfigZod.default(ValidationConfigZod.parse({})).describe('Configuration for validation'),\n})\n\n/** BaseConfig type. */\nexport type BaseConfig = z.infer<typeof BaseConfigZod>\n","import { AddressZod, HexZod } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\n/** ChainConfigZod constant. */\nexport const ChainConfigZod = z.object({\n id: HexZod.optional()\n .register(globalRegistry, {\n description:\n 'The unique identifier for the chain. Should be the staking contract address for contract-backed chains.',\n title: 'chain.id',\n type: 'string',\n }),\n genesisRewardAddress: AddressZod.optional()\n .register(globalRegistry, {\n description:\n 'Address to send the initial genesis rewards to, if a new chain is being created.',\n title: 'chain.genesisRewardAddress',\n type: 'Address',\n }),\n})\n\n/** ChainConfig type. */\nexport type ChainConfig = z.infer<typeof ChainConfigZod>\n","import { z } from 'zod'\n\nimport { type RestDataLakeConfig, RestDataLakeConfigZod } from './RestDataLakeConfig.ts'\n// eslint-disable-next-line import-x/no-cycle -- intentional cycle for z.lazy recursive type\nimport { type RouterDataLakeConfig, RouterDataLakeConfigZod } from './RouterDataLakeConfig.ts'\n\n/** DataLakeConfig type. */\nexport type DataLakeConfig = RestDataLakeConfig | RouterDataLakeConfig\n\n// z.lazy handles the circular reference between DataLakeConfigZod and RouterDataLakeZod\n/** DataLakeConfigZod constant. */\nexport const DataLakeConfigZod: z.ZodType<DataLakeConfig> = z.lazy(() =>\n z.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe('Configuration for a data lake')\n","import { globalRegistry, z } from 'zod'\n\nimport { DataLakeDriverConfigBaseZod } from './DataLakeRemoteConfig.ts'\n\n/** RestDataLakeConfigZod constant. */\nexport const RestDataLakeConfigZod = DataLakeDriverConfigBaseZod.extend({\n driver: z.literal('rest').register(globalRegistry, {\n description: 'Driver for the REST data lake',\n type: 'string',\n }),\n url: z.string().register(globalRegistry, {\n description: 'URL for the REST data lake',\n type: 'string',\n }),\n}).describe('Configuration for the REST data lake driver')\n\n/** RestDataLakeConfig type. */\nexport type RestDataLakeConfig = z.infer<typeof RestDataLakeConfigZod>\n","import { globalRegistry, z } from 'zod'\n\n/** DataLakeDriverConfigBaseZod constant. */\nexport const DataLakeDriverConfigBaseZod = z.object({\n driver: z.string().register(globalRegistry, {\n description: 'Driver for the data lake',\n type: 'string',\n }),\n}).describe('Base configuration for a data lake driver')\n/** DataLakeDriverConfigBase type. */\nexport type DataLakeDriverConfigBase = z.infer<typeof DataLakeDriverConfigBaseZod>\n","import { globalRegistry, z } from 'zod'\n\nimport type { DataLakeConfig } from './DataLake.ts'\n// eslint-disable-next-line import-x/no-cycle -- intentional cycle for z.lazy recursive type\nimport { DataLakeConfigZod } from './DataLake.ts'\n\n/** Configuration for RouterDataLake. */\nexport interface RouterDataLakeConfig {\n children: DataLakeConfig[]\n driver: 'router'\n}\n\n/** RouterDataLakeConfigZod constant. */\nexport const RouterDataLakeConfigZod: z.ZodType<RouterDataLakeConfig> = z.object({\n driver: z.literal('router').register(globalRegistry, {\n description: 'Driver for the router data lake',\n type: 'string',\n }),\n children: z.array(z.lazy(() => DataLakeConfigZod)).register(globalRegistry, {\n description: 'Child data lake drivers',\n type: 'array',\n }),\n}).describe('Configuration for the router data lake driver')\n","import { globalRegistry, z } from 'zod'\n\n/** EvmInfuraConfigZod constant. */\nexport const EvmInfuraConfigZod = z.object({\n projectId: z.string().optional().register(globalRegistry, {\n description: 'Infura project ID',\n title: 'evm.infura.projectId',\n type: 'string',\n }),\n projectSecret: z.string().optional().register(globalRegistry, {\n description: 'Infura project secret',\n title: 'evm.infura.projectSecret',\n type: 'string',\n }),\n})\n\n/** EvmJsonRpcConfigZod constant. */\nexport const EvmJsonRpcConfigZod = z.object({\n url: z.url().optional().register(globalRegistry, {\n description: 'JSON-RPC URL',\n title: 'evm.jsonRpc.url',\n type: 'string',\n }),\n})\n\n/** EvmConfigZod constant. */\nexport const EvmConfigZod = z.object({\n chainId: z.string().optional().register(globalRegistry, {\n description: 'EVM chain ID',\n title: 'evm.chainId',\n type: 'string',\n }),\n infura: EvmInfuraConfigZod.optional().describe('Infura Provider configuration'),\n jsonRpc: EvmJsonRpcConfigZod.optional().describe('JSON-RPC Provider configuration'),\n})\n\n/** EvmConfig type. */\nexport type EvmConfig = z.infer<typeof EvmConfigZod>\n","import type { LogLevelKey } from '@xylabs/sdk-js'\nimport { LogLevel } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nconst LogLevelNames = Object.keys(LogLevel) as [LogLevelKey]\n\n/** LogConfigZod constant. */\nexport const LogConfigZod = z.object({\n logLevel: z.enum(LogLevelNames).default('info').register(globalRegistry, {\n choices: LogLevelNames,\n default: 'info',\n description: 'Desired process verbosity',\n title: 'logLevel',\n type: 'string',\n }),\n silent: z.boolean().default(false).register(globalRegistry, {\n default: false,\n description: 'Whether to run in silent mode',\n title: 'silent',\n type: 'boolean',\n }),\n})\n\n/** LogConfig type. */\nexport type LogConfig = z.infer<typeof LogConfigZod>\n","import z from 'zod'\n\nimport { ProviderConfigZod } from './Provider.ts'\n\n/** ProvidersConfigZod constant. */\nexport const ProvidersConfigZod = z.array(ProviderConfigZod.loose()).describe('Configuration for providers').default([])\n\n/** ProvidersConfig type. */\nexport type ProvidersConfig = z.infer<typeof ProvidersConfigZod>\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { z } from 'zod'\n\n/** ProviderConfigZod constant. */\nexport const ProviderConfigZod = z.object({\n moniker: z.string(),\n labels: z.array(z.string()).optional(),\n}).describe('Configuration for a Provider')\n\n/** ProviderConfig type. */\nexport type ProviderConfig = z.infer<typeof ProviderConfigZod>\n\n/** Type guard that checks if a value is a valid ProviderConfig. */\nexport const isProviderConfig = zodIsFactory(ProviderConfigZod)\n/** Converts a value to ProviderConfig, throwing if invalid. */\nexport const asProviderConfig = zodAsFactory(ProviderConfigZod, 'asProviderConfig')\n/** toProviderConfig constant. */\nexport const toProviderConfig = zodToFactory(ProviderConfigZod, 'toProviderConfig')\n","import { globalRegistry, z } from 'zod'\n\n/** RpcRemoteConfigBaseZod constant. */\nexport const RpcRemoteConfigBaseZod = z.object({\n protocol: z.string('http').register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }),\n}).describe('Base configuration for the remote RPC')\n\n/** RpcRemoteConfigBase type. */\nexport type RpcRemoteConfigBase = z.infer<typeof RpcRemoteConfigBaseZod>\n\n/** HttpRpcRemoteConfigZod constant. */\nexport const HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({\n protocol: z.string('http').register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }).default('http'),\n url: z.string().register(globalRegistry, {\n description: 'URL for the Chain RPC API',\n type: 'string',\n }),\n}).describe('Configuration for the remote RPC using Http')\n\n/** HttpRpcRemoteConfig type. */\nexport type HttpRpcRemoteConfig = z.infer<typeof HttpRpcRemoteConfigZod>\n\n/** PostMessageRpcRemoteConfigZod constant. */\nexport const PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({\n protocol: z.string().register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }).default('postMessage'),\n networkId: z.string().register(globalRegistry, {\n description: 'Network ID to use for the postMessage RPC connection',\n type: 'string',\n }),\n sessionId: z.string().register(globalRegistry, {\n description: 'Session ID to use for the postMessage RPC connection',\n type: 'string',\n }),\n}).describe('Configuration for the remote RPC using postMessage')\n\n/** PostMessageRpcRemoteConfig type. */\nexport type PostMessageRpcRemoteConfig = z.infer<typeof PostMessageRpcRemoteConfigZod>\n\n/** RpcRemoteConfigZod constant. */\nexport const RpcRemoteConfigZod = z.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod])\n .describe('Configuration for a remote RPC connection, either Http or postMessage')\n\n/** RpcRemoteConfig type. */\nexport type RpcRemoteConfig = z.infer<typeof RpcRemoteConfigZod>\n\n/** RemoteConfigZod constant. */\nexport const RemoteConfigZod = z.object({ rpc: RpcRemoteConfigZod.optional() }).describe('Configuration for remote connections, including RPC')\n\n/** RemoteConfig type. */\nexport type RemoteConfig = z.infer<typeof RemoteConfigZod>\n","import { isDefined, isUndefined } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\n/**\n * Checks if the provided MongoDB configuration contains all necessary fields\n * for establishing a connection.\n * @param config MongoDB configuration object\n * @returns True if the configuration contains all necessary fields for\n * establishing a connection\n */\nexport const hasMongoConfig = (config?: MongoConfig): config is Required<MongoConfig> => {\n if (isUndefined(config)) return false\n return (\n isDefined(config.connectionString)\n && isDefined(config.database)\n && isDefined(config.domain)\n && isDefined(config.password)\n && isDefined(config.username)\n )\n}\n\n/** MongoConfigZod constant. */\nexport const MongoConfigZod = z.object({\n // TODO: Create from other arguments\n connectionString: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB connection string',\n title: 'storage.mongo.connectionString',\n type: 'string',\n }),\n database: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB database name',\n title: 'storage.mongo.database',\n type: 'string',\n }),\n domain: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB domain',\n title: 'storage.mongo.domain',\n type: 'string',\n }),\n password: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB password',\n title: 'storage.mongo.password',\n type: 'string',\n }),\n username: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB username',\n title: 'storage.mongo.username',\n type: 'string',\n }),\n})\n\n/** MongoConfig type. */\nexport type MongoConfig = z.infer<typeof MongoConfigZod>\n","import { globalRegistry, z } from 'zod'\n\nimport { MongoConfigZod } from './driver/index.ts'\n\n/** StorageConfigZod constant. */\nexport const StorageConfigZod = z.object({\n mongo: MongoConfigZod.optional().describe('Configuration for the MongoD storage driver'),\n root: z.string().optional().register(globalRegistry, {\n description: 'Root directory for local storage',\n title: 'storage.root',\n type: 'string',\n }),\n}).describe('Storage configuration options')\n\n/** StorageConfig type. */\nexport type StorageConfig = z.infer<typeof StorageConfigZod>\n","import { globalRegistry, z } from 'zod'\n\n/** DefaultMetricsScrapePorts constant. */\nexport const DefaultMetricsScrapePorts = {\n api: 9465,\n bridge: 9468,\n mempool: 9466,\n producer: 9464,\n rewardRedemptionApi: 9467,\n}\n\n/** MetricsScrapeConfigZod constant. */\nexport const MetricsScrapeConfigZod = z.object({\n path: z.string().default('/metrics').register(globalRegistry, {\n default: '/metrics',\n description: 'Path for the metrics scrape endpoint',\n title: 'telemetry.metrics.scrape.path',\n type: 'string',\n }),\n port: z.coerce.number().int().positive().optional().register(globalRegistry, {\n description: 'Port for the metrics scrape endpoint',\n title: 'telemetry.metrics.scrape.port',\n type: 'number',\n }),\n}).describe('Metrics scrape configuration')\n\n/** MetricsConfigZod constant. */\nexport const MetricsConfigZod = z.object({ scrape: MetricsScrapeConfigZod }).describe('Metrics configuration options')\n\n/** OpenTelemetryConfigZod constant. */\nexport const OpenTelemetryConfigZod = z.object({\n // OpenTelemetry options\n otlpEndpoint: z.url().optional().register(globalRegistry, {\n description: 'OTLP endpoint for exporting telemetry data',\n title: 'telemetry.otel.otlpEndpoint',\n type: 'string',\n }),\n})\n\n/** TelemetryConfigZod constant. */\nexport const TelemetryConfigZod = z.object({\n // Metrics configuration\n metrics: MetricsConfigZod.optional().describe('Metrics configuration'),\n // OpenTelemetry configuration\n otel: OpenTelemetryConfigZod.optional().describe('OpenTelemetry configuration'),\n}).describe('Telemetry configuration options')\n\n/** TelemetryConfig type. */\nexport type TelemetryConfig = z.infer<typeof TelemetryConfigZod>\n","import { AddressZod, asAddress } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nimport { DEFAULT_BACKOFF_MS, DEFAULT_MIN_CANDIDATES } from '../primitives/index.ts'\n\n/** ValidationConfigZod constant. */\nexport const ValidationConfigZod = z.object({\n allowedRewardRedeemers: z.preprocess((val) => {\n if (typeof val === 'string') {\n return val.split(',').map(s => asAddress(s.trim()))\n }\n return val\n }, z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed reward redeemer addresses, if undefined anyone can participate',\n title: 'allowedRewardRedeemers',\n type: 'array',\n })),\n allowedRewardEscrowAccountSigners: z.preprocess((val) => {\n if (typeof val === 'string') {\n return val.split(',').map(s => asAddress(s.trim()))\n }\n return val\n }, z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed reward escrow account signer addresses, if undefined anyone can participate',\n title: 'allowedRewardEscrowAccountSigners',\n type: 'array',\n })),\n minCandidates: z.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry, {\n default: DEFAULT_MIN_CANDIDATES,\n description: 'Minimum number of uncle candidates before selecting the best uncle',\n title: 'validation.minCandidates',\n type: 'number',\n }),\n backoffMs: z.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry, {\n default: DEFAULT_BACKOFF_MS,\n description: 'Back-off timeout in ms. If head age exceeds this, minCandidates is ignored',\n title: 'validation.backoffMs',\n type: 'number',\n }),\n})\n\n/** ValidationConfig type. */\nexport type ValidationConfig = z.infer<typeof ValidationConfigZod>\n","import type { SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol-lib'\n\nimport { scoreUncle } from './scoreUncle.ts'\n\n/** Default minimum number of uncle candidates before selecting. */\nexport const DEFAULT_MIN_CANDIDATES = 1\n\n/** Default back-off timeout in milliseconds. If the head has not changed for this long, minCandidates is ignored. */\nexport const DEFAULT_BACKOFF_MS = 120_000\n\n/** Options for findBestUncle block selection. */\nexport interface FindBestUncleOptions {\n /** Back-off timeout in ms. If head age exceeds this, minCandidates is ignored. Default: 120_000. */\n backoffMs?: number\n /** Minimum number of uncle candidates before selecting. Default: 1. */\n minCandidates?: number\n /** Current timestamp in ms. Injectable for testing. Default: Date.now(). */\n now?: number\n}\n\n/** Selects the best uncle chain from candidates using Proof of Perfect scoring. */\nexport function findBestUncle(\n finalizedWindowedChain: SignedHydratedBlockWithHashMeta[],\n uncles: SignedHydratedBlockWithHashMeta[][],\n options?: FindBestUncleOptions,\n): SignedHydratedBlockWithHashMeta[] | undefined {\n if (uncles.length === 0) return undefined\n\n const minCandidates = options?.minCandidates ?? DEFAULT_MIN_CANDIDATES\n const backoffMs = options?.backoffMs ?? DEFAULT_BACKOFF_MS\n const now = options?.now ?? Date.now()\n\n if (uncles.length < minCandidates) {\n const headEpoch = finalizedWindowedChain.at(-1)?.[0].$epoch ?? 0\n const headAge = now - headEpoch\n if (headAge < backoffMs) {\n return undefined\n }\n }\n\n const scores = uncles.map(uncle => ([scoreUncle(finalizedWindowedChain, uncle), uncle] as const)).toSorted((a, b) => b[0] - a[0])\n return scores[0]?.[1]\n}\n","import z from 'zod'\n\nimport { ActorConfigZod } from './Actor.ts'\n\n/** ActorsConfigZod constant. */\nexport const ActorsConfigZod = z.array(ActorConfigZod.loose()).describe('Actor-specific configurations that override the base configuration when the actor is running').default([])\n\n/** ActorsConfig type. */\nexport type ActorsConfig = z.infer<typeof ActorsConfigZod>\n","import type z from 'zod'\n\nimport { ActorConfigZod } from './Actor.ts'\nimport { ActorsConfigZod } from './Actors.ts'\nimport { BaseConfigZod } from './Base.ts'\nimport type { DeepPartial } from './DeepPartial.ts'\n\n/** ConfigZod constant. */\nexport const ConfigZod = BaseConfigZod.extend({ actors: ActorsConfigZod }).describe('The complete configuration for the protocol, including global settings and actor-specific overrides')\n\n/** Config type. */\nexport type Config = z.infer<typeof ConfigZod>\n\n/** ResolveConfig helper function. */\nexport function resolveConfig(\n config: DeepPartial<Config>,\n) {\n const parsedConfig = ConfigZod.parse(config)\n const { actors, ...rootConfig } = parsedConfig\n parsedConfig.actors = actors.map((actorConfig) => {\n return ActorConfigZod.loose().parse({ ...rootConfig, ...actorConfig })\n })\n return parsedConfig\n}\n"],"mappings":";AAAA,SAAS,aAAAA,YAAW,cAAc;AAClC,SAAS,mBAAmB;;;ACD5B;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,kBAAAC,kBAAgB,KAAAC,WAAS;;;ACHlC,SAAS,KAAAC,WAAS;;;ACAlB,SAAS,YAAY,cAAc;AACnC,SAAS,gBAAgB,SAAS;AAG3B,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,IAAI,OAAO,SAAS,EACjB,SAAS,gBAAgB;AAAA,IACxB,aACA;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AAAA,EACH,sBAAsB,WAAW,SAAS,EACvC,SAAS,gBAAgB;AAAA,IACxB,aACA;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AACL,CAAC;;;ACnBD,SAAS,KAAAC,UAAS;;;ACAlB,SAAS,kBAAAC,iBAAgB,KAAAC,UAAS;;;ACAlC,SAAS,kBAAAC,iBAAgB,KAAAC,UAAS;AAG3B,IAAM,8BAA8BA,GAAE,OAA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;AAAA,IACF;AAAA,EACF;AACA,QAAM,UAAmB,MAAM,SAAS,OAAO,IAAI;AACnD,MAAI,CAAC,OAAO,MAAM,GAAG;AACnB,UAAM,UAAW,OAAmC,aAAa;AACjE,QAAIC,WAAU,OAAO,KAAK,OAAO,YAAY,UAAU;AACrD,aAAO,UAAU,MAAM,EAAE,MAAM,OAAO;AAAA,IACxC;AAAA,EACF;AACA,SAAO,UAAU,MAAM,CAAC,CAAC;AAC3B;","names":["isDefined","zodAsFactory","zodIsFactory","zodToFactory","globalRegistry","z","z","z","globalRegistry","z","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","z","globalRegistry","z","globalRegistry","z","z","z","z","globalRegistry","z","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","AddressZod","globalRegistry","z","z","AddressZod","globalRegistry","z","z","globalRegistry","zodIsFactory","zodAsFactory","zodToFactory","z","z","isDefined"]}
1
+ {"version":3,"sources":["../../src/getFileConfig.ts","../../src/config/Actor.ts","../../src/config/Base.ts","../../src/config/Chain.ts","../../src/config/DataLake/DataLake.ts","../../src/config/DataLake/RestDataLakeConfig.ts","../../src/config/DataLake/DataLakeRemoteConfig.ts","../../src/config/DataLake/RouterDataLakeConfig.ts","../../src/config/Evm.ts","../../src/config/Log.ts","../../src/config/Providers.ts","../../src/config/Provider.ts","../../src/config/Remote.ts","../../src/config/storage/driver/Mongo.ts","../../src/config/storage/Storage.ts","../../src/config/Telemetry.ts","../../src/config/Validation.ts","../../src/primitives/uncle/findBestUncle.ts","../../src/config/Actors.ts","../../src/config/Config.ts"],"sourcesContent":["import { isDefined, isNull } from '@xylabs/sdk-js'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport { ConfigZod } from './config/index.ts'\n\n/**\n * The name of the configuration file to search for.\n */\nconst configName = 'xyo'\n\n/**\n * The name of the section within the configuration file to parse.\n */\nconst configSection = 'xl1' // Default section in the config file\n\n/**\n * Attempts to parse the configuration from a file using cosmiconfig.\n * @returns The parsed configuration object if found and valid, otherwise undefined.\n */\nexport async function getFileConfig(searchPlaces?: string[]) {\n const explorer = cosmiconfig(\n configName,\n {\n cache: true,\n searchPlaces,\n },\n )\n const result: unknown = (await explorer.search())?.config\n if (!isNull(result)) {\n const section = (result as Record<string, unknown>)[configSection]\n if (isDefined(section) && typeof section === 'object') {\n return ConfigZod.loose().parse(section)\n }\n }\n return ConfigZod.parse({})\n}\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nimport { BaseConfigZod } from './Base.ts'\n\n/**\n * BIP-32 derivation path for an actor wallet.\n *\n * - Absolute form: starts with `m/` (e.g. `m/44'/60'/0'/0/0`). The full path is used as-is,\n * giving the caller complete control over coin type, account, and hardening.\n * - Relative form: a segment list without the `m/` prefix (e.g. `0`, `0/1`, `44'/60'/0'/0/0`).\n * The consumer appends this to its configured root base path.\n *\n * Each segment is a non-negative integer, optionally suffixed with `'` to mark it as hardened.\n */\nexport const AccountPathZod = z.string().regex(\n /^(m(\\/\\d+'?)+|\\d+'?(\\/\\d+'?)*)$/,\n 'Invalid BIP-32 derivation path. Use either an absolute path like \"m/44\\'/60\\'/0\\'/0/0\" or a relative path like \"0\", \"0/1\", or \"44\\'/60\\'/0\\'/0/0\".',\n)\n\n/** ActorConfigZod constant. */\nexport const ActorConfigZod = BaseConfigZod.extend({\n name: z.string(),\n accountPath: AccountPathZod.optional().register(globalRegistry, {\n description: 'BIP-32 derivation path for the actor wallet. Absolute when it starts with \"m/\"; otherwise relative to the root wallet base path. Each actor must derive to a distinct path.',\n title: 'accountPath',\n type: 'string',\n }),\n healthCheckPort: z.coerce.number().optional().register(globalRegistry, {\n description: 'Port for the Producer health checks',\n title: 'producer.healthCheckPort',\n type: 'number',\n }),\n})\n\n/** ActorConfig type. */\nexport type ActorConfig = z.infer<typeof ActorConfigZod>\n\n/** Type guard that checks if a value is a valid ActorConfig. */\nexport const isActorConfig = zodIsFactory(ActorConfigZod)\n/** Converts a value to ActorConfig, throwing if invalid. */\nexport const asActorConfig = zodAsFactory(ActorConfigZod, 'asActorConfig')\n/** toActorConfig constant. */\nexport const toActorConfig = zodToFactory(ActorConfigZod, 'toActorConfig')\n","import { z } from 'zod'\n\nimport { ChainConfigZod } from './Chain.ts'\nimport { DataLakeConfigZod } from './DataLake/index.ts'\nimport { EvmConfigZod } from './Evm.ts'\nimport { LogConfigZod } from './Log.ts'\nimport { ProvidersConfigZod } from './Providers.ts'\nimport { RemoteConfigZod } from './Remote.ts'\nimport { StorageConfigZod } from './storage/index.ts'\nimport { TelemetryConfigZod } from './Telemetry.ts'\nimport { ValidationConfigZod } from './Validation.ts'\n\n/** BaseConfigZod constant. */\nexport const BaseConfigZod = z.object({\n chain: ChainConfigZod.default(ChainConfigZod.parse({})).describe('Configuration for the chain'),\n dataLake: DataLakeConfigZod.optional().describe('Configuration for data lakes'),\n evm: EvmConfigZod.default(EvmConfigZod.parse({})).describe('Configuration for EVM-backed services'),\n log: LogConfigZod.default(LogConfigZod.parse({})).describe('Configuration for logging'),\n providers: ProvidersConfigZod.default(ProvidersConfigZod.parse([])).describe('Configuration for providers'),\n remote: RemoteConfigZod.default(RemoteConfigZod.parse({})).describe('Configuration for remote services'),\n storage: StorageConfigZod.default(StorageConfigZod.parse({})).describe('Configuration for the storage'),\n telemetry: TelemetryConfigZod.default(TelemetryConfigZod.parse({})).describe('Configuration for telemetry'),\n validation: ValidationConfigZod.default(ValidationConfigZod.parse({})).describe('Configuration for validation'),\n})\n\n/** BaseConfig type. */\nexport type BaseConfig = z.infer<typeof BaseConfigZod>\n","import { AddressZod, HexZod } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\n/** ChainConfigZod constant. */\nexport const ChainConfigZod = z.object({\n id: HexZod.optional()\n .register(globalRegistry, {\n description:\n 'The unique identifier for the chain. Should be the staking contract address for contract-backed chains.',\n title: 'chain.id',\n type: 'string',\n }),\n genesisRewardAddress: AddressZod.optional()\n .register(globalRegistry, {\n description:\n 'Address to send the initial genesis rewards to, if a new chain is being created.',\n title: 'chain.genesisRewardAddress',\n type: 'Address',\n }),\n})\n\n/** ChainConfig type. */\nexport type ChainConfig = z.infer<typeof ChainConfigZod>\n","import { z } from 'zod'\n\nimport { type RestDataLakeConfig, RestDataLakeConfigZod } from './RestDataLakeConfig.ts'\n// eslint-disable-next-line import-x/no-cycle -- intentional cycle for z.lazy recursive type\nimport { type RouterDataLakeConfig, RouterDataLakeConfigZod } from './RouterDataLakeConfig.ts'\n\n/** DataLakeConfig type. */\nexport type DataLakeConfig = RestDataLakeConfig | RouterDataLakeConfig\n\n// z.lazy handles the circular reference between DataLakeConfigZod and RouterDataLakeZod\n/** DataLakeConfigZod constant. */\nexport const DataLakeConfigZod: z.ZodType<DataLakeConfig> = z.lazy(() =>\n z.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe('Configuration for a data lake')\n","import { globalRegistry, z } from 'zod'\n\nimport { DataLakeDriverConfigBaseZod } from './DataLakeRemoteConfig.ts'\n\n/** RestDataLakeConfigZod constant. */\nexport const RestDataLakeConfigZod = DataLakeDriverConfigBaseZod.extend({\n driver: z.literal('rest').register(globalRegistry, {\n description: 'Driver for the REST data lake',\n type: 'string',\n }),\n url: z.string().register(globalRegistry, {\n description: 'URL for the REST data lake',\n type: 'string',\n }),\n}).describe('Configuration for the REST data lake driver')\n\n/** RestDataLakeConfig type. */\nexport type RestDataLakeConfig = z.infer<typeof RestDataLakeConfigZod>\n","import { globalRegistry, z } from 'zod'\n\n/** DataLakeDriverConfigBaseZod constant. */\nexport const DataLakeDriverConfigBaseZod = z.object({\n driver: z.string().register(globalRegistry, {\n description: 'Driver for the data lake',\n type: 'string',\n }),\n}).describe('Base configuration for a data lake driver')\n/** DataLakeDriverConfigBase type. */\nexport type DataLakeDriverConfigBase = z.infer<typeof DataLakeDriverConfigBaseZod>\n","import { globalRegistry, z } from 'zod'\n\nimport type { DataLakeConfig } from './DataLake.ts'\n// eslint-disable-next-line import-x/no-cycle -- intentional cycle for z.lazy recursive type\nimport { DataLakeConfigZod } from './DataLake.ts'\n\n/** Configuration for RouterDataLake. */\nexport interface RouterDataLakeConfig {\n children: DataLakeConfig[]\n driver: 'router'\n}\n\n/** RouterDataLakeConfigZod constant. */\nexport const RouterDataLakeConfigZod: z.ZodType<RouterDataLakeConfig> = z.object({\n driver: z.literal('router').register(globalRegistry, {\n description: 'Driver for the router data lake',\n type: 'string',\n }),\n children: z.array(z.lazy(() => DataLakeConfigZod)).register(globalRegistry, {\n description: 'Child data lake drivers',\n type: 'array',\n }),\n}).describe('Configuration for the router data lake driver')\n","import { globalRegistry, z } from 'zod'\n\n/** EvmInfuraConfigZod constant. */\nexport const EvmInfuraConfigZod = z.object({\n projectId: z.string().optional().register(globalRegistry, {\n description: 'Infura project ID',\n title: 'evm.infura.projectId',\n type: 'string',\n }),\n projectSecret: z.string().optional().register(globalRegistry, {\n description: 'Infura project secret',\n title: 'evm.infura.projectSecret',\n type: 'string',\n }),\n})\n\n/** EvmJsonRpcConfigZod constant. */\nexport const EvmJsonRpcConfigZod = z.object({\n url: z.url().optional().register(globalRegistry, {\n description: 'JSON-RPC URL',\n title: 'evm.jsonRpc.url',\n type: 'string',\n }),\n})\n\n/** EvmConfigZod constant. */\nexport const EvmConfigZod = z.object({\n chainId: z.string().optional().register(globalRegistry, {\n description: 'EVM chain ID',\n title: 'evm.chainId',\n type: 'string',\n }),\n infura: EvmInfuraConfigZod.optional().describe('Infura Provider configuration'),\n jsonRpc: EvmJsonRpcConfigZod.optional().describe('JSON-RPC Provider configuration'),\n})\n\n/** EvmConfig type. */\nexport type EvmConfig = z.infer<typeof EvmConfigZod>\n","import type { LogLevelKey } from '@xylabs/sdk-js'\nimport { LogLevel } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nconst LogLevelNames = Object.keys(LogLevel) as [LogLevelKey]\n\n/** LogConfigZod constant. */\nexport const LogConfigZod = z.object({\n logLevel: z.enum(LogLevelNames).default('info').register(globalRegistry, {\n choices: LogLevelNames,\n default: 'info',\n description: 'Desired process verbosity',\n title: 'logLevel',\n type: 'string',\n }),\n silent: z.boolean().default(false).register(globalRegistry, {\n default: false,\n description: 'Whether to run in silent mode',\n title: 'silent',\n type: 'boolean',\n }),\n})\n\n/** LogConfig type. */\nexport type LogConfig = z.infer<typeof LogConfigZod>\n","import z from 'zod'\n\nimport { ProviderConfigZod } from './Provider.ts'\n\n/** ProvidersConfigZod constant. */\nexport const ProvidersConfigZod = z.array(ProviderConfigZod.loose()).describe('Configuration for providers').default([])\n\n/** ProvidersConfig type. */\nexport type ProvidersConfig = z.infer<typeof ProvidersConfigZod>\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { z } from 'zod'\n\n/** ProviderConfigZod constant. */\nexport const ProviderConfigZod = z.object({\n moniker: z.string(),\n labels: z.array(z.string()).optional(),\n}).describe('Configuration for a Provider')\n\n/** ProviderConfig type. */\nexport type ProviderConfig = z.infer<typeof ProviderConfigZod>\n\n/** Type guard that checks if a value is a valid ProviderConfig. */\nexport const isProviderConfig = zodIsFactory(ProviderConfigZod)\n/** Converts a value to ProviderConfig, throwing if invalid. */\nexport const asProviderConfig = zodAsFactory(ProviderConfigZod, 'asProviderConfig')\n/** toProviderConfig constant. */\nexport const toProviderConfig = zodToFactory(ProviderConfigZod, 'toProviderConfig')\n","import { globalRegistry, z } from 'zod'\n\n/** RpcRemoteConfigBaseZod constant. */\nexport const RpcRemoteConfigBaseZod = z.object({\n protocol: z.string('http').register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }),\n}).describe('Base configuration for the remote RPC')\n\n/** RpcRemoteConfigBase type. */\nexport type RpcRemoteConfigBase = z.infer<typeof RpcRemoteConfigBaseZod>\n\n/** HttpRpcRemoteConfigZod constant. */\nexport const HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({\n protocol: z.string('http').register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }).default('http'),\n url: z.string().register(globalRegistry, {\n description: 'URL for the Chain RPC API',\n type: 'string',\n }),\n}).describe('Configuration for the remote RPC using Http')\n\n/** HttpRpcRemoteConfig type. */\nexport type HttpRpcRemoteConfig = z.infer<typeof HttpRpcRemoteConfigZod>\n\n/** PostMessageRpcRemoteConfigZod constant. */\nexport const PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({\n protocol: z.string().register(globalRegistry, {\n description: 'Protocol for the RPC connection',\n type: 'string',\n }).default('postMessage'),\n networkId: z.string().register(globalRegistry, {\n description: 'Network ID to use for the postMessage RPC connection',\n type: 'string',\n }),\n sessionId: z.string().register(globalRegistry, {\n description: 'Session ID to use for the postMessage RPC connection',\n type: 'string',\n }),\n}).describe('Configuration for the remote RPC using postMessage')\n\n/** PostMessageRpcRemoteConfig type. */\nexport type PostMessageRpcRemoteConfig = z.infer<typeof PostMessageRpcRemoteConfigZod>\n\n/** RpcRemoteConfigZod constant. */\nexport const RpcRemoteConfigZod = z.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod])\n .describe('Configuration for a remote RPC connection, either Http or postMessage')\n\n/** RpcRemoteConfig type. */\nexport type RpcRemoteConfig = z.infer<typeof RpcRemoteConfigZod>\n\n/** RemoteConfigZod constant. */\nexport const RemoteConfigZod = z.object({ rpc: RpcRemoteConfigZod.optional() }).describe('Configuration for remote connections, including RPC')\n\n/** RemoteConfig type. */\nexport type RemoteConfig = z.infer<typeof RemoteConfigZod>\n","import { isDefined, isUndefined } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\n/**\n * Checks if the provided MongoDB configuration contains all necessary fields\n * for establishing a connection.\n * @param config MongoDB configuration object\n * @returns True if the configuration contains all necessary fields for\n * establishing a connection\n */\nexport const hasMongoConfig = (config?: MongoConfig): config is Required<MongoConfig> => {\n if (isUndefined(config)) return false\n return (\n isDefined(config.connectionString)\n && isDefined(config.database)\n && isDefined(config.domain)\n && isDefined(config.password)\n && isDefined(config.username)\n )\n}\n\n/** MongoConfigZod constant. */\nexport const MongoConfigZod = z.object({\n // TODO: Create from other arguments\n connectionString: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB connection string',\n title: 'storage.mongo.connectionString',\n type: 'string',\n }),\n database: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB database name',\n title: 'storage.mongo.database',\n type: 'string',\n }),\n domain: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB domain',\n title: 'storage.mongo.domain',\n type: 'string',\n }),\n password: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB password',\n title: 'storage.mongo.password',\n type: 'string',\n }),\n username: z.string().nonempty().optional().register(globalRegistry, {\n description: 'MongoDB username',\n title: 'storage.mongo.username',\n type: 'string',\n }),\n})\n\n/** MongoConfig type. */\nexport type MongoConfig = z.infer<typeof MongoConfigZod>\n","import { globalRegistry, z } from 'zod'\n\nimport { MongoConfigZod } from './driver/index.ts'\n\n/** StorageConfigZod constant. */\nexport const StorageConfigZod = z.object({\n mongo: MongoConfigZod.optional().describe('Configuration for the MongoD storage driver'),\n root: z.string().optional().register(globalRegistry, {\n description: 'Root directory for local storage',\n title: 'storage.root',\n type: 'string',\n }),\n}).describe('Storage configuration options')\n\n/** StorageConfig type. */\nexport type StorageConfig = z.infer<typeof StorageConfigZod>\n","import { globalRegistry, z } from 'zod'\n\n/** DefaultMetricsScrapePorts constant. */\nexport const DefaultMetricsScrapePorts = {\n api: 9465,\n bridge: 9468,\n mempool: 9466,\n producer: 9464,\n rewardRedemptionApi: 9467,\n}\n\n/** MetricsScrapeConfigZod constant. */\nexport const MetricsScrapeConfigZod = z.object({\n path: z.string().default('/metrics').register(globalRegistry, {\n default: '/metrics',\n description: 'Path for the metrics scrape endpoint',\n title: 'telemetry.metrics.scrape.path',\n type: 'string',\n }),\n port: z.coerce.number().int().positive().optional().register(globalRegistry, {\n description: 'Port for the metrics scrape endpoint',\n title: 'telemetry.metrics.scrape.port',\n type: 'number',\n }),\n}).describe('Metrics scrape configuration')\n\n/** MetricsConfigZod constant. */\nexport const MetricsConfigZod = z.object({ scrape: MetricsScrapeConfigZod }).describe('Metrics configuration options')\n\n/** OpenTelemetryConfigZod constant. */\nexport const OpenTelemetryConfigZod = z.object({\n // OpenTelemetry options\n otlpEndpoint: z.url().optional().register(globalRegistry, {\n description: 'OTLP endpoint for exporting telemetry data',\n title: 'telemetry.otel.otlpEndpoint',\n type: 'string',\n }),\n})\n\n/** TelemetryConfigZod constant. */\nexport const TelemetryConfigZod = z.object({\n // Metrics configuration\n metrics: MetricsConfigZod.optional().describe('Metrics configuration'),\n // OpenTelemetry configuration\n otel: OpenTelemetryConfigZod.optional().describe('OpenTelemetry configuration'),\n}).describe('Telemetry configuration options')\n\n/** TelemetryConfig type. */\nexport type TelemetryConfig = z.infer<typeof TelemetryConfigZod>\n","import { AddressZod } from '@xylabs/sdk-js'\nimport { globalRegistry, z } from 'zod'\n\nimport { DEFAULT_BACKOFF_MS, DEFAULT_MIN_CANDIDATES } from '../primitives/index.ts'\n\n/** ValidationConfigZod constant. */\nexport const ValidationConfigZod = z.object({\n allowedRewardRedeemers: z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed reward redeemer addresses, if undefined anyone can participate',\n title: 'allowedRewardRedeemers',\n type: 'array',\n }),\n allowedRewardEscrowAccountSigners: z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed reward escrow account signer addresses, if undefined anyone can participate',\n title: 'allowedRewardEscrowAccountSigners',\n type: 'array',\n }),\n minCandidates: z.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry, {\n default: DEFAULT_MIN_CANDIDATES,\n description: 'Minimum number of uncle candidates before selecting the best uncle',\n title: 'validation.minCandidates',\n type: 'number',\n }),\n backoffMs: z.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry, {\n default: DEFAULT_BACKOFF_MS,\n description: 'Back-off timeout in ms. If head age exceeds this, minCandidates is ignored',\n title: 'validation.backoffMs',\n type: 'number',\n }),\n})\n\n/** ValidationConfig type. */\nexport type ValidationConfig = z.infer<typeof ValidationConfigZod>\n","import type { SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol-lib'\n\nimport { scoreUncle } from './scoreUncle.ts'\n\n/** Default minimum number of uncle candidates before selecting. */\nexport const DEFAULT_MIN_CANDIDATES = 1\n\n/** Default back-off timeout in milliseconds. If the head has not changed for this long, minCandidates is ignored. */\nexport const DEFAULT_BACKOFF_MS = 120_000\n\n/** Options for findBestUncle block selection. */\nexport interface FindBestUncleOptions {\n /** Back-off timeout in ms. If head age exceeds this, minCandidates is ignored. Default: 120_000. */\n backoffMs?: number\n /** Minimum number of uncle candidates before selecting. Default: 1. */\n minCandidates?: number\n /** Current timestamp in ms. Injectable for testing. Default: Date.now(). */\n now?: number\n}\n\n/** Selects the best uncle chain from candidates using Proof of Perfect scoring. */\nexport function findBestUncle(\n finalizedWindowedChain: SignedHydratedBlockWithHashMeta[],\n uncles: SignedHydratedBlockWithHashMeta[][],\n options?: FindBestUncleOptions,\n): SignedHydratedBlockWithHashMeta[] | undefined {\n if (uncles.length === 0) return undefined\n\n const minCandidates = options?.minCandidates ?? DEFAULT_MIN_CANDIDATES\n const backoffMs = options?.backoffMs ?? DEFAULT_BACKOFF_MS\n const now = options?.now ?? Date.now()\n\n if (uncles.length < minCandidates) {\n const headEpoch = finalizedWindowedChain.at(-1)?.[0].$epoch ?? 0\n const headAge = now - headEpoch\n if (headAge < backoffMs) {\n return undefined\n }\n }\n\n const scores = uncles.map(uncle => ([scoreUncle(finalizedWindowedChain, uncle), uncle] as const)).toSorted((a, b) => b[0] - a[0])\n return scores[0]?.[1]\n}\n","import z from 'zod'\n\nimport { ActorConfigZod } from './Actor.ts'\n\n/** ActorsConfigZod constant. */\nexport const ActorsConfigZod = z.array(ActorConfigZod.loose()).describe('Actor-specific configurations that override the base configuration when the actor is running').default([])\n\n/** ActorsConfig type. */\nexport type ActorsConfig = z.infer<typeof ActorsConfigZod>\n","import type z from 'zod'\n\nimport { ActorConfigZod } from './Actor.ts'\nimport { ActorsConfigZod } from './Actors.ts'\nimport { BaseConfigZod } from './Base.ts'\nimport type { DeepPartial } from './DeepPartial.ts'\n\n/** ConfigZod constant. */\nexport const ConfigZod = BaseConfigZod.extend({ actors: ActorsConfigZod }).describe('The complete configuration for the protocol, including global settings and actor-specific overrides')\n\n/** Config type. */\nexport type Config = z.infer<typeof ConfigZod>\n\n/** ResolveConfig helper function. */\nexport function resolveConfig(\n config: DeepPartial<Config>,\n) {\n const parsedConfig = ConfigZod.parse(config)\n const { actors, ...rootConfig } = parsedConfig\n parsedConfig.actors = actors.map((actorConfig) => {\n return ActorConfigZod.loose().parse({ ...rootConfig, ...actorConfig })\n })\n return parsedConfig\n}\n"],"mappings":";AAAA,SAAS,aAAAA,YAAW,cAAc;AAClC,SAAS,mBAAmB;;;ACD5B;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,kBAAAC,kBAAgB,KAAAC,WAAS;;;ACHlC,SAAS,KAAAC,WAAS;;;ACAlB,SAAS,YAAY,cAAc;AACnC,SAAS,gBAAgB,SAAS;AAG3B,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,IAAI,OAAO,SAAS,EACjB,SAAS,gBAAgB;AAAA,IACxB,aACA;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AAAA,EACH,sBAAsB,WAAW,SAAS,EACvC,SAAS,gBAAgB;AAAA,IACxB,aACA;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AACL,CAAC;;;ACnBD,SAAS,KAAAC,UAAS;;;ACAlB,SAAS,kBAAAC,iBAAgB,KAAAC,UAAS;;;ACAlC,SAAS,kBAAAC,iBAAgB,KAAAC,UAAS;AAG3B,IAAM,8BAA8BA,GAAE,OAAO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,IAAM,iBAAiBC,IAAE,OAAO,EAAE;AAAA,EACvC;AAAA,EACA;AACF;AAGO,IAAM,iBAAiB,cAAc,OAAO;AAAA,EACjD,MAAMA,IAAE,OAAO;AAAA,EACf,aAAa,eAAe,SAAS,EAAE,SAASC,kBAAgB;AAAA,IAC9D,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AAAA,EACD,iBAAiBD,IAAE,OAAO,OAAO,EAAE,SAAS,EAAE,SAASC,kBAAgB;AAAA,IACrE,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,EACR,CAAC;AACH,CAAC;AAMM,IAAM,gBAAgBC,cAAa,cAAc;AAEjD,IAAM,gBAAgBC,cAAa,gBAAgB,eAAe;AAElE,IAAM,gBAAgBC,cAAa,gBAAgB,eAAe;;;AiB7CzE,OAAOC,SAAO;AAKP,IAAM,kBAAkBC,IAAE,MAAM,eAAe,MAAM,CAAC,EAAE,SAAS,8FAA8F,EAAE,QAAQ,CAAC,CAAC;;;ACG3K,IAAM,YAAY,cAAc,OAAO,EAAE,QAAQ,gBAAgB,CAAC,EAAE,SAAS,qGAAqG;;;AnBAzL,IAAM,aAAa;AAKnB,IAAM,gBAAgB;AAMtB,eAAsB,cAAc,cAAyB;AAC3D,QAAM,WAAW;AAAA,IACf;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACA,QAAM,UAAmB,MAAM,SAAS,OAAO,IAAI;AACnD,MAAI,CAAC,OAAO,MAAM,GAAG;AACnB,UAAM,UAAW,OAAmC,aAAa;AACjE,QAAIC,WAAU,OAAO,KAAK,OAAO,YAAY,UAAU;AACrD,aAAO,UAAU,MAAM,EAAE,MAAM,OAAO;AAAA,IACxC;AAAA,EACF;AACA,SAAO,UAAU,MAAM,CAAC,CAAC;AAC3B;","names":["isDefined","zodAsFactory","zodIsFactory","zodToFactory","globalRegistry","z","z","z","globalRegistry","z","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","z","globalRegistry","z","globalRegistry","z","z","z","z","globalRegistry","z","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","globalRegistry","z","z","globalRegistry","AddressZod","globalRegistry","z","z","AddressZod","globalRegistry","z","z","globalRegistry","zodIsFactory","zodAsFactory","zodToFactory","z","z","isDefined"]}