#!/usr/bin/env node var _ = require('lodash'); var program = require('commander'); var Client = require('../lib/client'); var utils = require('./cli-utils'); program = utils.configureCommander(program); program .option('-t, --testnet', 'Create a Testnet Extended Private Key') .parse(process.argv); var args = program.args; var client = utils.getClient(program); var network = program.testnet ? 'testnet' : 'livenet'; client.generateKey(network, function(err) { utils.die(err); console.log(' * ' + _.capitalize(network) + ' Extended Private Key Created.'); });