diff --git a/package-lock.json b/package-lock.json index 6a0423a..f4add0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -632,12 +632,12 @@ } }, "circom": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.9.tgz", - "integrity": "sha512-SCJoY2FoVpFsRlRcmRgLP5ko0jSxREAmQh7CM6gQ6V9KI5wXm8vR+5phj6wek/p0TnO5s3wR88JPMfjAm8P2Mw==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.10.tgz", + "integrity": "sha512-50cVHDG7EbkuS6Ht3SDKBDeR/2M+/XSUxfpJMBL1TmFO2B/ucwUIwBNS00bpdtkT080dqwOVtuiYTLQ27prImw==", "requires": { "chai": "^4.2.0", - "circom_runtime": "0.0.5", + "circom_runtime": "0.0.6", "fastfile": "0.0.1", "ffiasm": "0.0.2", "ffjavascript": "0.1.0", @@ -649,9 +649,9 @@ } }, "circom_runtime": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.0.5.tgz", - "integrity": "sha512-WEZHnRO1AJIDI2w1yX6rq4G1/MMKnExT3qirjBQR7x43i9Ww3E/wusBHTbXWLb8aYyxsBU07LGy0YXPywPGYvA==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.0.6.tgz", + "integrity": "sha512-o0T5MuWzxnxinWG3+CygS/kZouoP+z5ZrufUwqKJy3gsVFJhkbqMpfKmcBGjhExB3uatA7cKyOiRAOLOz5+t5w==", "requires": { "ffjavascript": "0.1.0", "fnv-plus": "^1.3.1" diff --git a/package.json b/package.json index 959ba8e..e1dc183 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "dependencies": { "blake-hash": "^1.1.0", "blake2b": "^2.1.3", - "circom": "0.5.9", + "circom": "0.5.10", "ffjavascript": "0.1.0", "web3": "^1.2.6" }, diff --git a/src/smt_memdb.js b/src/smt_memdb.js index d752fa3..ccb85c6 100644 --- a/src/smt_memdb.js +++ b/src/smt_memdb.js @@ -1,6 +1,7 @@ const F = require("./poseidon.js").F; const Scalar = require("ffjavascript").Scalar; +const utils = require("ffjavascript").utils; class SMTMemDb { constructor() { @@ -14,7 +15,7 @@ class SMTMemDb { _key2str(k) { // const keyS = bigInt(key).leInt2Buff(32).toString("hex"); - const keyS = Scalar.e(k); + const keyS = k.toString(); return keyS; }