From d62535aaaecbbdd7bfc1e78601a9e8db64529d00 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 7 Aug 2024 09:59:03 -0600 Subject: [PATCH 1/2] fix: use the correct decode function with testnet checks --- dashkeys.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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] */ From de3fb4b7fe315d1a193f09efb3cec9e1c57c0c38 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 7 Aug 2024 10:08:58 -0600 Subject: [PATCH 2/2] chore(release): bump to v1.1.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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": {