wallet/walletEccKeyPairsGenerate.js
/**
 * Create a certificate that integrates a wallet and is customized for use by OpenPGP
 * @param {JSON} protoWallet Initial information for a specific user to create their wallet
 */
Create a certificate that integrates a wallet and is customized for use by OpenPGP
@param {JSON} protoWallet Initial information for a specific user to create their wallet
Create a certificate that integrates a wallet and is customized for use by OpenPGP @param { JSON } protoWallet Initial information for a specific user to create their wallet
async function createCertificate(protoWallet) {
  let password = generatePassword();
  let eventDate = new Date().toISOString;
  let pName = protoWallet.name;
  let pOrganization = protoWallet.organization;
  let pEmail = protoWallet.email;
  let pType = protoWallet.type;
  let pMsp = pOrganization + 'MSP';
  let certificate = {
    type: typeOfCertificate,
    version: genVersion,
    userId: {
      name: pName,
      organization: pOrganization,
      email: pEmail,
      MSP: pMsp,
      X509: '',
      type: pType
    },
    passphrase: password,
    keys: {
      created: eventDate,
      publicArmored: undefined,
      privateArmored: undefined,
      revocationCertificate: undefined
    }
  };
  return certificate;
}
async function createCertificate ( protoWallet ) { let password = generatePassword ( ) ; let eventDate = new Date ( ) . toISOString ; let pName = protoWallet . name ; let pOrganization = protoWallet . organization ; let pEmail = protoWallet . email ; let pType = protoWallet . type ; let pMsp = pOrganization + 'MSP' ; let certificate = { type : typeOfCertificate , version : genVersion , userId : { name : pName , organization : pOrganization , email : pEmail , MSP : pMsp , X509 : '' , type : pType } , passphrase : password , keys : { created : eventDate , publicArmored : undefined , privateArmored : undefined , revocationCertificate : undefined } } ; return certificate ; }
Create a certificate that integrates a wallet and is customized for use by OpenPGP
 @param {JSON} protoWallet Initial information for a specific user to create their wallet
Create a certificate that integrates a wallet and is customized for use by OpenPGP @param { JSON } protoWallet Initial information for a specific user to create their wallet