/**
 * High-level key management API.
 *
 * Provides CRUD operations over the drawlatch key directory structure
 * so that callboard (and other consumers) can manage keys programmatically
 * without touching the filesystem directly.
 *
 * Key layout:
 *   keys/callers/<alias>/  — Caller keypairs (one per alias)
 *   keys/server/           — Server keypair (single, flat)
 */
import { type SerializedPublicKeys } from './keys.js';
export interface CreateCallerResult {
    publicKeys: SerializedPublicKeys;
    fingerprint: string;
}
interface KeyManagerOpts {
    configDir?: string;
}
/**
 * Create a new caller identity (Ed25519 + X25519 keypairs).
 * Saves under `keys/callers/<alias>/`.
 * Throws if the alias already exists.
 */
export declare function createCaller(alias: string, opts?: KeyManagerOpts): CreateCallerResult;
/**
 * Export public keys for a caller identity.
 * Reads from `keys/callers/<alias>/`.
 */
export declare function exportCallerPublicKeys(alias: string, opts?: KeyManagerOpts): SerializedPublicKeys;
/**
 * Export public keys for the server.
 * Reads from `keys/server/`.
 */
export declare function exportServerPublicKeys(opts?: KeyManagerOpts): SerializedPublicKeys;
/**
 * Import a caller's public keys. Saves under `keys/callers/<alias>/`.
 * Used by the server to store received caller public keys (e.g., via sync).
 */
export declare function importCallerPublicKeys(alias: string, keys: SerializedPublicKeys, opts?: KeyManagerOpts): void;
/**
 * Save server public keys. Writes to `keys/server/`.
 * Used by callboard to store the remote server's public keys (e.g., via sync).
 */
export declare function saveServerPublicKeys(keys: SerializedPublicKeys, opts?: KeyManagerOpts): void;
/**
 * List all caller aliases (scans `keys/callers/`).
 */
export declare function listCallers(opts?: KeyManagerOpts): string[];
/**
 * Check if a caller identity exists (has at least public keys).
 */
export declare function callerExists(alias: string, opts?: KeyManagerOpts): boolean;
/**
 * Check if server keys exist.
 */
export declare function serverExists(opts?: KeyManagerOpts): boolean;
/**
 * Get the fingerprint of a caller's keys.
 */
export declare function callerFingerprint(alias: string, opts?: KeyManagerOpts): string;
/**
 * Get the fingerprint of the server's keys.
 */
export declare function serverFingerprint(opts?: KeyManagerOpts): string;
export {};
//# sourceMappingURL=key-manager.d.ts.map