/**
 * PKCS#11 manager — wraps pkcs11js to provide high-level token operations.
 *
 * Maps to the same operations as sign-docs/lib/services/pkcs11/pkcs11_manager.dart
 * using the pkcs11js Node.js native addon.
 */
import type { HardwareToken, TokenCertificate, PinVerificationResult } from './types';
export declare class Pkcs11Manager {
    private pkcs11;
    private sessions;
    private _currentLibraryPath;
    get isInitialized(): boolean;
    get currentLibraryPath(): string | null;
    /** Load a PKCS#11 middleware library. */
    loadMiddleware(libraryPath: string): void;
    /** Unload the current middleware. */
    unloadMiddleware(): void;
    /** Get list of slots with tokens present. */
    getSlotList(tokenPresent?: boolean): Buffer[];
    /** Get token info for a slot. */
    getTokenInfo(slotId: Buffer, middlewareName: string): HardwareToken;
    /** Open a session on a slot. */
    openSession(slotId: Buffer): Buffer;
    /** Login with PIN. */
    login(slotId: number, pin: string): PinVerificationResult;
    /** Logout from a session. */
    logout(slotId: number): void;
    /** Close a session. */
    closeSession(slotId: number): void;
    /** Find all certificates on a token. */
    findCertificates(slotId: number): TokenCertificate[];
    /** Find the private key handle matching a certificate ID. */
    findPrivateKeyForCertificate(slotId: number, certId: string): Buffer | null;
    /** Sign data using a private key. */
    sign(slotId: number, keyHandle: Buffer, data: Buffer, mechanism: number): Buffer;
    /** Convert algorithm name to PKCS#11 mechanism constant. */
    algorithmToMechanism(algorithm: string): number;
}
