bitcore-wallet-service/bit-wallet/bit-balance

25 lines
538 B
JavaScript
Executable File

#!/usr/bin/env node
var program = require('commander');
var Client = require('../lib/client');
var common = require('./common');
program
.version('0.0.1')
.option('-c, --config [file]', 'Wallet config filename')
.option('-v, --verbose', 'be verbose')
.parse(process.argv);
var args = program.args;
var cli = new Client({
filename: program.config
});
cli.getBalance(function(err, x) {
common.die(err);
console.log('* Wallet balance', x);
if (program.verbose)
console.log('* Raw Server Response:\n', x); //TODO
});