From fd973969b134086bf71ffa4a63f0bf7b620b5cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Landabaso=20D=C3=ADaz?= Date: Wed, 28 Jun 2023 10:32:56 +0200 Subject: [PATCH] Remove extra data check in signSchnorr and bump version (#3) This commit removes the check for 'e' (auxRand equivalent) being valid extra data in the signSchnorr function. This adjustment aligns with the updated handling of undefined 'e' values, as discussed in issue #3. The library version is also incremented to reflect this change. --- index.js | 3 --- package.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/index.js b/index.js index 164914a..b26a261 100644 --- a/index.js +++ b/index.js @@ -322,9 +322,6 @@ export function signSchnorr(h, d, e) { if (!isHash(h)) { throw new Error('Expected Scalar'); } - if (!isExtraData(e)) { - throw new Error('Expected Extra Data (32 bytes)'); - } return necc.schnorr.signSync(h, d, e); } diff --git a/package.json b/package.json index 498af8c..ba29399 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@bitcoinerlab/secp256k1", "homepage": "https://bitcoinerlab.com/secp256k1", - "version": "1.0.3", + "version": "1.0.4", "description": "A library for performing elliptic curve operations on the secp256k1 curve. It is designed to integrate into the BitcoinJS & BitcoinerLAB ecosystems and uses the audited noble-secp256k1 library. It is compatible with environments that do not support WASM, such as React Native.", "main": "dist/index.js", "types": "types/index.d.ts",