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.
27 lines
602 B
27 lines
602 B
#!/usr/bin/env node
|
|
|
|
var program = require('commander');
|
|
var ClientLib = require('../lib/client');
|
|
var common = require('./common');
|
|
|
|
program
|
|
.version('0.0.1')
|
|
.option('-c, --config [file]', 'Wallet config filename')
|
|
.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 cli = new ClientLib({
|
|
filename: program.config
|
|
});
|
|
|
|
cli.joinWallet(secret, copayerName, function(err, xx) {
|
|
common.die(err);
|
|
console.log(' * Wallet Joined.', xx || '');
|
|
});
|
|
|