tkms 0.9.0-rc25 → 0.9.0-rc29

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/kms_lib.d.ts CHANGED
@@ -371,13 +371,25 @@ export interface InitOutput {
371
371
  readonly memory: WebAssembly.Memory;
372
372
  readonly __wbg_client_free: (a: number, b: number) => void;
373
373
  readonly __wbg_parsedreencryptionrequest_free: (a: number, b: number) => void;
374
- readonly __wbg_publicenckey_free: (a: number, b: number) => void;
375
- readonly __wbg_privateenckey_free: (a: number, b: number) => void;
376
- readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
377
- readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
378
- readonly __wbg_plaintext_free: (a: number, b: number) => void;
379
- readonly __wbg_get_plaintext_bytes: (a: number) => Array;
380
- readonly __wbg_set_plaintext_bytes: (a: number, b: number, c: number) => void;
374
+ readonly public_sig_key_to_u8vec: (a: number) => Array;
375
+ readonly u8vec_to_public_sig_key: (a: number, b: number) => Array;
376
+ readonly private_sig_key_to_u8vec: (a: number) => Array;
377
+ readonly u8vec_to_private_sig_key: (a: number, b: number) => Array;
378
+ readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => Array;
379
+ readonly get_server_addrs: (a: number) => Array;
380
+ readonly get_client_secret_key: (a: number) => number;
381
+ readonly get_client_address: (a: number) => Array;
382
+ readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
383
+ readonly cryptobox_keygen: () => number;
384
+ readonly cryptobox_get_pk: (a: number) => number;
385
+ readonly cryptobox_pk_to_u8vec: (a: number) => Array;
386
+ readonly cryptobox_sk_to_u8vec: (a: number) => Array;
387
+ readonly u8vec_to_cryptobox_pk: (a: number, b: number) => Array;
388
+ readonly u8vec_to_cryptobox_sk: (a: number, b: number) => Array;
389
+ readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
390
+ readonly cryptobox_decrypt: (a: number, b: number, c: number) => Array;
391
+ readonly process_reencryption_resp_from_js: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => Array;
392
+ readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => Array;
381
393
  readonly __wbg_requestid_free: (a: number, b: number) => void;
382
394
  readonly __wbg_reencryptionrequestpayload_free: (a: number, b: number) => void;
383
395
  readonly __wbg_get_reencryptionrequestpayload_version: (a: number) => number;
@@ -436,25 +448,13 @@ export interface InitOutput {
436
448
  readonly __wbg_get_reencryptionresponsepayload_signcrypted_ciphertext: (a: number) => Array;
437
449
  readonly __wbg_get_requestid_request_id: (a: number) => Array;
438
450
  readonly __wbg_get_reencryptionrequestpayload_client_address: (a: number) => Array;
439
- readonly public_sig_key_to_u8vec: (a: number) => Array;
440
- readonly u8vec_to_public_sig_key: (a: number, b: number) => Array;
441
- readonly private_sig_key_to_u8vec: (a: number) => Array;
442
- readonly u8vec_to_private_sig_key: (a: number, b: number) => Array;
443
- readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => Array;
444
- readonly get_server_addrs: (a: number) => Array;
445
- readonly get_client_secret_key: (a: number) => number;
446
- readonly get_client_address: (a: number) => Array;
447
- readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
448
- readonly cryptobox_keygen: () => number;
449
- readonly cryptobox_get_pk: (a: number) => number;
450
- readonly cryptobox_pk_to_u8vec: (a: number) => Array;
451
- readonly cryptobox_sk_to_u8vec: (a: number) => Array;
452
- readonly u8vec_to_cryptobox_pk: (a: number, b: number) => Array;
453
- readonly u8vec_to_cryptobox_sk: (a: number, b: number) => Array;
454
- readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
455
- readonly cryptobox_decrypt: (a: number, b: number, c: number) => Array;
456
- readonly process_reencryption_resp_from_js: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => Array;
457
- readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => Array;
451
+ readonly __wbg_publicenckey_free: (a: number, b: number) => void;
452
+ readonly __wbg_privateenckey_free: (a: number, b: number) => void;
453
+ readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
454
+ readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
455
+ readonly __wbg_plaintext_free: (a: number, b: number) => void;
456
+ readonly __wbg_get_plaintext_bytes: (a: number) => Array;
457
+ readonly __wbg_set_plaintext_bytes: (a: number, b: number, c: number) => void;
458
458
  readonly __wbindgen_malloc: (a: number, b: number) => number;
459
459
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
460
460
  readonly __wbindgen_export_2: WebAssembly.Table;
package/kms_lib.js CHANGED
@@ -18,6 +18,19 @@ function getStringFromWasm0(ptr, len) {
18
18
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
19
19
  }
20
20
 
21
+ function isLikeNone(x) {
22
+ return x === undefined || x === null;
23
+ }
24
+
25
+ let cachedDataViewMemory0 = null;
26
+
27
+ function getDataViewMemory0() {
28
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
29
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
30
+ }
31
+ return cachedDataViewMemory0;
32
+ }
33
+
21
34
  let WASM_VECTOR_LEN = 0;
22
35
 
23
36
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -74,19 +87,6 @@ function passStringToWasm0(arg, malloc, realloc) {
74
87
  return ptr;
75
88
  }
76
89
 
77
- function isLikeNone(x) {
78
- return x === undefined || x === null;
79
- }
80
-
81
- let cachedDataViewMemory0 = null;
82
-
83
- function getDataViewMemory0() {
84
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
85
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
86
- }
87
- return cachedDataViewMemory0;
88
- }
89
-
90
90
  function debugString(val) {
91
91
  // primitive types
92
92
  const type = typeof val;
@@ -152,24 +152,17 @@ function debugString(val) {
152
152
  return className;
153
153
  }
154
154
 
155
- function getArrayU8FromWasm0(ptr, len) {
156
- ptr = ptr >>> 0;
157
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
158
- }
159
-
160
- function passArray8ToWasm0(arg, malloc) {
161
- const ptr = malloc(arg.length * 1, 1) >>> 0;
162
- getUint8ArrayMemory0().set(arg, ptr / 1);
163
- WASM_VECTOR_LEN = arg.length;
164
- return ptr;
165
- }
166
-
167
155
  function _assertClass(instance, klass) {
168
156
  if (!(instance instanceof klass)) {
169
157
  throw new Error(`expected instance of ${klass.name}`);
170
158
  }
171
159
  return instance.ptr;
172
160
  }
161
+
162
+ function getArrayU8FromWasm0(ptr, len) {
163
+ ptr = ptr >>> 0;
164
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
165
+ }
173
166
  /**
174
167
  * @param {PublicSigKey} pk
175
168
  * @returns {Uint8Array}
@@ -182,6 +175,13 @@ export function public_sig_key_to_u8vec(pk) {
182
175
  return v1;
183
176
  }
184
177
 
178
+ function passArray8ToWasm0(arg, malloc) {
179
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
180
+ getUint8ArrayMemory0().set(arg, ptr / 1);
181
+ WASM_VECTOR_LEN = arg.length;
182
+ return ptr;
183
+ }
184
+
185
185
  function takeFromExternrefTable0(idx) {
186
186
  const value = wasm.__wbindgen_export_2.get(idx);
187
187
  wasm.__externref_table_dealloc(idx);
@@ -1525,13 +1525,9 @@ function __wbg_get_imports() {
1525
1525
  const ret = new Error(getStringFromWasm0(arg0, arg1));
1526
1526
  return ret;
1527
1527
  };
1528
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
1529
- const obj = arg1;
1530
- const ret = typeof(obj) === 'string' ? obj : undefined;
1531
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1532
- var len1 = WASM_VECTOR_LEN;
1533
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1534
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1528
+ imports.wbg.__wbg_reencryptionresponse_unwrap = function(arg0) {
1529
+ const ret = ReencryptionResponse.__unwrap(arg0);
1530
+ return ret;
1535
1531
  };
1536
1532
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
1537
1533
  const obj = arg1;
@@ -1539,9 +1535,13 @@ function __wbg_get_imports() {
1539
1535
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1540
1536
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1541
1537
  };
1542
- imports.wbg.__wbg_reencryptionresponse_unwrap = function(arg0) {
1543
- const ret = ReencryptionResponse.__unwrap(arg0);
1544
- return ret;
1538
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
1539
+ const obj = arg1;
1540
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1541
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1542
+ var len1 = WASM_VECTOR_LEN;
1543
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1544
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1545
1545
  };
1546
1546
  imports.wbg.__wbindgen_is_object = function(arg0) {
1547
1547
  const val = arg0;
package/kms_lib_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "collaborators": [
5
5
  "Zama"
6
6
  ],
7
- "version": "0.9.0-rc25",
7
+ "version": "0.9.0-rc29",
8
8
  "license": "BSD-3-Clause-Clear",
9
9
  "files": [
10
10
  "kms_lib_bg.wasm",