@zama-fhe/relayer-sdk 0.1.0-1

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.
Files changed (44) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +55 -0
  3. package/bin/relayer.js +61 -0
  4. package/bin/utils.js +14 -0
  5. package/bundle/fhevm.js +40713 -0
  6. package/bundle/fhevm.umd.cjs +24 -0
  7. package/bundle/kms_lib_bg.wasm +0 -0
  8. package/bundle/tfhe_bg.wasm +0 -0
  9. package/bundle/workerHelpers.js +2 -0
  10. package/bundle.d.ts +1 -0
  11. package/bundle.js +12 -0
  12. package/lib/config.d.ts +30 -0
  13. package/lib/index.d.ts +29 -0
  14. package/lib/init.d.ts +7 -0
  15. package/lib/kms_lib_bg.wasm +0 -0
  16. package/lib/node.cjs +1152 -0
  17. package/lib/node.d.ts +2 -0
  18. package/lib/relayer/decryptUtils.d.ts +2 -0
  19. package/lib/relayer/handles.d.ts +4 -0
  20. package/lib/relayer/network.d.ts +31 -0
  21. package/lib/relayer/network.test.d.ts +1 -0
  22. package/lib/relayer/publicDecrypt.d.ts +3 -0
  23. package/lib/relayer/publicDecrypt.test.d.ts +1 -0
  24. package/lib/relayer/sendEncryption.d.ts +41 -0
  25. package/lib/relayer/sendEncryption.test.d.ts +1 -0
  26. package/lib/relayer/userDecrypt.d.ts +11 -0
  27. package/lib/relayer/userDecrypt.test.d.ts +1 -0
  28. package/lib/sdk/encrypt.d.ts +34 -0
  29. package/lib/sdk/encrypt.test.d.ts +1 -0
  30. package/lib/sdk/encryptionTypes.d.ts +13 -0
  31. package/lib/sdk/keypair.d.ts +34 -0
  32. package/lib/sdk/keypair.test.d.ts +1 -0
  33. package/lib/test/index.d.ts +10 -0
  34. package/lib/tfhe.d.ts +7 -0
  35. package/lib/tfhe_bg.wasm +0 -0
  36. package/lib/utils.d.ts +9 -0
  37. package/lib/web.d.ts +2 -0
  38. package/lib/web.js +27305 -0
  39. package/lib/workerHelpers.js +24774 -0
  40. package/node.d.ts +1 -0
  41. package/node.js +1 -0
  42. package/package.json +99 -0
  43. package/web.d.ts +1 -0
  44. package/web.js +1 -0
package/node.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/node';
package/node.js ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/node.cjs';
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@zama-fhe/relayer-sdk",
3
+ "version": "0.1.0-1",
4
+ "description": "fhevm Relayer SDK",
5
+ "main": "lib/node.js",
6
+ "types": "lib/node/node.d.ts",
7
+ "browser": "lib/web.js",
8
+ "type": "module",
9
+ "bin": {
10
+ "relayer": "bin/relayer.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./lib/web.js",
15
+ "require": "./lib/node.cjs"
16
+ },
17
+ "./web": {
18
+ "import": "./lib/web.js",
19
+ "require": "./lib/web.js"
20
+ },
21
+ "./bundle": {
22
+ "import": "./bundle.js",
23
+ "require": "./bundle.js"
24
+ },
25
+ "./node": {
26
+ "require": "./lib/node.cjs"
27
+ }
28
+ },
29
+ "engines": {
30
+ "node": ">=20"
31
+ },
32
+ "scripts": {
33
+ "lint": "eslint src/",
34
+ "generateKeys": "./generateKeys.js",
35
+ "build": "npm run build:lib && npm run build:bundle",
36
+ "build:lib": "rollup -c config/rollup.config.js",
37
+ "build:bundle": "vite build --config config/vite.config.js",
38
+ "test": "jest --colors --passWithNoTests --coverage",
39
+ "test:watch": "jest --colors --passWithNoTests --watch",
40
+ "prettier": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\"",
41
+ "prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\""
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/zama-ai/relayer-sdk.git"
46
+ },
47
+ "author": "",
48
+ "license": "BSD-3-Clause-Clear",
49
+ "bugs": {
50
+ "url": "https://github.com/zama-ai/relayer-sdk/issues"
51
+ },
52
+ "homepage": "https://github.com/zama-ai/relayer-sdk#readme",
53
+ "dependencies": {
54
+ "commander": "^11.0.0",
55
+ "ethers": "^6.13.4",
56
+ "fetch-retry": "^6.0.0",
57
+ "keccak": "^3.0.4",
58
+ "node-tfhe": "^1.1.2",
59
+ "node-tkms": "0.11.0-rc13",
60
+ "tfhe": "^1.1.2",
61
+ "tkms": "0.11.0-rc13",
62
+ "wasm-feature-detect": "^1.8.0"
63
+ },
64
+ "devDependencies": {
65
+ "@fetch-mock/jest": "^0.1.0",
66
+ "@jest/globals": "^29.7.0",
67
+ "@rollup/plugin-alias": "^5.1.0",
68
+ "@rollup/plugin-commonjs": "^25.0.0",
69
+ "@rollup/plugin-json": "^6.1.0",
70
+ "@rollup/plugin-node-resolve": "^15.1.0",
71
+ "@rollup/plugin-replace": "^5.0.2",
72
+ "@rollup/plugin-typescript": "^11.1.1",
73
+ "@rollup/plugin-url": "^8.0.2",
74
+ "@rollup/plugin-wasm": "^6.1.3",
75
+ "@surma/rollup-plugin-off-main-thread": "^2.2.3",
76
+ "@types/jest": "^29.5.1",
77
+ "@types/keccak": "^3.0.5",
78
+ "@types/node-fetch": "^2.6.11",
79
+ "buffer": "^6.0.3",
80
+ "crypto-browserify": "^3.12.0",
81
+ "fetch-mock": "^12.5.2",
82
+ "jest": "^29.5.0",
83
+ "jest-raw-loader": "^1.0.1",
84
+ "path-browserify": "^1.0.1",
85
+ "prettier": "^3.0.0",
86
+ "rollup-plugin-copy": "^3.5.0",
87
+ "rollup-plugin-polyfill-node": "^0.12.0",
88
+ "stream-browserify": "^3.0.0",
89
+ "to-array-buffer": "^3.2.0",
90
+ "ts-jest": "^29.1.0",
91
+ "ts-loader": "^9.4.2",
92
+ "tsc-alias": "^1.8.6",
93
+ "tslib": "^2.5.3",
94
+ "typescript": "^5.7.2",
95
+ "vite": "^6.2.5",
96
+ "vite-plugin-node-polyfills": "^0.23.0",
97
+ "vite-plugin-static-copy": "^2.2.0"
98
+ }
99
+ }
package/web.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/web';
package/web.js ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/web';