Export an existing key as a PEM encrypted PKCS #8 string.
await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
Import a new key from a PEM encoded PKCS #8 string.
await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123')
Create a key in the keychain.
Example