26 lines
580 B
JavaScript
Executable File
26 lines
580 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var program = require('commander');
|
|
var utils = require('./cli-utils');
|
|
program = utils.configureCommander(program);
|
|
program
|
|
.option('-c, --coin <coin>', 'coin (btc/bch)')
|
|
.parse(process.argv);
|
|
|
|
var args = program.args;
|
|
|
|
|
|
var opts = {};
|
|
if (program.coin) {
|
|
opts.coin = program.coin
|
|
}
|
|
|
|
utils.getClient(program, {
|
|
mustExist: true
|
|
}, function(client) {
|
|
client.getBalance(opts, function(err, x) {
|
|
utils.die(err);
|
|
console.log('* Wallet balance %s (Locked %s)', utils.renderAmount(x.totalAmount), utils.renderAmount(x.lockedAmount));
|
|
});
|
|
});
|