tkms 0.11.0-25 → 0.11.0-26
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 +16 -2
- package/kms_lib.js +44 -3
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
package/kms_lib.d.ts
CHANGED
|
@@ -92,7 +92,8 @@ export function ml_kem_pke_decrypt(ct: Uint8Array, my_sk: PrivateEncKeyMlKem512)
|
|
|
92
92
|
* [
|
|
93
93
|
* {
|
|
94
94
|
* signature: '69e7e040cab157aa819015b321c012dccb1545ffefd325b359b492653f0347517e28e66c572cdc299e259024329859ff9fcb0096e1ce072af0b6e1ca1fe25ec6',
|
|
95
|
-
* payload: '0100000029...'
|
|
95
|
+
* payload: '0100000029...',
|
|
96
|
+
* extra_data: '01234...',
|
|
96
97
|
* }
|
|
97
98
|
* ]
|
|
98
99
|
* ```
|
|
@@ -298,6 +299,10 @@ export class UserDecryptionRequest {
|
|
|
298
299
|
* The user's EIP712 domain. This MUST be present. Furthermore, the `verifying_contract` MUST be set and be distinct from `client_address`.
|
|
299
300
|
*/
|
|
300
301
|
set domain(value: Eip712DomainMsg | null | undefined);
|
|
302
|
+
/**
|
|
303
|
+
* Extra data from the gateway.
|
|
304
|
+
*/
|
|
305
|
+
extra_data: Uint8Array;
|
|
301
306
|
}
|
|
302
307
|
export class UserDecryptionResponse {
|
|
303
308
|
private constructor();
|
|
@@ -309,7 +314,8 @@ export class UserDecryptionResponse {
|
|
|
309
314
|
* struct UserDecryptResponseVerification {
|
|
310
315
|
* bytes publicKey;
|
|
311
316
|
* uint256\[\] ctHandles;
|
|
312
|
-
* bytes userDecryptedShare;
|
|
317
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
318
|
+
* bytes extraData;
|
|
313
319
|
* }
|
|
314
320
|
*/
|
|
315
321
|
external_signature: Uint8Array;
|
|
@@ -321,6 +327,10 @@ export class UserDecryptionResponse {
|
|
|
321
327
|
* The actual \[UserDecryptionResponsePayload\].
|
|
322
328
|
*/
|
|
323
329
|
set payload(value: UserDecryptionResponsePayload | null | undefined);
|
|
330
|
+
/**
|
|
331
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
332
|
+
*/
|
|
333
|
+
extra_data: Uint8Array;
|
|
324
334
|
}
|
|
325
335
|
export class UserDecryptionResponsePayload {
|
|
326
336
|
private constructor();
|
|
@@ -417,6 +427,7 @@ export interface InitOutput {
|
|
|
417
427
|
readonly __wbg_get_userdecryptionrequest_client_address: (a: number) => [number, number];
|
|
418
428
|
readonly __wbg_get_userdecryptionrequest_domain: (a: number) => number;
|
|
419
429
|
readonly __wbg_set_userdecryptionrequest_domain: (a: number, b: number) => void;
|
|
430
|
+
readonly __wbg_get_userdecryptionrequest_extra_data: (a: number) => [number, number];
|
|
420
431
|
readonly __wbg_userdecryptionresponse_free: (a: number, b: number) => void;
|
|
421
432
|
readonly __wbg_get_userdecryptionresponse_payload: (a: number) => number;
|
|
422
433
|
readonly __wbg_set_userdecryptionresponse_payload: (a: number, b: number) => void;
|
|
@@ -438,8 +449,10 @@ export interface InitOutput {
|
|
|
438
449
|
readonly __wbg_set_typedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
439
450
|
readonly __wbg_set_userdecryptionrequest_client_address: (a: number, b: number, c: number) => void;
|
|
440
451
|
readonly __wbg_set_userdecryptionrequest_enc_key: (a: number, b: number, c: number) => void;
|
|
452
|
+
readonly __wbg_set_userdecryptionrequest_extra_data: (a: number, b: number, c: number) => void;
|
|
441
453
|
readonly __wbg_set_userdecryptionresponse_signature: (a: number, b: number, c: number) => void;
|
|
442
454
|
readonly __wbg_set_userdecryptionresponse_external_signature: (a: number, b: number, c: number) => void;
|
|
455
|
+
readonly __wbg_set_userdecryptionresponse_extra_data: (a: number, b: number, c: number) => void;
|
|
443
456
|
readonly __wbg_set_userdecryptionresponsepayload_verification_key: (a: number, b: number, c: number) => void;
|
|
444
457
|
readonly __wbg_set_userdecryptionresponsepayload_digest: (a: number, b: number, c: number) => void;
|
|
445
458
|
readonly __wbg_set_typedplaintext_bytes: (a: number, b: number, c: number) => void;
|
|
@@ -448,6 +461,7 @@ export interface InitOutput {
|
|
|
448
461
|
readonly __wbg_get_userdecryptionrequest_enc_key: (a: number) => [number, number];
|
|
449
462
|
readonly __wbg_get_userdecryptionresponse_signature: (a: number) => [number, number];
|
|
450
463
|
readonly __wbg_get_userdecryptionresponse_external_signature: (a: number) => [number, number];
|
|
464
|
+
readonly __wbg_get_userdecryptionresponse_extra_data: (a: number) => [number, number];
|
|
451
465
|
readonly __wbg_get_userdecryptionresponsepayload_verification_key: (a: number) => [number, number];
|
|
452
466
|
readonly __wbg_get_userdecryptionresponsepayload_digest: (a: number) => [number, number];
|
|
453
467
|
readonly __wbg_get_typedplaintext_bytes: (a: number) => [number, number];
|
package/kms_lib.js
CHANGED
|
@@ -524,7 +524,8 @@ export function ml_kem_pke_decrypt(ct, my_sk) {
|
|
|
524
524
|
* [
|
|
525
525
|
* {
|
|
526
526
|
* signature: '69e7e040cab157aa819015b321c012dccb1545ffefd325b359b492653f0347517e28e66c572cdc299e259024329859ff9fcb0096e1ce072af0b6e1ca1fe25ec6',
|
|
527
|
-
* payload: '0100000029...'
|
|
527
|
+
* payload: '0100000029...',
|
|
528
|
+
* extra_data: '01234...',
|
|
528
529
|
* }
|
|
529
530
|
* ]
|
|
530
531
|
* ```
|
|
@@ -1442,6 +1443,25 @@ export class UserDecryptionRequest {
|
|
|
1442
1443
|
}
|
|
1443
1444
|
wasm.__wbg_set_userdecryptionrequest_domain(this.__wbg_ptr, ptr0);
|
|
1444
1445
|
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Extra data from the gateway.
|
|
1448
|
+
* @returns {Uint8Array}
|
|
1449
|
+
*/
|
|
1450
|
+
get extra_data() {
|
|
1451
|
+
const ret = wasm.__wbg_get_userdecryptionrequest_extra_data(this.__wbg_ptr);
|
|
1452
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1453
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1454
|
+
return v1;
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Extra data from the gateway.
|
|
1458
|
+
* @param {Uint8Array} arg0
|
|
1459
|
+
*/
|
|
1460
|
+
set extra_data(arg0) {
|
|
1461
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1463
|
+
wasm.__wbg_set_eip712domainmsg_verifying_contract(this.__wbg_ptr, ptr0, len0);
|
|
1464
|
+
}
|
|
1445
1465
|
}
|
|
1446
1466
|
|
|
1447
1467
|
const UserDecryptionResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1491,7 +1511,8 @@ export class UserDecryptionResponse {
|
|
|
1491
1511
|
* struct UserDecryptResponseVerification {
|
|
1492
1512
|
* bytes publicKey;
|
|
1493
1513
|
* uint256\[\] ctHandles;
|
|
1494
|
-
* bytes userDecryptedShare;
|
|
1514
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
1515
|
+
* bytes extraData;
|
|
1495
1516
|
* }
|
|
1496
1517
|
* @returns {Uint8Array}
|
|
1497
1518
|
*/
|
|
@@ -1507,7 +1528,8 @@ export class UserDecryptionResponse {
|
|
|
1507
1528
|
* struct UserDecryptResponseVerification {
|
|
1508
1529
|
* bytes publicKey;
|
|
1509
1530
|
* uint256\[\] ctHandles;
|
|
1510
|
-
* bytes userDecryptedShare;
|
|
1531
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
1532
|
+
* bytes extraData;
|
|
1511
1533
|
* }
|
|
1512
1534
|
* @param {Uint8Array} arg0
|
|
1513
1535
|
*/
|
|
@@ -1536,6 +1558,25 @@ export class UserDecryptionResponse {
|
|
|
1536
1558
|
}
|
|
1537
1559
|
wasm.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr, ptr0);
|
|
1538
1560
|
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
1563
|
+
* @returns {Uint8Array}
|
|
1564
|
+
*/
|
|
1565
|
+
get extra_data() {
|
|
1566
|
+
const ret = wasm.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);
|
|
1567
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1568
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1569
|
+
return v1;
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
1573
|
+
* @param {Uint8Array} arg0
|
|
1574
|
+
*/
|
|
1575
|
+
set extra_data(arg0) {
|
|
1576
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1577
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1578
|
+
wasm.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr, ptr0, len0);
|
|
1579
|
+
}
|
|
1539
1580
|
}
|
|
1540
1581
|
|
|
1541
1582
|
const UserDecryptionResponsePayloadFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|