import { DeploymentKeyRepository, type DeploymentKey } from '@n8n/db';
import { Cipher, type CipherAlgorithm } from 'n8n-core';
type KeyInfo = {
    id: string;
    value: string;
    algorithm: string;
};
export declare class KeyManagerService {
    private readonly deploymentKeyRepository;
    private readonly cipher;
    constructor(deploymentKeyRepository: DeploymentKeyRepository, cipher: Cipher);
    getActiveKey(): Promise<KeyInfo>;
    getKeyById(id: string): Promise<KeyInfo | null>;
    getLegacyKey(): Promise<KeyInfo>;
    bootstrapLegacyKey(value: string): Promise<void>;
    listKeys(type?: string): Promise<DeploymentKey[]>;
    rotateKey(): Promise<DeploymentKey>;
    addKey(plaintextValue: string, algorithm: CipherAlgorithm, setAsActive?: boolean): Promise<DeploymentKey>;
    setActiveKey(id: string): Promise<void>;
    markInactive(id: string): Promise<void>;
}
export {};
