tkms 0.9.0-rc4 → 0.9.0-rc5
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 +12 -12
- package/kms_lib.js +6 -21
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
package/kms_lib.d.ts
CHANGED
|
@@ -31,17 +31,17 @@ export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
|
|
|
31
31
|
*
|
|
32
32
|
* * `param_choice` - the parameter choice, which can be either `"test"` or `"default"`.
|
|
33
33
|
* The "default" parameter choice is selected if no matching string is found.
|
|
34
|
-
* @param {(
|
|
34
|
+
* @param {(string)[]} server_addrs
|
|
35
35
|
* @param {string} client_address_hex
|
|
36
36
|
* @param {string} param_choice
|
|
37
37
|
* @returns {Client}
|
|
38
38
|
*/
|
|
39
|
-
export function new_client(
|
|
39
|
+
export function new_client(server_addrs: (string)[], client_address_hex: string, param_choice: string): Client;
|
|
40
40
|
/**
|
|
41
41
|
* @param {Client} client
|
|
42
|
-
* @returns {(
|
|
42
|
+
* @returns {(string)[]}
|
|
43
43
|
*/
|
|
44
|
-
export function
|
|
44
|
+
export function get_server_addrs(client: Client): (string)[];
|
|
45
45
|
/**
|
|
46
46
|
* @param {Client} client
|
|
47
47
|
* @returns {PrivateSigKey | undefined}
|
|
@@ -410,13 +410,6 @@ export interface InitOutput {
|
|
|
410
410
|
readonly memory: WebAssembly.Memory;
|
|
411
411
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
412
412
|
readonly __wbg_parsedreencryptionrequest_free: (a: number, b: number) => void;
|
|
413
|
-
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
414
|
-
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
415
|
-
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
416
|
-
readonly __wbg_privatesigkey_free: (a: number, b: 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;
|
|
420
413
|
readonly __wbg_requestid_free: (a: number, b: number) => void;
|
|
421
414
|
readonly __wbg_reencryptionrequestpayload_free: (a: number, b: number) => void;
|
|
422
415
|
readonly __wbg_get_reencryptionrequestpayload_version: (a: number) => number;
|
|
@@ -475,12 +468,19 @@ export interface InitOutput {
|
|
|
475
468
|
readonly __wbg_get_reencryptionresponsepayload_signcrypted_ciphertext: (a: number, b: number) => void;
|
|
476
469
|
readonly __wbg_get_requestid_request_id: (a: number, b: number) => void;
|
|
477
470
|
readonly __wbg_get_reencryptionrequestpayload_client_address: (a: number, b: number) => void;
|
|
471
|
+
readonly __wbg_plaintext_free: (a: number, b: number) => void;
|
|
472
|
+
readonly __wbg_get_plaintext_bytes: (a: number, b: number) => void;
|
|
473
|
+
readonly __wbg_set_plaintext_bytes: (a: number, b: number, c: number) => void;
|
|
474
|
+
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
475
|
+
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
476
|
+
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
477
|
+
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
478
478
|
readonly public_sig_key_to_u8vec: (a: number, b: number) => void;
|
|
479
479
|
readonly u8vec_to_public_sig_key: (a: number, b: number, c: number) => void;
|
|
480
480
|
readonly private_sig_key_to_u8vec: (a: number, b: number) => void;
|
|
481
481
|
readonly u8vec_to_private_sig_key: (a: number, b: number, c: number) => void;
|
|
482
482
|
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
483
|
-
readonly
|
|
483
|
+
readonly get_server_addrs: (a: number, b: number) => void;
|
|
484
484
|
readonly get_client_secret_key: (a: number) => number;
|
|
485
485
|
readonly get_client_address: (a: number, b: number) => void;
|
|
486
486
|
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
package/kms_lib.js
CHANGED
|
@@ -306,15 +306,15 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
306
306
|
*
|
|
307
307
|
* * `param_choice` - the parameter choice, which can be either `"test"` or `"default"`.
|
|
308
308
|
* The "default" parameter choice is selected if no matching string is found.
|
|
309
|
-
* @param {(
|
|
309
|
+
* @param {(string)[]} server_addrs
|
|
310
310
|
* @param {string} client_address_hex
|
|
311
311
|
* @param {string} param_choice
|
|
312
312
|
* @returns {Client}
|
|
313
313
|
*/
|
|
314
|
-
export function new_client(
|
|
314
|
+
export function new_client(server_addrs, client_address_hex, param_choice) {
|
|
315
315
|
try {
|
|
316
316
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
317
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
317
|
+
const ptr0 = passArrayJsValueToWasm0(server_addrs, wasm.__wbindgen_malloc);
|
|
318
318
|
const len0 = WASM_VECTOR_LEN;
|
|
319
319
|
const ptr1 = passStringToWasm0(client_address_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
320
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -344,13 +344,13 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
344
344
|
}
|
|
345
345
|
/**
|
|
346
346
|
* @param {Client} client
|
|
347
|
-
* @returns {(
|
|
347
|
+
* @returns {(string)[]}
|
|
348
348
|
*/
|
|
349
|
-
export function
|
|
349
|
+
export function get_server_addrs(client) {
|
|
350
350
|
try {
|
|
351
351
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
352
352
|
_assertClass(client, Client);
|
|
353
|
-
wasm.
|
|
353
|
+
wasm.get_server_addrs(retptr, client.__wbg_ptr);
|
|
354
354
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
355
355
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
356
356
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -1089,13 +1089,6 @@ export class PublicSigKey {
|
|
|
1089
1089
|
return obj;
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
1092
|
-
static __unwrap(jsValue) {
|
|
1093
|
-
if (!(jsValue instanceof PublicSigKey)) {
|
|
1094
|
-
return 0;
|
|
1095
|
-
}
|
|
1096
|
-
return jsValue.__destroy_into_raw();
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
1092
|
__destroy_into_raw() {
|
|
1100
1093
|
const ptr = this.__wbg_ptr;
|
|
1101
1094
|
this.__wbg_ptr = 0;
|
|
@@ -1764,14 +1757,6 @@ function __wbg_get_imports() {
|
|
|
1764
1757
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1765
1758
|
takeObject(arg0);
|
|
1766
1759
|
};
|
|
1767
|
-
imports.wbg.__wbg_publicsigkey_new = function(arg0) {
|
|
1768
|
-
const ret = PublicSigKey.__wrap(arg0);
|
|
1769
|
-
return addHeapObject(ret);
|
|
1770
|
-
};
|
|
1771
|
-
imports.wbg.__wbg_publicsigkey_unwrap = function(arg0) {
|
|
1772
|
-
const ret = PublicSigKey.__unwrap(takeObject(arg0));
|
|
1773
|
-
return ret;
|
|
1774
|
-
};
|
|
1775
1760
|
imports.wbg.__wbg_reencryptionresponse_unwrap = function(arg0) {
|
|
1776
1761
|
const ret = ReencryptionResponse.__unwrap(takeObject(arg0));
|
|
1777
1762
|
return ret;
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|