bitcore-wallet-service/bit-wallet/bit-address

20 lines
558 B
Plaintext
Raw Normal View History

2015-02-13 07:55:07 -08:00
#!/usr/bin/env node
var program = require('commander');
2015-02-15 06:33:04 -08:00
var Client = require('../lib/client');
2015-02-15 08:14:36 -08:00
var utils = require('./cli-utils');
2015-02-13 07:55:07 -08:00
program
.version('0.0.1')
2015-02-13 11:57:28 -08:00
.option('-c, --config [file]', 'Wallet config filename')
2015-02-17 15:31:03 -08:00
.option('-h, --host [host]', 'Bitcore Wallet Service URL (eg: http://localhost:3001/copay/api')
2015-02-13 11:57:28 -08:00
.option('-v, --verbose', 'be verbose')
2015-02-13 07:55:07 -08:00
.parse(process.argv);
var args = program.args;
2015-02-15 08:14:36 -08:00
var client = utils.getClient(program);
client.createAddress(function(err, x) {
utils.die(err);
2015-02-13 07:55:07 -08:00
console.log('* New Address %s ', x.address);
});