node-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.js CHANGED
@@ -22,6 +22,19 @@ function getStringFromWasm0(ptr, len) {
22
22
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
23
23
  }
24
24
 
25
+ function isLikeNone(x) {
26
+ return x === undefined || x === null;
27
+ }
28
+
29
+ let cachedDataViewMemory0 = null;
30
+
31
+ function getDataViewMemory0() {
32
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
33
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
34
+ }
35
+ return cachedDataViewMemory0;
36
+ }
37
+
25
38
  let WASM_VECTOR_LEN = 0;
26
39
 
27
40
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -78,19 +91,6 @@ function passStringToWasm0(arg, malloc, realloc) {
78
91
  return ptr;
79
92
  }
80
93
 
81
- function isLikeNone(x) {
82
- return x === undefined || x === null;
83
- }
84
-
85
- let cachedDataViewMemory0 = null;
86
-
87
- function getDataViewMemory0() {
88
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
89
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
90
- }
91
- return cachedDataViewMemory0;
92
- }
93
-
94
94
  function debugString(val) {
95
95
  // primitive types
96
96
  const type = typeof val;
@@ -156,24 +156,17 @@ function debugString(val) {
156
156
  return className;
157
157
  }
158
158
 
159
- function getArrayU8FromWasm0(ptr, len) {
160
- ptr = ptr >>> 0;
161
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
162
- }
163
-
164
- function passArray8ToWasm0(arg, malloc) {
165
- const ptr = malloc(arg.length * 1, 1) >>> 0;
166
- getUint8ArrayMemory0().set(arg, ptr / 1);
167
- WASM_VECTOR_LEN = arg.length;
168
- return ptr;
169
- }
170
-
171
159
  function _assertClass(instance, klass) {
172
160
  if (!(instance instanceof klass)) {
173
161
  throw new Error(`expected instance of ${klass.name}`);
174
162
  }
175
163
  return instance.ptr;
176
164
  }
165
+
166
+ function getArrayU8FromWasm0(ptr, len) {
167
+ ptr = ptr >>> 0;
168
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
169
+ }
177
170
  /**
178
171
  * @param {PublicSigKey} pk
179
172
  * @returns {Uint8Array}
@@ -186,6 +179,13 @@ module.exports.public_sig_key_to_u8vec = function(pk) {
186
179
  return v1;
187
180
  };
188
181
 
182
+ function passArray8ToWasm0(arg, malloc) {
183
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
184
+ getUint8ArrayMemory0().set(arg, ptr / 1);
185
+ WASM_VECTOR_LEN = arg.length;
186
+ return ptr;
187
+ }
188
+
189
189
  function takeFromExternrefTable0(idx) {
190
190
  const value = wasm.__wbindgen_export_2.get(idx);
191
191
  wasm.__externref_table_dealloc(idx);
@@ -1510,13 +1510,9 @@ module.exports.__wbindgen_error_new = function(arg0, arg1) {
1510
1510
  return ret;
1511
1511
  };
1512
1512
 
1513
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
1514
- const obj = arg1;
1515
- const ret = typeof(obj) === 'string' ? obj : undefined;
1516
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1517
- var len1 = WASM_VECTOR_LEN;
1518
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1519
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1513
+ module.exports.__wbg_reencryptionresponse_unwrap = function(arg0) {
1514
+ const ret = ReencryptionResponse.__unwrap(arg0);
1515
+ return ret;
1520
1516
  };
1521
1517
 
1522
1518
  module.exports.__wbindgen_number_get = function(arg0, arg1) {
@@ -1526,9 +1522,13 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
1526
1522
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1527
1523
  };
1528
1524
 
1529
- module.exports.__wbg_reencryptionresponse_unwrap = function(arg0) {
1530
- const ret = ReencryptionResponse.__unwrap(arg0);
1531
- return ret;
1525
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
1526
+ const obj = arg1;
1527
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1528
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1529
+ var len1 = WASM_VECTOR_LEN;
1530
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1531
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1532
1532
  };
1533
1533
 
1534
1534
  module.exports.__wbindgen_is_object = function(arg0) {
package/kms_lib_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "Zama"
5
5
  ],
6
- "version": "0.9.0-rc25",
6
+ "version": "0.9.0-rc29",
7
7
  "license": "BSD-3-Clause-Clear",
8
8
  "files": [
9
9
  "kms_lib_bg.wasm",