export async function getOpenpgp ( ) { return import ( 'openpgp' ) ; } export async function generateNewKeys ( ) { const openpgp = await getOpenpgp ( ) ; const { privateKeyArmored , publicKeyArmored , revocationCertificate } = await openpgp . generateKey ( { userIds : [ { email : 'inxt@inxt.com' } ] , curve : 'ed25519' , } ) ; return { privateKeyArmored , publicKeyArmored : Buffer . from ( publicKeyArmored ) . toString ( 'base64' ) , revocationCertificate : Buffer . from ( revocationCertificate ) . toString ( 'base64' ) , } ; }