multikeyToCrypto(keys: Multikey): Promise<CryptoKeyPair>
Convert a multikey pair to Web Crypto. This function decodes the multikey data into JWK using the
multikeyToJWK
function, and imports the resulting keys into Web Crypto.
Works for ecdsa
(both P-384
and P-256
), and eddsa
.
Note that, because WebCrypto methods are asynchronous, so is this function.
keys: Multikey
Promise<CryptoKeyPair>