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 +28 -0
- package/kms_lib.d.ts +22 -22
- package/kms_lib.js +18 -17
- package/kms_lib_bg.wasm +0 -0
- package/package.json +2 -1
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.d.ts
CHANGED
|
@@ -414,25 +414,9 @@ export interface InitOutput {
|
|
|
414
414
|
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
415
415
|
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
416
416
|
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
417
|
-
readonly
|
|
418
|
-
readonly
|
|
419
|
-
readonly
|
|
420
|
-
readonly u8vec_to_private_sig_key: (a: number, b: number, c: number) => void;
|
|
421
|
-
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
422
|
-
readonly get_server_public_keys: (a: number, b: number) => void;
|
|
423
|
-
readonly get_client_secret_key: (a: number) => number;
|
|
424
|
-
readonly get_client_address: (a: number, b: number) => void;
|
|
425
|
-
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
|
426
|
-
readonly cryptobox_keygen: () => number;
|
|
427
|
-
readonly cryptobox_get_pk: (a: number) => number;
|
|
428
|
-
readonly cryptobox_pk_to_u8vec: (a: number, b: number) => void;
|
|
429
|
-
readonly cryptobox_sk_to_u8vec: (a: number, b: number) => void;
|
|
430
|
-
readonly u8vec_to_cryptobox_pk: (a: number, b: number, c: number) => void;
|
|
431
|
-
readonly u8vec_to_cryptobox_sk: (a: number, b: number, c: number) => void;
|
|
432
|
-
readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
|
|
433
|
-
readonly cryptobox_decrypt: (a: number, b: number, c: number, d: number) => void;
|
|
434
|
-
readonly process_reencryption_resp_from_js: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
435
|
-
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
417
|
+
readonly __wbg_plaintext_free: (a: number, b: number) => void;
|
|
418
|
+
readonly __wbg_get_plaintext_bytes: (a: number, b: number) => void;
|
|
419
|
+
readonly __wbg_set_plaintext_bytes: (a: number, b: number, c: number) => void;
|
|
436
420
|
readonly __wbg_requestid_free: (a: number, b: number) => void;
|
|
437
421
|
readonly __wbg_reencryptionrequestpayload_free: (a: number, b: number) => void;
|
|
438
422
|
readonly __wbg_get_reencryptionrequestpayload_version: (a: number) => number;
|
|
@@ -491,9 +475,25 @@ export interface InitOutput {
|
|
|
491
475
|
readonly __wbg_get_reencryptionresponsepayload_signcrypted_ciphertext: (a: number, b: number) => void;
|
|
492
476
|
readonly __wbg_get_requestid_request_id: (a: number, b: number) => void;
|
|
493
477
|
readonly __wbg_get_reencryptionrequestpayload_client_address: (a: number, b: number) => void;
|
|
494
|
-
readonly
|
|
495
|
-
readonly
|
|
496
|
-
readonly
|
|
478
|
+
readonly public_sig_key_to_u8vec: (a: number, b: number) => void;
|
|
479
|
+
readonly u8vec_to_public_sig_key: (a: number, b: number, c: number) => void;
|
|
480
|
+
readonly private_sig_key_to_u8vec: (a: number, b: number) => void;
|
|
481
|
+
readonly u8vec_to_private_sig_key: (a: number, b: number, c: number) => void;
|
|
482
|
+
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
483
|
+
readonly get_server_public_keys: (a: number, b: number) => void;
|
|
484
|
+
readonly get_client_secret_key: (a: number) => number;
|
|
485
|
+
readonly get_client_address: (a: number, b: number) => void;
|
|
486
|
+
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
|
487
|
+
readonly cryptobox_keygen: () => number;
|
|
488
|
+
readonly cryptobox_get_pk: (a: number) => number;
|
|
489
|
+
readonly cryptobox_pk_to_u8vec: (a: number, b: number) => void;
|
|
490
|
+
readonly cryptobox_sk_to_u8vec: (a: number, b: number) => void;
|
|
491
|
+
readonly u8vec_to_cryptobox_pk: (a: number, b: number, c: number) => void;
|
|
492
|
+
readonly u8vec_to_cryptobox_sk: (a: number, b: number, c: number) => void;
|
|
493
|
+
readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
|
|
494
|
+
readonly cryptobox_decrypt: (a: number, b: number, c: number, d: number) => void;
|
|
495
|
+
readonly process_reencryption_resp_from_js: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
496
|
+
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
497
497
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
498
498
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
499
499
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
package/kms_lib.js
CHANGED
|
@@ -181,17 +181,24 @@ function debugString(val) {
|
|
|
181
181
|
return className;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
185
|
+
ptr = ptr >>> 0;
|
|
186
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
190
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
191
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
192
|
+
WASM_VECTOR_LEN = arg.length;
|
|
193
|
+
return ptr;
|
|
194
|
+
}
|
|
195
|
+
|
|
184
196
|
function _assertClass(instance, klass) {
|
|
185
197
|
if (!(instance instanceof klass)) {
|
|
186
198
|
throw new Error(`expected instance of ${klass.name}`);
|
|
187
199
|
}
|
|
188
200
|
return instance.ptr;
|
|
189
201
|
}
|
|
190
|
-
|
|
191
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
192
|
-
ptr = ptr >>> 0;
|
|
193
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
194
|
-
}
|
|
195
202
|
/**
|
|
196
203
|
* @param {PublicSigKey} pk
|
|
197
204
|
* @returns {Uint8Array}
|
|
@@ -211,12 +218,6 @@ export function public_sig_key_to_u8vec(pk) {
|
|
|
211
218
|
}
|
|
212
219
|
}
|
|
213
220
|
|
|
214
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
215
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
216
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
217
|
-
WASM_VECTOR_LEN = arg.length;
|
|
218
|
-
return ptr;
|
|
219
|
-
}
|
|
220
221
|
/**
|
|
221
222
|
* @param {Uint8Array} v
|
|
222
223
|
* @returns {PublicSigKey}
|
|
@@ -1767,12 +1768,6 @@ function __wbg_get_imports() {
|
|
|
1767
1768
|
const ret = PublicSigKey.__wrap(arg0);
|
|
1768
1769
|
return addHeapObject(ret);
|
|
1769
1770
|
};
|
|
1770
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1771
|
-
const obj = getObject(arg1);
|
|
1772
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1773
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1774
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1775
|
-
};
|
|
1776
1771
|
imports.wbg.__wbg_publicsigkey_unwrap = function(arg0) {
|
|
1777
1772
|
const ret = PublicSigKey.__unwrap(takeObject(arg0));
|
|
1778
1773
|
return ret;
|
|
@@ -1781,6 +1776,12 @@ function __wbg_get_imports() {
|
|
|
1781
1776
|
const ret = ReencryptionResponse.__unwrap(takeObject(arg0));
|
|
1782
1777
|
return ret;
|
|
1783
1778
|
};
|
|
1779
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1780
|
+
const obj = getObject(arg1);
|
|
1781
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1782
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1783
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1784
|
+
};
|
|
1784
1785
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1785
1786
|
const obj = getObject(arg1);
|
|
1786
1787
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|