Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.
• AnyJWK = JWK_EC_Private | JWK_EC_Public | JWK_RSA_Private | JWK_RSA_Public | JWK_OKP_Private | JWK_OKP_Public | JWK_AKP_Private | JWK_AKP_Public | JWK_oct
Discriminated union of the JSON Web Key shapes supported by this module. Unlike JWK, each member requires and fixes the "kty" (Key Type) Parameter to its key type so that the union can be narrowed on it.
let jwk!: jose.AnyJWK
if (jwk.kty === 'EC') {
console.log(jwk.crv, jwk.x, jwk.y)
}