@xyo-network/xl1-cli-lib 2.0.12 → 2.0.13

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.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/xl1-cli-lib
2
4
 
3
5
  [![npm][npm-badge]][npm-link]
@@ -16,9 +18,12 @@
16
18
 
17
19
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
18
20
 
21
+ ## Credits
19
22
 
23
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
20
24
 
21
25
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-cli-lib.svg
22
26
  [npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-cli-lib
23
27
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-cli-lib.svg
24
28
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
29
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
@@ -1 +1 @@
1
- {"version":3,"file":"startCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/start/startCommand.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACO,qBAAqB,EACvC,MAAM,kCAAkC,CAAA;AAWzC,OAAO,KAAK,EAAE,MAAM,EAAkC,MAAM,sBAAsB,CAAA;AAClF,OAAO,KAAK,EACgB,aAAa,EACxC,MAAM,OAAO,CAAA;AA2Ed,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,MAAM,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,aAAa,CA6BxH"}
1
+ {"version":3,"file":"startCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/start/startCommand.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACO,qBAAqB,EACvC,MAAM,kCAAkC,CAAA;AAazC,OAAO,KAAK,EAAE,MAAM,EAAkC,MAAM,sBAAsB,CAAA;AAClF,OAAO,KAAK,EACgB,aAAa,EACxC,MAAM,OAAO,CAAA;AA+Ed,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,MAAM,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,aAAa,CA6BxH"}
@@ -137,6 +137,7 @@ import {
137
137
  } from "@xyo-network/chain-orchestration";
138
138
  import { initHealthEndpoints } from "@xyo-network/chain-orchestration-express";
139
139
  import { producerCommand } from "@xyo-network/chain-producer";
140
+ import { publisherCommand } from "@xyo-network/chain-publisher";
140
141
  import { rewardRedemptionCommand } from "@xyo-network/chain-reward-redemption";
141
142
  import {
142
143
  ActorConfigZod,
@@ -158,11 +159,13 @@ import {
158
159
  FinalizerConfigZod,
159
160
  MempoolConfigZod,
160
161
  ProducerConfigZod,
162
+ PublisherConfigZod,
161
163
  RewardRedemptionConfigZod
162
164
  } from "@xyo-network/chain-orchestration";
163
165
  import { getProducerActor } from "@xyo-network/chain-producer";
166
+ import { getPublisherActor } from "@xyo-network/chain-publisher";
164
167
  import { getRewardRedemptionActor } from "@xyo-network/chain-reward-redemption";
165
- var KNOWN_ACTORS = ["api", "bridge", "finalizer", "mempool", "producer", "rewardRedemption"];
168
+ var KNOWN_ACTORS = ["api", "bridge", "finalizer", "mempool", "producer", "publisher", "rewardRedemption"];
166
169
  var BOOT_TIMEOUT_MS = 6e4;
167
170
  function getActorsFromConfig(configuration2) {
168
171
  const enabledActors = configuration2.actors.filter((actor) => actor.enabled !== false).map((actor) => actor.name);
@@ -197,6 +200,10 @@ async function buildActor(name, locator) {
197
200
  const config2 = FinalizerConfigZod.parse(locator.context.config);
198
201
  return await getFinalizerActor(config2, locator);
199
202
  }
203
+ case "publisher": {
204
+ const config2 = PublisherConfigZod.parse(locator.context.config);
205
+ return await getPublisherActor(config2, locator);
206
+ }
200
207
  default: {
201
208
  throw new Error(`Unknown actor: ${name}`);
202
209
  }
@@ -436,7 +443,7 @@ function defaultScrapePortForActors(actors) {
436
443
  var configuration;
437
444
  var skipInsecureConfirm = false;
438
445
  var dumpProviders = false;
439
- var version = isDefined3("2.0.12") ? "2.0.12" : "unknown";
446
+ var version = isDefined3("2.0.13") ? "2.0.13" : "unknown";
440
447
  function getConfiguration() {
441
448
  return configuration;
442
449
  }
@@ -525,7 +532,7 @@ $0 <command> [options]`).parserConfiguration({
525
532
  });
526
533
  skipInsecureConfirm = Boolean(argv2["skip-insecure-confirm"]);
527
534
  dumpProviders = Boolean(argv2["dump-providers"]);
528
- }).options(optionsFromGlobalZodRegistry()).wrap(y.terminalWidth()).command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig))).command(startCommand(getConfiguration, getLocatorsFromConfig)).options({
535
+ }).options(optionsFromGlobalZodRegistry()).wrap(y.terminalWidth()).command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(publisherCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig))).command(startCommand(getConfiguration, getLocatorsFromConfig)).options({
529
536
  "config": {
530
537
  type: "string",
531
538
  description: "Path to a config file to use instead of the default search.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/configMiddleware.ts", "../../src/initLogger.ts", "../../src/runCLI.ts", "../../src/commands/start/startCommand.ts", "../../src/commands/withDeprecationWarning.ts", "../../src/dumpProviders.ts", "../../src/images.ts", "../../src/optionsFromGlobalZodRegistry.ts", "../../src/start.ts"],
4
- "sourcesContent": ["import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rolldown at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n"],
5
- "mappings": ";AAAA,SAAS,iBAAiB,iBAAiB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EAAW;AAAA,EAAY;AAAA,OAClB;AAEP,IAAM,YAAY,gBAAgB,EAAE,eAAe,SAAS,CAAC;AAG7D,IAAM,WAAW;AAMjB,IAAM,qBAAqB,oBAAI,IAAY,CAAC,YAAY,kBAAkB,CAAC;AAM3E,IAAM,sBAAsB;AAE5B,SAAS,gBAAgB,KAAsB;AAC7C,MAAI,mBAAmB,IAAI,GAAG,EAAG,QAAO;AACxC,SAAO,oBAAoB,KAAK,GAAG;AACrC;AAOO,SAAS,aAAgBA,SAAc;AAC5C,QAAM,SAAS,gBAAgBA,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AA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;AMtNA,SAAS,cAAc;AAIhB,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;",
4
+ "sourcesContent": ["import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { publisherCommand } from '@xyo-network/chain-publisher'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rolldown at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(publisherCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n PublisherConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getPublisherActor } from '@xyo-network/chain-publisher'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'publisher', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n case 'publisher': {\n const config = PublisherConfigZod.parse(locator.context.config)\n return await getPublisherActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start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figZod", "configuration", "config", "getConfiguration", "getLocatorsFromConfig", "yargs", "isDefined", "configuration", "config", "ConfigZod", "argv"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runCLI.d.ts","sourceRoot":"","sources":["../../src/runCLI.ts"],"names":[],"mappings":"AA+IA,wBAAsB,MAAM,kBAuE3B"}
1
+ {"version":3,"file":"runCLI.d.ts","sourceRoot":"","sources":["../../src/runCLI.ts"],"names":[],"mappings":"AAgJA,wBAAsB,MAAM,kBAwE3B"}
package/dist/node/xl1.mjs CHANGED
@@ -19,6 +19,7 @@ import {
19
19
  } from "@xyo-network/chain-orchestration";
20
20
  import { initHealthEndpoints } from "@xyo-network/chain-orchestration-express";
21
21
  import { producerCommand } from "@xyo-network/chain-producer";
22
+ import { publisherCommand } from "@xyo-network/chain-publisher";
22
23
  import { rewardRedemptionCommand } from "@xyo-network/chain-reward-redemption";
23
24
  import {
24
25
  ActorConfigZod,
@@ -40,9 +41,11 @@ import {
40
41
  FinalizerConfigZod,
41
42
  MempoolConfigZod,
42
43
  ProducerConfigZod,
44
+ PublisherConfigZod,
43
45
  RewardRedemptionConfigZod
44
46
  } from "@xyo-network/chain-orchestration";
45
47
  import { getProducerActor } from "@xyo-network/chain-producer";
48
+ import { getPublisherActor } from "@xyo-network/chain-publisher";
46
49
  import { getRewardRedemptionActor } from "@xyo-network/chain-reward-redemption";
47
50
 
48
51
  // src/initLogger.ts
@@ -70,7 +73,7 @@ var initLogger = (config2) => {
70
73
  };
71
74
 
72
75
  // src/commands/start/startCommand.ts
73
- var KNOWN_ACTORS = ["api", "bridge", "finalizer", "mempool", "producer", "rewardRedemption"];
76
+ var KNOWN_ACTORS = ["api", "bridge", "finalizer", "mempool", "producer", "publisher", "rewardRedemption"];
74
77
  var BOOT_TIMEOUT_MS = 6e4;
75
78
  function getActorsFromConfig(configuration2) {
76
79
  const enabledActors = configuration2.actors.filter((actor) => actor.enabled !== false).map((actor) => actor.name);
@@ -105,6 +108,10 @@ async function buildActor(name, locator) {
105
108
  const config2 = FinalizerConfigZod.parse(locator.context.config);
106
109
  return await getFinalizerActor(config2, locator);
107
110
  }
111
+ case "publisher": {
112
+ const config2 = PublisherConfigZod.parse(locator.context.config);
113
+ return await getPublisherActor(config2, locator);
114
+ }
108
115
  default: {
109
116
  throw new Error(`Unknown actor: ${name}`);
110
117
  }
@@ -441,7 +448,7 @@ function defaultScrapePortForActors(actors) {
441
448
  var configuration;
442
449
  var skipInsecureConfirm = false;
443
450
  var dumpProviders = false;
444
- var version = isDefined3("2.0.12") ? "2.0.12" : "unknown";
451
+ var version = isDefined3("2.0.13") ? "2.0.13" : "unknown";
445
452
  function getConfiguration() {
446
453
  return configuration;
447
454
  }
@@ -530,7 +537,7 @@ $0 <command> [options]`).parserConfiguration({
530
537
  });
531
538
  skipInsecureConfirm = Boolean(argv2["skip-insecure-confirm"]);
532
539
  dumpProviders = Boolean(argv2["dump-providers"]);
533
- }).options(optionsFromGlobalZodRegistry()).wrap(y.terminalWidth()).command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig))).command(startCommand(getConfiguration, getLocatorsFromConfig)).options({
540
+ }).options(optionsFromGlobalZodRegistry()).wrap(y.terminalWidth()).command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(publisherCommand(getConfiguration, getLocatorsFromConfig))).command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig))).command(startCommand(getConfiguration, getLocatorsFromConfig)).options({
534
541
  "config": {
535
542
  type: "string",
536
543
  description: "Path to a config file to use instead of the default search.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/start.ts", "../../src/runCLI.ts", "../../src/commands/start/startCommand.ts", "../../src/initLogger.ts", "../../src/commands/withDeprecationWarning.ts", "../../src/configMiddleware.ts", "../../src/dumpProviders.ts", "../../src/images.ts", "../../src/optionsFromGlobalZodRegistry.ts", "../../src/xl1.ts"],
4
- "sourcesContent": ["import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rolldown at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { start } from './start.ts'\n\nstart().catch((err) => {\n // If we're in development mode, log the stack trace to the console\n if (process.env.NODE_ENV === 'development') console.error('An error occurred during startup:', err)\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n})\n"],
5
- "mappings": ";AAAA,SAAS,c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AC,EACzF,QAAQ,uBAAuB,eAAe,kBAAkB,qBAAqB,CAAC,CAAC,EACvF,QAAQ,uBAAuB,gBAAgB,kBAAkB,qBAAqB,CAAC,CAAC,EACxF,QAAQ,uBAAuB,wBAAwB,kBAAkB,qBAAqB,CAAC,CAAC,EAChG,QAAQ,aAAa,kBAAkB,qBAAqB,CAAC,EAC7D,QAAQ;AAAA,IACP,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;ADlNO,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;;;ASLA,MAAM,EAAE,MAAM,CAAC,QAAQ;AAErB,MAAI,QAAQ,IAAI,aAAa,cAAe,SAAQ,MAAM,qCAAqC,GAAG;AAElG,UAAQ,KAAK,CAAC;AAChB,CAAC;",
4
+ "sourcesContent": ["import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { publisherCommand } from '@xyo-network/chain-publisher'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rolldown at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(publisherCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n PublisherConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getPublisherActor } from '@xyo-network/chain-publisher'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'publisher', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n case 'publisher': {\n const config = PublisherConfigZod.parse(locator.context.config)\n return await getPublisherActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { start } from './start.ts'\n\nstart().catch((err) => {\n // If we're in development mode, log the stack trace to the console\n if (process.env.NODE_ENV === 'development') console.error('An error occurred during startup:', err)\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n})\n"],
5
+ "mappings": ";AAAA,SAAS,cAAc;;;ACAvB,SAAS,SAAS,OAAO,UAAU,cAAc;AACjD,SAAS,uBAAuB;AAEhC,SAAS,aAAAA,kBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EAAiC;AAAA,EAAgC;AAAA,EAAoB;AAAA,EACrF;AAAA,EAAoB;AAAA,OACf;AACP,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,+BAA+B;AAExC;AAAA,EACE;AAAA,EAAgB,aAAAC;AAAA,EAAW;AAAA,OACtB;AAEP,OAA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,EAChG,QAAQ,aAAa,kBAAkB,qBAAqB,CAAC,EAC7D,QAAQ;AAAA,IACP,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;ADpNO,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;;;ASLA,MAAM,EAAE,MAAM,CAAC,QAAQ;AAErB,MAAI,QAAQ,IAAI,aAAa,cAAe,SAAQ,MAAM,qCAAqC,GAAG;AAElG,UAAQ,KAAK,CAAC;AAChB,CAAC;",
6
6
  "names": ["isDefined", "ConfigZod", "config", "configuration", "config", "getConfiguration", "getLocatorsFromConfig", "yargs", "isDefined", "config", "input", "output", "isDefined", "configuration", "config", "ConfigZod", "argv"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/xl1-cli-lib",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "XYO Layer One CLI Library",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -38,14 +38,16 @@
38
38
  "README.md"
39
39
  ],
40
40
  "dependencies": {
41
- "@xyo-network/chain-mempool": "~2.0.12",
42
- "@xyo-network/chain-finalizer": "~2.0.12",
43
- "@xyo-network/chain-orchestration": "~2.0.12",
44
- "@xyo-network/chain-orchestration-express": "~2.0.12",
45
- "@xyo-network/chain-producer": "~2.0.12",
46
- "@xyo-network/chain-reward-redemption": "~2.0.12",
47
- "@xyo-network/chain-bridge": "~2.0.12",
48
- "@xyo-network/chain-api": "~2.0.12"
41
+ "@aws-sdk/client-s3": "^3.1066.0",
42
+ "@xyo-network/chain-api": "~2.0.13",
43
+ "@xyo-network/chain-bridge": "~2.0.13",
44
+ "@xyo-network/chain-finalizer": "~2.0.13",
45
+ "@xyo-network/chain-mempool": "~2.0.13",
46
+ "@xyo-network/chain-orchestration": "~2.0.13",
47
+ "@xyo-network/chain-orchestration-express": "~2.0.13",
48
+ "@xyo-network/chain-producer": "~2.0.13",
49
+ "@xyo-network/chain-publisher": "~2.0.13",
50
+ "@xyo-network/chain-reward-redemption": "~2.0.13"
49
51
  },
50
52
  "devDependencies": {
51
53
  "@bitauth/libauth": "~3.0.0",
@@ -72,53 +74,35 @@
72
74
  "@scure/base": "~2.2.0",
73
75
  "@scure/bip39": "~2.2.0",
74
76
  "@types/yargs": "^17.0.35",
75
- "@xylabs/express": "^6.0.7",
76
- "@xylabs/geo": "^6.0.7",
77
- "@xylabs/mongo": "^6.0.7",
78
- "@xylabs/sdk-js": "^6.0.7",
79
- "@xylabs/threads": "~6.0.7",
80
- "@xylabs/toolchain": "~8.1.15",
81
- "@xylabs/tsconfig": "~8.1.15",
82
- "@xyo-network/account": "~6.0.8",
83
- "@xyo-network/account-model": "~6.0.8",
84
- "@xyo-network/address": "^6.0.8",
85
- "@xyo-network/api": "~6.0.8",
86
- "@xyo-network/api-models": "~6.0.8",
87
- "@xyo-network/archivist-lmdb": "~6.0.3",
88
- "@xyo-network/archivist-mongodb": "~6.0.3",
89
- "@xyo-network/archivist-view": "~6.0.3",
90
- "@xyo-network/bios": "~8.0",
91
- "@xyo-network/bios-model": "~8.0",
92
- "@xyo-network/boundwitness-builder": "~6.0.8",
93
- "@xyo-network/boundwitness-model": "~6.0.8",
94
- "@xyo-network/boundwitness-wrapper": "~6.0.8",
95
- "@xyo-network/config-payload-plugin": "~6.0.8",
96
- "@xyo-network/huri": "~6.0.8",
97
- "@xyo-network/manifest-model": "~6.0.8",
98
- "@xyo-network/payload-builder": "~6.0.8",
99
- "@xyo-network/payload-model": "~6.0.8",
100
- "@xyo-network/payload-plugin": "~6.0.8",
101
- "@xyo-network/payload-wrapper": "~6.0.8",
102
- "@xyo-network/query-payload-plugin": "~6.0.8",
103
- "@xyo-network/sdk-js": "^6.0.3",
104
- "@xyo-network/sdk-protocol-js": "~6.0.8",
77
+ "@xylabs/express": "^6.1.1",
78
+ "@xylabs/geo": "^6.1.1",
79
+ "@xylabs/mongo": "^6.1.1",
80
+ "@xylabs/sdk-js": "^6.1.1",
81
+ "@xylabs/threads": "^6.1.1",
82
+ "@xylabs/toolchain": "~8.1.20",
83
+ "@xylabs/tsconfig": "~8.1.20",
84
+ "@xyo-network/address": "^6.1.0",
85
+ "@xyo-network/archivist-lmdb": "~6.1",
86
+ "@xyo-network/archivist-mongodb": "~6.1.0",
87
+ "@xyo-network/archivist-view": "~6.1",
88
+ "@xyo-network/bios": "~8.0.1",
89
+ "@xyo-network/bios-model": "~8.0.1",
90
+ "@xyo-network/sdk-js": "^6.1.0",
91
+ "@xyo-network/sdk-protocol-js": "~6.1.0",
105
92
  "@xyo-network/typechain": "^4.1.3",
106
- "@xyo-network/wallet": "~6.0.8",
107
- "@xyo-network/wallet-model": "^6.0.8",
108
- "@xyo-network/xl1-protocol-sdk": "~2.0.9",
109
- "@xyo-network/xl1-sdk": "^2.0.9",
93
+ "@xyo-network/wallet-model": "^6.1.0",
94
+ "@xyo-network/xl1-protocol-sdk": "~2.1.4",
95
+ "@xyo-network/xl1-sdk": "^2.1.4",
110
96
  "ajv": "^8.20.0",
111
97
  "async-mutex": "^0.5.0",
112
- "bn.js": "^5.2.3",
113
98
  "body-parser": "~2.2.2",
114
- "buffer": "^6.0.3",
115
99
  "bullmq": "~5.77.7",
116
100
  "bullmq-otel": "~1.3.1",
117
101
  "chalk": "^5.6.2",
118
102
  "compression": "~1.8.1",
119
103
  "connect": "^3.7.0",
120
104
  "cors": "~2.8.6",
121
- "cosmiconfig": "^9.0.1",
105
+ "cosmiconfig": "^9.0.2",
122
106
  "debug": "~4.4.3",
123
107
  "dotenv": "~17.4.2",
124
108
  "eslint": "^10.4.1",
@@ -130,10 +114,8 @@
130
114
  "ioredis": "~5.10.1",
131
115
  "lmdb": "^3.5.5",
132
116
  "lru-cache": "^11.5.1",
133
- "mapbox-gl": "^3.24.0",
134
- "mongodb": "^7.2.0",
117
+ "mongodb": "^7.3.0",
135
118
  "observable-fns": "~0.6.1",
136
- "pako": "^2.1.0",
137
119
  "rollbar": "^3.1.0",
138
120
  "shallowequal": "~1.1.0",
139
121
  "store2": "~2.14.4",
@@ -141,7 +123,6 @@
141
123
  "uuid": "~14.0.0",
142
124
  "vite": "^8.0.16",
143
125
  "vitest": "^4.1.8",
144
- "wasm-feature-detect": "~1.8.0",
145
126
  "web3-types": "~1.10.0",
146
127
  "webextension-polyfill": "^0.12.0",
147
128
  "winston": "~3.19.0",
@@ -177,40 +158,22 @@
177
158
  "@xylabs/geo": "^6.0",
178
159
  "@xylabs/mongo": "^6.0",
179
160
  "@xylabs/sdk-js": "^6.0",
180
- "@xylabs/threads": "~6.0",
181
- "@xyo-network/account": "~6.0",
182
- "@xyo-network/account-model": "~6.0",
161
+ "@xylabs/threads": "^6.1",
183
162
  "@xyo-network/address": "^6.0",
184
- "@xyo-network/api": "~6.0",
185
- "@xyo-network/api-models": "~6.0",
186
- "@xyo-network/archivist-lmdb": "~6.0",
187
- "@xyo-network/archivist-mongodb": "~6.0",
188
- "@xyo-network/archivist-view": "~6.0",
163
+ "@xyo-network/archivist-lmdb": "~6.1",
164
+ "@xyo-network/archivist-mongodb": "~6.1",
165
+ "@xyo-network/archivist-view": "~6.1",
189
166
  "@xyo-network/bios": "~8.0",
190
167
  "@xyo-network/bios-model": "~8.0",
191
- "@xyo-network/boundwitness-builder": "~6.0",
192
- "@xyo-network/boundwitness-model": "~6.0",
193
- "@xyo-network/boundwitness-wrapper": "~6.0",
194
- "@xyo-network/config-payload-plugin": "~6.0",
195
- "@xyo-network/huri": "~6.0",
196
- "@xyo-network/manifest-model": "~6.0",
197
- "@xyo-network/payload-builder": "~6.0",
198
- "@xyo-network/payload-model": "~6.0",
199
- "@xyo-network/payload-plugin": "~6.0",
200
- "@xyo-network/payload-wrapper": "~6.0",
201
- "@xyo-network/query-payload-plugin": "~6.0",
202
168
  "@xyo-network/sdk-js": "^6.0",
203
- "@xyo-network/sdk-protocol-js": "~6.0",
169
+ "@xyo-network/sdk-protocol-js": "~6.1",
204
170
  "@xyo-network/typechain": "^4.1",
205
- "@xyo-network/wallet": "~6.0",
206
171
  "@xyo-network/wallet-model": "^6.0",
207
- "@xyo-network/xl1-protocol-sdk": "~2.0",
208
- "@xyo-network/xl1-sdk": "^2.0",
172
+ "@xyo-network/xl1-protocol-sdk": "~2.1",
173
+ "@xyo-network/xl1-sdk": "^2.1",
209
174
  "ajv": "^8.20",
210
175
  "async-mutex": "^0.5",
211
- "bn.js": "^5.2",
212
176
  "body-parser": "~2.2",
213
- "buffer": "^6.0",
214
177
  "bullmq": "~5.77",
215
178
  "bullmq-otel": "~1.3",
216
179
  "chalk": "^5.6",
@@ -228,15 +191,12 @@
228
191
  "ioredis": "~5.10",
229
192
  "lmdb": "^3.5",
230
193
  "lru-cache": "^11.3",
231
- "mapbox-gl": "^3.23",
232
194
  "mongodb": "^7.2",
233
195
  "observable-fns": "~0.6",
234
- "pako": "^2.1",
235
196
  "rollbar": "^3.1",
236
197
  "shallowequal": "~1.1",
237
198
  "store2": "~2.14",
238
199
  "uuid": "~14.0",
239
- "wasm-feature-detect": "~1.8",
240
200
  "web3-types": "~1.10",
241
201
  "webextension-polyfill": "^0.12",
242
202
  "winston": "~3.19",