@semaphore-protocol/proof 4.13.2 → 4.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Ethereum Foundation
3
+ Copyright (c) 2025 Ethereum Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -116,3 +116,25 @@ import { verifyProof } from "@semaphore-protocol/proof"
116
116
 
117
117
  await verifyProof(proof1)
118
118
  ```
119
+
120
+ ## Resource management: Terminating the bn128 curve
121
+
122
+ When using the Semaphore proof library in Node.js environments, especially in tests or scripts that create and use the `bn128` curve (for example, via `getCurveFromName("bn128")` from the `ffjavascript` package), it is important to properly release resources associated with the curve after use. Failing to do so can result in leaked handles (such as `MessagePort` handles), which may prevent Node.js from exiting cleanly. This is particularly relevant when running test suites.
123
+
124
+ **How to terminate the bn128 curve:**
125
+
126
+ If you create a curve instance using `getCurveFromName("bn128")`, you should call its `terminate()` method when you are done with it. For example:
127
+
128
+ ```typescript
129
+ import { getCurveFromName } from "ffjavascript"
130
+
131
+ let curve
132
+ beforeAll(async () => {
133
+ curve = await getCurveFromName("bn128")
134
+ })
135
+ afterAll(async () => {
136
+ await curve.terminate()
137
+ })
138
+ ```
139
+
140
+ This ensures that all resources are properly released and Node.js can exit cleanly after your script or tests finish.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @semaphore-protocol/proof
3
- * @version 4.13.2
3
+ * @version 4.14.0
4
4
  * @file A library to generate and verify Semaphore proofs.
5
5
  * @copyright Ethereum Foundation 2025
6
6
  * @license MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @semaphore-protocol/proof
3
- * @version 4.13.2
3
+ * @version 4.14.0
4
4
  * @file A library to generate and verify Semaphore proofs.
5
5
  * @copyright Ethereum Foundation 2025
6
6
  * @license MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @semaphore-protocol/proof
3
- * @version 4.13.2
3
+ * @version 4.14.0
4
4
  * @file A library to generate and verify Semaphore proofs.
5
5
  * @copyright Ethereum Foundation 2025
6
6
  * @license MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/proof",
3
- "version": "4.13.2",
3
+ "version": "4.14.0",
4
4
  "description": "A library to generate and verify Semaphore proofs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,11 +47,11 @@
47
47
  "rollup-plugin-cleanup": "^3.2.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@semaphore-protocol/group": "4.13.2",
51
- "@semaphore-protocol/identity": "4.13.2"
50
+ "@semaphore-protocol/group": "4.14.0",
51
+ "@semaphore-protocol/identity": "4.14.0"
52
52
  },
53
53
  "dependencies": {
54
- "@semaphore-protocol/utils": "4.13.2",
54
+ "@semaphore-protocol/utils": "4.14.0",
55
55
  "@zk-kit/artifacts": "2.0.1",
56
56
  "@zk-kit/utils": "1.3.0",
57
57
  "ethers": "6.13.4",