jwk-multibase-key-converter
v1.0.0
Published
JWK Multibase Key Converter =================
Downloads
7
Readme
JWK Multibase Key Converter
Information
This library is a tool to assist in the conversion of did:key method keys to JWK, and vice versa. It utilizes Multiformats and the NodeJS crypto module to aid in these conversions and is built for JWKs made using the JOSE library (but should work with JWKs that meet the standard). All algorithm strings follow the JOSE specified names that can be found here.
For more information on the did:key spec, please read the current unofficial draft here.
Currently, the only supported curves are as follows:
- secp256k1 (specified as the
ES256K
algorithm) - nistp384 (specified as
ES384
algorithm)
Requirements
- NodeJS v16+
- NPM v8+
Installation
You can install this library via NPM :
npm i jwk-multibase-key-converter
How It Works
- Public JWK Generation
- Multibase Conversion
- did:key Conversion
- Public JWK Conversion
- Algorithm-specific Functions
Contribute
Please open a pull request.
License
This software is release under MIT license.