import { VersionedKeyPair, VersionedKey } from '../types/index.js'; /** * Read all indexes from a file. * * @param type - The type of the index. * @param abspath - The path to read the indexes from. * @param index_name - The name of the index to read. * @returns The indexes. * @since 1.0.0 * @author Caique Araujo */ export declare function readAll(type: 'keypairs' | 'secrets', abspath: string, index_name: string): Promise>; /** * Read a key from an index. * * @param type - The type of the index. * @param abspath - The path to read the index from. * @param index_name - The name of the index to read. * @param version - The version of the key to read. * @returns The key. * @since 1.0.0 * @author Caique Araujo */ export declare function readKey(type: 'keypairs' | 'secrets', abspath: string, index_name: string, version: number): Promise; /** * Remove a key from an index. * * @param type - The type of the index. * @param abspath - The path to remove the key from. * @param index_name - The name of the index to remove the key from. * @param version - The version of the key to remove. * @returns The key. * @since 1.0.0 * @author Caique Araujo */ export declare function remove(type: 'keypairs' | 'secrets', abspath: string, index_name: string, version: number): Promise; /** * Check if a version exists in an index. * * @param indexes - The indexes to check. * @param version - The version to check. * @returns True if the version exists, false otherwise. * @since 1.0.0 * @author Caique Araujo */ export declare function versionExists(indexes: Array<{ version: number; }>, version: number): boolean; /** * Write an index to a file. * * @param type - The type of the index. * @param abspath - The path to write the index to. * @param index_name - The name of the index to write. * @param indexes - The indexes to write. * @returns The index. * @since 1.0.0 * @author Caique Araujo */ export declare function write(type: 'keypairs' | 'secrets', abspath: string, index_name: string, indexes?: Array): Promise;