@tanglelabs/resolver-did-key
Version:
Fork of Sphereon did:key resolver with BBS+/BLS and EBSI support.
24 lines (23 loc) • 954 B
TypeScript
import { base64urlPoint } from 'nist-weierstrauss';
import { KeyToDidDocArgs } from '../types';
/**
* Constructs the document based on the method key
*/
export declare function keyToDidDoc({ pubKeyBytes, fingerprint }: KeyToDidDocArgs): any;
/**
*
* @param pubKeyBytes - public key as uncompressed byte array with no prefix (raw key),
* uncompressed with 0x04 prefix, or compressed with 0x02 prefix if even and 0x03 prefix if odd.
* @returns point x,y with coordinates as multibase encoded base64urls
*
* See the the did:key specification: https://w3c-ccg.github.io/did-method-key/#p-256.
* At present only raw p-256 keys are covered in the specification.
* @throws TypeError: input cannot be null or undefined.
* @throws Error: Unexpected pubKeyBytes
* @internal
*/
export declare function pubKeyBytesToXY(pubKeyBytes: Uint8Array): base64urlPoint;
declare const _default: {
keyToDidDoc: typeof keyToDidDoc;
};
export default _default;