/** * Create a local key set from one or more key specifications. * * @param {KeySpec[]} specs * @param {LocalKeySetOptions} [options] * @returns {Promise} */ declare function createLocalKeySet(specs: KeySpec[], options?: LocalKeySetOptions): Promise; type KeySpec = { /** * algorithm identifier (e.g. 'ES256', 'EdDSA', 'RS256') */ alg: string; /** * JWK use parameter */ use?: string | undefined; /** * explicit kid — auto-generated if omitted */ kid?: string | undefined; /** * EC/OKP curve (default per kty) */ curve?: string | undefined; /** * RSA modulus length (default 2048) */ modulusLength?: number | undefined; }; type LocalKeySetOptions = { /** * how long a rotated key stays in the set for verification */ gracePeriod?: string | number | undefined; }; type KeyEntry = { kid: string; alg: string; privateJwk: Record; publicJwk: Record; createdAt: number; retiredAt?: number | undefined; }; type RotateOptions = { /** * algorithm of the key to rotate */ alg: string; /** * explicit kid for the new key */ kid?: string | undefined; /** * curve override for EC/OKP */ curve?: string | undefined; /** * RSA modulus override */ modulusLength?: number | undefined; }; type HandlerOptions = { /** * Cache-Control header value */ cacheControl?: string | undefined; }; type LocalKeySet = { toJSON: () => { keys: Record[]; }; getSigningKey: (alg?: string) => KeyEntry | null; kids: string[]; size: number; rotate: (options: RotateOptions) => Promise; addKey: (privateJwk: Record) => void; handler: (options?: HandlerOptions) => (req: unknown, res: unknown) => void; resolve: (header: { kid: string; alg?: string; }) => Promise; }; export { createLocalKeySet }; export type { HandlerOptions, KeyEntry, KeySpec, LocalKeySet, LocalKeySetOptions, RotateOptions };