node-tkms 0.13.20 → 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 +0 -28
- package/kms_lib.js +59 -143
- 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,
|
package/kms_lib.js
CHANGED
|
@@ -24,7 +24,6 @@ exports.CiphertextHandle = CiphertextHandle;
|
|
|
24
24
|
*/
|
|
25
25
|
class Client {
|
|
26
26
|
static __wrap(ptr) {
|
|
27
|
-
ptr = ptr >>> 0;
|
|
28
27
|
const obj = Object.create(Client.prototype);
|
|
29
28
|
obj.__wbg_ptr = ptr;
|
|
30
29
|
ClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -51,7 +50,6 @@ exports.Client = Client;
|
|
|
51
50
|
*/
|
|
52
51
|
class Eip712DomainMsg {
|
|
53
52
|
static __wrap(ptr) {
|
|
54
|
-
ptr = ptr >>> 0;
|
|
55
53
|
const obj = Object.create(Eip712DomainMsg.prototype);
|
|
56
54
|
obj.__wbg_ptr = ptr;
|
|
57
55
|
Eip712DomainMsgFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -197,7 +195,6 @@ exports.ParsedUserDecryptionRequest = ParsedUserDecryptionRequest;
|
|
|
197
195
|
|
|
198
196
|
class PrivateEncKeyMlKem512 {
|
|
199
197
|
static __wrap(ptr) {
|
|
200
|
-
ptr = ptr >>> 0;
|
|
201
198
|
const obj = Object.create(PrivateEncKeyMlKem512.prototype);
|
|
202
199
|
obj.__wbg_ptr = ptr;
|
|
203
200
|
PrivateEncKeyMlKem512Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -219,7 +216,6 @@ exports.PrivateEncKeyMlKem512 = PrivateEncKeyMlKem512;
|
|
|
219
216
|
|
|
220
217
|
class PrivateSigKey {
|
|
221
218
|
static __wrap(ptr) {
|
|
222
|
-
ptr = ptr >>> 0;
|
|
223
219
|
const obj = Object.create(PrivateSigKey.prototype);
|
|
224
220
|
obj.__wbg_ptr = ptr;
|
|
225
221
|
PrivateSigKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -241,7 +237,6 @@ exports.PrivateSigKey = PrivateSigKey;
|
|
|
241
237
|
|
|
242
238
|
class PublicEncKeyMlKem512 {
|
|
243
239
|
static __wrap(ptr) {
|
|
244
|
-
ptr = ptr >>> 0;
|
|
245
240
|
const obj = Object.create(PublicEncKeyMlKem512.prototype);
|
|
246
241
|
obj.__wbg_ptr = ptr;
|
|
247
242
|
PublicEncKeyMlKem512Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -263,7 +258,6 @@ exports.PublicEncKeyMlKem512 = PublicEncKeyMlKem512;
|
|
|
263
258
|
|
|
264
259
|
class PublicSigKey {
|
|
265
260
|
static __wrap(ptr) {
|
|
266
|
-
ptr = ptr >>> 0;
|
|
267
261
|
const obj = Object.create(PublicSigKey.prototype);
|
|
268
262
|
obj.__wbg_ptr = ptr;
|
|
269
263
|
PublicSigKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -290,7 +284,6 @@ exports.PublicSigKey = PublicSigKey;
|
|
|
290
284
|
*/
|
|
291
285
|
class RequestId {
|
|
292
286
|
static __wrap(ptr) {
|
|
293
|
-
ptr = ptr >>> 0;
|
|
294
287
|
const obj = Object.create(RequestId.prototype);
|
|
295
288
|
obj.__wbg_ptr = ptr;
|
|
296
289
|
RequestIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -335,7 +328,6 @@ exports.RequestId = RequestId;
|
|
|
335
328
|
|
|
336
329
|
class ServerIdAddr {
|
|
337
330
|
static __wrap(ptr) {
|
|
338
|
-
ptr = ptr >>> 0;
|
|
339
331
|
const obj = Object.create(ServerIdAddr.prototype);
|
|
340
332
|
obj.__wbg_ptr = ptr;
|
|
341
333
|
ServerIdAddrFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -363,7 +355,6 @@ exports.ServerIdAddr = ServerIdAddr;
|
|
|
363
355
|
|
|
364
356
|
class TypedCiphertext {
|
|
365
357
|
static __wrap(ptr) {
|
|
366
|
-
ptr = ptr >>> 0;
|
|
367
358
|
const obj = Object.create(TypedCiphertext.prototype);
|
|
368
359
|
obj.__wbg_ptr = ptr;
|
|
369
360
|
TypedCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -463,7 +454,6 @@ exports.TypedCiphertext = TypedCiphertext;
|
|
|
463
454
|
|
|
464
455
|
class TypedPlaintext {
|
|
465
456
|
static __wrap(ptr) {
|
|
466
|
-
ptr = ptr >>> 0;
|
|
467
457
|
const obj = Object.create(TypedPlaintext.prototype);
|
|
468
458
|
obj.__wbg_ptr = ptr;
|
|
469
459
|
TypedPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -521,7 +511,6 @@ exports.TypedPlaintext = TypedPlaintext;
|
|
|
521
511
|
|
|
522
512
|
class TypedSigncryptedCiphertext {
|
|
523
513
|
static __wrap(ptr) {
|
|
524
|
-
ptr = ptr >>> 0;
|
|
525
514
|
const obj = Object.create(TypedSigncryptedCiphertext.prototype);
|
|
526
515
|
obj.__wbg_ptr = ptr;
|
|
527
516
|
TypedSigncryptedCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -831,12 +820,6 @@ if (Symbol.dispose) UserDecryptionRequest.prototype[Symbol.dispose] = UserDecryp
|
|
|
831
820
|
exports.UserDecryptionRequest = UserDecryptionRequest;
|
|
832
821
|
|
|
833
822
|
class UserDecryptionResponse {
|
|
834
|
-
static __unwrap(jsValue) {
|
|
835
|
-
if (!(jsValue instanceof UserDecryptionResponse)) {
|
|
836
|
-
return 0;
|
|
837
|
-
}
|
|
838
|
-
return jsValue.__destroy_into_raw();
|
|
839
|
-
}
|
|
840
823
|
__destroy_into_raw() {
|
|
841
824
|
const ptr = this.__wbg_ptr;
|
|
842
825
|
this.__wbg_ptr = 0;
|
|
@@ -942,7 +925,6 @@ exports.UserDecryptionResponse = UserDecryptionResponse;
|
|
|
942
925
|
|
|
943
926
|
class UserDecryptionResponsePayload {
|
|
944
927
|
static __wrap(ptr) {
|
|
945
|
-
ptr = ptr >>> 0;
|
|
946
928
|
const obj = Object.create(UserDecryptionResponsePayload.prototype);
|
|
947
929
|
obj.__wbg_ptr = ptr;
|
|
948
930
|
UserDecryptionResponsePayloadFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -1278,67 +1260,6 @@ function private_sig_key_to_u8vec(sk) {
|
|
|
1278
1260
|
}
|
|
1279
1261
|
exports.private_sig_key_to_u8vec = private_sig_key_to_u8vec;
|
|
1280
1262
|
|
|
1281
|
-
/**
|
|
1282
|
-
* Process the user_decryption response from Rust objects.
|
|
1283
|
-
* Consider using [process_user_decryption_resp_from_js]
|
|
1284
|
-
* when using the JS API.
|
|
1285
|
-
* The result is a byte array representing a plaintext of any length.
|
|
1286
|
-
*
|
|
1287
|
-
* * `client` - client that wants to perform user_decryption.
|
|
1288
|
-
*
|
|
1289
|
-
* * `request` - the initial user_decryption request.
|
|
1290
|
-
* Must be given if `verify` is true.
|
|
1291
|
-
*
|
|
1292
|
-
* * `eip712_domain` - the EIP-712 domain.
|
|
1293
|
-
* Must be given if `verify` is true.
|
|
1294
|
-
*
|
|
1295
|
-
* * `agg_resp` - the vector of user_decryption responses.
|
|
1296
|
-
*
|
|
1297
|
-
* * `enc_pk` - The ephemeral public key.
|
|
1298
|
-
*
|
|
1299
|
-
* * `enc_sk` - The ephemeral secret key.
|
|
1300
|
-
*
|
|
1301
|
-
* * `threshold` - Optional threshold override for reconstruction.
|
|
1302
|
-
* If not provided, it is computed from the number of server addresses as `(n - 1) / 3`.
|
|
1303
|
-
*
|
|
1304
|
-
* * `verify` - Whether to perform signature verification for the response.
|
|
1305
|
-
* It is insecure if `verify = false`!
|
|
1306
|
-
* @param {Client} client
|
|
1307
|
-
* @param {ParsedUserDecryptionRequest | null | undefined} request
|
|
1308
|
-
* @param {Eip712DomainMsg | null | undefined} eip712_domain
|
|
1309
|
-
* @param {UserDecryptionResponse[]} agg_resp
|
|
1310
|
-
* @param {PublicEncKeyMlKem512} enc_pk
|
|
1311
|
-
* @param {PrivateEncKeyMlKem512} enc_sk
|
|
1312
|
-
* @param {number | null | undefined} threshold
|
|
1313
|
-
* @param {boolean} verify
|
|
1314
|
-
* @returns {TypedPlaintext[]}
|
|
1315
|
-
*/
|
|
1316
|
-
function process_user_decryption_resp(client, request, eip712_domain, agg_resp, enc_pk, enc_sk, threshold, verify) {
|
|
1317
|
-
_assertClass(client, Client);
|
|
1318
|
-
let ptr0 = 0;
|
|
1319
|
-
if (!isLikeNone(request)) {
|
|
1320
|
-
_assertClass(request, ParsedUserDecryptionRequest);
|
|
1321
|
-
ptr0 = request.__destroy_into_raw();
|
|
1322
|
-
}
|
|
1323
|
-
let ptr1 = 0;
|
|
1324
|
-
if (!isLikeNone(eip712_domain)) {
|
|
1325
|
-
_assertClass(eip712_domain, Eip712DomainMsg);
|
|
1326
|
-
ptr1 = eip712_domain.__destroy_into_raw();
|
|
1327
|
-
}
|
|
1328
|
-
const ptr2 = passArrayJsValueToWasm0(agg_resp, wasm.__wbindgen_malloc);
|
|
1329
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1330
|
-
_assertClass(enc_pk, PublicEncKeyMlKem512);
|
|
1331
|
-
_assertClass(enc_sk, PrivateEncKeyMlKem512);
|
|
1332
|
-
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);
|
|
1333
|
-
if (ret[3]) {
|
|
1334
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1335
|
-
}
|
|
1336
|
-
var v4 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1337
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1338
|
-
return v4;
|
|
1339
|
-
}
|
|
1340
|
-
exports.process_user_decryption_resp = process_user_decryption_resp;
|
|
1341
|
-
|
|
1342
1263
|
/**
|
|
1343
1264
|
* Process the user_decryption response from JavaScript objects.
|
|
1344
1265
|
* The returned result is a byte array representing a plaintext of any length,
|
|
@@ -1418,7 +1339,7 @@ function process_user_decryption_resp_from_js(client, request, eip712_domain, ag
|
|
|
1418
1339
|
_assertClass(client, Client);
|
|
1419
1340
|
_assertClass(enc_pk, PublicEncKeyMlKem512);
|
|
1420
1341
|
_assertClass(enc_sk, PrivateEncKeyMlKem512);
|
|
1421
|
-
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) ?
|
|
1342
|
+
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);
|
|
1422
1343
|
if (ret[3]) {
|
|
1423
1344
|
throw takeFromExternrefTable0(ret[2]);
|
|
1424
1345
|
}
|
|
@@ -1500,15 +1421,14 @@ function u8vec_to_public_sig_key(v) {
|
|
|
1500
1421
|
return PublicSigKey.__wrap(ret[0]);
|
|
1501
1422
|
}
|
|
1502
1423
|
exports.u8vec_to_public_sig_key = u8vec_to_public_sig_key;
|
|
1503
|
-
|
|
1504
1424
|
function __wbg_get_imports() {
|
|
1505
1425
|
const import0 = {
|
|
1506
1426
|
__proto__: null,
|
|
1507
|
-
|
|
1427
|
+
__wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
|
|
1508
1428
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1509
1429
|
return ret;
|
|
1510
1430
|
},
|
|
1511
|
-
|
|
1431
|
+
__wbg_Number_c4bdf66bb78f7977: function(arg0) {
|
|
1512
1432
|
const ret = Number(arg0);
|
|
1513
1433
|
return ret;
|
|
1514
1434
|
},
|
|
@@ -1519,54 +1439,54 @@ function __wbg_get_imports() {
|
|
|
1519
1439
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1520
1440
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1521
1441
|
},
|
|
1522
|
-
|
|
1442
|
+
__wbg___wbindgen_boolean_get_edaed31a367ce1bd: function(arg0) {
|
|
1523
1443
|
const v = arg0;
|
|
1524
1444
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1525
1445
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1526
1446
|
},
|
|
1527
|
-
|
|
1447
|
+
__wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
|
|
1528
1448
|
const ret = debugString(arg1);
|
|
1529
1449
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1530
1450
|
const len1 = WASM_VECTOR_LEN;
|
|
1531
1451
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1532
1452
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1533
1453
|
},
|
|
1534
|
-
|
|
1454
|
+
__wbg___wbindgen_in_4990f46af709e33c: function(arg0, arg1) {
|
|
1535
1455
|
const ret = arg0 in arg1;
|
|
1536
1456
|
return ret;
|
|
1537
1457
|
},
|
|
1538
|
-
|
|
1458
|
+
__wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) {
|
|
1539
1459
|
const ret = typeof(arg0) === 'function';
|
|
1540
1460
|
return ret;
|
|
1541
1461
|
},
|
|
1542
|
-
|
|
1462
|
+
__wbg___wbindgen_is_null_6d937fbfb6478470: function(arg0) {
|
|
1543
1463
|
const ret = arg0 === null;
|
|
1544
1464
|
return ret;
|
|
1545
1465
|
},
|
|
1546
|
-
|
|
1466
|
+
__wbg___wbindgen_is_object_0beba4a1980d3eea: function(arg0) {
|
|
1547
1467
|
const val = arg0;
|
|
1548
1468
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1549
1469
|
return ret;
|
|
1550
1470
|
},
|
|
1551
|
-
|
|
1471
|
+
__wbg___wbindgen_is_string_1fca8072260dd261: function(arg0) {
|
|
1552
1472
|
const ret = typeof(arg0) === 'string';
|
|
1553
1473
|
return ret;
|
|
1554
1474
|
},
|
|
1555
|
-
|
|
1475
|
+
__wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) {
|
|
1556
1476
|
const ret = arg0 === undefined;
|
|
1557
1477
|
return ret;
|
|
1558
1478
|
},
|
|
1559
|
-
|
|
1479
|
+
__wbg___wbindgen_jsval_loose_eq_4b9aba9e5b3c4582: function(arg0, arg1) {
|
|
1560
1480
|
const ret = arg0 == arg1;
|
|
1561
1481
|
return ret;
|
|
1562
1482
|
},
|
|
1563
|
-
|
|
1483
|
+
__wbg___wbindgen_number_get_1cc01dd708740256: function(arg0, arg1) {
|
|
1564
1484
|
const obj = arg1;
|
|
1565
1485
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1566
1486
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1567
1487
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1568
1488
|
},
|
|
1569
|
-
|
|
1489
|
+
__wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) {
|
|
1570
1490
|
const obj = arg1;
|
|
1571
1491
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1572
1492
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1574,14 +1494,14 @@ function __wbg_get_imports() {
|
|
|
1574
1494
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1575
1495
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1576
1496
|
},
|
|
1577
|
-
|
|
1497
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
1578
1498
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1579
1499
|
},
|
|
1580
|
-
|
|
1500
|
+
__wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1581
1501
|
const ret = arg0.call(arg1, arg2);
|
|
1582
1502
|
return ret;
|
|
1583
1503
|
}, arguments); },
|
|
1584
|
-
|
|
1504
|
+
__wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) {
|
|
1585
1505
|
const ret = arg0.call(arg1);
|
|
1586
1506
|
return ret;
|
|
1587
1507
|
}, arguments); },
|
|
@@ -1589,7 +1509,7 @@ function __wbg_get_imports() {
|
|
|
1589
1509
|
const ret = arg0.crypto;
|
|
1590
1510
|
return ret;
|
|
1591
1511
|
},
|
|
1592
|
-
|
|
1512
|
+
__wbg_done_b62d4a7d2286852a: function(arg0) {
|
|
1593
1513
|
const ret = arg0.done;
|
|
1594
1514
|
return ret;
|
|
1595
1515
|
},
|
|
@@ -1607,11 +1527,11 @@ function __wbg_get_imports() {
|
|
|
1607
1527
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1608
1528
|
arg0.getRandomValues(arg1);
|
|
1609
1529
|
}, arguments); },
|
|
1610
|
-
|
|
1530
|
+
__wbg_get_9a29be2cb383ed9a: function() { return handleError(function (arg0, arg1) {
|
|
1611
1531
|
const ret = Reflect.get(arg0, arg1);
|
|
1612
1532
|
return ret;
|
|
1613
1533
|
}, arguments); },
|
|
1614
|
-
|
|
1534
|
+
__wbg_get_unchecked_54a4374c38e08460: function(arg0, arg1) {
|
|
1615
1535
|
const ret = arg0[arg1 >>> 0];
|
|
1616
1536
|
return ret;
|
|
1617
1537
|
},
|
|
@@ -1619,7 +1539,7 @@ function __wbg_get_imports() {
|
|
|
1619
1539
|
const ret = arg0[arg1];
|
|
1620
1540
|
return ret;
|
|
1621
1541
|
},
|
|
1622
|
-
|
|
1542
|
+
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
1623
1543
|
let result;
|
|
1624
1544
|
try {
|
|
1625
1545
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1629,7 +1549,7 @@ function __wbg_get_imports() {
|
|
|
1629
1549
|
const ret = result;
|
|
1630
1550
|
return ret;
|
|
1631
1551
|
},
|
|
1632
|
-
|
|
1552
|
+
__wbg_instanceof_Uint8Array_f080092dc70f5d58: function(arg0) {
|
|
1633
1553
|
let result;
|
|
1634
1554
|
try {
|
|
1635
1555
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1639,23 +1559,23 @@ function __wbg_get_imports() {
|
|
|
1639
1559
|
const ret = result;
|
|
1640
1560
|
return ret;
|
|
1641
1561
|
},
|
|
1642
|
-
|
|
1562
|
+
__wbg_isArray_145a34fd0a38d37b: function(arg0) {
|
|
1643
1563
|
const ret = Array.isArray(arg0);
|
|
1644
1564
|
return ret;
|
|
1645
1565
|
},
|
|
1646
|
-
|
|
1566
|
+
__wbg_isSafeInteger_a3389a198582f5f6: function(arg0) {
|
|
1647
1567
|
const ret = Number.isSafeInteger(arg0);
|
|
1648
1568
|
return ret;
|
|
1649
1569
|
},
|
|
1650
|
-
|
|
1570
|
+
__wbg_iterator_cc47ba25a2be735a: function() {
|
|
1651
1571
|
const ret = Symbol.iterator;
|
|
1652
1572
|
return ret;
|
|
1653
1573
|
},
|
|
1654
|
-
|
|
1574
|
+
__wbg_length_589238bdcf171f0e: function(arg0) {
|
|
1655
1575
|
const ret = arg0.length;
|
|
1656
1576
|
return ret;
|
|
1657
1577
|
},
|
|
1658
|
-
|
|
1578
|
+
__wbg_length_c6054974c0a6cdb9: function(arg0) {
|
|
1659
1579
|
const ret = arg0.length;
|
|
1660
1580
|
return ret;
|
|
1661
1581
|
},
|
|
@@ -1667,19 +1587,19 @@ function __wbg_get_imports() {
|
|
|
1667
1587
|
const ret = new Error();
|
|
1668
1588
|
return ret;
|
|
1669
1589
|
},
|
|
1670
|
-
|
|
1590
|
+
__wbg_new_81880fb5002cb255: function(arg0) {
|
|
1671
1591
|
const ret = new Uint8Array(arg0);
|
|
1672
1592
|
return ret;
|
|
1673
1593
|
},
|
|
1674
|
-
|
|
1594
|
+
__wbg_new_with_length_9b650f44b5c44a4e: function(arg0) {
|
|
1675
1595
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1676
1596
|
return ret;
|
|
1677
1597
|
},
|
|
1678
|
-
|
|
1598
|
+
__wbg_next_0c4066e251d2eff9: function() { return handleError(function (arg0) {
|
|
1679
1599
|
const ret = arg0.next();
|
|
1680
1600
|
return ret;
|
|
1681
1601
|
}, arguments); },
|
|
1682
|
-
|
|
1602
|
+
__wbg_next_402fa10b59ab20c3: function(arg0) {
|
|
1683
1603
|
const ret = arg0.next;
|
|
1684
1604
|
return ret;
|
|
1685
1605
|
},
|
|
@@ -1691,7 +1611,7 @@ function __wbg_get_imports() {
|
|
|
1691
1611
|
const ret = arg0.process;
|
|
1692
1612
|
return ret;
|
|
1693
1613
|
},
|
|
1694
|
-
|
|
1614
|
+
__wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
|
|
1695
1615
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1696
1616
|
},
|
|
1697
1617
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1716,23 +1636,23 @@ function __wbg_get_imports() {
|
|
|
1716
1636
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1717
1637
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1718
1638
|
},
|
|
1719
|
-
|
|
1720
|
-
const ret = typeof
|
|
1639
|
+
__wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() {
|
|
1640
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1721
1641
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1722
1642
|
},
|
|
1723
|
-
|
|
1724
|
-
const ret = typeof
|
|
1643
|
+
__wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() {
|
|
1644
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1725
1645
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1726
1646
|
},
|
|
1727
|
-
|
|
1647
|
+
__wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() {
|
|
1728
1648
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1729
1649
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1730
1650
|
},
|
|
1731
|
-
|
|
1651
|
+
__wbg_static_accessor_WINDOW_168f178805d978fe: function() {
|
|
1732
1652
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1733
1653
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1734
1654
|
},
|
|
1735
|
-
|
|
1655
|
+
__wbg_subarray_b0e8ac4ed313fea8: function(arg0, arg1, arg2) {
|
|
1736
1656
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1737
1657
|
return ret;
|
|
1738
1658
|
},
|
|
@@ -1756,11 +1676,7 @@ function __wbg_get_imports() {
|
|
|
1756
1676
|
const ret = TypedSigncryptedCiphertext.__unwrap(arg0);
|
|
1757
1677
|
return ret;
|
|
1758
1678
|
},
|
|
1759
|
-
|
|
1760
|
-
const ret = UserDecryptionResponse.__unwrap(arg0);
|
|
1761
|
-
return ret;
|
|
1762
|
-
},
|
|
1763
|
-
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
1679
|
+
__wbg_value_49f783bb59765962: function(arg0) {
|
|
1764
1680
|
const ret = arg0.value;
|
|
1765
1681
|
return ret;
|
|
1766
1682
|
},
|
|
@@ -1796,52 +1712,52 @@ function __wbg_get_imports() {
|
|
|
1796
1712
|
|
|
1797
1713
|
const CiphertextHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1798
1714
|
? { register: () => {}, unregister: () => {} }
|
|
1799
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertexthandle_free(ptr
|
|
1715
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertexthandle_free(ptr, 1));
|
|
1800
1716
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1801
1717
|
? { register: () => {}, unregister: () => {} }
|
|
1802
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr
|
|
1718
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr, 1));
|
|
1803
1719
|
const Eip712DomainMsgFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1804
1720
|
? { register: () => {}, unregister: () => {} }
|
|
1805
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_eip712domainmsg_free(ptr
|
|
1721
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eip712domainmsg_free(ptr, 1));
|
|
1806
1722
|
const ParsedUserDecryptionRequestFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1807
1723
|
? { register: () => {}, unregister: () => {} }
|
|
1808
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_parseduserdecryptionrequest_free(ptr
|
|
1724
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_parseduserdecryptionrequest_free(ptr, 1));
|
|
1809
1725
|
const PrivateEncKeyMlKem512Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
1810
1726
|
? { register: () => {}, unregister: () => {} }
|
|
1811
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_privateenckeymlkem512_free(ptr
|
|
1727
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_privateenckeymlkem512_free(ptr, 1));
|
|
1812
1728
|
const PrivateSigKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1813
1729
|
? { register: () => {}, unregister: () => {} }
|
|
1814
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_privatesigkey_free(ptr
|
|
1730
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_privatesigkey_free(ptr, 1));
|
|
1815
1731
|
const PublicEncKeyMlKem512Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
1816
1732
|
? { register: () => {}, unregister: () => {} }
|
|
1817
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_publicenckeymlkem512_free(ptr
|
|
1733
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_publicenckeymlkem512_free(ptr, 1));
|
|
1818
1734
|
const PublicSigKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1819
1735
|
? { register: () => {}, unregister: () => {} }
|
|
1820
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_publicsigkey_free(ptr
|
|
1736
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_publicsigkey_free(ptr, 1));
|
|
1821
1737
|
const RequestIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1822
1738
|
? { register: () => {}, unregister: () => {} }
|
|
1823
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_requestid_free(ptr
|
|
1739
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_requestid_free(ptr, 1));
|
|
1824
1740
|
const ServerIdAddrFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1825
1741
|
? { register: () => {}, unregister: () => {} }
|
|
1826
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_serveridaddr_free(ptr
|
|
1742
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_serveridaddr_free(ptr, 1));
|
|
1827
1743
|
const TypedCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1828
1744
|
? { register: () => {}, unregister: () => {} }
|
|
1829
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedciphertext_free(ptr
|
|
1745
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedciphertext_free(ptr, 1));
|
|
1830
1746
|
const TypedPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1831
1747
|
? { register: () => {}, unregister: () => {} }
|
|
1832
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedplaintext_free(ptr
|
|
1748
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedplaintext_free(ptr, 1));
|
|
1833
1749
|
const TypedSigncryptedCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1834
1750
|
? { register: () => {}, unregister: () => {} }
|
|
1835
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_typedsigncryptedciphertext_free(ptr
|
|
1751
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_typedsigncryptedciphertext_free(ptr, 1));
|
|
1836
1752
|
const UserDecryptionRequestFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1837
1753
|
? { register: () => {}, unregister: () => {} }
|
|
1838
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionrequest_free(ptr
|
|
1754
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionrequest_free(ptr, 1));
|
|
1839
1755
|
const UserDecryptionResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1840
1756
|
? { register: () => {}, unregister: () => {} }
|
|
1841
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponse_free(ptr
|
|
1757
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponse_free(ptr, 1));
|
|
1842
1758
|
const UserDecryptionResponsePayloadFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1843
1759
|
? { register: () => {}, unregister: () => {} }
|
|
1844
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponsepayload_free(ptr
|
|
1760
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_userdecryptionresponsepayload_free(ptr, 1));
|
|
1845
1761
|
|
|
1846
1762
|
function addToExternrefTable0(obj) {
|
|
1847
1763
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1945,8 +1861,7 @@ function getDataViewMemory0() {
|
|
|
1945
1861
|
}
|
|
1946
1862
|
|
|
1947
1863
|
function getStringFromWasm0(ptr, len) {
|
|
1948
|
-
|
|
1949
|
-
return decodeText(ptr, len);
|
|
1864
|
+
return decodeText(ptr >>> 0, len);
|
|
1950
1865
|
}
|
|
1951
1866
|
|
|
1952
1867
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -2054,5 +1969,6 @@ let WASM_VECTOR_LEN = 0;
|
|
|
2054
1969
|
const wasmPath = `${__dirname}/kms_lib_bg.wasm`;
|
|
2055
1970
|
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
2056
1971
|
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
2057
|
-
let
|
|
1972
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1973
|
+
let wasm = wasmInstance.exports;
|
|
2058
1974
|
wasm.__wbindgen_start();
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|