@zama-fhe/relayer-sdk 0.1.0-7 → 0.1.0-9

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.
package/bundle.d.ts CHANGED
@@ -12,6 +12,6 @@ export {
12
12
  EncryptionTypes,
13
13
  ENCRYPTION_TYPES,
14
14
  DecryptedResults,
15
- initFhevm,
15
+ initSDK,
16
16
  SepoliaConfig,
17
17
  } from './lib/web';
package/bundle.js CHANGED
@@ -1,3 +1,3 @@
1
- export const initFhevm = window.fhevm.initFhevm;
2
- export const createInstance = window.fhevm.createInstance;
3
- export const SepoliaConfig = window.fhevm.SepoliaConfig;
1
+ export const initSDK = window.relayerSDK.initSDK;
2
+ export const createInstance = window.relayerSDK.createInstance;
3
+ export const SepoliaConfig = window.relayerSDK.SepoliaConfig;
package/lib/web.d.ts CHANGED
@@ -101,7 +101,7 @@ export declare type HandleContractPair = {
101
101
  contractAddress: string;
102
102
  };
103
103
 
104
- export declare const initFhevm: ({ tfheParams, kmsParams, thread, }?: {
104
+ export declare const initSDK: ({ tfheParams, kmsParams, thread, }?: {
105
105
  tfheParams?: TFHEInput;
106
106
  kmsParams?: KMSInput;
107
107
  thread?: number;
package/lib/web.js CHANGED
@@ -24973,6 +24973,23 @@ function takeFromExternrefTable0(idx) {
24973
24973
  return value;
24974
24974
  }
24975
24975
 
24976
+ /**
24977
+ * Create a new [ServerIdAddr] structure that holds an ID and an address
24978
+ * which must be a valid EIP-55 address, notably prefixed with "0x".
24979
+ * @param {number} id
24980
+ * @param {string} addr
24981
+ * @returns {ServerIdAddr}
24982
+ */
24983
+ function new_server_id_addr(id, addr) {
24984
+ const ptr0 = passStringToWasm0(addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
24985
+ const len0 = WASM_VECTOR_LEN;
24986
+ const ret = wasm.new_server_id_addr(id, ptr0, len0);
24987
+ if (ret[2]) {
24988
+ throw takeFromExternrefTable0(ret[1]);
24989
+ }
24990
+ return ServerIdAddr.__wrap(ret[0]);
24991
+ }
24992
+
24976
24993
  function passArrayJsValueToWasm0(array, malloc) {
24977
24994
  const ptr = malloc(array.length * 4, 4) >>> 0;
24978
24995
  for (let i = 0; i < array.length; i++) {
@@ -27356,7 +27373,7 @@ const createInstance = async (config) => {
27356
27373
  };
27357
27374
 
27358
27375
  let initialized = false;
27359
- const initFhevm = async ({ tfheParams, kmsParams, thread, } = {}) => {
27376
+ const initSDK = async ({ tfheParams, kmsParams, thread, } = {}) => {
27360
27377
  if (thread == null)
27361
27378
  thread = navigator.hardwareConcurrency;
27362
27379
  let supportsThreads = await threads();
@@ -27393,6 +27410,7 @@ window.TKMS = {
27393
27410
  u8vec_to_ml_kem_pke_pk,
27394
27411
  u8vec_to_ml_kem_pke_sk,
27395
27412
  new_client,
27413
+ new_server_id_addr,
27396
27414
  process_user_decryption_resp_from_js,
27397
27415
  ml_kem_pke_keygen,
27398
27416
  ml_kem_pke_pk_to_u8vec,
@@ -27400,4 +27418,4 @@ window.TKMS = {
27400
27418
  ml_kem_pke_get_pk,
27401
27419
  };
27402
27420
 
27403
- export { ENCRYPTION_TYPES, SepoliaConfig, createEIP712, createInstance, generateKeypair, initFhevm };
27421
+ export { ENCRYPTION_TYPES, SepoliaConfig, createEIP712, createInstance, generateKeypair, initSDK };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zama-fhe/relayer-sdk",
3
- "version": "0.1.0-7",
3
+ "version": "0.1.0-9",
4
4
  "description": "fhevm Relayer SDK",
5
5
  "main": "lib/node.js",
6
6
  "types": "lib/node.d.ts",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "homepage": "https://github.com/zama-ai/relayer-sdk#readme",
63
63
  "dependencies": {
64
- "commander": "^11.0.0",
64
+ "commander": "^14.0.0",
65
65
  "ethers": "^6.13.4",
66
66
  "fetch-retry": "^6.0.0",
67
67
  "keccak": "^3.0.4",