From 14dabddb2c31ab20f3bf5bde2126e8a8aa940369 Mon Sep 17 00:00:00 2001 From: Interchained Date: Wed, 24 Oct 2018 22:16:10 -0400 Subject: [PATCH] add store and rescan_blockchain scanning the blockchain, and then storing the updated cache would be helpful. Don't you agree? --- lib/wallet.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/wallet.js b/lib/wallet.js index 4f9a710..21a6491 100644 --- a/lib/wallet.js +++ b/lib/wallet.js @@ -82,6 +82,18 @@ Wallet.prototype.balance = function() { return this._request(method); }; +// rescan the blockchain for the wallet balance +Wallet.prototype.rescan = function() { + let method = 'rescan_blockchain'; + return this._request(method); +}; + +// store the wallet balance +Wallet.prototype.store = function() { + let method = 'store'; + return this._request(method); +}; + // return the wallet address Wallet.prototype.address = function() { let method = 'get_address';