import { Signer } from './signer'; /** * Options used when creating a new HSM signer implementation. */ export interface HSMSignerOptions { /** * The label associated with the token for the slot. */ label: string; /** * The pin for the slot identified by the label. */ pin: string; /** * Identifier. The CKA_ID assigned to the HSM object. */ identifier: string | Buffer; /** * Optional user type for the HSM. If not specified it defaults to CKU_USER. */ userType?: number; } /** * HSM signer implementation and accompanying {@link close} function to free * resources after use. */ export interface HSMSigner { /** * HSM signer implementation. */ signer: Signer; /** * Close the HSM session when the signer is no longer needed. */ close: () => void; } /** * Factory to create HSM Signers. */ export interface HSMSignerFactory { /** * Create a new HSM signing implementation based on provided HSM options. * * This returns an object with two properties: * 1. the signer function. * 2. a close function to be called when the signer is no longer required. * * @param hsmSignerOptions - The HSM signer options. * @returns an HSM Signer implementation. */ newSigner(hsmSignerOptions: HSMSignerOptions): HSMSigner; /** * Dispose of the factory when it, and any HSM signers created by it, are no longer required. */ dispose(): void; } export declare class HSMSignerFactoryImpl implements HSMSignerFactory { #private; constructor(library: string); dispose(): void; newSigner(hsmSignerOptions: Readonly): HSMSigner; } //# sourceMappingURL=hsmsigner.d.ts.map