diff --git a/dashkeys.js b/dashkeys.js index 34092e6..8ead3f2 100644 --- a/dashkeys.js +++ b/dashkeys.js @@ -1288,10 +1288,12 @@ var DashKeys = ("object" === typeof module && exports) || {}; /** * @param {String} wif - Base58Check-encoded Private Key + * @param {DecodeOpts} [opts] * @returns {Promise} - private key (no magic byte or checksum) */ _DashKeys.wifToPrivKey = async function (wif, opts) { - let wifParts = await dash58check.decode(wif, opts); + let wifParts = await _DashKeys.decode(wif, opts); + //@ts-ignore - wifParts does have privateKey let privBytes = Utils.hexToBytes(wifParts.privateKey); return privBytes; @@ -1343,7 +1345,7 @@ if ("object" === typeof module) { /** * @typedef DecodeOpts - * @prop {Boolean} validate - throw if check fails, true by default + * @prop {Boolean} [validate] - throw if check fails, true by default * @prop {Array} [versions] * @prop {VERSION|Number} [version] */ diff --git a/package-lock.json b/package-lock.json index b14c08b..cc1e62c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dashkeys", - "version": "1.1.4", + "version": "1.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dashkeys", - "version": "1.1.4", + "version": "1.1.5", "license": "SEE LICENSE IN LICENSE", "devDependencies": { "@dashincubator/base58check": "^1.4.1", diff --git a/package.json b/package.json index e7dc034..56edca0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashkeys", - "version": "1.1.4", + "version": "1.1.5", "description": "Generate, validate, create, and convert WIFs and PayAddress.", "main": "dashkeys.js", "browser": {