import { Command } from 'commander'; import { type AutoUpdateConfig } from '../config.js'; /** * Decide whether `dkg init` is SWITCHING an existing node to a different * network (vs a fresh install or a same-network re-init). A known prior * effective network that differs from the selection counts as a switch: * - fresh node (no networkConfig) → not a switch (no chain to lose) * - legacy node with a known chain → compare its inferred network * - node with networkConfig === selected → not a switch (preserve overrides) * - node with networkConfig !== selected → SWITCH (drop the stale chain) * * On a switch the caller derives the chain block from the newly-selected * network instead of the stale existing one (prevents a new-network/old-chain * Frankenstein config); otherwise it preserves the existing chain field-merge. * Pure + exported so the decision is unit-testable. */ export declare function isInitNetworkSwitch(existingNetwork: string | undefined, selectedNetwork: string): boolean; /** * Pure builder for the `autoUpdate` block `dkg init` persists. Extracted from * the interactive wizard so it is unit-testable — the decline path (must write * `{ enabled: false }`, NOT fall through to the enabled network default) and * source-mode field boundaries across reruns have each regressed before. The * wizard gathers `answers` interactively and passes them in. */ export declare function buildInitAutoUpdate(opts: { enableAutoUpdate: boolean; existingAutoUpdate: AutoUpdateConfig | undefined; networkAutoUpdate?: { allowPrerelease?: boolean; checkIntervalMinutes?: number; }; projRepo: string; projDefaultBranch: string; answers?: { allowPrerelease: boolean; interval: number; }; }): AutoUpdateConfig; export declare function registerInitCommand(program: Command): void; //# sourceMappingURL=init.d.ts.map