@sphereon/did-resolver-key
Version:
Sphereon did:key resolver with BBS+/BLS and EBSI support.
23 lines • 934 B
TypeScript
import type { ByteView } from 'multiformats/codecs/interface';
import type { JsonWebKey } from 'did-resolver';
export declare const name = "jwk_jcs-pub";
export declare const code = 60241;
/**
* Encodes a JWK into a Uint8Array. Only the required JWK members are encoded.
*
* @see https://www.rfc-editor.org/rfc/rfc7518#section-6
* @see https://www.rfc-editor.org/rfc/rfc8037#section-2
* @see https://github.com/panva/jose/blob/3b8aa47b92d07a711bf5c3125276cc9a011794a4/src/jwk/thumbprint.ts#L37
*
* @param jwk - JSON Web Key.
* @returns Uint8Array-encoded JWK.
*/
export declare function encode(jwk: unknown): Uint8Array;
/**
* Decodes an array of bytes into a JWK. Throws an error if the JWK is not valid.
*
* @param bytes - The array of bytes to decode.
* @returns The corresponding JSON Web Key.
*/
export declare function decode(bytes: ByteView<JsonWebKey>): JsonWebKey;
//# sourceMappingURL=JwkJcsBlockCodec.d.ts.map