@xyo-network/chain-orchestration 1.20.19 → 1.20.21
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/dist/browser/index.mjs +15 -1
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/node/manifest/NamedLmdbArchivist.d.ts +18 -0
- package/dist/browser/node/manifest/NamedLmdbArchivist.d.ts.map +1 -0
- package/dist/browser/node/manifest/getLocator.d.ts.map +1 -1
- package/dist/browser/shared/actor/ValidatorActor.d.ts +1 -1
- package/dist/browser/shared/actor/ValidatorActor.d.ts.map +1 -1
- package/dist/browser/shared/config/actors/Mempool.d.ts +14 -0
- package/dist/browser/shared/config/actors/Mempool.d.ts.map +1 -1
- package/dist/browser/shared/config/actors/Validator.d.ts +6 -6
- package/dist/neutral/index.mjs +15 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/node/manifest/NamedLmdbArchivist.d.ts +18 -0
- package/dist/neutral/node/manifest/NamedLmdbArchivist.d.ts.map +1 -0
- package/dist/neutral/node/manifest/getLocator.d.ts.map +1 -1
- package/dist/neutral/shared/actor/ValidatorActor.d.ts +1 -1
- package/dist/neutral/shared/actor/ValidatorActor.d.ts.map +1 -1
- package/dist/neutral/shared/config/actors/Mempool.d.ts +14 -0
- package/dist/neutral/shared/config/actors/Mempool.d.ts.map +1 -1
- package/dist/neutral/shared/config/actors/Validator.d.ts +6 -6
- package/dist/node/index.mjs +55 -1
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node/manifest/NamedLmdbArchivist.d.ts +18 -0
- package/dist/node/node/manifest/NamedLmdbArchivist.d.ts.map +1 -0
- package/dist/node/node/manifest/getLocator.d.ts.map +1 -1
- package/dist/node/shared/actor/ValidatorActor.d.ts +1 -1
- package/dist/node/shared/actor/ValidatorActor.d.ts.map +1 -1
- package/dist/node/shared/config/actors/Mempool.d.ts +14 -0
- package/dist/node/shared/config/actors/Mempool.d.ts.map +1 -1
- package/dist/node/shared/config/actors/Validator.d.ts +6 -6
- package/package.json +14 -13
|
@@ -92,7 +92,7 @@ export declare const ValidatorConfigZod: z.ZodObject<{
|
|
|
92
92
|
} & {
|
|
93
93
|
readonly __address: true;
|
|
94
94
|
}, string>>>>;
|
|
95
|
-
minCandidates: z.
|
|
95
|
+
minCandidates: z.ZodDefault<z.ZodNumber>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
97
|
export type ValidatorConfig = z.infer<typeof ValidatorConfigZod>;
|
|
98
98
|
export declare const isValidatorConfig: <T>(value: T) => value is T & {
|
|
@@ -171,6 +171,7 @@ export declare const isValidatorConfig: <T>(value: T) => value is T & {
|
|
|
171
171
|
name: string;
|
|
172
172
|
host: string;
|
|
173
173
|
port: number;
|
|
174
|
+
minCandidates: number;
|
|
174
175
|
dataLake?: import("@xyo-network/xl1-sdk").DataLakeConfig | undefined;
|
|
175
176
|
mnemonic?: string | undefined;
|
|
176
177
|
healthCheckPort?: number | undefined;
|
|
@@ -180,7 +181,6 @@ export declare const isValidatorConfig: <T>(value: T) => value is T & {
|
|
|
180
181
|
} & {
|
|
181
182
|
readonly __address: true;
|
|
182
183
|
})[] | undefined;
|
|
183
|
-
minCandidates?: number | undefined;
|
|
184
184
|
};
|
|
185
185
|
export declare const asValidatorConfig: {
|
|
186
186
|
<T>(value: T): (T & {
|
|
@@ -259,6 +259,7 @@ export declare const asValidatorConfig: {
|
|
|
259
259
|
name: string;
|
|
260
260
|
host: string;
|
|
261
261
|
port: number;
|
|
262
|
+
minCandidates: number;
|
|
262
263
|
dataLake?: import("@xyo-network/xl1-sdk").DataLakeConfig | undefined;
|
|
263
264
|
mnemonic?: string | undefined;
|
|
264
265
|
healthCheckPort?: number | undefined;
|
|
@@ -268,7 +269,6 @@ export declare const asValidatorConfig: {
|
|
|
268
269
|
} & {
|
|
269
270
|
readonly __address: true;
|
|
270
271
|
})[] | undefined;
|
|
271
|
-
minCandidates?: number | undefined;
|
|
272
272
|
}) | undefined;
|
|
273
273
|
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
274
274
|
chain: {
|
|
@@ -346,6 +346,7 @@ export declare const asValidatorConfig: {
|
|
|
346
346
|
name: string;
|
|
347
347
|
host: string;
|
|
348
348
|
port: number;
|
|
349
|
+
minCandidates: number;
|
|
349
350
|
dataLake?: import("@xyo-network/xl1-sdk").DataLakeConfig | undefined;
|
|
350
351
|
mnemonic?: string | undefined;
|
|
351
352
|
healthCheckPort?: number | undefined;
|
|
@@ -355,7 +356,6 @@ export declare const asValidatorConfig: {
|
|
|
355
356
|
} & {
|
|
356
357
|
readonly __address: true;
|
|
357
358
|
})[] | undefined;
|
|
358
|
-
minCandidates?: number | undefined;
|
|
359
359
|
};
|
|
360
360
|
};
|
|
361
361
|
export declare const toValidatorConfig: {
|
|
@@ -435,6 +435,7 @@ export declare const toValidatorConfig: {
|
|
|
435
435
|
name: string;
|
|
436
436
|
host: string;
|
|
437
437
|
port: number;
|
|
438
|
+
minCandidates: number;
|
|
438
439
|
dataLake?: import("@xyo-network/xl1-sdk").DataLakeConfig | undefined;
|
|
439
440
|
mnemonic?: string | undefined;
|
|
440
441
|
healthCheckPort?: number | undefined;
|
|
@@ -444,7 +445,6 @@ export declare const toValidatorConfig: {
|
|
|
444
445
|
} & {
|
|
445
446
|
readonly __address: true;
|
|
446
447
|
})[] | undefined;
|
|
447
|
-
minCandidates?: number | undefined;
|
|
448
448
|
}) | undefined;
|
|
449
449
|
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
450
450
|
chain: {
|
|
@@ -522,6 +522,7 @@ export declare const toValidatorConfig: {
|
|
|
522
522
|
name: string;
|
|
523
523
|
host: string;
|
|
524
524
|
port: number;
|
|
525
|
+
minCandidates: number;
|
|
525
526
|
dataLake?: import("@xyo-network/xl1-sdk").DataLakeConfig | undefined;
|
|
526
527
|
mnemonic?: string | undefined;
|
|
527
528
|
healthCheckPort?: number | undefined;
|
|
@@ -531,7 +532,6 @@ export declare const toValidatorConfig: {
|
|
|
531
532
|
} & {
|
|
532
533
|
readonly __address: true;
|
|
533
534
|
})[] | undefined;
|
|
534
|
-
minCandidates?: number | undefined;
|
|
535
535
|
};
|
|
536
536
|
};
|
|
537
537
|
export interface ValidatorConfigContext extends Omit<BaseConfigContext, 'config'> {
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -252,6 +252,8 @@ var toBridgeConfigContext = zodToFactory2(BridgeConfigContext, "toBridgeConfigCo
|
|
|
252
252
|
import { zodAsFactory as zodAsFactory3, zodIsFactory as zodIsFactory3, zodToFactory as zodToFactory3 } from "@xylabs/sdk-js";
|
|
253
253
|
import { BaseConfigContextZod as BaseConfigContextZod3, HostActorConfigZod as HostActorConfigZod3 } from "@xyo-network/xl1-sdk";
|
|
254
254
|
import { globalRegistry as globalRegistry4, z as z4 } from "zod";
|
|
255
|
+
var DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL = 1e3;
|
|
256
|
+
var DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL = 1e3;
|
|
255
257
|
var MempoolConfigZod = HostActorConfigZod3.extend({
|
|
256
258
|
accountIndex: ActorAccountIndexZod("mempool.accountIndex"),
|
|
257
259
|
enabled: z4.union([
|
|
@@ -283,6 +285,16 @@ var MempoolConfigZod = HostActorConfigZod3.extend({
|
|
|
283
285
|
description: "Enable the Mempool",
|
|
284
286
|
title: "mempool.enabled",
|
|
285
287
|
type: "boolean"
|
|
288
|
+
}),
|
|
289
|
+
blockPruneInterval: z4.coerce.number().default(DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL).register(globalRegistry4, {
|
|
290
|
+
description: "The interval time (in milliseconds) between pending block prune attempts",
|
|
291
|
+
title: "mempool.blockPruneInterval",
|
|
292
|
+
type: "number"
|
|
293
|
+
}),
|
|
294
|
+
transactionPruneInterval: z4.coerce.number().default(DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL).register(globalRegistry4, {
|
|
295
|
+
description: "The interval time (in milliseconds) between pending transaction prune attempts",
|
|
296
|
+
title: "mempool.transactionPruneInterval",
|
|
297
|
+
type: "number"
|
|
286
298
|
})
|
|
287
299
|
});
|
|
288
300
|
var isMempoolConfig = zodIsFactory3(MempoolConfigZod);
|
|
@@ -373,7 +385,7 @@ import { z as z6 } from "zod";
|
|
|
373
385
|
var ValidatorConfigZod = HostActorConfigZod5.extend({
|
|
374
386
|
accountIndex: ActorAccountIndexZod("validator.accountIndex"),
|
|
375
387
|
allowedProducers: z6.array(AddressZod3).optional(),
|
|
376
|
-
minCandidates: z6.number().int().min(0).
|
|
388
|
+
minCandidates: z6.number().int().min(0).default(1)
|
|
377
389
|
});
|
|
378
390
|
var isValidatorConfig = zodIsFactory6(ValidatorConfigZod);
|
|
379
391
|
var asValidatorConfig = zodAsFactory6(ValidatorConfigZod, "asValidatorConfig");
|
|
@@ -905,6 +917,8 @@ export {
|
|
|
905
917
|
BridgeConfigZod,
|
|
906
918
|
BridgeSettingsZod,
|
|
907
919
|
DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL,
|
|
920
|
+
DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL,
|
|
921
|
+
DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL,
|
|
908
922
|
DefaultServiceProvider,
|
|
909
923
|
GENESIS_REWARD_AMOUNT,
|
|
910
924
|
GenericHost,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/actor/ValidatorActor.ts","../../src/shared/buildTelemetryConfig.ts","../../src/shared/config/actors/Api.ts","../../src/shared/config/actors/accountIndex.ts","../../src/shared/config/actors/Bridge.ts","../../src/shared/config/actors/Mempool.ts","../../src/shared/config/actors/Producer.ts","../../src/shared/config/actors/RewardRedemption.ts","../../src/shared/config/actors/Validator.ts","../../src/shared/config/mergeConfig.ts","../../src/shared/createDeclarationIntentBlock.ts","../../src/shared/host/implementation/DefaultHost.ts","../../src/shared/host/implementation/DefaultServiceProvider.ts","../../src/shared/host/model/ServiceCollection.ts","../../src/shared/init/initActorAccount.ts","../../src/shared/init/walletResolution.ts","../../src/shared/init/initActorSeedPhrase.ts","../../src/shared/init/initBridgedModule.ts","../../src/shared/init/initStatusReporter.ts","../../src/shared/init/initWallet.ts","../../src/shared/orchestrator/Orchestrator.ts","../../src/neutral/config/locators/basicRemoteRunnerLocator.ts","../../src/neutral/config/locators/basicRemoteViewerLocator.ts","../../src/neutral/config/locators/rootLocatorFromConfig.ts"],"sourcesContent":["import type { Hash } from '@xylabs/sdk-js'\nimport { creatable } from '@xylabs/sdk-js'\nimport { processPendingBlocks } from '@xyo-network/chain-sdk'\nimport type {\n ActorParamsV3, BlockBoundWitness, BlockValidationViewer, BlockViewer,\n DeadLetterQueueRunner,\n FinalizationRunner,\n MempoolViewer,\n} from '@xyo-network/xl1-sdk'\nimport {\n ActorV3, BlockValidationViewerMoniker, BlockViewerMoniker,\n DeadLetterQueueRunnerMoniker,\n FinalizationRunnerMoniker,\n MempoolViewerMoniker,\n} from '@xyo-network/xl1-sdk'\n\nimport type { ValidatorConfig } from '../config/index.ts'\n\nexport type ValidatorActorParams = ActorParamsV3<\n {\n config: ValidatorConfig\n }>\n\n@creatable()\nexport class ValidatorActor extends ActorV3<ValidatorActorParams> {\n protected _blockValidationViewer!: BlockValidationViewer\n protected _blockViewer!: BlockViewer\n protected _deadLetterQueueRunner?: DeadLetterQueueRunner\n protected _finalizationRunner!: FinalizationRunner\n protected _lastValidatedBlock: BlockBoundWitness | undefined\n protected _lastValidatedBlockHash: Hash | undefined\n protected _mempoolViewer!: MempoolViewer\n\n protected get allowedProducers() {\n return this.params.config.allowedProducers ?? []\n }\n\n protected get blockValidationViewer() {\n return this._blockValidationViewer\n }\n\n protected get blockViewer() {\n return this._blockViewer\n }\n\n protected get finalizationRunner() {\n return this._finalizationRunner\n }\n\n protected get mempoolViewer() {\n return this._mempoolViewer\n }\n\n protected get minCandidates() {\n return this.params.config.minCandidates\n }\n\n override async createHandler() {\n await super.startHandler()\n this._blockValidationViewer = await this.locator.getInstance(BlockValidationViewerMoniker)\n this._blockViewer = await this.locator.getInstance(BlockViewerMoniker)\n this._finalizationRunner = await this.locator.getInstance(FinalizationRunnerMoniker)\n this._mempoolViewer = await this.locator.getInstance(MempoolViewerMoniker)\n this._deadLetterQueueRunner = await this.locator.tryGetInstance<DeadLetterQueueRunner>(DeadLetterQueueRunnerMoniker)\n }\n\n override async startHandler(): Promise<void> {\n await super.startHandler()\n this.registerTimer('ValidatorActor', async () => {\n await this.spanAsync('processPendingBlocks', async () => {\n this.logger?.debug('ValidatorActor: Processing pending blocks...')\n await processPendingBlocks({\n blockValidationViewer: this.blockValidationViewer,\n context: this.context,\n logger: this.logger,\n mempoolViewer: this.mempoolViewer,\n blockViewer: this.blockViewer,\n finalizationRunner: this.finalizationRunner,\n allowedProducers: this.allowedProducers,\n minCandidates: this.minCandidates,\n deadLetterQueueRunner: this._deadLetterQueueRunner,\n })\n }, { ...this.context, timeBudgetLimit: 1500 })\n }, 2000, 500)\n }\n}\n","import type { Config } from '@xyo-network/xl1-sdk'\n\nexport function buildTelemetryConfig(config: Config, serviceName: string, serviceVersion: string, defaultMetricsScrapePort = 9464) {\n const { otlpEndpoint } = config.telemetry?.otel ?? {}\n const { path: endpoint = '/metrics', port = defaultMetricsScrapePort } = config.telemetry?.metrics?.scrape ?? {}\n const telemetryConfig = {\n attributes: { serviceName, serviceVersion }, otlpEndpoint, metricsConfig: { endpoint, port },\n }\n return telemetryConfig\n}\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const ApiConfigZod = HostActorConfigZod.extend(z.object({\n accountIndex: ActorAccountIndexZod('api.accountIndex'),\n initRewardsCache: z.union([z.number(), z.string(), z.boolean()]).transform(\n v => v !== '0' && v !== 'false' && v !== false && v != 0,\n ).default(true).register(globalRegistry, {\n description: 'Whether to initialize the rewards cache on startup',\n title: 'api.initRewardsCache',\n type: 'boolean',\n }),\n}).shape)\n\nexport type ApiConfig = z.infer<typeof ApiConfigZod>\n\nexport const isApiConfig = zodIsFactory(ApiConfigZod)\nexport const asApiConfig = zodAsFactory(ApiConfigZod, 'asApiConfig')\nexport const toApiConfig = zodToFactory(ApiConfigZod, 'toApiConfig')\n\nexport interface ApiConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ApiConfig\n}\n\nexport const ApiConfigContext: z.ZodType<ApiConfigContext> = BaseConfigContextZod.extend({ config: ApiConfigZod })\n\nexport const isApiConfigContext: <T>(value: T) => value is T & ApiConfigContext = zodIsFactory(ApiConfigContext)\nexport const asApiConfigContext: ReturnType<typeof zodAsFactory<ApiConfigContext>> = zodAsFactory(ApiConfigContext, 'asApiConfigContext')\nexport const toApiConfigContext: ReturnType<typeof zodToFactory<ApiConfigContext>> = zodToFactory(ApiConfigContext, 'toApiConfigContext')\n","import { globalRegistry, z } from 'zod'\n\nexport const ActorAccountIndexZod = (title: string) => z.coerce.number().int().min(0).optional().register(globalRegistry, {\n description: 'Account index derived from the actor wallet phrase. Defaults to 0 for actor mnemonics and to the actor-specific shared index for the root mnemonic.',\n title,\n type: 'number',\n})\n","import {\n AddressZod, HexZod, toAddress, toHex, zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext, ChainId } from '@xyo-network/xl1-sdk'\nimport {\n AttoXL1ConvertFactor, BaseConfigContextZod, HostActorConfigZod, XL1,\n} from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nconst DEFAULT_FIXED_FEE = toHex(XL1(1000n) * AttoXL1ConvertFactor.xl1)\nconst DEFAULT_VARIABLE_FEE_BASIS_POINTS = 300 // 3%\nconst DEFAULT_HARDHAT_BRIDGE_CONTRACT = toAddress('2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6')\nconst DEFAULT_HARDHAT_CHAIN_ID: ChainId = toHex('7A69')\nconst DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY = toHex('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')\nconst DEFAULT_HARDHAT_TOKEN_CONTRACT = toAddress('5FbDB2315678afecb367f032d93F642f64180aa3')\nconst DEFAULT_MAX_BRIDGE_AMOUNT = toHex(XL1(1_000_000n) * AttoXL1ConvertFactor.xl1)\nconst DEFAULT_MIN_BRIDGE_AMOUNT = toHex(XL1(1500n) * AttoXL1ConvertFactor.xl1)\n\nexport const BasisPointsZod = z.coerce.number().int().nonnegative().max(10_000)\nexport type BasisPoints = z.infer<typeof BasisPointsZod>\n\nexport const BridgeConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('bridge.accountIndex'),\n escrowAddress: AddressZod.optional().register(globalRegistry, {\n description: 'Address to which bridge escrow will be sent',\n title: 'bridge.escrowAddress',\n type: 'string',\n }),\n feesAddress: AddressZod.optional().register(globalRegistry, {\n description: 'Address to which bridge fees will be sent',\n title: 'bridge.feesAddress',\n type: 'string',\n }),\n feeFixed: HexZod.default(DEFAULT_FIXED_FEE).register(globalRegistry, {\n default: DEFAULT_FIXED_FEE,\n description: 'Fixed fee (in AttoXL1) applied to bridge transfers',\n title: 'bridge.feeFixed',\n type: 'bigint',\n }),\n feeRateBasisPoints: BasisPointsZod.default(DEFAULT_VARIABLE_FEE_BASIS_POINTS).register(globalRegistry, {\n default: DEFAULT_VARIABLE_FEE_BASIS_POINTS,\n description: 'Variable rate fee (in basis points where 1 bps = 0.01%) applied to bridge transfers',\n title: 'bridge.feeRateBasisPoints',\n type: 'number',\n }),\n maxBridgeAmount: HexZod.default(DEFAULT_MAX_BRIDGE_AMOUNT).register(globalRegistry, {\n default: DEFAULT_MAX_BRIDGE_AMOUNT,\n description: 'Maximum amount allowed for a bridge transfer',\n title: 'bridge.maxBridgeAmount',\n type: 'string',\n }),\n minBridgeAmount: HexZod.default(DEFAULT_MIN_BRIDGE_AMOUNT).register(globalRegistry, {\n default: DEFAULT_MIN_BRIDGE_AMOUNT,\n description: 'Minimum amount required for a bridge transfer',\n title: 'bridge.minBridgeAmount',\n type: 'string',\n }),\n redisHost: z.string().default('localhost').register(globalRegistry, {\n default: 'localhost',\n description: 'Host for the Bridge Redis instance',\n title: 'bridge.redisHost',\n type: 'string',\n }),\n redisPort: z.coerce.number().int().positive().default(6379).register(globalRegistry, {\n default: 6379,\n description: 'Port for the Bridge Redis instance',\n title: 'bridge.redisPort',\n type: 'number',\n }),\n remoteBridgeContractAddress: AddressZod.default(DEFAULT_HARDHAT_BRIDGE_CONTRACT).register(globalRegistry, {\n default: DEFAULT_HARDHAT_BRIDGE_CONTRACT,\n description: 'Hex representation of remote token address used for bridging',\n title: 'bridge.remoteBridgeContractAddress',\n type: 'string',\n }),\n remoteChainId: HexZod.default(DEFAULT_HARDHAT_CHAIN_ID).register(globalRegistry, {\n default: DEFAULT_HARDHAT_CHAIN_ID,\n description: 'Remote chain ID',\n title: 'bridge.remoteChainId',\n type: 'string',\n }),\n remoteTokenAddress: HexZod.default(DEFAULT_HARDHAT_TOKEN_CONTRACT).register(globalRegistry, {\n default: DEFAULT_HARDHAT_TOKEN_CONTRACT,\n description: 'Hex representation of remote token address used for bridging',\n title: 'bridge.remoteTokenAddress',\n type: 'string',\n }),\n remoteChainWalletPrivateKey: HexZod.default(DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY).register(globalRegistry, {\n description: 'Private key for the wallet to use for the remote chain wallet',\n title: 'bridge.remoteChainWalletPrivateKey',\n type: 'string',\n }),\n xl1ChainId: HexZod.optional().register(globalRegistry, {\n description: 'XL1 chain id used for bridging',\n title: 'bridge.xl1ChainId',\n type: 'string',\n }),\n xl1TokenAddress: HexZod.optional().register(globalRegistry, {\n description: 'XL1 token address used for bridging',\n title: 'bridge.xl1TokenAddress',\n type: 'string',\n }),\n})\n\nexport type BridgeConfig = z.infer<typeof BridgeConfigZod>\n\nexport const BridgeSettingsZod = BridgeConfigZod.pick({\n feeFixed: true,\n feeRateBasisPoints: true,\n feesAddress: true,\n escrowAddress: true,\n maxBridgeAmount: true,\n minBridgeAmount: true,\n remoteChainId: true,\n remoteTokenAddress: true,\n xl1TokenAddress: true,\n xl1ChainId: true,\n}).required()\n\nexport type BridgeSettings = z.infer<typeof BridgeSettingsZod>\n\nexport const isBridgeConfig = zodIsFactory(BridgeConfigZod)\nexport const asBridgeConfig = zodAsFactory(BridgeConfigZod, 'asBridgeConfig')\nexport const toBridgeConfig = zodToFactory(BridgeConfigZod, 'toBridgeConfig')\n\nexport interface BridgeConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: BridgeConfig\n}\n\nexport const BridgeConfigContext: z.ZodType<BridgeConfigContext> = BaseConfigContextZod.extend({ config: BridgeConfigZod })\n\nexport const isBridgeConfigContext: <T>(value: T) => value is T & BridgeConfigContext = zodIsFactory(BridgeConfigContext)\nexport const asBridgeConfigContext: ReturnType<typeof zodAsFactory<BridgeConfigContext>> = zodAsFactory(BridgeConfigContext, 'asBridgeConfigContext')\nexport const toBridgeConfigContext: ReturnType<typeof zodToFactory<BridgeConfigContext>> = zodToFactory(BridgeConfigContext, 'toBridgeConfigContext')\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const MempoolConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('mempool.accountIndex'),\n enabled: z.union([z.string(), z.boolean()]).default('false').transform((val, ctx) => {\n if (typeof val === 'boolean') return val\n const normalized = val.toLowerCase().trim()\n if (['true', '1', 'yes', 'on'].includes(normalized)) return true\n if (['false', '0', 'no', 'off'].includes(normalized)) return false\n ctx.addIssue({\n code: 'invalid_type',\n expected: 'boolean',\n message: `Invalid boolean value: \"${val}\". Use true/false, 1/0, yes/no.`,\n })\n return z.NEVER\n }).register(globalRegistry, {\n default: 'false',\n description: 'Enable the Mempool',\n title: 'mempool.enabled',\n type: 'boolean',\n }),\n})\n\nexport type MempoolConfig = z.infer<typeof MempoolConfigZod>\n\nexport const isMempoolConfig = zodIsFactory(MempoolConfigZod)\nexport const asMempoolConfig = zodAsFactory(MempoolConfigZod, 'asMempoolConfig')\nexport const toMempoolConfig = zodToFactory(MempoolConfigZod, 'toMempoolConfig')\n\nexport interface MempoolConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: MempoolConfig\n}\n\nexport const MempoolConfigContext: z.ZodType<MempoolConfigContext> = BaseConfigContextZod.extend({ config: MempoolConfigZod })\n\nexport const isMempoolConfigContext: <T>(value: T) => value is T & MempoolConfigContext = zodIsFactory(MempoolConfigContext)\nexport const asMempoolConfigContext: ReturnType<typeof zodAsFactory<MempoolConfigContext>> = zodAsFactory(MempoolConfigContext, 'asMempoolConfigContext')\nexport const toMempoolConfigContext: ReturnType<typeof zodToFactory<MempoolConfigContext>> = zodToFactory(MempoolConfigContext, 'toMempoolConfigContext')\n","import {\n AddressZod, asAddress,\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { ActorConfigZod, BaseConfigContextZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL = 10_000 // 10 seconds\n\nexport const ProducerConfigZod = ActorConfigZod.extend(z.object({\n accountIndex: ActorAccountIndexZod('producer.accountIndex'),\n allowlist: z.preprocess((val) => {\n if (typeof val === 'string') {\n return val.split(',').map(s => asAddress(s.trim()))\n }\n return val\n }, z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed producer addresses, if undefined anyone can participate',\n title: 'allowlist',\n type: 'array',\n })),\n\n blockProductionCheckInterval: z.coerce.number().default(DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL).register(globalRegistry, {\n description: 'The interval time (in milliseconds) between block production attempts',\n title: 'producer.blockProductionCheckInterval',\n type: 'number',\n }),\n disableIntentRedeclaration: z.boolean().optional().register(globalRegistry, {\n description: 'Should the producer skip redeclaring their intent to continue producing blocks',\n title: 'producer.disableIntentRedeclaration',\n type: 'boolean',\n }),\n heartbeatInterval: z.coerce.number().default(3_600_000).register(globalRegistry, {\n description: 'The number of milliseconds between heartbeats if no blocks are produced',\n title: 'producer.heartbeatInterval',\n type: 'number',\n }),\n // TODO: BigInt schema\n minStake: z.coerce.number().default(1).register(globalRegistry, {\n description: 'Minimum stake required to be a Producer',\n title: 'producer.minStake',\n type: 'number',\n }),\n // TODO: Address schema\n rewardAddress: z.string().optional().register(globalRegistry, {\n description: 'Address to receive block rewards',\n title: 'producer.rewardAddress',\n type: 'string',\n }),\n}).shape)\n\nexport type ProducerConfig = z.infer<typeof ProducerConfigZod>\n\nexport const isProducerConfig = zodIsFactory(ProducerConfigZod)\nexport const asProducerConfig = zodAsFactory(ProducerConfigZod, 'asProducerConfig')\nexport const toProducerConfig = zodToFactory(ProducerConfigZod, 'toProducerConfig')\n\nexport interface ProducerConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ProducerConfig\n}\n\nexport const ProducerConfigContext: z.ZodType<ProducerConfigContext> = BaseConfigContextZod.extend({ config: ProducerConfigZod })\n\nexport const isProducerConfigContext: <T>(value: T) => value is T & ProducerConfigContext = zodIsFactory(ProducerConfigContext)\nexport const asProducerConfigContext: ReturnType<typeof zodAsFactory<ProducerConfigContext>> = zodAsFactory(ProducerConfigContext, 'asProducerConfigContext')\nexport const toProducerConfigContext: ReturnType<typeof zodToFactory<ProducerConfigContext>> = zodToFactory(ProducerConfigContext, 'toProducerConfigContext')\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport type { z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const RewardRedemptionConfigZod = HostActorConfigZod.extend({ accountIndex: ActorAccountIndexZod('rewardRedemption.accountIndex') })\n\nexport type RewardRedemptionConfig = z.infer<typeof RewardRedemptionConfigZod>\n\nexport const isRewardRedemptionConfig = zodIsFactory(RewardRedemptionConfigZod)\nexport const asRewardRedemptionConfig = zodAsFactory(RewardRedemptionConfigZod, 'asRewardRedemptionConfig')\nexport const toRewardRedemptionConfig = zodToFactory(RewardRedemptionConfigZod, 'toRewardRedemptionConfig')\n\nexport interface RewardRedemptionConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: RewardRedemptionConfig\n}\n\nexport const RewardRedemptionConfigContext: z.ZodType<RewardRedemptionConfigContext> = BaseConfigContextZod.extend({ config: RewardRedemptionConfigZod })\n\nexport const isRewardRedemptionConfigContext: <T>(value: T) => value is T & RewardRedemptionConfigContext = zodIsFactory(RewardRedemptionConfigContext)\nexport const asRewardRedemptionConfigContext: ReturnType<typeof zodAsFactory<RewardRedemptionConfigContext>> = zodAsFactory(RewardRedemptionConfigContext, 'asRewardRedemptionConfigContext')\nexport const toRewardRedemptionConfigContext: ReturnType<typeof zodToFactory<RewardRedemptionConfigContext>> = zodToFactory(RewardRedemptionConfigContext, 'toRewardRedemptionConfigContext')\n","import {\n AddressZod,\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const ValidatorConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('validator.accountIndex'),\n allowedProducers: z.array(AddressZod).optional(),\n minCandidates: z.number().int().min(0).optional(),\n})\n\nexport type ValidatorConfig = z.infer<typeof ValidatorConfigZod>\n\nexport const isValidatorConfig = zodIsFactory(ValidatorConfigZod)\nexport const asValidatorConfig = zodAsFactory(ValidatorConfigZod, 'asValidatorConfig')\nexport const toValidatorConfig = zodToFactory(ValidatorConfigZod, 'toValidatorConfig')\n\nexport interface ValidatorConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ValidatorConfig\n}\n\nexport const ValidatorConfigContext: z.ZodType<ValidatorConfigContext> = BaseConfigContextZod.extend({ config: ValidatorConfigZod })\n\nexport const isValidatorConfigContext: <T>(value: T) => value is T & ValidatorConfigContext = zodIsFactory(ValidatorConfigContext)\nexport const asValidatorConfigContext: ReturnType<typeof zodAsFactory<ValidatorConfigContext>> = zodAsFactory(ValidatorConfigContext, 'asValidatorConfigContext')\nexport const toValidatorConfigContext: ReturnType<typeof zodToFactory<ValidatorConfigContext>> = zodToFactory(ValidatorConfigContext, 'toValidatorConfigContext')\n","import { deepMerge } from '@xylabs/sdk-js'\nimport type { Config } from '@xyo-network/xl1-sdk'\n\nexport function mergeConfig({ actors, ...baseConfig }: Config) {\n return {\n ...baseConfig,\n actors: actors.map((actor) => {\n return deepMerge(baseConfig, actor)\n }),\n }\n}\n","import { buildNextBlock } from '@xyo-network/chain-sdk'\nimport type { AccountInstance, WithHashMeta } from '@xyo-network/sdk-js'\nimport type { BlockBoundWitness, XL1BlockRange } from '@xyo-network/xl1-sdk'\nimport { createDeclarationIntent } from '@xyo-network/xl1-sdk'\n\nexport async function createProducerChainStakeIntentBlock(prevBlock: WithHashMeta<BlockBoundWitness>, producerAccount: AccountInstance, range: XL1BlockRange) {\n const producerDeclarationPayload = createDeclarationIntent(\n producerAccount.address,\n 'producer',\n range[0],\n range[1],\n )\n return await buildNextBlock(\n prevBlock,\n [],\n [producerDeclarationPayload],\n [producerAccount],\n )\n}\n","import type { Host, ServiceProvider } from '../model/index.ts'\n\n/**\n * A generic host implementation that can be used as a starting point for\n * more complex host implementations.\n */\nexport class GenericHost implements Host {\n services: ServiceProvider\n\n constructor(services: ServiceProvider) {\n this.services = services\n }\n\n async start(): Promise<void> {\n await Promise.resolve()\n // Initialize or start your services here\n console.log('Host is starting...')\n }\n\n async stop(): Promise<void> {\n await Promise.resolve()\n // Stop or clean up services here\n console.log('Host is stopping...')\n }\n}\n","import type { ServiceProvider } from '../model/index.ts'\n\nexport class DefaultServiceProvider implements ServiceProvider {\n protected _services: Record<string, unknown>\n constructor(services: Record<string, unknown>) {\n this._services = services\n }\n\n getService<T>(serviceIdentifier: string): T | undefined {\n return this._services[serviceIdentifier] as T\n }\n}\n","import type { ServiceProvider } from './ServiceProvider.ts'\n\nexport interface ServiceCollection {\n build(): ServiceProvider\n}\n\n/**\n * Represents the lifetime of a service\n */\nexport const ServiceLifetime = {\n Singleton: 'Singleton',\n Transient: 'Transient',\n} as const\n\n/**\n * Describes a single service registration\n */\nexport interface ServiceDescriptor<T = unknown> {\n identifier: string | symbol\n implementationFactory: () => T\n lifetime: keyof typeof ServiceLifetime\n}\n","import type { Promisable } from '@xylabs/sdk-js'\nimport { isDefined } from '@xylabs/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport { resolveWalletForActor } from './walletResolution.ts'\n\nconst actorAccountSingletons: Record<string, Promisable<WalletInstance>> = {}\n\nexport async function initActorAccount({ config, logger }: Pick<ActorConfigContext, 'config' | 'logger'>): Promise<WalletInstance> {\n const actorName = config.name\n if (isDefined(actorAccountSingletons[actorName])) return actorAccountSingletons[actorName]\n const accountIndex = 'accountIndex' in config && typeof config.accountIndex === 'number' ? config.accountIndex : undefined\n const account = await resolveWalletForActor(actorName, config.mnemonic, accountIndex)\n logger?.debug(`[${actorName}] Using wallet address ${account.address}`)\n actorAccountSingletons[actorName] = account\n return actorAccountSingletons[actorName]\n}\n","import type { Address } from '@xylabs/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport { DEFAULT_WALLET_PATH, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk'\n\nexport const BUILT_IN_DEV_MNEMONIC = 'crane ribbon cook cousin tobacco vital moral protect merit knock veteran hint knee ocean nurse'\nexport const INSECURE_GENESIS_REWARD_MNEMONIC = 'test test test test test test test test test test test junk'\nexport const GENESIS_REWARD_AMOUNT = 20_000_000_000_000_000_000_000n\nconst ATTO_XL1_PER_XL1 = 1_000_000_000_000_000_000n\n\nexport const ROOT_WALLET_RUNTIME_ID = '_root'\nexport const SHARED_ACCOUNT_REPORT_COUNT = 10\nexport type RootMnemonicConfig = Config & { mnemonic?: string }\ntype ActorWalletConfig = Partial<ActorConfig> & { accountIndex?: number; mnemonic?: string }\n\nexport type WalletSource = 'root' | 'actor'\nexport type MnemonicKind = 'built-in-dev' | 'configured-root' | 'configured-actor'\n\nexport interface ResolvedRootWallet {\n basePath: string\n isBuiltInDevMnemonic: boolean\n mnemonic: string\n mnemonicKind: Extract<MnemonicKind, 'built-in-dev' | 'configured-root'>\n}\n\nexport interface ResolvedWalletMetadata {\n accountIndex: number\n actorName: string\n address: string\n derivationPath: string\n label: string\n mnemonic: string\n mnemonicKind: MnemonicKind\n privateKey?: string\n source: WalletSource\n usesBuiltInDevMnemonic: boolean\n}\n\nexport interface ResolvedWalletReport {\n actorSpecificAccounts: ResolvedWalletMetadata[]\n insecureGenesisRewardAccounts?: ResolvedWalletMetadata[]\n requestedActors: string[]\n root: ResolvedRootWallet\n sharedAccounts: ResolvedWalletMetadata[]\n}\n\nconst RESERVED_ACTOR_INDEX: Record<string, number> = {\n [ROOT_WALLET_RUNTIME_ID]: 0,\n api: 4,\n bridge: 2,\n mempool: 5,\n producer: 1,\n rewardRedemption: 3,\n validator: 6,\n}\n\nconst ACTOR_LABELS: Record<string, string> = {\n [ROOT_WALLET_RUNTIME_ID]: 'root/local-node',\n api: 'api',\n bridge: 'bridge',\n mempool: 'mempool',\n producer: 'producer',\n rewardRedemption: 'rewardRedemption',\n validator: 'validator',\n}\n\nlet activeWalletReport: ResolvedWalletReport | undefined\n\nfunction getAccountLabel(actorName: string): string {\n return ACTOR_LABELS[actorName] ?? actorName\n}\n\nexport function clearResolvedWalletReport() {\n activeWalletReport = undefined\n}\n\nexport function getReservedActorIndex(actorName: string): number {\n return RESERVED_ACTOR_INDEX[actorName] ?? 0\n}\n\nexport function getBuiltInDevMnemonic(): string {\n return BUILT_IN_DEV_MNEMONIC\n}\n\nexport function getInsecureGenesisRewardMnemonic(): string {\n return INSECURE_GENESIS_REWARD_MNEMONIC\n}\n\nexport function resolveRootWallet(configuration: RootMnemonicConfig): ResolvedRootWallet {\n const mnemonic = configuration.mnemonic ?? BUILT_IN_DEV_MNEMONIC\n const isBuiltInDevMnemonic = mnemonic === BUILT_IN_DEV_MNEMONIC\n return {\n basePath: DEFAULT_WALLET_PATH,\n isBuiltInDevMnemonic,\n mnemonic,\n mnemonicKind: isBuiltInDevMnemonic ? 'built-in-dev' : 'configured-root',\n }\n}\n\nasync function resolveWalletMetadata({\n accountIndex,\n actorName,\n mnemonic,\n mnemonicKind,\n source,\n}: {\n accountIndex: number\n actorName: string\n mnemonic: string\n mnemonicKind: MnemonicKind\n source: WalletSource\n}): Promise<ResolvedWalletMetadata> {\n const wallet = await generateXyoBaseWalletFromPhrase(mnemonic)\n const derivationPath = `${DEFAULT_WALLET_PATH}/${accountIndex}`\n const account = await wallet.derivePath(`${accountIndex}`)\n return {\n accountIndex,\n actorName,\n address: account.address,\n derivationPath,\n label: getAccountLabel(actorName),\n mnemonic,\n mnemonicKind,\n privateKey: account.privateKey,\n source,\n usesBuiltInDevMnemonic: mnemonic === BUILT_IN_DEV_MNEMONIC,\n }\n}\n\nexport async function resolveActorWallet(\n actorName: string,\n actorConfig: ActorWalletConfig | undefined,\n root: ResolvedRootWallet,\n): Promise<ResolvedWalletMetadata> {\n const actorMnemonic = actorConfig?.mnemonic\n const accountIndex = actorConfig?.accountIndex\n return await resolveWalletMetadata(actorMnemonic\n ? {\n accountIndex: accountIndex ?? 0,\n actorName,\n mnemonic: actorMnemonic,\n mnemonicKind: 'configured-actor',\n source: 'actor',\n }\n : {\n accountIndex: accountIndex ?? getReservedActorIndex(actorName),\n actorName,\n mnemonic: root.mnemonic,\n mnemonicKind: root.mnemonicKind,\n source: 'root',\n })\n}\n\nexport async function resolveWalletReport(\n requestedActors: string[],\n configuration: RootMnemonicConfig,\n): Promise<ResolvedWalletReport> {\n const root = resolveRootWallet(configuration)\n const actorConfigMap = new Map(configuration.actors.map(actor => [actor.name, actor]))\n\n const resolvedActors = await Promise.all(\n requestedActors.map(async actorName => await resolveActorWallet(actorName, actorConfigMap.get(actorName), root)),\n )\n\n const labelMap = new Map<number, string[]>([[0, [getAccountLabel(ROOT_WALLET_RUNTIME_ID)]]])\n for (const actor of resolvedActors) {\n if (actor.source !== 'root') continue\n const labels = labelMap.get(actor.accountIndex) ?? []\n labels.push(actor.label)\n labelMap.set(actor.accountIndex, labels)\n }\n\n const sharedAccounts = await Promise.all(\n Array.from({ length: SHARED_ACCOUNT_REPORT_COUNT }, (_, index) => index).map(async (accountIndex) => {\n const account = await resolveWalletMetadata({\n accountIndex,\n actorName: ROOT_WALLET_RUNTIME_ID,\n mnemonic: root.mnemonic,\n mnemonicKind: root.mnemonicKind,\n source: 'root',\n })\n const labels = labelMap.get(accountIndex)\n return { ...account, label: labels?.join(', ') ?? `shared[${accountIndex}]` }\n }),\n )\n\n const insecureGenesisRewardAccounts = configuration.chain.genesisRewardAddress\n ? undefined\n : await Promise.all(\n Array.from({ length: SHARED_ACCOUNT_REPORT_COUNT }, (_, index) => index).map(async (accountIndex) => {\n const account = await resolveWalletMetadata({\n accountIndex,\n actorName: 'genesisReward',\n mnemonic: INSECURE_GENESIS_REWARD_MNEMONIC,\n mnemonicKind: 'configured-actor',\n source: 'actor',\n })\n return { ...account, label: accountIndex === 0 ? 'genesisRewardAddress' : `genesisReward[${accountIndex}]` }\n }),\n )\n\n return {\n actorSpecificAccounts: resolvedActors.filter(actor => actor.source === 'actor'),\n insecureGenesisRewardAccounts,\n requestedActors: [...requestedActors],\n root,\n sharedAccounts,\n }\n}\n\nexport async function initializeResolvedWalletReport(\n requestedActors: string[],\n configuration: RootMnemonicConfig,\n): Promise<ResolvedWalletReport> {\n activeWalletReport = await resolveWalletReport(requestedActors, configuration)\n return activeWalletReport\n}\n\nexport function getResolvedWalletReport(): ResolvedWalletReport | undefined {\n return activeWalletReport\n}\n\nfunction formatSharedAccount(account: ResolvedWalletMetadata, showPrivateKey: boolean) {\n const lines = [\n `[${account.accountIndex}] ${account.label}`,\n `source: ${account.mnemonicKind === 'built-in-dev' ? 'built-in dev mnemonic' : 'configured root mnemonic'}`,\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n ]\n if (showPrivateKey) lines.push(`privateKey: ${account.privateKey ?? 'unavailable'}`)\n return lines.join('\\n')\n}\n\nfunction formatActorSpecificAccount(account: ResolvedWalletMetadata) {\n return [\n account.label,\n 'source: actor mnemonic',\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n ].join('\\n')\n}\n\nfunction formatGenesisRewardAccount(account: ResolvedWalletMetadata) {\n const balance = account.accountIndex === 0 ? GENESIS_REWARD_AMOUNT / ATTO_XL1_PER_XL1 : 0n\n return [\n `[${account.accountIndex}] ${account.label}`,\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n `privateKey: ${account.privateKey ?? 'unavailable'}`,\n `balance: ${balance.toString()} XL1`,\n ].join('\\n')\n}\n\nexport function formatWalletReport(report: ResolvedWalletReport): string {\n const sections: string[] = []\n const showSecrets = report.root.isBuiltInDevMnemonic\n\n sections.push(showSecrets ? 'Development wallet detected.' : 'Wallet summary')\n\n if (showSecrets) {\n sections.push([\n 'DEVELOPMENT WALLET WARNING',\n '',\n 'XL1 is using the built-in development mnemonic.',\n 'This mnemonic is fixed, public, and does not change between runs.',\n 'The addresses and private keys below are unsafe and must never be used for real funds, production systems, or shared environments.',\n 'Anyone with this information can fully control these accounts.',\n '',\n 'Mnemonic:',\n report.root.mnemonic,\n ].join('\\n'))\n }\n\n sections.push([\n `Shared wallet accounts from ${report.root.basePath}:`,\n '',\n report.sharedAccounts.map(account => formatSharedAccount(account, showSecrets)).join('\\n\\n'),\n ].join('\\n'))\n\n if (report.actorSpecificAccounts.length > 0) {\n sections.push([\n 'Actor-specific wallet accounts:',\n '',\n report.actorSpecificAccounts.map(account => formatActorSpecificAccount(account)).join('\\n\\n'),\n ].join('\\n'))\n }\n\n if (report.insecureGenesisRewardAccounts) {\n sections.push([\n 'INSECURE GENESIS REWARD WALLET WARNING',\n '',\n 'XL1 is using a public, insecure fallback wallet for the genesis reward address.',\n 'This phrase is intentionally unsafe and must never be used for real funds, production systems, or shared environments.',\n 'Anyone with this information can fully control the genesis reward wallet.',\n '',\n 'Genesis reward phrase:',\n INSECURE_GENESIS_REWARD_MNEMONIC,\n '',\n `The genesis reward is sent to index 0 and starts with ${(GENESIS_REWARD_AMOUNT / ATTO_XL1_PER_XL1).toString()} XL1.`,\n '',\n `Genesis reward wallet accounts from ${DEFAULT_WALLET_PATH}:`,\n '',\n report.insecureGenesisRewardAccounts.map(account => formatGenesisRewardAccount(account)).join('\\n\\n'),\n ].join('\\n'))\n }\n\n return sections.join('\\n\\n')\n}\n\nexport async function resolveGenesisRewardAddress(config: Pick<Config, 'chain'>): Promise<Address> {\n if (config.chain.genesisRewardAddress) return config.chain.genesisRewardAddress\n const wallet = await generateXyoBaseWalletFromPhrase(INSECURE_GENESIS_REWARD_MNEMONIC)\n const account = await wallet.derivePath('0')\n return account.address\n}\n\nexport async function resolveWalletForActor(\n actorName: string,\n mnemonic?: string,\n accountIndex?: number,\n): Promise<WalletInstance> {\n const fromReport = activeWalletReport\n ? actorName === ROOT_WALLET_RUNTIME_ID\n ? activeWalletReport.sharedAccounts.find(account => account.accountIndex === 0)\n : activeWalletReport.actorSpecificAccounts.find(account => account.actorName === actorName)\n ?? activeWalletReport.sharedAccounts.find(account => account.actorName === actorName || account.label.split(', ').includes(getAccountLabel(actorName)))\n : undefined\n\n const resolvedMnemonic = fromReport?.mnemonic ?? mnemonic ?? BUILT_IN_DEV_MNEMONIC\n const resolvedAccountIndex = fromReport?.accountIndex ?? accountIndex ?? 0\n\n const wallet = await generateXyoBaseWalletFromPhrase(resolvedMnemonic)\n return await wallet.derivePath(`${resolvedAccountIndex}`)\n}\n","import { assertEx, isString } from '@xylabs/sdk-js'\nimport type { BiosExternalInterface } from '@xyo-network/bios-model'\nimport type { WalletKind } from '@xyo-network/storage-model'\nimport type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport {\n getBuiltInDevMnemonic, getResolvedWalletReport, ROOT_WALLET_RUNTIME_ID,\n} from './walletResolution.ts'\n\nexport async function initActorSeedPhrase(context: ActorConfigContext, bios: BiosExternalInterface): Promise<string> {\n const { logger, config } = context\n const walletKind = config.name as WalletKind\n void bios\n const report = getResolvedWalletReport()\n const account = config.name === ROOT_WALLET_RUNTIME_ID ? report?.sharedAccounts.find(entry => entry.accountIndex === 0) : report?.actorSpecificAccounts.find(entry => entry.actorName === config.name)\n if (isString(account?.mnemonic)) return account.mnemonic\n if (isString(report?.root.mnemonic)) return report.root.mnemonic\n if (isString(config.mnemonic)) return config.mnemonic\n const fallback = getBuiltInDevMnemonic()\n logger?.debug(`[${walletKind}] Falling back to built-in development mnemonic`)\n return assertEx(fallback, () => 'Unable to resolve mnemonic')\n}\n","import type { Address } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type {\n AttachableArchivistInstance, AttachableModuleInstance, BridgeInstance, ModuleIdentifier,\n} from '@xyo-network/sdk-js'\nimport { asAttachableArchivistInstance, asAttachableModuleInstance } from '@xyo-network/sdk-js'\nimport { Mutex } from 'async-mutex'\n\nconst initMutex = new Mutex()\ntype ModuleDictionary = Record<ModuleIdentifier, AttachableModuleInstance | undefined>\ntype BridgedModuleDictionary = Record<Address, ModuleDictionary | undefined>\nconst bridgedModuleDictionary: BridgedModuleDictionary = {}\n\nexport async function initBridgedModule({ bridge, moduleName }: { bridge: BridgeInstance; moduleName: ModuleIdentifier }): Promise<AttachableModuleInstance> {\n return await initMutex.runExclusive(async () => {\n const existing = bridgedModuleDictionary?.[bridge.address]?.[moduleName]\n if (existing) return existing\n const mod = assertEx(await bridge.resolve(moduleName), () => `Could not resolve ${moduleName}`)\n const moduleInstance = assertEx(asAttachableModuleInstance(mod), () => `Could not convert ${moduleName} to attachable module instance`)\n // Initialize the nested dictionary if needed\n let moduleMap = bridgedModuleDictionary[bridge.address]\n if (moduleMap === undefined) {\n moduleMap = {}\n bridgedModuleDictionary[bridge.address] = moduleMap\n }\n // Store and return the module instance\n moduleMap[moduleName] = moduleInstance\n return moduleInstance\n })\n}\n\nexport async function initBridgedArchivistModule({ bridge, moduleName }: {\n bridge: BridgeInstance\n moduleName: ModuleIdentifier\n}): Promise<AttachableArchivistInstance> {\n return assertEx(\n asAttachableArchivistInstance(await initBridgedModule({ bridge, moduleName })),\n () => `Could not convert ${moduleName} to attachable archivist instance`,\n )\n}\n","import type { Logger } from '@xylabs/sdk-js'\nimport { RuntimeStatusMonitor } from '@xyo-network/xl1-sdk'\n\nexport function initStatusReporter({ logger }: { logger: Logger }) {\n const statusReporter = new RuntimeStatusMonitor(logger)\n statusReporter.onGlobalTransition({ to: 'started' }, () => {\n logger.log('All services started.')\n })\n statusReporter.onGlobalTransition({ to: 'error' }, () => {\n logger.error('Producer encountered an unhandled error!')\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n })\n return statusReporter\n}\n","import type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport { resolveWalletForActor, ROOT_WALLET_RUNTIME_ID } from './walletResolution.ts'\n\nexport async function initActorWallet(context: ActorConfigContext, mnemonic?: string) {\n const actorName = context.config.name === ROOT_WALLET_RUNTIME_ID ? ROOT_WALLET_RUNTIME_ID : context.config.name\n const accountIndex = 'accountIndex' in context.config && typeof context.config.accountIndex === 'number'\n ? context.config.accountIndex\n : undefined\n return await resolveWalletForActor(\n actorName,\n mnemonic ?? context.config.mnemonic,\n accountIndex,\n )\n}\n\n// export async function initApiWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.api\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initBridgeWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.bridge\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initMempoolWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.mempool\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initProducerWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.producer\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initRewardsRedemptionApiWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.rewardRedemption\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initValidatorWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.mempool\n// return await initWallet({ config, logger }, mnemonic)\n// }\n","import type { CreatableInstance } from '@xylabs/sdk-js'\nimport { AbstractCreatable, creatable } from '@xylabs/sdk-js'\nimport type { ActorInstanceV3 } from '@xyo-network/xl1-sdk'\n\nexport interface OrchestratorInstance extends CreatableInstance {\n registerActor(actor: ActorInstanceV3): Promise<void>\n}\n\n@creatable()\nexport class Orchestrator extends AbstractCreatable implements OrchestratorInstance {\n protected actors: (ActorInstanceV3)[] = []\n protected keepAliveHandle: NodeJS.Timeout | null = null\n protected running = false\n\n /**\n * Registers an actor.\n * (We won't activate the actor until `start()` is called.)\n */\n async registerActor(actor: ActorInstanceV3) {\n if (this.running) {\n // If the orchestrator is already running, activate the actor immediately\n await actor.start()\n }\n this.actors.push(actor)\n }\n\n /**\n * Starts the orchestrator: activates all actors.\n */\n override async startHandler() {\n await super.startHandler()\n if (this.running) {\n this.logger?.warn('[Orchestrator] Already started.')\n return\n }\n\n this.logger?.log('[Orchestrator] Starting...')\n this.running = true\n for (const actor of this.actors) {\n await actor.start()\n }\n // This interval will fire every 24.8 days (2^31 - 1 ms), effectively never finishing\n this.keepAliveHandle = setInterval(() => {\n // No-op\n }, 2_147_483_647)\n }\n\n /**\n * Stops the orchestrator: deactivates all actors.\n */\n override async stopHandler() {\n await super.stopHandler()\n if (!this.running) {\n this.logger?.log('[Orchestrator] Already stopped.')\n return\n }\n\n this.logger?.log('[Orchestrator] Stopping...')\n for (const actor of this.actors) {\n await actor.stop()\n }\n this.running = false\n if (this.keepAliveHandle) clearInterval(this.keepAliveHandle)\n this.logger?.log('[Orchestrator] Stopped...')\n }\n}\n","import type {\n BlockValidators,\n RemoteConfig, RpcTransport, XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport { basicRemoteRunnerLocator as sdkBasicRemoteRunnerLocator } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use basicRemoteRunnerLocator from \\@xyo-network/xl1-providers instead */\nexport function basicRemoteRunnerLocator(\n name: string,\n remoteConfig: RemoteConfig,\n signerTransport: RpcTransport<XyoSignerRpcSchemas>,\n dataLakeEndpoint?: string,\n validators?: BlockValidators,\n) {\n return sdkBasicRemoteRunnerLocator(name, remoteConfig, signerTransport, dataLakeEndpoint, { validators })\n}\n","import type { BlockValidators, RemoteConfig } from '@xyo-network/xl1-sdk'\nimport { basicRemoteViewerLocator as sdkBasicRemoteViewerLocator } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use basicRemoteViewerLocator from \\@xyo-network/xl1-providers instead */\nexport function basicRemoteViewerLocator(\n name: string,\n remoteConfig: RemoteConfig,\n dataLakeEndpoint?: string,\n validators?: BlockValidators,\n) {\n return sdkBasicRemoteViewerLocator(name, remoteConfig, dataLakeEndpoint, { validators })\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { ActorConfigContext, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport { commonLocatorFromConfig, remoteLocatorFromConfig } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use rootLocatorFromConfig from \\@xyo-network/xl1-providers instead */\nexport async function rootLocatorFromConfig(\n context: ActorConfigContext,\n validateDepsOnRegister = false,\n): Promise<ProviderFactoryLocatorInstance> {\n const { config } = context\n await commonLocatorFromConfig(context, validateDepsOnRegister)\n const locator = assertEx(\n await (config.remote.rpc ? remoteLocatorFromConfig(context, validateDepsOnRegister) : undefined),\n () => 'Root locator could not be created from config. No supported configuration found.',\n )\n locator.freeze()\n return locator\n}\n"],"mappings":";;;;AACA,SAASA,iBAAiB;AAC1B,SAASC,4BAA4B;AAOrC,SACEC,SAASC,8BAA8BC,oBACvCC,8BACAC,2BACAC,4BACK;;;;;;;;AAUA,IAAMC,iBAAN,cAA6BC,QAAAA;SAAAA;;;EACxBC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EAEV,IAAcC,mBAAmB;AAC/B,WAAO,KAAKC,OAAOC,OAAOF,oBAAoB,CAAA;EAChD;EAEA,IAAcG,wBAAwB;AACpC,WAAO,KAAKV;EACd;EAEA,IAAcW,cAAc;AAC1B,WAAO,KAAKV;EACd;EAEA,IAAcW,qBAAqB;AACjC,WAAO,KAAKT;EACd;EAEA,IAAcU,gBAAgB;AAC5B,WAAO,KAAKP;EACd;EAEA,IAAcQ,gBAAgB;AAC5B,WAAO,KAAKN,OAAOC,OAAOK;EAC5B;EAEA,MAAeC,gBAAgB;AAC7B,UAAM,MAAMC,aAAAA;AACZ,SAAKhB,yBAAyB,MAAM,KAAKiB,QAAQC,YAAYC,4BAAAA;AAC7D,SAAKlB,eAAe,MAAM,KAAKgB,QAAQC,YAAYE,kBAAAA;AACnD,SAAKjB,sBAAsB,MAAM,KAAKc,QAAQC,YAAY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AC,YAA4B;AAE5B,SAAOC,4BAA4BL,MAAMC,cAAcC,iBAAiBC,kBAAkB;IAAEC;EAAW,CAAA;AACzG;AARgBL;;;ACNhB,SAASO,4BAA4BC,mCAAmC;AAGjE,SAASC,yBACdC,MACAC,cACAC,kBACAC,YAA4B;AAE5B,SAAOC,4BAA4BJ,MAAMC,cAAcC,kBAAkB;IAAEC;EAAW,CAAA;AACxF;AAPgBJ;;;ACJhB,SAASM,YAAAA,iBAAgB;AAEzB,SAASC,yBAAyBC,+BAA+B;AAGjE,eAAsBC,sBACpBC,SACAC,yBAAyB,OAAK;AAE9B,QAAM,EAAEC,OAAM,IAAKF;AACnB,QAAMG,wBAAwBH,SAASC,sBAAAA;AACvC,QAAMG,UAAUC,UACd,OAAOH,OAAOI,OAAOC,MAAMC,wBAAwBR,SAASC,sBAAAA,IAA0BQ,SACtF,MAAM,kFAAA;AAERL,UAAQM,OAAM;AACd,SAAON;AACT;AAZsBL;","names":["creatable","processPendingBlocks","ActorV3","BlockValidationViewerMoniker","BlockViewerMoniker","DeadLetterQueueRunnerMoniker","FinalizationRunnerMoniker","MempoolViewerMoniker","ValidatorActor","ActorV3","_blockValidationViewer","_blockViewer","_deadLetterQueueRunner","_finalizationRunner","_lastValidatedBlock","_lastValidatedBlockHash","_mempoolViewer","allowedProducers","params","config","blockValidationViewer","blockViewer","finalizationRunner","mempoolViewer","minCandidates","createHandler","startHandler","locator","getInstance","BlockValidationViewerMoniker","BlockViewerMoniker","FinalizationRunnerMoniker","MempoolViewerMoniker","tryGetInstance","DeadLetterQueueRunnerMoniker","registerTimer","spanAsync","logger","debug","processPendingBlocks","context","deadLetterQueueRunner","timeBudgetLimit","buildTelemetryConfig","config","serviceName","serviceVersion","defaultMetricsScrapePort","otlpEndpoint","telemetry","otel","path","endpoint","port","metrics","scrape","telemetryConfig","attributes","metricsConfig","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","globalRegistry","z","globalRegistry","z","ActorAccountIndexZod","title","z","coerce","number","int","min","optional","register","globalRegistry","description","type","ApiConfigZod","HostActorConfigZod","extend","z","object","accountIndex","ActorAccountIndexZod","initRewardsCache","union","number","string","boolean","transform","v","default","register","globalRegistry","description","title","type","shape","isApiConfig","zodIsFactory","asApiConfig","zodAsFactory","toApiConfig","zodToFactory","ApiConfigContext","BaseConfigContextZod","config","isApiConfigContext","asApiConfigContext","toApiConfigContext","AddressZod","HexZod","toAddress","toHex","zodAsFactory","zodIsFactory","zodToFactory","AttoXL1ConvertFactor","BaseConfigContextZod","HostActorConfigZod","XL1","globalRegistry","z","DEFAULT_FIXED_FEE","toHex","XL1","AttoXL1ConvertFactor","xl1","DEFAULT_VARIABLE_FEE_BASIS_POINTS","DEFAULT_HARDHAT_BRIDGE_CONTRACT","toAddress","DEFAULT_HARDHAT_CHAIN_ID","DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY","DEFAULT_HARDHAT_TOKEN_CONTRACT","DEFAULT_MAX_BRIDGE_AMOUNT","DEFAULT_MIN_BRIDGE_AMOUNT","BasisPointsZod","z","coerce","number","int","nonnegative","max","BridgeConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","escrowAddress","AddressZod","optional","register","globalRegistry","description","title","type","feesAddress","feeFixed","HexZod","default","feeRateBasisPoints","maxBridgeAmount","minBridgeAmount","redisHost","string","redisPort","positive","remoteBridgeContractAddress","remoteChainId","remoteTokenAddress","remoteChainWalletPrivateKey","xl1ChainId","xl1TokenAddress","BridgeSettingsZod","pick","required","isBridgeConfig","zodIsFactory","asBridgeConfig","zodAsFactory","toBridgeConfig","zodToFactory","BridgeConfigContext","BaseConfigContextZod","config","isBridgeConfigContext","asBridgeConfigContext","toBridgeConfigContext","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","globalRegistry","z","MempoolConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","enabled","z","union","string","boolean","default","transform","val","ctx","normalized","toLowerCase","trim","includes","addIssue","code","expected","message","NEVER","register","globalRegistry","description","title","type","isMempoolConfig","zodIsFactory","asMempoolConfig","zodAsFactory","toMempoolConfig","zodToFactory","MempoolConfigContext","BaseConfigContextZod","config","isMempoolConfigContext","asMempoolConfigContext","toMempoolConfigContext","AddressZod","asAddress","zodAsFactory","zodIsFactory","zodToFactory","ActorConfigZod","BaseConfigContextZod","globalRegistry","z","DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL","ProducerConfigZod","ActorConfigZod","extend","z","object","accountIndex","ActorAccountIndexZod","allowlist","preprocess","val","split","map","s","asAddress","trim","array","AddressZod","optional","register","globalRegistry","description","title","type","blockProductionCheckInterval","coerce","number","default","disableIntentRedeclaration","boolean","heartbeatInterval","minStake","rewardAddress","string","shape","isProducerConfig","zodIsFactory","asProducerConfig","zodAsFactory","toProducerConfig","zodToFactory","ProducerConfigContext","BaseConfigContextZod","config","isProducerConfigContext","asProducerConfigContext","toProducerConfigContext","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","RewardRedemptionConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","isRewardRedemptionConfig","zodIsFactory","asRewardRedemptionConfig","zodAsFactory","toRewardRedemptionConfig","zodToFactory","RewardRedemptionConfigContext","BaseConfigContextZod","config","isRewardRedemptionConfigContext","asRewardRedemptionConfigContext","toRewardRedemptionConfigContext","AddressZod","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","z","ValidatorConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","allowedProducers","z","array","AddressZod","optional","minCandidates","number","int","min","isValidatorConfig","zodIsFactory","asValidatorConfig","zodAsFactory","toValidatorConfig","zodToFactory","ValidatorConfigContext","BaseConfigContextZod","config","isValidatorConfigContext","asValidatorConfigContext","toValidatorConfigContext","deepMerge","mergeConfig","actors","baseConfig","map","actor","deepMerge","buildNextBlock","createDeclarationIntent","createProducerChainStakeIntentBlock","prevBlock","producerAccount","range","producerDeclarationPayload","createDeclarationIntent","address","buildNextBlock","GenericHost","services","start","Promise","resolve","console","log","stop","DefaultServiceProvider","_services","services","getService","serviceIdentifier","ServiceLifetime","Singleton","Transient","isDefined","DEFAULT_WALLET_PATH","generateXyoBaseWalletFromPhrase","BUILT_IN_DEV_MNEMONIC","INSECURE_GENESIS_REWARD_MNEMONIC","GENESIS_REWARD_AMOUNT","ATTO_XL1_PER_XL1","ROOT_WALLET_RUNTIME_ID","SHARED_ACCOUNT_REPORT_COUNT","RESERVED_ACTOR_INDEX","api","bridge","mempool","producer","rewardRedemption","validator","ACTOR_LABELS","activeWalletReport","getAccountLabel","actorName","clearResolvedWalletReport","undefined","getReservedActorIndex","getBuiltInDevMnemonic","getInsecureGenesisRewardMnemonic","resolveRootWallet","configuration","mnemonic","isBuiltInDevMnemonic","basePath","DEFAULT_WALLET_PATH","mnemonicKind","resolveWalletMetadata","accountIndex","source","wallet","generateXyoBaseWalletFromPhrase","derivationPath","account","derivePath","address","label","privateKey","usesBuiltInDevMnemonic","resolveActorWallet","actorConfig","root","actorMnemonic","resolveWalletReport","requestedActors","actorConfigMap","Map","actors","map","actor","name","resolvedActors","Promise","all","get","labelMap","labels","push","set","sharedAccounts","Array","from","length","_","index","join","insecureGenesisRewardAccounts","chain","genesisRewardAddress","actorSpecificAccounts","filter","initializeResolvedWalletReport","getResolvedWalletReport","formatSharedAccount","showPrivateKey","lines","formatActorSpecificAccount","formatGenesisRewardAccount","balance","toString","formatWalletReport","report","sections","showSecrets","resolveGenesisRewardAddress","config","resolveWalletForActor","fromReport","find","split","includes","resolvedMnemonic","resolvedAccountIndex","actorAccountSingletons","initActorAccount","config","logger","actorName","name","isDefined","accountIndex","undefined","account","resolveWalletForActor","mnemonic","debug","address","assertEx","isString","initActorSeedPhrase","context","bios","logger","config","walletKind","name","report","getResolvedWalletReport","account","ROOT_WALLET_RUNTIME_ID","sharedAccounts","find","entry","accountIndex","actorSpecificAccounts","actorName","isString","mnemonic","root","fallback","getBuiltInDevMnemonic","debug","assertEx","assertEx","asAttachableArchivistInstance","asAttachableModuleInstance","Mutex","initMutex","Mutex","bridgedModuleDictionary","initBridgedModule","bridge","moduleName","runExclusive","existing","address","mod","assertEx","resolve","moduleInstance","asAttachableModuleInstance","moduleMap","undefined","initBridgedArchivistModule","asAttachableArchivistInstance","RuntimeStatusMonitor","initStatusReporter","logger","statusReporter","RuntimeStatusMonitor","onGlobalTransition","to","log","error","process","exit","initActorWallet","context","mnemonic","actorName","config","name","ROOT_WALLET_RUNTIME_ID","accountIndex","undefined","resolveWalletForActor","AbstractCreatable","creatable","Orchestrator","AbstractCreatable","actors","keepAliveHandle","running","registerActor","actor","start","push","startHandler","logger","warn","log","setInterval","stopHandler","stop","clearInterval","basicRemoteRunnerLocator","sdkBasicRemoteRunnerLocator","basicRemoteRunnerLocator","name","remoteConfig","signerTransport","dataLakeEndpoint","validators","sdkBasicRemoteRunnerLocator","basicRemoteViewerLocator","sdkBasicRemoteViewerLocator","basicRemoteViewerLocator","name","remoteConfig","dataLakeEndpoint","validators","sdkBasicRemoteViewerLocator","assertEx","commonLocatorFromConfig","remoteLocatorFromConfig","rootLocatorFromConfig","context","validateDepsOnRegister","config","commonLocatorFromConfig","locator","assertEx","remote","rpc","remoteLocatorFromConfig","undefined","freeze"]}
|
|
1
|
+
{"version":3,"sources":["../../src/shared/actor/ValidatorActor.ts","../../src/shared/buildTelemetryConfig.ts","../../src/shared/config/actors/Api.ts","../../src/shared/config/actors/accountIndex.ts","../../src/shared/config/actors/Bridge.ts","../../src/shared/config/actors/Mempool.ts","../../src/shared/config/actors/Producer.ts","../../src/shared/config/actors/RewardRedemption.ts","../../src/shared/config/actors/Validator.ts","../../src/shared/config/mergeConfig.ts","../../src/shared/createDeclarationIntentBlock.ts","../../src/shared/host/implementation/DefaultHost.ts","../../src/shared/host/implementation/DefaultServiceProvider.ts","../../src/shared/host/model/ServiceCollection.ts","../../src/shared/init/initActorAccount.ts","../../src/shared/init/walletResolution.ts","../../src/shared/init/initActorSeedPhrase.ts","../../src/shared/init/initBridgedModule.ts","../../src/shared/init/initStatusReporter.ts","../../src/shared/init/initWallet.ts","../../src/shared/orchestrator/Orchestrator.ts","../../src/neutral/config/locators/basicRemoteRunnerLocator.ts","../../src/neutral/config/locators/basicRemoteViewerLocator.ts","../../src/neutral/config/locators/rootLocatorFromConfig.ts"],"sourcesContent":["import type { Hash } from '@xylabs/sdk-js'\nimport { creatable } from '@xylabs/sdk-js'\nimport { processPendingBlocks } from '@xyo-network/chain-sdk'\nimport type {\n ActorParamsV3, BlockBoundWitness, BlockValidationViewer, BlockViewer,\n DeadLetterQueueRunner,\n FinalizationRunner,\n MempoolViewer,\n} from '@xyo-network/xl1-sdk'\nimport {\n ActorV3, BlockValidationViewerMoniker, BlockViewerMoniker,\n DeadLetterQueueRunnerMoniker,\n FinalizationRunnerMoniker,\n MempoolViewerMoniker,\n} from '@xyo-network/xl1-sdk'\n\nimport type { ValidatorConfig } from '../config/index.ts'\n\nexport type ValidatorActorParams = ActorParamsV3<\n {\n config: ValidatorConfig\n }>\n\n@creatable()\nexport class ValidatorActor extends ActorV3<ValidatorActorParams> {\n protected _blockValidationViewer!: BlockValidationViewer\n protected _blockViewer!: BlockViewer\n protected _deadLetterQueueRunner?: DeadLetterQueueRunner\n protected _finalizationRunner!: FinalizationRunner\n protected _lastValidatedBlock: BlockBoundWitness | undefined\n protected _lastValidatedBlockHash: Hash | undefined\n protected _mempoolViewer!: MempoolViewer\n\n protected get allowedProducers() {\n return this.params.config.allowedProducers ?? []\n }\n\n protected get blockValidationViewer() {\n return this._blockValidationViewer\n }\n\n protected get blockViewer() {\n return this._blockViewer\n }\n\n protected get finalizationRunner() {\n return this._finalizationRunner\n }\n\n protected get mempoolViewer() {\n return this._mempoolViewer\n }\n\n protected get minCandidates() {\n return this.params.config.minCandidates\n }\n\n override async createHandler() {\n await super.startHandler()\n this._blockValidationViewer = await this.locator.getInstance(BlockValidationViewerMoniker)\n this._blockViewer = await this.locator.getInstance(BlockViewerMoniker)\n this._finalizationRunner = await this.locator.getInstance(FinalizationRunnerMoniker)\n this._mempoolViewer = await this.locator.getInstance(MempoolViewerMoniker)\n this._deadLetterQueueRunner = await this.locator.tryGetInstance<DeadLetterQueueRunner>(DeadLetterQueueRunnerMoniker)\n }\n\n override async startHandler(): Promise<void> {\n await super.startHandler()\n this.registerTimer('ValidatorActor', async () => {\n await this.spanAsync('processPendingBlocks', async () => {\n this.logger?.debug('ValidatorActor: Processing pending blocks...')\n await processPendingBlocks({\n blockValidationViewer: this.blockValidationViewer,\n context: this.context,\n logger: this.logger,\n mempoolViewer: this.mempoolViewer,\n blockViewer: this.blockViewer,\n finalizationRunner: this.finalizationRunner,\n allowedProducers: this.allowedProducers,\n minCandidates: this.minCandidates,\n deadLetterQueueRunner: this._deadLetterQueueRunner,\n })\n }, { ...this.context, timeBudgetLimit: 1500 })\n }, 2000, 500)\n }\n}\n","import type { Config } from '@xyo-network/xl1-sdk'\n\nexport function buildTelemetryConfig(config: Config, serviceName: string, serviceVersion: string, defaultMetricsScrapePort = 9464) {\n const { otlpEndpoint } = config.telemetry?.otel ?? {}\n const { path: endpoint = '/metrics', port = defaultMetricsScrapePort } = config.telemetry?.metrics?.scrape ?? {}\n const telemetryConfig = {\n attributes: { serviceName, serviceVersion }, otlpEndpoint, metricsConfig: { endpoint, port },\n }\n return telemetryConfig\n}\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const ApiConfigZod = HostActorConfigZod.extend(z.object({\n accountIndex: ActorAccountIndexZod('api.accountIndex'),\n initRewardsCache: z.union([z.number(), z.string(), z.boolean()]).transform(\n v => v !== '0' && v !== 'false' && v !== false && v != 0,\n ).default(true).register(globalRegistry, {\n description: 'Whether to initialize the rewards cache on startup',\n title: 'api.initRewardsCache',\n type: 'boolean',\n }),\n}).shape)\n\nexport type ApiConfig = z.infer<typeof ApiConfigZod>\n\nexport const isApiConfig = zodIsFactory(ApiConfigZod)\nexport const asApiConfig = zodAsFactory(ApiConfigZod, 'asApiConfig')\nexport const toApiConfig = zodToFactory(ApiConfigZod, 'toApiConfig')\n\nexport interface ApiConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ApiConfig\n}\n\nexport const ApiConfigContext: z.ZodType<ApiConfigContext> = BaseConfigContextZod.extend({ config: ApiConfigZod })\n\nexport const isApiConfigContext: <T>(value: T) => value is T & ApiConfigContext = zodIsFactory(ApiConfigContext)\nexport const asApiConfigContext: ReturnType<typeof zodAsFactory<ApiConfigContext>> = zodAsFactory(ApiConfigContext, 'asApiConfigContext')\nexport const toApiConfigContext: ReturnType<typeof zodToFactory<ApiConfigContext>> = zodToFactory(ApiConfigContext, 'toApiConfigContext')\n","import { globalRegistry, z } from 'zod'\n\nexport const ActorAccountIndexZod = (title: string) => z.coerce.number().int().min(0).optional().register(globalRegistry, {\n description: 'Account index derived from the actor wallet phrase. Defaults to 0 for actor mnemonics and to the actor-specific shared index for the root mnemonic.',\n title,\n type: 'number',\n})\n","import {\n AddressZod, HexZod, toAddress, toHex, zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext, ChainId } from '@xyo-network/xl1-sdk'\nimport {\n AttoXL1ConvertFactor, BaseConfigContextZod, HostActorConfigZod, XL1,\n} from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nconst DEFAULT_FIXED_FEE = toHex(XL1(1000n) * AttoXL1ConvertFactor.xl1)\nconst DEFAULT_VARIABLE_FEE_BASIS_POINTS = 300 // 3%\nconst DEFAULT_HARDHAT_BRIDGE_CONTRACT = toAddress('2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6')\nconst DEFAULT_HARDHAT_CHAIN_ID: ChainId = toHex('7A69')\nconst DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY = toHex('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')\nconst DEFAULT_HARDHAT_TOKEN_CONTRACT = toAddress('5FbDB2315678afecb367f032d93F642f64180aa3')\nconst DEFAULT_MAX_BRIDGE_AMOUNT = toHex(XL1(1_000_000n) * AttoXL1ConvertFactor.xl1)\nconst DEFAULT_MIN_BRIDGE_AMOUNT = toHex(XL1(1500n) * AttoXL1ConvertFactor.xl1)\n\nexport const BasisPointsZod = z.coerce.number().int().nonnegative().max(10_000)\nexport type BasisPoints = z.infer<typeof BasisPointsZod>\n\nexport const BridgeConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('bridge.accountIndex'),\n escrowAddress: AddressZod.optional().register(globalRegistry, {\n description: 'Address to which bridge escrow will be sent',\n title: 'bridge.escrowAddress',\n type: 'string',\n }),\n feesAddress: AddressZod.optional().register(globalRegistry, {\n description: 'Address to which bridge fees will be sent',\n title: 'bridge.feesAddress',\n type: 'string',\n }),\n feeFixed: HexZod.default(DEFAULT_FIXED_FEE).register(globalRegistry, {\n default: DEFAULT_FIXED_FEE,\n description: 'Fixed fee (in AttoXL1) applied to bridge transfers',\n title: 'bridge.feeFixed',\n type: 'bigint',\n }),\n feeRateBasisPoints: BasisPointsZod.default(DEFAULT_VARIABLE_FEE_BASIS_POINTS).register(globalRegistry, {\n default: DEFAULT_VARIABLE_FEE_BASIS_POINTS,\n description: 'Variable rate fee (in basis points where 1 bps = 0.01%) applied to bridge transfers',\n title: 'bridge.feeRateBasisPoints',\n type: 'number',\n }),\n maxBridgeAmount: HexZod.default(DEFAULT_MAX_BRIDGE_AMOUNT).register(globalRegistry, {\n default: DEFAULT_MAX_BRIDGE_AMOUNT,\n description: 'Maximum amount allowed for a bridge transfer',\n title: 'bridge.maxBridgeAmount',\n type: 'string',\n }),\n minBridgeAmount: HexZod.default(DEFAULT_MIN_BRIDGE_AMOUNT).register(globalRegistry, {\n default: DEFAULT_MIN_BRIDGE_AMOUNT,\n description: 'Minimum amount required for a bridge transfer',\n title: 'bridge.minBridgeAmount',\n type: 'string',\n }),\n redisHost: z.string().default('localhost').register(globalRegistry, {\n default: 'localhost',\n description: 'Host for the Bridge Redis instance',\n title: 'bridge.redisHost',\n type: 'string',\n }),\n redisPort: z.coerce.number().int().positive().default(6379).register(globalRegistry, {\n default: 6379,\n description: 'Port for the Bridge Redis instance',\n title: 'bridge.redisPort',\n type: 'number',\n }),\n remoteBridgeContractAddress: AddressZod.default(DEFAULT_HARDHAT_BRIDGE_CONTRACT).register(globalRegistry, {\n default: DEFAULT_HARDHAT_BRIDGE_CONTRACT,\n description: 'Hex representation of remote token address used for bridging',\n title: 'bridge.remoteBridgeContractAddress',\n type: 'string',\n }),\n remoteChainId: HexZod.default(DEFAULT_HARDHAT_CHAIN_ID).register(globalRegistry, {\n default: DEFAULT_HARDHAT_CHAIN_ID,\n description: 'Remote chain ID',\n title: 'bridge.remoteChainId',\n type: 'string',\n }),\n remoteTokenAddress: HexZod.default(DEFAULT_HARDHAT_TOKEN_CONTRACT).register(globalRegistry, {\n default: DEFAULT_HARDHAT_TOKEN_CONTRACT,\n description: 'Hex representation of remote token address used for bridging',\n title: 'bridge.remoteTokenAddress',\n type: 'string',\n }),\n remoteChainWalletPrivateKey: HexZod.default(DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY).register(globalRegistry, {\n description: 'Private key for the wallet to use for the remote chain wallet',\n title: 'bridge.remoteChainWalletPrivateKey',\n type: 'string',\n }),\n xl1ChainId: HexZod.optional().register(globalRegistry, {\n description: 'XL1 chain id used for bridging',\n title: 'bridge.xl1ChainId',\n type: 'string',\n }),\n xl1TokenAddress: HexZod.optional().register(globalRegistry, {\n description: 'XL1 token address used for bridging',\n title: 'bridge.xl1TokenAddress',\n type: 'string',\n }),\n})\n\nexport type BridgeConfig = z.infer<typeof BridgeConfigZod>\n\nexport const BridgeSettingsZod = BridgeConfigZod.pick({\n feeFixed: true,\n feeRateBasisPoints: true,\n feesAddress: true,\n escrowAddress: true,\n maxBridgeAmount: true,\n minBridgeAmount: true,\n remoteChainId: true,\n remoteTokenAddress: true,\n xl1TokenAddress: true,\n xl1ChainId: true,\n}).required()\n\nexport type BridgeSettings = z.infer<typeof BridgeSettingsZod>\n\nexport const isBridgeConfig = zodIsFactory(BridgeConfigZod)\nexport const asBridgeConfig = zodAsFactory(BridgeConfigZod, 'asBridgeConfig')\nexport const toBridgeConfig = zodToFactory(BridgeConfigZod, 'toBridgeConfig')\n\nexport interface BridgeConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: BridgeConfig\n}\n\nexport const BridgeConfigContext: z.ZodType<BridgeConfigContext> = BaseConfigContextZod.extend({ config: BridgeConfigZod })\n\nexport const isBridgeConfigContext: <T>(value: T) => value is T & BridgeConfigContext = zodIsFactory(BridgeConfigContext)\nexport const asBridgeConfigContext: ReturnType<typeof zodAsFactory<BridgeConfigContext>> = zodAsFactory(BridgeConfigContext, 'asBridgeConfigContext')\nexport const toBridgeConfigContext: ReturnType<typeof zodToFactory<BridgeConfigContext>> = zodToFactory(BridgeConfigContext, 'toBridgeConfigContext')\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL = 1000\nexport const DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL = 1000\n\nexport const MempoolConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('mempool.accountIndex'),\n enabled: z.union([z.string(), z.boolean()]).default('false').transform((val, ctx) => {\n if (typeof val === 'boolean') return val\n const normalized = val.toLowerCase().trim()\n if (['true', '1', 'yes', 'on'].includes(normalized)) return true\n if (['false', '0', 'no', 'off'].includes(normalized)) return false\n ctx.addIssue({\n code: 'invalid_type',\n expected: 'boolean',\n message: `Invalid boolean value: \"${val}\". Use true/false, 1/0, yes/no.`,\n })\n return z.NEVER\n }).register(globalRegistry, {\n default: 'false',\n description: 'Enable the Mempool',\n title: 'mempool.enabled',\n type: 'boolean',\n }),\n blockPruneInterval: z.coerce.number().default(DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL).register(globalRegistry, {\n description: 'The interval time (in milliseconds) between pending block prune attempts',\n title: 'mempool.blockPruneInterval',\n type: 'number',\n }),\n transactionPruneInterval: z.coerce.number().default(DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL).register(globalRegistry, {\n description: 'The interval time (in milliseconds) between pending transaction prune attempts',\n title: 'mempool.transactionPruneInterval',\n type: 'number',\n }),\n})\n\nexport type MempoolConfig = z.infer<typeof MempoolConfigZod>\n\nexport const isMempoolConfig = zodIsFactory(MempoolConfigZod)\nexport const asMempoolConfig = zodAsFactory(MempoolConfigZod, 'asMempoolConfig')\nexport const toMempoolConfig = zodToFactory(MempoolConfigZod, 'toMempoolConfig')\n\nexport interface MempoolConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: MempoolConfig\n}\n\nexport const MempoolConfigContext: z.ZodType<MempoolConfigContext> = BaseConfigContextZod.extend({ config: MempoolConfigZod })\n\nexport const isMempoolConfigContext: <T>(value: T) => value is T & MempoolConfigContext = zodIsFactory(MempoolConfigContext)\nexport const asMempoolConfigContext: ReturnType<typeof zodAsFactory<MempoolConfigContext>> = zodAsFactory(MempoolConfigContext, 'asMempoolConfigContext')\nexport const toMempoolConfigContext: ReturnType<typeof zodToFactory<MempoolConfigContext>> = zodToFactory(MempoolConfigContext, 'toMempoolConfigContext')\n","import {\n AddressZod, asAddress,\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { ActorConfigZod, BaseConfigContextZod } from '@xyo-network/xl1-sdk'\nimport { globalRegistry, z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL = 10_000 // 10 seconds\n\nexport const ProducerConfigZod = ActorConfigZod.extend(z.object({\n accountIndex: ActorAccountIndexZod('producer.accountIndex'),\n allowlist: z.preprocess((val) => {\n if (typeof val === 'string') {\n return val.split(',').map(s => asAddress(s.trim()))\n }\n return val\n }, z.array(AddressZod).optional().register(globalRegistry, {\n description: 'List of allowed producer addresses, if undefined anyone can participate',\n title: 'allowlist',\n type: 'array',\n })),\n\n blockProductionCheckInterval: z.coerce.number().default(DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL).register(globalRegistry, {\n description: 'The interval time (in milliseconds) between block production attempts',\n title: 'producer.blockProductionCheckInterval',\n type: 'number',\n }),\n disableIntentRedeclaration: z.boolean().optional().register(globalRegistry, {\n description: 'Should the producer skip redeclaring their intent to continue producing blocks',\n title: 'producer.disableIntentRedeclaration',\n type: 'boolean',\n }),\n heartbeatInterval: z.coerce.number().default(3_600_000).register(globalRegistry, {\n description: 'The number of milliseconds between heartbeats if no blocks are produced',\n title: 'producer.heartbeatInterval',\n type: 'number',\n }),\n // TODO: BigInt schema\n minStake: z.coerce.number().default(1).register(globalRegistry, {\n description: 'Minimum stake required to be a Producer',\n title: 'producer.minStake',\n type: 'number',\n }),\n // TODO: Address schema\n rewardAddress: z.string().optional().register(globalRegistry, {\n description: 'Address to receive block rewards',\n title: 'producer.rewardAddress',\n type: 'string',\n }),\n}).shape)\n\nexport type ProducerConfig = z.infer<typeof ProducerConfigZod>\n\nexport const isProducerConfig = zodIsFactory(ProducerConfigZod)\nexport const asProducerConfig = zodAsFactory(ProducerConfigZod, 'asProducerConfig')\nexport const toProducerConfig = zodToFactory(ProducerConfigZod, 'toProducerConfig')\n\nexport interface ProducerConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ProducerConfig\n}\n\nexport const ProducerConfigContext: z.ZodType<ProducerConfigContext> = BaseConfigContextZod.extend({ config: ProducerConfigZod })\n\nexport const isProducerConfigContext: <T>(value: T) => value is T & ProducerConfigContext = zodIsFactory(ProducerConfigContext)\nexport const asProducerConfigContext: ReturnType<typeof zodAsFactory<ProducerConfigContext>> = zodAsFactory(ProducerConfigContext, 'asProducerConfigContext')\nexport const toProducerConfigContext: ReturnType<typeof zodToFactory<ProducerConfigContext>> = zodToFactory(ProducerConfigContext, 'toProducerConfigContext')\n","import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport type { z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const RewardRedemptionConfigZod = HostActorConfigZod.extend({ accountIndex: ActorAccountIndexZod('rewardRedemption.accountIndex') })\n\nexport type RewardRedemptionConfig = z.infer<typeof RewardRedemptionConfigZod>\n\nexport const isRewardRedemptionConfig = zodIsFactory(RewardRedemptionConfigZod)\nexport const asRewardRedemptionConfig = zodAsFactory(RewardRedemptionConfigZod, 'asRewardRedemptionConfig')\nexport const toRewardRedemptionConfig = zodToFactory(RewardRedemptionConfigZod, 'toRewardRedemptionConfig')\n\nexport interface RewardRedemptionConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: RewardRedemptionConfig\n}\n\nexport const RewardRedemptionConfigContext: z.ZodType<RewardRedemptionConfigContext> = BaseConfigContextZod.extend({ config: RewardRedemptionConfigZod })\n\nexport const isRewardRedemptionConfigContext: <T>(value: T) => value is T & RewardRedemptionConfigContext = zodIsFactory(RewardRedemptionConfigContext)\nexport const asRewardRedemptionConfigContext: ReturnType<typeof zodAsFactory<RewardRedemptionConfigContext>> = zodAsFactory(RewardRedemptionConfigContext, 'asRewardRedemptionConfigContext')\nexport const toRewardRedemptionConfigContext: ReturnType<typeof zodToFactory<RewardRedemptionConfigContext>> = zodToFactory(RewardRedemptionConfigContext, 'toRewardRedemptionConfigContext')\n","import {\n AddressZod,\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { BaseConfigContext } from '@xyo-network/xl1-sdk'\nimport { BaseConfigContextZod, HostActorConfigZod } from '@xyo-network/xl1-sdk'\nimport { z } from 'zod'\n\nimport { ActorAccountIndexZod } from './accountIndex.ts'\n\nexport const ValidatorConfigZod = HostActorConfigZod.extend({\n accountIndex: ActorAccountIndexZod('validator.accountIndex'),\n allowedProducers: z.array(AddressZod).optional(),\n minCandidates: z.number().int().min(0).default(1),\n})\n\nexport type ValidatorConfig = z.infer<typeof ValidatorConfigZod>\n\nexport const isValidatorConfig = zodIsFactory(ValidatorConfigZod)\nexport const asValidatorConfig = zodAsFactory(ValidatorConfigZod, 'asValidatorConfig')\nexport const toValidatorConfig = zodToFactory(ValidatorConfigZod, 'toValidatorConfig')\n\nexport interface ValidatorConfigContext extends Omit<BaseConfigContext, 'config'> {\n config: ValidatorConfig\n}\n\nexport const ValidatorConfigContext: z.ZodType<ValidatorConfigContext> = BaseConfigContextZod.extend({ config: ValidatorConfigZod })\n\nexport const isValidatorConfigContext: <T>(value: T) => value is T & ValidatorConfigContext = zodIsFactory(ValidatorConfigContext)\nexport const asValidatorConfigContext: ReturnType<typeof zodAsFactory<ValidatorConfigContext>> = zodAsFactory(ValidatorConfigContext, 'asValidatorConfigContext')\nexport const toValidatorConfigContext: ReturnType<typeof zodToFactory<ValidatorConfigContext>> = zodToFactory(ValidatorConfigContext, 'toValidatorConfigContext')\n","import { deepMerge } from '@xylabs/sdk-js'\nimport type { Config } from '@xyo-network/xl1-sdk'\n\nexport function mergeConfig({ actors, ...baseConfig }: Config) {\n return {\n ...baseConfig,\n actors: actors.map((actor) => {\n return deepMerge(baseConfig, actor)\n }),\n }\n}\n","import { buildNextBlock } from '@xyo-network/chain-sdk'\nimport type { AccountInstance, WithHashMeta } from '@xyo-network/sdk-js'\nimport type { BlockBoundWitness, XL1BlockRange } from '@xyo-network/xl1-sdk'\nimport { createDeclarationIntent } from '@xyo-network/xl1-sdk'\n\nexport async function createProducerChainStakeIntentBlock(prevBlock: WithHashMeta<BlockBoundWitness>, producerAccount: AccountInstance, range: XL1BlockRange) {\n const producerDeclarationPayload = createDeclarationIntent(\n producerAccount.address,\n 'producer',\n range[0],\n range[1],\n )\n return await buildNextBlock(\n prevBlock,\n [],\n [producerDeclarationPayload],\n [producerAccount],\n )\n}\n","import type { Host, ServiceProvider } from '../model/index.ts'\n\n/**\n * A generic host implementation that can be used as a starting point for\n * more complex host implementations.\n */\nexport class GenericHost implements Host {\n services: ServiceProvider\n\n constructor(services: ServiceProvider) {\n this.services = services\n }\n\n async start(): Promise<void> {\n await Promise.resolve()\n // Initialize or start your services here\n console.log('Host is starting...')\n }\n\n async stop(): Promise<void> {\n await Promise.resolve()\n // Stop or clean up services here\n console.log('Host is stopping...')\n }\n}\n","import type { ServiceProvider } from '../model/index.ts'\n\nexport class DefaultServiceProvider implements ServiceProvider {\n protected _services: Record<string, unknown>\n constructor(services: Record<string, unknown>) {\n this._services = services\n }\n\n getService<T>(serviceIdentifier: string): T | undefined {\n return this._services[serviceIdentifier] as T\n }\n}\n","import type { ServiceProvider } from './ServiceProvider.ts'\n\nexport interface ServiceCollection {\n build(): ServiceProvider\n}\n\n/**\n * Represents the lifetime of a service\n */\nexport const ServiceLifetime = {\n Singleton: 'Singleton',\n Transient: 'Transient',\n} as const\n\n/**\n * Describes a single service registration\n */\nexport interface ServiceDescriptor<T = unknown> {\n identifier: string | symbol\n implementationFactory: () => T\n lifetime: keyof typeof ServiceLifetime\n}\n","import type { Promisable } from '@xylabs/sdk-js'\nimport { isDefined } from '@xylabs/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport { resolveWalletForActor } from './walletResolution.ts'\n\nconst actorAccountSingletons: Record<string, Promisable<WalletInstance>> = {}\n\nexport async function initActorAccount({ config, logger }: Pick<ActorConfigContext, 'config' | 'logger'>): Promise<WalletInstance> {\n const actorName = config.name\n if (isDefined(actorAccountSingletons[actorName])) return actorAccountSingletons[actorName]\n const accountIndex = 'accountIndex' in config && typeof config.accountIndex === 'number' ? config.accountIndex : undefined\n const account = await resolveWalletForActor(actorName, config.mnemonic, accountIndex)\n logger?.debug(`[${actorName}] Using wallet address ${account.address}`)\n actorAccountSingletons[actorName] = account\n return actorAccountSingletons[actorName]\n}\n","import type { Address } from '@xylabs/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport { DEFAULT_WALLET_PATH, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk'\n\nexport const BUILT_IN_DEV_MNEMONIC = 'crane ribbon cook cousin tobacco vital moral protect merit knock veteran hint knee ocean nurse'\nexport const INSECURE_GENESIS_REWARD_MNEMONIC = 'test test test test test test test test test test test junk'\nexport const GENESIS_REWARD_AMOUNT = 20_000_000_000_000_000_000_000n\nconst ATTO_XL1_PER_XL1 = 1_000_000_000_000_000_000n\n\nexport const ROOT_WALLET_RUNTIME_ID = '_root'\nexport const SHARED_ACCOUNT_REPORT_COUNT = 10\nexport type RootMnemonicConfig = Config & { mnemonic?: string }\ntype ActorWalletConfig = Partial<ActorConfig> & { accountIndex?: number; mnemonic?: string }\n\nexport type WalletSource = 'root' | 'actor'\nexport type MnemonicKind = 'built-in-dev' | 'configured-root' | 'configured-actor'\n\nexport interface ResolvedRootWallet {\n basePath: string\n isBuiltInDevMnemonic: boolean\n mnemonic: string\n mnemonicKind: Extract<MnemonicKind, 'built-in-dev' | 'configured-root'>\n}\n\nexport interface ResolvedWalletMetadata {\n accountIndex: number\n actorName: string\n address: string\n derivationPath: string\n label: string\n mnemonic: string\n mnemonicKind: MnemonicKind\n privateKey?: string\n source: WalletSource\n usesBuiltInDevMnemonic: boolean\n}\n\nexport interface ResolvedWalletReport {\n actorSpecificAccounts: ResolvedWalletMetadata[]\n insecureGenesisRewardAccounts?: ResolvedWalletMetadata[]\n requestedActors: string[]\n root: ResolvedRootWallet\n sharedAccounts: ResolvedWalletMetadata[]\n}\n\nconst RESERVED_ACTOR_INDEX: Record<string, number> = {\n [ROOT_WALLET_RUNTIME_ID]: 0,\n api: 4,\n bridge: 2,\n mempool: 5,\n producer: 1,\n rewardRedemption: 3,\n validator: 6,\n}\n\nconst ACTOR_LABELS: Record<string, string> = {\n [ROOT_WALLET_RUNTIME_ID]: 'root/local-node',\n api: 'api',\n bridge: 'bridge',\n mempool: 'mempool',\n producer: 'producer',\n rewardRedemption: 'rewardRedemption',\n validator: 'validator',\n}\n\nlet activeWalletReport: ResolvedWalletReport | undefined\n\nfunction getAccountLabel(actorName: string): string {\n return ACTOR_LABELS[actorName] ?? actorName\n}\n\nexport function clearResolvedWalletReport() {\n activeWalletReport = undefined\n}\n\nexport function getReservedActorIndex(actorName: string): number {\n return RESERVED_ACTOR_INDEX[actorName] ?? 0\n}\n\nexport function getBuiltInDevMnemonic(): string {\n return BUILT_IN_DEV_MNEMONIC\n}\n\nexport function getInsecureGenesisRewardMnemonic(): string {\n return INSECURE_GENESIS_REWARD_MNEMONIC\n}\n\nexport function resolveRootWallet(configuration: RootMnemonicConfig): ResolvedRootWallet {\n const mnemonic = configuration.mnemonic ?? BUILT_IN_DEV_MNEMONIC\n const isBuiltInDevMnemonic = mnemonic === BUILT_IN_DEV_MNEMONIC\n return {\n basePath: DEFAULT_WALLET_PATH,\n isBuiltInDevMnemonic,\n mnemonic,\n mnemonicKind: isBuiltInDevMnemonic ? 'built-in-dev' : 'configured-root',\n }\n}\n\nasync function resolveWalletMetadata({\n accountIndex,\n actorName,\n mnemonic,\n mnemonicKind,\n source,\n}: {\n accountIndex: number\n actorName: string\n mnemonic: string\n mnemonicKind: MnemonicKind\n source: WalletSource\n}): Promise<ResolvedWalletMetadata> {\n const wallet = await generateXyoBaseWalletFromPhrase(mnemonic)\n const derivationPath = `${DEFAULT_WALLET_PATH}/${accountIndex}`\n const account = await wallet.derivePath(`${accountIndex}`)\n return {\n accountIndex,\n actorName,\n address: account.address,\n derivationPath,\n label: getAccountLabel(actorName),\n mnemonic,\n mnemonicKind,\n privateKey: account.privateKey,\n source,\n usesBuiltInDevMnemonic: mnemonic === BUILT_IN_DEV_MNEMONIC,\n }\n}\n\nexport async function resolveActorWallet(\n actorName: string,\n actorConfig: ActorWalletConfig | undefined,\n root: ResolvedRootWallet,\n): Promise<ResolvedWalletMetadata> {\n const actorMnemonic = actorConfig?.mnemonic\n const accountIndex = actorConfig?.accountIndex\n return await resolveWalletMetadata(actorMnemonic\n ? {\n accountIndex: accountIndex ?? 0,\n actorName,\n mnemonic: actorMnemonic,\n mnemonicKind: 'configured-actor',\n source: 'actor',\n }\n : {\n accountIndex: accountIndex ?? getReservedActorIndex(actorName),\n actorName,\n mnemonic: root.mnemonic,\n mnemonicKind: root.mnemonicKind,\n source: 'root',\n })\n}\n\nexport async function resolveWalletReport(\n requestedActors: string[],\n configuration: RootMnemonicConfig,\n): Promise<ResolvedWalletReport> {\n const root = resolveRootWallet(configuration)\n const actorConfigMap = new Map(configuration.actors.map(actor => [actor.name, actor]))\n\n const resolvedActors = await Promise.all(\n requestedActors.map(async actorName => await resolveActorWallet(actorName, actorConfigMap.get(actorName), root)),\n )\n\n const labelMap = new Map<number, string[]>([[0, [getAccountLabel(ROOT_WALLET_RUNTIME_ID)]]])\n for (const actor of resolvedActors) {\n if (actor.source !== 'root') continue\n const labels = labelMap.get(actor.accountIndex) ?? []\n labels.push(actor.label)\n labelMap.set(actor.accountIndex, labels)\n }\n\n const sharedAccounts = await Promise.all(\n Array.from({ length: SHARED_ACCOUNT_REPORT_COUNT }, (_, index) => index).map(async (accountIndex) => {\n const account = await resolveWalletMetadata({\n accountIndex,\n actorName: ROOT_WALLET_RUNTIME_ID,\n mnemonic: root.mnemonic,\n mnemonicKind: root.mnemonicKind,\n source: 'root',\n })\n const labels = labelMap.get(accountIndex)\n return { ...account, label: labels?.join(', ') ?? `shared[${accountIndex}]` }\n }),\n )\n\n const insecureGenesisRewardAccounts = configuration.chain.genesisRewardAddress\n ? undefined\n : await Promise.all(\n Array.from({ length: SHARED_ACCOUNT_REPORT_COUNT }, (_, index) => index).map(async (accountIndex) => {\n const account = await resolveWalletMetadata({\n accountIndex,\n actorName: 'genesisReward',\n mnemonic: INSECURE_GENESIS_REWARD_MNEMONIC,\n mnemonicKind: 'configured-actor',\n source: 'actor',\n })\n return { ...account, label: accountIndex === 0 ? 'genesisRewardAddress' : `genesisReward[${accountIndex}]` }\n }),\n )\n\n return {\n actorSpecificAccounts: resolvedActors.filter(actor => actor.source === 'actor'),\n insecureGenesisRewardAccounts,\n requestedActors: [...requestedActors],\n root,\n sharedAccounts,\n }\n}\n\nexport async function initializeResolvedWalletReport(\n requestedActors: string[],\n configuration: RootMnemonicConfig,\n): Promise<ResolvedWalletReport> {\n activeWalletReport = await resolveWalletReport(requestedActors, configuration)\n return activeWalletReport\n}\n\nexport function getResolvedWalletReport(): ResolvedWalletReport | undefined {\n return activeWalletReport\n}\n\nfunction formatSharedAccount(account: ResolvedWalletMetadata, showPrivateKey: boolean) {\n const lines = [\n `[${account.accountIndex}] ${account.label}`,\n `source: ${account.mnemonicKind === 'built-in-dev' ? 'built-in dev mnemonic' : 'configured root mnemonic'}`,\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n ]\n if (showPrivateKey) lines.push(`privateKey: ${account.privateKey ?? 'unavailable'}`)\n return lines.join('\\n')\n}\n\nfunction formatActorSpecificAccount(account: ResolvedWalletMetadata) {\n return [\n account.label,\n 'source: actor mnemonic',\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n ].join('\\n')\n}\n\nfunction formatGenesisRewardAccount(account: ResolvedWalletMetadata) {\n const balance = account.accountIndex === 0 ? GENESIS_REWARD_AMOUNT / ATTO_XL1_PER_XL1 : 0n\n return [\n `[${account.accountIndex}] ${account.label}`,\n `path: ${account.derivationPath}`,\n `address: ${account.address}`,\n `privateKey: ${account.privateKey ?? 'unavailable'}`,\n `balance: ${balance.toString()} XL1`,\n ].join('\\n')\n}\n\nexport function formatWalletReport(report: ResolvedWalletReport): string {\n const sections: string[] = []\n const showSecrets = report.root.isBuiltInDevMnemonic\n\n sections.push(showSecrets ? 'Development wallet detected.' : 'Wallet summary')\n\n if (showSecrets) {\n sections.push([\n 'DEVELOPMENT WALLET WARNING',\n '',\n 'XL1 is using the built-in development mnemonic.',\n 'This mnemonic is fixed, public, and does not change between runs.',\n 'The addresses and private keys below are unsafe and must never be used for real funds, production systems, or shared environments.',\n 'Anyone with this information can fully control these accounts.',\n '',\n 'Mnemonic:',\n report.root.mnemonic,\n ].join('\\n'))\n }\n\n sections.push([\n `Shared wallet accounts from ${report.root.basePath}:`,\n '',\n report.sharedAccounts.map(account => formatSharedAccount(account, showSecrets)).join('\\n\\n'),\n ].join('\\n'))\n\n if (report.actorSpecificAccounts.length > 0) {\n sections.push([\n 'Actor-specific wallet accounts:',\n '',\n report.actorSpecificAccounts.map(account => formatActorSpecificAccount(account)).join('\\n\\n'),\n ].join('\\n'))\n }\n\n if (report.insecureGenesisRewardAccounts) {\n sections.push([\n 'INSECURE GENESIS REWARD WALLET WARNING',\n '',\n 'XL1 is using a public, insecure fallback wallet for the genesis reward address.',\n 'This phrase is intentionally unsafe and must never be used for real funds, production systems, or shared environments.',\n 'Anyone with this information can fully control the genesis reward wallet.',\n '',\n 'Genesis reward phrase:',\n INSECURE_GENESIS_REWARD_MNEMONIC,\n '',\n `The genesis reward is sent to index 0 and starts with ${(GENESIS_REWARD_AMOUNT / ATTO_XL1_PER_XL1).toString()} XL1.`,\n '',\n `Genesis reward wallet accounts from ${DEFAULT_WALLET_PATH}:`,\n '',\n report.insecureGenesisRewardAccounts.map(account => formatGenesisRewardAccount(account)).join('\\n\\n'),\n ].join('\\n'))\n }\n\n return sections.join('\\n\\n')\n}\n\nexport async function resolveGenesisRewardAddress(config: Pick<Config, 'chain'>): Promise<Address> {\n if (config.chain.genesisRewardAddress) return config.chain.genesisRewardAddress\n const wallet = await generateXyoBaseWalletFromPhrase(INSECURE_GENESIS_REWARD_MNEMONIC)\n const account = await wallet.derivePath('0')\n return account.address\n}\n\nexport async function resolveWalletForActor(\n actorName: string,\n mnemonic?: string,\n accountIndex?: number,\n): Promise<WalletInstance> {\n const fromReport = activeWalletReport\n ? actorName === ROOT_WALLET_RUNTIME_ID\n ? activeWalletReport.sharedAccounts.find(account => account.accountIndex === 0)\n : activeWalletReport.actorSpecificAccounts.find(account => account.actorName === actorName)\n ?? activeWalletReport.sharedAccounts.find(account => account.actorName === actorName || account.label.split(', ').includes(getAccountLabel(actorName)))\n : undefined\n\n const resolvedMnemonic = fromReport?.mnemonic ?? mnemonic ?? BUILT_IN_DEV_MNEMONIC\n const resolvedAccountIndex = fromReport?.accountIndex ?? accountIndex ?? 0\n\n const wallet = await generateXyoBaseWalletFromPhrase(resolvedMnemonic)\n return await wallet.derivePath(`${resolvedAccountIndex}`)\n}\n","import { assertEx, isString } from '@xylabs/sdk-js'\nimport type { BiosExternalInterface } from '@xyo-network/bios-model'\nimport type { WalletKind } from '@xyo-network/storage-model'\nimport type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport {\n getBuiltInDevMnemonic, getResolvedWalletReport, ROOT_WALLET_RUNTIME_ID,\n} from './walletResolution.ts'\n\nexport async function initActorSeedPhrase(context: ActorConfigContext, bios: BiosExternalInterface): Promise<string> {\n const { logger, config } = context\n const walletKind = config.name as WalletKind\n void bios\n const report = getResolvedWalletReport()\n const account = config.name === ROOT_WALLET_RUNTIME_ID ? report?.sharedAccounts.find(entry => entry.accountIndex === 0) : report?.actorSpecificAccounts.find(entry => entry.actorName === config.name)\n if (isString(account?.mnemonic)) return account.mnemonic\n if (isString(report?.root.mnemonic)) return report.root.mnemonic\n if (isString(config.mnemonic)) return config.mnemonic\n const fallback = getBuiltInDevMnemonic()\n logger?.debug(`[${walletKind}] Falling back to built-in development mnemonic`)\n return assertEx(fallback, () => 'Unable to resolve mnemonic')\n}\n","import type { Address } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type {\n AttachableArchivistInstance, AttachableModuleInstance, BridgeInstance, ModuleIdentifier,\n} from '@xyo-network/sdk-js'\nimport { asAttachableArchivistInstance, asAttachableModuleInstance } from '@xyo-network/sdk-js'\nimport { Mutex } from 'async-mutex'\n\nconst initMutex = new Mutex()\ntype ModuleDictionary = Record<ModuleIdentifier, AttachableModuleInstance | undefined>\ntype BridgedModuleDictionary = Record<Address, ModuleDictionary | undefined>\nconst bridgedModuleDictionary: BridgedModuleDictionary = {}\n\nexport async function initBridgedModule({ bridge, moduleName }: { bridge: BridgeInstance; moduleName: ModuleIdentifier }): Promise<AttachableModuleInstance> {\n return await initMutex.runExclusive(async () => {\n const existing = bridgedModuleDictionary?.[bridge.address]?.[moduleName]\n if (existing) return existing\n const mod = assertEx(await bridge.resolve(moduleName), () => `Could not resolve ${moduleName}`)\n const moduleInstance = assertEx(asAttachableModuleInstance(mod), () => `Could not convert ${moduleName} to attachable module instance`)\n // Initialize the nested dictionary if needed\n let moduleMap = bridgedModuleDictionary[bridge.address]\n if (moduleMap === undefined) {\n moduleMap = {}\n bridgedModuleDictionary[bridge.address] = moduleMap\n }\n // Store and return the module instance\n moduleMap[moduleName] = moduleInstance\n return moduleInstance\n })\n}\n\nexport async function initBridgedArchivistModule({ bridge, moduleName }: {\n bridge: BridgeInstance\n moduleName: ModuleIdentifier\n}): Promise<AttachableArchivistInstance> {\n return assertEx(\n asAttachableArchivistInstance(await initBridgedModule({ bridge, moduleName })),\n () => `Could not convert ${moduleName} to attachable archivist instance`,\n )\n}\n","import type { Logger } from '@xylabs/sdk-js'\nimport { RuntimeStatusMonitor } from '@xyo-network/xl1-sdk'\n\nexport function initStatusReporter({ logger }: { logger: Logger }) {\n const statusReporter = new RuntimeStatusMonitor(logger)\n statusReporter.onGlobalTransition({ to: 'started' }, () => {\n logger.log('All services started.')\n })\n statusReporter.onGlobalTransition({ to: 'error' }, () => {\n logger.error('Producer encountered an unhandled error!')\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n })\n return statusReporter\n}\n","import type { ActorConfigContext } from '@xyo-network/xl1-sdk'\n\nimport { resolveWalletForActor, ROOT_WALLET_RUNTIME_ID } from './walletResolution.ts'\n\nexport async function initActorWallet(context: ActorConfigContext, mnemonic?: string) {\n const actorName = context.config.name === ROOT_WALLET_RUNTIME_ID ? ROOT_WALLET_RUNTIME_ID : context.config.name\n const accountIndex = 'accountIndex' in context.config && typeof context.config.accountIndex === 'number'\n ? context.config.accountIndex\n : undefined\n return await resolveWalletForActor(\n actorName,\n mnemonic ?? context.config.mnemonic,\n accountIndex,\n )\n}\n\n// export async function initApiWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.api\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initBridgeWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.bridge\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initMempoolWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.mempool\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initProducerWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.producer\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initRewardsRedemptionApiWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.rewardRedemption\n// return await initWallet({ config, logger }, mnemonic)\n// }\n\n// export async function initValidatorWallet({ config, logger }: ConfigContext) {\n// const { mnemonic } = config.actors.mempool\n// return await initWallet({ config, logger }, mnemonic)\n// }\n","import type { CreatableInstance } from '@xylabs/sdk-js'\nimport { AbstractCreatable, creatable } from '@xylabs/sdk-js'\nimport type { ActorInstanceV3 } from '@xyo-network/xl1-sdk'\n\nexport interface OrchestratorInstance extends CreatableInstance {\n registerActor(actor: ActorInstanceV3): Promise<void>\n}\n\n@creatable()\nexport class Orchestrator extends AbstractCreatable implements OrchestratorInstance {\n protected actors: (ActorInstanceV3)[] = []\n protected keepAliveHandle: NodeJS.Timeout | null = null\n protected running = false\n\n /**\n * Registers an actor.\n * (We won't activate the actor until `start()` is called.)\n */\n async registerActor(actor: ActorInstanceV3) {\n if (this.running) {\n // If the orchestrator is already running, activate the actor immediately\n await actor.start()\n }\n this.actors.push(actor)\n }\n\n /**\n * Starts the orchestrator: activates all actors.\n */\n override async startHandler() {\n await super.startHandler()\n if (this.running) {\n this.logger?.warn('[Orchestrator] Already started.')\n return\n }\n\n this.logger?.log('[Orchestrator] Starting...')\n this.running = true\n for (const actor of this.actors) {\n await actor.start()\n }\n // This interval will fire every 24.8 days (2^31 - 1 ms), effectively never finishing\n this.keepAliveHandle = setInterval(() => {\n // No-op\n }, 2_147_483_647)\n }\n\n /**\n * Stops the orchestrator: deactivates all actors.\n */\n override async stopHandler() {\n await super.stopHandler()\n if (!this.running) {\n this.logger?.log('[Orchestrator] Already stopped.')\n return\n }\n\n this.logger?.log('[Orchestrator] Stopping...')\n for (const actor of this.actors) {\n await actor.stop()\n }\n this.running = false\n if (this.keepAliveHandle) clearInterval(this.keepAliveHandle)\n this.logger?.log('[Orchestrator] Stopped...')\n }\n}\n","import type {\n BlockValidators,\n RemoteConfig, RpcTransport, XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport { basicRemoteRunnerLocator as sdkBasicRemoteRunnerLocator } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use basicRemoteRunnerLocator from \\@xyo-network/xl1-providers instead */\nexport function basicRemoteRunnerLocator(\n name: string,\n remoteConfig: RemoteConfig,\n signerTransport: RpcTransport<XyoSignerRpcSchemas>,\n dataLakeEndpoint?: string,\n validators?: BlockValidators,\n) {\n return sdkBasicRemoteRunnerLocator(name, remoteConfig, signerTransport, dataLakeEndpoint, { validators })\n}\n","import type { BlockValidators, RemoteConfig } from '@xyo-network/xl1-sdk'\nimport { basicRemoteViewerLocator as sdkBasicRemoteViewerLocator } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use basicRemoteViewerLocator from \\@xyo-network/xl1-providers instead */\nexport function basicRemoteViewerLocator(\n name: string,\n remoteConfig: RemoteConfig,\n dataLakeEndpoint?: string,\n validators?: BlockValidators,\n) {\n return sdkBasicRemoteViewerLocator(name, remoteConfig, dataLakeEndpoint, { validators })\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { ActorConfigContext, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport { commonLocatorFromConfig, remoteLocatorFromConfig } from '@xyo-network/xl1-sdk'\n\n/** @deprecated Use rootLocatorFromConfig from \\@xyo-network/xl1-providers instead */\nexport async function rootLocatorFromConfig(\n context: ActorConfigContext,\n validateDepsOnRegister = false,\n): Promise<ProviderFactoryLocatorInstance> {\n const { config } = context\n await commonLocatorFromConfig(context, validateDepsOnRegister)\n const locator = assertEx(\n await (config.remote.rpc ? remoteLocatorFromConfig(context, validateDepsOnRegister) : undefined),\n () => 'Root locator could not be created from config. No supported configuration found.',\n )\n locator.freeze()\n return locator\n}\n"],"mappings":";;;;AACA,SAASA,iBAAiB;AAC1B,SAASC,4BAA4B;AAOrC,SACEC,SAASC,8BAA8BC,oBACvCC,8BACAC,2BACAC,4BACK;;;;;;;;AAUA,IAAMC,iBAAN,cAA6BC,QAAAA;SAAAA;;;EACxBC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EAEV,IAAcC,mBAAmB;AAC/B,WAAO,KAAKC,OAAOC,OAAOF,oBAAoB,CAAA;EAChD;EAEA,IAAcG,wBAAwB;AACpC,WAAO,KAAKV;EACd;EAEA,IAAcW,cAAc;AAC1B,WAAO,KAAKV;EACd;EAEA,IAAcW,qBAAq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AQM,OAAM;AACd,SAAON;AACT;AAZsBL;","names":["creatable","processPendingBlocks","ActorV3","BlockValidationViewerMoniker","BlockViewerMoniker","DeadLetterQueueRunnerMoniker","FinalizationRunnerMoniker","MempoolViewerMoniker","ValidatorActor","ActorV3","_blockValidationViewer","_blockViewer","_deadLetterQueueRunner","_finalizationRunner","_lastValidatedBlock","_lastValidatedBlockHash","_mempoolViewer","allowedProducers","params","config","blockValidationViewer","blockViewer","finalizationRunner","mempoolViewer","minCandidates","createHandler","startHandler","locator","getInstance","BlockValidationViewerMoniker","BlockViewerMoniker","FinalizationRunnerMoniker","MempoolViewerMoniker","tryGetInstance","DeadLetterQueueRunnerMoniker","registerTimer","spanAsync","logger","debug","processPendingBlocks","context","deadLetterQueueRunner","timeBudgetLimit","buildTelemetryConfig","config","serviceName","serviceVersion","defaultMetricsScrapePort","otlpEndpoint","telemetry","otel","path","endpoint","port","metrics","scrape","telemetryConfig","attributes","metricsConfig","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","globalRegistry","z","globalRegistry","z","ActorAccountIndexZod","title","z","coerce","number","int","min","optional","register","globalRegistry","description","type","ApiConfigZod","HostActorConfigZod","extend","z","object","accountIndex","ActorAccountIndexZod","initRewardsCache","union","number","string","boolean","transform","v","default","register","globalRegistry","description","title","type","shape","isApiConfig","zodIsFactory","asApiConfig","zodAsFactory","toApiConfig","zodToFactory","ApiConfigContext","BaseConfigContextZod","config","isApiConfigContext","asApiConfigContext","toApiConfigContext","AddressZod","HexZod","toAddress","toHex","zodAsFactory","zodIsFactory","zodToFactory","AttoXL1ConvertFactor","BaseConfigContextZod","HostActorConfigZod","XL1","globalRegistry","z","DEFAULT_FIXED_FEE","toHex","XL1","AttoXL1ConvertFactor","xl1","DEFAULT_VARIABLE_FEE_BASIS_POINTS","DEFAULT_HARDHAT_BRIDGE_CONTRACT","toAddress","DEFAULT_HARDHAT_CHAIN_ID","DEFAULT_HARDHAT_REMOTE_CHAIN_WALLET_PRIVATE_KEY","DEFAULT_HARDHAT_TOKEN_CONTRACT","DEFAULT_MAX_BRIDGE_AMOUNT","DEFAULT_MIN_BRIDGE_AMOUNT","BasisPointsZod","z","coerce","number","int","nonnegative","max","BridgeConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","escrowAddress","AddressZod","optional","register","globalRegistry","description","title","type","feesAddress","feeFixed","HexZod","default","feeRateBasisPoints","maxBridgeAmount","minBridgeAmount","redisHost","string","redisPort","positive","remoteBridgeContractAddress","remoteChainId","remoteTokenAddress","remoteChainWalletPrivateKey","xl1ChainId","xl1TokenAddress","BridgeSettingsZod","pick","required","isBridgeConfig","zodIsFactory","asBridgeConfig","zodAsFactory","toBridgeConfig","zodToFactory","BridgeConfigContext","BaseConfigContextZod","config","isBridgeConfigContext","asBridgeConfigContext","toBridgeConfigContext","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","globalRegistry","z","DEFAULT_MEMPOOL_BLOCK_PRUNE_INTERVAL","DEFAULT_MEMPOOL_TRANSACTION_PRUNE_INTERVAL","MempoolConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","enabled","z","union","string","boolean","default","transform","val","ctx","normalized","toLowerCase","trim","includes","addIssue","code","expected","message","NEVER","register","globalRegistry","description","title","type","blockPruneInterval","coerce","number","transactionPruneInterval","isMempoolConfig","zodIsFactory","asMempoolConfig","zodAsFactory","toMempoolConfig","zodToFactory","MempoolConfigContext","BaseConfigContextZod","config","isMempoolConfigContext","asMempoolConfigContext","toMempoolConfigContext","AddressZod","asAddress","zodAsFactory","zodIsFactory","zodToFactory","ActorConfigZod","BaseConfigContextZod","globalRegistry","z","DEFAULT_BLOCK_PRODUCTION_CHECK_INTERVAL","ProducerConfigZod","ActorConfigZod","extend","z","object","accountIndex","ActorAccountIndexZod","allowlist","preprocess","val","split","map","s","asAddress","trim","array","AddressZod","optional","register","globalRegistry","description","title","type","blockProductionCheckInterval","coerce","number","default","disableIntentRedeclaration","boolean","heartbeatInterval","minStake","rewardAddress","string","shape","isProducerConfig","zodIsFactory","asProducerConfig","zodAsFactory","toProducerConfig","zodToFactory","ProducerConfigContext","BaseConfigContextZod","config","isProducerConfigContext","asProducerConfigContext","toProducerConfigContext","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","RewardRedemptionConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","isRewardRedemptionConfig","zodIsFactory","asRewardRedemptionConfig","zodAsFactory","toRewardRedemptionConfig","zodToFactory","RewardRedemptionConfigContext","BaseConfigContextZod","config","isRewardRedemptionConfigContext","asRewardRedemptionConfigContext","toRewardRedemptionConfigContext","AddressZod","zodAsFactory","zodIsFactory","zodToFactory","BaseConfigContextZod","HostActorConfigZod","z","ValidatorConfigZod","HostActorConfigZod","extend","accountIndex","ActorAccountIndexZod","allowedProducers","z","array","AddressZod","optional","minCandidates","number","int","min","default","isValidatorConfig","zodIsFactory","asValidatorConfig","zodAsFactory","toValidatorConfig","zodToFactory","ValidatorConfigContext","BaseConfigContextZod","config","isValidatorConfigContext","asValidatorConfigContext","toValidatorConfigContext","deepMerge","mergeConfig","actors","baseConfig","map","actor","deepMerge","buildNextBlock","createDeclarationIntent","createProducerChainStakeIntentBlock","prevBlock","producerAccount","range","producerDeclarationPayload","createDeclarationIntent","address","buildNextBlock","GenericHost","services","start","Promise","resolve","console","log","stop","DefaultServiceProvider","_services","services","getService","serviceIdentifier","ServiceLifetime","Singleton","Transient","isDefined","DEFAULT_WALLET_PATH","generateXyoBaseWalletFromPhrase","BUILT_IN_DEV_MNEMONIC","INSECURE_GENESIS_REWARD_MNEMONIC","GENESIS_REWARD_AMOUNT","ATTO_XL1_PER_XL1","ROOT_WALLET_RUNTIME_ID","SHARED_ACCOUNT_REPORT_COUNT","RESERVED_ACTOR_INDEX","api","bridge","mempool","producer","rewardRedemption","validator","ACTOR_LABELS","activeWalletReport","getAccountLabel","actorName","clearResolvedWalletReport","undefined","getReservedActorIndex","getBuiltInDevMnemonic","getInsecureGenesisRewardMnemonic","resolveRootWallet","configuration","mnemonic","isBuiltInDevMnemonic","basePath","DEFAULT_WALLET_PATH","mnemonicKind","resolveWalletMetadata","accountIndex","source","wallet","generateXyoBaseWalletFromPhrase","derivationPath","account","derivePath","address","label","privateKey","usesBuiltInDevMnemonic","resolveActorWallet","actorConfig","root","actorMnemonic","resolveWalletReport","requestedActors","actorConfigMap","Map","actors","map","actor","name","resolvedActors","Promise","all","get","labelMap","labels","push","set","sharedAccounts","Array","from","length","_","index","join","insecureGenesisRewardAccounts","chain","genesisRewardAddress","actorSpecificAccounts","filter","initializeResolvedWalletReport","getResolvedWalletReport","formatSharedAccount","showPrivateKey","lines","formatActorSpecificAccount","formatGenesisRewardAccount","balance","toString","formatWalletReport","report","sections","showSecrets","resolveGenesisRewardAddress","config","resolveWalletForActor","fromReport","find","split","includes","resolvedMnemonic","resolvedAccountIndex","actorAccountSingletons","initActorAccount","config","logger","actorName","name","isDefined","accountIndex","undefined","account","resolveWalletForActor","mnemonic","debug","address","assertEx","isString","initActorSeedPhrase","context","bios","logger","config","walletKind","name","report","getResolvedWalletReport","account","ROOT_WALLET_RUNTIME_ID","sharedAccounts","find","entry","accountIndex","actorSpecificAccounts","actorName","isString","mnemonic","root","fallback","getBuiltInDevMnemonic","debug","assertEx","assertEx","asAttachableArchivistInstance","asAttachableModuleInstance","Mutex","initMutex","Mutex","bridgedModuleDictionary","initBridgedModule","bridge","moduleName","runExclusive","existing","address","mod","assertEx","resolve","moduleInstance","asAttachableModuleInstance","moduleMap","undefined","initBridgedArchivistModule","asAttachableArchivistInstance","RuntimeStatusMonitor","initStatusReporter","logger","statusReporter","RuntimeStatusMonitor","onGlobalTransition","to","log","error","process","exit","initActorWallet","context","mnemonic","actorName","config","name","ROOT_WALLET_RUNTIME_ID","accountIndex","undefined","resolveWalletForActor","AbstractCreatable","creatable","Orchestrator","AbstractCreatable","actors","keepAliveHandle","running","registerActor","actor","start","push","startHandler","logger","warn","log","setInterval","stopHandler","stop","clearInterval","basicRemoteRunnerLocator","sdkBasicRemoteRunnerLocator","basicRemoteRunnerLocator","name","remoteConfig","signerTransport","dataLakeEndpoint","validators","sdkBasicRemoteRunnerLocator","basicRemoteViewerLocator","sdkBasicRemoteViewerLocator","basicRemoteViewerLocator","name","remoteConfig","dataLakeEndpoint","validators","sdkBasicRemoteViewerLocator","assertEx","commonLocatorFromConfig","remoteLocatorFromConfig","rootLocatorFromConfig","context","validateDepsOnRegister","config","commonLocatorFromConfig","locator","assertEx","remote","rpc","remoteLocatorFromConfig","undefined","freeze"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LmdbArchivist } from '@xyo-network/archivist-lmdb';
|
|
2
|
+
/**
|
|
3
|
+
* LMDB-backed archivist that derives its on-disk location, database name, and
|
|
4
|
+
* store name from `config.location` / `config.dbName` / `config.storeName`,
|
|
5
|
+
* and — critically — falls back to `config.payloadSdkConfig.collection` or
|
|
6
|
+
* `config.name` when `config.storeName` is not explicitly set.
|
|
7
|
+
*
|
|
8
|
+
* This lets the manifest-driven archivist factories (see `public/Pending.json`,
|
|
9
|
+
* `public/Chain.json`, `public/DeadLetterQueue.json`) share a single LMDB root
|
|
10
|
+
* while each archivist gets its own per-store LMDB env — the same separation
|
|
11
|
+
* that `payloadSdkConfig.collection` provides for mongo.
|
|
12
|
+
*/
|
|
13
|
+
export declare class NamedLmdbArchivist extends LmdbArchivist {
|
|
14
|
+
get dbName(): string;
|
|
15
|
+
get location(): string;
|
|
16
|
+
get storeName(): string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=NamedLmdbArchivist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedLmdbArchivist.d.ts","sourceRoot":"","sources":["../../../../src/node/manifest/NamedLmdbArchivist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D;;;;;;;;;;GAUG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAa,MAAM,IAAI,MAAM,CAE5B;IAED,IAAa,QAAQ,IAAI,MAAM,CAM9B;IAED,IAAa,SAAS,IAAI,MAAM,CAS/B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocator.d.ts","sourceRoot":"","sources":["../../../../src/node/manifest/getLocator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getLocator.d.ts","sourceRoot":"","sources":["../../../../src/node/manifest/getLocator.ts"],"names":[],"mappings":"AAOA,OAAO,EAE4B,oBAAoB,EACtD,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAK7D;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACrB,oBAAoB,iBAAiB,kCAiEtC,CAAA"}
|
|
@@ -22,7 +22,7 @@ export declare class ValidatorActor extends ActorV3<ValidatorActorParams> {
|
|
|
22
22
|
protected get blockViewer(): BlockViewer<"BlockViewer">;
|
|
23
23
|
protected get finalizationRunner(): FinalizationRunner;
|
|
24
24
|
protected get mempoolViewer(): MempoolViewer;
|
|
25
|
-
protected get minCandidates(): number
|
|
25
|
+
protected get minCandidates(): number;
|
|
26
26
|
createHandler(): Promise<void>;
|
|
27
27
|
startHandler(): Promise<void>;
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorActor.d.ts","sourceRoot":"","sources":["../../../../src/shared/actor/ValidatorActor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAG1C,OAAO,KAAK,EACV,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,WAAW,EACpE,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,OAAO,EAIR,MAAM,sBAAsB,CAAA;A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