diff --git a/config/rollup.config.js b/config/rollup.config.js index 5d7501a..dd71697 100644 --- a/config/rollup.config.js +++ b/config/rollup.config.js @@ -8,9 +8,15 @@ import replace from '@rollup/plugin-replace'; import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import nodePolyfills from 'rollup-plugin-polyfill-node'; +import path from 'path'; +import fs from 'fs'; const require = createRequire(import.meta.url); +const wasmBindgenRayon = fs.readdirSync( + path.resolve('node_modules/tfhe/snippets'), +)[0]; + const nodePlugins = [ json(), wasm(), @@ -56,11 +62,10 @@ export default [ plugins: [...webPlugins], }, { - input: - './node_modules/tfhe/snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/workerHelpers.worker.js', + input: `./node_modules/tfhe/snippets/${wasmBindgenRayon}/src/workerHelpers.worker.js`, output: { file: 'lib/workerHelpers.worker.js', - name: 'fhevm', + name: 'worker', format: 'es', }, plugins: [...webPlugins], diff --git a/package-lock.json b/package-lock.json index 9151116..2c45822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "fhevmjs", - "version": "0.6.0-1", + "version": "0.6.0-2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fhevmjs", - "version": "0.6.0-1", + "version": "0.6.0-2", "license": "BSD-3-Clause-Clear", "dependencies": { "@types/keccak": "^3.0.4", "bigint-buffer": "^1.1.5", "commander": "^11.0.0", "fetch-mock": "^11.1.3", - "node-tfhe": "^0.8.0", + "node-tfhe": "^0.8.3", "node-tkms": "^0.9.0-rc11", "sha3": "^2.1.4", - "tfhe": "^0.8.0", + "tfhe": "^0.8.3", "tkms": "^0.9.0-rc11", "url": "^0.11.3", "web3-validator": "^2.0.6" @@ -5191,9 +5191,9 @@ "dev": true }, "node_modules/node-tfhe": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.8.0.tgz", - "integrity": "sha512-cuH06Wc5BiUQhaI2/RMAi2e9lMaE/hxrqlEKNDPVOtbjHGIUnwzS53CphjNQfsgpucV5ZEp0YxXMtAwbkMas5Q==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.8.3.tgz", + "integrity": "sha512-VadSBYAMr121W6ZN2Zq+pSAA3SZdczO9d76P+PS7tpFj5Gtzd9+1lJ90A8kXe1RiHjXk5s37N/iOhRNDCFj2aA==", "license": "BSD-3-Clause-Clear" }, "node_modules/node-tkms": { @@ -6272,9 +6272,9 @@ } }, "node_modules/tfhe": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.8.0.tgz", - "integrity": "sha512-sbgNXmvvjoNC+pOA89rrIGwJkA1ykPWU5zMVpj4RWM9R8Bc32zMLQwxVO8OblZX8QDWD8ZpoBL8bnkKwJLp9YA==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.8.3.tgz", + "integrity": "sha512-XoNOTw85wGHq68RwloG9x+ljsBqI8+bdCHxUWEDWFQgfSkLs+gSrfkAKcX0iMck9j0EgvQGo8q4oR/nXlBBzow==", "license": "BSD-3-Clause-Clear" }, "node_modules/tkms": { @@ -10818,9 +10818,9 @@ "dev": true }, "node-tfhe": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.8.0.tgz", - "integrity": "sha512-cuH06Wc5BiUQhaI2/RMAi2e9lMaE/hxrqlEKNDPVOtbjHGIUnwzS53CphjNQfsgpucV5ZEp0YxXMtAwbkMas5Q==" + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-0.8.3.tgz", + "integrity": "sha512-VadSBYAMr121W6ZN2Zq+pSAA3SZdczO9d76P+PS7tpFj5Gtzd9+1lJ90A8kXe1RiHjXk5s37N/iOhRNDCFj2aA==" }, "node-tkms": { "version": "0.9.0-rc11", @@ -11593,9 +11593,9 @@ } }, "tfhe": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.8.0.tgz", - "integrity": "sha512-sbgNXmvvjoNC+pOA89rrIGwJkA1ykPWU5zMVpj4RWM9R8Bc32zMLQwxVO8OblZX8QDWD8ZpoBL8bnkKwJLp9YA==" + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-0.8.3.tgz", + "integrity": "sha512-XoNOTw85wGHq68RwloG9x+ljsBqI8+bdCHxUWEDWFQgfSkLs+gSrfkAKcX0iMck9j0EgvQGo8q4oR/nXlBBzow==" }, "tkms": { "version": "0.9.0-rc11", diff --git a/package.json b/package.json index 205323e..0e0e9ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fhevmjs", - "version": "0.6.0-1", + "version": "0.6.0-2", "description": "fhEVM SDK for blockchain using TFHE", "main": "lib/node.js", "types": "lib/node/node.d.ts", @@ -50,10 +50,10 @@ "bigint-buffer": "^1.1.5", "commander": "^11.0.0", "fetch-mock": "^11.1.3", - "node-tfhe": "^0.8.0", + "node-tfhe": "^0.8.3", "node-tkms": "^0.9.0-rc11", "sha3": "^2.1.4", - "tfhe": "^0.8.0", + "tfhe": "^0.8.3", "tkms": "^0.9.0-rc11", "url": "^0.11.3", "web3-validator": "^2.0.6"