#!/usr/bin/env node var program = require('commander'); var Client = require('../lib/client'); var utils = require('./cli-utils'); program = utils.configureCommander(program); program .usage('[options] [copayerName]') .option('-n, --nopasswd [level]', 'Set access for no password usage: none(default), readonly, readwrite, full', 'none') .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 || ''); });