Skip to content

Commit

Permalink
Update secp256k1 to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
LuKks committed Apr 25, 2024
1 parent 6d3474b commit 66efad4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/secp256k1
Submodule secp256k1 updated 173 files
6 changes: 3 additions & 3 deletions src/secp256k1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ Napi::Value Secp256k1Addon::PrivateKeyVerify(const Napi::CallbackInfo& info) {
Napi::Value Secp256k1Addon::PrivateKeyNegate(const Napi::CallbackInfo& info) {
auto seckey = info[0].As<Napi::Buffer<unsigned char>>().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);
}

Napi::Value Secp256k1Addon::PrivateKeyTweakAdd(const Napi::CallbackInfo& info) {
auto seckey = info[0].As<Napi::Buffer<unsigned char>>().Data();
auto tweak = info[1].As<Napi::Buffer<const unsigned char>>().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<Napi::Buffer<unsigned char>>().Data();
auto tweak = info[1].As<Napi::Buffer<const unsigned char>>().Data();

RETURN_INVERTED(secp256k1_ec_privkey_tweak_mul(this->ctx_, seckey, tweak));
RETURN_INVERTED(secp256k1_ec_seckey_tweak_mul(this->ctx_, seckey, tweak));
}

// PublicKey
Expand Down

0 comments on commit 66efad4

Please sign in to comment.