• 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

    • keys: CryptoKeyPair

    Returns Promise<Multikey>

    • exceptions if something is incorrect in the incoming data
  • Overloaded version of the conversion function for a single (public) key in JWK, returning the generated Multikey.

    Parameters

    • keys: CryptoKey

    Returns Promise<Multibase>

    • exceptions if something is incorrect in the incoming data