/** * Config and identity persistence for the Sideband CLI. * * Config directory: $SIDEBAND_HOME or ~/.sideband/ * config.json — { apiKey: string } * identity.json — { type: "ed25519", publicKey: "", privateKey: "" } * * All file writes are atomic (write to .tmp, rename) with 0o600 permissions * so secrets are never world-readable, even on a partial write. */ import type { IdentityKeyPair } from "@sideband/secure-relay"; export interface Config { apiKey?: string; } /** Resolved config directory (SIDEBAND_HOME or ~/.sideband). */ export declare function getConfigDir(): string; /** * Resolve API key with priority: flag > SIDEBAND_API_KEY env > config file. * Returns undefined if none found. */ export declare function resolveApiKey(fromFlag: string | undefined, configDir: string): Promise; /** Read config.json. Returns null if the file does not exist. */ export declare function loadConfig(configDir: string): Promise; /** Write config.json atomically with 0o600 permissions. */ export declare function saveConfig(configDir: string, config: Config): Promise; /** Load identity.json; generate and save if missing. */ export declare function loadIdentityKeyPair(configDir: string): Promise; //# sourceMappingURL=config.d.ts.map