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
569 B
27 lines
569 B
10 years ago
|
#!/usr/bin/env node
|
||
|
|
||
|
var program = require('commander');
|
||
|
var cli = require('../lib/clilib.js');
|
||
|
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;
|
||
|
|
||
|
cli.setFilename(program.config);
|
||
|
|
||
|
cli.joinWallet(secret, copayerName, function(err, xx) {
|
||
|
common.die(err);
|
||
|
console.log(' * Wallet Joined.', xx);
|
||
|
});
|
||
|
|