node-tkms 0.9.1-rc1 → 0.10.0-rc1

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,17 +156,24 @@ 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
+
159
171
  function _assertClass(instance, klass) {
160
172
  if (!(instance instanceof klass)) {
161
173
  throw new Error(`expected instance of ${klass.name}`);
162
174
  }
163
175
  return instance.ptr;
164
176
  }
165
-
166
- function getArrayU8FromWasm0(ptr, len) {
167
- ptr = ptr >>> 0;
168
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
169
- }
170
177
  /**
171
178
  * @param {PublicSigKey} pk
172
179
  * @returns {Uint8Array}
@@ -179,13 +186,6 @@ module.exports.public_sig_key_to_u8vec = function(pk) {
179
186
  return v1;
180
187
  };
181
188
 
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);
@@ -1475,6 +1475,18 @@ module.exports.__wbindgen_error_new = function(arg0, arg1) {
1475
1475
  return ret;
1476
1476
  };
1477
1477
 
1478
+ module.exports.__wbg_reencryptionresponse_unwrap = function(arg0) {
1479
+ const ret = ReencryptionResponse.__unwrap(arg0);
1480
+ return ret;
1481
+ };
1482
+
1483
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
1484
+ const obj = arg1;
1485
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1486
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1487
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1488
+ };
1489
+
1478
1490
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
1479
1491
  const obj = arg1;
1480
1492
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1505,18 +1517,6 @@ module.exports.__wbindgen_is_null = function(arg0) {
1505
1517
  return ret;
1506
1518
  };
1507
1519
 
1508
- module.exports.__wbg_reencryptionresponse_unwrap = function(arg0) {
1509
- const ret = ReencryptionResponse.__unwrap(arg0);
1510
- return ret;
1511
- };
1512
-
1513
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
1514
- const obj = arg1;
1515
- const ret = typeof(obj) === 'number' ? obj : undefined;
1516
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1517
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1518
- };
1519
-
1520
1520
  module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
1521
1521
  const ret = arg0 == arg1;
1522
1522
  return ret;
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.1-rc1",
6
+ "version": "0.10.0-rc1",
7
7
  "license": "BSD-3-Clause-Clear",
8
8
  "files": [
9
9
  "kms_lib_bg.wasm",