diff --git a/lib/utils/signature.js b/lib/utils/signature.js index e2e96af..e5fb0f8 100644 --- a/lib/utils/signature.js +++ b/lib/utils/signature.js @@ -176,7 +176,7 @@ class LedgerSignature { */ fromDER(der) { - const sig = secp256k1.fromDER(der); + const sig = secp256k1.signatureImport(der); return this.decode(sig); } @@ -187,7 +187,7 @@ class LedgerSignature { */ toDER() { - return secp256k1.toDER(this.encode()); + return secp256k1.signatureExport(this.encode()); } /** diff --git a/package-lock.json b/package-lock.json index 2016ca6..8b09ca3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -118,9 +118,9 @@ } }, "bcrypto": { - "version": "3.1.11", - "resolved": "https://registry.npmjs.org/bcrypto/-/bcrypto-3.1.11.tgz", - "integrity": "sha512-XHsle+v0aYjCyHZSwd3Insnu8GUe4cuf3+f07Z/mO+GLq60YqUyEIvpaSv4LAAJ4uf8UNYMSSQ0LslsV0r4tug==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bcrypto/-/bcrypto-4.0.1.tgz", + "integrity": "sha512-aLH/BmVyasy9iQkrmQTg+9MRU+77zOpEBiBflaXFC4YQJNICG/NjkEEluinnvAOQWGiM4HsGcfrVFJNJQz8jxQ==", "requires": { "bsert": "~0.0.10", "bufio": "~1.0.6", diff --git a/package.json b/package.json index bc53e3b..48ab6fd 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "./lib/bledger": "./lib/bledger-browser.js" }, "dependencies": { - "bcrypto": "^3.1.6", + "bcrypto": "^4.0.1", "blgr": "~0.1.7", "bmutex": "~0.1.6", "bsert": "~0.0.10",