@wireapp/core-crypto 0.8.2 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +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
16
  function __classPrivateFieldGet(receiver, state, kind, f) {
16
17
  if (kind === "a" && !f)
17
18
  throw new TypeError("Private accessor was defined without a getter");
@@ -34,14 +35,6 @@ const heap = new Array(128).fill(undefined);
34
35
  heap.push(undefined, null, true, false);
35
36
  function getObject(idx) { return heap[idx]; }
36
37
  let heap_next = heap.length;
37
- function addHeapObject(obj) {
38
- if (heap_next === heap.length)
39
- heap.push(heap.length + 1);
40
- const idx = heap_next;
41
- heap_next = heap[idx];
42
- heap[idx] = obj;
43
- return idx;
44
- }
45
38
  function dropObject(idx) {
46
39
  if (idx < 132)
47
40
  return;
@@ -53,8 +46,18 @@ function takeObject(idx) {
53
46
  dropObject(idx);
54
47
  return ret;
55
48
  }
56
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
57
- cachedTextDecoder.decode();
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
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
58
+ if (typeof TextDecoder !== 'undefined') {
59
+ cachedTextDecoder.decode();
60
+ }
58
61
  let cachedUint8Memory0 = null;
59
62
  function getUint8Memory0() {
60
63
  if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
@@ -63,10 +66,11 @@ function getUint8Memory0() {
63
66
  return cachedUint8Memory0;
64
67
  }
65
68
  function getStringFromWasm0(ptr, len) {
69
+ ptr = ptr >>> 0;
66
70
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
67
71
  }
68
72
  let WASM_VECTOR_LEN = 0;
69
- const cachedTextEncoder = new TextEncoder('utf-8');
73
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
70
74
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
71
75
  ? function (arg, view) {
72
76
  return cachedTextEncoder.encodeInto(arg, view);
@@ -82,13 +86,13 @@ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
82
86
  function passStringToWasm0(arg, malloc, realloc) {
83
87
  if (realloc === undefined) {
84
88
  const buf = cachedTextEncoder.encode(arg);
85
- const ptr = malloc(buf.length);
89
+ const ptr = malloc(buf.length) >>> 0;
86
90
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
87
91
  WASM_VECTOR_LEN = buf.length;
88
92
  return ptr;
89
93
  }
90
94
  let len = arg.length;
91
- let ptr = malloc(len);
95
+ let ptr = malloc(len) >>> 0;
92
96
  const mem = getUint8Memory0();
93
97
  let offset = 0;
94
98
  for (; offset < len; offset++) {
@@ -101,7 +105,7 @@ function passStringToWasm0(arg, malloc, realloc) {
101
105
  if (offset !== 0) {
102
106
  arg = arg.slice(offset);
103
107
  }
104
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
108
+ ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
105
109
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
106
110
  const ret = encodeString(arg, view);
107
111
  offset += ret.written;
@@ -226,12 +230,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
230
  return real;
227
231
  }
228
232
  function __wbg_adapter_52(arg0, arg1, arg2) {
229
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h56c36d723a01191f(arg0, arg1, addHeapObject(arg2));
233
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hca6e257aac6d0416(arg0, arg1, addHeapObject(arg2));
230
234
  }
231
235
  function __wbg_adapter_55(arg0, arg1, arg2) {
232
236
  try {
233
237
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
234
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdcf886fad5e08d14(retptr, arg0, arg1, addHeapObject(arg2));
238
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h82968d72c5531950(retptr, arg0, arg1, addHeapObject(arg2));
235
239
  var r0 = getInt32Memory0()[retptr / 4 + 0];
236
240
  var r1 = getInt32Memory0()[retptr / 4 + 1];
237
241
  if (r1) {
@@ -256,7 +260,7 @@ function getUint32Memory0() {
256
260
  return cachedUint32Memory0;
257
261
  }
258
262
  function passArrayJsValueToWasm0(array, malloc) {
259
- const ptr = malloc(array.length * 4);
263
+ const ptr = malloc(array.length * 4) >>> 0;
260
264
  const mem = getUint32Memory0();
261
265
  for (let i = 0; i < array.length; i++) {
262
266
  mem[ptr / 4 + i] = addHeapObject(array[i]);
@@ -265,12 +269,26 @@ function passArrayJsValueToWasm0(array, malloc) {
265
269
  return ptr;
266
270
  }
267
271
  function passArray8ToWasm0(arg, malloc) {
268
- const ptr = malloc(arg.length * 1);
272
+ const ptr = malloc(arg.length * 1) >>> 0;
269
273
  getUint8Memory0().set(arg, ptr / 1);
270
274
  WASM_VECTOR_LEN = arg.length;
271
275
  return ptr;
272
276
  }
277
+ let cachedUint16Memory0 = null;
278
+ function getUint16Memory0() {
279
+ if (cachedUint16Memory0 === null || cachedUint16Memory0.byteLength === 0) {
280
+ cachedUint16Memory0 = new Uint16Array(wasm$1.memory.buffer);
281
+ }
282
+ return cachedUint16Memory0;
283
+ }
284
+ function passArray16ToWasm0(arg, malloc) {
285
+ const ptr = malloc(arg.length * 2) >>> 0;
286
+ getUint16Memory0().set(arg, ptr / 2);
287
+ WASM_VECTOR_LEN = arg.length;
288
+ return ptr;
289
+ }
273
290
  function getArrayU8FromWasm0(ptr, len) {
291
+ ptr = ptr >>> 0;
274
292
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
275
293
  }
276
294
  function handleError(f, args) {
@@ -281,8 +299,8 @@ function handleError(f, args) {
281
299
  wasm$1.__wbindgen_exn_store(addHeapObject(e));
282
300
  }
283
301
  }
284
- function __wbg_adapter_285(arg0, arg1, arg2, arg3) {
285
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h1ca1c588492035e5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
302
+ function __wbg_adapter_288(arg0, arg1, arg2, arg3) {
303
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__ha54056c10ac24945(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
286
304
  }
287
305
  /**
288
306
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -298,6 +316,19 @@ const WirePolicy$1 = Object.freeze({
298
316
  Ciphertext: 2, "2": "Ciphertext",
299
317
  });
300
318
  /**
319
+ * see [core_crypto::prelude::MlsCredentialType]
320
+ */
321
+ const CredentialType$1 = Object.freeze({
322
+ /**
323
+ * Just a KeyPair
324
+ */
325
+ Basic: 1, "1": "Basic",
326
+ /**
327
+ * A certificate obtained through e2e identity enrollment process
328
+ */
329
+ X509: 2, "2": "X509",
330
+ });
331
+ /**
301
332
  * see [core_crypto::prelude::CiphersuiteName]
302
333
  */
303
334
  const Ciphersuite$1 = Object.freeze({
@@ -335,13 +366,14 @@ const Ciphersuite$1 = Object.freeze({
335
366
  */
336
367
  class AcmeChallenge {
337
368
  static __wrap(ptr) {
369
+ ptr = ptr >>> 0;
338
370
  const obj = Object.create(AcmeChallenge.prototype);
339
- obj.ptr = ptr;
371
+ obj.__wbg_ptr = ptr;
340
372
  return obj;
341
373
  }
342
374
  __destroy_into_raw() {
343
- const ptr = this.ptr;
344
- this.ptr = 0;
375
+ const ptr = this.__wbg_ptr;
376
+ this.__wbg_ptr = 0;
345
377
  return ptr;
346
378
  }
347
379
  free() {
@@ -351,34 +383,61 @@ class AcmeChallenge {
351
383
  /**
352
384
  * @param {Uint8Array} delegate
353
385
  * @param {string} url
386
+ * @param {string} target
354
387
  */
355
- constructor(delegate, url) {
388
+ constructor(delegate, url, target) {
356
389
  const ptr0 = passStringToWasm0(url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
357
390
  const len0 = WASM_VECTOR_LEN;
358
- const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0);
391
+ const ptr1 = passStringToWasm0(target, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
392
+ const len1 = WASM_VECTOR_LEN;
393
+ const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0, ptr1, len1);
359
394
  return AcmeChallenge.__wrap(ret);
360
395
  }
361
396
  /**
362
397
  * @returns {Uint8Array}
363
398
  */
364
399
  get delegate() {
365
- const ret = wasm$1.acmechallenge_delegate(this.ptr);
400
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
366
401
  return takeObject(ret);
367
402
  }
368
403
  /**
369
404
  * @returns {string}
370
405
  */
371
406
  get url() {
407
+ let deferred1_0;
408
+ let deferred1_1;
372
409
  try {
373
410
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
374
- wasm$1.acmechallenge_url(retptr, this.ptr);
411
+ wasm$1.acmechallenge_url(retptr, this.__wbg_ptr);
375
412
  var r0 = getInt32Memory0()[retptr / 4 + 0];
376
413
  var r1 = getInt32Memory0()[retptr / 4 + 1];
414
+ deferred1_0 = r0;
415
+ deferred1_1 = r1;
377
416
  return getStringFromWasm0(r0, r1);
378
417
  }
379
418
  finally {
380
419
  wasm$1.__wbindgen_add_to_stack_pointer(16);
381
- wasm$1.__wbindgen_free(r0, r1);
420
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
421
+ }
422
+ }
423
+ /**
424
+ * @returns {string}
425
+ */
426
+ get target() {
427
+ let deferred1_0;
428
+ let deferred1_1;
429
+ try {
430
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
431
+ wasm$1.acmechallenge_target(retptr, this.__wbg_ptr);
432
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
433
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
434
+ deferred1_0 = r0;
435
+ deferred1_1 = r1;
436
+ return getStringFromWasm0(r0, r1);
437
+ }
438
+ finally {
439
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
440
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
382
441
  }
383
442
  }
384
443
  }
@@ -387,13 +446,14 @@ class AcmeChallenge {
387
446
  */
388
447
  class AcmeDirectory {
389
448
  static __wrap(ptr) {
449
+ ptr = ptr >>> 0;
390
450
  const obj = Object.create(AcmeDirectory.prototype);
391
- obj.ptr = ptr;
451
+ obj.__wbg_ptr = ptr;
392
452
  return obj;
393
453
  }
394
454
  __destroy_into_raw() {
395
- const ptr = this.ptr;
396
- this.ptr = 0;
455
+ const ptr = this.__wbg_ptr;
456
+ this.__wbg_ptr = 0;
397
457
  return ptr;
398
458
  }
399
459
  free() {
@@ -419,48 +479,60 @@ class AcmeDirectory {
419
479
  * @returns {string}
420
480
  */
421
481
  get newNonce() {
482
+ let deferred1_0;
483
+ let deferred1_1;
422
484
  try {
423
485
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
424
- wasm$1.acmedirectory_newNonce(retptr, this.ptr);
486
+ wasm$1.acmedirectory_newNonce(retptr, this.__wbg_ptr);
425
487
  var r0 = getInt32Memory0()[retptr / 4 + 0];
426
488
  var r1 = getInt32Memory0()[retptr / 4 + 1];
489
+ deferred1_0 = r0;
490
+ deferred1_1 = r1;
427
491
  return getStringFromWasm0(r0, r1);
428
492
  }
429
493
  finally {
430
494
  wasm$1.__wbindgen_add_to_stack_pointer(16);
431
- wasm$1.__wbindgen_free(r0, r1);
495
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
432
496
  }
433
497
  }
434
498
  /**
435
499
  * @returns {string}
436
500
  */
437
501
  get newAccount() {
502
+ let deferred1_0;
503
+ let deferred1_1;
438
504
  try {
439
505
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
440
- wasm$1.acmechallenge_url(retptr, this.ptr);
506
+ wasm$1.acmechallenge_url(retptr, this.__wbg_ptr);
441
507
  var r0 = getInt32Memory0()[retptr / 4 + 0];
442
508
  var r1 = getInt32Memory0()[retptr / 4 + 1];
509
+ deferred1_0 = r0;
510
+ deferred1_1 = r1;
443
511
  return getStringFromWasm0(r0, r1);
444
512
  }
445
513
  finally {
446
514
  wasm$1.__wbindgen_add_to_stack_pointer(16);
447
- wasm$1.__wbindgen_free(r0, r1);
515
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
448
516
  }
449
517
  }
450
518
  /**
451
519
  * @returns {string}
452
520
  */
453
521
  get newOrder() {
522
+ let deferred1_0;
523
+ let deferred1_1;
454
524
  try {
455
525
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
456
- wasm$1.acmedirectory_newOrder(retptr, this.ptr);
526
+ wasm$1.acmechallenge_target(retptr, this.__wbg_ptr);
457
527
  var r0 = getInt32Memory0()[retptr / 4 + 0];
458
528
  var r1 = getInt32Memory0()[retptr / 4 + 1];
529
+ deferred1_0 = r0;
530
+ deferred1_1 = r1;
459
531
  return getStringFromWasm0(r0, r1);
460
532
  }
461
533
  finally {
462
534
  wasm$1.__wbindgen_add_to_stack_pointer(16);
463
- wasm$1.__wbindgen_free(r0, r1);
535
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
464
536
  }
465
537
  }
466
538
  }
@@ -468,8 +540,8 @@ class AcmeDirectory {
468
540
  */
469
541
  class CommitBundle {
470
542
  __destroy_into_raw() {
471
- const ptr = this.ptr;
472
- this.ptr = 0;
543
+ const ptr = this.__wbg_ptr;
544
+ this.__wbg_ptr = 0;
473
545
  return ptr;
474
546
  }
475
547
  free() {
@@ -480,21 +552,21 @@ class CommitBundle {
480
552
  * @returns {Uint8Array}
481
553
  */
482
554
  get commit() {
483
- const ret = wasm$1.commitbundle_commit(this.ptr);
555
+ const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
484
556
  return takeObject(ret);
485
557
  }
486
558
  /**
487
559
  * @returns {Uint8Array | undefined}
488
560
  */
489
561
  get welcome() {
490
- const ret = wasm$1.commitbundle_welcome(this.ptr);
562
+ const ret = wasm$1.commitbundle_welcome(this.__wbg_ptr);
491
563
  return takeObject(ret);
492
564
  }
493
565
  /**
494
566
  * @returns {PublicGroupStateBundle}
495
567
  */
496
568
  get public_group_state() {
497
- const ret = wasm$1.commitbundle_public_group_state(this.ptr);
569
+ const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
498
570
  return PublicGroupStateBundle.__wrap(ret);
499
571
  }
500
572
  }
@@ -503,13 +575,14 @@ class CommitBundle {
503
575
  */
504
576
  class ConversationConfiguration {
505
577
  static __wrap(ptr) {
578
+ ptr = ptr >>> 0;
506
579
  const obj = Object.create(ConversationConfiguration.prototype);
507
- obj.ptr = ptr;
580
+ obj.__wbg_ptr = ptr;
508
581
  return obj;
509
582
  }
510
583
  __destroy_into_raw() {
511
- const ptr = this.ptr;
512
- this.ptr = 0;
584
+ const ptr = this.__wbg_ptr;
585
+ this.__wbg_ptr = 0;
513
586
  return ptr;
514
587
  }
515
588
  free() {
@@ -533,8 +606,8 @@ class ConversationConfiguration {
533
606
  */
534
607
  class ConversationInitBundle {
535
608
  __destroy_into_raw() {
536
- const ptr = this.ptr;
537
- this.ptr = 0;
609
+ const ptr = this.__wbg_ptr;
610
+ this.__wbg_ptr = 0;
538
611
  return ptr;
539
612
  }
540
613
  free() {
@@ -545,21 +618,21 @@ class ConversationInitBundle {
545
618
  * @returns {Uint8Array}
546
619
  */
547
620
  get conversation_id() {
548
- const ret = wasm$1.conversationinitbundle_conversation_id(this.ptr);
621
+ const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
549
622
  return takeObject(ret);
550
623
  }
551
624
  /**
552
625
  * @returns {Uint8Array}
553
626
  */
554
627
  get commit() {
555
- const ret = wasm$1.commitbundle_commit(this.ptr);
628
+ const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
556
629
  return takeObject(ret);
557
630
  }
558
631
  /**
559
632
  * @returns {PublicGroupStateBundle}
560
633
  */
561
634
  get public_group_state() {
562
- const ret = wasm$1.commitbundle_public_group_state(this.ptr);
635
+ const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
563
636
  return PublicGroupStateBundle.__wrap(ret);
564
637
  }
565
638
  }
@@ -567,13 +640,14 @@ class ConversationInitBundle {
567
640
  */
568
641
  let CoreCrypto$1 = class CoreCrypto {
569
642
  static __wrap(ptr) {
643
+ ptr = ptr >>> 0;
570
644
  const obj = Object.create(CoreCrypto.prototype);
571
- obj.ptr = ptr;
645
+ obj.__wbg_ptr = ptr;
572
646
  return obj;
573
647
  }
574
648
  __destroy_into_raw() {
575
- const ptr = this.ptr;
576
- this.ptr = 0;
649
+ const ptr = this.__wbg_ptr;
650
+ this.__wbg_ptr = 0;
577
651
  return ptr;
578
652
  }
579
653
  free() {
@@ -583,7 +657,7 @@ let CoreCrypto$1 = class CoreCrypto {
583
657
  /**
584
658
  * Returns: [`WasmCryptoResult<WireE2eIdentity>`]
585
659
  *
586
- * see [core_crypto::mls::MlsCentral::new_acme_enrollment]
660
+ * see [core_crypto::mls::MlsCentral::e2ei_new_enrollment]
587
661
  * @param {string} client_id
588
662
  * @param {string} display_name
589
663
  * @param {string} handle
@@ -591,28 +665,50 @@ let CoreCrypto$1 = class CoreCrypto {
591
665
  * @param {number} ciphersuite
592
666
  * @returns {Promise<any>}
593
667
  */
594
- new_acme_enrollment(client_id, display_name, handle, expiry_days, ciphersuite) {
668
+ e2ei_new_enrollment(client_id, display_name, handle, expiry_days, ciphersuite) {
595
669
  const ptr0 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
596
670
  const len0 = WASM_VECTOR_LEN;
597
671
  const ptr1 = passStringToWasm0(display_name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
598
672
  const len1 = WASM_VECTOR_LEN;
599
673
  const ptr2 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
600
674
  const len2 = WASM_VECTOR_LEN;
601
- const ret = wasm$1.corecrypto_new_acme_enrollment(this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_days, ciphersuite);
675
+ const ret = wasm$1.corecrypto_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_days, ciphersuite);
602
676
  return takeObject(ret);
603
677
  }
604
678
  /**
605
679
  * see [core_crypto::mls::MlsCentral::e2ei_mls_init]
606
- * @param {FfiWireE2EIdentity} e2ei
680
+ * @param {FfiWireE2EIdentity} enrollment
607
681
  * @param {string} certificate_chain
608
682
  * @returns {Promise<any>}
609
683
  */
610
- e2ei_mls_init(e2ei, certificate_chain) {
611
- _assertClass(e2ei, FfiWireE2EIdentity);
612
- var ptr0 = e2ei.__destroy_into_raw();
684
+ e2ei_mls_init(enrollment, certificate_chain) {
685
+ _assertClass(enrollment, FfiWireE2EIdentity);
686
+ var ptr0 = enrollment.__destroy_into_raw();
613
687
  const ptr1 = passStringToWasm0(certificate_chain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
614
688
  const len1 = WASM_VECTOR_LEN;
615
- const ret = wasm$1.corecrypto_e2ei_mls_init(this.ptr, ptr0, ptr1, len1);
689
+ const ret = wasm$1.corecrypto_e2ei_mls_init(this.__wbg_ptr, ptr0, ptr1, len1);
690
+ return takeObject(ret);
691
+ }
692
+ /**
693
+ * see [core_crypto::mls::MlsCentral::e2ei_enrollment_stash]
694
+ * @param {FfiWireE2EIdentity} enrollment
695
+ * @returns {Promise<any>}
696
+ */
697
+ e2ei_enrollment_stash(enrollment) {
698
+ _assertClass(enrollment, FfiWireE2EIdentity);
699
+ var ptr0 = enrollment.__destroy_into_raw();
700
+ const ret = wasm$1.corecrypto_e2ei_enrollment_stash(this.__wbg_ptr, ptr0);
701
+ return takeObject(ret);
702
+ }
703
+ /**
704
+ * see [core_crypto::mls::MlsCentral::e2ei_enrollment_stash_pop]
705
+ * @param {Uint8Array} handle
706
+ * @returns {Promise<any>}
707
+ */
708
+ e2ei_enrollment_stash_pop(handle) {
709
+ const ptr0 = passArray8ToWasm0(handle, wasm$1.__wbindgen_malloc);
710
+ const len0 = WASM_VECTOR_LEN;
711
+ const ret = wasm$1.corecrypto_e2ei_enrollment_stash_pop(this.__wbg_ptr, ptr0, len0);
616
712
  return takeObject(ret);
617
713
  }
618
714
  /**
@@ -620,16 +716,20 @@ let CoreCrypto$1 = class CoreCrypto {
620
716
  * @returns {string}
621
717
  */
622
718
  static version() {
719
+ let deferred1_0;
720
+ let deferred1_1;
623
721
  try {
624
722
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
625
723
  wasm$1.corecrypto_version(retptr);
626
724
  var r0 = getInt32Memory0()[retptr / 4 + 0];
627
725
  var r1 = getInt32Memory0()[retptr / 4 + 1];
726
+ deferred1_0 = r0;
727
+ deferred1_1 = r1;
628
728
  return getStringFromWasm0(r0, r1);
629
729
  }
630
730
  finally {
631
731
  wasm$1.__wbindgen_add_to_stack_pointer(16);
632
- wasm$1.__wbindgen_free(r0, r1);
732
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
633
733
  }
634
734
  }
635
735
  /**
@@ -637,57 +737,69 @@ let CoreCrypto$1 = class CoreCrypto {
637
737
  * @param {string} path
638
738
  * @param {string} key
639
739
  * @param {Uint8Array} client_id
740
+ * @param {Uint16Array} ciphersuites
640
741
  * @param {Uint8Array | undefined} entropy_seed
641
742
  * @returns {Promise<CoreCrypto>}
642
743
  */
643
- static _internal_new(path, key, client_id, entropy_seed) {
744
+ static _internal_new(path, key, client_id, ciphersuites, entropy_seed) {
644
745
  const ptr0 = passStringToWasm0(path, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
645
746
  const len0 = WASM_VECTOR_LEN;
646
747
  const ptr1 = passStringToWasm0(key, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
647
748
  const len1 = WASM_VECTOR_LEN;
648
749
  const ptr2 = passArray8ToWasm0(client_id, wasm$1.__wbindgen_malloc);
649
750
  const len2 = WASM_VECTOR_LEN;
650
- var ptr3 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm$1.__wbindgen_malloc);
651
- var len3 = WASM_VECTOR_LEN;
652
- const ret = wasm$1.corecrypto__internal_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
751
+ const ptr3 = passArray16ToWasm0(ciphersuites, wasm$1.__wbindgen_malloc);
752
+ const len3 = WASM_VECTOR_LEN;
753
+ var ptr4 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm$1.__wbindgen_malloc);
754
+ var len4 = WASM_VECTOR_LEN;
755
+ const ret = wasm$1.corecrypto__internal_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
653
756
  return takeObject(ret);
654
757
  }
655
758
  /**
656
759
  * see [core_crypto::mls::MlsCentral::try_new]
657
760
  * @param {string} path
658
761
  * @param {string} key
762
+ * @param {Uint16Array} ciphersuites
659
763
  * @param {Uint8Array | undefined} entropy_seed
660
764
  * @returns {Promise<CoreCrypto>}
661
765
  */
662
- static deferred_init(path, key, entropy_seed) {
766
+ static deferred_init(path, key, ciphersuites, entropy_seed) {
663
767
  const ptr0 = passStringToWasm0(path, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
664
768
  const len0 = WASM_VECTOR_LEN;
665
769
  const ptr1 = passStringToWasm0(key, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
666
770
  const len1 = WASM_VECTOR_LEN;
667
- var ptr2 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm$1.__wbindgen_malloc);
668
- var len2 = WASM_VECTOR_LEN;
669
- const ret = wasm$1.corecrypto_deferred_init(ptr0, len0, ptr1, len1, ptr2, len2);
771
+ const ptr2 = passArray16ToWasm0(ciphersuites, wasm$1.__wbindgen_malloc);
772
+ const len2 = WASM_VECTOR_LEN;
773
+ var ptr3 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm$1.__wbindgen_malloc);
774
+ var len3 = WASM_VECTOR_LEN;
775
+ const ret = wasm$1.corecrypto_deferred_init(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
670
776
  return takeObject(ret);
671
777
  }
672
778
  /**
673
779
  * see [core_crypto::mls::MlsCentral::mls_init]
674
780
  * @param {Uint8Array} client_id
781
+ * @param {Uint16Array} ciphersuites
675
782
  * @returns {Promise<Promise<any>>}
676
783
  */
677
- mls_init(client_id) {
784
+ mls_init(client_id, ciphersuites) {
678
785
  const ptr0 = passArray8ToWasm0(client_id, wasm$1.__wbindgen_malloc);
679
786
  const len0 = WASM_VECTOR_LEN;
680
- const ret = wasm$1.corecrypto_mls_init(this.ptr, ptr0, len0);
787
+ const ptr1 = passArray16ToWasm0(ciphersuites, wasm$1.__wbindgen_malloc);
788
+ const len1 = WASM_VECTOR_LEN;
789
+ const ret = wasm$1.corecrypto_mls_init(this.__wbg_ptr, ptr0, len0, ptr1, len1);
681
790
  return takeObject(ret);
682
791
  }
683
792
  /**
684
793
  * Returns [`WasmCryptoResult<Vec<u8>>`]
685
794
  *
686
795
  * See [core_crypto::mls::MlsCentral::mls_generate_keypair]
796
+ * @param {Uint16Array} ciphersuites
687
797
  * @returns {Promise<any>}
688
798
  */
689
- mls_generate_keypair() {
690
- const ret = wasm$1.corecrypto_mls_generate_keypair(this.ptr);
799
+ mls_generate_keypair(ciphersuites) {
800
+ const ptr0 = passArray16ToWasm0(ciphersuites, wasm$1.__wbindgen_malloc);
801
+ const len0 = WASM_VECTOR_LEN;
802
+ const ret = wasm$1.corecrypto_mls_generate_keypair(this.__wbg_ptr, ptr0, len0);
691
803
  return takeObject(ret);
692
804
  }
693
805
  /**
@@ -695,15 +807,18 @@ let CoreCrypto$1 = class CoreCrypto {
695
807
  *
696
808
  * See [core_crypto::mls::MlsCentral::mls_init_with_client_id]
697
809
  * @param {Uint8Array} client_id
698
- * @param {Uint8Array} signature_public_key
810
+ * @param {(Uint8Array)[]} signature_public_keys
811
+ * @param {Uint16Array} ciphersuites
699
812
  * @returns {Promise<any>}
700
813
  */
701
- mls_init_with_client_id(client_id, signature_public_key) {
814
+ mls_init_with_client_id(client_id, signature_public_keys, ciphersuites) {
702
815
  const ptr0 = passArray8ToWasm0(client_id, wasm$1.__wbindgen_malloc);
703
816
  const len0 = WASM_VECTOR_LEN;
704
- const ptr1 = passArray8ToWasm0(signature_public_key, wasm$1.__wbindgen_malloc);
817
+ const ptr1 = passArrayJsValueToWasm0(signature_public_keys, wasm$1.__wbindgen_malloc);
705
818
  const len1 = WASM_VECTOR_LEN;
706
- const ret = wasm$1.corecrypto_mls_init_with_client_id(this.ptr, ptr0, len0, ptr1, len1);
819
+ const ptr2 = passArray16ToWasm0(ciphersuites, wasm$1.__wbindgen_malloc);
820
+ const len2 = WASM_VECTOR_LEN;
821
+ const ret = wasm$1.corecrypto_mls_init_with_client_id(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
707
822
  return takeObject(ret);
708
823
  }
709
824
  /**
@@ -711,7 +826,7 @@ let CoreCrypto$1 = class CoreCrypto {
711
826
  * @returns {boolean}
712
827
  */
713
828
  has_outstanding_refs() {
714
- const ret = wasm$1.corecrypto_has_outstanding_refs(this.ptr);
829
+ const ret = wasm$1.corecrypto_has_outstanding_refs(this.__wbg_ptr);
715
830
  return ret !== 0;
716
831
  }
717
832
  /**
@@ -746,38 +861,41 @@ let CoreCrypto$1 = class CoreCrypto {
746
861
  set_callbacks(callbacks) {
747
862
  _assertClass(callbacks, CoreCryptoWasmCallbacks);
748
863
  var ptr0 = callbacks.__destroy_into_raw();
749
- const ret = wasm$1.corecrypto_set_callbacks(this.ptr, ptr0);
864
+ const ret = wasm$1.corecrypto_set_callbacks(this.__wbg_ptr, ptr0);
750
865
  return takeObject(ret);
751
866
  }
752
867
  /**
753
868
  * Returns:: [`WasmCryptoResult<js_sys::Uint8Array>`]
754
869
  *
755
870
  * see [core_crypto::mls::MlsCentral::client_public_key]
871
+ * @param {number} ciphersuite
756
872
  * @returns {Promise<any>}
757
873
  */
758
- client_public_key() {
759
- const ret = wasm$1.corecrypto_client_public_key(this.ptr);
874
+ client_public_key(ciphersuite) {
875
+ const ret = wasm$1.corecrypto_client_public_key(this.__wbg_ptr, ciphersuite);
760
876
  return takeObject(ret);
761
877
  }
762
878
  /**
763
879
  * Returns: [`WasmCryptoResult<js_sys::Array<js_sys::Uint8Array>>`]
764
880
  *
765
881
  * see [core_crypto::mls::MlsCentral::client_keypackages]
882
+ * @param {number} ciphersuite
766
883
  * @param {number} amount_requested
767
884
  * @returns {Promise<any>}
768
885
  */
769
- client_keypackages(amount_requested) {
770
- const ret = wasm$1.corecrypto_client_keypackages(this.ptr, amount_requested);
886
+ client_keypackages(ciphersuite, amount_requested) {
887
+ const ret = wasm$1.corecrypto_client_keypackages(this.__wbg_ptr, ciphersuite, amount_requested);
771
888
  return takeObject(ret);
772
889
  }
773
890
  /**
774
891
  * Returns: [`WasmCryptoResult<usize>`]
775
892
  *
776
893
  * see [core_crypto::mls::MlsCentral::client_valid_keypackages_count]
894
+ * @param {number} ciphersuite
777
895
  * @returns {Promise<any>}
778
896
  */
779
- client_valid_keypackages_count() {
780
- const ret = wasm$1.corecrypto_client_valid_keypackages_count(this.ptr);
897
+ client_valid_keypackages_count(ciphersuite) {
898
+ const ret = wasm$1.corecrypto_client_valid_keypackages_count(this.__wbg_ptr, ciphersuite);
781
899
  return takeObject(ret);
782
900
  }
783
901
  /**
@@ -793,7 +911,7 @@ let CoreCrypto$1 = class CoreCrypto {
793
911
  const len0 = WASM_VECTOR_LEN;
794
912
  _assertClass(config, ConversationConfiguration);
795
913
  var ptr1 = config.__destroy_into_raw();
796
- const ret = wasm$1.corecrypto_create_conversation(this.ptr, ptr0, len0, ptr1);
914
+ const ret = wasm$1.corecrypto_create_conversation(this.__wbg_ptr, ptr0, len0, ptr1);
797
915
  return takeObject(ret);
798
916
  }
799
917
  /**
@@ -806,7 +924,7 @@ let CoreCrypto$1 = class CoreCrypto {
806
924
  conversation_epoch(conversation_id) {
807
925
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
808
926
  const len0 = WASM_VECTOR_LEN;
809
- const ret = wasm$1.corecrypto_conversation_epoch(this.ptr, ptr0, len0);
927
+ const ret = wasm$1.corecrypto_conversation_epoch(this.__wbg_ptr, ptr0, len0);
810
928
  return takeObject(ret);
811
929
  }
812
930
  /**
@@ -819,7 +937,7 @@ let CoreCrypto$1 = class CoreCrypto {
819
937
  conversation_exists(conversation_id) {
820
938
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
821
939
  const len0 = WASM_VECTOR_LEN;
822
- const ret = wasm$1.corecrypto_conversation_exists(this.ptr, ptr0, len0);
940
+ const ret = wasm$1.corecrypto_conversation_exists(this.__wbg_ptr, ptr0, len0);
823
941
  return takeObject(ret);
824
942
  }
825
943
  /**
@@ -835,7 +953,7 @@ let CoreCrypto$1 = class CoreCrypto {
835
953
  const len0 = WASM_VECTOR_LEN;
836
954
  _assertClass(custom_configuration, CustomConfiguration);
837
955
  var ptr1 = custom_configuration.__destroy_into_raw();
838
- const ret = wasm$1.corecrypto_process_welcome_message(this.ptr, ptr0, len0, ptr1);
956
+ const ret = wasm$1.corecrypto_process_welcome_message(this.__wbg_ptr, ptr0, len0, ptr1);
839
957
  return takeObject(ret);
840
958
  }
841
959
  /**
@@ -851,7 +969,7 @@ let CoreCrypto$1 = class CoreCrypto {
851
969
  const len0 = WASM_VECTOR_LEN;
852
970
  const ptr1 = passArrayJsValueToWasm0(clients, wasm$1.__wbindgen_malloc);
853
971
  const len1 = WASM_VECTOR_LEN;
854
- const ret = wasm$1.corecrypto_add_clients_to_conversation(this.ptr, ptr0, len0, ptr1, len1);
972
+ const ret = wasm$1.corecrypto_add_clients_to_conversation(this.__wbg_ptr, ptr0, len0, ptr1, len1);
855
973
  return takeObject(ret);
856
974
  }
857
975
  /**
@@ -867,7 +985,7 @@ let CoreCrypto$1 = class CoreCrypto {
867
985
  const len0 = WASM_VECTOR_LEN;
868
986
  const ptr1 = passArrayJsValueToWasm0(clients, wasm$1.__wbindgen_malloc);
869
987
  const len1 = WASM_VECTOR_LEN;
870
- const ret = wasm$1.corecrypto_remove_clients_from_conversation(this.ptr, ptr0, len0, ptr1, len1);
988
+ const ret = wasm$1.corecrypto_remove_clients_from_conversation(this.__wbg_ptr, ptr0, len0, ptr1, len1);
871
989
  return takeObject(ret);
872
990
  }
873
991
  /**
@@ -883,7 +1001,7 @@ let CoreCrypto$1 = class CoreCrypto {
883
1001
  const len0 = WASM_VECTOR_LEN;
884
1002
  const ptr1 = passArray8ToWasm0(parent_id, wasm$1.__wbindgen_malloc);
885
1003
  const len1 = WASM_VECTOR_LEN;
886
- const ret = wasm$1.corecrypto_mark_conversation_as_child_of(this.ptr, ptr0, len0, ptr1, len1);
1004
+ const ret = wasm$1.corecrypto_mark_conversation_as_child_of(this.__wbg_ptr, ptr0, len0, ptr1, len1);
887
1005
  return takeObject(ret);
888
1006
  }
889
1007
  /**
@@ -896,7 +1014,7 @@ let CoreCrypto$1 = class CoreCrypto {
896
1014
  update_keying_material(conversation_id) {
897
1015
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
898
1016
  const len0 = WASM_VECTOR_LEN;
899
- const ret = wasm$1.corecrypto_update_keying_material(this.ptr, ptr0, len0);
1017
+ const ret = wasm$1.corecrypto_update_keying_material(this.__wbg_ptr, ptr0, len0);
900
1018
  return takeObject(ret);
901
1019
  }
902
1020
  /**
@@ -907,7 +1025,7 @@ let CoreCrypto$1 = class CoreCrypto {
907
1025
  commit_pending_proposals(conversation_id) {
908
1026
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
909
1027
  const len0 = WASM_VECTOR_LEN;
910
- const ret = wasm$1.corecrypto_commit_pending_proposals(this.ptr, ptr0, len0);
1028
+ const ret = wasm$1.corecrypto_commit_pending_proposals(this.__wbg_ptr, ptr0, len0);
911
1029
  return takeObject(ret);
912
1030
  }
913
1031
  /**
@@ -920,7 +1038,7 @@ let CoreCrypto$1 = class CoreCrypto {
920
1038
  wipe_conversation(conversation_id) {
921
1039
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
922
1040
  const len0 = WASM_VECTOR_LEN;
923
- const ret = wasm$1.corecrypto_wipe_conversation(this.ptr, ptr0, len0);
1041
+ const ret = wasm$1.corecrypto_wipe_conversation(this.__wbg_ptr, ptr0, len0);
924
1042
  return takeObject(ret);
925
1043
  }
926
1044
  /**
@@ -936,7 +1054,7 @@ let CoreCrypto$1 = class CoreCrypto {
936
1054
  const len0 = WASM_VECTOR_LEN;
937
1055
  const ptr1 = passArray8ToWasm0(payload, wasm$1.__wbindgen_malloc);
938
1056
  const len1 = WASM_VECTOR_LEN;
939
- const ret = wasm$1.corecrypto_decrypt_message(this.ptr, ptr0, len0, ptr1, len1);
1057
+ const ret = wasm$1.corecrypto_decrypt_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
940
1058
  return takeObject(ret);
941
1059
  }
942
1060
  /**
@@ -952,7 +1070,7 @@ let CoreCrypto$1 = class CoreCrypto {
952
1070
  const len0 = WASM_VECTOR_LEN;
953
1071
  const ptr1 = passArray8ToWasm0(message, wasm$1.__wbindgen_malloc);
954
1072
  const len1 = WASM_VECTOR_LEN;
955
- const ret = wasm$1.corecrypto_encrypt_message(this.ptr, ptr0, len0, ptr1, len1);
1073
+ const ret = wasm$1.corecrypto_encrypt_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
956
1074
  return takeObject(ret);
957
1075
  }
958
1076
  /**
@@ -968,7 +1086,7 @@ let CoreCrypto$1 = class CoreCrypto {
968
1086
  const len0 = WASM_VECTOR_LEN;
969
1087
  const ptr1 = passArray8ToWasm0(keypackage, wasm$1.__wbindgen_malloc);
970
1088
  const len1 = WASM_VECTOR_LEN;
971
- const ret = wasm$1.corecrypto_new_add_proposal(this.ptr, ptr0, len0, ptr1, len1);
1089
+ const ret = wasm$1.corecrypto_new_add_proposal(this.__wbg_ptr, ptr0, len0, ptr1, len1);
972
1090
  return takeObject(ret);
973
1091
  }
974
1092
  /**
@@ -981,7 +1099,7 @@ let CoreCrypto$1 = class CoreCrypto {
981
1099
  new_update_proposal(conversation_id) {
982
1100
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
983
1101
  const len0 = WASM_VECTOR_LEN;
984
- const ret = wasm$1.corecrypto_new_update_proposal(this.ptr, ptr0, len0);
1102
+ const ret = wasm$1.corecrypto_new_update_proposal(this.__wbg_ptr, ptr0, len0);
985
1103
  return takeObject(ret);
986
1104
  }
987
1105
  /**
@@ -997,7 +1115,7 @@ let CoreCrypto$1 = class CoreCrypto {
997
1115
  const len0 = WASM_VECTOR_LEN;
998
1116
  const ptr1 = passArray8ToWasm0(client_id, wasm$1.__wbindgen_malloc);
999
1117
  const len1 = WASM_VECTOR_LEN;
1000
- const ret = wasm$1.corecrypto_new_remove_proposal(this.ptr, ptr0, len0, ptr1, len1);
1118
+ const ret = wasm$1.corecrypto_new_remove_proposal(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1001
1119
  return takeObject(ret);
1002
1120
  }
1003
1121
  /**
@@ -1006,12 +1124,14 @@ let CoreCrypto$1 = class CoreCrypto {
1006
1124
  * see [core_crypto::mls::MlsCentral::new_external_add_proposal]
1007
1125
  * @param {Uint8Array} conversation_id
1008
1126
  * @param {number} epoch
1127
+ * @param {number} ciphersuite
1128
+ * @param {number} credential_type
1009
1129
  * @returns {Promise<any>}
1010
1130
  */
1011
- new_external_add_proposal(conversation_id, epoch) {
1131
+ new_external_add_proposal(conversation_id, epoch, ciphersuite, credential_type) {
1012
1132
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1013
1133
  const len0 = WASM_VECTOR_LEN;
1014
- const ret = wasm$1.corecrypto_new_external_add_proposal(this.ptr, ptr0, len0, epoch);
1134
+ const ret = wasm$1.corecrypto_new_external_add_proposal(this.__wbg_ptr, ptr0, len0, epoch, ciphersuite, credential_type);
1015
1135
  return takeObject(ret);
1016
1136
  }
1017
1137
  /**
@@ -1028,7 +1148,7 @@ let CoreCrypto$1 = class CoreCrypto {
1028
1148
  const len0 = WASM_VECTOR_LEN;
1029
1149
  const ptr1 = passArray8ToWasm0(keypackage_ref, wasm$1.__wbindgen_malloc);
1030
1150
  const len1 = WASM_VECTOR_LEN;
1031
- const ret = wasm$1.corecrypto_new_external_remove_proposal(this.ptr, ptr0, len0, epoch, ptr1, len1);
1151
+ const ret = wasm$1.corecrypto_new_external_remove_proposal(this.__wbg_ptr, ptr0, len0, epoch, ptr1, len1);
1032
1152
  return takeObject(ret);
1033
1153
  }
1034
1154
  /**
@@ -1041,7 +1161,7 @@ let CoreCrypto$1 = class CoreCrypto {
1041
1161
  export_group_state(conversation_id) {
1042
1162
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1043
1163
  const len0 = WASM_VECTOR_LEN;
1044
- const ret = wasm$1.corecrypto_export_group_state(this.ptr, ptr0, len0);
1164
+ const ret = wasm$1.corecrypto_export_group_state(this.__wbg_ptr, ptr0, len0);
1045
1165
  return takeObject(ret);
1046
1166
  }
1047
1167
  /**
@@ -1050,14 +1170,15 @@ let CoreCrypto$1 = class CoreCrypto {
1050
1170
  * see [core_crypto::mls::MlsCentral::join_by_external_commit]
1051
1171
  * @param {Uint8Array} public_group_state
1052
1172
  * @param {CustomConfiguration} custom_configuration
1173
+ * @param {number} credential_type
1053
1174
  * @returns {Promise<any>}
1054
1175
  */
1055
- join_by_external_commit(public_group_state, custom_configuration) {
1176
+ join_by_external_commit(public_group_state, custom_configuration, credential_type) {
1056
1177
  const ptr0 = passArray8ToWasm0(public_group_state, wasm$1.__wbindgen_malloc);
1057
1178
  const len0 = WASM_VECTOR_LEN;
1058
1179
  _assertClass(custom_configuration, CustomConfiguration);
1059
1180
  var ptr1 = custom_configuration.__destroy_into_raw();
1060
- const ret = wasm$1.corecrypto_join_by_external_commit(this.ptr, ptr0, len0, ptr1);
1181
+ const ret = wasm$1.corecrypto_join_by_external_commit(this.__wbg_ptr, ptr0, len0, ptr1, credential_type);
1061
1182
  return takeObject(ret);
1062
1183
  }
1063
1184
  /**
@@ -1070,7 +1191,7 @@ let CoreCrypto$1 = class CoreCrypto {
1070
1191
  merge_pending_group_from_external_commit(conversation_id) {
1071
1192
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1072
1193
  const len0 = WASM_VECTOR_LEN;
1073
- const ret = wasm$1.corecrypto_merge_pending_group_from_external_commit(this.ptr, ptr0, len0);
1194
+ const ret = wasm$1.corecrypto_merge_pending_group_from_external_commit(this.__wbg_ptr, ptr0, len0);
1074
1195
  return takeObject(ret);
1075
1196
  }
1076
1197
  /**
@@ -1083,7 +1204,7 @@ let CoreCrypto$1 = class CoreCrypto {
1083
1204
  clear_pending_group_from_external_commit(conversation_id) {
1084
1205
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1085
1206
  const len0 = WASM_VECTOR_LEN;
1086
- const ret = wasm$1.corecrypto_clear_pending_group_from_external_commit(this.ptr, ptr0, len0);
1207
+ const ret = wasm$1.corecrypto_clear_pending_group_from_external_commit(this.__wbg_ptr, ptr0, len0);
1087
1208
  return takeObject(ret);
1088
1209
  }
1089
1210
  /**
@@ -1094,7 +1215,7 @@ let CoreCrypto$1 = class CoreCrypto {
1094
1215
  commit_accepted(conversation_id) {
1095
1216
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1096
1217
  const len0 = WASM_VECTOR_LEN;
1097
- const ret = wasm$1.corecrypto_commit_accepted(this.ptr, ptr0, len0);
1218
+ const ret = wasm$1.corecrypto_commit_accepted(this.__wbg_ptr, ptr0, len0);
1098
1219
  return takeObject(ret);
1099
1220
  }
1100
1221
  /**
@@ -1108,7 +1229,7 @@ let CoreCrypto$1 = class CoreCrypto {
1108
1229
  const len0 = WASM_VECTOR_LEN;
1109
1230
  const ptr1 = passArray8ToWasm0(proposal_ref, wasm$1.__wbindgen_malloc);
1110
1231
  const len1 = WASM_VECTOR_LEN;
1111
- const ret = wasm$1.corecrypto_clear_pending_proposal(this.ptr, ptr0, len0, ptr1, len1);
1232
+ const ret = wasm$1.corecrypto_clear_pending_proposal(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1112
1233
  return takeObject(ret);
1113
1234
  }
1114
1235
  /**
@@ -1119,7 +1240,7 @@ let CoreCrypto$1 = class CoreCrypto {
1119
1240
  clear_pending_commit(conversation_id) {
1120
1241
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1121
1242
  const len0 = WASM_VECTOR_LEN;
1122
- const ret = wasm$1.corecrypto_clear_pending_commit(this.ptr, ptr0, len0);
1243
+ const ret = wasm$1.corecrypto_clear_pending_commit(this.__wbg_ptr, ptr0, len0);
1123
1244
  return takeObject(ret);
1124
1245
  }
1125
1246
  /**
@@ -1130,7 +1251,7 @@ let CoreCrypto$1 = class CoreCrypto {
1130
1251
  * @returns {Promise<any>}
1131
1252
  */
1132
1253
  random_bytes(len) {
1133
- const ret = wasm$1.corecrypto_random_bytes(this.ptr, len);
1254
+ const ret = wasm$1.corecrypto_random_bytes(this.__wbg_ptr, len);
1134
1255
  return takeObject(ret);
1135
1256
  }
1136
1257
  /**
@@ -1143,7 +1264,7 @@ let CoreCrypto$1 = class CoreCrypto {
1143
1264
  reseed_rng(seed) {
1144
1265
  const ptr0 = passArray8ToWasm0(seed, wasm$1.__wbindgen_malloc);
1145
1266
  const len0 = WASM_VECTOR_LEN;
1146
- const ret = wasm$1.corecrypto_reseed_rng(this.ptr, ptr0, len0);
1267
+ const ret = wasm$1.corecrypto_reseed_rng(this.__wbg_ptr, ptr0, len0);
1147
1268
  return takeObject(ret);
1148
1269
  }
1149
1270
  /**
@@ -1153,7 +1274,7 @@ let CoreCrypto$1 = class CoreCrypto {
1153
1274
  * @returns {Promise<any>}
1154
1275
  */
1155
1276
  proteus_init() {
1156
- const ret = wasm$1.corecrypto_proteus_init(this.ptr);
1277
+ const ret = wasm$1.corecrypto_proteus_init(this.__wbg_ptr);
1157
1278
  return takeObject(ret);
1158
1279
  }
1159
1280
  /**
@@ -1169,7 +1290,7 @@ let CoreCrypto$1 = class CoreCrypto {
1169
1290
  const len0 = WASM_VECTOR_LEN;
1170
1291
  const ptr1 = passArray8ToWasm0(prekey, wasm$1.__wbindgen_malloc);
1171
1292
  const len1 = WASM_VECTOR_LEN;
1172
- const ret = wasm$1.corecrypto_proteus_session_from_prekey(this.ptr, ptr0, len0, ptr1, len1);
1293
+ const ret = wasm$1.corecrypto_proteus_session_from_prekey(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1173
1294
  return takeObject(ret);
1174
1295
  }
1175
1296
  /**
@@ -1185,7 +1306,7 @@ let CoreCrypto$1 = class CoreCrypto {
1185
1306
  const len0 = WASM_VECTOR_LEN;
1186
1307
  const ptr1 = passArray8ToWasm0(envelope, wasm$1.__wbindgen_malloc);
1187
1308
  const len1 = WASM_VECTOR_LEN;
1188
- const ret = wasm$1.corecrypto_proteus_session_from_message(this.ptr, ptr0, len0, ptr1, len1);
1309
+ const ret = wasm$1.corecrypto_proteus_session_from_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1189
1310
  return takeObject(ret);
1190
1311
  }
1191
1312
  /**
@@ -1200,7 +1321,7 @@ let CoreCrypto$1 = class CoreCrypto {
1200
1321
  proteus_session_save(session_id) {
1201
1322
  const ptr0 = passStringToWasm0(session_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1202
1323
  const len0 = WASM_VECTOR_LEN;
1203
- const ret = wasm$1.corecrypto_proteus_session_save(this.ptr, ptr0, len0);
1324
+ const ret = wasm$1.corecrypto_proteus_session_save(this.__wbg_ptr, ptr0, len0);
1204
1325
  return takeObject(ret);
1205
1326
  }
1206
1327
  /**
@@ -1213,7 +1334,7 @@ let CoreCrypto$1 = class CoreCrypto {
1213
1334
  proteus_session_delete(session_id) {
1214
1335
  const ptr0 = passStringToWasm0(session_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1215
1336
  const len0 = WASM_VECTOR_LEN;
1216
- const ret = wasm$1.corecrypto_proteus_session_delete(this.ptr, ptr0, len0);
1337
+ const ret = wasm$1.corecrypto_proteus_session_delete(this.__wbg_ptr, ptr0, len0);
1217
1338
  return takeObject(ret);
1218
1339
  }
1219
1340
  /**
@@ -1226,7 +1347,7 @@ let CoreCrypto$1 = class CoreCrypto {
1226
1347
  proteus_session_exists(session_id) {
1227
1348
  const ptr0 = passStringToWasm0(session_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1228
1349
  const len0 = WASM_VECTOR_LEN;
1229
- const ret = wasm$1.corecrypto_proteus_session_exists(this.ptr, ptr0, len0);
1350
+ const ret = wasm$1.corecrypto_proteus_session_exists(this.__wbg_ptr, ptr0, len0);
1230
1351
  return takeObject(ret);
1231
1352
  }
1232
1353
  /**
@@ -1242,7 +1363,7 @@ let CoreCrypto$1 = class CoreCrypto {
1242
1363
  const len0 = WASM_VECTOR_LEN;
1243
1364
  const ptr1 = passArray8ToWasm0(ciphertext, wasm$1.__wbindgen_malloc);
1244
1365
  const len1 = WASM_VECTOR_LEN;
1245
- const ret = wasm$1.corecrypto_proteus_decrypt(this.ptr, ptr0, len0, ptr1, len1);
1366
+ const ret = wasm$1.corecrypto_proteus_decrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1246
1367
  return takeObject(ret);
1247
1368
  }
1248
1369
  /**
@@ -1258,7 +1379,7 @@ let CoreCrypto$1 = class CoreCrypto {
1258
1379
  const len0 = WASM_VECTOR_LEN;
1259
1380
  const ptr1 = passArray8ToWasm0(plaintext, wasm$1.__wbindgen_malloc);
1260
1381
  const len1 = WASM_VECTOR_LEN;
1261
- const ret = wasm$1.corecrypto_proteus_encrypt(this.ptr, ptr0, len0, ptr1, len1);
1382
+ const ret = wasm$1.corecrypto_proteus_encrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1262
1383
  return takeObject(ret);
1263
1384
  }
1264
1385
  /**
@@ -1274,7 +1395,7 @@ let CoreCrypto$1 = class CoreCrypto {
1274
1395
  const len0 = WASM_VECTOR_LEN;
1275
1396
  const ptr1 = passArray8ToWasm0(plaintext, wasm$1.__wbindgen_malloc);
1276
1397
  const len1 = WASM_VECTOR_LEN;
1277
- const ret = wasm$1.corecrypto_proteus_encrypt_batched(this.ptr, ptr0, len0, ptr1, len1);
1398
+ const ret = wasm$1.corecrypto_proteus_encrypt_batched(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1278
1399
  return takeObject(ret);
1279
1400
  }
1280
1401
  /**
@@ -1285,7 +1406,7 @@ let CoreCrypto$1 = class CoreCrypto {
1285
1406
  * @returns {Promise<Promise<any>>}
1286
1407
  */
1287
1408
  proteus_new_prekey(prekey_id) {
1288
- const ret = wasm$1.corecrypto_proteus_new_prekey(this.ptr, prekey_id);
1409
+ const ret = wasm$1.corecrypto_proteus_new_prekey(this.__wbg_ptr, prekey_id);
1289
1410
  return takeObject(ret);
1290
1411
  }
1291
1412
  /**
@@ -1295,7 +1416,7 @@ let CoreCrypto$1 = class CoreCrypto {
1295
1416
  * @returns {Promise<Promise<any>>}
1296
1417
  */
1297
1418
  proteus_new_prekey_auto() {
1298
- const ret = wasm$1.corecrypto_proteus_new_prekey_auto(this.ptr);
1419
+ const ret = wasm$1.corecrypto_proteus_new_prekey_auto(this.__wbg_ptr);
1299
1420
  return takeObject(ret);
1300
1421
  }
1301
1422
  /**
@@ -1305,7 +1426,7 @@ let CoreCrypto$1 = class CoreCrypto {
1305
1426
  * @returns {Promise<any>}
1306
1427
  */
1307
1428
  proteus_last_resort_prekey() {
1308
- const ret = wasm$1.corecrypto_proteus_last_resort_prekey(this.ptr);
1429
+ const ret = wasm$1.corecrypto_proteus_last_resort_prekey(this.__wbg_ptr);
1309
1430
  return takeObject(ret);
1310
1431
  }
1311
1432
  /**
@@ -1337,7 +1458,7 @@ let CoreCrypto$1 = class CoreCrypto {
1337
1458
  * @returns {Promise<string>}
1338
1459
  */
1339
1460
  proteus_fingerprint() {
1340
- const ret = wasm$1.corecrypto_proteus_fingerprint(this.ptr);
1461
+ const ret = wasm$1.corecrypto_proteus_fingerprint(this.__wbg_ptr);
1341
1462
  return takeObject(ret);
1342
1463
  }
1343
1464
  /**
@@ -1350,7 +1471,7 @@ let CoreCrypto$1 = class CoreCrypto {
1350
1471
  proteus_fingerprint_local(session_id) {
1351
1472
  const ptr0 = passStringToWasm0(session_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1352
1473
  const len0 = WASM_VECTOR_LEN;
1353
- const ret = wasm$1.corecrypto_proteus_fingerprint_local(this.ptr, ptr0, len0);
1474
+ const ret = wasm$1.corecrypto_proteus_fingerprint_local(this.__wbg_ptr, ptr0, len0);
1354
1475
  return takeObject(ret);
1355
1476
  }
1356
1477
  /**
@@ -1363,7 +1484,7 @@ let CoreCrypto$1 = class CoreCrypto {
1363
1484
  proteus_fingerprint_remote(session_id) {
1364
1485
  const ptr0 = passStringToWasm0(session_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1365
1486
  const len0 = WASM_VECTOR_LEN;
1366
- const ret = wasm$1.corecrypto_proteus_fingerprint_remote(this.ptr, ptr0, len0);
1487
+ const ret = wasm$1.corecrypto_proteus_fingerprint_remote(this.__wbg_ptr, ptr0, len0);
1367
1488
  return takeObject(ret);
1368
1489
  }
1369
1490
  /**
@@ -1374,6 +1495,8 @@ let CoreCrypto$1 = class CoreCrypto {
1374
1495
  * @returns {string}
1375
1496
  */
1376
1497
  static proteus_fingerprint_prekeybundle(prekey) {
1498
+ let deferred3_0;
1499
+ let deferred3_1;
1377
1500
  try {
1378
1501
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1379
1502
  const ptr0 = passArray8ToWasm0(prekey, wasm$1.__wbindgen_malloc);
@@ -1383,18 +1506,20 @@ let CoreCrypto$1 = class CoreCrypto {
1383
1506
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1384
1507
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1385
1508
  var r3 = getInt32Memory0()[retptr / 4 + 3];
1386
- var ptr1 = r0;
1387
- var len1 = r1;
1509
+ var ptr2 = r0;
1510
+ var len2 = r1;
1388
1511
  if (r3) {
1389
- ptr1 = 0;
1390
- len1 = 0;
1512
+ ptr2 = 0;
1513
+ len2 = 0;
1391
1514
  throw takeObject(r2);
1392
1515
  }
1393
- return getStringFromWasm0(ptr1, len1);
1516
+ deferred3_0 = ptr2;
1517
+ deferred3_1 = len2;
1518
+ return getStringFromWasm0(ptr2, len2);
1394
1519
  }
1395
1520
  finally {
1396
1521
  wasm$1.__wbindgen_add_to_stack_pointer(16);
1397
- wasm$1.__wbindgen_free(ptr1, len1);
1522
+ wasm$1.__wbindgen_free(deferred3_0, deferred3_1);
1398
1523
  }
1399
1524
  }
1400
1525
  /**
@@ -1407,7 +1532,7 @@ let CoreCrypto$1 = class CoreCrypto {
1407
1532
  proteus_cryptobox_migrate(path) {
1408
1533
  const ptr0 = passStringToWasm0(path, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1409
1534
  const len0 = WASM_VECTOR_LEN;
1410
- const ret = wasm$1.corecrypto_proteus_cryptobox_migrate(this.ptr, ptr0, len0);
1535
+ const ret = wasm$1.corecrypto_proteus_cryptobox_migrate(this.__wbg_ptr, ptr0, len0);
1411
1536
  return takeObject(ret);
1412
1537
  }
1413
1538
  /**
@@ -1415,7 +1540,7 @@ let CoreCrypto$1 = class CoreCrypto {
1415
1540
  * @returns {Promise<any>}
1416
1541
  */
1417
1542
  proteus_last_error_code() {
1418
- const ret = wasm$1.corecrypto_proteus_last_error_code(this.ptr);
1543
+ const ret = wasm$1.corecrypto_proteus_last_error_code(this.__wbg_ptr);
1419
1544
  return takeObject(ret);
1420
1545
  }
1421
1546
  /**
@@ -1429,7 +1554,7 @@ let CoreCrypto$1 = class CoreCrypto {
1429
1554
  export_secret_key(conversation_id, key_length) {
1430
1555
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1431
1556
  const len0 = WASM_VECTOR_LEN;
1432
- const ret = wasm$1.corecrypto_export_secret_key(this.ptr, ptr0, len0, key_length);
1557
+ const ret = wasm$1.corecrypto_export_secret_key(this.__wbg_ptr, ptr0, len0, key_length);
1433
1558
  return takeObject(ret);
1434
1559
  }
1435
1560
  /**
@@ -1442,7 +1567,7 @@ let CoreCrypto$1 = class CoreCrypto {
1442
1567
  get_client_ids(conversation_id) {
1443
1568
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1444
1569
  const len0 = WASM_VECTOR_LEN;
1445
- const ret = wasm$1.corecrypto_get_client_ids(this.ptr, ptr0, len0);
1570
+ const ret = wasm$1.corecrypto_get_client_ids(this.__wbg_ptr, ptr0, len0);
1446
1571
  return takeObject(ret);
1447
1572
  }
1448
1573
  };
@@ -1451,13 +1576,14 @@ let CoreCrypto$1 = class CoreCrypto {
1451
1576
  */
1452
1577
  class CoreCryptoWasmCallbacks {
1453
1578
  static __wrap(ptr) {
1579
+ ptr = ptr >>> 0;
1454
1580
  const obj = Object.create(CoreCryptoWasmCallbacks.prototype);
1455
- obj.ptr = ptr;
1581
+ obj.__wbg_ptr = ptr;
1456
1582
  return obj;
1457
1583
  }
1458
1584
  __destroy_into_raw() {
1459
- const ptr = this.ptr;
1460
- this.ptr = 0;
1585
+ const ptr = this.__wbg_ptr;
1586
+ this.__wbg_ptr = 0;
1461
1587
  return ptr;
1462
1588
  }
1463
1589
  free() {
@@ -1480,13 +1606,14 @@ class CoreCryptoWasmCallbacks {
1480
1606
  */
1481
1607
  class CustomConfiguration {
1482
1608
  static __wrap(ptr) {
1609
+ ptr = ptr >>> 0;
1483
1610
  const obj = Object.create(CustomConfiguration.prototype);
1484
- obj.ptr = ptr;
1611
+ obj.__wbg_ptr = ptr;
1485
1612
  return obj;
1486
1613
  }
1487
1614
  __destroy_into_raw() {
1488
- const ptr = this.ptr;
1489
- this.ptr = 0;
1615
+ const ptr = this.__wbg_ptr;
1616
+ this.__wbg_ptr = 0;
1490
1617
  return ptr;
1491
1618
  }
1492
1619
  free() {
@@ -1507,8 +1634,8 @@ class CustomConfiguration {
1507
1634
  */
1508
1635
  class DecryptedMessage {
1509
1636
  __destroy_into_raw() {
1510
- const ptr = this.ptr;
1511
- this.ptr = 0;
1637
+ const ptr = this.__wbg_ptr;
1638
+ this.__wbg_ptr = 0;
1512
1639
  return ptr;
1513
1640
  }
1514
1641
  free() {
@@ -1519,21 +1646,21 @@ class DecryptedMessage {
1519
1646
  * @returns {any}
1520
1647
  */
1521
1648
  get message() {
1522
- const ret = wasm$1.decryptedmessage_message(this.ptr);
1649
+ const ret = wasm$1.decryptedmessage_message(this.__wbg_ptr);
1523
1650
  return takeObject(ret);
1524
1651
  }
1525
1652
  /**
1526
1653
  * @returns {Array<any>}
1527
1654
  */
1528
1655
  get proposals() {
1529
- const ret = wasm$1.decryptedmessage_proposals(this.ptr);
1656
+ const ret = wasm$1.decryptedmessage_proposals(this.__wbg_ptr);
1530
1657
  return takeObject(ret);
1531
1658
  }
1532
1659
  /**
1533
1660
  * @returns {boolean}
1534
1661
  */
1535
1662
  get is_active() {
1536
- const ret = wasm$1.decryptedmessage_is_active(this.ptr);
1663
+ const ret = wasm$1.decryptedmessage_is_active(this.__wbg_ptr);
1537
1664
  return ret !== 0;
1538
1665
  }
1539
1666
  /**
@@ -1542,7 +1669,7 @@ class DecryptedMessage {
1542
1669
  get commit_delay() {
1543
1670
  try {
1544
1671
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1545
- wasm$1.decryptedmessage_commit_delay(retptr, this.ptr);
1672
+ wasm$1.decryptedmessage_commit_delay(retptr, this.__wbg_ptr);
1546
1673
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1547
1674
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1548
1675
  return r0 === 0 ? undefined : r1 >>> 0;
@@ -1555,21 +1682,21 @@ class DecryptedMessage {
1555
1682
  * @returns {any}
1556
1683
  */
1557
1684
  get sender_client_id() {
1558
- const ret = wasm$1.decryptedmessage_sender_client_id(this.ptr);
1685
+ const ret = wasm$1.decryptedmessage_sender_client_id(this.__wbg_ptr);
1559
1686
  return takeObject(ret);
1560
1687
  }
1561
1688
  /**
1562
1689
  * @returns {boolean}
1563
1690
  */
1564
1691
  get has_epoch_changed() {
1565
- const ret = wasm$1.decryptedmessage_has_epoch_changed(this.ptr);
1692
+ const ret = wasm$1.decryptedmessage_has_epoch_changed(this.__wbg_ptr);
1566
1693
  return ret !== 0;
1567
1694
  }
1568
1695
  /**
1569
1696
  * @returns {WireIdentity | undefined}
1570
1697
  */
1571
1698
  get identity() {
1572
- const ret = wasm$1.decryptedmessage_identity(this.ptr);
1699
+ const ret = wasm$1.decryptedmessage_identity(this.__wbg_ptr);
1573
1700
  return ret === 0 ? undefined : WireIdentity.__wrap(ret);
1574
1701
  }
1575
1702
  }
@@ -1577,13 +1704,14 @@ class DecryptedMessage {
1577
1704
  */
1578
1705
  class FfiWireE2EIdentity {
1579
1706
  static __wrap(ptr) {
1707
+ ptr = ptr >>> 0;
1580
1708
  const obj = Object.create(FfiWireE2EIdentity.prototype);
1581
- obj.ptr = ptr;
1709
+ obj.__wbg_ptr = ptr;
1582
1710
  return obj;
1583
1711
  }
1584
1712
  __destroy_into_raw() {
1585
- const ptr = this.ptr;
1586
- this.ptr = 0;
1713
+ const ptr = this.__wbg_ptr;
1714
+ this.__wbg_ptr = 0;
1587
1715
  return ptr;
1588
1716
  }
1589
1717
  free() {
@@ -1600,7 +1728,7 @@ class FfiWireE2EIdentity {
1600
1728
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1601
1729
  const ptr0 = passArray8ToWasm0(directory, wasm$1.__wbindgen_malloc);
1602
1730
  const len0 = WASM_VECTOR_LEN;
1603
- wasm$1.ffiwiree2eidentity_directory_response(retptr, this.ptr, ptr0, len0);
1731
+ wasm$1.ffiwiree2eidentity_directory_response(retptr, this.__wbg_ptr, ptr0, len0);
1604
1732
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1605
1733
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1606
1734
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1623,7 +1751,7 @@ class FfiWireE2EIdentity {
1623
1751
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1624
1752
  const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1625
1753
  const len0 = WASM_VECTOR_LEN;
1626
- wasm$1.ffiwiree2eidentity_new_account_request(retptr, this.ptr, ptr0, len0);
1754
+ wasm$1.ffiwiree2eidentity_new_account_request(retptr, this.__wbg_ptr, ptr0, len0);
1627
1755
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1628
1756
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1629
1757
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1644,7 +1772,7 @@ class FfiWireE2EIdentity {
1644
1772
  new_account_response(account) {
1645
1773
  try {
1646
1774
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1647
- wasm$1.ffiwiree2eidentity_new_account_response(retptr, this.ptr, addHeapObject(account));
1775
+ wasm$1.ffiwiree2eidentity_new_account_response(retptr, this.__wbg_ptr, addHeapObject(account));
1648
1776
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1649
1777
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1650
1778
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1667,7 +1795,7 @@ class FfiWireE2EIdentity {
1667
1795
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1668
1796
  const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1669
1797
  const len0 = WASM_VECTOR_LEN;
1670
- wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0);
1798
+ wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.__wbg_ptr, ptr0, len0);
1671
1799
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1672
1800
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1673
1801
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1688,7 +1816,7 @@ class FfiWireE2EIdentity {
1688
1816
  new_order_response(order) {
1689
1817
  try {
1690
1818
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1691
- wasm$1.ffiwiree2eidentity_new_order_response(retptr, this.ptr, addHeapObject(order));
1819
+ wasm$1.ffiwiree2eidentity_new_order_response(retptr, this.__wbg_ptr, addHeapObject(order));
1692
1820
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1693
1821
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1694
1822
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1714,7 +1842,7 @@ class FfiWireE2EIdentity {
1714
1842
  const len0 = WASM_VECTOR_LEN;
1715
1843
  const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1716
1844
  const len1 = WASM_VECTOR_LEN;
1717
- wasm$1.ffiwiree2eidentity_new_authz_request(retptr, this.ptr, ptr0, len0, ptr1, len1);
1845
+ wasm$1.ffiwiree2eidentity_new_authz_request(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1718
1846
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1719
1847
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1720
1848
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1735,7 +1863,7 @@ class FfiWireE2EIdentity {
1735
1863
  new_authz_response(authz) {
1736
1864
  try {
1737
1865
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1738
- wasm$1.ffiwiree2eidentity_new_authz_response(retptr, this.ptr, addHeapObject(authz));
1866
+ wasm$1.ffiwiree2eidentity_new_authz_response(retptr, this.__wbg_ptr, addHeapObject(authz));
1739
1867
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1740
1868
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1741
1869
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1750,19 +1878,16 @@ class FfiWireE2EIdentity {
1750
1878
  }
1751
1879
  /**
1752
1880
  * See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
1753
- * @param {string} access_token_url
1754
1881
  * @param {number} expiry_secs
1755
1882
  * @param {string} backend_nonce
1756
1883
  * @returns {Uint8Array}
1757
1884
  */
1758
- create_dpop_token(access_token_url, expiry_secs, backend_nonce) {
1885
+ create_dpop_token(expiry_secs, backend_nonce) {
1759
1886
  try {
1760
1887
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1761
- const ptr0 = passStringToWasm0(access_token_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1888
+ const ptr0 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1762
1889
  const len0 = WASM_VECTOR_LEN;
1763
- const ptr1 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1764
- const len1 = WASM_VECTOR_LEN;
1765
- wasm$1.ffiwiree2eidentity_create_dpop_token(retptr, this.ptr, ptr0, len0, expiry_secs, ptr1, len1);
1890
+ wasm$1.ffiwiree2eidentity_create_dpop_token(retptr, this.__wbg_ptr, expiry_secs, ptr0, len0);
1766
1891
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1767
1892
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1768
1893
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1788,7 +1913,7 @@ class FfiWireE2EIdentity {
1788
1913
  const len0 = WASM_VECTOR_LEN;
1789
1914
  const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1790
1915
  const len1 = WASM_VECTOR_LEN;
1791
- wasm$1.ffiwiree2eidentity_new_dpop_challenge_request(retptr, this.ptr, ptr0, len0, ptr1, len1);
1916
+ wasm$1.ffiwiree2eidentity_new_dpop_challenge_request(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1792
1917
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1793
1918
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1794
1919
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1814,7 +1939,7 @@ class FfiWireE2EIdentity {
1814
1939
  const len0 = WASM_VECTOR_LEN;
1815
1940
  const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1816
1941
  const len1 = WASM_VECTOR_LEN;
1817
- wasm$1.ffiwiree2eidentity_new_oidc_challenge_request(retptr, this.ptr, ptr0, len0, ptr1, len1);
1942
+ wasm$1.ffiwiree2eidentity_new_oidc_challenge_request(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1818
1943
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1819
1944
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1820
1945
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1835,7 +1960,7 @@ class FfiWireE2EIdentity {
1835
1960
  new_challenge_response(challenge) {
1836
1961
  try {
1837
1962
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1838
- wasm$1.ffiwiree2eidentity_new_challenge_response(retptr, this.ptr, addHeapObject(challenge));
1963
+ wasm$1.ffiwiree2eidentity_new_challenge_response(retptr, this.__wbg_ptr, addHeapObject(challenge));
1839
1964
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1840
1965
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1841
1966
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1861,7 +1986,7 @@ class FfiWireE2EIdentity {
1861
1986
  const len0 = WASM_VECTOR_LEN;
1862
1987
  const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1863
1988
  const len1 = WASM_VECTOR_LEN;
1864
- wasm$1.ffiwiree2eidentity_check_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1);
1989
+ wasm$1.ffiwiree2eidentity_check_order_request(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1865
1990
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1866
1991
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1867
1992
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1877,22 +2002,32 @@ class FfiWireE2EIdentity {
1877
2002
  /**
1878
2003
  * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_response]
1879
2004
  * @param {Uint8Array} order
1880
- * @returns {any}
2005
+ * @returns {string}
1881
2006
  */
1882
2007
  check_order_response(order) {
2008
+ let deferred2_0;
2009
+ let deferred2_1;
1883
2010
  try {
1884
2011
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1885
- wasm$1.ffiwiree2eidentity_check_order_response(retptr, this.ptr, addHeapObject(order));
2012
+ wasm$1.ffiwiree2eidentity_check_order_response(retptr, this.__wbg_ptr, addHeapObject(order));
1886
2013
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1887
2014
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1888
2015
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1889
- if (r2) {
1890
- throw takeObject(r1);
2016
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
2017
+ var ptr1 = r0;
2018
+ var len1 = r1;
2019
+ if (r3) {
2020
+ ptr1 = 0;
2021
+ len1 = 0;
2022
+ throw takeObject(r2);
1891
2023
  }
1892
- return takeObject(r0);
2024
+ deferred2_0 = ptr1;
2025
+ deferred2_1 = len1;
2026
+ return getStringFromWasm0(ptr1, len1);
1893
2027
  }
1894
2028
  finally {
1895
2029
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2030
+ wasm$1.__wbindgen_free(deferred2_0, deferred2_1);
1896
2031
  }
1897
2032
  }
1898
2033
  /**
@@ -1905,7 +2040,7 @@ class FfiWireE2EIdentity {
1905
2040
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1906
2041
  const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1907
2042
  const len0 = WASM_VECTOR_LEN;
1908
- wasm$1.ffiwiree2eidentity_finalize_request(retptr, this.ptr, ptr0, len0);
2043
+ wasm$1.ffiwiree2eidentity_finalize_request(retptr, this.__wbg_ptr, ptr0, len0);
1909
2044
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1910
2045
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1911
2046
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1921,22 +2056,32 @@ class FfiWireE2EIdentity {
1921
2056
  /**
1922
2057
  * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_response]
1923
2058
  * @param {Uint8Array} finalize
1924
- * @returns {any}
2059
+ * @returns {string}
1925
2060
  */
1926
2061
  finalize_response(finalize) {
2062
+ let deferred2_0;
2063
+ let deferred2_1;
1927
2064
  try {
1928
2065
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1929
- wasm$1.ffiwiree2eidentity_finalize_response(retptr, this.ptr, addHeapObject(finalize));
2066
+ wasm$1.ffiwiree2eidentity_finalize_response(retptr, this.__wbg_ptr, addHeapObject(finalize));
1930
2067
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1931
2068
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1932
2069
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1933
- if (r2) {
1934
- throw takeObject(r1);
2070
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
2071
+ var ptr1 = r0;
2072
+ var len1 = r1;
2073
+ if (r3) {
2074
+ ptr1 = 0;
2075
+ len1 = 0;
2076
+ throw takeObject(r2);
1935
2077
  }
1936
- return takeObject(r0);
2078
+ deferred2_0 = ptr1;
2079
+ deferred2_1 = len1;
2080
+ return getStringFromWasm0(ptr1, len1);
1937
2081
  }
1938
2082
  finally {
1939
2083
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2084
+ wasm$1.__wbindgen_free(deferred2_0, deferred2_1);
1940
2085
  }
1941
2086
  }
1942
2087
  /**
@@ -1949,7 +2094,7 @@ class FfiWireE2EIdentity {
1949
2094
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1950
2095
  const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1951
2096
  const len0 = WASM_VECTOR_LEN;
1952
- wasm$1.ffiwiree2eidentity_certificate_request(retptr, this.ptr, ptr0, len0);
2097
+ wasm$1.ffiwiree2eidentity_certificate_request(retptr, this.__wbg_ptr, ptr0, len0);
1953
2098
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1954
2099
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1955
2100
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1968,13 +2113,14 @@ class FfiWireE2EIdentity {
1968
2113
  */
1969
2114
  class Invitee {
1970
2115
  static __wrap(ptr) {
2116
+ ptr = ptr >>> 0;
1971
2117
  const obj = Object.create(Invitee.prototype);
1972
- obj.ptr = ptr;
2118
+ obj.__wbg_ptr = ptr;
1973
2119
  return obj;
1974
2120
  }
1975
2121
  __destroy_into_raw() {
1976
- const ptr = this.ptr;
1977
- this.ptr = 0;
2122
+ const ptr = this.__wbg_ptr;
2123
+ this.__wbg_ptr = 0;
1978
2124
  return ptr;
1979
2125
  }
1980
2126
  free() {
@@ -1993,14 +2139,14 @@ class Invitee {
1993
2139
  * @returns {Uint8Array}
1994
2140
  */
1995
2141
  get id() {
1996
- const ret = wasm$1.acmechallenge_delegate(this.ptr);
2142
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
1997
2143
  return takeObject(ret);
1998
2144
  }
1999
2145
  /**
2000
2146
  * @returns {Uint8Array}
2001
2147
  */
2002
2148
  get kp() {
2003
- const ret = wasm$1.invitee_kp(this.ptr);
2149
+ const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2004
2150
  return takeObject(ret);
2005
2151
  }
2006
2152
  }
@@ -2009,13 +2155,14 @@ class Invitee {
2009
2155
  */
2010
2156
  class MemberAddedMessages {
2011
2157
  static __wrap(ptr) {
2158
+ ptr = ptr >>> 0;
2012
2159
  const obj = Object.create(MemberAddedMessages.prototype);
2013
- obj.ptr = ptr;
2160
+ obj.__wbg_ptr = ptr;
2014
2161
  return obj;
2015
2162
  }
2016
2163
  __destroy_into_raw() {
2017
- const ptr = this.ptr;
2018
- this.ptr = 0;
2164
+ const ptr = this.__wbg_ptr;
2165
+ this.__wbg_ptr = 0;
2019
2166
  return ptr;
2020
2167
  }
2021
2168
  free() {
@@ -2037,21 +2184,21 @@ class MemberAddedMessages {
2037
2184
  * @returns {Uint8Array}
2038
2185
  */
2039
2186
  get welcome() {
2040
- const ret = wasm$1.conversationinitbundle_conversation_id(this.ptr);
2187
+ const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
2041
2188
  return takeObject(ret);
2042
2189
  }
2043
2190
  /**
2044
2191
  * @returns {Uint8Array}
2045
2192
  */
2046
2193
  get commit() {
2047
- const ret = wasm$1.commitbundle_commit(this.ptr);
2194
+ const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
2048
2195
  return takeObject(ret);
2049
2196
  }
2050
2197
  /**
2051
2198
  * @returns {PublicGroupStateBundle}
2052
2199
  */
2053
2200
  get public_group_state() {
2054
- const ret = wasm$1.commitbundle_public_group_state(this.ptr);
2201
+ const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
2055
2202
  return PublicGroupStateBundle.__wrap(ret);
2056
2203
  }
2057
2204
  }
@@ -2060,13 +2207,14 @@ class MemberAddedMessages {
2060
2207
  */
2061
2208
  class NewAcmeAuthz {
2062
2209
  static __wrap(ptr) {
2210
+ ptr = ptr >>> 0;
2063
2211
  const obj = Object.create(NewAcmeAuthz.prototype);
2064
- obj.ptr = ptr;
2212
+ obj.__wbg_ptr = ptr;
2065
2213
  return obj;
2066
2214
  }
2067
2215
  __destroy_into_raw() {
2068
- const ptr = this.ptr;
2069
- this.ptr = 0;
2216
+ const ptr = this.__wbg_ptr;
2217
+ this.__wbg_ptr = 0;
2070
2218
  return ptr;
2071
2219
  }
2072
2220
  free() {
@@ -2098,30 +2246,34 @@ class NewAcmeAuthz {
2098
2246
  * @returns {string}
2099
2247
  */
2100
2248
  get identifier() {
2249
+ let deferred1_0;
2250
+ let deferred1_1;
2101
2251
  try {
2102
2252
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2103
- wasm$1.newacmeauthz_identifier(retptr, this.ptr);
2253
+ wasm$1.newacmeauthz_identifier(retptr, this.__wbg_ptr);
2104
2254
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2105
2255
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2256
+ deferred1_0 = r0;
2257
+ deferred1_1 = r1;
2106
2258
  return getStringFromWasm0(r0, r1);
2107
2259
  }
2108
2260
  finally {
2109
2261
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2110
- wasm$1.__wbindgen_free(r0, r1);
2262
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2111
2263
  }
2112
2264
  }
2113
2265
  /**
2114
2266
  * @returns {AcmeChallenge | undefined}
2115
2267
  */
2116
2268
  get wireDpopChallenge() {
2117
- const ret = wasm$1.newacmeauthz_wireDpopChallenge(this.ptr);
2269
+ const ret = wasm$1.newacmeauthz_wireDpopChallenge(this.__wbg_ptr);
2118
2270
  return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
2119
2271
  }
2120
2272
  /**
2121
2273
  * @returns {AcmeChallenge | undefined}
2122
2274
  */
2123
2275
  get wireOidcChallenge() {
2124
- const ret = wasm$1.newacmeauthz_wireOidcChallenge(this.ptr);
2276
+ const ret = wasm$1.newacmeauthz_wireOidcChallenge(this.__wbg_ptr);
2125
2277
  return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
2126
2278
  }
2127
2279
  }
@@ -2130,13 +2282,14 @@ class NewAcmeAuthz {
2130
2282
  */
2131
2283
  class NewAcmeOrder {
2132
2284
  static __wrap(ptr) {
2285
+ ptr = ptr >>> 0;
2133
2286
  const obj = Object.create(NewAcmeOrder.prototype);
2134
- obj.ptr = ptr;
2287
+ obj.__wbg_ptr = ptr;
2135
2288
  return obj;
2136
2289
  }
2137
2290
  __destroy_into_raw() {
2138
- const ptr = this.ptr;
2139
- this.ptr = 0;
2291
+ const ptr = this.__wbg_ptr;
2292
+ this.__wbg_ptr = 0;
2140
2293
  return ptr;
2141
2294
  }
2142
2295
  free() {
@@ -2157,14 +2310,14 @@ class NewAcmeOrder {
2157
2310
  * @returns {Uint8Array}
2158
2311
  */
2159
2312
  get delegate() {
2160
- const ret = wasm$1.acmechallenge_delegate(this.ptr);
2313
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2161
2314
  return takeObject(ret);
2162
2315
  }
2163
2316
  /**
2164
2317
  * @returns {Array<any>}
2165
2318
  */
2166
2319
  get authorizations() {
2167
- const ret = wasm$1.newacmeorder_authorizations(this.ptr);
2320
+ const ret = wasm$1.newacmeorder_authorizations(this.__wbg_ptr);
2168
2321
  return takeObject(ret);
2169
2322
  }
2170
2323
  }
@@ -2172,13 +2325,14 @@ class NewAcmeOrder {
2172
2325
  */
2173
2326
  class ProposalBundle {
2174
2327
  static __wrap(ptr) {
2328
+ ptr = ptr >>> 0;
2175
2329
  const obj = Object.create(ProposalBundle.prototype);
2176
- obj.ptr = ptr;
2330
+ obj.__wbg_ptr = ptr;
2177
2331
  return obj;
2178
2332
  }
2179
2333
  __destroy_into_raw() {
2180
- const ptr = this.ptr;
2181
- this.ptr = 0;
2334
+ const ptr = this.__wbg_ptr;
2335
+ this.__wbg_ptr = 0;
2182
2336
  return ptr;
2183
2337
  }
2184
2338
  free() {
@@ -2189,14 +2343,14 @@ class ProposalBundle {
2189
2343
  * @returns {Uint8Array}
2190
2344
  */
2191
2345
  get proposal() {
2192
- const ret = wasm$1.acmechallenge_delegate(this.ptr);
2346
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2193
2347
  return takeObject(ret);
2194
2348
  }
2195
2349
  /**
2196
2350
  * @returns {Uint8Array}
2197
2351
  */
2198
2352
  get proposal_ref() {
2199
- const ret = wasm$1.invitee_kp(this.ptr);
2353
+ const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2200
2354
  return takeObject(ret);
2201
2355
  }
2202
2356
  }
@@ -2204,13 +2358,14 @@ class ProposalBundle {
2204
2358
  */
2205
2359
  class ProteusAutoPrekeyBundle {
2206
2360
  static __wrap(ptr) {
2361
+ ptr = ptr >>> 0;
2207
2362
  const obj = Object.create(ProteusAutoPrekeyBundle.prototype);
2208
- obj.ptr = ptr;
2363
+ obj.__wbg_ptr = ptr;
2209
2364
  return obj;
2210
2365
  }
2211
2366
  __destroy_into_raw() {
2212
- const ptr = this.ptr;
2213
- this.ptr = 0;
2367
+ const ptr = this.__wbg_ptr;
2368
+ this.__wbg_ptr = 0;
2214
2369
  return ptr;
2215
2370
  }
2216
2371
  free() {
@@ -2221,14 +2376,14 @@ class ProteusAutoPrekeyBundle {
2221
2376
  * @returns {number}
2222
2377
  */
2223
2378
  get id() {
2224
- const ret = wasm$1.__wbg_get_proteusautoprekeybundle_id(this.ptr);
2379
+ const ret = wasm$1.__wbg_get_proteusautoprekeybundle_id(this.__wbg_ptr);
2225
2380
  return ret;
2226
2381
  }
2227
2382
  /**
2228
2383
  * @param {number} arg0
2229
2384
  */
2230
2385
  set id(arg0) {
2231
- wasm$1.__wbg_set_proteusautoprekeybundle_id(this.ptr, arg0);
2386
+ wasm$1.__wbg_set_proteusautoprekeybundle_id(this.__wbg_ptr, arg0);
2232
2387
  }
2233
2388
  /**
2234
2389
  * @returns {Uint8Array}
@@ -2236,12 +2391,12 @@ class ProteusAutoPrekeyBundle {
2236
2391
  get pkb() {
2237
2392
  try {
2238
2393
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2239
- wasm$1.__wbg_get_proteusautoprekeybundle_pkb(retptr, this.ptr);
2394
+ wasm$1.__wbg_get_proteusautoprekeybundle_pkb(retptr, this.__wbg_ptr);
2240
2395
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2241
2396
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2242
- var v0 = getArrayU8FromWasm0(r0, r1).slice();
2397
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2243
2398
  wasm$1.__wbindgen_free(r0, r1 * 1);
2244
- return v0;
2399
+ return v1;
2245
2400
  }
2246
2401
  finally {
2247
2402
  wasm$1.__wbindgen_add_to_stack_pointer(16);
@@ -2253,20 +2408,21 @@ class ProteusAutoPrekeyBundle {
2253
2408
  set pkb(arg0) {
2254
2409
  const ptr0 = passArray8ToWasm0(arg0, wasm$1.__wbindgen_malloc);
2255
2410
  const len0 = WASM_VECTOR_LEN;
2256
- wasm$1.__wbg_set_proteusautoprekeybundle_pkb(this.ptr, ptr0, len0);
2411
+ wasm$1.__wbg_set_proteusautoprekeybundle_pkb(this.__wbg_ptr, ptr0, len0);
2257
2412
  }
2258
2413
  }
2259
2414
  /**
2260
2415
  */
2261
2416
  class PublicGroupStateBundle {
2262
2417
  static __wrap(ptr) {
2418
+ ptr = ptr >>> 0;
2263
2419
  const obj = Object.create(PublicGroupStateBundle.prototype);
2264
- obj.ptr = ptr;
2420
+ obj.__wbg_ptr = ptr;
2265
2421
  return obj;
2266
2422
  }
2267
2423
  __destroy_into_raw() {
2268
- const ptr = this.ptr;
2269
- this.ptr = 0;
2424
+ const ptr = this.__wbg_ptr;
2425
+ this.__wbg_ptr = 0;
2270
2426
  return ptr;
2271
2427
  }
2272
2428
  free() {
@@ -2277,21 +2433,21 @@ class PublicGroupStateBundle {
2277
2433
  * @returns {number}
2278
2434
  */
2279
2435
  get encryption_type() {
2280
- const ret = wasm$1.publicgroupstatebundle_encryption_type(this.ptr);
2436
+ const ret = wasm$1.publicgroupstatebundle_encryption_type(this.__wbg_ptr);
2281
2437
  return ret;
2282
2438
  }
2283
2439
  /**
2284
2440
  * @returns {number}
2285
2441
  */
2286
2442
  get ratchet_tree_type() {
2287
- const ret = wasm$1.publicgroupstatebundle_ratchet_tree_type(this.ptr);
2443
+ const ret = wasm$1.publicgroupstatebundle_ratchet_tree_type(this.__wbg_ptr);
2288
2444
  return ret;
2289
2445
  }
2290
2446
  /**
2291
2447
  * @returns {Uint8Array}
2292
2448
  */
2293
2449
  get payload() {
2294
- const ret = wasm$1.acmechallenge_delegate(this.ptr);
2450
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2295
2451
  return takeObject(ret);
2296
2452
  }
2297
2453
  }
@@ -2300,13 +2456,14 @@ class PublicGroupStateBundle {
2300
2456
  */
2301
2457
  class WireIdentity {
2302
2458
  static __wrap(ptr) {
2459
+ ptr = ptr >>> 0;
2303
2460
  const obj = Object.create(WireIdentity.prototype);
2304
- obj.ptr = ptr;
2461
+ obj.__wbg_ptr = ptr;
2305
2462
  return obj;
2306
2463
  }
2307
2464
  __destroy_into_raw() {
2308
- const ptr = this.ptr;
2309
- this.ptr = 0;
2465
+ const ptr = this.__wbg_ptr;
2466
+ this.__wbg_ptr = 0;
2310
2467
  return ptr;
2311
2468
  }
2312
2469
  free() {
@@ -2335,68 +2492,84 @@ class WireIdentity {
2335
2492
  * @returns {string}
2336
2493
  */
2337
2494
  get client_id() {
2495
+ let deferred1_0;
2496
+ let deferred1_1;
2338
2497
  try {
2339
2498
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2340
- wasm$1.acmedirectory_newNonce(retptr, this.ptr);
2499
+ wasm$1.acmedirectory_newNonce(retptr, this.__wbg_ptr);
2341
2500
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2342
2501
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2502
+ deferred1_0 = r0;
2503
+ deferred1_1 = r1;
2343
2504
  return getStringFromWasm0(r0, r1);
2344
2505
  }
2345
2506
  finally {
2346
2507
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2347
- wasm$1.__wbindgen_free(r0, r1);
2508
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2348
2509
  }
2349
2510
  }
2350
2511
  /**
2351
2512
  * @returns {string}
2352
2513
  */
2353
2514
  get handle() {
2515
+ let deferred1_0;
2516
+ let deferred1_1;
2354
2517
  try {
2355
2518
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2356
- wasm$1.acmechallenge_url(retptr, this.ptr);
2519
+ wasm$1.acmechallenge_url(retptr, this.__wbg_ptr);
2357
2520
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2358
2521
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2522
+ deferred1_0 = r0;
2523
+ deferred1_1 = r1;
2359
2524
  return getStringFromWasm0(r0, r1);
2360
2525
  }
2361
2526
  finally {
2362
2527
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2363
- wasm$1.__wbindgen_free(r0, r1);
2528
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2364
2529
  }
2365
2530
  }
2366
2531
  /**
2367
2532
  * @returns {string}
2368
2533
  */
2369
2534
  get display_name() {
2535
+ let deferred1_0;
2536
+ let deferred1_1;
2370
2537
  try {
2371
2538
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2372
- wasm$1.acmedirectory_newOrder(retptr, this.ptr);
2539
+ wasm$1.acmechallenge_target(retptr, this.__wbg_ptr);
2373
2540
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2374
2541
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2542
+ deferred1_0 = r0;
2543
+ deferred1_1 = r1;
2375
2544
  return getStringFromWasm0(r0, r1);
2376
2545
  }
2377
2546
  finally {
2378
2547
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2379
- wasm$1.__wbindgen_free(r0, r1);
2548
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2380
2549
  }
2381
2550
  }
2382
2551
  /**
2383
2552
  * @returns {string}
2384
2553
  */
2385
2554
  get domain() {
2555
+ let deferred1_0;
2556
+ let deferred1_1;
2386
2557
  try {
2387
2558
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2388
- wasm$1.wireidentity_domain(retptr, this.ptr);
2559
+ wasm$1.wireidentity_domain(retptr, this.__wbg_ptr);
2389
2560
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2390
2561
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2562
+ deferred1_0 = r0;
2563
+ deferred1_1 = r1;
2391
2564
  return getStringFromWasm0(r0, r1);
2392
2565
  }
2393
2566
  finally {
2394
2567
  wasm$1.__wbindgen_add_to_stack_pointer(16);
2395
- wasm$1.__wbindgen_free(r0, r1);
2568
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1);
2396
2569
  }
2397
2570
  }
2398
2571
  }
2399
- async function load(module, imports) {
2572
+ async function __wbg_load(module, imports) {
2400
2573
  if (typeof Response === 'function' && module instanceof Response) {
2401
2574
  if (typeof WebAssembly.instantiateStreaming === 'function') {
2402
2575
  try {
@@ -2424,16 +2597,16 @@ async function load(module, imports) {
2424
2597
  }
2425
2598
  }
2426
2599
  }
2427
- function getImports() {
2600
+ function __wbg_get_imports() {
2428
2601
  const imports = {};
2429
2602
  imports.wbg = {};
2603
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2604
+ takeObject(arg0);
2605
+ };
2430
2606
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2431
2607
  const ret = getObject(arg0);
2432
2608
  return addHeapObject(ret);
2433
2609
  };
2434
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2435
- takeObject(arg0);
2436
- };
2437
2610
  imports.wbg.__wbindgen_is_object = function (arg0) {
2438
2611
  const val = getObject(arg0);
2439
2612
  const ret = typeof (val) === 'object' && val !== null;
@@ -2451,11 +2624,22 @@ function getImports() {
2451
2624
  const ret = getObject(arg0) in getObject(arg1);
2452
2625
  return ret;
2453
2626
  };
2454
- imports.wbg.__wbg_objectStoreNames_f0884fed45ebc81c = function (arg0) {
2627
+ imports.wbg.__wbg_commit_008545ae6e591814 = function () {
2628
+ return handleError(function (arg0) {
2629
+ getObject(arg0).commit();
2630
+ }, arguments);
2631
+ };
2632
+ imports.wbg.__wbg_setoncomplete_1a27889412475f6f = function (arg0, arg1) {
2633
+ getObject(arg0).oncomplete = getObject(arg1);
2634
+ };
2635
+ imports.wbg.__wbg_setonerror_74c492184749a58a = function (arg0, arg1) {
2636
+ getObject(arg0).onerror = getObject(arg1);
2637
+ };
2638
+ imports.wbg.__wbg_objectStoreNames_432a9424fbdfefda = function (arg0) {
2455
2639
  const ret = getObject(arg0).objectStoreNames;
2456
2640
  return addHeapObject(ret);
2457
2641
  };
2458
- imports.wbg.__wbg_length_36c8debf8d623fc6 = function (arg0) {
2642
+ imports.wbg.__wbg_length_4633dd9b984117b1 = function (arg0) {
2459
2643
  const ret = getObject(arg0).length;
2460
2644
  return ret;
2461
2645
  };
@@ -2470,33 +2654,41 @@ function getImports() {
2470
2654
  imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
2471
2655
  const obj = getObject(arg1);
2472
2656
  const ret = typeof (obj) === 'string' ? obj : undefined;
2473
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2474
- var len0 = WASM_VECTOR_LEN;
2475
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2476
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2657
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2658
+ var len1 = WASM_VECTOR_LEN;
2659
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2660
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2477
2661
  };
2478
- imports.wbg.__wbg_length_e498fbc24f9c1d4f = function (arg0) {
2662
+ imports.wbg.__wbg_length_820c786973abdd8a = function (arg0) {
2479
2663
  const ret = getObject(arg0).length;
2480
2664
  return ret;
2481
2665
  };
2482
- imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2483
- const ret = FfiWireE2EIdentity.__wrap(arg0);
2666
+ imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
2667
+ const ret = new Uint8Array(getObject(arg0));
2484
2668
  return addHeapObject(ret);
2485
2669
  };
2486
- imports.wbg.__wbg_call_9495de66fdbe016b = function () {
2670
+ imports.wbg.__wbg_call_587b30eea3e09332 = function () {
2487
2671
  return handleError(function (arg0, arg1, arg2) {
2488
2672
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2489
2673
  return addHeapObject(ret);
2490
2674
  }, arguments);
2491
2675
  };
2492
- imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function (arg0, arg1) {
2676
+ imports.wbg.__wbg_new_0394642eae39db16 = function () {
2677
+ const ret = new Array();
2678
+ return addHeapObject(ret);
2679
+ };
2680
+ imports.wbg.__wbg_push_109cfc26d02582dd = function (arg0, arg1) {
2681
+ const ret = getObject(arg0).push(getObject(arg1));
2682
+ return ret;
2683
+ };
2684
+ imports.wbg.__wbg_new_2b55e405e4af4986 = function (arg0, arg1) {
2493
2685
  try {
2494
2686
  var state0 = { a: arg0, b: arg1 };
2495
2687
  var cb0 = (arg0, arg1) => {
2496
2688
  const a = state0.a;
2497
2689
  state0.a = 0;
2498
2690
  try {
2499
- return __wbg_adapter_285(a, state0.b, arg0, arg1);
2691
+ return __wbg_adapter_288(a, state0.b, arg0, arg1);
2500
2692
  }
2501
2693
  finally {
2502
2694
  state0.a = a;
@@ -2509,43 +2701,39 @@ function getImports() {
2509
2701
  state0.a = state0.b = 0;
2510
2702
  }
2511
2703
  };
2512
- imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2513
- const ret = new Uint8Array(getObject(arg0));
2514
- return addHeapObject(ret);
2515
- };
2516
2704
  imports.wbg.__wbindgen_number_new = function (arg0) {
2517
2705
  const ret = arg0;
2518
2706
  return addHeapObject(ret);
2519
2707
  };
2520
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2521
- const ret = BigInt.asUintN(64, arg0);
2708
+ imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function () {
2709
+ const ret = new Map();
2522
2710
  return addHeapObject(ret);
2523
2711
  };
2524
- imports.wbg.__wbg_new_f9876326328f45ed = function () {
2525
- const ret = new Object();
2712
+ imports.wbg.__wbg_set_da7be7bf0e037b14 = function (arg0, arg1, arg2) {
2713
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2526
2714
  return addHeapObject(ret);
2527
2715
  };
2528
- imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
2529
- const ret = new Map();
2716
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2717
+ const ret = BigInt.asUintN(64, arg0);
2530
2718
  return addHeapObject(ret);
2531
2719
  };
2532
- imports.wbg.__wbg_set_388c4c6422704173 = function (arg0, arg1, arg2) {
2533
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2720
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2721
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2534
2722
  return addHeapObject(ret);
2535
2723
  };
2536
- imports.wbg.__wbg_new_b525de17f44a8943 = function () {
2537
- const ret = new Array();
2724
+ imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
2725
+ const ret = new Object();
2538
2726
  return addHeapObject(ret);
2539
2727
  };
2540
- imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2541
- const ret = getObject(arg0).push(getObject(arg1));
2542
- return ret;
2728
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2729
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
2730
+ return addHeapObject(ret);
2543
2731
  };
2544
- imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2545
- const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2732
+ imports.wbg.__wbg_new_87297f22973157c8 = function (arg0, arg1) {
2733
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2546
2734
  return addHeapObject(ret);
2547
2735
  };
2548
- imports.wbg.__wbg_setonsuccess_925a7718d3f62bc1 = function (arg0, arg1) {
2736
+ imports.wbg.__wbg_setonsuccess_d668ac71ae816a35 = function (arg0, arg1) {
2549
2737
  getObject(arg0).onsuccess = getObject(arg1);
2550
2738
  };
2551
2739
  imports.wbg.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
@@ -2567,7 +2755,7 @@ function getImports() {
2567
2755
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
2568
2756
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2569
2757
  };
2570
- imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function (arg0) {
2758
+ imports.wbg.__wbg_isSafeInteger_2088b01008075470 = function (arg0) {
2571
2759
  const ret = Number.isSafeInteger(getObject(arg0));
2572
2760
  return ret;
2573
2761
  };
@@ -2589,15 +2777,15 @@ function getImports() {
2589
2777
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2590
2778
  return addHeapObject(ret);
2591
2779
  };
2592
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function (arg0) {
2780
+ imports.wbg.__wbg_isArray_04e59fb73f78ab5b = function (arg0) {
2593
2781
  const ret = Array.isArray(getObject(arg0));
2594
2782
  return ret;
2595
2783
  };
2596
- imports.wbg.__wbg_iterator_55f114446221aa5a = function () {
2784
+ imports.wbg.__wbg_iterator_7c7e58f62eb84700 = function () {
2597
2785
  const ret = Symbol.iterator;
2598
2786
  return addHeapObject(ret);
2599
2787
  };
2600
- imports.wbg.__wbg_get_27fe3dac1c4d0224 = function (arg0, arg1) {
2788
+ imports.wbg.__wbg_get_7303ed2ef026b2f5 = function (arg0, arg1) {
2601
2789
  const ret = getObject(arg0)[arg1 >>> 0];
2602
2790
  return addHeapObject(ret);
2603
2791
  };
@@ -2608,11 +2796,7 @@ function getImports() {
2608
2796
  imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2609
2797
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2610
2798
  };
2611
- imports.wbg.__wbg_new_15d3966e9981a196 = function (arg0, arg1) {
2612
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2613
- return addHeapObject(ret);
2614
- };
2615
- imports.wbg.__wbg_instanceof_Promise_4333c4e5587e8936 = function (arg0) {
2799
+ imports.wbg.__wbg_instanceof_Promise_4b9b76dc9c35f96e = function (arg0) {
2616
2800
  let result;
2617
2801
  try {
2618
2802
  result = getObject(arg0) instanceof Promise;
@@ -2623,30 +2807,30 @@ function getImports() {
2623
2807
  const ret = result;
2624
2808
  return ret;
2625
2809
  };
2626
- imports.wbg.__wbg_then_f753623316e2873a = function (arg0, arg1, arg2) {
2810
+ imports.wbg.__wbg_then_835b073a479138e5 = function (arg0, arg1, arg2) {
2627
2811
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2628
2812
  return addHeapObject(ret);
2629
2813
  };
2630
- imports.wbg.__wbg_warn_e57696dbb3977030 = function (arg0) {
2814
+ imports.wbg.__wbg_warn_9bdd743e9f5fe1e0 = function (arg0) {
2631
2815
  console.warn(getObject(arg0));
2632
2816
  };
2633
- imports.wbg.__wbg_call_96878afb7a8201ca = function () {
2817
+ imports.wbg.__wbg_call_4c73e4aecced6a7d = function () {
2634
2818
  return handleError(function (arg0, arg1, arg2, arg3) {
2635
2819
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2636
2820
  return addHeapObject(ret);
2637
2821
  }, arguments);
2638
2822
  };
2639
- imports.wbg.__wbg_call_99043a1e2a9e5916 = function () {
2823
+ imports.wbg.__wbg_call_7f98f4764e617d86 = function () {
2640
2824
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2641
2825
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2642
2826
  return addHeapObject(ret);
2643
2827
  }, arguments);
2644
2828
  };
2645
- imports.wbg.__wbg_of_4065463fbe892f00 = function (arg0, arg1, arg2, arg3) {
2829
+ imports.wbg.__wbg_of_3ff36373618311f4 = function (arg0, arg1, arg2, arg3) {
2646
2830
  const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2647
2831
  return addHeapObject(ret);
2648
2832
  };
2649
- imports.wbg.__wbg_apply_aedce30790c00792 = function () {
2833
+ imports.wbg.__wbg_apply_8cf86cc6c93f52c1 = function () {
2650
2834
  return handleError(function (arg0, arg1, arg2) {
2651
2835
  const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
2652
2836
  return addHeapObject(ret);
@@ -2656,11 +2840,11 @@ function getImports() {
2656
2840
  const ret = performance.now();
2657
2841
  return ret;
2658
2842
  };
2659
- imports.wbg.__wbg_reject_57029f54148d79c3 = function (arg0) {
2843
+ imports.wbg.__wbg_reject_c2ad2ed69321f916 = function (arg0) {
2660
2844
  const ret = Promise.reject(getObject(arg0));
2661
2845
  return addHeapObject(ret);
2662
2846
  };
2663
- imports.wbg.__wbg_set_17224bc548dd1d7b = function (arg0, arg1, arg2) {
2847
+ imports.wbg.__wbg_set_b4da98d504ac6091 = function (arg0, arg1, arg2) {
2664
2848
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2665
2849
  };
2666
2850
  imports.wbg.__wbg_proposalbundle_new = function (arg0) {
@@ -2677,44 +2861,37 @@ function getImports() {
2677
2861
  };
2678
2862
  imports.wbg.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
2679
2863
  const ret = getObject(arg1).stack;
2680
- const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2681
- const len0 = WASM_VECTOR_LEN;
2682
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2683
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2864
+ const ptr1 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2865
+ const len1 = WASM_VECTOR_LEN;
2866
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2867
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2684
2868
  };
2685
2869
  imports.wbg.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
2870
+ let deferred0_0;
2871
+ let deferred0_1;
2686
2872
  try {
2873
+ deferred0_0 = arg0;
2874
+ deferred0_1 = arg1;
2687
2875
  console.error(getStringFromWasm0(arg0, arg1));
2688
2876
  }
2689
2877
  finally {
2690
- wasm$1.__wbindgen_free(arg0, arg1);
2878
+ wasm$1.__wbindgen_free(deferred0_0, deferred0_1);
2691
2879
  }
2692
2880
  };
2693
- imports.wbg.__wbg_commit_7f934e1d9fffde34 = function () {
2694
- return handleError(function (arg0) {
2695
- getObject(arg0).commit();
2696
- }, arguments);
2697
- };
2698
- imports.wbg.__wbg_setoncomplete_f32167d3f84be687 = function (arg0, arg1) {
2699
- getObject(arg0).oncomplete = getObject(arg1);
2700
- };
2701
- imports.wbg.__wbg_setonerror_7cbe775a0abc7a8e = function (arg0, arg1) {
2702
- getObject(arg0).onerror = getObject(arg1);
2703
- };
2704
- imports.wbg.__wbg_name_31ef05f12c1d72c6 = function (arg0, arg1) {
2881
+ imports.wbg.__wbg_name_38df4c6ca8f369b9 = function (arg0, arg1) {
2705
2882
  const ret = getObject(arg1).name;
2706
- const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2707
- const len0 = WASM_VECTOR_LEN;
2708
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2709
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2883
+ const ptr1 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2884
+ const len1 = WASM_VECTOR_LEN;
2885
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2886
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2710
2887
  };
2711
- imports.wbg.__wbg_transaction_a31cc90bd4f34364 = function () {
2888
+ imports.wbg.__wbg_transaction_7cffa0cd94a4c3fe = function () {
2712
2889
  return handleError(function (arg0, arg1, arg2) {
2713
2890
  const ret = getObject(arg0).transaction(getObject(arg1), takeObject(arg2));
2714
2891
  return addHeapObject(ret);
2715
2892
  }, arguments);
2716
2893
  };
2717
- imports.wbg.__wbg_setonerror_019196fbce756cc0 = function (arg0, arg1) {
2894
+ imports.wbg.__wbg_setonerror_e1d069ec7a5315ee = function (arg0, arg1) {
2718
2895
  getObject(arg0).onerror = getObject(arg1);
2719
2896
  };
2720
2897
  imports.wbg.__wbindgen_cb_drop = function (arg0) {
@@ -2726,64 +2903,52 @@ function getImports() {
2726
2903
  const ret = false;
2727
2904
  return ret;
2728
2905
  };
2729
- imports.wbg.__wbg_close_98f3a5ab91060b8b = function (arg0) {
2906
+ imports.wbg.__wbg_close_68facef204a0b48a = function (arg0) {
2730
2907
  getObject(arg0).close();
2731
2908
  };
2732
- imports.wbg.__wbg_deleteDatabase_f360deb7283ea232 = function () {
2909
+ imports.wbg.__wbg_deleteDatabase_8531c5f474a3ff15 = function () {
2733
2910
  return handleError(function (arg0, arg1, arg2) {
2734
2911
  const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
2735
2912
  return addHeapObject(ret);
2736
2913
  }, arguments);
2737
2914
  };
2738
- imports.wbg.__wbg_put_fdcda25ee2a99b60 = function () {
2915
+ imports.wbg.__wbg_put_f62eacfa59543435 = function () {
2739
2916
  return handleError(function (arg0, arg1, arg2) {
2740
2917
  const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2741
2918
  return addHeapObject(ret);
2742
2919
  }, arguments);
2743
2920
  };
2744
- imports.wbg.__wbg_put_e078356619886001 = function () {
2921
+ imports.wbg.__wbg_put_05619e738b4e6bc3 = function () {
2745
2922
  return handleError(function (arg0, arg1) {
2746
2923
  const ret = getObject(arg0).put(getObject(arg1));
2747
2924
  return addHeapObject(ret);
2748
2925
  }, arguments);
2749
2926
  };
2750
- imports.wbg.__wbg_count_5e2074144ab4e23d = function () {
2751
- return handleError(function (arg0) {
2752
- const ret = getObject(arg0).count();
2753
- return addHeapObject(ret);
2754
- }, arguments);
2755
- };
2756
- imports.wbg.__wbg_count_ca4ab5c7bcf928fa = function () {
2757
- return handleError(function (arg0, arg1) {
2758
- const ret = getObject(arg0).count(getObject(arg1));
2759
- return addHeapObject(ret);
2760
- }, arguments);
2761
- };
2762
- imports.wbg.__wbg_delete_d2905418845867ae = function () {
2927
+ imports.wbg.__wbg_delete_4aef4c117a5e6c27 = function () {
2763
2928
  return handleError(function (arg0, arg1) {
2764
2929
  const ret = getObject(arg0).delete(getObject(arg1));
2765
2930
  return addHeapObject(ret);
2766
2931
  }, arguments);
2767
2932
  };
2768
- imports.wbg.__wbg_index_009fbb0b7b595020 = function () {
2933
+ imports.wbg.__wbg_index_a508b592b002de8d = function () {
2769
2934
  return handleError(function (arg0, arg1, arg2) {
2770
2935
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2771
2936
  return addHeapObject(ret);
2772
2937
  }, arguments);
2773
2938
  };
2774
- imports.wbg.__wbg_get_baf4855f9a986186 = function () {
2939
+ imports.wbg.__wbg_get_f53c921291c381bd = function () {
2775
2940
  return handleError(function (arg0, arg1) {
2776
2941
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
2777
2942
  return addHeapObject(ret);
2778
2943
  }, arguments);
2779
2944
  };
2780
- imports.wbg.__wbg_get_6b22d93eabf073bc = function () {
2945
+ imports.wbg.__wbg_get_f5beff7314ca87fd = function () {
2781
2946
  return handleError(function (arg0, arg1) {
2782
2947
  const ret = getObject(arg0).get(getObject(arg1));
2783
2948
  return addHeapObject(ret);
2784
2949
  }, arguments);
2785
2950
  };
2786
- imports.wbg.__wbg_openCursor_54d7936e873b5120 = function () {
2951
+ imports.wbg.__wbg_openCursor_9f2ba6afb4885925 = function () {
2787
2952
  return handleError(function (arg0, arg1) {
2788
2953
  const ret = getObject(arg0).openCursor(getObject(arg1));
2789
2954
  return addHeapObject(ret);
@@ -2793,11 +2958,11 @@ function getImports() {
2793
2958
  const ret = wasm$1.memory;
2794
2959
  return addHeapObject(ret);
2795
2960
  };
2796
- imports.wbg.__wbg_buffer_cf65c07de34b9a08 = function (arg0) {
2961
+ imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function (arg0) {
2797
2962
  const ret = getObject(arg0).buffer;
2798
2963
  return addHeapObject(ret);
2799
2964
  };
2800
- imports.wbg.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function (arg0, arg1, arg2) {
2965
+ imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function (arg0, arg1, arg2) {
2801
2966
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2802
2967
  return addHeapObject(ret);
2803
2968
  };
@@ -2806,7 +2971,7 @@ function getImports() {
2806
2971
  getObject(arg0).randomFillSync(takeObject(arg1));
2807
2972
  }, arguments);
2808
2973
  };
2809
- imports.wbg.__wbg_subarray_7526649b91a252a6 = function (arg0, arg1, arg2) {
2974
+ imports.wbg.__wbg_subarray_d82be056deb4ad27 = function (arg0, arg1, arg2) {
2810
2975
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2811
2976
  return addHeapObject(ret);
2812
2977
  };
@@ -2849,145 +3014,145 @@ function getImports() {
2849
3014
  const ret = getObject(arg0).msCrypto;
2850
3015
  return addHeapObject(ret);
2851
3016
  };
2852
- imports.wbg.__wbg_newwithlength_b56c882b57805732 = function (arg0) {
3017
+ imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function (arg0) {
2853
3018
  const ret = new Uint8Array(arg0 >>> 0);
2854
3019
  return addHeapObject(ret);
2855
3020
  };
2856
- imports.wbg.__wbg_next_88560ec06a094dea = function () {
3021
+ imports.wbg.__wbg_next_ec061e48a0e72a96 = function () {
2857
3022
  return handleError(function (arg0) {
2858
3023
  const ret = getObject(arg0).next();
2859
3024
  return addHeapObject(ret);
2860
3025
  }, arguments);
2861
3026
  };
2862
- imports.wbg.__wbg_done_1ebec03bbd919843 = function (arg0) {
3027
+ imports.wbg.__wbg_done_b6abb27d42b63867 = function (arg0) {
2863
3028
  const ret = getObject(arg0).done;
2864
3029
  return ret;
2865
3030
  };
2866
- imports.wbg.__wbg_value_6ac8da5cc5b3efda = function (arg0) {
3031
+ imports.wbg.__wbg_value_2f4ef2036bfad28e = function (arg0) {
2867
3032
  const ret = getObject(arg0).value;
2868
3033
  return addHeapObject(ret);
2869
3034
  };
2870
- imports.wbg.__wbg_call_95d1ea488d03e4e8 = function () {
3035
+ imports.wbg.__wbg_call_557a2f2deacc4912 = function () {
2871
3036
  return handleError(function (arg0, arg1) {
2872
3037
  const ret = getObject(arg0).call(getObject(arg1));
2873
3038
  return addHeapObject(ret);
2874
3039
  }, arguments);
2875
3040
  };
2876
- imports.wbg.__wbg_next_b7d530c04fd8b217 = function (arg0) {
3041
+ imports.wbg.__wbg_next_f4bc0e96ea67da68 = function (arg0) {
2877
3042
  const ret = getObject(arg0).next;
2878
3043
  return addHeapObject(ret);
2879
3044
  };
2880
- imports.wbg.__wbg_self_e7c1f827057f6584 = function () {
3045
+ imports.wbg.__wbg_self_742dd6eab3e9211e = function () {
2881
3046
  return handleError(function () {
2882
3047
  const ret = self.self;
2883
3048
  return addHeapObject(ret);
2884
3049
  }, arguments);
2885
3050
  };
2886
- imports.wbg.__wbg_window_a09ec664e14b1b81 = function () {
3051
+ imports.wbg.__wbg_window_c409e731db53a0e2 = function () {
2887
3052
  return handleError(function () {
2888
3053
  const ret = window.window;
2889
3054
  return addHeapObject(ret);
2890
3055
  }, arguments);
2891
3056
  };
2892
- imports.wbg.__wbg_globalThis_87cbb8506fecf3a9 = function () {
3057
+ imports.wbg.__wbg_globalThis_b70c095388441f2d = function () {
2893
3058
  return handleError(function () {
2894
3059
  const ret = globalThis.globalThis;
2895
3060
  return addHeapObject(ret);
2896
3061
  }, arguments);
2897
3062
  };
2898
- imports.wbg.__wbg_global_c85a9259e621f3db = function () {
3063
+ imports.wbg.__wbg_global_1c72617491ed7194 = function () {
2899
3064
  return handleError(function () {
2900
3065
  const ret = global.global;
2901
3066
  return addHeapObject(ret);
2902
3067
  }, arguments);
2903
3068
  };
2904
- imports.wbg.__wbg_newnoargs_2b8b6bd7753c76ba = function (arg0, arg1) {
3069
+ imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function (arg0, arg1) {
2905
3070
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2906
3071
  return addHeapObject(ret);
2907
3072
  };
2908
- imports.wbg.__wbg_set_6aa458a4ebdb65cb = function () {
3073
+ imports.wbg.__wbg_set_07da13cc24b69217 = function () {
2909
3074
  return handleError(function (arg0, arg1, arg2) {
2910
3075
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2911
3076
  return ret;
2912
3077
  }, arguments);
2913
3078
  };
2914
- imports.wbg.__wbg_set_17499e8aa4003ebd = function (arg0, arg1, arg2) {
3079
+ imports.wbg.__wbg_set_3698e3ca519b3c3c = function (arg0, arg1, arg2) {
2915
3080
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2916
3081
  };
2917
- imports.wbg.__wbg_length_27a2afe8ab42b09f = function (arg0) {
3082
+ imports.wbg.__wbg_length_0aab7ffd65ad19ed = function (arg0) {
2918
3083
  const ret = getObject(arg0).length;
2919
3084
  return ret;
2920
3085
  };
2921
- imports.wbg.__wbg_now_931686b195a14f9d = function () {
3086
+ imports.wbg.__wbg_now_c857fb0367c762cc = function () {
2922
3087
  const ret = Date.now();
2923
3088
  return ret;
2924
3089
  };
2925
- imports.wbg.__wbg_target_b629c177f9bee3da = function (arg0) {
3090
+ imports.wbg.__wbg_target_bb43778021b84733 = function (arg0) {
2926
3091
  const ret = getObject(arg0).target;
2927
3092
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2928
3093
  };
2929
- imports.wbg.__wbg_result_3a1fef332bc47038 = function () {
3094
+ imports.wbg.__wbg_error_a16f2288166003c0 = function () {
3095
+ return handleError(function (arg0) {
3096
+ const ret = getObject(arg0).error;
3097
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3098
+ }, arguments);
3099
+ };
3100
+ imports.wbg.__wbg_result_fcdf1e20f03fa375 = function () {
2930
3101
  return handleError(function (arg0) {
2931
3102
  const ret = getObject(arg0).result;
2932
3103
  return addHeapObject(ret);
2933
3104
  }, arguments);
2934
3105
  };
2935
- imports.wbg.__wbg_contains_eab173da4886df95 = function (arg0, arg1, arg2) {
3106
+ imports.wbg.__wbg_contains_7ea02aa9686102c9 = function (arg0, arg1, arg2) {
2936
3107
  const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2937
3108
  return ret;
2938
3109
  };
2939
- imports.wbg.__wbg_createObjectStore_ed1e91faa3997893 = function () {
3110
+ imports.wbg.__wbg_createObjectStore_cc4ffd0f671774b5 = function () {
2940
3111
  return handleError(function (arg0, arg1, arg2, arg3) {
2941
3112
  const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2), getObject(arg3));
2942
3113
  return addHeapObject(ret);
2943
3114
  }, arguments);
2944
3115
  };
2945
- imports.wbg.__wbg_transaction_c231cf0e3feac876 = function (arg0) {
3116
+ imports.wbg.__wbg_transaction_6ee3b434ba42d2ba = function (arg0) {
2946
3117
  const ret = getObject(arg0).transaction;
2947
3118
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2948
3119
  };
2949
- imports.wbg.__wbg_indexNames_7ef05cac7f9faea0 = function (arg0) {
3120
+ imports.wbg.__wbg_indexNames_3d712486a8cca56f = function (arg0) {
2950
3121
  const ret = getObject(arg0).indexNames;
2951
3122
  return addHeapObject(ret);
2952
3123
  };
2953
- imports.wbg.__wbg_createIndex_308667a6a7549b87 = function () {
3124
+ imports.wbg.__wbg_createIndex_1754becb0a1eaade = function () {
2954
3125
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2955
3126
  const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
2956
3127
  return addHeapObject(ret);
2957
3128
  }, arguments);
2958
3129
  };
2959
- imports.wbg.__wbg_deleteIndex_4f7897daa8425a6c = function () {
3130
+ imports.wbg.__wbg_deleteIndex_a2e0e2a52cf9efbb = function () {
2960
3131
  return handleError(function (arg0, arg1, arg2) {
2961
3132
  getObject(arg0).deleteIndex(getStringFromWasm0(arg1, arg2));
2962
3133
  }, arguments);
2963
3134
  };
2964
- imports.wbg.__wbg_deleteObjectStore_a67245ba486fb641 = function () {
3135
+ imports.wbg.__wbg_deleteObjectStore_0e5499c492f82cfa = function () {
2965
3136
  return handleError(function (arg0, arg1, arg2) {
2966
3137
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2967
3138
  }, arguments);
2968
3139
  };
2969
- imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2970
- return handleError(function (arg0) {
2971
- const ret = getObject(arg0).error;
2972
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2973
- }, arguments);
2974
- };
2975
3140
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
2976
3141
  const ret = !getObject(arg0);
2977
3142
  return ret;
2978
3143
  };
2979
- imports.wbg.__wbg_key_4b29c4de1db73033 = function () {
3144
+ imports.wbg.__wbg_key_46cfc02e70598c46 = function () {
2980
3145
  return handleError(function (arg0) {
2981
3146
  const ret = getObject(arg0).key;
2982
3147
  return addHeapObject(ret);
2983
3148
  }, arguments);
2984
3149
  };
2985
- imports.wbg.__wbg_advance_b4ae7221325b28eb = function () {
3150
+ imports.wbg.__wbg_advance_41fb7fb13309369f = function () {
2986
3151
  return handleError(function (arg0, arg1) {
2987
3152
  getObject(arg0).advance(arg1 >>> 0);
2988
3153
  }, arguments);
2989
3154
  };
2990
- imports.wbg.__wbg_instanceof_IdbFactory_9c5780a46ebd3426 = function (arg0) {
3155
+ imports.wbg.__wbg_instanceof_IdbFactory_b27e3052d7c33961 = function (arg0) {
2991
3156
  let result;
2992
3157
  try {
2993
3158
  result = getObject(arg0) instanceof IDBFactory;
@@ -2998,26 +3163,26 @@ function getImports() {
2998
3163
  const ret = result;
2999
3164
  return ret;
3000
3165
  };
3001
- imports.wbg.__wbg_open_bd135117d9924392 = function () {
3166
+ imports.wbg.__wbg_open_8fe2c4fdf4aa1f9d = function () {
3002
3167
  return handleError(function (arg0, arg1, arg2) {
3003
3168
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
3004
3169
  return addHeapObject(ret);
3005
3170
  }, arguments);
3006
3171
  };
3007
- imports.wbg.__wbg_open_2f9bdc2df25fc92e = function () {
3172
+ imports.wbg.__wbg_open_d5031782c12da0d4 = function () {
3008
3173
  return handleError(function (arg0, arg1, arg2, arg3) {
3009
3174
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
3010
3175
  return addHeapObject(ret);
3011
3176
  }, arguments);
3012
3177
  };
3013
- imports.wbg.__wbg_setonupgradeneeded_8961be061344d04a = function (arg0, arg1) {
3178
+ imports.wbg.__wbg_setonupgradeneeded_73f521ef7c1bd5de = function (arg0, arg1) {
3014
3179
  getObject(arg0).onupgradeneeded = getObject(arg1);
3015
3180
  };
3016
- imports.wbg.__wbg_toString_cec163b212643722 = function (arg0) {
3181
+ imports.wbg.__wbg_toString_506566b763774a16 = function (arg0) {
3017
3182
  const ret = getObject(arg0).toString();
3018
3183
  return addHeapObject(ret);
3019
3184
  };
3020
- imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function (arg0) {
3185
+ imports.wbg.__wbg_instanceof_Uint8Array_1349640af2da2e88 = function (arg0) {
3021
3186
  let result;
3022
3187
  try {
3023
3188
  result = getObject(arg0) instanceof Uint8Array;
@@ -3028,7 +3193,7 @@ function getImports() {
3028
3193
  const ret = result;
3029
3194
  return ret;
3030
3195
  };
3031
- imports.wbg.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function (arg0) {
3196
+ imports.wbg.__wbg_instanceof_ArrayBuffer_ef2632aa0d4bfff8 = function (arg0) {
3032
3197
  let result;
3033
3198
  try {
3034
3199
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -3039,138 +3204,143 @@ function getImports() {
3039
3204
  const ret = result;
3040
3205
  return ret;
3041
3206
  };
3042
- imports.wbg.__wbg_entries_4e1315b774245952 = function (arg0) {
3207
+ imports.wbg.__wbg_entries_13e011453776468f = function (arg0) {
3043
3208
  const ret = Object.entries(getObject(arg0));
3044
3209
  return addHeapObject(ret);
3045
3210
  };
3046
3211
  imports.wbg.__wbg_String_88810dfeb4021902 = function (arg0, arg1) {
3047
3212
  const ret = String(getObject(arg1));
3048
- const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3049
- const len0 = WASM_VECTOR_LEN;
3050
- getInt32Memory0()[arg0 / 4 + 1] = len0;
3051
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
3213
+ const ptr1 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3214
+ const len1 = WASM_VECTOR_LEN;
3215
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
3216
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3052
3217
  };
3053
- imports.wbg.__wbg_new0_25059e40b1c02766 = function () {
3218
+ imports.wbg.__wbg_new0_494c19a27871d56f = function () {
3054
3219
  const ret = new Date();
3055
3220
  return addHeapObject(ret);
3056
3221
  };
3057
- imports.wbg.__wbg_getTime_7c59072d1651a3cf = function (arg0) {
3222
+ imports.wbg.__wbg_getTime_40bd09e020e8bc8c = function (arg0) {
3058
3223
  const ret = getObject(arg0).getTime();
3059
3224
  return ret;
3060
3225
  };
3061
3226
  imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
3062
3227
  const ret = debugString(getObject(arg1));
3063
- const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3064
- const len0 = WASM_VECTOR_LEN;
3065
- getInt32Memory0()[arg0 / 4 + 1] = len0;
3066
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
3228
+ const ptr1 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3229
+ const len1 = WASM_VECTOR_LEN;
3230
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
3231
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3067
3232
  };
3068
3233
  imports.wbg.__wbindgen_throw = function (arg0, arg1) {
3069
3234
  throw new Error(getStringFromWasm0(arg0, arg1));
3070
3235
  };
3071
- imports.wbg.__wbg_then_ec5db6d509eb475f = function (arg0, arg1) {
3236
+ imports.wbg.__wbg_then_8df675b8bb5d5e3c = function (arg0, arg1) {
3072
3237
  const ret = getObject(arg0).then(getObject(arg1));
3073
3238
  return addHeapObject(ret);
3074
3239
  };
3075
- imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function (arg0) {
3240
+ imports.wbg.__wbg_resolve_ae38ad63c43ff98b = function (arg0) {
3076
3241
  const ret = Promise.resolve(getObject(arg0));
3077
3242
  return addHeapObject(ret);
3078
3243
  };
3079
- imports.wbg.__wbg_get_ed3fbcc16ce7b4bb = function (arg0, arg1, arg2) {
3244
+ imports.wbg.__wbg_get_91d38ec2e4611a1e = function (arg0, arg1, arg2) {
3080
3245
  const ret = getObject(arg1)[arg2 >>> 0];
3081
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3082
- var len0 = WASM_VECTOR_LEN;
3083
- getInt32Memory0()[arg0 / 4 + 1] = len0;
3084
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
3246
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
3247
+ var len1 = WASM_VECTOR_LEN;
3248
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
3249
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3085
3250
  };
3086
- imports.wbg.__wbg_continue_1df0825170e4d395 = function () {
3251
+ imports.wbg.__wbg_continue_c081a1b978361679 = function () {
3087
3252
  return handleError(function (arg0) {
3088
3253
  getObject(arg0).continue();
3089
3254
  }, arguments);
3090
3255
  };
3091
- imports.wbg.__wbg_value_97772e372f20b04e = function () {
3256
+ imports.wbg.__wbg_value_3b1dc8fee5cc6eb5 = function () {
3092
3257
  return handleError(function (arg0) {
3093
3258
  const ret = getObject(arg0).value;
3094
3259
  return addHeapObject(ret);
3095
3260
  }, arguments);
3096
3261
  };
3097
- imports.wbg.__wbg_openCursor_f07a2d20b356da80 = function () {
3262
+ imports.wbg.__wbg_openCursor_5d4f2d7a9e60117c = function () {
3098
3263
  return handleError(function (arg0) {
3099
3264
  const ret = getObject(arg0).openCursor();
3100
3265
  return addHeapObject(ret);
3101
3266
  }, arguments);
3102
3267
  };
3103
- imports.wbg.__wbg_openCursor_03f95e6b2b64c86e = function () {
3268
+ imports.wbg.__wbg_openCursor_88c75b521e6a6818 = function () {
3104
3269
  return handleError(function (arg0, arg1, arg2) {
3105
3270
  const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
3106
3271
  return addHeapObject(ret);
3107
3272
  }, arguments);
3108
3273
  };
3109
- imports.wbg.__wbg_get_18b8195859195e7e = function () {
3274
+ imports.wbg.__wbg_get_a9b507527c0f6958 = function () {
3110
3275
  return handleError(function (arg0, arg1) {
3111
3276
  const ret = getObject(arg0).get(getObject(arg1));
3112
3277
  return addHeapObject(ret);
3113
3278
  }, arguments);
3114
3279
  };
3115
- imports.wbg.__wbg_openCursor_a00e5f8015710a1a = function () {
3280
+ imports.wbg.__wbg_openCursor_2da32f6b7767a8f6 = function () {
3116
3281
  return handleError(function (arg0) {
3117
3282
  const ret = getObject(arg0).openCursor();
3118
3283
  return addHeapObject(ret);
3119
3284
  }, arguments);
3120
3285
  };
3121
- imports.wbg.__wbg_openCursor_51766f7156aa29ab = function () {
3286
+ imports.wbg.__wbg_openCursor_63250aa904924858 = function () {
3122
3287
  return handleError(function (arg0, arg1) {
3123
3288
  const ret = getObject(arg0).openCursor(getObject(arg1));
3124
3289
  return addHeapObject(ret);
3125
3290
  }, arguments);
3126
3291
  };
3127
- imports.wbg.__wbg_openCursor_4bc8942a881766b1 = function () {
3292
+ imports.wbg.__wbg_openCursor_4a2cac5b1c5cf36b = function () {
3128
3293
  return handleError(function (arg0, arg1, arg2) {
3129
3294
  const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
3130
3295
  return addHeapObject(ret);
3131
3296
  }, arguments);
3132
3297
  };
3133
- imports.wbg.__wbg_objectStore_cdc69f65ad4a71eb = function () {
3298
+ imports.wbg.__wbg_objectStore_6eb812526333c917 = function () {
3134
3299
  return handleError(function (arg0, arg1, arg2) {
3135
3300
  const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
3136
3301
  return addHeapObject(ret);
3137
3302
  }, arguments);
3138
3303
  };
3139
- imports.wbg.__wbindgen_closure_wrapper1537 = function (arg0, arg1, arg2) {
3140
- const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_52);
3304
+ imports.wbg.__wbindgen_closure_wrapper1663 = function (arg0, arg1, arg2) {
3305
+ const ret = makeMutClosure(arg0, arg1, 162, __wbg_adapter_52);
3141
3306
  return addHeapObject(ret);
3142
3307
  };
3143
- imports.wbg.__wbindgen_closure_wrapper4621 = function (arg0, arg1, arg2) {
3144
- const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_55);
3308
+ imports.wbg.__wbindgen_closure_wrapper4791 = function (arg0, arg1, arg2) {
3309
+ const ret = makeMutClosure(arg0, arg1, 162, __wbg_adapter_55);
3145
3310
  return addHeapObject(ret);
3146
3311
  };
3147
3312
  return imports;
3148
3313
  }
3149
- function finalizeInit(instance, module) {
3314
+ function __wbg_finalize_init(instance, module) {
3150
3315
  wasm$1 = instance.exports;
3151
- init.__wbindgen_wasm_module = module;
3316
+ __wbg_init.__wbindgen_wasm_module = module;
3152
3317
  cachedBigInt64Memory0 = null;
3153
3318
  cachedFloat64Memory0 = null;
3154
3319
  cachedInt32Memory0 = null;
3320
+ cachedUint16Memory0 = null;
3155
3321
  cachedUint32Memory0 = null;
3156
3322
  cachedUint8Memory0 = null;
3157
3323
  return wasm$1;
3158
3324
  }
3159
3325
  function initSync(module) {
3160
- const imports = getImports();
3326
+ if (wasm$1 !== undefined)
3327
+ return wasm$1;
3328
+ const imports = __wbg_get_imports();
3161
3329
  if (!(module instanceof WebAssembly.Module)) {
3162
3330
  module = new WebAssembly.Module(module);
3163
3331
  }
3164
3332
  const instance = new WebAssembly.Instance(module, imports);
3165
- return finalizeInit(instance, module);
3333
+ return __wbg_finalize_init(instance, module);
3166
3334
  }
3167
- async function init(input) {
3168
- const imports = getImports();
3335
+ async function __wbg_init(input) {
3336
+ if (wasm$1 !== undefined)
3337
+ return wasm$1;
3338
+ const imports = __wbg_get_imports();
3169
3339
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
3170
3340
  input = fetch(input);
3171
3341
  }
3172
- const { instance, module } = await load(await input, imports);
3173
- return finalizeInit(instance, module);
3342
+ const { instance, module } = await __wbg_load(await input, imports);
3343
+ return __wbg_finalize_init(instance, module);
3174
3344
  }
3175
3345
 
3176
3346
  var exports = /*#__PURE__*/Object.freeze({
@@ -3183,6 +3353,7 @@ var exports = /*#__PURE__*/Object.freeze({
3183
3353
  ConversationInitBundle: ConversationInitBundle,
3184
3354
  CoreCrypto: CoreCrypto$1,
3185
3355
  CoreCryptoWasmCallbacks: CoreCryptoWasmCallbacks,
3356
+ CredentialType: CredentialType$1,
3186
3357
  CustomConfiguration: CustomConfiguration,
3187
3358
  DecryptedMessage: DecryptedMessage,
3188
3359
  FfiWireE2EIdentity: FfiWireE2EIdentity,
@@ -3195,14 +3366,14 @@ var exports = /*#__PURE__*/Object.freeze({
3195
3366
  PublicGroupStateBundle: PublicGroupStateBundle,
3196
3367
  WireIdentity: WireIdentity,
3197
3368
  WirePolicy: WirePolicy$1,
3198
- default: init,
3369
+ default: __wbg_init,
3199
3370
  initSync: initSync
3200
3371
  });
3201
3372
 
3202
3373
  var wasm = async (opt = {}) => {
3203
3374
  let {importHook, serverPath} = opt;
3204
3375
 
3205
- let path = "assets/core_crypto_ffi-70438e2d.wasm";
3376
+ let path = "assets/core_crypto_ffi-3aab42da.wasm";
3206
3377
 
3207
3378
  if (serverPath != null) {
3208
3379
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -3212,7 +3383,7 @@ var wasm = async (opt = {}) => {
3212
3383
  path = importHook(path);
3213
3384
  }
3214
3385
 
3215
- await init(path);
3386
+ await __wbg_init(path);
3216
3387
  return exports;
3217
3388
  };
3218
3389
 
@@ -3311,6 +3482,17 @@ var Ciphersuite;
3311
3482
  */
3312
3483
  Ciphersuite[Ciphersuite["MLS_256_DHKEMP384_AES256GCM_SHA384_P384"] = 7] = "MLS_256_DHKEMP384_AES256GCM_SHA384_P384";
3313
3484
  })(Ciphersuite || (Ciphersuite = {}));
3485
+ var CredentialType;
3486
+ (function (CredentialType) {
3487
+ /**
3488
+ * Just a KeyPair
3489
+ */
3490
+ CredentialType[CredentialType["Basic"] = 1] = "Basic";
3491
+ /**
3492
+ * A certificate obtained through e2e identity enrollment process
3493
+ */
3494
+ CredentialType[CredentialType["X509"] = 2] = "X509";
3495
+ })(CredentialType || (CredentialType = {}));
3314
3496
  /**
3315
3497
  * see [core_crypto::prelude::MlsWirePolicy]
3316
3498
  */
@@ -3428,13 +3610,14 @@ class CoreCrypto {
3428
3610
  * });
3429
3611
  * ````
3430
3612
  */
3431
- static async init({ databaseName, key, clientId, wasmFilePath, entropySeed }) {
3613
+ static async init({ databaseName, key, clientId, wasmFilePath, ciphersuites, entropySeed }) {
3432
3614
  if (!__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module)) {
3433
3615
  const wasmImportArgs = wasmFilePath ? { importHook: () => wasmFilePath } : undefined;
3434
3616
  const exports = (await wasm(wasmImportArgs));
3435
3617
  __classPrivateFieldSet(this, _a, exports, "f", _CoreCrypto_module);
3436
3618
  }
3437
- const cc = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto._internal_new(databaseName, key, clientId, entropySeed));
3619
+ let cs = ciphersuites.map(cs => cs.valueOf());
3620
+ const cc = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto._internal_new(databaseName, key, clientId, Uint16Array.of(...cs), entropySeed));
3438
3621
  return new this(cc);
3439
3622
  }
3440
3623
  /**
@@ -3444,42 +3627,49 @@ class CoreCrypto {
3444
3627
  * Use this clientId to initialize MLS with {@link CoreCrypto.mlsInit}.
3445
3628
  * @param params - {@link CoreCryptoDeferredParams}
3446
3629
  */
3447
- static async deferredInit({ databaseName, key, entropySeed, wasmFilePath }) {
3630
+ static async deferredInit({ databaseName, key, ciphersuites, entropySeed, wasmFilePath }) {
3448
3631
  if (!__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module)) {
3449
3632
  const wasmImportArgs = wasmFilePath ? { importHook: () => wasmFilePath } : undefined;
3450
3633
  const exports = (await wasm(wasmImportArgs));
3451
3634
  __classPrivateFieldSet(this, _a, exports, "f", _CoreCrypto_module);
3452
3635
  }
3453
- const cc = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto.deferred_init(databaseName, key, entropySeed));
3636
+ let cs = ciphersuites.map(cs => cs.valueOf());
3637
+ const cc = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto.deferred_init(databaseName, key, Uint16Array.of(...cs), entropySeed));
3454
3638
  return new this(cc);
3455
3639
  }
3456
3640
  /**
3457
3641
  * Use this after {@link CoreCrypto.deferredInit} when you have a clientId. It initializes MLS.
3458
3642
  *
3459
3643
  * @param clientId - {@link CoreCryptoParams#clientId} but required
3644
+ * @param ciphersuites - All the ciphersuites supported by this MLS client
3460
3645
  */
3461
- async mlsInit(clientId) {
3462
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_init(clientId));
3646
+ async mlsInit(clientId, ciphersuites) {
3647
+ let cs = ciphersuites.map(cs => cs.valueOf());
3648
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_init(clientId, Uint16Array.of(...cs)));
3463
3649
  }
3464
3650
  /**
3465
3651
  * Generates a MLS KeyPair/CredentialBundle with a temporary, random client ID.
3466
- * This method is designed to be used in conjunction with {@link CoreCrypto.mlsInitWithClientID} and represents the first step in this process
3652
+ * This method is designed to be used in conjunction with {@link CoreCrypto.mlsInitWithClientId} and represents the first step in this process
3467
3653
  *
3654
+ * @param ciphersuites - All the ciphersuites supported by this MLS client
3468
3655
  * @returns This returns the TLS-serialized identity key (i.e. the signature keypair's public key)
3469
3656
  */
3470
- async mlsGenerateKeypair() {
3471
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_generate_keypair());
3657
+ async mlsGenerateKeypair(ciphersuites) {
3658
+ let cs = ciphersuites.map(cs => cs.valueOf());
3659
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_generate_keypair(Uint16Array.of(...cs)));
3472
3660
  }
3473
3661
  /**
3474
3662
  * Updates the current temporary Client ID with the newly provided one. This is the second step in the externally-generated clients process
3475
3663
  *
3476
- * Important: This is designed to be called after {@link CoreCrypto.mlsGenerateKeyPair}
3664
+ * Important: This is designed to be called after {@link CoreCrypto.mlsGenerateKeypair}
3477
3665
  *
3478
3666
  * @param clientId - The newly-allocated client ID by the MLS Authentication Service
3479
- * @param signaturePublicKey - The public key you were given at the first step; This is for authentication purposes
3667
+ * @param signaturePublicKeys - The public key you were given at the first step; This is for authentication purposes
3668
+ * @param ciphersuites - All the ciphersuites supported by this MLS client
3480
3669
  */
3481
- async mlsInitWithClientId(clientId, signaturePublicKey) {
3482
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_init_with_client_id(clientId, signaturePublicKey));
3670
+ async mlsInitWithClientId(clientId, signaturePublicKeys, ciphersuites) {
3671
+ let cs = ciphersuites.map(cs => cs.valueOf());
3672
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mls_init_with_client_id(clientId, signaturePublicKeys, Uint16Array.of(...cs)));
3483
3673
  }
3484
3674
  /** @hidden */
3485
3675
  constructor(cc) {
@@ -3663,23 +3853,26 @@ class CoreCrypto {
3663
3853
  /**
3664
3854
  * @returns The client's public key
3665
3855
  */
3666
- async clientPublicKey() {
3667
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_public_key());
3856
+ async clientPublicKey(ciphersuite) {
3857
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_public_key(ciphersuite));
3668
3858
  }
3669
3859
  /**
3860
+ *
3861
+ * @param ciphersuite - of the KeyPackages to count
3670
3862
  * @returns The amount of valid, non-expired KeyPackages that are persisted in the backing storage
3671
3863
  */
3672
- async clientValidKeypackagesCount() {
3673
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_valid_keypackages_count());
3864
+ async clientValidKeypackagesCount(ciphersuite) {
3865
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_valid_keypackages_count(ciphersuite));
3674
3866
  }
3675
3867
  /**
3676
3868
  * Fetches a requested amount of keypackages
3677
3869
  *
3870
+ * @param ciphersuite - of the KeyPackages to generate
3678
3871
  * @param amountRequested - The amount of keypackages requested
3679
3872
  * @returns An array of length `amountRequested` containing TLS-serialized KeyPackages
3680
3873
  */
3681
- async clientKeypackages(amountRequested) {
3682
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_keypackages(amountRequested));
3874
+ async clientKeypackages(ciphersuite, amountRequested) {
3875
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").client_keypackages(ciphersuite, amountRequested));
3683
3876
  }
3684
3877
  /**
3685
3878
  * Adds new clients to a conversation, assuming the current client has the right to add new clients to the conversation.
@@ -3840,7 +4033,8 @@ class CoreCrypto {
3840
4033
  async newExternalProposal(externalProposalType, args) {
3841
4034
  switch (externalProposalType) {
3842
4035
  case ExternalProposalType.Add: {
3843
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_external_add_proposal(args.conversationId, args.epoch));
4036
+ let addArgs = args;
4037
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_external_add_proposal(args.conversationId, args.epoch, addArgs.ciphersuite, addArgs.credentialType));
3844
4038
  }
3845
4039
  case ExternalProposalType.Remove: {
3846
4040
  if (!args.keyPackageRef) {
@@ -3872,14 +4066,17 @@ class CoreCrypto {
3872
4066
  * bad can happen if you forget to except some storage space wasted.
3873
4067
  *
3874
4068
  * @param publicGroupState - a TLS encoded PublicGroupState fetched from the Delivery Service
4069
+ * @param credentialType - kind of Credential to use for joining this group. If {@link CredentialType.Basic} is
4070
+ * chosen and no Credential has been created yet for it, a new one will be generated.
3875
4071
  * @param configuration - configuration of the MLS group
4072
+ * When {@link CredentialType.X509} is chosen, it fails when no Credential has been created for the given {@link Ciphersuite}.
3876
4073
  * @returns see {@link ConversationInitBundle}
3877
4074
  */
3878
- async joinByExternalCommit(publicGroupState, configuration = {}) {
4075
+ async joinByExternalCommit(publicGroupState, credentialType, configuration = {}) {
3879
4076
  try {
3880
4077
  const { keyRotationSpan, wirePolicy } = configuration || {};
3881
4078
  const config = new (__classPrivateFieldGet(CoreCrypto, _a, "f", _CoreCrypto_module).CustomConfiguration)(keyRotationSpan, wirePolicy);
3882
- const ffiInitMessage = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").join_by_external_commit(publicGroupState, config));
4079
+ const ffiInitMessage = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").join_by_external_commit(publicGroupState, config, credentialType));
3883
4080
  const pgs = ffiInitMessage.public_group_state;
3884
4081
  const ret = {
3885
4082
  conversationId: ffiInitMessage.conversation_id,
@@ -4177,24 +4374,41 @@ class CoreCrypto {
4177
4374
  * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4178
4375
  * @param handle user handle e.g. `alice.smith.qa@example.com`
4179
4376
  * @param expiryDays generated x509 certificate expiry
4180
- * @param ciphersuite - For generating signing key material. Only {@link Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519} is supported currently
4377
+ * @param ciphersuite - for generating signing key material
4181
4378
  * @returns The new {@link WireE2eIdentity} object
4182
4379
  */
4183
- async newAcmeEnrollment(clientId, displayName, handle, expiryDays, ciphersuite = Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519) {
4184
- if (ciphersuite !== Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519) {
4185
- throw new Error("This ACME ciphersuite isn't supported. Only `Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519` is as of now");
4186
- }
4187
- const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_acme_enrollment(clientId, displayName, handle, expiryDays, ciphersuite));
4380
+ async e2eiNewEnrollment(clientId, displayName, handle, expiryDays, ciphersuite) {
4381
+ const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_new_enrollment(clientId, displayName, handle, expiryDays, ciphersuite));
4188
4382
  return new WireE2eIdentity(e2ei);
4189
4383
  }
4190
4384
  /**
4191
4385
  * Parses the ACME server response from the endpoint fetching x509 certificates and uses it to initialize the MLS client with a certificate
4192
4386
  *
4193
- * @param e2ei - the enrollment instance used to fetch the certificates
4387
+ * @param enrollment - the enrollment instance used to fetch the certificates
4194
4388
  * @param certificateChain - the raw response from ACME server
4195
4389
  */
4196
- async e2eiMlsInit(e2ei, certificateChain) {
4197
- return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_mls_init(e2ei.inner(), certificateChain);
4390
+ async e2eiMlsInit(enrollment, certificateChain) {
4391
+ return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_mls_init(enrollment.inner(), certificateChain);
4392
+ }
4393
+ /**
4394
+ * Allows persisting an active enrollment (for example while redirecting the user during OAuth) in order to resume
4395
+ * it later with {@link e2eiEnrollmentStashPop}
4396
+ *
4397
+ * @param enrollment the enrollment instance to persist
4398
+ * @returns a handle to fetch the enrollment later with {@link e2eiEnrollmentStashPop}
4399
+ */
4400
+ async e2eiEnrollmentStash(enrollment) {
4401
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_enrollment_stash(enrollment.inner()));
4402
+ }
4403
+ /**
4404
+ * Fetches the persisted enrollment and deletes it from the keystore
4405
+ *
4406
+ * @param handle returned by {@link e2eiEnrollmentStash}
4407
+ * @returns the persisted enrollment instance
4408
+ */
4409
+ async e2eiEnrollmentStashPop(handle) {
4410
+ const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_enrollment_stash_pop(handle));
4411
+ return new WireE2eIdentity(e2ei);
4198
4412
  }
4199
4413
  /**
4200
4414
  * Returns the current version of {@link CoreCrypto}
@@ -4339,13 +4553,12 @@ class WireE2eIdentity {
4339
4553
  * Then send it to `POST /clients/{id}/access-token`
4340
4554
  * {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token} on wire-server.
4341
4555
  *
4342
- * @param accessTokenUrl backend endpoint where this token will be sent. Should be this one {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token}
4343
4556
  * @param expirySecs of the client Dpop JWT. This should be equal to the grace period set in Team Management
4344
4557
  * @param backendNonce you get by calling `GET /clients/token/nonce` on wire-server as defined here {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/get_clients__client__nonce}
4345
4558
  */
4346
- createDpopToken(accessTokenUrl, expirySecs, backendNonce) {
4559
+ createDpopToken(expirySecs, backendNonce) {
4347
4560
  try {
4348
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(accessTokenUrl, expirySecs, backendNonce);
4561
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(expirySecs, backendNonce);
4349
4562
  }
4350
4563
  catch (e) {
4351
4564
  throw CoreCryptoError.fromStdError(e);
@@ -4415,6 +4628,7 @@ class WireE2eIdentity {
4415
4628
  * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}`.
4416
4629
  *
4417
4630
  * @param order HTTP response body
4631
+ * @return the finalize url to use with {@link finalizeRequest}
4418
4632
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4419
4633
  */
4420
4634
  checkOrderResponse(order) {
@@ -4444,6 +4658,7 @@ class WireE2eIdentity {
4444
4658
  * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}/finalize`.
4445
4659
  *
4446
4660
  * @param finalize HTTP response body
4661
+ * @return the certificate url to use with {@link certificateRequest}
4447
4662
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4448
4663
  */
4449
4664
  finalizeResponse(finalize) {
@@ -4471,4 +4686,4 @@ class WireE2eIdentity {
4471
4686
  }
4472
4687
  _WireE2eIdentity_e2ei = new WeakMap();
4473
4688
 
4474
- export { Ciphersuite, CoreCrypto, CoreCryptoError, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WireE2eIdentity, WirePolicy };
4689
+ export { Ciphersuite, CoreCrypto, CoreCryptoError, CredentialType, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WireE2eIdentity, WirePolicy };