cli: add wallet coins.

This commit is contained in:
Christopher Jeffrey 2016-10-24 16:31:10 -07:00
parent 842ba5f5b6
commit 9dcd366d15
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -170,6 +170,11 @@ CLI.prototype.getWalletHistory = co(function* getWalletHistory() {
this.log(txs);
});
CLI.prototype.getWalletCoins = co(function* getWalletCoins() {
var coins = yield this.wallet.getCoins(this.config.account);
this.log(coins);
});
CLI.prototype.listenWallet = function listenWallet() {
var self = this;
this.wallet.on('tx', function(details) {
@ -413,6 +418,8 @@ CLI.prototype.handleWallet = co(function* handleWallet() {
return yield this.getBalance();
case 'history':
return yield this.getWalletHistory();
case 'coins':
return yield this.getWalletCoins();
case 'account':
if (this.argv[0] === 'list') {
this.argv.shift();
@ -462,6 +469,7 @@ CLI.prototype.handleWallet = co(function* handleWallet() {
this.log(' $ rmkey [xpubkey]: Remove key from wallet.');
this.log(' $ balance: Get wallet balance.');
this.log(' $ history: View wallet TX history.');
this.log(' $ coins: View wallet coins.');
this.log(' $ account list: List account names.');
this.log(' $ account create [account-name]: Create account.');
this.log(' $ account get [account-name]: Get account details.');