@provablehq/veil-aleo-devnode 0.6.0 → 0.7.1
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -94,7 +94,7 @@ async function spawnDevnode(devnodePath, args, socketAddr, readyTimeout, verbose
|
|
|
94
94
|
stdio: "pipe",
|
|
95
95
|
// MUST mirror DEVNODE_CONSENSUS_HEIGHTS in @provablehq/veil-aleo-sdk so the
|
|
96
96
|
// transaction builder and the node agree on active consensus versions.
|
|
97
|
-
env: { ...process.env, CONSENSUS_VERSION_HEIGHTS: process.env.CONSENSUS_VERSION_HEIGHTS || "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" }
|
|
97
|
+
env: { ...process.env, CONSENSUS_VERSION_HEIGHTS: process.env.CONSENSUS_VERSION_HEIGHTS || "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" }
|
|
98
98
|
});
|
|
99
99
|
if (verbose) {
|
|
100
100
|
const port = socketAddr.split(":")[1] ?? socketAddr.replace(/\./g, "-");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { spawn } from 'node:child_process'\nimport { createWriteStream } from 'node:fs'\nimport { join } from 'node:path'\nimport type { Client } from '@provablehq/veil-core'\n\n/** The well-known seeded private key used by Aleo Devnode */\nexport const DEVNODE_PRIVATE_KEY = 'APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH'\n\n/** Default local devnode socket address */\nexport const DEVNODE_ADDR = '127.0.0.1:3030'\n\nconst HEALTH_CHECK_PATH = '/testnet/block/height/latest'\nconst HEALTH_CHECK_INTERVAL_MS = 250\nconst HEALTH_CHECK_REQUEST_TIMEOUT_MS = 1_000\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Options for {@link startDevnode}.\n *\n * Most fields map to flags of the `aleo-devnode start` subcommand.\n */\nexport type DevnodeStartOptions = {\n /** Private key for block creation. Defaults to `DEVNODE_PRIVATE_KEY`. */\n privateKey?: string\n /** `-a, --socket-addr`. REST API bind address. Defaults to `DEVNODE_ADDR`. */\n socketAddr?: string\n /** `-v, --verbosity` (0–2). Defaults to 2. */\n verbosity?: 0 | 1 | 2\n /** `-g, --genesis-path`. Path to a custom genesis block file. */\n genesisPath?: string\n /**\n * `-s, --storage [DIR]`. Directory for persistent ledger storage.\n * - Omit for in-memory (ephemeral).\n * - Pass an empty string to use the default \"./devnode\" directory.\n * - Pass a path string for a custom directory.\n */\n storagePath?: string\n /** `-c, --clear-storage`. Clear the storage directory before starting. Requires `storagePath`. */\n clearStorage?: boolean\n /** `-m, --manual-block-creation`. Disable automatic block creation after broadcast. */\n manualBlockCreation?: boolean\n /** Milliseconds to wait for the REST API to become ready. Defaults to 30000. */\n readyTimeout?: number\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n /** Write devnode stdout/stderr to devnode-<port>.log in the current directory. Defaults to false. */\n verbose?: boolean\n}\n\n/**\n * Options for {@link advanceDevnode}.\n *\n * Fields map to the `aleo-devnode advance` subcommand.\n */\nexport type DevnodeAdvanceOptions = {\n /** Number of blocks to advance. Defaults to 1. */\n numBlocks?: number\n /** `--socket-addr`. Target devnode socket. Defaults to `DEVNODE_ADDR`. */\n socketAddr?: string\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n}\n\n/**\n * Options for {@link restoreDevnode}.\n *\n * Fields map to flags of the `aleo-devnode restore` subcommand. Restoring\n * requires persistent storage, so the snapshot must have been taken from a\n * devnode started with `storagePath`.\n */\nexport type DevnodeRestoreOptions = {\n /** `--snapshot`. Name of the snapshot to restore. Required. */\n snapshot: string\n /** `--storage`. Ledger storage directory to restore into. Defaults to `'devnode'`. */\n storage?: string\n /** `--restart`. Restart the devnode after restoring. */\n restart?: boolean\n /** `--private-key`. Required when `restart` is true (or set via `$PRIVATE_KEY`). */\n privateKey?: string\n /** `-a, --socket-addr`. Forwarded to `start` when `restart` is true. */\n socketAddr?: string\n /** `-v, --verbosity`. Forwarded to `start` when `restart` is true. */\n verbosity?: 0 | 1 | 2\n /** `-m, --manual-block-creation`. Forwarded to `start` when `restart` is true. */\n manualBlockCreation?: boolean\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n}\n\n/**\n * Handle to a running devnode process returned by {@link startDevnode}.\n *\n * Hold on to it for the lifetime of the node and call `stop()` when done —\n * the child process is not stopped automatically when the parent exits.\n */\nexport type DevnodeInstance = {\n /** Socket address the devnode is listening on. */\n socketAddr: string\n /** Terminates the devnode process gracefully (SIGTERM). */\n stop: () => Promise<void>\n}\n\n// =============================================================================\n// Public API\n// =============================================================================\n\n/**\n * Starts a local Aleo devnode and waits until its REST API answers.\n *\n * Spawns the `aleo-devnode` binary as a child process, so it MUST be\n * installed and on PATH (or located via `devnodePath`). If a devnode is\n * already listening on the target socket, it is asked to shut down first so\n * the new instance can bind. Resolves once the node serves block height, or\n * rejects after `readyTimeout`.\n *\n * By default the node binds `127.0.0.1:3030`, keeps its ledger in memory\n * (lost on stop), creates blocks automatically, and produces blocks with the\n * well-known seeded key {@link DEVNODE_PRIVATE_KEY}.\n *\n * @param options Overrides for the defaults above; omit for an ephemeral\n * node on port 3030.\n * @returns A {@link DevnodeInstance} — keep it and call `stop()` to terminate\n * the process.\n * @throws If the binary is missing, the process exits during startup, or the\n * REST API is not ready within `readyTimeout` (default 30000 ms).\n *\n * @example\n * import { startDevnode } from '@provablehq/veil-aleo-devnode'\n *\n * const devnode = await startDevnode()\n * // ...run tests against http://127.0.0.1:3030...\n * await devnode.stop()\n */\nexport async function startDevnode(options?: DevnodeStartOptions): Promise<DevnodeInstance> {\n const privateKey = options?.privateKey ?? DEVNODE_PRIVATE_KEY\n const socketAddr = options?.socketAddr ?? DEVNODE_ADDR\n const verbosity = options?.verbosity ?? 2\n const readyTimeout = options?.readyTimeout ?? 30_000\n const devnodePath = options?.devnodePath ?? 'aleo-devnode'\n const verbose = options?.verbose ?? false\n\n await tryShutdownExisting(socketAddr)\n\n const args = [\n 'start',\n '--private-key', privateKey,\n '--socket-addr', socketAddr,\n '--verbosity', String(verbosity),\n ]\n\n if (options?.genesisPath !== undefined) args.push('--genesis-path', options.genesisPath)\n if (options?.storagePath !== undefined) {\n args.push(options.storagePath === '' ? '--storage' : `--storage=${options.storagePath}`)\n }\n if (options?.clearStorage) args.push('--clear-storage')\n if (options?.manualBlockCreation) args.push('--manual-block-creation')\n\n return spawnDevnode(devnodePath, args, socketAddr, readyTimeout, verbose)\n}\n\n/**\n * Advances a running devnode by one or more empty blocks.\n *\n * Spawns `aleo-devnode advance` as a child process (requires the binary on\n * PATH) and resolves when it exits. Use it to move the chain forward when the\n * node runs with `manualBlockCreation`, or when a test needs height to pass.\n *\n * @param options.numBlocks Blocks to produce. Defaults to 1.\n * @param options.socketAddr Devnode to target. Defaults to `127.0.0.1:3030`.\n * @throws If the binary is missing or no devnode answers on the socket.\n */\nexport async function advanceDevnode(options?: DevnodeAdvanceOptions): Promise<void> {\n const devnodePath = options?.devnodePath ?? 'aleo-devnode'\n const args = ['advance']\n if (options?.numBlocks !== undefined) args.push(String(options.numBlocks))\n if (options?.socketAddr) args.push('--socket-addr', options.socketAddr)\n await runDevnode(devnodePath, args)\n}\n\n/**\n * Restores a devnode ledger from a named snapshot.\n *\n * Spawns `aleo-devnode restore` as a child process (requires the binary on\n * PATH). With `restart: true` the devnode is relaunched on the restored\n * ledger; otherwise only the storage directory is rewritten and the caller\n * starts the node separately.\n *\n * @param options Snapshot name, target storage directory, and optional\n * restart parameters.\n * @throws If the binary is missing, the snapshot does not exist, or the\n * command exits non-zero.\n */\nexport async function restoreDevnode(options: DevnodeRestoreOptions): Promise<void> {\n const devnodePath = options.devnodePath ?? 'aleo-devnode'\n const args = ['restore', '--snapshot', options.snapshot]\n if (options.storage) args.push('--storage', options.storage)\n if (options.restart) {\n args.push('--restart')\n if (options.privateKey) args.push('--private-key', options.privateKey)\n if (options.socketAddr) args.push('--socket-addr', options.socketAddr)\n if (options.verbosity !== undefined) args.push('--verbosity', String(options.verbosity))\n if (options.manualBlockCreation) args.push('--manual-block-creation')\n }\n await runDevnode(devnodePath, args)\n}\n\n// =============================================================================\n// Subprocess helpers\n// =============================================================================\n\nasync function tryShutdownExisting(socketAddr: string): Promise<void> {\n const baseUrl = `http://${socketAddr}`\n try {\n const res = await fetch(`${baseUrl}/testnet/shutdown`, {\n method: 'POST',\n signal: AbortSignal.timeout(2_000),\n })\n if (!res.ok) return\n // Wait up to 5s for the old process to stop responding\n const deadline = Date.now() + 5_000\n while (Date.now() < deadline) {\n try {\n await fetch(`${baseUrl}${HEALTH_CHECK_PATH}`, { signal: AbortSignal.timeout(500) })\n await new Promise<void>(r => setTimeout(r, 200))\n } catch {\n return // port no longer responding — old devnode is gone\n }\n }\n } catch {\n // nothing was listening on the port — proceed normally\n }\n}\n\nfunction runDevnode(devnodePath: string, args: string[]): Promise<void> {\n return new Promise((resolve, reject) => {\n const proc = spawn(devnodePath, args, { stdio: 'inherit' })\n proc.on('error', (err) =>\n reject(\n new Error(\n `Failed to run ${devnodePath}: ${err.message}. Ensure aleo-devnode is installed and on PATH.`,\n ),\n ),\n )\n proc.on('exit', (code) => {\n if (code === 0) resolve()\n else reject(new Error(`${devnodePath} ${args[0]} exited with code ${code}`))\n })\n })\n}\n\nasync function spawnDevnode(\n devnodePath: string,\n args: string[],\n socketAddr: string,\n readyTimeout: number,\n verbose: boolean = false,\n): Promise<DevnodeInstance> {\n const proc = spawn(devnodePath, args, {\n stdio: 'pipe',\n // MUST mirror DEVNODE_CONSENSUS_HEIGHTS in @provablehq/veil-aleo-sdk so the\n // transaction builder and the node agree on active consensus versions.\n env: { ...process.env, CONSENSUS_VERSION_HEIGHTS: process.env.CONSENSUS_VERSION_HEIGHTS || '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16' },\n })\n\n if (verbose) {\n const port = socketAddr.split(':')[1] ?? socketAddr.replace(/\\./g, '-')\n const logFile = join(process.cwd(), `devnode-${port}.log`)\n const logStream = createWriteStream(logFile, { flags: 'w' })\n proc.stdout?.pipe(logStream)\n proc.stderr?.pipe(logStream)\n console.log(`[devnode] logs → ${logFile}`)\n } else {\n proc.stdout?.resume()\n proc.stderr?.resume()\n }\n\n let startError: Error | undefined\n proc.on('error', (err) => {\n startError = new Error(\n `Failed to start ${devnodePath}: ${err.message}. Ensure aleo-devnode is installed and on PATH.`,\n )\n })\n proc.on('exit', (code, signal) => {\n if (signal === 'SIGTERM' || signal === 'SIGINT') return\n if (code !== 0 && code !== null) {\n startError = startError ?? new Error(`${devnodePath} exited unexpectedly with code ${code}`)\n }\n })\n\n try {\n await waitForReady(`http://${socketAddr}`, readyTimeout, () => startError)\n } catch (err) {\n proc.kill('SIGTERM')\n throw err\n }\n\n return {\n socketAddr,\n stop: () =>\n new Promise<void>((resolve) => {\n proc.kill('SIGTERM')\n proc.once('exit', () => resolve())\n }),\n }\n}\n\n// =============================================================================\n// Test client decorator\n// =============================================================================\n\n/**\n * Devnode management actions added to a test client by {@link devnodeActions}.\n *\n * Each action delegates to the standalone function of the same name and\n * spawns the `aleo-devnode` binary.\n *\n * @property startDevnode Starts a devnode; see {@link startDevnode}.\n * @property advanceDevnode Produces blocks on a running devnode; see {@link advanceDevnode}.\n * @property restoreDevnode Restores a ledger snapshot; see {@link restoreDevnode}.\n */\nexport type DevnodeClientActions = {\n startDevnode: (options?: DevnodeStartOptions) => Promise<DevnodeInstance>\n advanceDevnode: (options?: DevnodeAdvanceOptions) => Promise<void>\n restoreDevnode: (options: DevnodeRestoreOptions) => Promise<void>\n}\n\n/**\n * Adds devnode management actions to a test client via `.extend`.\n *\n * @example\n * ```ts\n * import { createTestClient, http } from '@provablehq/veil-core'\n * import { devnodeActions } from '@provablehq/veil-aleo-devnode'\n *\n * const client = createTestClient({ transport: http('http://127.0.0.1:3030', { network: 'testnet' }) })\n * .extend(devnodeActions)\n *\n * const devnode = await client.startDevnode()\n * await client.advanceDevnode({ numBlocks: 1 })\n * await devnode.stop()\n * ```\n */\nexport function devnodeActions(_client: Client): DevnodeClientActions {\n return {\n startDevnode: (options) => startDevnode(options),\n advanceDevnode: (options) => advanceDevnode(options),\n restoreDevnode: (options) => restoreDevnode(options),\n }\n}\n\nasync function waitForReady(\n baseUrl: string,\n timeout: number,\n getError: () => Error | undefined,\n): Promise<void> {\n const deadline = Date.now() + timeout\n const healthUrl = `${baseUrl}${HEALTH_CHECK_PATH}`\n\n while (Date.now() < deadline) {\n const err = getError()\n if (err) throw err\n\n try {\n const response = await fetch(healthUrl, {\n signal: AbortSignal.timeout(HEALTH_CHECK_REQUEST_TIMEOUT_MS),\n })\n if (response.ok) return\n } catch {\n // not ready yet — keep polling\n }\n\n await new Promise<void>((resolve) => setTimeout(resolve, HEALTH_CHECK_INTERVAL_MS))\n }\n\n throw new Error(\n `Devnode at ${baseUrl} did not become ready within ${timeout}ms. ` +\n 'Try increasing readyTimeout or check that aleo-devnode is installed and working.',\n )\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAId,IAAM,sBAAsB;AAG5B,IAAM,eAAe;AAE5B,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;AACjC,IAAM,kCAAkC;AA2HxC,eAAsB,aAAa,SAAyD;AAC1F,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,YAAY,SAAS,aAAa;AACxC,QAAM,eAAe,SAAS,gBAAgB;AAC9C,QAAM,cAAc,SAAS,eAAe;AAC5C,QAAM,UAAU,SAAS,WAAW;AAEpC,QAAM,oBAAoB,UAAU;AAEpC,QAAM,OAAO;AAAA,IACX;AAAA,IACA;AAAA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AAI,IAAI;AAC9B,QAAM,YAAY,GAAG,OAAO,GAAG,iBAAiB;AAEhD,SAAO,KAAK,IAAI,IAAI,UAAU;AAC5B,UAAM,MAAM,SAAS;AACrB,QAAI,IAAK,OAAM;AAEf,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,WAAW;AAAA,QACtC,QAAQ,YAAY,QAAQ,+BAA+B;AAAA,MAC7D,CAAC;AACD,UAAI,SAAS,GAAI;AAAA,IACnB,QAAQ;AAAA,IAER;AAEA,UAAM,IAAI,QAAc,CAAC,YAAY,WAAW,SAAS,wBAAwB,CAAC;AAAA,EACpF;AAEA,QAAM,IAAI;AAAA,IACR,cAAc,OAAO,gCAAgC,OAAO;AAAA,EAE9D;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { spawn } from 'node:child_process'\nimport { createWriteStream } from 'node:fs'\nimport { join } from 'node:path'\nimport type { Client } from '@provablehq/veil-core'\n\n/** The well-known seeded private key used by Aleo Devnode */\nexport const DEVNODE_PRIVATE_KEY = 'APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH'\n\n/** Default local devnode socket address */\nexport const DEVNODE_ADDR = '127.0.0.1:3030'\n\nconst HEALTH_CHECK_PATH = '/testnet/block/height/latest'\nconst HEALTH_CHECK_INTERVAL_MS = 250\nconst HEALTH_CHECK_REQUEST_TIMEOUT_MS = 1_000\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Options for {@link startDevnode}.\n *\n * Most fields map to flags of the `aleo-devnode start` subcommand.\n */\nexport type DevnodeStartOptions = {\n /** Private key for block creation. Defaults to `DEVNODE_PRIVATE_KEY`. */\n privateKey?: string\n /** `-a, --socket-addr`. REST API bind address. Defaults to `DEVNODE_ADDR`. */\n socketAddr?: string\n /** `-v, --verbosity` (0–2). Defaults to 2. */\n verbosity?: 0 | 1 | 2\n /** `-g, --genesis-path`. Path to a custom genesis block file. */\n genesisPath?: string\n /**\n * `-s, --storage [DIR]`. Directory for persistent ledger storage.\n * - Omit for in-memory (ephemeral).\n * - Pass an empty string to use the default \"./devnode\" directory.\n * - Pass a path string for a custom directory.\n */\n storagePath?: string\n /** `-c, --clear-storage`. Clear the storage directory before starting. Requires `storagePath`. */\n clearStorage?: boolean\n /** `-m, --manual-block-creation`. Disable automatic block creation after broadcast. */\n manualBlockCreation?: boolean\n /** Milliseconds to wait for the REST API to become ready. Defaults to 30000. */\n readyTimeout?: number\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n /** Write devnode stdout/stderr to devnode-<port>.log in the current directory. Defaults to false. */\n verbose?: boolean\n}\n\n/**\n * Options for {@link advanceDevnode}.\n *\n * Fields map to the `aleo-devnode advance` subcommand.\n */\nexport type DevnodeAdvanceOptions = {\n /** Number of blocks to advance. Defaults to 1. */\n numBlocks?: number\n /** `--socket-addr`. Target devnode socket. Defaults to `DEVNODE_ADDR`. */\n socketAddr?: string\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n}\n\n/**\n * Options for {@link restoreDevnode}.\n *\n * Fields map to flags of the `aleo-devnode restore` subcommand. Restoring\n * requires persistent storage, so the snapshot must have been taken from a\n * devnode started with `storagePath`.\n */\nexport type DevnodeRestoreOptions = {\n /** `--snapshot`. Name of the snapshot to restore. Required. */\n snapshot: string\n /** `--storage`. Ledger storage directory to restore into. Defaults to `'devnode'`. */\n storage?: string\n /** `--restart`. Restart the devnode after restoring. */\n restart?: boolean\n /** `--private-key`. Required when `restart` is true (or set via `$PRIVATE_KEY`). */\n privateKey?: string\n /** `-a, --socket-addr`. Forwarded to `start` when `restart` is true. */\n socketAddr?: string\n /** `-v, --verbosity`. Forwarded to `start` when `restart` is true. */\n verbosity?: 0 | 1 | 2\n /** `-m, --manual-block-creation`. Forwarded to `start` when `restart` is true. */\n manualBlockCreation?: boolean\n /** Path to the aleo-devnode binary. Defaults to `'aleo-devnode'` (resolved on PATH). */\n devnodePath?: string\n}\n\n/**\n * Handle to a running devnode process returned by {@link startDevnode}.\n *\n * Hold on to it for the lifetime of the node and call `stop()` when done —\n * the child process is not stopped automatically when the parent exits.\n */\nexport type DevnodeInstance = {\n /** Socket address the devnode is listening on. */\n socketAddr: string\n /** Terminates the devnode process gracefully (SIGTERM). */\n stop: () => Promise<void>\n}\n\n// =============================================================================\n// Public API\n// =============================================================================\n\n/**\n * Starts a local Aleo devnode and waits until its REST API answers.\n *\n * Spawns the `aleo-devnode` binary as a child process, so it MUST be\n * installed and on PATH (or located via `devnodePath`). If a devnode is\n * already listening on the target socket, it is asked to shut down first so\n * the new instance can bind. Resolves once the node serves block height, or\n * rejects after `readyTimeout`.\n *\n * By default the node binds `127.0.0.1:3030`, keeps its ledger in memory\n * (lost on stop), creates blocks automatically, and produces blocks with the\n * well-known seeded key {@link DEVNODE_PRIVATE_KEY}.\n *\n * @param options Overrides for the defaults above; omit for an ephemeral\n * node on port 3030.\n * @returns A {@link DevnodeInstance} — keep it and call `stop()` to terminate\n * the process.\n * @throws If the binary is missing, the process exits during startup, or the\n * REST API is not ready within `readyTimeout` (default 30000 ms).\n *\n * @example\n * import { startDevnode } from '@provablehq/veil-aleo-devnode'\n *\n * const devnode = await startDevnode()\n * // ...run tests against http://127.0.0.1:3030...\n * await devnode.stop()\n */\nexport async function startDevnode(options?: DevnodeStartOptions): Promise<DevnodeInstance> {\n const privateKey = options?.privateKey ?? DEVNODE_PRIVATE_KEY\n const socketAddr = options?.socketAddr ?? DEVNODE_ADDR\n const verbosity = options?.verbosity ?? 2\n const readyTimeout = options?.readyTimeout ?? 30_000\n const devnodePath = options?.devnodePath ?? 'aleo-devnode'\n const verbose = options?.verbose ?? false\n\n await tryShutdownExisting(socketAddr)\n\n const args = [\n 'start',\n '--private-key', privateKey,\n '--socket-addr', socketAddr,\n '--verbosity', String(verbosity),\n ]\n\n if (options?.genesisPath !== undefined) args.push('--genesis-path', options.genesisPath)\n if (options?.storagePath !== undefined) {\n args.push(options.storagePath === '' ? '--storage' : `--storage=${options.storagePath}`)\n }\n if (options?.clearStorage) args.push('--clear-storage')\n if (options?.manualBlockCreation) args.push('--manual-block-creation')\n\n return spawnDevnode(devnodePath, args, socketAddr, readyTimeout, verbose)\n}\n\n/**\n * Advances a running devnode by one or more empty blocks.\n *\n * Spawns `aleo-devnode advance` as a child process (requires the binary on\n * PATH) and resolves when it exits. Use it to move the chain forward when the\n * node runs with `manualBlockCreation`, or when a test needs height to pass.\n *\n * @param options.numBlocks Blocks to produce. Defaults to 1.\n * @param options.socketAddr Devnode to target. Defaults to `127.0.0.1:3030`.\n * @throws If the binary is missing or no devnode answers on the socket.\n */\nexport async function advanceDevnode(options?: DevnodeAdvanceOptions): Promise<void> {\n const devnodePath = options?.devnodePath ?? 'aleo-devnode'\n const args = ['advance']\n if (options?.numBlocks !== undefined) args.push(String(options.numBlocks))\n if (options?.socketAddr) args.push('--socket-addr', options.socketAddr)\n await runDevnode(devnodePath, args)\n}\n\n/**\n * Restores a devnode ledger from a named snapshot.\n *\n * Spawns `aleo-devnode restore` as a child process (requires the binary on\n * PATH). With `restart: true` the devnode is relaunched on the restored\n * ledger; otherwise only the storage directory is rewritten and the caller\n * starts the node separately.\n *\n * @param options Snapshot name, target storage directory, and optional\n * restart parameters.\n * @throws If the binary is missing, the snapshot does not exist, or the\n * command exits non-zero.\n */\nexport async function restoreDevnode(options: DevnodeRestoreOptions): Promise<void> {\n const devnodePath = options.devnodePath ?? 'aleo-devnode'\n const args = ['restore', '--snapshot', options.snapshot]\n if (options.storage) args.push('--storage', options.storage)\n if (options.restart) {\n args.push('--restart')\n if (options.privateKey) args.push('--private-key', options.privateKey)\n if (options.socketAddr) args.push('--socket-addr', options.socketAddr)\n if (options.verbosity !== undefined) args.push('--verbosity', String(options.verbosity))\n if (options.manualBlockCreation) args.push('--manual-block-creation')\n }\n await runDevnode(devnodePath, args)\n}\n\n// =============================================================================\n// Subprocess helpers\n// =============================================================================\n\nasync function tryShutdownExisting(socketAddr: string): Promise<void> {\n const baseUrl = `http://${socketAddr}`\n try {\n const res = await fetch(`${baseUrl}/testnet/shutdown`, {\n method: 'POST',\n signal: AbortSignal.timeout(2_000),\n })\n if (!res.ok) return\n // Wait up to 5s for the old process to stop responding\n const deadline = Date.now() + 5_000\n while (Date.now() < deadline) {\n try {\n await fetch(`${baseUrl}${HEALTH_CHECK_PATH}`, { signal: AbortSignal.timeout(500) })\n await new Promise<void>(r => setTimeout(r, 200))\n } catch {\n return // port no longer responding — old devnode is gone\n }\n }\n } catch {\n // nothing was listening on the port — proceed normally\n }\n}\n\nfunction runDevnode(devnodePath: string, args: string[]): Promise<void> {\n return new Promise((resolve, reject) => {\n const proc = spawn(devnodePath, args, { stdio: 'inherit' })\n proc.on('error', (err) =>\n reject(\n new Error(\n `Failed to run ${devnodePath}: ${err.message}. Ensure aleo-devnode is installed and on PATH.`,\n ),\n ),\n )\n proc.on('exit', (code) => {\n if (code === 0) resolve()\n else reject(new Error(`${devnodePath} ${args[0]} exited with code ${code}`))\n })\n })\n}\n\nasync function spawnDevnode(\n devnodePath: string,\n args: string[],\n socketAddr: string,\n readyTimeout: number,\n verbose: boolean = false,\n): Promise<DevnodeInstance> {\n const proc = spawn(devnodePath, args, {\n stdio: 'pipe',\n // MUST mirror DEVNODE_CONSENSUS_HEIGHTS in @provablehq/veil-aleo-sdk so the\n // transaction builder and the node agree on active consensus versions.\n env: { ...process.env, CONSENSUS_VERSION_HEIGHTS: process.env.CONSENSUS_VERSION_HEIGHTS || '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17' },\n })\n\n if (verbose) {\n const port = socketAddr.split(':')[1] ?? socketAddr.replace(/\\./g, '-')\n const logFile = join(process.cwd(), `devnode-${port}.log`)\n const logStream = createWriteStream(logFile, { flags: 'w' })\n proc.stdout?.pipe(logStream)\n proc.stderr?.pipe(logStream)\n console.log(`[devnode] logs → ${logFile}`)\n } else {\n proc.stdout?.resume()\n proc.stderr?.resume()\n }\n\n let startError: Error | undefined\n proc.on('error', (err) => {\n startError = new Error(\n `Failed to start ${devnodePath}: ${err.message}. Ensure aleo-devnode is installed and on PATH.`,\n )\n })\n proc.on('exit', (code, signal) => {\n if (signal === 'SIGTERM' || signal === 'SIGINT') return\n if (code !== 0 && code !== null) {\n startError = startError ?? new Error(`${devnodePath} exited unexpectedly with code ${code}`)\n }\n })\n\n try {\n await waitForReady(`http://${socketAddr}`, readyTimeout, () => startError)\n } catch (err) {\n proc.kill('SIGTERM')\n throw err\n }\n\n return {\n socketAddr,\n stop: () =>\n new Promise<void>((resolve) => {\n proc.kill('SIGTERM')\n proc.once('exit', () => resolve())\n }),\n }\n}\n\n// =============================================================================\n// Test client decorator\n// =============================================================================\n\n/**\n * Devnode management actions added to a test client by {@link devnodeActions}.\n *\n * Each action delegates to the standalone function of the same name and\n * spawns the `aleo-devnode` binary.\n *\n * @property startDevnode Starts a devnode; see {@link startDevnode}.\n * @property advanceDevnode Produces blocks on a running devnode; see {@link advanceDevnode}.\n * @property restoreDevnode Restores a ledger snapshot; see {@link restoreDevnode}.\n */\nexport type DevnodeClientActions = {\n startDevnode: (options?: DevnodeStartOptions) => Promise<DevnodeInstance>\n advanceDevnode: (options?: DevnodeAdvanceOptions) => Promise<void>\n restoreDevnode: (options: DevnodeRestoreOptions) => Promise<void>\n}\n\n/**\n * Adds devnode management actions to a test client via `.extend`.\n *\n * @example\n * ```ts\n * import { createTestClient, http } from '@provablehq/veil-core'\n * import { devnodeActions } from '@provablehq/veil-aleo-devnode'\n *\n * const client = createTestClient({ transport: http('http://127.0.0.1:3030', { network: 'testnet' }) })\n * .extend(devnodeActions)\n *\n * const devnode = await client.startDevnode()\n * await client.advanceDevnode({ numBlocks: 1 })\n * await devnode.stop()\n * ```\n */\nexport function devnodeActions(_client: Client): DevnodeClientActions {\n return {\n startDevnode: (options) => startDevnode(options),\n advanceDevnode: (options) => advanceDevnode(options),\n restoreDevnode: (options) => restoreDevnode(options),\n }\n}\n\nasync function waitForReady(\n baseUrl: string,\n timeout: number,\n getError: () => Error | undefined,\n): Promise<void> {\n const deadline = Date.now() + timeout\n const healthUrl = `${baseUrl}${HEALTH_CHECK_PATH}`\n\n while (Date.now() < deadline) {\n const err = getError()\n if (err) throw err\n\n try {\n const response = await fetch(healthUrl, {\n signal: AbortSignal.timeout(HEALTH_CHECK_REQUEST_TIMEOUT_MS),\n })\n if (response.ok) return\n } catch {\n // not ready yet — keep polling\n }\n\n await new Promise<void>((resolve) => setTimeout(resolve, HEALTH_CHECK_INTERVAL_MS))\n }\n\n throw new Error(\n `Devnode at ${baseUrl} did not become ready within ${timeout}ms. ` +\n 'Try increasing readyTimeout or check that aleo-devnode is installed and working.',\n )\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAId,IAAM,sBAAsB;AAG5B,IAAM,eAAe;AAE5B,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;AACjC,IAAM,kCAAkC;AA2HxC,eAAsB,aAAa,SAAyD;AAC1F,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,YAAY,SAAS,aAAa;AACxC,QAAM,eAAe,SAAS,gBAAgB;AAC9C,QAAM,cAAc,SAAS,eAAe;AAC5C,QAAM,UAAU,SAAS,WAAW;AAEpC,QAAM,oBAAoB,UAAU;AAEpC,QAAM,OAAO;AAAA,IACX;AAAA,IACA;AAAA,IAAiB;AAAA,IACjB;AAAA,IAAiB;AAAA,IACjB;AAAA,IAAe,OAAO,SAAS;AAAA,EACjC;AAEA,MAAI,SAAS,gBAAgB,OAAW,MAAK,KAAK,kBAAkB,QAAQ,WAAW;AACvF,MAAI,SAAS,gBAAgB,QAAW;AACtC,SAAK,KAAK,QAAQ,gBAAgB,KAAK,cAAc,aAAa,QAAQ,WAAW,EAAE;AAAA,EACzF;AACA,MAAI,SAAS,aAAc,MAAK,KAAK,iBAAiB;AAC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,UAAM,IAAI,QAAc,CAAC,YAAY,WAAW,SAAS,wBAAwB,CAAC;AAAA,EACpF;AAEA,QAAM,IAAI;AAAA,IACR,cAAc,OAAO,gCAAgC,OAAO;AAAA,EAE9D;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provablehq/veil-aleo-devnode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "TypeScript interface for orchestrating local Aleo test networks for testing & developing Aleo programs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@provablehq/veil-core": "
|
|
32
|
+
"@provablehq/veil-core": ">=0.6.0 <1.0.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsup",
|