From 4bfda8fc2646029c84e73aaf923805956187fd28 Mon Sep 17 00:00:00 2001 From: Jim Zhang Date: Fri, 23 Aug 2024 10:29:44 -0400 Subject: [PATCH] Remove temp solution for poseidon-lite and use the new official release Signed-off-by: Jim Zhang --- zkp/js/index.js | 2 +- zkp/js/lib/util.js | 2 +- zkp/js/package.json | 2 +- zkp/js/test/lib/poseidon-ex.js | 2 +- zkp/js/test/lib/poseidon.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zkp/js/index.js b/zkp/js/index.js index a8c93b3..70e4369 100644 --- a/zkp/js/index.js +++ b/zkp/js/index.js @@ -16,7 +16,7 @@ const path = require('path'); const { readFileSync } = require('fs'); -const Poseidon = require('poseidon-lite/build'); +const Poseidon = require('poseidon-lite'); const { newSalt, newEncryptionNonce, poseidonDecrypt, encodeProof, getProofHash, tokenUriHash, kycHash } = require('./lib/util.js'); function loadCircuit(type) { diff --git a/zkp/js/lib/util.js b/zkp/js/lib/util.js index 037331c..f89934d 100644 --- a/zkp/js/lib/util.js +++ b/zkp/js/lib/util.js @@ -15,7 +15,7 @@ // limitations under the License. const { genRandomSalt } = require('maci-crypto'); -const { poseidon4: poseidon, poseidon2 } = require('poseidon-lite/build'); +const { poseidon4: poseidon, poseidon2 } = require('poseidon-lite'); const { solidityPackedKeccak256 } = require('ethers'); const { createHash, randomBytes } = require('crypto'); diff --git a/zkp/js/package.json b/zkp/js/package.json index 4355f28..ebc5117 100644 --- a/zkp/js/package.json +++ b/zkp/js/package.json @@ -11,7 +11,7 @@ "dependencies": { "ethers": "^6.13.2", "maci-crypto": "^1.1.1", - "poseidon-lite": "git://github.com/kaleido-io/poseidon-lite.git#pre-build" + "poseidon-lite": "^0.3.0" }, "devDependencies": { "@iden3/js-merkletree": "^1.2.0", diff --git a/zkp/js/test/lib/poseidon-ex.js b/zkp/js/test/lib/poseidon-ex.js index 73b0776..5ff5e8b 100644 --- a/zkp/js/test/lib/poseidon-ex.js +++ b/zkp/js/test/lib/poseidon-ex.js @@ -17,7 +17,7 @@ const { expect } = require('chai'); const { join } = require('path'); const { wasm: wasm_tester } = require('circom_tester'); -const { poseidon4 } = require('poseidon-lite/build'); +const { poseidon4 } = require('poseidon-lite'); describe('PoseidonEx circuit tests', () => { let circuit; diff --git a/zkp/js/test/lib/poseidon.js b/zkp/js/test/lib/poseidon.js index 5e8a818..9e5f1cf 100644 --- a/zkp/js/test/lib/poseidon.js +++ b/zkp/js/test/lib/poseidon.js @@ -17,7 +17,7 @@ const { expect } = require('chai'); const { join } = require('path'); const { wasm: wasm_tester } = require('circom_tester'); -const { poseidon3 } = require('poseidon-lite/build'); +const { poseidon3 } = require('poseidon-lite'); describe('Poseidon circuit tests', () => { let circuit;