tkms 0.13.21 → 0.14.0-0
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 +4 -33
- package/kms_lib.js +59 -142
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
package/kms_lib.d.ts
CHANGED
|
@@ -341,34 +341,6 @@ export function new_server_id_addr(id: number, addr: string): ServerIdAddr;
|
|
|
341
341
|
|
|
342
342
|
export function private_sig_key_to_u8vec(sk: PrivateSigKey): Uint8Array;
|
|
343
343
|
|
|
344
|
-
/**
|
|
345
|
-
* Process the user_decryption response from Rust objects.
|
|
346
|
-
* Consider using [process_user_decryption_resp_from_js]
|
|
347
|
-
* when using the JS API.
|
|
348
|
-
* The result is a byte array representing a plaintext of any length.
|
|
349
|
-
*
|
|
350
|
-
* * `client` - client that wants to perform user_decryption.
|
|
351
|
-
*
|
|
352
|
-
* * `request` - the initial user_decryption request.
|
|
353
|
-
* Must be given if `verify` is true.
|
|
354
|
-
*
|
|
355
|
-
* * `eip712_domain` - the EIP-712 domain.
|
|
356
|
-
* Must be given if `verify` is true.
|
|
357
|
-
*
|
|
358
|
-
* * `agg_resp` - the vector of user_decryption responses.
|
|
359
|
-
*
|
|
360
|
-
* * `enc_pk` - The ephemeral public key.
|
|
361
|
-
*
|
|
362
|
-
* * `enc_sk` - The ephemeral secret key.
|
|
363
|
-
*
|
|
364
|
-
* * `threshold` - Optional threshold override for reconstruction.
|
|
365
|
-
* If not provided, it is computed from the number of server addresses as `(n - 1) / 3`.
|
|
366
|
-
*
|
|
367
|
-
* * `verify` - Whether to perform signature verification for the response.
|
|
368
|
-
* It is insecure if `verify = false`!
|
|
369
|
-
*/
|
|
370
|
-
export function process_user_decryption_resp(client: Client, request: ParsedUserDecryptionRequest | null | undefined, eip712_domain: Eip712DomainMsg | null | undefined, agg_resp: UserDecryptionResponse[], enc_pk: PublicEncKeyMlKem512, enc_sk: PrivateEncKeyMlKem512, threshold: number | null | undefined, verify: boolean): TypedPlaintext[];
|
|
371
|
-
|
|
372
344
|
/**
|
|
373
345
|
* Process the user_decryption response from JavaScript objects.
|
|
374
346
|
* The returned result is a byte array representing a plaintext of any length,
|
|
@@ -452,6 +424,10 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
452
424
|
export interface InitOutput {
|
|
453
425
|
readonly memory: WebAssembly.Memory;
|
|
454
426
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
427
|
+
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
428
|
+
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
429
|
+
readonly __wbg_ciphertexthandle_free: (a: number, b: number) => void;
|
|
430
|
+
readonly __wbg_parseduserdecryptionrequest_free: (a: number, b: number) => void;
|
|
455
431
|
readonly __wbg_privateenckeymlkem512_free: (a: number, b: number) => void;
|
|
456
432
|
readonly __wbg_publicenckeymlkem512_free: (a: number, b: number) => void;
|
|
457
433
|
readonly __wbg_serveridaddr_free: (a: number, b: number) => void;
|
|
@@ -469,17 +445,12 @@ export interface InitOutput {
|
|
|
469
445
|
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
470
446
|
readonly new_server_id_addr: (a: number, b: number, c: number) => [number, number, number];
|
|
471
447
|
readonly private_sig_key_to_u8vec: (a: number) => [number, number, number, number];
|
|
472
|
-
readonly process_user_decryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number, number];
|
|
473
448
|
readonly process_user_decryption_resp_from_js: (a: number, b: any, c: any, d: any, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
474
449
|
readonly public_sig_key_to_u8vec: (a: number) => [number, number];
|
|
475
450
|
readonly u8vec_to_ml_kem_pke_pk: (a: number, b: number) => [number, number, number];
|
|
476
451
|
readonly u8vec_to_ml_kem_pke_sk: (a: number, b: number) => [number, number, number];
|
|
477
452
|
readonly u8vec_to_private_sig_key: (a: number, b: number) => [number, number, number];
|
|
478
453
|
readonly u8vec_to_public_sig_key: (a: number, b: number) => [number, number, number];
|
|
479
|
-
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
480
|
-
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
481
|
-
readonly __wbg_ciphertexthandle_free: (a: number, b: number) => void;
|
|
482
|
-
readonly __wbg_parseduserdecryptionrequest_free: (a: number, b: number) => void;
|
|
483
454
|
readonly __wbg_eip712domainmsg_free: (a: number, b: number) => void;
|
|
484
455
|
readonly __wbg_get_eip712domainmsg_chain_id: (a: number) => [number, number];
|
|
485
456
|
readonly __wbg_get_eip712domainmsg_name: (a: number) => [number, number];
|
package/kms_lib.js
CHANGED
|
@@ -23,7 +23,6 @@ if (Symbol.dispose) CiphertextHandle.prototype[Symbol.dispose] = CiphertextHandl
|
|
|
23
23
|
*/
|
|
24
24
|
export class Client {
|
|
25
25
|
static __wrap(ptr) {
|
|
26
|
-
ptr = ptr >>> 0;
|
|
27
26
|
const obj = Object.create(Client.prototype);
|
|
28
27
|
obj.__wbg_ptr = ptr;
|
|
29
28
|
ClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -49,7 +48,6 @@ if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
|
|
|
49
48
|
*/
|
|
50
49
|
export class Eip712DomainMsg {
|
|
51
50
|
static __wrap(ptr) {
|
|
52
|
-
ptr = ptr >>> 0;
|
|
53
51
|
const obj = Object.create(Eip712DomainMsg.prototype);
|
|
54
52
|
obj.__wbg_ptr = ptr;
|
|
55
53
|
Eip712DomainMsgFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -193,7 +191,6 @@ if (Symbol.dispose) ParsedUserDecryptionRequest.prototype[Symbol.dispose] = Pars
|
|
|
193
191
|
|
|
194
192
|
export class PrivateEncKeyMlKem512 {
|
|
195
193
|
static __wrap(ptr) {
|
|
196
|
-
ptr = ptr >>> 0;
|
|
197
194
|
const obj = Object.create(PrivateEncKeyMlKem512.prototype);
|
|
198
195
|
obj.__wbg_ptr = ptr;
|
|
199
196
|
PrivateEncKeyMlKem512Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -214,7 +211,6 @@ if (Symbol.dispose) PrivateEncKeyMlKem512.prototype[Symbol.dispose] = PrivateEnc
|
|
|
214
211
|
|
|
215
212
|
export class PrivateSigKey {
|
|
216
213
|
static __wrap(ptr) {
|
|
217
|
-
ptr = ptr >>> 0;
|
|
218
214
|
const obj = Object.create(PrivateSigKey.prototype);
|
|
219
215
|
obj.__wbg_ptr = ptr;
|
|
220
216
|
PrivateSigKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -235,7 +231,6 @@ if (Symbol.dispose) PrivateSigKey.prototype[Symbol.dispose] = PrivateSigKey.prot
|
|
|
235
231
|
|
|
236
232
|
export class PublicEncKeyMlKem512 {
|
|
237
233
|
static __wrap(ptr) {
|
|
238
|
-
ptr = ptr >>> 0;
|
|
239
234
|
const obj = Object.create(PublicEncKeyMlKem512.prototype);
|
|
240
235
|
obj.__wbg_ptr = ptr;
|
|
241
236
|
PublicEncKeyMlKem512Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -256,7 +251,6 @@ if (Symbol.dispose) PublicEncKeyMlKem512.prototype[Symbol.dispose] = PublicEncKe
|
|
|
256
251
|
|
|
257
252
|
export class PublicSigKey {
|
|
258
253
|
static __wrap(ptr) {
|
|
259
|
-
ptr = ptr >>> 0;
|
|
260
254
|
const obj = Object.create(PublicSigKey.prototype);
|
|
261
255
|
obj.__wbg_ptr = ptr;
|
|
262
256
|
PublicSigKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -282,7 +276,6 @@ if (Symbol.dispose) PublicSigKey.prototype[Symbol.dispose] = PublicSigKey.protot
|
|
|
282
276
|
*/
|
|
283
277
|
export class RequestId {
|
|
284
278
|
static __wrap(ptr) {
|
|
285
|
-
ptr = ptr >>> 0;
|
|
286
279
|
const obj = Object.create(RequestId.prototype);
|
|
287
280
|
obj.__wbg_ptr = ptr;
|
|
288
281
|
RequestIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -326,7 +319,6 @@ if (Symbol.dispose) RequestId.prototype[Symbol.dispose] = RequestId.prototype.fr
|
|
|
326
319
|
|
|
327
320
|
export class ServerIdAddr {
|
|
328
321
|
static __wrap(ptr) {
|
|
329
|
-
ptr = ptr >>> 0;
|
|
330
322
|
const obj = Object.create(ServerIdAddr.prototype);
|
|
331
323
|
obj.__wbg_ptr = ptr;
|
|
332
324
|
ServerIdAddrFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -353,7 +345,6 @@ if (Symbol.dispose) ServerIdAddr.prototype[Symbol.dispose] = ServerIdAddr.protot
|
|
|
353
345
|
|
|
354
346
|
export class TypedCiphertext {
|
|
355
347
|
static __wrap(ptr) {
|
|
356
|
-
ptr = ptr >>> 0;
|
|
357
348
|
const obj = Object.create(TypedCiphertext.prototype);
|
|
358
349
|
obj.__wbg_ptr = ptr;
|
|
359
350
|
TypedCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -452,7 +443,6 @@ if (Symbol.dispose) TypedCiphertext.prototype[Symbol.dispose] = TypedCiphertext.
|
|
|
452
443
|
|
|
453
444
|
export class TypedPlaintext {
|
|
454
445
|
static __wrap(ptr) {
|
|
455
|
-
ptr = ptr >>> 0;
|
|
456
446
|
const obj = Object.create(TypedPlaintext.prototype);
|
|
457
447
|
obj.__wbg_ptr = ptr;
|
|
458
448
|
TypedPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -509,7 +499,6 @@ if (Symbol.dispose) TypedPlaintext.prototype[Symbol.dispose] = TypedPlaintext.pr
|
|
|
509
499
|
|
|
510
500
|
export class TypedSigncryptedCiphertext {
|
|
511
501
|
static __wrap(ptr) {
|
|
512
|
-
ptr = ptr >>> 0;
|
|
513
502
|
const obj = Object.create(TypedSigncryptedCiphertext.prototype);
|
|
514
503
|
obj.__wbg_ptr = ptr;
|
|
515
504
|
TypedSigncryptedCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -817,12 +806,6 @@ export class UserDecryptionRequest {
|
|
|
817
806
|
if (Symbol.dispose) UserDecryptionRequest.prototype[Symbol.dispose] = UserDecryptionRequest.prototype.free;
|
|
818
807
|
|
|
819
808
|
export class UserDecryptionResponse {
|
|
820
|
-
static __unwrap(jsValue) {
|
|
821
|
-
if (!(jsValue instanceof UserDecryptionResponse)) {
|
|
822
|
-
return 0;
|
|
823
|
-
}
|
|
824
|
-
return jsValue.__destroy_into_raw();
|
|
825
|
-
}
|
|
826
809
|
__destroy_into_raw() {
|
|
827
810
|
const ptr = this.__wbg_ptr;
|
|
828
811
|
this.__wbg_ptr = 0;
|
|
@@ -927,7 +910,6 @@ if (Symbol.dispose) UserDecryptionResponse.prototype[Symbol.dispose] = UserDecry
|
|
|
927
910
|
|
|
928
911
|
export class UserDecryptionResponsePayload {
|
|
929
912
|
static __wrap(ptr) {
|
|
930
|
-
ptr = ptr >>> 0;
|
|
931
913
|
const obj = Object.create(UserDecryptionResponsePayload.prototype);
|
|
932
914
|
obj.__wbg_ptr = ptr;
|
|
933
915
|
UserDecryptionResponsePayloadFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -1248,66 +1230,6 @@ export function private_sig_key_to_u8vec(sk) {
|
|
|
1248
1230
|
return v1;
|
|
1249
1231
|
}
|
|
1250
1232
|
|
|
1251
|
-
/**
|
|
1252
|
-
* Process the user_decryption response from Rust objects.
|
|
1253
|
-
* Consider using [process_user_decryption_resp_from_js]
|
|
1254
|
-
* when using the JS API.
|
|
1255
|
-
* The result is a byte array representing a plaintext of any length.
|
|
1256
|
-
*
|
|
1257
|
-
* * `client` - client that wants to perform user_decryption.
|
|
1258
|
-
*
|
|
1259
|
-
* * `request` - the initial user_decryption request.
|
|
1260
|
-
* Must be given if `verify` is true.
|
|
1261
|
-
*
|
|
1262
|
-
* * `eip712_domain` - the EIP-712 domain.
|
|
1263
|
-
* Must be given if `verify` is true.
|
|
1264
|
-
*
|
|
1265
|
-
* * `agg_resp` - the vector of user_decryption responses.
|
|
1266
|
-
*
|
|
1267
|
-
* * `enc_pk` - The ephemeral public key.
|
|
1268
|
-
*
|
|
1269
|
-
* * `enc_sk` - The ephemeral secret key.
|
|
1270
|
-
*
|
|
1271
|
-
* * `threshold` - Optional threshold override for reconstruction.
|
|
1272
|
-
* If not provided, it is computed from the number of server addresses as `(n - 1) / 3`.
|
|
1273
|
-
*
|
|
1274
|
-
* * `verify` - Whether to perform signature verification for the response.
|
|
1275
|
-
* It is insecure if `verify = false`!
|
|
1276
|
-
* @param {Client} client
|
|
1277
|
-
* @param {ParsedUserDecryptionRequest | null | undefined} request
|
|
1278
|
-
* @param {Eip712DomainMsg | null | undefined} eip712_domain
|
|
1279
|
-
* @param {UserDecryptionResponse[]} agg_resp
|
|
1280
|
-
* @param {PublicEncKeyMlKem512} enc_pk
|
|
1281
|
-
* @param {PrivateEncKeyMlKem512} enc_sk
|
|
1282
|
-
* @param {number | null | undefined} threshold
|
|
1283
|
-
* @param {boolean} verify
|
|
1284
|
-
* @returns {TypedPlaintext[]}
|
|
1285
|
-
*/
|
|
1286
|
-
export function process_user_decryption_resp(client, request, eip712_domain, agg_resp, enc_pk, enc_sk, threshold, verify) {
|
|
1287
|
-
_assertClass(client, Client);
|
|
1288
|
-
let ptr0 = 0;
|
|
1289
|
-
if (!isLikeNone(request)) {
|
|
1290
|
-
_assertClass(request, ParsedUserDecryptionRequest);
|
|
1291
|
-
ptr0 = request.__destroy_into_raw();
|
|
1292
|
-
}
|
|
1293
|
-
let ptr1 = 0;
|
|
1294
|
-
if (!isLikeNone(eip712_domain)) {
|
|
1295
|
-
_assertClass(eip712_domain, Eip712DomainMsg);
|
|
1296
|
-
ptr1 = eip712_domain.__destroy_into_raw();
|
|
1297
|
-
}
|
|
1298
|
-
const ptr2 = passArrayJsValueToWasm0(agg_resp, wasm.__wbindgen_malloc);
|
|
1299
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1300
|
-
_assertClass(enc_pk, PublicEncKeyMlKem512);
|
|
1301
|
-
_assertClass(enc_sk, PrivateEncKeyMlKem512);
|
|
1302
|
-
const ret = wasm.process_user_decryption_resp(client.__wbg_ptr, ptr0, ptr1, ptr2, len2, enc_pk.__wbg_ptr, enc_sk.__wbg_ptr, isLikeNone(threshold) ? 0x100000001 : (threshold) >>> 0, verify);
|
|
1303
|
-
if (ret[3]) {
|
|
1304
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1305
|
-
}
|
|
1306
|
-
var v4 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1307
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1308
|
-
return v4;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
1233
|
/**
|
|
1312
1234
|
* Process the user_decryption response from JavaScript objects.
|
|
1313
1235
|
* The returned result is a byte array representing a plaintext of any length,
|
|
@@ -1387,7 +1309,7 @@ export function process_user_decryption_resp_from_js(client, request, eip712_dom
|
|
|
1387
1309
|
_assertClass(client, Client);
|
|
1388
1310
|
_assertClass(enc_pk, PublicEncKeyMlKem512);
|
|
1389
1311
|
_assertClass(enc_sk, PrivateEncKeyMlKem512);
|
|
1390
|
-
const ret = wasm.process_user_decryption_resp_from_js(client.__wbg_ptr, request, eip712_domain, agg_resp, enc_pk.__wbg_ptr, enc_sk.__wbg_ptr, isLikeNone(threshold) ?
|
|
1312
|
+
const ret = wasm.process_user_decryption_resp_from_js(client.__wbg_ptr, request, eip712_domain, agg_resp, enc_pk.__wbg_ptr, enc_sk.__wbg_ptr, isLikeNone(threshold) ? Number.MAX_SAFE_INTEGER : (threshold) >>> 0, verify);
|
|
1391
1313
|
if (ret[3]) {
|
|
1392
1314
|
throw takeFromExternrefTable0(ret[2]);
|
|
1393
1315
|
}
|
|
@@ -1463,15 +1385,14 @@ export function u8vec_to_public_sig_key(v) {
|
|
|
1463
1385
|
}
|
|
1464
1386
|
return PublicSigKey.__wrap(ret[0]);
|
|
1465
1387
|
}
|
|
1466
|
-
|
|
1467
1388
|
function __wbg_get_imports() {
|
|
1468
1389
|
const import0 = {
|
|
1469
1390
|
__proto__: null,
|
|
1470
|
-
|
|
1391
|
+
__wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
|
|
1471
1392
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1472
1393
|
return ret;
|
|
1473
1394
|
},
|
|
1474
|
-
|
|
1395
|
+
__wbg_Number_c4bdf66bb78f7977: function(arg0) {
|
|
1475
1396
|
const ret = Number(arg0);
|
|
1476
1397
|
return ret;
|
|
1477
1398
|
},
|
|
@@ -1482,54 +1403,54 @@ function __wbg_get_imports() {
|
|
|
1482
1403
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1483
1404
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1484
1405
|
},
|
|
1485
|
-
|
|
1406
|
+
__wbg___wbindgen_boolean_get_edaed31a367ce1bd: function(arg0) {
|
|
1486
1407
|
const v = arg0;
|
|
1487
1408
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1488
1409
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1489
1410
|
},
|
|
1490
|
-
|
|
1411
|
+
__wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
|
|
1491
1412
|
const ret = debugString(arg1);
|
|
1492
1413
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1493
1414
|
const len1 = WASM_VECTOR_LEN;
|
|
1494
1415
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1495
1416
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1496
1417
|
},
|
|
1497
|
-
|
|
1418
|
+
__wbg___wbindgen_in_4990f46af709e33c: function(arg0, arg1) {
|
|
1498
1419
|
const ret = arg0 in arg1;
|
|
1499
1420
|
return ret;
|
|
1500
1421
|
},
|
|
1501
|
-
|
|
1422
|
+
__wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) {
|
|
1502
1423
|
const ret = typeof(arg0) === 'function';
|
|
1503
1424
|
return ret;
|
|
1504
1425
|
},
|
|
1505
|
-
|
|
1426
|
+
__wbg___wbindgen_is_null_6d937fbfb6478470: function(arg0) {
|
|
1506
1427
|
const ret = arg0 === null;
|
|
1507
1428
|
return ret;
|
|
1508
1429
|
},
|
|
1509
|
-
|
|
1430
|
+
__wbg___wbindgen_is_object_0beba4a1980d3eea: function(arg0) {
|
|
1510
1431
|
const val = arg0;
|
|
1511
1432
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1512
1433
|
return ret;
|
|
1513
1434
|
},
|
|
1514
|
-
|
|
1435
|
+
__wbg___wbindgen_is_string_1fca8072260dd261: function(arg0) {
|
|
1515
1436
|
const ret = typeof(arg0) === 'string';
|
|
1516
1437
|
return ret;
|
|
1517
1438
|
},
|
|
1518
|
-
|
|
1439
|
+
__wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) {
|
|
1519
1440
|
const ret = arg0 === undefined;
|
|
1520
1441
|
return ret;
|
|
1521
1442
|
},
|
|
1522
|
-
|
|
1443
|
+
__wbg___wbindgen_jsval_loose_eq_4b9aba9e5b3c4582: function(arg0, arg1) {
|
|
1523
1444
|
const ret = arg0 == arg1;
|
|
1524
1445
|
return ret;
|
|
1525
1446
|
},
|
|
1526
|
-
|
|
1447
|
+
__wbg___wbindgen_number_get_1cc01dd708740256: function(arg0, arg1) {
|
|
1527
1448
|
const obj = arg1;
|
|
1528
1449
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1529
1450
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1530
1451
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1531
1452
|
},
|
|
1532
|
-
|
|
1453
|
+
__wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) {
|
|
1533
1454
|
const obj = arg1;
|
|
1534
1455
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1535
1456
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1537,14 +1458,14 @@ function __wbg_get_imports() {
|
|
|
1537
1458
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1538
1459
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1539
1460
|
},
|
|
1540
|
-
|
|
1461
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
1541
1462
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1542
1463
|
},
|
|
1543
|
-
|
|
1464
|
+
__wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1544
1465
|
const ret = arg0.call(arg1, arg2);
|
|
1545
1466
|
return ret;
|
|
1546
1467
|
}, arguments); },
|
|
1547
|
-
|
|
1468
|
+
__wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) {
|
|
1548
1469
|
const ret = arg0.call(arg1);
|
|
1549
1470
|
return ret;
|
|
1550
1471
|
}, arguments); },
|
|
@@ -1552,7 +1473,7 @@ function __wbg_get_imports() {
|
|
|
1552
1473
|
const ret = arg0.crypto;
|
|
1553
1474
|
return ret;
|
|
1554
1475
|
},
|
|
1555
|
-
|
|
1476
|
+
__wbg_done_b62d4a7d2286852a: function(arg0) {
|
|
1556
1477
|
const ret = arg0.done;
|
|
1557
1478
|
return ret;
|
|
1558
1479
|
},
|
|
@@ -1570,11 +1491,11 @@ function __wbg_get_imports() {
|
|
|
1570
1491
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1571
1492
|
arg0.getRandomValues(arg1);
|
|
1572
1493
|
}, arguments); },
|
|
1573
|
-
|
|
1494
|
+
__wbg_get_9a29be2cb383ed9a: function() { return handleError(function (arg0, arg1) {
|
|
1574
1495
|
const ret = Reflect.get(arg0, arg1);
|
|
1575
1496
|
return ret;
|
|
1576
1497
|
}, arguments); },
|
|
1577
|
-
|
|
1498
|
+
__wbg_get_unchecked_54a4374c38e08460: function(arg0, arg1) {
|
|
1578
1499
|
const ret = arg0[arg1 >>> 0];
|
|
1579
1500
|
return ret;
|
|
1580
1501
|
},
|
|
@@ -1582,7 +1503,7 @@ function __wbg_get_imports() {
|
|
|
1582
1503
|
const ret = arg0[arg1];
|
|
1583
1504
|
return ret;
|
|
1584
1505
|
},
|
|
1585
|
-
|
|
1506
|
+
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
1586
1507
|
let result;
|
|
1587
1508
|
try {
|
|
1588
1509
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1592,7 +1513,7 @@ function __wbg_get_imports() {
|
|
|
1592
1513
|
const ret = result;
|
|
1593
1514
|
return ret;
|
|
1594
1515
|
},
|
|
1595
|
-
|
|
1516
|
+
__wbg_instanceof_Uint8Array_f080092dc70f5d58: function(arg0) {
|
|
1596
1517
|
let result;
|
|
1597
1518
|
try {
|
|
1598
1519
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1602,23 +1523,23 @@ function __wbg_get_imports() {
|
|
|
1602
1523
|
const ret = result;
|
|
1603
1524
|
return ret;
|
|
1604
1525
|
},
|
|
1605
|
-
|
|
1526
|
+
__wbg_isArray_145a34fd0a38d37b: function(arg0) {
|
|
1606
1527
|
const ret = Array.isArray(arg0);
|
|
1607
1528
|
return ret;
|
|
1608
1529
|
},
|
|
1609
|
-
|
|
1530
|
+
__wbg_isSafeInteger_a3389a198582f5f6: function(arg0) {
|
|
1610
1531
|
const ret = Number.isSafeInteger(arg0);
|
|
1611
1532
|
return ret;
|
|
1612
1533
|
},
|
|
1613
|
-
|
|
1534
|
+
__wbg_iterator_cc47ba25a2be735a: function() {
|
|
1614
1535
|
const ret = Symbol.iterator;
|
|
1615
1536
|
return ret;
|
|
1616
1537
|
},
|
|
1617
|
-
|
|
1538
|
+
__wbg_length_589238bdcf171f0e: function(arg0) {
|
|
1618
1539
|
const ret = arg0.length;
|
|
1619
1540
|
return ret;
|
|
1620
1541
|
},
|
|
1621
|
-
|
|
1542
|
+
__wbg_length_c6054974c0a6cdb9: function(arg0) {
|
|
1622
1543
|
const ret = arg0.length;
|
|
1623
1544
|
return ret;
|
|
1624
1545
|
},
|
|
@@ -1630,19 +1551,19 @@ function __wbg_get_imports() {
|
|
|
1630
1551
|
const ret = new Error();
|
|
1631
1552
|
return ret;
|
|
1632
1553
|
},
|
|
1633
|
-
|
|
1554
|
+
__wbg_new_81880fb5002cb255: function(arg0) {
|
|
1634
1555
|
const ret = new Uint8Array(arg0);
|
|
1635
1556
|
return ret;
|
|
1636
1557
|
},
|
|
1637
|
-
|
|
1558
|
+
__wbg_new_with_length_9b650f44b5c44a4e: function(arg0) {
|
|
1638
1559
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1639
1560
|
return ret;
|
|
1640
1561
|
},
|
|
1641
|
-
|
|
1562
|
+
__wbg_next_0c4066e251d2eff9: function() { return handleError(function (arg0) {
|
|
1642
1563
|
const ret = arg0.next();
|
|
1643
1564
|
return ret;
|
|
1644
1565
|
}, arguments); },
|
|
1645
|
-
|
|
1566
|
+
__wbg_next_402fa10b59ab20c3: function(arg0) {
|
|
1646
1567
|
const ret = arg0.next;
|
|
1647
1568
|
return ret;
|
|
1648
1569
|
},
|
|
@@ -1654,7 +1575,7 @@ function __wbg_get_imports() {
|
|
|
1654
1575
|
const ret = arg0.process;
|
|
1655
1576
|
return ret;
|
|
1656
1577
|
},
|
|
1657
|
-
|
|
1578
|
+
__wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
|
|
1658
1579
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1659
1580
|
},
|
|
1660
1581
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1679,23 +1600,23 @@ function __wbg_get_imports() {
|
|
|
1679
1600
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1680
1601
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1681
1602
|
},
|
|
1682
|
-
|
|
1683
|
-
const ret = typeof
|
|
1603
|
+
__wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() {
|
|
1604
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1684
1605
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1685
1606
|
},
|
|
1686
|
-
|
|
1687
|
-
const ret = typeof
|
|
1607
|
+
__wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() {
|
|
1608
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1688
1609
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1689
1610
|
},
|
|
1690
|
-
|
|
1611
|
+
__wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() {
|
|
1691
1612
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1692
1613
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1693
1614
|
},
|
|
1694
|
-
|
|
1615
|
+
__wbg_static_accessor_WINDOW_168f178805d978fe: function() {
|
|
1695
1616
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1696
1617
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1697
1618
|
},
|
|
1698
|
-
|
|
1619
|
+
__wbg_subarray_b0e8ac4ed313fea8: function(arg0, arg1, arg2) {
|
|
1699
1620
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1700
1621
|
return ret;
|
|
1701
1622
|
},
|
|
@@ -1719,11 +1640,7 @@ function __wbg_get_imports() {
|
|
|
1719
1640
|
const ret = TypedSigncryptedCiphertext.__unwrap(arg0);
|
|
1720
1641
|
return ret;
|
|
1721
1642
|
},
|
|
1722
|
-
|
|
1723
|
-
const ret = UserDecryptionResponse.__unwrap(arg0);
|
|
1724
|
-
return ret;
|
|
1725
|
-
},
|
|
1726
|
-
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
1643
|
+
__wbg_value_49f783bb59765962: function(arg0) {
|
|
1727
1644
|
const ret = arg0.value;
|
|
1728
1645
|
return ret;
|
|
1729
1646
|
},
|
|
@@ -1759,52 +1676,52 @@ function __wbg_get_imports() {
|
|
|
1759
1676
|
|
|
1760
1677
|
const CiphertextHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1761
1678
|
? { register: () => {}, unregister: () => {} }
|
|
1762
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertexthandle_free(ptr
|
|
1679
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertexthandle_free(ptr, 1));
|
|
1763
1680
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1764
1681
|
? { register: () => {}, unregister: () => {} }
|
|
1765
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr
|
|
1682
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr, 1));
|
|
1766
1683
|
const Eip712DomainMsgFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1767
1684
|
? { register: () => {}, unregister: () => {} }
|
|
1768
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_eip712domainmsg_free(ptr
|
|
1685
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eip712domainmsg_free(ptr, 1));
|
|
1769
1686
|
const ParsedUserDecryptionRequestFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1770
1687
|
? { register: () => {}, unregister: () => {} }
|
|
1771
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_parseduserdecryptionrequest_free(ptr
|
|
1688
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_parseduserdecryptionrequest_free(ptr, 1));
|
|
1772
1689
|
const PrivateEncKeyMlKem512Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
1773
1690
|
? { register: () => {}, unregister: () => {} }
|
|
1774
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_privateenckeymlkem512_free(ptr
|
|
1691
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_privateenckeymlkem512_free(ptr, 1));
|
|
1775
1692
|
const PrivateSigKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1776
1693
|
? { register: () => {}, unregister: () => {} }
|
|
1777
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_privatesigkey_free(ptr
|
|
1694
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_privatesigkey_free(ptr, 1));
|
|
1778
1695
|
const PublicEncKeyMlKem512Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
1779
1696
|
? { register: () => {}, unregister: () => {} }
|
|
1780
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_publicenckeymlkem512_free(ptr
|
|
1697
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_publicenckeymlkem512_free(ptr, 1));
|
|
1781
1698
|
const PublicSigKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1782
1699
|
? { register: () => {}, unregister: () => {} }
|
|
1783
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_publicsigkey_free(ptr
|
|
1700
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_publicsigkey_free(ptr, 1));
|
|
1784
1701
|
const RequestIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1785
1702
|
? { register: () => {}, unregister: () => {} }
|
|
1786
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_requestid_free(ptr
|
|
1703
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_requestid_free(ptr, 1));
|
|
1787
1704
|
const ServerIdAddrFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1788
1705
|
? { register: () => {}, unregister: () => {} }
|
|
1789
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_serveridaddr_free(ptr
|
|
1706
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_serveridaddr_free(ptr, 1));
|
|
1790
1707
|
const TypedCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1791
1708
|
? { register: () => {}, unregister: () => {} }
|
|
1792
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedciphertext_free(ptr
|
|
1709
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedciphertext_free(ptr, 1));
|
|
1793
1710
|
const TypedPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1794
1711
|
? { register: () => {}, unregister: () => {} }
|
|
1795
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedplaintext_free(ptr
|
|
1712
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedplaintext_free(ptr, 1));
|
|
1796
1713
|
const TypedSigncryptedCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1797
1714
|
? { register: () => {}, unregister: () => {} }
|
|
1798
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedsigncryptedciphertext_free(ptr
|
|
1715
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedsigncryptedciphertext_free(ptr, 1));
|
|
1799
1716
|
const UserDecryptionRequestFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1800
1717
|
? { register: () => {}, unregister: () => {} }
|
|
1801
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionrequest_free(ptr
|
|
1718
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionrequest_free(ptr, 1));
|
|
1802
1719
|
const UserDecryptionResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1803
1720
|
? { register: () => {}, unregister: () => {} }
|
|
1804
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponse_free(ptr
|
|
1721
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponse_free(ptr, 1));
|
|
1805
1722
|
const UserDecryptionResponsePayloadFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1806
1723
|
? { register: () => {}, unregister: () => {} }
|
|
1807
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponsepayload_free(ptr
|
|
1724
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponsepayload_free(ptr, 1));
|
|
1808
1725
|
|
|
1809
1726
|
function addToExternrefTable0(obj) {
|
|
1810
1727
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1908,8 +1825,7 @@ function getDataViewMemory0() {
|
|
|
1908
1825
|
}
|
|
1909
1826
|
|
|
1910
1827
|
function getStringFromWasm0(ptr, len) {
|
|
1911
|
-
|
|
1912
|
-
return decodeText(ptr, len);
|
|
1828
|
+
return decodeText(ptr >>> 0, len);
|
|
1913
1829
|
}
|
|
1914
1830
|
|
|
1915
1831
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -2022,8 +1938,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
2022
1938
|
|
|
2023
1939
|
let WASM_VECTOR_LEN = 0;
|
|
2024
1940
|
|
|
2025
|
-
let wasmModule, wasm;
|
|
1941
|
+
let wasmModule, wasmInstance, wasm;
|
|
2026
1942
|
function __wbg_finalize_init(instance, module) {
|
|
1943
|
+
wasmInstance = instance;
|
|
2027
1944
|
wasm = instance.exports;
|
|
2028
1945
|
wasmModule = module;
|
|
2029
1946
|
cachedDataViewMemory0 = null;
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|