wallet/walletEccKeyPairsGenerate.js
/**
 * Main program function that calls the other functions
 */
Main program function that calls the other functions
Main program function that calls the other functions
async function main() {
  try {
    let aliceCert = writeKeysToFile(await createCertificate({ name: 'Alice', organization: 'Guarani', email: 'alice@guarani.blockchain.biz', type: userType.simple }));
    let kateCert = writeKeysToFile(await createCertificate({ name: 'Kate', organization: 'Guarani', email: 'kate@guarani.blockchain.biz', type: userType.simple }));
    let lisaCert = writeKeysToFile(await createCertificate({ name: 'Lisa', organization: 'Guarani', email: 'lisa@guarani.blockchain.biz', type: userType.simple }));
    let validatorCert = writeKeysToFile(await createCertificate({ name: 'Validator', organization: 'Guarani', email: 'validator@guarani.blockchain.biz', type: userType.validator }));
  } catch (err) {
    console.error(err);
  }
  try {
    let bobCert = writeKeysToFile(await createCertificate({ name: 'Bob', organization: 'Ticcuna', email: 'bob@ticcuna.blockchain.biz', type: userType.simple }));
    let suzanCert = writeKeysToFile(await createCertificate({ name: 'Suzan', organization: 'Ticcuna', email: 'suzan@ticcuna.blockchain.biz', type: userType.simple }));
    let tedCert = writeKeysToFile(await createCertificate({ name: 'Ted', organization: 'Ticcuna', email: 'ted@ticcuna.blockchain.biz', type: userType.simple }));
    let validatorCert = writeKeysToFile(await createCertificate({ name: 'Validator', organization: 'Ticcuna', email: 'validator@ticcuna.blockchain.biz', type: userType.validator }));
  } catch (err) {
    console.error(err);
  }
  try {
    let bobCert = writeKeysToFile(await createCertificate({ name: 'Chan', organization: 'Xavante', email: 'chan@xavante.blockchain.biz', type: userType.simple }));
    let suzanCert = writeKeysToFile(await createCertificate({ name: 'Fred', organization: 'Xavante', email: 'fred@xavante.blockchain.biz', type: userType.simple }));
    let tedCert = writeKeysToFile(await createCertificate({ name: 'Nancy', organization: 'Xavante', email: 'nancy@xavante.blockchain.biz', type: userType.simple }));
    let validatorCert = writeKeysToFile(await createCertificate({ name: 'Validator', organization: 'Xavante', email: 'validator@xavante.blockchain.biz', type: userType.validator }));
  } catch (err) {
    console.error(err);
  }
  return;
}
async function main ( ) { try { let aliceCert = writeKeysToFile ( await createCertificate ( { name : 'Alice' , organization : 'Guarani' , email : 'alice@guarani.blockchain.biz' , type : userType . simple } ) ) ; let kateCert = writeKeysToFile ( await createCertificate ( { name : 'Kate' , organization : 'Guarani' , email : 'kate@guarani.blockchain.biz' , type : userType . simple } ) ) ; let lisaCert = writeKeysToFile ( await createCertificate ( { name : 'Lisa' , organization : 'Guarani' , email : 'lisa@guarani.blockchain.biz' , type : userType . simple } ) ) ; let validatorCert = writeKeysToFile ( await createCertificate ( { name : 'Validator' , organization : 'Guarani' , email : 'validator@guarani.blockchain.biz' , type : userType . validator } ) ) ; } catch ( err ) { console . error ( err ) ; } try { let bobCert = writeKeysToFile ( await createCertificate ( { name : 'Bob' , organization : 'Ticcuna' , email : 'bob@ticcuna.blockchain.biz' , type : userType . simple } ) ) ; let suzanCert = writeKeysToFile ( await createCertificate ( { name : 'Suzan' , organization : 'Ticcuna' , email : 'suzan@ticcuna.blockchain.biz' , type : userType . simple } ) ) ; let tedCert = writeKeysToFile ( await createCertificate ( { name : 'Ted' , organization : 'Ticcuna' , email : 'ted@ticcuna.blockchain.biz' , type : userType . simple } ) ) ; let validatorCert = writeKeysToFile ( await createCertificate ( { name : 'Validator' , organization : 'Ticcuna' , email : 'validator@ticcuna.blockchain.biz' , type : userType . validator } ) ) ; } catch ( err ) { console . error ( err ) ; } try { let bobCert = writeKeysToFile ( await createCertificate ( { name : 'Chan' , organization : 'Xavante' , email : 'chan@xavante.blockchain.biz' , type : userType . simple } ) ) ; let suzanCert = writeKeysToFile ( await createCertificate ( { name : 'Fred' , organization : 'Xavante' , email : 'fred@xavante.blockchain.biz' , type : userType . simple } ) ) ; let tedCert = writeKeysToFile ( await createCertificate ( { name : 'Nancy' , organization : 'Xavante' , email : 'nancy@xavante.blockchain.biz' , type : userType . simple } ) ) ; let validatorCert = writeKeysToFile ( await createCertificate ( { name : 'Validator' , organization : 'Xavante' , email : 'validator@xavante.blockchain.biz' , type : userType . validator } ) ) ; } catch ( err ) { console . error ( err ) ; } return ; }
Main program function that calls the other functions
Main program function that calls the other functions