Matias Alejo Garcia
10 years ago
3 changed files with 60 additions and 1 deletions
@ -0,0 +1,25 @@ |
|||
#!/usr/bin/env node |
|||
|
|||
var _ = require('lodash'); |
|||
var program = require('commander'); |
|||
var ClientLib = 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] walletname') |
|||
.description('Creates a wallet on the remove server given the local information') |
|||
.parse(process.argv); |
|||
|
|||
var args = program.args; |
|||
if (!args[0]) |
|||
program.help(); |
|||
|
|||
var walletName = args[0]; |
|||
var client = utils.getClient(program); |
|||
client.reCreateWallet(walletName, function(err) { |
|||
utils.die(err); |
|||
console.log(' * Wallet Created.'); |
|||
}); |
Loading…
Reference in new issue