Skip to content
This repository was archived by the owner on Feb 20, 2021. It is now read-only.

Commit 2f2988c

Browse files
authored
Get Addresses from HD Wallet with params (#17)
1 parent 06a853d commit 2f2988c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/bcypher.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,16 @@ Blockcy.prototype.getAddrsWallet = function (name, cb) {
339339
* Get array of addresses from named HD wallet.
340340
* @callback cb
341341
* @param {string} name Name of the HD wallet you're querying.
342+
* @param {Object} [params] Optional URL parameters.
342343
* @memberof Blockcy
343344
* @method getAddrsHDWallet
344345
*/
345-
Blockcy.prototype.getAddrsHDWallet = function (name, cb) {
346-
this._get('/wallets/hd/' + name + '/addresses', {}, function (error, body) {
346+
Blockcy.prototype.getAddrsHDWallet = function (name, params, cb) {
347+
if (typeof params === 'function') {
348+
cb = params;
349+
params = {};
350+
}
351+
this._get('/wallets/hd/' + name + '/addresses', params, function (error, body) {
347352
cb(error, body);
348353
});
349354
};

0 commit comments

Comments
 (0)