node-tkms 0.11.0-24 → 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 +12 -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();
|
package/kms_lib.js
CHANGED
|
@@ -528,7 +528,8 @@ module.exports.ml_kem_pke_decrypt = function(ct, my_sk) {
|
|
|
528
528
|
* [
|
|
529
529
|
* {
|
|
530
530
|
* signature: '69e7e040cab157aa819015b321c012dccb1545ffefd325b359b492653f0347517e28e66c572cdc299e259024329859ff9fcb0096e1ce072af0b6e1ca1fe25ec6',
|
|
531
|
-
* payload: '0100000029...'
|
|
531
|
+
* payload: '0100000029...',
|
|
532
|
+
* extra_data: '01234...',
|
|
532
533
|
* }
|
|
533
534
|
* ]
|
|
534
535
|
* ```
|
|
@@ -1459,6 +1460,25 @@ class UserDecryptionRequest {
|
|
|
1459
1460
|
}
|
|
1460
1461
|
wasm.__wbg_set_userdecryptionrequest_domain(this.__wbg_ptr, ptr0);
|
|
1461
1462
|
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Extra data from the gateway.
|
|
1465
|
+
* @returns {Uint8Array}
|
|
1466
|
+
*/
|
|
1467
|
+
get extra_data() {
|
|
1468
|
+
const ret = wasm.__wbg_get_userdecryptionrequest_extra_data(this.__wbg_ptr);
|
|
1469
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1470
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1471
|
+
return v1;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Extra data from the gateway.
|
|
1475
|
+
* @param {Uint8Array} arg0
|
|
1476
|
+
*/
|
|
1477
|
+
set extra_data(arg0) {
|
|
1478
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1479
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1480
|
+
wasm.__wbg_set_eip712domainmsg_verifying_contract(this.__wbg_ptr, ptr0, len0);
|
|
1481
|
+
}
|
|
1462
1482
|
}
|
|
1463
1483
|
module.exports.UserDecryptionRequest = UserDecryptionRequest;
|
|
1464
1484
|
|
|
@@ -1509,7 +1529,8 @@ class UserDecryptionResponse {
|
|
|
1509
1529
|
* struct UserDecryptResponseVerification {
|
|
1510
1530
|
* bytes publicKey;
|
|
1511
1531
|
* uint256\[\] ctHandles;
|
|
1512
|
-
* bytes userDecryptedShare;
|
|
1532
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
1533
|
+
* bytes extraData;
|
|
1513
1534
|
* }
|
|
1514
1535
|
* @returns {Uint8Array}
|
|
1515
1536
|
*/
|
|
@@ -1525,7 +1546,8 @@ class UserDecryptionResponse {
|
|
|
1525
1546
|
* struct UserDecryptResponseVerification {
|
|
1526
1547
|
* bytes publicKey;
|
|
1527
1548
|
* uint256\[\] ctHandles;
|
|
1528
|
-
* bytes userDecryptedShare;
|
|
1549
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
1550
|
+
* bytes extraData;
|
|
1529
1551
|
* }
|
|
1530
1552
|
* @param {Uint8Array} arg0
|
|
1531
1553
|
*/
|
|
@@ -1554,6 +1576,25 @@ class UserDecryptionResponse {
|
|
|
1554
1576
|
}
|
|
1555
1577
|
wasm.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr, ptr0);
|
|
1556
1578
|
}
|
|
1579
|
+
/**
|
|
1580
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
1581
|
+
* @returns {Uint8Array}
|
|
1582
|
+
*/
|
|
1583
|
+
get extra_data() {
|
|
1584
|
+
const ret = wasm.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);
|
|
1585
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1586
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1587
|
+
return v1;
|
|
1588
|
+
}
|
|
1589
|
+
/**
|
|
1590
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
1591
|
+
* @param {Uint8Array} arg0
|
|
1592
|
+
*/
|
|
1593
|
+
set extra_data(arg0) {
|
|
1594
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1595
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1596
|
+
wasm.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr, ptr0, len0);
|
|
1597
|
+
}
|
|
1557
1598
|
}
|
|
1558
1599
|
module.exports.UserDecryptionResponse = UserDecryptionResponse;
|
|
1559
1600
|
|
package/kms_lib_bg.wasm
CHANGED
|
Binary file
|