@wireapp/core-crypto 1.0.0-pre.5 → 1.0.0-pre.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
13
  PERFORMANCE OF THIS SOFTWARE.
14
14
  ***************************************************************************** */
15
- /* global Reflect, Promise */
15
+ /* global Reflect, Promise, SuppressedError, Symbol */
16
16
  function __classPrivateFieldGet(receiver, state, kind, f) {
17
17
  if (kind === "a" && !f)
18
18
  throw new TypeError("Private accessor was defined without a getter");
@@ -29,12 +29,24 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
29
29
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
30
30
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
31
31
  }
32
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
33
+ var e = new Error(message);
34
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
35
+ };
32
36
 
33
37
  let wasm$1;
34
38
  const heap = new Array(128).fill(undefined);
35
39
  heap.push(undefined, null, true, false);
36
40
  function getObject(idx) { return heap[idx]; }
37
41
  let heap_next = heap.length;
42
+ function addHeapObject(obj) {
43
+ if (heap_next === heap.length)
44
+ heap.push(heap.length + 1);
45
+ const idx = heap_next;
46
+ heap_next = heap[idx];
47
+ heap[idx] = obj;
48
+ return idx;
49
+ }
38
50
  function dropObject(idx) {
39
51
  if (idx < 132)
40
52
  return;
@@ -46,14 +58,6 @@ function takeObject(idx) {
46
58
  dropObject(idx);
47
59
  return ret;
48
60
  }
49
- function addHeapObject(obj) {
50
- if (heap_next === heap.length)
51
- heap.push(heap.length + 1);
52
- const idx = heap_next;
53
- heap_next = heap[idx];
54
- heap[idx] = obj;
55
- return idx;
56
- }
57
61
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
58
62
  if (typeof TextDecoder !== 'undefined') {
59
63
  cachedTextDecoder.decode();
@@ -86,13 +90,13 @@ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
86
90
  function passStringToWasm0(arg, malloc, realloc) {
87
91
  if (realloc === undefined) {
88
92
  const buf = cachedTextEncoder.encode(arg);
89
- const ptr = malloc(buf.length) >>> 0;
93
+ const ptr = malloc(buf.length, 1) >>> 0;
90
94
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
91
95
  WASM_VECTOR_LEN = buf.length;
92
96
  return ptr;
93
97
  }
94
98
  let len = arg.length;
95
- let ptr = malloc(len) >>> 0;
99
+ let ptr = malloc(len, 1) >>> 0;
96
100
  const mem = getUint8Memory0();
97
101
  let offset = 0;
98
102
  for (; offset < len; offset++) {
@@ -105,7 +109,7 @@ function passStringToWasm0(arg, malloc, realloc) {
105
109
  if (offset !== 0) {
106
110
  arg = arg.slice(offset);
107
111
  }
108
- ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
112
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
109
113
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
110
114
  const ret = encodeString(arg, view);
111
115
  offset += ret.written;
@@ -230,12 +234,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
230
234
  return real;
231
235
  }
232
236
  function __wbg_adapter_52(arg0, arg1, arg2) {
233
- wasm$1.wasm_bindgen__convert__closures__invoke1_mut__heb4cb26b6c16bdde(arg0, arg1, addHeapObject(arg2));
237
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h3add802d7f539fd6(arg0, arg1, addHeapObject(arg2));
234
238
  }
235
239
  function __wbg_adapter_55(arg0, arg1, arg2) {
236
240
  try {
237
241
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
238
- wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h4f01ac4587554ef9(retptr, arg0, arg1, addHeapObject(arg2));
242
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__hcf65d5abe1723dcf(retptr, arg0, arg1, addHeapObject(arg2));
239
243
  var r0 = getInt32Memory0()[retptr / 4 + 0];
240
244
  var r1 = getInt32Memory0()[retptr / 4 + 1];
241
245
  if (r1) {
@@ -260,7 +264,7 @@ function getUint32Memory0() {
260
264
  return cachedUint32Memory0;
261
265
  }
262
266
  function passArrayJsValueToWasm0(array, malloc) {
263
- const ptr = malloc(array.length * 4) >>> 0;
267
+ const ptr = malloc(array.length * 4, 4) >>> 0;
264
268
  const mem = getUint32Memory0();
265
269
  for (let i = 0; i < array.length; i++) {
266
270
  mem[ptr / 4 + i] = addHeapObject(array[i]);
@@ -269,7 +273,7 @@ function passArrayJsValueToWasm0(array, malloc) {
269
273
  return ptr;
270
274
  }
271
275
  function passArray8ToWasm0(arg, malloc) {
272
- const ptr = malloc(arg.length * 1) >>> 0;
276
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
273
277
  getUint8Memory0().set(arg, ptr / 1);
274
278
  WASM_VECTOR_LEN = arg.length;
275
279
  return ptr;
@@ -282,11 +286,21 @@ function getUint16Memory0() {
282
286
  return cachedUint16Memory0;
283
287
  }
284
288
  function passArray16ToWasm0(arg, malloc) {
285
- const ptr = malloc(arg.length * 2) >>> 0;
289
+ const ptr = malloc(arg.length * 2, 2) >>> 0;
286
290
  getUint16Memory0().set(arg, ptr / 2);
287
291
  WASM_VECTOR_LEN = arg.length;
288
292
  return ptr;
289
293
  }
294
+ function getArrayJsValueFromWasm0(ptr, len) {
295
+ ptr = ptr >>> 0;
296
+ const mem = getUint32Memory0();
297
+ const slice = mem.subarray(ptr / 4, ptr / 4 + len);
298
+ const result = [];
299
+ for (let i = 0; i < slice.length; i++) {
300
+ result.push(takeObject(slice[i]));
301
+ }
302
+ return result;
303
+ }
290
304
  function getArrayU8FromWasm0(ptr, len) {
291
305
  ptr = ptr >>> 0;
292
306
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
@@ -299,8 +313,8 @@ function handleError(f, args) {
299
313
  wasm$1.__wbindgen_exn_store(addHeapObject(e));
300
314
  }
301
315
  }
302
- function __wbg_adapter_288(arg0, arg1, arg2, arg3) {
303
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h20434c3f820154b5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
316
+ function __wbg_adapter_296(arg0, arg1, arg2, arg3) {
317
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h7d17d9f660171c31(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
304
318
  }
305
319
  /**
306
320
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -360,6 +374,10 @@ const Ciphersuite$1 = Object.freeze({
360
374
  * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
361
375
  */
362
376
  MLS_256_DHKEMP384_AES256GCM_SHA384_P384: 7, "7": "MLS_256_DHKEMP384_AES256GCM_SHA384_P384",
377
+ /**
378
+ * x25519Kyber768Draft00 Hybrid KEM | AES-GCM 128 | SHA2-256 | Ed25519
379
+ */
380
+ MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519: 61489, "61489": "MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519",
363
381
  });
364
382
  /**
365
383
  * See [core_crypto::e2e_identity::types::E2eiAcmeChallenge]
@@ -417,7 +435,7 @@ class AcmeChallenge {
417
435
  }
418
436
  finally {
419
437
  wasm$1.__wbindgen_add_to_stack_pointer(16);
420
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
438
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
421
439
  }
422
440
  }
423
441
  /**
@@ -437,7 +455,7 @@ class AcmeChallenge {
437
455
  }
438
456
  finally {
439
457
  wasm$1.__wbindgen_add_to_stack_pointer(16);
440
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
458
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
441
459
  }
442
460
  }
443
461
  }
@@ -492,7 +510,7 @@ class AcmeDirectory {
492
510
  }
493
511
  finally {
494
512
  wasm$1.__wbindgen_add_to_stack_pointer(16);
495
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
513
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
496
514
  }
497
515
  }
498
516
  /**
@@ -512,7 +530,7 @@ class AcmeDirectory {
512
530
  }
513
531
  finally {
514
532
  wasm$1.__wbindgen_add_to_stack_pointer(16);
515
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
533
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
516
534
  }
517
535
  }
518
536
  /**
@@ -532,13 +550,19 @@ class AcmeDirectory {
532
550
  }
533
551
  finally {
534
552
  wasm$1.__wbindgen_add_to_stack_pointer(16);
535
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
553
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
536
554
  }
537
555
  }
538
556
  }
539
557
  /**
540
558
  */
541
559
  class CommitBundle {
560
+ static __wrap(ptr) {
561
+ ptr = ptr >>> 0;
562
+ const obj = Object.create(CommitBundle.prototype);
563
+ obj.__wbg_ptr = ptr;
564
+ return obj;
565
+ }
542
566
  __destroy_into_raw() {
543
567
  const ptr = this.__wbg_ptr;
544
568
  this.__wbg_ptr = 0;
@@ -552,7 +576,7 @@ class CommitBundle {
552
576
  * @returns {Uint8Array}
553
577
  */
554
578
  get commit() {
555
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
579
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
556
580
  return takeObject(ret);
557
581
  }
558
582
  /**
@@ -618,21 +642,21 @@ class ConversationInitBundle {
618
642
  * @returns {Uint8Array}
619
643
  */
620
644
  get conversation_id() {
621
- const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
645
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
622
646
  return takeObject(ret);
623
647
  }
624
648
  /**
625
649
  * @returns {Uint8Array}
626
650
  */
627
651
  get commit() {
628
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
652
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
629
653
  return takeObject(ret);
630
654
  }
631
655
  /**
632
656
  * @returns {GroupInfoBundle}
633
657
  */
634
658
  get group_info() {
635
- const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
659
+ const ret = wasm$1.conversationinitbundle_group_info(this.__wbg_ptr);
636
660
  return GroupInfoBundle.__wrap(ret);
637
661
  }
638
662
  }
@@ -676,17 +700,68 @@ let CoreCrypto$1 = class CoreCrypto {
676
700
  return takeObject(ret);
677
701
  }
678
702
  /**
679
- * see [core_crypto::mls::MlsCentral::e2ei_mls_init]
703
+ * Returns: [`WasmCryptoResult<WireE2eIdentity>`]
704
+ *
705
+ * see [core_crypto::mls::MlsCentral::e2ei_new_activation_enrollment]
706
+ * @param {string} display_name
707
+ * @param {string} handle
708
+ * @param {number} expiry_days
709
+ * @param {number} ciphersuite
710
+ * @returns {Promise<any>}
711
+ */
712
+ e2ei_new_activation_enrollment(display_name, handle, expiry_days, ciphersuite) {
713
+ const ptr0 = passStringToWasm0(display_name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
714
+ const len0 = WASM_VECTOR_LEN;
715
+ const ptr1 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
716
+ const len1 = WASM_VECTOR_LEN;
717
+ const ret = wasm$1.corecrypto_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, expiry_days, ciphersuite);
718
+ return takeObject(ret);
719
+ }
720
+ /**
721
+ * Returns: [`WasmCryptoResult<WireE2eIdentity>`]
722
+ *
723
+ * see [core_crypto::mls::MlsCentral::e2ei_new_rotate_enrollment]
724
+ * @param {string | undefined} display_name
725
+ * @param {string | undefined} handle
726
+ * @param {number} expiry_days
727
+ * @param {number} ciphersuite
728
+ * @returns {Promise<any>}
729
+ */
730
+ e2ei_new_rotate_enrollment(display_name, handle, expiry_days, ciphersuite) {
731
+ var ptr0 = isLikeNone(display_name) ? 0 : passStringToWasm0(display_name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
732
+ var len0 = WASM_VECTOR_LEN;
733
+ var ptr1 = isLikeNone(handle) ? 0 : passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
734
+ var len1 = WASM_VECTOR_LEN;
735
+ const ret = wasm$1.corecrypto_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, expiry_days, ciphersuite);
736
+ return takeObject(ret);
737
+ }
738
+ /**
739
+ * see [core_crypto::mls::MlsCentral::e2ei_mls_init_only]
680
740
  * @param {FfiWireE2EIdentity} enrollment
681
741
  * @param {string} certificate_chain
682
742
  * @returns {Promise<any>}
683
743
  */
684
- e2ei_mls_init(enrollment, certificate_chain) {
744
+ e2ei_mls_init_only(enrollment, certificate_chain) {
685
745
  _assertClass(enrollment, FfiWireE2EIdentity);
686
746
  var ptr0 = enrollment.__destroy_into_raw();
687
747
  const ptr1 = passStringToWasm0(certificate_chain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
688
748
  const len1 = WASM_VECTOR_LEN;
689
- const ret = wasm$1.corecrypto_e2ei_mls_init(this.__wbg_ptr, ptr0, ptr1, len1);
749
+ const ret = wasm$1.corecrypto_e2ei_mls_init_only(this.__wbg_ptr, ptr0, ptr1, len1);
750
+ return takeObject(ret);
751
+ }
752
+ /**
753
+ * see [core_crypto::mls::MlsCentral::e2ei_rotate_all]
754
+ * @param {FfiWireE2EIdentity} enrollment
755
+ * @param {string} certificate_chain
756
+ * @param {number} new_key_packages_count
757
+ * @returns {Promise<any>}
758
+ */
759
+ e2ei_rotate_all(enrollment, certificate_chain, new_key_packages_count) {
760
+ _assertClass(enrollment, FfiWireE2EIdentity);
761
+ var ptr0 = enrollment.__destroy_into_raw();
762
+ const ptr1 = passStringToWasm0(certificate_chain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
763
+ const len1 = WASM_VECTOR_LEN;
764
+ const ret = wasm$1.corecrypto_e2ei_rotate_all(this.__wbg_ptr, ptr0, ptr1, len1, new_key_packages_count);
690
765
  return takeObject(ret);
691
766
  }
692
767
  /**
@@ -742,7 +817,7 @@ let CoreCrypto$1 = class CoreCrypto {
742
817
  }
743
818
  finally {
744
819
  wasm$1.__wbindgen_add_to_stack_pointer(16);
745
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
820
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
746
821
  }
747
822
  }
748
823
  /**
@@ -893,11 +968,12 @@ let CoreCrypto$1 = class CoreCrypto {
893
968
  *
894
969
  * see [core_crypto::mls::MlsCentral::client_keypackages]
895
970
  * @param {number} ciphersuite
971
+ * @param {number} credential_type
896
972
  * @param {number} amount_requested
897
973
  * @returns {Promise<any>}
898
974
  */
899
- client_keypackages(ciphersuite, amount_requested) {
900
- const ret = wasm$1.corecrypto_client_keypackages(this.__wbg_ptr, ciphersuite, amount_requested);
975
+ client_keypackages(ciphersuite, credential_type, amount_requested) {
976
+ const ret = wasm$1.corecrypto_client_keypackages(this.__wbg_ptr, ciphersuite, credential_type, amount_requested);
901
977
  return takeObject(ret);
902
978
  }
903
979
  /**
@@ -905,10 +981,24 @@ let CoreCrypto$1 = class CoreCrypto {
905
981
  *
906
982
  * see [core_crypto::mls::MlsCentral::client_valid_keypackages_count]
907
983
  * @param {number} ciphersuite
984
+ * @param {number} credential_type
985
+ * @returns {Promise<any>}
986
+ */
987
+ client_valid_keypackages_count(ciphersuite, credential_type) {
988
+ const ret = wasm$1.corecrypto_client_valid_keypackages_count(this.__wbg_ptr, ciphersuite, credential_type);
989
+ return takeObject(ret);
990
+ }
991
+ /**
992
+ * Returns: [`WasmCryptoResult<usize>`]
993
+ *
994
+ * see [core_crypto::mls::MlsCentral::delete_keypackages]
995
+ * @param {(Uint8Array)[]} refs
908
996
  * @returns {Promise<any>}
909
997
  */
910
- client_valid_keypackages_count(ciphersuite) {
911
- const ret = wasm$1.corecrypto_client_valid_keypackages_count(this.__wbg_ptr, ciphersuite);
998
+ delete_keypackages(refs) {
999
+ const ptr0 = passArrayJsValueToWasm0(refs, wasm$1.__wbindgen_malloc);
1000
+ const len0 = WASM_VECTOR_LEN;
1001
+ const ret = wasm$1.corecrypto_delete_keypackages(this.__wbg_ptr, ptr0, len0);
912
1002
  return takeObject(ret);
913
1003
  }
914
1004
  /**
@@ -1149,19 +1239,6 @@ let CoreCrypto$1 = class CoreCrypto {
1149
1239
  return takeObject(ret);
1150
1240
  }
1151
1241
  /**
1152
- * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1153
- *
1154
- * see [core_crypto::mls::MlsCentral::export_group_info]
1155
- * @param {Uint8Array} conversation_id
1156
- * @returns {Promise<any>}
1157
- */
1158
- export_group_info(conversation_id) {
1159
- const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1160
- const len0 = WASM_VECTOR_LEN;
1161
- const ret = wasm$1.corecrypto_export_group_info(this.__wbg_ptr, ptr0, len0);
1162
- return takeObject(ret);
1163
- }
1164
- /**
1165
1242
  * Returns: [`WasmCryptoResult<ConversationInitBundle>`]
1166
1243
  *
1167
1244
  * see [core_crypto::mls::MlsCentral::join_by_external_commit]
@@ -1516,7 +1593,7 @@ let CoreCrypto$1 = class CoreCrypto {
1516
1593
  }
1517
1594
  finally {
1518
1595
  wasm$1.__wbindgen_add_to_stack_pointer(16);
1519
- wasm$1.__wbindgen_free(deferred3_0, deferred3_1);
1596
+ wasm$1.__wbindgen_free(deferred3_0, deferred3_1, 1);
1520
1597
  }
1521
1598
  }
1522
1599
  /**
@@ -2024,7 +2101,7 @@ class FfiWireE2EIdentity {
2024
2101
  }
2025
2102
  finally {
2026
2103
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2027
- wasm$1.__wbindgen_free(deferred2_0, deferred2_1);
2104
+ wasm$1.__wbindgen_free(deferred2_0, deferred2_1, 1);
2028
2105
  }
2029
2106
  }
2030
2107
  /**
@@ -2078,7 +2155,7 @@ class FfiWireE2EIdentity {
2078
2155
  }
2079
2156
  finally {
2080
2157
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2081
- wasm$1.__wbindgen_free(deferred2_0, deferred2_1);
2158
+ wasm$1.__wbindgen_free(deferred2_0, deferred2_1, 1);
2082
2159
  }
2083
2160
  }
2084
2161
  /**
@@ -2183,7 +2260,7 @@ class Invitee {
2183
2260
  * @returns {Uint8Array}
2184
2261
  */
2185
2262
  get kp() {
2186
- const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2263
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2187
2264
  return takeObject(ret);
2188
2265
  }
2189
2266
  }
@@ -2221,21 +2298,21 @@ class MemberAddedMessages {
2221
2298
  * @returns {Uint8Array}
2222
2299
  */
2223
2300
  get welcome() {
2224
- const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
2301
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2225
2302
  return takeObject(ret);
2226
2303
  }
2227
2304
  /**
2228
2305
  * @returns {Uint8Array}
2229
2306
  */
2230
2307
  get commit() {
2231
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
2308
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2232
2309
  return takeObject(ret);
2233
2310
  }
2234
2311
  /**
2235
2312
  * @returns {GroupInfoBundle}
2236
2313
  */
2237
2314
  get group_info() {
2238
- const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
2315
+ const ret = wasm$1.conversationinitbundle_group_info(this.__wbg_ptr);
2239
2316
  return GroupInfoBundle.__wrap(ret);
2240
2317
  }
2241
2318
  }
@@ -2287,7 +2364,7 @@ class NewAcmeAuthz {
2287
2364
  let deferred1_1;
2288
2365
  try {
2289
2366
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2290
- wasm$1.newacmeauthz_identifier(retptr, this.__wbg_ptr);
2367
+ wasm$1.acmedirectory_newNonce(retptr, this.__wbg_ptr);
2291
2368
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2292
2369
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2293
2370
  deferred1_0 = r0;
@@ -2296,7 +2373,7 @@ class NewAcmeAuthz {
2296
2373
  }
2297
2374
  finally {
2298
2375
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2299
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2376
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
2300
2377
  }
2301
2378
  }
2302
2379
  /**
@@ -2387,7 +2464,7 @@ class ProposalBundle {
2387
2464
  * @returns {Uint8Array}
2388
2465
  */
2389
2466
  get proposal_ref() {
2390
- const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2467
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2391
2468
  return takeObject(ret);
2392
2469
  }
2393
2470
  }
@@ -2449,6 +2526,60 @@ class ProteusAutoPrekeyBundle {
2449
2526
  }
2450
2527
  }
2451
2528
  /**
2529
+ */
2530
+ class RotateBundle {
2531
+ __destroy_into_raw() {
2532
+ const ptr = this.__wbg_ptr;
2533
+ this.__wbg_ptr = 0;
2534
+ return ptr;
2535
+ }
2536
+ free() {
2537
+ const ptr = this.__destroy_into_raw();
2538
+ wasm$1.__wbg_rotatebundle_free(ptr);
2539
+ }
2540
+ /**
2541
+ * @returns {Array<any>}
2542
+ */
2543
+ get commits() {
2544
+ const ret = wasm$1.rotatebundle_commits(this.__wbg_ptr);
2545
+ return takeObject(ret);
2546
+ }
2547
+ /**
2548
+ * @returns {(Uint8Array)[]}
2549
+ */
2550
+ get new_key_packages() {
2551
+ try {
2552
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2553
+ wasm$1.rotatebundle_new_key_packages(retptr, this.__wbg_ptr);
2554
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2555
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2556
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2557
+ wasm$1.__wbindgen_free(r0, r1 * 4);
2558
+ return v1;
2559
+ }
2560
+ finally {
2561
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2562
+ }
2563
+ }
2564
+ /**
2565
+ * @returns {(Uint8Array)[]}
2566
+ */
2567
+ get key_package_refs_to_remove() {
2568
+ try {
2569
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2570
+ wasm$1.rotatebundle_key_package_refs_to_remove(retptr, this.__wbg_ptr);
2571
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2572
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2573
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2574
+ wasm$1.__wbindgen_free(r0, r1 * 4);
2575
+ return v1;
2576
+ }
2577
+ finally {
2578
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2579
+ }
2580
+ }
2581
+ }
2582
+ /**
2452
2583
  * see [core_crypto::prelude::WireIdentity]
2453
2584
  */
2454
2585
  class WireIdentity {
@@ -2502,7 +2633,7 @@ class WireIdentity {
2502
2633
  }
2503
2634
  finally {
2504
2635
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2505
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2636
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
2506
2637
  }
2507
2638
  }
2508
2639
  /**
@@ -2522,7 +2653,7 @@ class WireIdentity {
2522
2653
  }
2523
2654
  finally {
2524
2655
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2525
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2656
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
2526
2657
  }
2527
2658
  }
2528
2659
  /**
@@ -2542,7 +2673,7 @@ class WireIdentity {
2542
2673
  }
2543
2674
  finally {
2544
2675
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2545
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2676
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
2546
2677
  }
2547
2678
  }
2548
2679
  /**
@@ -2562,7 +2693,7 @@ class WireIdentity {
2562
2693
  }
2563
2694
  finally {
2564
2695
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2565
- wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2696
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
2566
2697
  }
2567
2698
  }
2568
2699
  }
@@ -2597,9 +2728,6 @@ async function __wbg_load(module, imports) {
2597
2728
  function __wbg_get_imports() {
2598
2729
  const imports = {};
2599
2730
  imports.wbg = {};
2600
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2601
- takeObject(arg0);
2602
- };
2603
2731
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2604
2732
  const ret = getObject(arg0);
2605
2733
  return addHeapObject(ret);
@@ -2609,6 +2737,9 @@ function __wbg_get_imports() {
2609
2737
  const ret = typeof (val) === 'object' && val !== null;
2610
2738
  return ret;
2611
2739
  };
2740
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2741
+ takeObject(arg0);
2742
+ };
2612
2743
  imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function (arg0, arg1) {
2613
2744
  const ret = getObject(arg0)[getObject(arg1)];
2614
2745
  return addHeapObject(ret);
@@ -2621,17 +2752,17 @@ function __wbg_get_imports() {
2621
2752
  const ret = getObject(arg0) in getObject(arg1);
2622
2753
  return ret;
2623
2754
  };
2624
- imports.wbg.__wbg_objectStore_6eb812526333c917 = function () {
2755
+ imports.wbg.__wbg_objectStore_5a858a654147f96f = function () {
2625
2756
  return handleError(function (arg0, arg1, arg2) {
2626
2757
  const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2627
2758
  return addHeapObject(ret);
2628
2759
  }, arguments);
2629
2760
  };
2630
- imports.wbg.__wbg_objectStoreNames_432a9424fbdfefda = function (arg0) {
2761
+ imports.wbg.__wbg_objectStoreNames_774e47f8818de433 = function (arg0) {
2631
2762
  const ret = getObject(arg0).objectStoreNames;
2632
2763
  return addHeapObject(ret);
2633
2764
  };
2634
- imports.wbg.__wbg_length_4633dd9b984117b1 = function (arg0) {
2765
+ imports.wbg.__wbg_length_de272fc97200ec95 = function (arg0) {
2635
2766
  const ret = getObject(arg0).length;
2636
2767
  return ret;
2637
2768
  };
@@ -2639,7 +2770,7 @@ function __wbg_get_imports() {
2639
2770
  const ret = getStringFromWasm0(arg0, arg1);
2640
2771
  return addHeapObject(ret);
2641
2772
  };
2642
- imports.wbg.__wbg_get_a9b507527c0f6958 = function () {
2773
+ imports.wbg.__wbg_get_fc26906e5ae1ea85 = function () {
2643
2774
  return handleError(function (arg0, arg1) {
2644
2775
  const ret = getObject(arg0).get(getObject(arg1));
2645
2776
  return addHeapObject(ret);
@@ -2657,99 +2788,99 @@ function __wbg_get_imports() {
2657
2788
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2658
2789
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2659
2790
  };
2660
- imports.wbg.__wbg_length_820c786973abdd8a = function (arg0) {
2791
+ imports.wbg.__wbg_length_fff51ee6522a1a18 = function (arg0) {
2661
2792
  const ret = getObject(arg0).length;
2662
2793
  return ret;
2663
2794
  };
2664
- imports.wbg.__wbg_call_587b30eea3e09332 = function () {
2795
+ imports.wbg.__wbg_call_01734de55d61e11d = function () {
2665
2796
  return handleError(function (arg0, arg1, arg2) {
2666
2797
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2667
2798
  return addHeapObject(ret);
2668
2799
  }, arguments);
2669
2800
  };
2670
- imports.wbg.__wbg_new_0394642eae39db16 = function () {
2671
- const ret = new Array();
2672
- return addHeapObject(ret);
2801
+ imports.wbg.__wbg_new_43f1b47c28813cbd = function (arg0, arg1) {
2802
+ try {
2803
+ var state0 = { a: arg0, b: arg1 };
2804
+ var cb0 = (arg0, arg1) => {
2805
+ const a = state0.a;
2806
+ state0.a = 0;
2807
+ try {
2808
+ return __wbg_adapter_296(a, state0.b, arg0, arg1);
2809
+ }
2810
+ finally {
2811
+ state0.a = a;
2812
+ }
2813
+ };
2814
+ const ret = new Promise(cb0);
2815
+ return addHeapObject(ret);
2816
+ }
2817
+ finally {
2818
+ state0.a = state0.b = 0;
2819
+ }
2673
2820
  };
2674
- imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
2821
+ imports.wbg.__wbg_new_8125e318e6245eed = function (arg0) {
2675
2822
  const ret = new Uint8Array(getObject(arg0));
2676
2823
  return addHeapObject(ret);
2677
2824
  };
2678
- imports.wbg.__wbg_push_109cfc26d02582dd = function (arg0, arg1) {
2679
- const ret = getObject(arg0).push(getObject(arg1));
2680
- return ret;
2825
+ imports.wbg.__wbg_new_b51585de1b234aff = function () {
2826
+ const ret = new Object();
2827
+ return addHeapObject(ret);
2681
2828
  };
2682
2829
  imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2683
2830
  const ret = FfiWireE2EIdentity.__wrap(arg0);
2684
2831
  return addHeapObject(ret);
2685
2832
  };
2833
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2834
+ const ret = BigInt.asUintN(64, arg0);
2835
+ return addHeapObject(ret);
2836
+ };
2686
2837
  imports.wbg.__wbindgen_number_new = function (arg0) {
2687
2838
  const ret = arg0;
2688
2839
  return addHeapObject(ret);
2689
2840
  };
2690
- imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
2691
- const ret = new Object();
2841
+ imports.wbg.__wbg_new_898a68150f225f2e = function () {
2842
+ const ret = new Array();
2692
2843
  return addHeapObject(ret);
2693
2844
  };
2694
- imports.wbg.__wbg_set_b4da98d504ac6091 = function (arg0, arg1, arg2) {
2845
+ imports.wbg.__wbg_push_ca1c26067ef907ac = function (arg0, arg1) {
2846
+ const ret = getObject(arg0).push(getObject(arg1));
2847
+ return ret;
2848
+ };
2849
+ imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
2695
2850
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2696
2851
  };
2697
2852
  imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2698
2853
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2699
2854
  };
2700
- imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function () {
2855
+ imports.wbg.__wbg_new_56693dbed0c32988 = function () {
2701
2856
  const ret = new Map();
2702
2857
  return addHeapObject(ret);
2703
2858
  };
2704
- imports.wbg.__wbg_set_da7be7bf0e037b14 = function (arg0, arg1, arg2) {
2859
+ imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function (arg0, arg1, arg2) {
2705
2860
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2706
2861
  return addHeapObject(ret);
2707
2862
  };
2708
- imports.wbg.__wbg_new_2b55e405e4af4986 = function (arg0, arg1) {
2709
- try {
2710
- var state0 = { a: arg0, b: arg1 };
2711
- var cb0 = (arg0, arg1) => {
2712
- const a = state0.a;
2713
- state0.a = 0;
2714
- try {
2715
- return __wbg_adapter_288(a, state0.b, arg0, arg1);
2716
- }
2717
- finally {
2718
- state0.a = a;
2719
- }
2720
- };
2721
- const ret = new Promise(cb0);
2722
- return addHeapObject(ret);
2723
- }
2724
- finally {
2725
- state0.a = state0.b = 0;
2726
- }
2727
- };
2728
2863
  imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2729
2864
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2730
2865
  return addHeapObject(ret);
2731
2866
  };
2732
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2733
- const ret = BigInt.asUintN(64, arg0);
2734
- return addHeapObject(ret);
2735
- };
2736
- imports.wbg.__wbg_new_87297f22973157c8 = function (arg0, arg1) {
2867
+ imports.wbg.__wbg_new_d258248ed531ff54 = function (arg0, arg1) {
2737
2868
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2738
2869
  return addHeapObject(ret);
2739
2870
  };
2740
- imports.wbg.__wbg_openCursor_63250aa904924858 = function () {
2871
+ imports.wbg.__wbg_openCursor_555d508ba71b21cc = function () {
2741
2872
  return handleError(function (arg0, arg1) {
2742
2873
  const ret = getObject(arg0).openCursor(getObject(arg1));
2743
2874
  return addHeapObject(ret);
2744
2875
  }, arguments);
2745
2876
  };
2746
- imports.wbg.__wbg_openCursor_2da32f6b7767a8f6 = function () {
2877
+ imports.wbg.__wbg_openCursor_4d6f62b69b34be26 = function () {
2747
2878
  return handleError(function (arg0) {
2748
2879
  const ret = getObject(arg0).openCursor();
2749
2880
  return addHeapObject(ret);
2750
2881
  }, arguments);
2751
2882
  };
2752
- imports.wbg.__wbg_setonsuccess_d668ac71ae816a35 = function (arg0, arg1) {
2883
+ imports.wbg.__wbg_setonsuccess_f518a37d8228a576 = function (arg0, arg1) {
2753
2884
  getObject(arg0).onsuccess = getObject(arg1);
2754
2885
  };
2755
2886
  imports.wbg.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
@@ -2771,7 +2902,7 @@ function __wbg_get_imports() {
2771
2902
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
2772
2903
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2773
2904
  };
2774
- imports.wbg.__wbg_isSafeInteger_2088b01008075470 = function (arg0) {
2905
+ imports.wbg.__wbg_isSafeInteger_bb8e18dd21c97288 = function (arg0) {
2775
2906
  const ret = Number.isSafeInteger(getObject(arg0));
2776
2907
  return ret;
2777
2908
  };
@@ -2789,19 +2920,15 @@ function __wbg_get_imports() {
2789
2920
  const ret = getObject(arg0) === getObject(arg1);
2790
2921
  return ret;
2791
2922
  };
2792
- imports.wbg.__wbindgen_error_new = function (arg0, arg1) {
2793
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2794
- return addHeapObject(ret);
2795
- };
2796
- imports.wbg.__wbg_isArray_04e59fb73f78ab5b = function (arg0) {
2923
+ imports.wbg.__wbg_isArray_4c24b343cb13cfb1 = function (arg0) {
2797
2924
  const ret = Array.isArray(getObject(arg0));
2798
2925
  return ret;
2799
2926
  };
2800
- imports.wbg.__wbg_iterator_7c7e58f62eb84700 = function () {
2927
+ imports.wbg.__wbg_iterator_97f0c81209c6c35a = function () {
2801
2928
  const ret = Symbol.iterator;
2802
2929
  return addHeapObject(ret);
2803
2930
  };
2804
- imports.wbg.__wbg_get_7303ed2ef026b2f5 = function (arg0, arg1) {
2931
+ imports.wbg.__wbg_get_44be0491f933a435 = function (arg0, arg1) {
2805
2932
  const ret = getObject(arg0)[arg1 >>> 0];
2806
2933
  return addHeapObject(ret);
2807
2934
  };
@@ -2809,7 +2936,7 @@ function __wbg_get_imports() {
2809
2936
  const ret = CoreCrypto$1.__wrap(arg0);
2810
2937
  return addHeapObject(ret);
2811
2938
  };
2812
- imports.wbg.__wbg_instanceof_Promise_4b9b76dc9c35f96e = function (arg0) {
2939
+ imports.wbg.__wbg_instanceof_Promise_0e98a5bf082e090f = function (arg0) {
2813
2940
  let result;
2814
2941
  try {
2815
2942
  result = getObject(arg0) instanceof Promise;
@@ -2820,30 +2947,30 @@ function __wbg_get_imports() {
2820
2947
  const ret = result;
2821
2948
  return ret;
2822
2949
  };
2823
- imports.wbg.__wbg_then_835b073a479138e5 = function (arg0, arg1, arg2) {
2950
+ imports.wbg.__wbg_then_b2267541e2a73865 = function (arg0, arg1, arg2) {
2824
2951
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2825
2952
  return addHeapObject(ret);
2826
2953
  };
2827
- imports.wbg.__wbg_warn_9bdd743e9f5fe1e0 = function (arg0) {
2954
+ imports.wbg.__wbg_warn_d60e832f9882c1b2 = function (arg0) {
2828
2955
  console.warn(getObject(arg0));
2829
2956
  };
2830
- imports.wbg.__wbg_call_4c73e4aecced6a7d = function () {
2957
+ imports.wbg.__wbg_call_4c92f6aec1e1d6e6 = function () {
2831
2958
  return handleError(function (arg0, arg1, arg2, arg3) {
2832
2959
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2833
2960
  return addHeapObject(ret);
2834
2961
  }, arguments);
2835
2962
  };
2836
- imports.wbg.__wbg_call_7f98f4764e617d86 = function () {
2963
+ imports.wbg.__wbg_call_776890ca77946e2f = function () {
2837
2964
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2838
2965
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2839
2966
  return addHeapObject(ret);
2840
2967
  }, arguments);
2841
2968
  };
2842
- imports.wbg.__wbg_of_3ff36373618311f4 = function (arg0, arg1, arg2, arg3) {
2969
+ imports.wbg.__wbg_of_cb684bc8f0eac408 = function (arg0, arg1, arg2, arg3) {
2843
2970
  const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2844
2971
  return addHeapObject(ret);
2845
2972
  };
2846
- imports.wbg.__wbg_apply_8cf86cc6c93f52c1 = function () {
2973
+ imports.wbg.__wbg_apply_64be369596a02ae0 = function () {
2847
2974
  return handleError(function (arg0, arg1, arg2) {
2848
2975
  const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
2849
2976
  return addHeapObject(ret);
@@ -2853,7 +2980,7 @@ function __wbg_get_imports() {
2853
2980
  const ret = performance.now();
2854
2981
  return ret;
2855
2982
  };
2856
- imports.wbg.__wbg_reject_c2ad2ed69321f916 = function (arg0) {
2983
+ imports.wbg.__wbg_reject_7bd6ac9617013c02 = function (arg0) {
2857
2984
  const ret = Promise.reject(getObject(arg0));
2858
2985
  return addHeapObject(ret);
2859
2986
  };
@@ -2861,6 +2988,10 @@ function __wbg_get_imports() {
2861
2988
  const ret = ProposalBundle.__wrap(arg0);
2862
2989
  return addHeapObject(ret);
2863
2990
  };
2991
+ imports.wbg.__wbg_commitbundle_new = function (arg0) {
2992
+ const ret = CommitBundle.__wrap(arg0);
2993
+ return addHeapObject(ret);
2994
+ };
2864
2995
  imports.wbg.__wbg_now_2e07eedfb4ac9dbe = function () {
2865
2996
  const ret = Date.now();
2866
2997
  return ret;
@@ -2885,23 +3016,27 @@ function __wbg_get_imports() {
2885
3016
  console.error(getStringFromWasm0(arg0, arg1));
2886
3017
  }
2887
3018
  finally {
2888
- wasm$1.__wbindgen_free(deferred0_0, deferred0_1);
3019
+ wasm$1.__wbindgen_free(deferred0_0, deferred0_1, 1);
2889
3020
  }
2890
3021
  };
2891
- imports.wbg.__wbg_name_38df4c6ca8f369b9 = function (arg0, arg1) {
3022
+ imports.wbg.__wbindgen_error_new = function (arg0, arg1) {
3023
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
3024
+ return addHeapObject(ret);
3025
+ };
3026
+ imports.wbg.__wbg_name_fd6367bb4b1cd78f = function (arg0, arg1) {
2892
3027
  const ret = getObject(arg1).name;
2893
3028
  const ptr1 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2894
3029
  const len1 = WASM_VECTOR_LEN;
2895
3030
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2896
3031
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2897
3032
  };
2898
- imports.wbg.__wbg_transaction_7cffa0cd94a4c3fe = function () {
3033
+ imports.wbg.__wbg_transaction_64ded2617f47f79a = function () {
2899
3034
  return handleError(function (arg0, arg1, arg2) {
2900
3035
  const ret = getObject(arg0).transaction(getObject(arg1), takeObject(arg2));
2901
3036
  return addHeapObject(ret);
2902
3037
  }, arguments);
2903
3038
  };
2904
- imports.wbg.__wbg_setonerror_e1d069ec7a5315ee = function (arg0, arg1) {
3039
+ imports.wbg.__wbg_setonerror_7bf21979c5219792 = function (arg0, arg1) {
2905
3040
  getObject(arg0).onerror = getObject(arg1);
2906
3041
  };
2907
3042
  imports.wbg.__wbindgen_cb_drop = function (arg0) {
@@ -2913,60 +3048,70 @@ function __wbg_get_imports() {
2913
3048
  const ret = false;
2914
3049
  return ret;
2915
3050
  };
2916
- imports.wbg.__wbg_close_68facef204a0b48a = function (arg0) {
3051
+ imports.wbg.__wbg_close_29232080ee4839b2 = function (arg0) {
2917
3052
  getObject(arg0).close();
2918
3053
  };
2919
- imports.wbg.__wbg_deleteDatabase_8531c5f474a3ff15 = function () {
3054
+ imports.wbg.__wbg_deleteDatabase_c4a7d299bd51151e = function () {
2920
3055
  return handleError(function (arg0, arg1, arg2) {
2921
3056
  const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
2922
3057
  return addHeapObject(ret);
2923
3058
  }, arguments);
2924
3059
  };
2925
- imports.wbg.__wbg_put_f62eacfa59543435 = function () {
3060
+ imports.wbg.__wbg_put_fb32824d87feec5c = function () {
2926
3061
  return handleError(function (arg0, arg1, arg2) {
2927
3062
  const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2928
3063
  return addHeapObject(ret);
2929
3064
  }, arguments);
2930
3065
  };
2931
- imports.wbg.__wbg_put_05619e738b4e6bc3 = function () {
3066
+ imports.wbg.__wbg_put_d6937bc51f51a398 = function () {
2932
3067
  return handleError(function (arg0, arg1) {
2933
3068
  const ret = getObject(arg0).put(getObject(arg1));
2934
3069
  return addHeapObject(ret);
2935
3070
  }, arguments);
2936
3071
  };
2937
- imports.wbg.__wbg_delete_4aef4c117a5e6c27 = function () {
3072
+ imports.wbg.__wbg_delete_ca1cfc48f1f7981c = function () {
2938
3073
  return handleError(function (arg0, arg1) {
2939
3074
  const ret = getObject(arg0).delete(getObject(arg1));
2940
3075
  return addHeapObject(ret);
2941
3076
  }, arguments);
2942
3077
  };
2943
- imports.wbg.__wbg_index_a508b592b002de8d = function () {
3078
+ imports.wbg.__wbg_index_915f5cc0bddc21df = function () {
2944
3079
  return handleError(function (arg0, arg1, arg2) {
2945
3080
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2946
3081
  return addHeapObject(ret);
2947
3082
  }, arguments);
2948
3083
  };
2949
- imports.wbg.__wbg_get_f53c921291c381bd = function () {
3084
+ imports.wbg.__wbg_get_f14f327bf3003f81 = function () {
2950
3085
  return handleError(function (arg0, arg1) {
2951
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
3086
+ const ret = getObject(arg0).get(getObject(arg1));
2952
3087
  return addHeapObject(ret);
2953
3088
  }, arguments);
2954
3089
  };
2955
- imports.wbg.__wbg_get_f5beff7314ca87fd = function () {
3090
+ imports.wbg.__wbg_count_70955a2d988ad669 = function () {
3091
+ return handleError(function (arg0) {
3092
+ const ret = getObject(arg0).count();
3093
+ return addHeapObject(ret);
3094
+ }, arguments);
3095
+ };
3096
+ imports.wbg.__wbg_count_39c67882648e40d7 = function () {
2956
3097
  return handleError(function (arg0, arg1) {
2957
- const ret = getObject(arg0).get(getObject(arg1));
3098
+ const ret = getObject(arg0).count(getObject(arg1));
2958
3099
  return addHeapObject(ret);
2959
3100
  }, arguments);
2960
3101
  };
3102
+ imports.wbg.__wbg_now_9c5990bda04c7e53 = function () {
3103
+ const ret = Date.now();
3104
+ return ret;
3105
+ };
2961
3106
  imports.wbg.__wbindgen_memory = function () {
2962
3107
  const ret = wasm$1.memory;
2963
3108
  return addHeapObject(ret);
2964
3109
  };
2965
- imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function (arg0) {
3110
+ imports.wbg.__wbg_buffer_085ec1f694018c4f = function (arg0) {
2966
3111
  const ret = getObject(arg0).buffer;
2967
3112
  return addHeapObject(ret);
2968
3113
  };
2969
- imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function (arg0, arg1, arg2) {
3114
+ imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function (arg0, arg1, arg2) {
2970
3115
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2971
3116
  return addHeapObject(ret);
2972
3117
  };
@@ -2975,7 +3120,7 @@ function __wbg_get_imports() {
2975
3120
  getObject(arg0).randomFillSync(takeObject(arg1));
2976
3121
  }, arguments);
2977
3122
  };
2978
- imports.wbg.__wbg_subarray_d82be056deb4ad27 = function (arg0, arg1, arg2) {
3123
+ imports.wbg.__wbg_subarray_13db269f57aa838d = function (arg0, arg1, arg2) {
2979
3124
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2980
3125
  return addHeapObject(ret);
2981
3126
  };
@@ -3018,124 +3163,126 @@ function __wbg_get_imports() {
3018
3163
  const ret = getObject(arg0).msCrypto;
3019
3164
  return addHeapObject(ret);
3020
3165
  };
3021
- imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function (arg0) {
3166
+ imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function (arg0) {
3022
3167
  const ret = new Uint8Array(arg0 >>> 0);
3023
3168
  return addHeapObject(ret);
3024
3169
  };
3025
- imports.wbg.__wbg_next_ec061e48a0e72a96 = function () {
3170
+ imports.wbg.__wbg_next_ddb3312ca1c4e32a = function () {
3026
3171
  return handleError(function (arg0) {
3027
3172
  const ret = getObject(arg0).next();
3028
3173
  return addHeapObject(ret);
3029
3174
  }, arguments);
3030
3175
  };
3031
- imports.wbg.__wbg_done_b6abb27d42b63867 = function (arg0) {
3176
+ imports.wbg.__wbg_done_5c1f01fb660d73b5 = function (arg0) {
3032
3177
  const ret = getObject(arg0).done;
3033
3178
  return ret;
3034
3179
  };
3035
- imports.wbg.__wbg_value_2f4ef2036bfad28e = function (arg0) {
3180
+ imports.wbg.__wbg_value_1695675138684bd5 = function (arg0) {
3036
3181
  const ret = getObject(arg0).value;
3037
3182
  return addHeapObject(ret);
3038
3183
  };
3039
- imports.wbg.__wbg_call_557a2f2deacc4912 = function () {
3184
+ imports.wbg.__wbg_get_97b561fb56f034b5 = function () {
3185
+ return handleError(function (arg0, arg1) {
3186
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3187
+ return addHeapObject(ret);
3188
+ }, arguments);
3189
+ };
3190
+ imports.wbg.__wbg_call_cb65541d95d71282 = function () {
3040
3191
  return handleError(function (arg0, arg1) {
3041
3192
  const ret = getObject(arg0).call(getObject(arg1));
3042
3193
  return addHeapObject(ret);
3043
3194
  }, arguments);
3044
3195
  };
3045
- imports.wbg.__wbg_next_f4bc0e96ea67da68 = function (arg0) {
3196
+ imports.wbg.__wbg_next_526fc47e980da008 = function (arg0) {
3046
3197
  const ret = getObject(arg0).next;
3047
3198
  return addHeapObject(ret);
3048
3199
  };
3049
- imports.wbg.__wbg_self_742dd6eab3e9211e = function () {
3200
+ imports.wbg.__wbg_self_1ff1d729e9aae938 = function () {
3050
3201
  return handleError(function () {
3051
3202
  const ret = self.self;
3052
3203
  return addHeapObject(ret);
3053
3204
  }, arguments);
3054
3205
  };
3055
- imports.wbg.__wbg_window_c409e731db53a0e2 = function () {
3206
+ imports.wbg.__wbg_window_5f4faef6c12b79ec = function () {
3056
3207
  return handleError(function () {
3057
3208
  const ret = window.window;
3058
3209
  return addHeapObject(ret);
3059
3210
  }, arguments);
3060
3211
  };
3061
- imports.wbg.__wbg_globalThis_b70c095388441f2d = function () {
3212
+ imports.wbg.__wbg_globalThis_1d39714405582d3c = function () {
3062
3213
  return handleError(function () {
3063
3214
  const ret = globalThis.globalThis;
3064
3215
  return addHeapObject(ret);
3065
3216
  }, arguments);
3066
3217
  };
3067
- imports.wbg.__wbg_global_1c72617491ed7194 = function () {
3218
+ imports.wbg.__wbg_global_651f05c6a0944d1c = function () {
3068
3219
  return handleError(function () {
3069
3220
  const ret = global.global;
3070
3221
  return addHeapObject(ret);
3071
3222
  }, arguments);
3072
3223
  };
3073
- imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function (arg0, arg1) {
3224
+ imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function (arg0, arg1) {
3074
3225
  const ret = new Function(getStringFromWasm0(arg0, arg1));
3075
3226
  return addHeapObject(ret);
3076
3227
  };
3077
- imports.wbg.__wbg_set_07da13cc24b69217 = function () {
3228
+ imports.wbg.__wbg_set_092e06b0f9d71865 = function () {
3078
3229
  return handleError(function (arg0, arg1, arg2) {
3079
3230
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
3080
3231
  return ret;
3081
3232
  }, arguments);
3082
3233
  };
3083
- imports.wbg.__wbg_set_3698e3ca519b3c3c = function (arg0, arg1, arg2) {
3234
+ imports.wbg.__wbg_set_5cf90238115182c3 = function (arg0, arg1, arg2) {
3084
3235
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3085
3236
  };
3086
- imports.wbg.__wbg_length_0aab7ffd65ad19ed = function (arg0) {
3237
+ imports.wbg.__wbg_length_72e2208bbc0efc61 = function (arg0) {
3087
3238
  const ret = getObject(arg0).length;
3088
3239
  return ret;
3089
3240
  };
3090
- imports.wbg.__wbg_now_c857fb0367c762cc = function () {
3091
- const ret = Date.now();
3092
- return ret;
3093
- };
3094
- imports.wbg.__wbg_target_bb43778021b84733 = function (arg0) {
3241
+ imports.wbg.__wbg_target_f171e89c61e2bccf = function (arg0) {
3095
3242
  const ret = getObject(arg0).target;
3096
3243
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
3097
3244
  };
3098
- imports.wbg.__wbg_result_fcdf1e20f03fa375 = function () {
3245
+ imports.wbg.__wbg_result_edff16ff107d6acb = function () {
3099
3246
  return handleError(function (arg0) {
3100
3247
  const ret = getObject(arg0).result;
3101
3248
  return addHeapObject(ret);
3102
3249
  }, arguments);
3103
3250
  };
3104
- imports.wbg.__wbg_contains_7ea02aa9686102c9 = function (arg0, arg1, arg2) {
3251
+ imports.wbg.__wbg_contains_0f868d6343a00b39 = function (arg0, arg1, arg2) {
3105
3252
  const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
3106
3253
  return ret;
3107
3254
  };
3108
- imports.wbg.__wbg_createObjectStore_cc4ffd0f671774b5 = function () {
3255
+ imports.wbg.__wbg_createObjectStore_4394a46abe4d85f5 = function () {
3109
3256
  return handleError(function (arg0, arg1, arg2, arg3) {
3110
3257
  const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2), getObject(arg3));
3111
3258
  return addHeapObject(ret);
3112
3259
  }, arguments);
3113
3260
  };
3114
- imports.wbg.__wbg_transaction_6ee3b434ba42d2ba = function (arg0) {
3261
+ imports.wbg.__wbg_transaction_7f009622f3035b10 = function (arg0) {
3115
3262
  const ret = getObject(arg0).transaction;
3116
3263
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
3117
3264
  };
3118
- imports.wbg.__wbg_indexNames_3d712486a8cca56f = function (arg0) {
3265
+ imports.wbg.__wbg_indexNames_44268b4ff8662a99 = function (arg0) {
3119
3266
  const ret = getObject(arg0).indexNames;
3120
3267
  return addHeapObject(ret);
3121
3268
  };
3122
- imports.wbg.__wbg_createIndex_1754becb0a1eaade = function () {
3269
+ imports.wbg.__wbg_createIndex_d6400c1715e93b4d = function () {
3123
3270
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3124
3271
  const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
3125
3272
  return addHeapObject(ret);
3126
3273
  }, arguments);
3127
3274
  };
3128
- imports.wbg.__wbg_deleteIndex_a2e0e2a52cf9efbb = function () {
3275
+ imports.wbg.__wbg_deleteIndex_66002b783e73aceb = function () {
3129
3276
  return handleError(function (arg0, arg1, arg2) {
3130
3277
  getObject(arg0).deleteIndex(getStringFromWasm0(arg1, arg2));
3131
3278
  }, arguments);
3132
3279
  };
3133
- imports.wbg.__wbg_deleteObjectStore_0e5499c492f82cfa = function () {
3280
+ imports.wbg.__wbg_deleteObjectStore_6598d1cfff53e9b0 = function () {
3134
3281
  return handleError(function (arg0, arg1, arg2) {
3135
3282
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
3136
3283
  }, arguments);
3137
3284
  };
3138
- imports.wbg.__wbg_error_a16f2288166003c0 = function () {
3285
+ imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
3139
3286
  return handleError(function (arg0) {
3140
3287
  const ret = getObject(arg0).error;
3141
3288
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -3145,18 +3292,18 @@ function __wbg_get_imports() {
3145
3292
  const ret = !getObject(arg0);
3146
3293
  return ret;
3147
3294
  };
3148
- imports.wbg.__wbg_key_46cfc02e70598c46 = function () {
3295
+ imports.wbg.__wbg_key_1a7b60df5fef1cb0 = function () {
3149
3296
  return handleError(function (arg0) {
3150
3297
  const ret = getObject(arg0).key;
3151
3298
  return addHeapObject(ret);
3152
3299
  }, arguments);
3153
3300
  };
3154
- imports.wbg.__wbg_advance_41fb7fb13309369f = function () {
3301
+ imports.wbg.__wbg_advance_c7e5fd8d69236e91 = function () {
3155
3302
  return handleError(function (arg0, arg1) {
3156
3303
  getObject(arg0).advance(arg1 >>> 0);
3157
3304
  }, arguments);
3158
3305
  };
3159
- imports.wbg.__wbg_instanceof_IdbFactory_b27e3052d7c33961 = function (arg0) {
3306
+ imports.wbg.__wbg_instanceof_IdbFactory_737b6a04b9fa9269 = function (arg0) {
3160
3307
  let result;
3161
3308
  try {
3162
3309
  result = getObject(arg0) instanceof IDBFactory;
@@ -3167,26 +3314,26 @@ function __wbg_get_imports() {
3167
3314
  const ret = result;
3168
3315
  return ret;
3169
3316
  };
3170
- imports.wbg.__wbg_open_8fe2c4fdf4aa1f9d = function () {
3317
+ imports.wbg.__wbg_open_11c83d2d4f1b9255 = function () {
3171
3318
  return handleError(function (arg0, arg1, arg2) {
3172
3319
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
3173
3320
  return addHeapObject(ret);
3174
3321
  }, arguments);
3175
3322
  };
3176
- imports.wbg.__wbg_open_d5031782c12da0d4 = function () {
3323
+ imports.wbg.__wbg_open_6a08b03c958d4ad0 = function () {
3177
3324
  return handleError(function (arg0, arg1, arg2, arg3) {
3178
3325
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
3179
3326
  return addHeapObject(ret);
3180
3327
  }, arguments);
3181
3328
  };
3182
- imports.wbg.__wbg_setonupgradeneeded_73f521ef7c1bd5de = function (arg0, arg1) {
3329
+ imports.wbg.__wbg_setonupgradeneeded_5a39a65558c323b2 = function (arg0, arg1) {
3183
3330
  getObject(arg0).onupgradeneeded = getObject(arg1);
3184
3331
  };
3185
- imports.wbg.__wbg_toString_506566b763774a16 = function (arg0) {
3332
+ imports.wbg.__wbg_toString_1c056108b87ba68b = function (arg0) {
3186
3333
  const ret = getObject(arg0).toString();
3187
3334
  return addHeapObject(ret);
3188
3335
  };
3189
- imports.wbg.__wbg_instanceof_Uint8Array_1349640af2da2e88 = function (arg0) {
3336
+ imports.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4 = function (arg0) {
3190
3337
  let result;
3191
3338
  try {
3192
3339
  result = getObject(arg0) instanceof Uint8Array;
@@ -3197,7 +3344,7 @@ function __wbg_get_imports() {
3197
3344
  const ret = result;
3198
3345
  return ret;
3199
3346
  };
3200
- imports.wbg.__wbg_instanceof_ArrayBuffer_ef2632aa0d4bfff8 = function (arg0) {
3347
+ imports.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb = function (arg0) {
3201
3348
  let result;
3202
3349
  try {
3203
3350
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -3208,7 +3355,7 @@ function __wbg_get_imports() {
3208
3355
  const ret = result;
3209
3356
  return ret;
3210
3357
  };
3211
- imports.wbg.__wbg_entries_13e011453776468f = function (arg0) {
3358
+ imports.wbg.__wbg_entries_e51f29c7bba0c054 = function (arg0) {
3212
3359
  const ret = Object.entries(getObject(arg0));
3213
3360
  return addHeapObject(ret);
3214
3361
  };
@@ -3219,11 +3366,11 @@ function __wbg_get_imports() {
3219
3366
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3220
3367
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3221
3368
  };
3222
- imports.wbg.__wbg_new0_494c19a27871d56f = function () {
3369
+ imports.wbg.__wbg_new0_c0be7df4b6bd481f = function () {
3223
3370
  const ret = new Date();
3224
3371
  return addHeapObject(ret);
3225
3372
  };
3226
- imports.wbg.__wbg_getTime_40bd09e020e8bc8c = function (arg0) {
3373
+ imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function (arg0) {
3227
3374
  const ret = getObject(arg0).getTime();
3228
3375
  return ret;
3229
3376
  };
@@ -3237,44 +3384,44 @@ function __wbg_get_imports() {
3237
3384
  imports.wbg.__wbindgen_throw = function (arg0, arg1) {
3238
3385
  throw new Error(getStringFromWasm0(arg0, arg1));
3239
3386
  };
3240
- imports.wbg.__wbg_then_8df675b8bb5d5e3c = function (arg0, arg1) {
3387
+ imports.wbg.__wbg_then_f7e06ee3c11698eb = function (arg0, arg1) {
3241
3388
  const ret = getObject(arg0).then(getObject(arg1));
3242
3389
  return addHeapObject(ret);
3243
3390
  };
3244
- imports.wbg.__wbg_resolve_ae38ad63c43ff98b = function (arg0) {
3391
+ imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function (arg0) {
3245
3392
  const ret = Promise.resolve(getObject(arg0));
3246
3393
  return addHeapObject(ret);
3247
3394
  };
3248
- imports.wbg.__wbg_get_91d38ec2e4611a1e = function (arg0, arg1, arg2) {
3395
+ imports.wbg.__wbg_get_fca5c2e9985ebaff = function (arg0, arg1, arg2) {
3249
3396
  const ret = getObject(arg1)[arg2 >>> 0];
3250
3397
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3251
3398
  var len1 = WASM_VECTOR_LEN;
3252
3399
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3253
3400
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3254
3401
  };
3255
- imports.wbg.__wbg_continue_c081a1b978361679 = function () {
3402
+ imports.wbg.__wbg_continue_b5a1b6eb1682ad84 = function () {
3256
3403
  return handleError(function (arg0) {
3257
3404
  getObject(arg0).continue();
3258
3405
  }, arguments);
3259
3406
  };
3260
- imports.wbg.__wbg_value_3b1dc8fee5cc6eb5 = function () {
3407
+ imports.wbg.__wbg_value_c49deffceeea3d79 = function () {
3261
3408
  return handleError(function (arg0) {
3262
3409
  const ret = getObject(arg0).value;
3263
3410
  return addHeapObject(ret);
3264
3411
  }, arguments);
3265
3412
  };
3266
- imports.wbg.__wbg_openCursor_4a2cac5b1c5cf36b = function () {
3413
+ imports.wbg.__wbg_openCursor_3204283d52f4c9ba = function () {
3267
3414
  return handleError(function (arg0, arg1, arg2) {
3268
3415
  const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
3269
3416
  return addHeapObject(ret);
3270
3417
  }, arguments);
3271
3418
  };
3272
- imports.wbg.__wbindgen_closure_wrapper1864 = function (arg0, arg1, arg2) {
3273
- const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_52);
3419
+ imports.wbg.__wbindgen_closure_wrapper1984 = function (arg0, arg1, arg2) {
3420
+ const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_52);
3274
3421
  return addHeapObject(ret);
3275
3422
  };
3276
- imports.wbg.__wbindgen_closure_wrapper4477 = function (arg0, arg1, arg2) {
3277
- const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_55);
3423
+ imports.wbg.__wbindgen_closure_wrapper4645 = function (arg0, arg1, arg2) {
3424
+ const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_55);
3278
3425
  return addHeapObject(ret);
3279
3426
  };
3280
3427
  return imports;
@@ -3332,6 +3479,7 @@ var exports = /*#__PURE__*/Object.freeze({
3332
3479
  NewAcmeOrder: NewAcmeOrder,
3333
3480
  ProposalBundle: ProposalBundle,
3334
3481
  ProteusAutoPrekeyBundle: ProteusAutoPrekeyBundle,
3482
+ RotateBundle: RotateBundle,
3335
3483
  WireIdentity: WireIdentity,
3336
3484
  WirePolicy: WirePolicy$1,
3337
3485
  default: __wbg_init,
@@ -3341,7 +3489,7 @@ var exports = /*#__PURE__*/Object.freeze({
3341
3489
  var wasm = async (opt = {}) => {
3342
3490
  let {importHook, serverPath} = opt;
3343
3491
 
3344
- let path = "assets/core_crypto_ffi-32b81580.wasm";
3492
+ let path = "assets/core_crypto_ffi-b0fc8cb4.wasm";
3345
3493
 
3346
3494
  if (serverPath != null) {
3347
3495
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -3449,6 +3597,10 @@ var Ciphersuite;
3449
3597
  * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
3450
3598
  */
3451
3599
  Ciphersuite[Ciphersuite["MLS_256_DHKEMP384_AES256GCM_SHA384_P384"] = 7] = "MLS_256_DHKEMP384_AES256GCM_SHA384_P384";
3600
+ /**
3601
+ * x25519Kyber768Draft00 Hybrid KEM | AES-GCM 128 | SHA2-256 | Ed25519
3602
+ */
3603
+ Ciphersuite[Ciphersuite["MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519"] = 61489] = "MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519";
3452
3604
  })(Ciphersuite || (Ciphersuite = {}));
3453
3605
  var CredentialType;
3454
3606
  (function (CredentialType) {
@@ -3700,12 +3852,12 @@ class CoreCrypto {
3700
3852
  return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").conversation_exists(conversationId));
3701
3853
  }
3702
3854
  /**
3703
- * Marks a conversation as child of another one
3704
- * This will mostly affect the behavior of the callbacks (the parentConversationClients parameter will be filled)
3705
- *
3706
- * @param childId - conversation identifier of the child conversation
3707
- * @param parentId - conversation identifier of the parent conversation
3708
- */
3855
+ * Marks a conversation as child of another one
3856
+ * This will mostly affect the behavior of the callbacks (the parentConversationClients parameter will be filled)
3857
+ *
3858
+ * @param childId - conversation identifier of the child conversation
3859
+ * @param parentId - conversation identifier of the parent conversation
3860
+ */
3709
3861
  async markConversationAsChildOf(childId, parentId) {
3710
3862
  return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mark_conversation_as_child_of(childId, parentId));
3711
3863
  }
@@ -3824,20 +3976,31 @@ class CoreCrypto {
3824
3976
  /**
3825
3977
  *
3826
3978
  * @param ciphersuite - of the KeyPackages to count
3979
+ * @param credentialType - of the KeyPackages to count
3827
3980
  * @returns The amount of valid, non-expired KeyPackages that are persisted in the backing storage
3828
3981
  */
3829
- async clientValidKeypackagesCount(ciphersuite) {
3830
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_valid_keypackages_count(ciphersuite));
3982
+ async clientValidKeypackagesCount(ciphersuite, credentialType) {
3983
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_valid_keypackages_count(ciphersuite, credentialType));
3831
3984
  }
3832
3985
  /**
3833
3986
  * Fetches a requested amount of keypackages
3834
3987
  *
3835
3988
  * @param ciphersuite - of the KeyPackages to generate
3989
+ * @param credentialType - of the KeyPackages to generate
3836
3990
  * @param amountRequested - The amount of keypackages requested
3837
3991
  * @returns An array of length `amountRequested` containing TLS-serialized KeyPackages
3838
3992
  */
3839
- async clientKeypackages(ciphersuite, amountRequested) {
3840
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_keypackages(ciphersuite, amountRequested));
3993
+ async clientKeypackages(ciphersuite, credentialType, amountRequested) {
3994
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_keypackages(ciphersuite, credentialType, amountRequested));
3995
+ }
3996
+ /**
3997
+ * Prunes local KeyPackages after making sure they also have been deleted on the backend side
3998
+ * You should only use this after {@link CoreCrypto.e2eiRotateAll}
3999
+ *
4000
+ * @param refs - KeyPackage references to delete obtained from a {RotateBundle}
4001
+ */
4002
+ async deleteKeypackages(refs) {
4003
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").delete_keypackages(refs));
3841
4004
  }
3842
4005
  /**
3843
4006
  * Adds new clients to a conversation, assuming the current client has the right to add new clients to the conversation.
@@ -4005,15 +4168,6 @@ class CoreCrypto {
4005
4168
  throw new Error("Invalid external proposal type!");
4006
4169
  }
4007
4170
  }
4008
- /**
4009
- * Exports GroupInfo for use in external commits
4010
- *
4011
- * @param conversationId - MLS Conversation ID
4012
- * @returns TLS-serialized MLS GroupInfo
4013
- */
4014
- async exportGroupInfo(conversationId) {
4015
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").export_group_info(conversationId));
4016
- }
4017
4171
  /**
4018
4172
  * Allows to create an external commit to "apply" to join a group through its GroupInfo.
4019
4173
  *
@@ -4341,13 +4495,57 @@ class CoreCrypto {
4341
4495
  return new WireE2eIdentity(e2ei);
4342
4496
  }
4343
4497
  /**
4344
- * Parses the ACME server response from the endpoint fetching x509 certificates and uses it to initialize the MLS client with a certificate
4498
+ * Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI.
4499
+ * As a consequence, this method does not support changing the ClientId which should remain the same as the Basic one.
4500
+ * Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
4501
+ *
4502
+ * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4503
+ * @param handle user handle e.g. `alice.smith.qa@example.com`
4504
+ * @param expiryDays generated x509 certificate expiry
4505
+ * @param ciphersuite - for generating signing key material
4506
+ * @returns The new {@link WireE2eIdentity} object
4507
+ */
4508
+ async e2eiNewActivationEnrollment(displayName, handle, expiryDays, ciphersuite) {
4509
+ const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_new_activation_enrollment(displayName, handle, expiryDays, ciphersuite));
4510
+ return new WireE2eIdentity(e2ei);
4511
+ }
4512
+ /**
4513
+ * Generates an E2EI enrollment instance for a E2EI client (with a X509 certificate credential)
4514
+ * having to change/rotate their credential, either because the former one is expired or it
4515
+ * has been revoked. As a consequence, this method does not support changing neither ClientId which
4516
+ * should remain the same as the previous one. It lets you change the DisplayName or the handle
4517
+ * if you need to. Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
4518
+ *
4519
+ * @param expiryDays generated x509 certificate expiry
4520
+ * @param ciphersuite - for generating signing key material
4521
+ * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4522
+ * @param handle user handle e.g. `alice.smith.qa@example.com`
4523
+ * @returns The new {@link WireE2eIdentity} object
4524
+ */
4525
+ async e2eiNewRotateEnrollment(expiryDays, ciphersuite, displayName, handle) {
4526
+ const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_new_rotate_enrollment(displayName, handle, expiryDays, ciphersuite));
4527
+ return new WireE2eIdentity(e2ei);
4528
+ }
4529
+ /**
4530
+ * Use this method to initialize end-to-end identity when a client signs up and the grace period is already expired ; that means he cannot initialize with a Basic credential
4531
+ *
4532
+ * @param enrollment - the enrollment instance used to fetch the certificates
4533
+ * @param certificateChain - the raw response from ACME server
4534
+ */
4535
+ async e2eiMlsInitOnly(enrollment, certificateChain) {
4536
+ return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_mls_init_only(enrollment.inner(), certificateChain);
4537
+ }
4538
+ /**
4539
+ * Creates a commit in all local conversations for changing the credential. Requires first
4540
+ * having enrolled a new X509 certificate with either {@link CoreCrypto.e2eiNewActivationEnrollment}
4541
+ * or {@link CoreCrypto.e2eiNewRotateEnrollment}
4345
4542
  *
4346
4543
  * @param enrollment - the enrollment instance used to fetch the certificates
4347
4544
  * @param certificateChain - the raw response from ACME server
4545
+ * @param newKeyPackageCount - number of KeyPackages with new identity to generate
4348
4546
  */
4349
- async e2eiMlsInit(enrollment, certificateChain) {
4350
- return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_mls_init(enrollment.inner(), certificateChain);
4547
+ async e2eiRotateAll(enrollment, certificateChain, newKeyPackageCount) {
4548
+ return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_rotate_all(enrollment.inner(), certificateChain, newKeyPackageCount);
4351
4549
  }
4352
4550
  /**
4353
4551
  * Allows persisting an active enrollment (for example while redirecting the user during OAuth) in order to resume