I have the following code and I’m trying to generate public-private key:
const openpgp = require("openpgp")
const generateKeyPair = async () => {
const { publicKeyArmored } = await openpgp.generateKey({
userIds: [
{
name: 'Jon Smith', email: '[email protected]',
comment: 'This key is for public sharing'
}
],
curve: 'ed25519',
passphrase: 'super long and hard to guess secret',
});
console.log(publicKeyArmored);
}
But I’m getting this error. Any idea how to solve it:
(node:17380) UnhandledPromiseRejectionWarning: Error: Unknown option: userIds