@semaphore-protocol/proof 0.3.1 → 0.3.2

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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @semaphore-protocol/proof
3
- * @version 0.3.1
3
+ * @version 0.3.2
4
4
  * @file A library to generate and verify Semaphore proofs.
5
5
  * @copyright Ethereum Foundation 2022
6
6
  * @license MIT
@@ -95,6 +95,7 @@ function generateProof(identity, group, externalNullifier, signal, snarkArtifact
95
95
  throw new Error("The identity is not part of the group");
96
96
  }
97
97
  merkleProof = group.generateProofOfMembership(index);
98
+ merkleProof.siblings = merkleProof.siblings.map(function (s) { return s[0]; });
98
99
  return [4 /*yield*/, groth16.fullProve({
99
100
  identityTrapdoor: identity.getTrapdoor(),
100
101
  identityNullifier: identity.getNullifier(),
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @semaphore-protocol/proof
3
- * @version 0.3.1
3
+ * @version 0.3.2
4
4
  * @file A library to generate and verify Semaphore proofs.
5
5
  * @copyright Ethereum Foundation 2022
6
6
  * @license MIT
@@ -99,6 +99,7 @@ function generateProof(identity, group, externalNullifier, signal, snarkArtifact
99
99
  throw new Error("The identity is not part of the group");
100
100
  }
101
101
  merkleProof = group.generateProofOfMembership(index);
102
+ merkleProof.siblings = merkleProof.siblings.map(function (s) { return s[0]; });
102
103
  return [4 /*yield*/, snarkjs.groth16.fullProve({
103
104
  identityTrapdoor: identity.getTrapdoor(),
104
105
  identityNullifier: identity.getNullifier(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/proof",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A library to generate and verify Semaphore proofs.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.node.js",
@@ -20,6 +20,8 @@ export default async function generateProof(
20
20
 
21
21
  const merkleProof = group.generateProofOfMembership(index)
22
22
 
23
+ merkleProof.siblings = merkleProof.siblings.map((s) => s[0])
24
+
23
25
  const { proof, publicSignals } = await groth16.fullProve(
24
26
  {
25
27
  identityTrapdoor: identity.getTrapdoor(),