You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
574 B
20 lines
574 B
#!/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.');
|
|
});
|
|
|