node-tkms 0.9.0-rc3 → 0.9.0-rc4

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/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause Clear License
2
+
3
+ Copyright © 2024 ZAMA.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this
13
+ list of conditions and the following disclaimer in the documentation and/or other
14
+ materials provided with the distribution.
15
+
16
+ 3. Neither the name of ZAMA nor the names of its contributors may be used to endorse
17
+ or promote products derived from this software without specific prior written permission.
18
+
19
+ NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
20
+ THIS SOFTWARE IS PROVIDED BY THE ZAMA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
21
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23
+ ZAMA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/kms_lib.js CHANGED
@@ -185,17 +185,24 @@ function debugString(val) {
185
185
  return className;
186
186
  }
187
187
 
188
+ function getArrayU8FromWasm0(ptr, len) {
189
+ ptr = ptr >>> 0;
190
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
191
+ }
192
+
193
+ function passArray8ToWasm0(arg, malloc) {
194
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
195
+ getUint8ArrayMemory0().set(arg, ptr / 1);
196
+ WASM_VECTOR_LEN = arg.length;
197
+ return ptr;
198
+ }
199
+
188
200
  function _assertClass(instance, klass) {
189
201
  if (!(instance instanceof klass)) {
190
202
  throw new Error(`expected instance of ${klass.name}`);
191
203
  }
192
204
  return instance.ptr;
193
205
  }
194
-
195
- function getArrayU8FromWasm0(ptr, len) {
196
- ptr = ptr >>> 0;
197
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
198
- }
199
206
  /**
200
207
  * @param {PublicSigKey} pk
201
208
  * @returns {Uint8Array}
@@ -215,12 +222,6 @@ module.exports.public_sig_key_to_u8vec = function(pk) {
215
222
  }
216
223
  };
217
224
 
218
- function passArray8ToWasm0(arg, malloc) {
219
- const ptr = malloc(arg.length * 1, 1) >>> 0;
220
- getUint8ArrayMemory0().set(arg, ptr / 1);
221
- WASM_VECTOR_LEN = arg.length;
222
- return ptr;
223
- }
224
225
  /**
225
226
  * @param {Uint8Array} v
226
227
  * @returns {PublicSigKey}
@@ -1754,13 +1755,6 @@ module.exports.__wbg_publicsigkey_new = function(arg0) {
1754
1755
  return addHeapObject(ret);
1755
1756
  };
1756
1757
 
1757
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
1758
- const obj = getObject(arg1);
1759
- const ret = typeof(obj) === 'number' ? obj : undefined;
1760
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1761
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1762
- };
1763
-
1764
1758
  module.exports.__wbg_publicsigkey_unwrap = function(arg0) {
1765
1759
  const ret = PublicSigKey.__unwrap(takeObject(arg0));
1766
1760
  return ret;
@@ -1771,6 +1765,13 @@ module.exports.__wbg_reencryptionresponse_unwrap = function(arg0) {
1771
1765
  return ret;
1772
1766
  };
1773
1767
 
1768
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
1769
+ const obj = getObject(arg1);
1770
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1771
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1772
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1773
+ };
1774
+
1774
1775
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
1775
1776
  const obj = getObject(arg1);
1776
1777
  const ret = typeof(obj) === 'string' ? obj : undefined;
package/kms_lib_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -3,7 +3,8 @@
3
3
  "collaborators": [
4
4
  "Zama"
5
5
  ],
6
- "version": "0.9.0-rc3",
6
+ "version": "0.9.0-rc4",
7
+ "license": "BSD-3-Clause-Clear",
7
8
  "files": [
8
9
  "kms_lib_bg.wasm",
9
10
  "kms_lib.js",