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.
 
 

25 lines
683 B

#!/usr/bin/env node
var program = require('commander');
var Client = require('../lib/client');
var utils = require('./cli-utils');
program
.version('0.0.1')
.option('-c, --config [file]', 'Wallet config filename')
.option('-h, --host [host]', 'Bitcore Wallet Service URL (eg: http://localhost:3001/copay/api')
.usage('[options] <secret> [copayerName]')
.parse(process.argv);
var args = program.args;
if (!args[0])
program.help();
var secret = args[0];
var copayerName = args[1] || process.env.USER;
var client = utils.getClient(program);
client.joinWallet(secret, copayerName, function(err, xx) {
utils.die(err);
console.log(' * Wallet Joined.', xx || '');
});