node-tkms 0.11.0-rc6 → 0.11.0-rc8

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 CHANGED
@@ -16,8 +16,8 @@ export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
16
16
  * * `fhe_parameter` - the parameter choice, which can be either `"test"` or `"default"`.
17
17
  * The "default" parameter choice is selected if no matching string is found.
18
18
  */
19
- export function new_client(server_addrs: (string)[], client_address_hex: string, fhe_parameter: string): Client;
20
- export function get_server_addrs(client: Client): (string)[];
19
+ export function new_client(server_addrs: string[], client_address_hex: string, fhe_parameter: string): Client;
20
+ export function get_server_addrs(client: Client): string[];
21
21
  export function get_client_secret_key(client: Client): PrivateSigKey | undefined;
22
22
  export function get_client_address(client: Client): string;
23
23
  export function cryptobox_keygen(): PrivateEncKey;
@@ -88,7 +88,7 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
88
88
  * * `verify` - Whether to perform signature verification for the response.
89
89
  * It is insecure if `verify = false`!
90
90
  */
91
- export function process_reencryption_resp_from_js(client: Client, request: any, eip712_domain: any, agg_resp: any, enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): (TypedPlaintext)[];
91
+ export function process_reencryption_resp_from_js(client: Client, request: any, eip712_domain: any, agg_resp: any, enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): TypedPlaintext[];
92
92
  /**
93
93
  * Process the reencryption response from Rust objects.
94
94
  * Consider using [process_reencryption_resp_from_js]
@@ -112,24 +112,7 @@ export function process_reencryption_resp_from_js(client: Client, request: any,
112
112
  * * `verify` - Whether to perform signature verification for the response.
113
113
  * It is insecure if `verify = false`!
114
114
  */
115
- export function process_reencryption_resp(client: Client, request: ParsedReencryptionRequest | undefined, eip712_domain: Eip712DomainMsg | undefined, agg_resp: (ReencryptionResponse)[], enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): (TypedPlaintext)[];
116
- /**
117
- * The plaintext types that can be encrypted in a HTTPZ ciphertext.
118
- */
119
- export enum FheType {
120
- Ebool = 0,
121
- Euint4 = 1,
122
- Euint8 = 2,
123
- Euint16 = 3,
124
- Euint32 = 4,
125
- Euint64 = 5,
126
- Euint128 = 6,
127
- Euint160 = 7,
128
- Euint256 = 8,
129
- Euint512 = 9,
130
- Euint1024 = 10,
131
- Euint2048 = 11,
132
- }
115
+ export function process_reencryption_resp(client: Client, request: ParsedReencryptionRequest | null | undefined, eip712_domain: Eip712DomainMsg | null | undefined, agg_resp: ReencryptionResponse[], enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): TypedPlaintext[];
133
116
  export class CiphertextHandle {
134
117
  private constructor();
135
118
  free(): void;
@@ -161,7 +144,8 @@ export class Eip712DomainMsg {
161
144
  version: string;
162
145
  chain_id: Uint8Array;
163
146
  verifying_contract: string;
164
- salt?: Uint8Array;
147
+ get salt(): Uint8Array | undefined;
148
+ set salt(value: Uint8Array | null | undefined);
165
149
  }
166
150
  /**
167
151
  * Validity of this struct is not checked.
@@ -193,16 +177,26 @@ export class ReencryptionRequest {
193
177
  * The 32 Byte / 256 Bit ID of the user decryption request, without `0x`
194
178
  * prefix. Future queries for the result must use this request ID.
195
179
  */
196
- request_id?: RequestId;
180
+ get request_id(): RequestId | undefined;
181
+ /**
182
+ * The 32 Byte / 256 Bit ID of the user decryption request, without `0x`
183
+ * prefix. Future queries for the result must use this request ID.
184
+ */
185
+ set request_id(value: RequestId | null | undefined);
197
186
  /**
198
187
  * The list of ciphertexts to reencrypt.
199
188
  */
200
- typed_ciphertexts: (TypedCiphertext)[];
189
+ typed_ciphertexts: TypedCiphertext[];
190
+ /**
191
+ * The 32 Byte / 256 Bit key id to use for decryption. This is the request_id
192
+ * used for key generation
193
+ */
194
+ get key_id(): RequestId | undefined;
201
195
  /**
202
196
  * The 32 Byte / 256 Bit key id to use for decryption. This is the request_id
203
197
  * used for key generation
204
198
  */
205
- key_id?: RequestId;
199
+ set key_id(value: RequestId | null | undefined);
206
200
  /**
207
201
  * The client's (blockchain wallet) address,
208
202
  * encoded using EIP-55.
@@ -214,7 +208,8 @@ export class ReencryptionRequest {
214
208
  * Montgomery point.
215
209
  */
216
210
  enc_key: Uint8Array;
217
- domain?: Eip712DomainMsg;
211
+ get domain(): Eip712DomainMsg | undefined;
212
+ set domain(value: Eip712DomainMsg | null | undefined);
218
213
  }
219
214
  export class ReencryptionResponse {
220
215
  private constructor();
@@ -233,7 +228,11 @@ export class ReencryptionResponse {
233
228
  /**
234
229
  * The actual \[ReencryptionResponsePayload\].
235
230
  */
236
- payload?: ReencryptionResponsePayload;
231
+ get payload(): ReencryptionResponsePayload | undefined;
232
+ /**
233
+ * The actual \[ReencryptionResponsePayload\].
234
+ */
235
+ set payload(value: ReencryptionResponsePayload | null | undefined);
237
236
  }
238
237
  export class ReencryptionResponsePayload {
239
238
  private constructor();
@@ -255,7 +254,7 @@ export class ReencryptionResponsePayload {
255
254
  * must be decrypted and then reconstructed with the other shares
256
255
  * to produce the final plaintext.
257
256
  */
258
- signcrypted_ciphertexts: (TypedSigncryptedCiphertext)[];
257
+ signcrypted_ciphertexts: TypedSigncryptedCiphertext[];
259
258
  /**
260
259
  * The ID of the MPC party doing the reencryption. Used for polynomial
261
260
  * reconstruction.
@@ -279,11 +278,12 @@ export class TypedCiphertext {
279
278
  private constructor();
280
279
  free(): void;
281
280
  /**
282
- * The actual ciphertext to decrypt, taken directly from HTTPZ.
281
+ * The actual ciphertext to decrypt, taken directly from fhevm.
283
282
  */
284
283
  ciphertext: Uint8Array;
285
284
  /**
286
- * The type of plaintext encrypted.
285
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
286
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
287
287
  */
288
288
  fhe_type: number;
289
289
  /**
@@ -307,7 +307,8 @@ export class TypedPlaintext {
307
307
  */
308
308
  bytes: Uint8Array;
309
309
  /**
310
- * The type of plaintext encrypted.
310
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
311
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
311
312
  */
312
313
  fhe_type: number;
313
314
  }
@@ -315,7 +316,8 @@ export class TypedSigncryptedCiphertext {
315
316
  private constructor();
316
317
  free(): void;
317
318
  /**
318
- * The type of plaintext encrypted.
319
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
320
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
319
321
  */
320
322
  fhe_type: number;
321
323
  /**
@@ -327,4 +329,9 @@ export class TypedSigncryptedCiphertext {
327
329
  * The external handles that were originally in the request.
328
330
  */
329
331
  external_handle: Uint8Array;
332
+ /**
333
+ * The packing factor determines whether the decrypted plaintext
334
+ * has a different way of packing compared to what is specified in the plaintext modulus.
335
+ */
336
+ packing_factor: number;
330
337
  }
package/kms_lib.js CHANGED
@@ -250,9 +250,9 @@ module.exports.u8vec_to_private_sig_key = function(v) {
250
250
 
251
251
  function passArrayJsValueToWasm0(array, malloc) {
252
252
  const ptr = malloc(array.length * 4, 4) >>> 0;
253
- const mem = getDataViewMemory0();
254
253
  for (let i = 0; i < array.length; i++) {
255
- mem.setUint32(ptr + 4 * i, addToExternrefTable0(array[i]), true);
254
+ const add = addToExternrefTable0(array[i]);
255
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
256
256
  }
257
257
  WASM_VECTOR_LEN = array.length;
258
258
  return ptr;
@@ -268,7 +268,7 @@ function passArrayJsValueToWasm0(array, malloc) {
268
268
  *
269
269
  * * `fhe_parameter` - the parameter choice, which can be either `"test"` or `"default"`.
270
270
  * The "default" parameter choice is selected if no matching string is found.
271
- * @param {(string)[]} server_addrs
271
+ * @param {string[]} server_addrs
272
272
  * @param {string} client_address_hex
273
273
  * @param {string} fhe_parameter
274
274
  * @returns {Client}
@@ -299,7 +299,7 @@ function getArrayJsValueFromWasm0(ptr, len) {
299
299
  }
300
300
  /**
301
301
  * @param {Client} client
302
- * @returns {(string)[]}
302
+ * @returns {string[]}
303
303
  */
304
304
  module.exports.get_server_addrs = function(client) {
305
305
  _assertClass(client, Client);
@@ -510,7 +510,7 @@ module.exports.cryptobox_decrypt = function(ct, my_sk, their_pk) {
510
510
  * @param {PublicEncKey} enc_pk
511
511
  * @param {PrivateEncKey} enc_sk
512
512
  * @param {boolean} verify
513
- * @returns {(TypedPlaintext)[]}
513
+ * @returns {TypedPlaintext[]}
514
514
  */
515
515
  module.exports.process_reencryption_resp_from_js = function(client, request, eip712_domain, agg_resp, enc_pk, enc_sk, verify) {
516
516
  _assertClass(client, Client);
@@ -548,13 +548,13 @@ module.exports.process_reencryption_resp_from_js = function(client, request, eip
548
548
  * * `verify` - Whether to perform signature verification for the response.
549
549
  * It is insecure if `verify = false`!
550
550
  * @param {Client} client
551
- * @param {ParsedReencryptionRequest | undefined} request
552
- * @param {Eip712DomainMsg | undefined} eip712_domain
553
- * @param {(ReencryptionResponse)[]} agg_resp
551
+ * @param {ParsedReencryptionRequest | null | undefined} request
552
+ * @param {Eip712DomainMsg | null | undefined} eip712_domain
553
+ * @param {ReencryptionResponse[]} agg_resp
554
554
  * @param {PublicEncKey} enc_pk
555
555
  * @param {PrivateEncKey} enc_sk
556
556
  * @param {boolean} verify
557
- * @returns {(TypedPlaintext)[]}
557
+ * @returns {TypedPlaintext[]}
558
558
  */
559
559
  module.exports.process_reencryption_resp = function(client, request, eip712_domain, agg_resp, enc_pk, enc_sk, verify) {
560
560
  _assertClass(client, Client);
@@ -581,25 +581,6 @@ module.exports.process_reencryption_resp = function(client, request, eip712_doma
581
581
  return v4;
582
582
  };
583
583
 
584
- /**
585
- * The plaintext types that can be encrypted in a HTTPZ ciphertext.
586
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11}
587
- */
588
- module.exports.FheType = Object.freeze({
589
- Ebool: 0, "0": "Ebool",
590
- Euint4: 1, "1": "Euint4",
591
- Euint8: 2, "2": "Euint8",
592
- Euint16: 3, "3": "Euint16",
593
- Euint32: 4, "4": "Euint32",
594
- Euint64: 5, "5": "Euint64",
595
- Euint128: 6, "6": "Euint128",
596
- Euint160: 7, "7": "Euint160",
597
- Euint256: 8, "8": "Euint256",
598
- Euint512: 9, "9": "Euint512",
599
- Euint1024: 10, "10": "Euint1024",
600
- Euint2048: 11, "11": "Euint2048",
601
- });
602
-
603
584
  const CiphertextHandleFinalization = (typeof FinalizationRegistry === 'undefined')
604
585
  ? { register: () => {}, unregister: () => {} }
605
586
  : new FinalizationRegistry(ptr => wasm.__wbg_ciphertexthandle_free(ptr >>> 0, 1));
@@ -810,7 +791,7 @@ class Eip712DomainMsg {
810
791
  return v1;
811
792
  }
812
793
  /**
813
- * @param {Uint8Array | undefined} [arg0]
794
+ * @param {Uint8Array | null} [arg0]
814
795
  */
815
796
  set salt(arg0) {
816
797
  var ptr0 = isLikeNone(arg0) ? 0 : passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
@@ -983,7 +964,7 @@ class ReencryptionRequest {
983
964
  /**
984
965
  * The 32 Byte / 256 Bit ID of the user decryption request, without `0x`
985
966
  * prefix. Future queries for the result must use this request ID.
986
- * @param {RequestId | undefined} [arg0]
967
+ * @param {RequestId | null} [arg0]
987
968
  */
988
969
  set request_id(arg0) {
989
970
  let ptr0 = 0;
@@ -995,7 +976,7 @@ class ReencryptionRequest {
995
976
  }
996
977
  /**
997
978
  * The list of ciphertexts to reencrypt.
998
- * @returns {(TypedCiphertext)[]}
979
+ * @returns {TypedCiphertext[]}
999
980
  */
1000
981
  get typed_ciphertexts() {
1001
982
  const ret = wasm.__wbg_get_reencryptionrequest_typed_ciphertexts(this.__wbg_ptr);
@@ -1005,7 +986,7 @@ class ReencryptionRequest {
1005
986
  }
1006
987
  /**
1007
988
  * The list of ciphertexts to reencrypt.
1008
- * @param {(TypedCiphertext)[]} arg0
989
+ * @param {TypedCiphertext[]} arg0
1009
990
  */
1010
991
  set typed_ciphertexts(arg0) {
1011
992
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
@@ -1024,7 +1005,7 @@ class ReencryptionRequest {
1024
1005
  /**
1025
1006
  * The 32 Byte / 256 Bit key id to use for decryption. This is the request_id
1026
1007
  * used for key generation
1027
- * @param {RequestId | undefined} [arg0]
1008
+ * @param {RequestId | null} [arg0]
1028
1009
  */
1029
1010
  set key_id(arg0) {
1030
1011
  let ptr0 = 0;
@@ -1092,7 +1073,7 @@ class ReencryptionRequest {
1092
1073
  return ret === 0 ? undefined : Eip712DomainMsg.__wrap(ret);
1093
1074
  }
1094
1075
  /**
1095
- * @param {Eip712DomainMsg | undefined} [arg0]
1076
+ * @param {Eip712DomainMsg | null} [arg0]
1096
1077
  */
1097
1078
  set domain(arg0) {
1098
1079
  let ptr0 = 0;
@@ -1187,7 +1168,7 @@ class ReencryptionResponse {
1187
1168
  }
1188
1169
  /**
1189
1170
  * The actual \[ReencryptionResponsePayload\].
1190
- * @param {ReencryptionResponsePayload | undefined} [arg0]
1171
+ * @param {ReencryptionResponsePayload | null} [arg0]
1191
1172
  */
1192
1173
  set payload(arg0) {
1193
1174
  let ptr0 = 0;
@@ -1275,7 +1256,7 @@ class ReencryptionResponsePayload {
1275
1256
  * The resulting signcrypted ciphertexts, each ciphertext
1276
1257
  * must be decrypted and then reconstructed with the other shares
1277
1258
  * to produce the final plaintext.
1278
- * @returns {(TypedSigncryptedCiphertext)[]}
1259
+ * @returns {TypedSigncryptedCiphertext[]}
1279
1260
  */
1280
1261
  get signcrypted_ciphertexts() {
1281
1262
  const ret = wasm.__wbg_get_reencryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);
@@ -1287,7 +1268,7 @@ class ReencryptionResponsePayload {
1287
1268
  * The resulting signcrypted ciphertexts, each ciphertext
1288
1269
  * must be decrypted and then reconstructed with the other shares
1289
1270
  * to produce the final plaintext.
1290
- * @param {(TypedSigncryptedCiphertext)[]} arg0
1271
+ * @param {TypedSigncryptedCiphertext[]} arg0
1291
1272
  */
1292
1273
  set signcrypted_ciphertexts(arg0) {
1293
1274
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
@@ -1416,7 +1397,7 @@ class TypedCiphertext {
1416
1397
  wasm.__wbg_typedciphertext_free(ptr, 0);
1417
1398
  }
1418
1399
  /**
1419
- * The actual ciphertext to decrypt, taken directly from HTTPZ.
1400
+ * The actual ciphertext to decrypt, taken directly from fhevm.
1420
1401
  * @returns {Uint8Array}
1421
1402
  */
1422
1403
  get ciphertext() {
@@ -1426,7 +1407,7 @@ class TypedCiphertext {
1426
1407
  return v1;
1427
1408
  }
1428
1409
  /**
1429
- * The actual ciphertext to decrypt, taken directly from HTTPZ.
1410
+ * The actual ciphertext to decrypt, taken directly from fhevm.
1430
1411
  * @param {Uint8Array} arg0
1431
1412
  */
1432
1413
  set ciphertext(arg0) {
@@ -1435,7 +1416,8 @@ class TypedCiphertext {
1435
1416
  wasm.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, ptr0, len0);
1436
1417
  }
1437
1418
  /**
1438
- * The type of plaintext encrypted.
1419
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1420
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1439
1421
  * @returns {number}
1440
1422
  */
1441
1423
  get fhe_type() {
@@ -1443,7 +1425,8 @@ class TypedCiphertext {
1443
1425
  return ret;
1444
1426
  }
1445
1427
  /**
1446
- * The type of plaintext encrypted.
1428
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1429
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1447
1430
  * @param {number} arg0
1448
1431
  */
1449
1432
  set fhe_type(arg0) {
@@ -1535,7 +1518,8 @@ class TypedPlaintext {
1535
1518
  wasm.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, ptr0, len0);
1536
1519
  }
1537
1520
  /**
1538
- * The type of plaintext encrypted.
1521
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1522
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1539
1523
  * @returns {number}
1540
1524
  */
1541
1525
  get fhe_type() {
@@ -1543,7 +1527,8 @@ class TypedPlaintext {
1543
1527
  return ret;
1544
1528
  }
1545
1529
  /**
1546
- * The type of plaintext encrypted.
1530
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1531
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1547
1532
  * @param {number} arg0
1548
1533
  */
1549
1534
  set fhe_type(arg0) {
@@ -1585,7 +1570,8 @@ class TypedSigncryptedCiphertext {
1585
1570
  wasm.__wbg_typedsigncryptedciphertext_free(ptr, 0);
1586
1571
  }
1587
1572
  /**
1588
- * The type of plaintext encrypted.
1573
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1574
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1589
1575
  * @returns {number}
1590
1576
  */
1591
1577
  get fhe_type() {
@@ -1593,7 +1579,8 @@ class TypedSigncryptedCiphertext {
1593
1579
  return ret;
1594
1580
  }
1595
1581
  /**
1596
- * The type of plaintext encrypted.
1582
+ * The type of plaintext encrypted. The type should match FheType from tfhe-rs:
1583
+ * <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
1597
1584
  * @param {number} arg0
1598
1585
  */
1599
1586
  set fhe_type(arg0) {
@@ -1639,6 +1626,23 @@ class TypedSigncryptedCiphertext {
1639
1626
  const len0 = WASM_VECTOR_LEN;
1640
1627
  wasm.__wbg_set_eip712domainmsg_version(this.__wbg_ptr, ptr0, len0);
1641
1628
  }
1629
+ /**
1630
+ * The packing factor determines whether the decrypted plaintext
1631
+ * has a different way of packing compared to what is specified in the plaintext modulus.
1632
+ * @returns {number}
1633
+ */
1634
+ get packing_factor() {
1635
+ const ret = wasm.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr);
1636
+ return ret >>> 0;
1637
+ }
1638
+ /**
1639
+ * The packing factor determines whether the decrypted plaintext
1640
+ * has a different way of packing compared to what is specified in the plaintext modulus.
1641
+ * @param {number} arg0
1642
+ */
1643
+ set packing_factor(arg0) {
1644
+ wasm.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr, arg0);
1645
+ }
1642
1646
  }
1643
1647
  module.exports.TypedSigncryptedCiphertext = TypedSigncryptedCiphertext;
1644
1648
 
@@ -1650,18 +1654,18 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1650
1654
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1651
1655
  };
1652
1656
 
1653
- module.exports.__wbg_buffer_61b7ce01341d7f88 = function(arg0) {
1657
+ module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
1654
1658
  const ret = arg0.buffer;
1655
1659
  return ret;
1656
1660
  };
1657
1661
 
1658
- module.exports.__wbg_call_500db948e69c7330 = function() { return handleError(function (arg0, arg1, arg2) {
1659
- const ret = arg0.call(arg1, arg2);
1662
+ module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1663
+ const ret = arg0.call(arg1);
1660
1664
  return ret;
1661
1665
  }, arguments) };
1662
1666
 
1663
- module.exports.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) {
1664
- const ret = arg0.call(arg1);
1667
+ module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
1668
+ const ret = arg0.call(arg1, arg2);
1665
1669
  return ret;
1666
1670
  }, arguments) };
1667
1671
 
@@ -1670,7 +1674,7 @@ module.exports.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
1670
1674
  return ret;
1671
1675
  };
1672
1676
 
1673
- module.exports.__wbg_done_f22c1561fa919baa = function(arg0) {
1677
+ module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
1674
1678
  const ret = arg0.done;
1675
1679
  return ret;
1676
1680
  };
@@ -1691,22 +1695,22 @@ module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return hand
1691
1695
  arg0.getRandomValues(arg1);
1692
1696
  }, arguments) };
1693
1697
 
1694
- module.exports.__wbg_get_9aa3dff3f0266054 = function(arg0, arg1) {
1695
- const ret = arg0[arg1 >>> 0];
1696
- return ret;
1697
- };
1698
-
1699
- module.exports.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) {
1698
+ module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
1700
1699
  const ret = Reflect.get(arg0, arg1);
1701
1700
  return ret;
1702
1701
  }, arguments) };
1703
1702
 
1703
+ module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
1704
+ const ret = arg0[arg1 >>> 0];
1705
+ return ret;
1706
+ };
1707
+
1704
1708
  module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
1705
1709
  const ret = arg0[arg1];
1706
1710
  return ret;
1707
1711
  };
1708
1712
 
1709
- module.exports.__wbg_instanceof_ArrayBuffer_670ddde44cdb2602 = function(arg0) {
1713
+ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
1710
1714
  let result;
1711
1715
  try {
1712
1716
  result = arg0 instanceof ArrayBuffer;
@@ -1717,7 +1721,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_670ddde44cdb2602 = function(arg0) {
1717
1721
  return ret;
1718
1722
  };
1719
1723
 
1720
- module.exports.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
1724
+ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
1721
1725
  let result;
1722
1726
  try {
1723
1727
  result = arg0 instanceof Uint8Array;
@@ -1728,27 +1732,27 @@ module.exports.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
1728
1732
  return ret;
1729
1733
  };
1730
1734
 
1731
- module.exports.__wbg_isArray_1ba11a930108ec51 = function(arg0) {
1735
+ module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
1732
1736
  const ret = Array.isArray(arg0);
1733
1737
  return ret;
1734
1738
  };
1735
1739
 
1736
- module.exports.__wbg_isSafeInteger_12f5549b2fca23f4 = function(arg0) {
1740
+ module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
1737
1741
  const ret = Number.isSafeInteger(arg0);
1738
1742
  return ret;
1739
1743
  };
1740
1744
 
1741
- module.exports.__wbg_iterator_23604bb983791576 = function() {
1745
+ module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
1742
1746
  const ret = Symbol.iterator;
1743
1747
  return ret;
1744
1748
  };
1745
1749
 
1746
- module.exports.__wbg_length_65d1cd11729ced11 = function(arg0) {
1750
+ module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
1747
1751
  const ret = arg0.length;
1748
1752
  return ret;
1749
1753
  };
1750
1754
 
1751
- module.exports.__wbg_length_d65cf0786bfc5739 = function(arg0) {
1755
+ module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
1752
1756
  const ret = arg0.length;
1753
1757
  return ret;
1754
1758
  };
@@ -1758,41 +1762,41 @@ module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
1758
1762
  return ret;
1759
1763
  };
1760
1764
 
1761
- module.exports.__wbg_new_3ff5b33b1ce712df = function(arg0) {
1762
- const ret = new Uint8Array(arg0);
1765
+ module.exports.__wbg_new_8a6f238a6ece86ea = function() {
1766
+ const ret = new Error();
1763
1767
  return ret;
1764
1768
  };
1765
1769
 
1766
- module.exports.__wbg_new_8a6f238a6ece86ea = function() {
1767
- const ret = new Error();
1770
+ module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
1771
+ const ret = new Uint8Array(arg0);
1768
1772
  return ret;
1769
1773
  };
1770
1774
 
1771
- module.exports.__wbg_newnoargs_fd9e4bf8be2bc16d = function(arg0, arg1) {
1775
+ module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
1772
1776
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1773
1777
  return ret;
1774
1778
  };
1775
1779
 
1776
- module.exports.__wbg_newwithbyteoffsetandlength_ba35896968751d91 = function(arg0, arg1, arg2) {
1780
+ module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
1777
1781
  const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1778
1782
  return ret;
1779
1783
  };
1780
1784
 
1781
- module.exports.__wbg_newwithlength_34ce8f1051e74449 = function(arg0) {
1785
+ module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
1782
1786
  const ret = new Uint8Array(arg0 >>> 0);
1783
1787
  return ret;
1784
1788
  };
1785
1789
 
1786
- module.exports.__wbg_next_01dd9234a5bf6d05 = function() { return handleError(function (arg0) {
1787
- const ret = arg0.next();
1788
- return ret;
1789
- }, arguments) };
1790
-
1791
- module.exports.__wbg_next_137428deb98342b0 = function(arg0) {
1790
+ module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
1792
1791
  const ret = arg0.next;
1793
1792
  return ret;
1794
1793
  };
1795
1794
 
1795
+ module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
1796
+ const ret = arg0.next();
1797
+ return ret;
1798
+ }, arguments) };
1799
+
1796
1800
  module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
1797
1801
  const ret = arg0.node;
1798
1802
  return ret;
@@ -1817,7 +1821,7 @@ module.exports.__wbg_require_79b1e9274cde3c87 = function() { return handleError(
1817
1821
  return ret;
1818
1822
  }, arguments) };
1819
1823
 
1820
- module.exports.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) {
1824
+ module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
1821
1825
  arg0.set(arg1, arg2 >>> 0);
1822
1826
  };
1823
1827
 
@@ -1829,27 +1833,27 @@ module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1829
1833
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1830
1834
  };
1831
1835
 
1832
- module.exports.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() {
1836
+ module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
1833
1837
  const ret = typeof global === 'undefined' ? null : global;
1834
1838
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1835
1839
  };
1836
1840
 
1837
- module.exports.__wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb = function() {
1841
+ module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
1838
1842
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
1839
1843
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1840
1844
  };
1841
1845
 
1842
- module.exports.__wbg_static_accessor_SELF_1dc398a895c82351 = function() {
1846
+ module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
1843
1847
  const ret = typeof self === 'undefined' ? null : self;
1844
1848
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1845
1849
  };
1846
1850
 
1847
- module.exports.__wbg_static_accessor_WINDOW_ae1c80c7eea8d64a = function() {
1851
+ module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
1848
1852
  const ret = typeof window === 'undefined' ? null : window;
1849
1853
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1850
1854
  };
1851
1855
 
1852
- module.exports.__wbg_subarray_46adeb9b86949d12 = function(arg0, arg1, arg2) {
1856
+ module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
1853
1857
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1854
1858
  return ret;
1855
1859
  };
@@ -1879,7 +1883,7 @@ module.exports.__wbg_typedsigncryptedciphertext_unwrap = function(arg0) {
1879
1883
  return ret;
1880
1884
  };
1881
1885
 
1882
- module.exports.__wbg_value_4c32fd138a88eee2 = function(arg0) {
1886
+ module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
1883
1887
  const ret = arg0.value;
1884
1888
  return ret;
1885
1889
  };
package/kms_lib_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "Zama"
5
5
  ],
6
- "version": "0.11.0-rc6",
6
+ "version": "0.11.0-rc8",
7
7
  "license": "BSD-3-Clause-Clear",
8
8
  "files": [
9
9
  "kms_lib_bg.wasm",