Skip to content

Commit 059ef9e

Browse files
committed
Release 3.0.0.
1 parent 0d4ec4b commit 059ef9e

File tree

6 files changed

+22
-14
lines changed

6 files changed

+22
-14
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fastest 5KB JS implementation of secp256k1 signatures & ECDH.
88
signatures compliant with [BIP340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki)
99
- 🤝 Elliptic Curve Diffie-Hellman [ECDH](https://en.wikipedia.org/wiki/Elliptic-curve_Diffie–Hellman)
1010
- 🔒 Supports [hedged signatures](https://paulmillr.com/posts/deterministic-signatures/) guarding against fault attacks
11-
- 🪶 4.86KB (gzipped, elliptic.js is 10x larger, tiny-secp256k1 is 25x larger)
11+
- 🪶 4.94KB (gzipped, elliptic.js is 10x larger, tiny-secp256k1 is 25x larger)
1212

1313
The module is a sister project of [noble-curves](https://github.com/paulmillr/noble-curves),
1414
focusing on smaller attack surface & better auditability.
@@ -56,6 +56,15 @@ import * as secp from '@noble/secp256k1';
5656
const sigr = await secp.signAsync(msg, secretKey, { format: 'recovered' });
5757
const publicKey2 = secp.recoverPublicKey(sigr, msg);
5858
})();
59+
60+
// Schnorr signatures from BIP340
61+
(async () => {
62+
const schnorr = secp.schnorr;
63+
const { secretKey, publicKey } = schnorr.keygen();
64+
const msg = new TextEncoder().encode('hello noble');
65+
const sig = await schnorr.signAsync(msg, secretKey);
66+
const isValid = await schnorr.verifyAsync(sig, msg, publicKey);
67+
})();
5968
```
6069

6170
### Enabling synchronous methods

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@noble/secp256k1",
3-
"version": "3.0.0-beta.1",
3+
"version": "3.0.0",
44
"exports": "./index.ts",
55
"publish": {
66
"include": [

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@noble/secp256k1",
3-
"version": "3.0.0-beta.1",
3+
"version": "3.0.0",
44
"description": "Fastest 5KB JS implementation of secp256k1 ECDH & ECDSA signatures compliant with RFC6979",
55
"files": [
66
"index.js",
77
"index.d.ts",
88
"index.ts"
99
],
1010
"devDependencies": {
11-
"@noble/hashes": "2.0.0-beta.5",
11+
"@noble/hashes": "2.0.0",
1212
"@paulmillr/jsbt": "0.4.4",
1313
"@types/node": "24.2.1",
1414
"fast-check": "4.2.0",

test/build/input.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
// export { getPublicKey, hashes, keygen, schnorr, sign, utils, verify } from "../../index.js";
2-
export { getPublicKey, hashes, keygen, schnorrAsync, signAsync, utils, verifyAsync } from "../../index.js";
1+
export { getPublicKey, hashes, keygen, schnorr, signAsync, utils, verifyAsync } from "../../index.js";

test/build/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)