@xyo-network/xl1-protocol-sdk 1.26.35 → 1.26.36

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.
@@ -8,22 +8,15 @@ import {
8
8
  zodIsFactory as zodIsFactory2,
9
9
  zodToFactory as zodToFactory2
10
10
  } from "@xylabs/sdk-js";
11
- import { globalRegistry as globalRegistry12, z as z17 } from "zod";
12
-
13
- // src/validation/schema/Mnemonic.ts
14
- import { z } from "zod";
15
- var MnemonicStringZod = z.string().transform((s) => s.trim().replaceAll(/\s+/g, " ")).refine(
16
- (s) => [12, 15, 18, 21, 24].includes(s.split(" ").length),
17
- { message: "Mnemonic must contain 12, 15, 18, 21, or 24 words." }
18
- ).describe("BIP-39 mnemonic string");
11
+ import { globalRegistry as globalRegistry12, z as z16 } from "zod";
19
12
 
20
13
  // src/config/Base.ts
21
- import { z as z16 } from "zod";
14
+ import { z as z15 } from "zod";
22
15
 
23
16
  // src/config/Chain.ts
24
17
  import { AddressZod, HexZod } from "@xylabs/sdk-js";
25
- import { globalRegistry, z as z2 } from "zod";
26
- var ChainConfigZod = z2.object({
18
+ import { globalRegistry, z } from "zod";
19
+ var ChainConfigZod = z.object({
27
20
  id: HexZod.optional().register(globalRegistry, {
28
21
  description: "The unique identifier for the chain. Should be the staking contract address for contract-backed chains.",
29
22
  title: "chain.id",
@@ -37,15 +30,15 @@ var ChainConfigZod = z2.object({
37
30
  });
38
31
 
39
32
  // src/config/DataLake/DataLake.ts
40
- import { z as z6 } from "zod";
33
+ import { z as z5 } from "zod";
41
34
 
42
35
  // src/config/DataLake/RestDataLakeConfig.ts
43
- import { globalRegistry as globalRegistry3, z as z4 } from "zod";
36
+ import { globalRegistry as globalRegistry3, z as z3 } from "zod";
44
37
 
45
38
  // src/config/DataLake/DataLakeRemoteConfig.ts
46
- import { globalRegistry as globalRegistry2, z as z3 } from "zod";
47
- var DataLakeDriverConfigBaseZod = z3.object({
48
- driver: z3.string().register(globalRegistry2, {
39
+ import { globalRegistry as globalRegistry2, z as z2 } from "zod";
40
+ var DataLakeDriverConfigBaseZod = z2.object({
41
+ driver: z2.string().register(globalRegistry2, {
49
42
  description: "Driver for the data lake",
50
43
  type: "string"
51
44
  })
@@ -53,55 +46,55 @@ var DataLakeDriverConfigBaseZod = z3.object({
53
46
 
54
47
  // src/config/DataLake/RestDataLakeConfig.ts
55
48
  var RestDataLakeConfigZod = DataLakeDriverConfigBaseZod.extend({
56
- driver: z4.literal("rest").register(globalRegistry3, {
49
+ driver: z3.literal("rest").register(globalRegistry3, {
57
50
  description: "Driver for the REST data lake",
58
51
  type: "string"
59
52
  }),
60
- url: z4.string().register(globalRegistry3, {
53
+ url: z3.string().register(globalRegistry3, {
61
54
  description: "URL for the REST data lake",
62
55
  type: "string"
63
56
  })
64
57
  }).describe("Configuration for the REST data lake driver");
65
58
 
66
59
  // src/config/DataLake/RouterDataLakeConfig.ts
67
- import { globalRegistry as globalRegistry4, z as z5 } from "zod";
68
- var RouterDataLakeConfigZod = z5.object({
69
- driver: z5.literal("router").register(globalRegistry4, {
60
+ import { globalRegistry as globalRegistry4, z as z4 } from "zod";
61
+ var RouterDataLakeConfigZod = z4.object({
62
+ driver: z4.literal("router").register(globalRegistry4, {
70
63
  description: "Driver for the router data lake",
71
64
  type: "string"
72
65
  }),
73
- children: z5.array(z5.lazy(() => DataLakeConfigZod)).register(globalRegistry4, {
66
+ children: z4.array(z4.lazy(() => DataLakeConfigZod)).register(globalRegistry4, {
74
67
  description: "Child data lake drivers",
75
68
  type: "array"
76
69
  })
77
70
  }).describe("Configuration for the router data lake driver");
78
71
 
79
72
  // src/config/DataLake/DataLake.ts
80
- var DataLakeConfigZod = z6.lazy(() => z6.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
73
+ var DataLakeConfigZod = z5.lazy(() => z5.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
81
74
 
82
75
  // src/config/Evm.ts
83
- import { globalRegistry as globalRegistry5, z as z7 } from "zod";
84
- var EvmInfuraConfigZod = z7.object({
85
- projectId: z7.string().optional().register(globalRegistry5, {
76
+ import { globalRegistry as globalRegistry5, z as z6 } from "zod";
77
+ var EvmInfuraConfigZod = z6.object({
78
+ projectId: z6.string().optional().register(globalRegistry5, {
86
79
  description: "Infura project ID",
87
80
  title: "evm.infura.projectId",
88
81
  type: "string"
89
82
  }),
90
- projectSecret: z7.string().optional().register(globalRegistry5, {
83
+ projectSecret: z6.string().optional().register(globalRegistry5, {
91
84
  description: "Infura project secret",
92
85
  title: "evm.infura.projectSecret",
93
86
  type: "string"
94
87
  })
95
88
  });
96
- var EvmJsonRpcConfigZod = z7.object({
97
- url: z7.url().optional().register(globalRegistry5, {
89
+ var EvmJsonRpcConfigZod = z6.object({
90
+ url: z6.url().optional().register(globalRegistry5, {
98
91
  description: "JSON-RPC URL",
99
92
  title: "evm.jsonRpc.url",
100
93
  type: "string"
101
94
  })
102
95
  });
103
- var EvmConfigZod = z7.object({
104
- chainId: z7.string().optional().register(globalRegistry5, {
96
+ var EvmConfigZod = z6.object({
97
+ chainId: z6.string().optional().register(globalRegistry5, {
105
98
  description: "EVM chain ID",
106
99
  title: "evm.chainId",
107
100
  type: "string"
@@ -112,17 +105,17 @@ var EvmConfigZod = z7.object({
112
105
 
113
106
  // src/config/Log.ts
114
107
  import { LogLevel } from "@xylabs/sdk-js";
115
- import { globalRegistry as globalRegistry6, z as z8 } from "zod";
108
+ import { globalRegistry as globalRegistry6, z as z7 } from "zod";
116
109
  var LogLevelNames = Object.keys(LogLevel);
117
- var LogConfigZod = z8.object({
118
- logLevel: z8.enum(LogLevelNames).default("info").register(globalRegistry6, {
110
+ var LogConfigZod = z7.object({
111
+ logLevel: z7.enum(LogLevelNames).default("info").register(globalRegistry6, {
119
112
  choices: LogLevelNames,
120
113
  default: "info",
121
114
  description: "Desired process verbosity",
122
115
  title: "logLevel",
123
116
  type: "string"
124
117
  }),
125
- silent: z8.boolean().default(false).register(globalRegistry6, {
118
+ silent: z7.boolean().default(false).register(globalRegistry6, {
126
119
  default: false,
127
120
  description: "Whether to run in silent mode",
128
121
  title: "silent",
@@ -131,7 +124,7 @@ var LogConfigZod = z8.object({
131
124
  });
132
125
 
133
126
  // src/config/Providers.ts
134
- import z10 from "zod";
127
+ import z9 from "zod";
135
128
 
136
129
  // src/config/Provider.ts
137
130
  import {
@@ -139,79 +132,79 @@ import {
139
132
  zodIsFactory,
140
133
  zodToFactory
141
134
  } from "@xylabs/sdk-js";
142
- import { z as z9 } from "zod";
143
- var ProviderConfigZod = z9.object({
144
- moniker: z9.string(),
145
- labels: z9.array(z9.string()).optional()
135
+ import { z as z8 } from "zod";
136
+ var ProviderConfigZod = z8.object({
137
+ moniker: z8.string(),
138
+ labels: z8.array(z8.string()).optional()
146
139
  }).describe("Configuration for a Provider");
147
140
  var isProviderConfig = zodIsFactory(ProviderConfigZod);
148
141
  var asProviderConfig = zodAsFactory(ProviderConfigZod, "asProviderConfig");
149
142
  var toProviderConfig = zodToFactory(ProviderConfigZod, "toProviderConfig");
150
143
 
151
144
  // src/config/Providers.ts
152
- var ProvidersConfigZod = z10.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
145
+ var ProvidersConfigZod = z9.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
153
146
 
154
147
  // src/config/Remote.ts
155
- import { globalRegistry as globalRegistry7, z as z11 } from "zod";
156
- var RpcRemoteConfigBaseZod = z11.object({
157
- protocol: z11.string("http").register(globalRegistry7, {
148
+ import { globalRegistry as globalRegistry7, z as z10 } from "zod";
149
+ var RpcRemoteConfigBaseZod = z10.object({
150
+ protocol: z10.string("http").register(globalRegistry7, {
158
151
  description: "Protocol for the RPC connection",
159
152
  type: "string"
160
153
  })
161
154
  }).describe("Base configuration for the remote RPC");
162
155
  var HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
163
- protocol: z11.string("http").register(globalRegistry7, {
156
+ protocol: z10.string("http").register(globalRegistry7, {
164
157
  description: "Protocol for the RPC connection",
165
158
  type: "string"
166
159
  }).default("http"),
167
- url: z11.string().register(globalRegistry7, {
160
+ url: z10.string().register(globalRegistry7, {
168
161
  description: "URL for the Chain RPC API",
169
162
  type: "string"
170
163
  })
171
164
  }).describe("Configuration for the remote RPC using Http");
172
165
  var PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
173
- protocol: z11.string().register(globalRegistry7, {
166
+ protocol: z10.string().register(globalRegistry7, {
174
167
  description: "Protocol for the RPC connection",
175
168
  type: "string"
176
169
  }).default("postMessage"),
177
- networkId: z11.string().register(globalRegistry7, {
170
+ networkId: z10.string().register(globalRegistry7, {
178
171
  description: "Network ID to use for the postMessage RPC connection",
179
172
  type: "string"
180
173
  }),
181
- sessionId: z11.string().register(globalRegistry7, {
174
+ sessionId: z10.string().register(globalRegistry7, {
182
175
  description: "Session ID to use for the postMessage RPC connection",
183
176
  type: "string"
184
177
  })
185
178
  }).describe("Configuration for the remote RPC using postMessage");
186
- var RpcRemoteConfigZod = z11.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
187
- var RemoteConfigZod = z11.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
179
+ var RpcRemoteConfigZod = z10.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
180
+ var RemoteConfigZod = z10.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
188
181
 
189
182
  // src/config/storage/driver/Mongo.ts
190
183
  import { isDefined, isUndefined } from "@xylabs/sdk-js";
191
- import { globalRegistry as globalRegistry8, z as z12 } from "zod";
192
- var MongoConfigZod = z12.object({
184
+ import { globalRegistry as globalRegistry8, z as z11 } from "zod";
185
+ var MongoConfigZod = z11.object({
193
186
  // TODO: Create from other arguments
194
- connectionString: z12.string().nonempty().optional().register(globalRegistry8, {
187
+ connectionString: z11.string().nonempty().optional().register(globalRegistry8, {
195
188
  description: "MongoDB connection string",
196
189
  title: "storage.mongo.connectionString",
197
190
  type: "string"
198
191
  }),
199
- database: z12.string().nonempty().optional().register(globalRegistry8, {
192
+ database: z11.string().nonempty().optional().register(globalRegistry8, {
200
193
  description: "MongoDB database name",
201
194
  title: "storage.mongo.database",
202
195
  type: "string"
203
196
  }),
204
- domain: z12.string().nonempty().optional().register(globalRegistry8, {
197
+ domain: z11.string().nonempty().optional().register(globalRegistry8, {
205
198
  description: "MongoDB domain",
206
199
  title: "storage.mongo.domain",
207
200
  type: "string"
208
201
  }),
209
- password: z12.string().nonempty().optional().register(globalRegistry8, {
202
+ password: z11.string().nonempty().optional().register(globalRegistry8, {
210
203
  description: "MongoDB password",
211
204
  title: "storage.mongo.password",
212
205
  type: "string"
213
206
  }),
214
- username: z12.string().nonempty().optional().register(globalRegistry8, {
207
+ username: z11.string().nonempty().optional().register(globalRegistry8, {
215
208
  description: "MongoDB username",
216
209
  title: "storage.mongo.username",
217
210
  type: "string"
@@ -219,10 +212,10 @@ var MongoConfigZod = z12.object({
219
212
  });
220
213
 
221
214
  // src/config/storage/Storage.ts
222
- import { globalRegistry as globalRegistry9, z as z13 } from "zod";
223
- var StorageConfigZod = z13.object({
215
+ import { globalRegistry as globalRegistry9, z as z12 } from "zod";
216
+ var StorageConfigZod = z12.object({
224
217
  mongo: MongoConfigZod.optional().describe("Configuration for the MongoD storage driver"),
225
- root: z13.string().optional().register(globalRegistry9, {
218
+ root: z12.string().optional().register(globalRegistry9, {
226
219
  description: "Root directory for local storage",
227
220
  title: "storage.root",
228
221
  type: "string"
@@ -230,30 +223,30 @@ var StorageConfigZod = z13.object({
230
223
  }).describe("Storage configuration options");
231
224
 
232
225
  // src/config/Telemetry.ts
233
- import { globalRegistry as globalRegistry10, z as z14 } from "zod";
234
- var MetricsScrapeConfigZod = z14.object({
235
- path: z14.string().default("/metrics").register(globalRegistry10, {
226
+ import { globalRegistry as globalRegistry10, z as z13 } from "zod";
227
+ var MetricsScrapeConfigZod = z13.object({
228
+ path: z13.string().default("/metrics").register(globalRegistry10, {
236
229
  default: "/metrics",
237
230
  description: "Path for the metrics scrape endpoint",
238
231
  title: "telemetry.metrics.scrape.path",
239
232
  type: "string"
240
233
  }),
241
- port: z14.coerce.number().int().positive().optional().register(globalRegistry10, {
234
+ port: z13.coerce.number().int().positive().optional().register(globalRegistry10, {
242
235
  description: "Port for the metrics scrape endpoint",
243
236
  title: "telemetry.metrics.scrape.port",
244
237
  type: "number"
245
238
  })
246
239
  }).describe("Metrics scrape configuration");
247
- var MetricsConfigZod = z14.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
248
- var OpenTelemetryConfigZod = z14.object({
240
+ var MetricsConfigZod = z13.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
241
+ var OpenTelemetryConfigZod = z13.object({
249
242
  // OpenTelemetry options
250
- otlpEndpoint: z14.url().optional().register(globalRegistry10, {
243
+ otlpEndpoint: z13.url().optional().register(globalRegistry10, {
251
244
  description: "OTLP endpoint for exporting telemetry data",
252
245
  title: "telemetry.otel.otlpEndpoint",
253
246
  type: "string"
254
247
  })
255
248
  });
256
- var TelemetryConfigZod = z14.object({
249
+ var TelemetryConfigZod = z13.object({
257
250
  // Metrics configuration
258
251
  metrics: MetricsConfigZod.optional().describe("Metrics configuration"),
259
252
  // OpenTelemetry configuration
@@ -262,41 +255,41 @@ var TelemetryConfigZod = z14.object({
262
255
 
263
256
  // src/config/Validation.ts
264
257
  import { AddressZod as AddressZod2, asAddress } from "@xylabs/sdk-js";
265
- import { globalRegistry as globalRegistry11, z as z15 } from "zod";
258
+ import { globalRegistry as globalRegistry11, z as z14 } from "zod";
266
259
 
267
260
  // src/primitives/uncle/findBestUncle.ts
268
261
  var DEFAULT_MIN_CANDIDATES = 2;
269
262
  var DEFAULT_BACKOFF_MS = 12e4;
270
263
 
271
264
  // src/config/Validation.ts
272
- var ValidationConfigZod = z15.object({
273
- allowedRewardRedeemers: z15.preprocess((val) => {
265
+ var ValidationConfigZod = z14.object({
266
+ allowedRewardRedeemers: z14.preprocess((val) => {
274
267
  if (typeof val === "string") {
275
268
  return val.split(",").map((s) => asAddress(s.trim()));
276
269
  }
277
270
  return val;
278
- }, z15.array(AddressZod2).optional().register(globalRegistry11, {
271
+ }, z14.array(AddressZod2).optional().register(globalRegistry11, {
279
272
  description: "List of allowed reward redeemer addresses, if undefined anyone can participate",
280
273
  title: "allowedRewardRedeemers",
281
274
  type: "array"
282
275
  })),
283
- allowedRewardEscrowAccountSigners: z15.preprocess((val) => {
276
+ allowedRewardEscrowAccountSigners: z14.preprocess((val) => {
284
277
  if (typeof val === "string") {
285
278
  return val.split(",").map((s) => asAddress(s.trim()));
286
279
  }
287
280
  return val;
288
- }, z15.array(AddressZod2).optional().register(globalRegistry11, {
281
+ }, z14.array(AddressZod2).optional().register(globalRegistry11, {
289
282
  description: "List of allowed reward escrow account signer addresses, if undefined anyone can participate",
290
283
  title: "allowedRewardEscrowAccountSigners",
291
284
  type: "array"
292
285
  })),
293
- minCandidates: z15.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry11, {
286
+ minCandidates: z14.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry11, {
294
287
  default: DEFAULT_MIN_CANDIDATES,
295
288
  description: "Minimum number of uncle candidates before selecting the best uncle",
296
289
  title: "validation.minCandidates",
297
290
  type: "number"
298
291
  }),
299
- backoffMs: z15.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry11, {
292
+ backoffMs: z14.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry11, {
300
293
  default: DEFAULT_BACKOFF_MS,
301
294
  description: "Back-off timeout in ms. If head age exceeds this, minCandidates is ignored",
302
295
  title: "validation.backoffMs",
@@ -305,7 +298,7 @@ var ValidationConfigZod = z15.object({
305
298
  });
306
299
 
307
300
  // src/config/Base.ts
308
- var BaseConfigZod = z16.object({
301
+ var BaseConfigZod = z15.object({
309
302
  chain: ChainConfigZod.default(ChainConfigZod.parse({})).describe("Configuration for the chain"),
310
303
  dataLake: DataLakeConfigZod.optional().describe("Configuration for data lakes"),
311
304
  evm: EvmConfigZod.default(EvmConfigZod.parse({})).describe("Configuration for EVM-backed services"),
@@ -318,14 +311,18 @@ var BaseConfigZod = z16.object({
318
311
  });
319
312
 
320
313
  // src/config/Actor.ts
314
+ var AccountPathZod = z16.string().regex(
315
+ /^(m(\/\d+'?)+|\d+'?(\/\d+'?)*)$/,
316
+ `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".`
317
+ );
321
318
  var ActorConfigZod = BaseConfigZod.extend({
322
- name: z17.string(),
323
- mnemonic: MnemonicStringZod.optional().register(globalRegistry12, {
324
- description: "Mnemonic for the Actor wallet",
325
- title: "mnemonic",
319
+ name: z16.string(),
320
+ accountPath: AccountPathZod.optional().register(globalRegistry12, {
321
+ 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.',
322
+ title: "accountPath",
326
323
  type: "string"
327
324
  }),
328
- healthCheckPort: z17.coerce.number().optional().register(globalRegistry12, {
325
+ healthCheckPort: z16.coerce.number().optional().register(globalRegistry12, {
329
326
  description: "Port for the Producer health checks",
330
327
  title: "producer.healthCheckPort",
331
328
  type: "number"
@@ -336,8 +333,8 @@ var asActorConfig = zodAsFactory2(ActorConfigZod, "asActorConfig");
336
333
  var toActorConfig = zodToFactory2(ActorConfigZod, "toActorConfig");
337
334
 
338
335
  // src/config/Actors.ts
339
- import z18 from "zod";
340
- var ActorsConfigZod = z18.array(ActorConfigZod.loose()).describe("Actor-specific configurations that override the base configuration when the actor is running").default([]);
336
+ import z17 from "zod";
337
+ var ActorsConfigZod = z17.array(ActorConfigZod.loose()).describe("Actor-specific configurations that override the base configuration when the actor is running").default([]);
341
338
 
342
339
  // src/config/Config.ts
343
340
  var ConfigZod = BaseConfigZod.extend({ actors: ActorsConfigZod }).describe("The complete configuration for the protocol, including global settings and actor-specific overrides");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getFileConfig.ts","../../src/config/Actor.ts","../../src/validation/schema/Mnemonic.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 { MnemonicStringZod } from '../validation/index.ts'\nimport { BaseConfigZod } from './Base.ts'\n\n/** ActorConfigZod constant. */\nexport const ActorConfigZod = BaseConfigZod.extend({\n name: z.string(),\n mnemonic: MnemonicStringZod.optional().register(globalRegistry, {\n description: 'Mnemonic for the Actor wallet',\n title: 'mnemonic',\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\n/**\n * Validates a single string containing a BIP-39 mnemonic.\n *\n * • Trims leading/trailing whitespace.\n * • Collapses any run of whitespace (spaces, tabs, new-lines) to a single space.\n * • Splits on spaces → array of words.\n * • Checks that the word-count is 12, 15, 18, 21, or 24.\n *\n */\nexport const MnemonicStringZod = z\n .string()\n .transform(s => s.trim().replaceAll(/\\s+/g, ' ')) // normalize spacing\n .refine(\n s => [12, 15, 18, 21, 24].includes(s.split(' ').length),\n { message: 'Mnemonic must contain 12, 15, 18, 21, or 24 words.' },\n ).describe('BIP-39 mnemonic string')\n\n/** MnemonicString type. */\nexport type MnemonicString = z.infer<typeof MnemonicStringZod>\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 = 2\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: 2. */\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,SAAS;AAWX,IAAM,oBAAoB,EAC9B,OAAO,EACP,UAAU,OAAK,EAAE,KAAK,EAAE,WAAW,QAAQ,GAAG,CAAC,EAC/C;AAAA,EACC,OAAK,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,EAAE,MAAM;AAAA,EACtD,EAAE,SAAS,qDAAqD;AAClE,EAAE,SAAS,wBAAwB;;;ACjBrC,SAAS,KAAAC,WAAS;;;ACAlB,SAAS,YAAY,cAAc;AACnC,SAAS,gBAAgB,KAAAC,UAAS;AAG3B,IAAM,iBAAiBA,GAAE,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;AAAA,EAClD,QAAQA,GAAE,OAAO,EAAE,SAASD,iBAAgB;AAAA,IAC1C,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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","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, 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 = 2\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: 2. */\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,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ACE,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"]}