/** * @typedef {Object} ValidateOptions * @property {boolean} [requirePrivate=false] reject public-only JWKs * @property {boolean} [requirePublic=false] reject secret-carrying JWKs */ /** * Assert that `jwk` conforms to the RFC 7517 shape and its per-kty * requirements. Returns the JWK unchanged when valid; throws * {@link JwkError} otherwise. * * @param {unknown} jwk * @param {ValidateOptions} [options] * @returns {object} the same JWK, narrowed to a validated shape */ declare function validate(jwk: unknown, options?: ValidateOptions): object; /** * Non-throwing variant. Returns `true` when the JWK passes * {@link validate}, `false` otherwise. Handy for JWKS filtering. * * @param {unknown} jwk * @param {ValidateOptions} [options] * @returns {boolean} */ declare function isValid(jwk: unknown, options?: ValidateOptions): boolean; type ValidateOptions = { /** * reject public-only JWKs */ requirePrivate?: boolean | undefined; /** * reject secret-carrying JWKs */ requirePublic?: boolean | undefined; }; export { isValid, validate }; export type { ValidateOptions };