From 3147dde373b2bb60e365a6be747cc25e323993cb Mon Sep 17 00:00:00 2001 From: Lucas Barrena Date: Thu, 25 Apr 2024 16:59:34 -0300 Subject: [PATCH] Update secp256k1 to latest --- package.json | 12 ++++++------ src/secp256k1 | 2 +- src/secp256k1.cc | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 084298a..1c2f755 100644 --- a/package.json +++ b/package.json @@ -33,14 +33,14 @@ }, "dependencies": { "elliptic": "^6.5.4", - "node-addon-api": "^5.0.0", - "node-gyp-build": "^4.2.0" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" }, "devDependencies": { - "node-gyp": "^5.0.7", + "node-gyp": "^10.1.0", "nyc": "^15.0.0", - "prebuildify": "^5.0.0", - "prebuildify-cross": "^4.0.2", + "prebuildify": "^6.0.1", + "prebuildify-cross": "^5.1.0", "standard": "^14.3.1", "tap-dot": "^2.0.0", "tape": "^4.10.1", @@ -48,7 +48,7 @@ "yargs": "^15.0.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "gypfile": true } diff --git a/src/secp256k1 b/src/secp256k1 index d644dda..1ad5185 160000 --- a/src/secp256k1 +++ b/src/secp256k1 @@ -1 +1 @@ -Subproject commit d644dda5c9dbdecee52d1aa259235510fdc2d4ee +Subproject commit 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40 diff --git a/src/secp256k1.cc b/src/secp256k1.cc index 40ea6a5..841b5b8 100644 --- a/src/secp256k1.cc +++ b/src/secp256k1.cc @@ -107,7 +107,7 @@ Napi::Value Secp256k1Addon::PrivateKeyVerify(const Napi::CallbackInfo& info) { Napi::Value Secp256k1Addon::PrivateKeyNegate(const Napi::CallbackInfo& info) { auto seckey = info[0].As>().Data(); - RETURN_IF_ZERO(secp256k1_ec_privkey_negate(this->ctx_, seckey), 1); + RETURN_IF_ZERO(secp256k1_ec_seckey_negate(this->ctx_, seckey), 1); RETURN(0); } @@ -115,14 +115,14 @@ Napi::Value Secp256k1Addon::PrivateKeyTweakAdd(const Napi::CallbackInfo& info) { auto seckey = info[0].As>().Data(); auto tweak = info[1].As>().Data(); - RETURN_INVERTED(secp256k1_ec_privkey_tweak_add(this->ctx_, seckey, tweak)); + RETURN_INVERTED(secp256k1_ec_seckey_tweak_add(this->ctx_, seckey, tweak)); } Napi::Value Secp256k1Addon::PrivateKeyTweakMul(const Napi::CallbackInfo& info) { auto seckey = info[0].As>().Data(); auto tweak = info[1].As>().Data(); - RETURN_INVERTED(secp256k1_ec_privkey_tweak_mul(this->ctx_, seckey, tweak)); + RETURN_INVERTED(secp256k1_ec_seckey_tweak_mul(this->ctx_, seckey, tweak)); } // PublicKey