bitcore-wallet-service/bit-wallet/bit-status

25 lines
608 B
Plaintext
Raw Normal View History

2015-02-12 18:57:16 -08:00
#!/usr/bin/env node
var program = require('commander');
2015-02-12 19:23:59 -08:00
var CliLib = require('../lib/clilib.js');
2015-02-12 18:57:16 -08:00
var common = require('./common');
program
.version('0.0.1')
.option('-c,--config [file]', 'Wallet config filename')
2015-02-13 05:30:58 -08:00
.option('-v,--verbose', 'be verbose')
2015-02-12 18:57:16 -08:00
.parse(process.argv);
var args = program.args;
2015-02-12 19:23:59 -08:00
var cli = new CliLib({
filename: program.config
});
2015-02-12 18:57:16 -08:00
2015-02-13 05:30:58 -08:00
cli.status(function(err, x) {
2015-02-12 18:57:16 -08:00
common.die(err);
2015-02-13 05:30:58 -08:00
console.log('* Wallet %s [%s]: %d-%d %s ', x.name, x.isTestnet ? 'testnet' : 'livenet', x.m, x.n, x.status);
2015-02-12 18:57:16 -08:00
2015-02-13 05:30:58 -08:00
if (program.verbose)
console.log('* Raw Server Response:\n', x); //TODO
});