/** * Validator / L1 node manager — DTOs shared by core, API, CLI, and web. * Non-custodial: these types never include private keys or seed phrases. */ export type ValidatorChainId = 'eth' | 'avax' | 'near' | 'ada' | 'btc' | 'cosmos' | 'sui' | 'aptos' | 'dot' | 'sol'; export type ValidatorNetworkKind = 'testnet' | 'mainnet'; export type ValidatorProfileId = 'minimal' | 'pruned' | 'validator-ready' | 'rpc'; export type ValidatorUpgradePolicy = 'manual' | 'notify' | 'auto-safe' | 'auto-all'; export type ValidatorDesiredState = 'stopped' | 'running'; export declare const VALIDATOR_RUNTIME_STATUSES: readonly ["unknown", "stopped", "created", "missing", "starting", "rpc_wait", "running", "syncing", "error"]; export type ValidatorRuntimeStatus = (typeof VALIDATOR_RUNTIME_STATUSES)[number]; /** Container is up (or coming up). Do not treat as stopped for auto-clear. */ export declare function isLiveValidatorStatus(code: string | undefined | null): boolean; export type ValidatorClientRole = 'el' | 'cl' | 'node'; export type ValidatorClientSpec = { id: string; role: ValidatorClientRole; image: string; tag: string; /** Shipped in the current v1 adapter set */ v1: boolean; }; export type ValidatorNetworkSpec = { id: string; kind: ValidatorNetworkKind; recommended?: boolean; v1: boolean; }; export type ValidatorChainSpec = { id: ValidatorChainId; title: string; v1: boolean; /** Extra disk / IOPS warning (e.g. Solana). */ heavy?: boolean; networks: ValidatorNetworkSpec[]; profiles: ValidatorProfileId[]; clients: ValidatorClientSpec[]; /** Conservative minimum free bytes: network → profile → bytes */ minFreeBytes: Record>>; }; export type CardanoProducerStatusDto = { attached: boolean; kesPresent: boolean; vrfPresent: boolean; opcertPresent: boolean; kesFp: string | null; vrfFp: string | null; opcertFp: string | null; attachedAt: string | null; }; export type ValidatorInstanceClient = { id: string; image: string; tag: string; }; export type ValidatorInstanceDto = { id: string; chain: ValidatorChainId; network: string; profile: ValidatorProfileId; slug: string; dataPath: string; rpcHost: string; upgradePolicy: ValidatorUpgradePolicy; desiredState: ValidatorDesiredState; createdAt: string; updatedAt: string; clients: Record; ports: Record; lastUpgrade?: { at: string; clientId: string; fromTag: string; toTag: string; result: 'applied' | 'rolled-back' | 'failed'; notes?: string[]; }; lastMithril?: { at: string; network: string; digest?: string; }; /** Cardano SPO hot keys on disk — never the key material. */ cardanoProducer?: CardanoProducerStatusDto; limits?: { memory?: string; cpus?: string; }; lastStatus?: { at: string; status: ValidatorRuntimeStatus; running: boolean; syncProgress: number | null; peers: number | null; diskUsedBytes: number | null; lastError: string | null; }; }; export type ValidatorSettingsDto = { autoClear: boolean; }; export type ValidatorOfficialVersionDto = { gitTag: string; dockerTag: string; prerelease: boolean; htmlUrl: string; }; export type ValidatorStaleInstanceDto = { id: string; tag: string; }; export type ValidatorSoftwareImageDto = { chain: string; clientId: string; role: string; image: string; tag: string; ref: string; present: boolean | null; size?: string | null; usedBy: string[]; registryHost: string; sourceGithub: string | null; changelogUrl: string | null; officialTag: string | null; officialDockerTag: string | null; officialAt: string | null; officialError: string | null; staleInstances: ValidatorStaleInstanceDto[]; }; export type ValidatorClientVersionsDto = { clientId: string; image: string; pin: string; latest: string | null; github: string | null; changelogUrl: string | null; registryHost: string; at: string | null; error: string | null; versions: ValidatorOfficialVersionDto[]; }; export type ValidatorSoftwareReportDto = { dockerInstalled: boolean; dockerRunning: boolean; composeAvailable: boolean; dockerVersion: string | null; composeVersion: string | null; images: ValidatorSoftwareImageDto[]; officialAt: string | null; executeEnabled: boolean; isRoot: boolean; }; export declare const DEFAULT_VALIDATOR_SETTINGS: ValidatorSettingsDto; export declare function isSafeValidatorLimitMemory(value: string): boolean; /** Heavy chains OOM the host when the wizard leaves memory unlimited. */ export declare function defaultValidatorMemoryLimit(chain: string): string | undefined; /** Parse compose-style `12g` / `512m` into bytes. */ export declare function parseValidatorMemoryBytes(value: string | undefined): number | undefined; /** Keep this much RAM for the host when a chain sets a memory cap. */ export declare const VALIDATOR_MEMORY_HEADROOM_BYTES: number; export declare function isSafeValidatorLimitCpus(value: string): boolean; /** Absolute host path for chain data. Rejects traversal and system prefixes. */ export declare function isSafeValidatorDataPath(value: string): boolean; export type ValidatorNetIoDto = { id: string; rxBytes: number | null; txBytes: number | null; rxRateBps: number | null; txRateBps: number | null; }; export type ValidatorSummaryDto = { id: string; status: ValidatorRuntimeStatus; running: boolean; syncProgress: number | null; peers: number | null; diskUsedBytes: number | null; lastError: string | null; upgrade: { clientId: string; currentTag: string; nextTag: string; breaking: boolean; changelogUrl?: string; } | null; rxBytes: number | null; txBytes: number | null; rxRateBps: number | null; txRateBps: number | null; }; export type ValidatorDiskTone = 'ok' | 'warn' | 'danger'; export type ValidatorDiskInstance = { id: string; dataPath: string; usedBytes: number; }; export type ValidatorDiskLeftover = { name: string; path: string; usedBytes: number; }; export type ValidatorDiskReport = { rootPath: string; /** du of the validators root (not the whole filesystem). */ usedBytes: number | null; leftoverBytes: number; leftovers: ValidatorDiskLeftover[]; /** Filesystem that holds rootPath — used for create-gate free space. */ fsUsedBytes: number | null; fsAvailBytes: number | null; fsTotalBytes: number | null; fsUsePct: number | null; /** Alias of fsAvailBytes (wizard / KPI free space). */ availBytes: number | null; /** Host MemAvailable from /proc/meminfo (create-gate for capped chains). */ memAvailableBytes: number | null; totalBytes: number | null; usePct: number | null; tone: ValidatorDiskTone; instances: ValidatorDiskInstance[]; notes: string[]; }; export declare const VALIDATOR_DISK_WARN_PCT = 70; export declare const VALIDATOR_DISK_DANGER_PCT = 85; export declare const VALIDATOR_CHAIN_IDS: readonly ValidatorChainId[]; /** Brand names — never machine-translate. */ export declare const VALIDATOR_CHAIN_LABEL: Record; /** Network proper nouns — never machine-translate. Generic kinds (mainnet/testnet) stay i18n. */ export declare const VALIDATOR_NETWORK_PROPER: Record; /** Display name for a (chain, network) pair. Generic `testnet` includes the chain. */ export declare function validatorNetworkLabelFor(chain: string, network: string): string | null; export declare function validatorChainLabel(id: string, title?: string | null): string; export declare function validatorNetworkLabel(id: string): string | null; export declare const VALIDATOR_PROFILE_IDS: readonly ValidatorProfileId[]; export declare const VALIDATOR_UPGRADE_POLICIES: readonly ValidatorUpgradePolicy[]; export declare function isValidatorChainId(value: string): value is ValidatorChainId; export declare function isValidatorProfileId(value: string): value is ValidatorProfileId; export declare function isValidatorUpgradePolicy(value: string): value is ValidatorUpgradePolicy; export declare function isValidatorInstanceId(value: string): boolean; export declare function validatorDiskTone(usePct: number | null | undefined): ValidatorDiskTone; export declare function defaultUpgradePolicyForNetworkKind(kind: ValidatorNetworkKind): ValidatorUpgradePolicy; //# sourceMappingURL=validators.d.ts.map