function cryptoToMultikey
cryptoToMultikey(keys: CryptoKeyPair): Promise<Multikey>

Convert a Crypto Key pair to Multikeys. This function exports the cryptokeys into a JWK Key pair, and uses the JWKToMultikey function.

Works for ecdsa (both P-384 and P-256), and eddsa.

Note that, because WebCrypto methods are asynchronous, so is this function.

Parameters

Return Type

Promise<Multikey>

Throws

  • exceptions if something is incorrect in the incoming data
cryptoToMultikey(keys: CryptoKey): Promise<Multibase>

Parameters

Return Type

Promise<Multibase>

Usage

import { cryptoToMultikey } from ".";