import type { SecretStore } from "./types.js";
export interface MachineIdentity {
    hostname: string;
    username: string;
}
export interface EncryptedFileStoreFileSystem {
    readFile(path: string, encoding: BufferEncoding): Promise<string>;
    writeFile(path: string, data: string | NodeJS.ArrayBufferView, options?: {
        encoding?: BufferEncoding;
        flag?: string;
        mode?: number;
    }): Promise<void>;
    mkdir(path: string, options?: {
        recursive?: boolean;
    }): Promise<void | string | undefined>;
    rename(oldPath: string, newPath: string): Promise<void>;
    lstat(path: string): Promise<{
        isSymbolicLink(): boolean;
    }>;
    unlink(path: string): Promise<void>;
    chmod(path: string, mode: number): Promise<void>;
}
export interface EncryptedFileStoreInput {
    fs?: EncryptedFileStoreFileSystem;
    filePath?: string;
    salt: string;
    defaultDirectory?: string;
    defaultFileName?: string;
    getMachineIdentity?: () => MachineIdentity | Promise<MachineIdentity>;
    getHomeDirectory?: () => string;
    getRandomBytes?: (size: number) => Buffer;
}
export declare class EncryptedFileStore implements SecretStore {
    private readonly fs;
    private readonly filePath;
    private readonly symbolicLinkCheckStartPath;
    private readonly salt;
    private readonly getMachineIdentity;
    private readonly getRandomBytes;
    private keyPromise;
    constructor(input: EncryptedFileStoreInput);
    get(): Promise<string | null>;
    set(value: string): Promise<void>;
    delete(): Promise<void>;
    private assertCredentialPathHasNoSymbolicLinks;
    private getEncryptionKey;
}
