Skip to content

Commit

Permalink
Merge pull request #48 from zama-ai/update-tfhe-rs
Browse files Browse the repository at this point in the history
Update tfhe rs
  • Loading branch information
immortal-tofu authored Feb 7, 2024
2 parents 8a5eff6 + b83b45c commit ec99740
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
release:
types: [created]
types: [released]

jobs:
publish:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/publishprerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
release:
types: [prereleased]

jobs:
publish:
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm test
- run: npm run build
- uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939
with:
tag: prerelease
token: ${{ secrets.NPM_TOKEN }}
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhevmjs",
"version": "0.3.2",
"version": "0.4.0-0",
"description": "fhEVM SDK for blockchain using TFHE",
"main": "lib/node.cjs",
"types": "lib/node.d.ts",
Expand Down Expand Up @@ -44,9 +44,9 @@
"ethers": "^6.6.4",
"libsodium": "^0.7.11",
"libsodium-wrappers": "^0.7.11",
"node-tfhe": "^0.4.1",
"node-tfhe": "^0.5.1",
"sha3": "^2.1.4",
"tfhe": "^0.4.1"
"tfhe": "^0.5.1"
},
"devDependencies": {
"@rollup/plugin-alias": "^5.0.0",
Expand Down
6 changes: 4 additions & 2 deletions src/tfhe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ export const createTfheKeypair = () => {
const block_params = new ShortintParameters(
ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS,
);
let config = TfheConfigBuilder.all_disabled()
.enable_custom_integers(block_params)
// const configBuilder = new TfheConfigBuilder();
// const config = configBuilder.use_custom_parameters(block_params).build();
const config = TfheConfigBuilder.default()
.use_custom_parameters(block_params)
.build();
let clientKey = TfheClientKey.generate(config);
let publicKey = TfheCompactPublicKey.new(clientKey);
Expand Down

0 comments on commit ec99740

Please sign in to comment.