@wireapp/core-crypto 0.6.0-rc.3 → 0.6.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -252,7 +252,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
252
252
  function __wbg_adapter_52(arg0, arg1, arg2) {
253
253
  try {
254
254
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
255
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5a2d63dc59f76e61(retptr, arg0, arg1, addHeapObject(arg2));
255
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h577395c5a39b7036(retptr, arg0, arg1, addHeapObject(arg2));
256
256
  var r0 = getInt32Memory0()[retptr / 4 + 0];
257
257
  var r1 = getInt32Memory0()[retptr / 4 + 1];
258
258
  if (r1) {
@@ -264,31 +264,7 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
264
264
  }
265
265
 
266
266
  function __wbg_adapter_55(arg0, arg1, arg2) {
267
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6d113a8418e47593(arg0, arg1, addHeapObject(arg2));
268
- }
269
-
270
- /**
271
- * Returns the current version of CoreCrypto
272
- * @returns {string}
273
- */
274
- function version() {
275
- try {
276
- const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
277
- wasm$1.version(retptr);
278
- var r0 = getInt32Memory0()[retptr / 4 + 0];
279
- var r1 = getInt32Memory0()[retptr / 4 + 1];
280
- return getStringFromWasm0(r0, r1);
281
- } finally {
282
- wasm$1.__wbindgen_add_to_stack_pointer(16);
283
- wasm$1.__wbindgen_free(r0, r1);
284
- }
285
- }
286
-
287
- function passArray8ToWasm0(arg, malloc) {
288
- const ptr = malloc(arg.length * 1);
289
- getUint8Memory0().set(arg, ptr / 1);
290
- WASM_VECTOR_LEN = arg.length;
291
- return ptr;
267
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6fecff61d3f85de1(arg0, arg1, addHeapObject(arg2));
292
268
  }
293
269
 
294
270
  function _assertClass(instance, klass) {
@@ -317,6 +293,39 @@ function passArrayJsValueToWasm0(array, malloc) {
317
293
  return ptr;
318
294
  }
319
295
 
296
+ function passArray8ToWasm0(arg, malloc) {
297
+ const ptr = malloc(arg.length * 1);
298
+ getUint8Memory0().set(arg, ptr / 1);
299
+ WASM_VECTOR_LEN = arg.length;
300
+ return ptr;
301
+ }
302
+
303
+ function getArrayJsValueFromWasm0(ptr, len) {
304
+ const mem = getUint32Memory0();
305
+ const slice = mem.subarray(ptr / 4, ptr / 4 + len);
306
+ const result = [];
307
+ for (let i = 0; i < slice.length; i++) {
308
+ result.push(takeObject(slice[i]));
309
+ }
310
+ return result;
311
+ }
312
+ /**
313
+ * Returns the current version of CoreCrypto
314
+ * @returns {string}
315
+ */
316
+ function version() {
317
+ try {
318
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
319
+ wasm$1.version(retptr);
320
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
321
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
322
+ return getStringFromWasm0(r0, r1);
323
+ } finally {
324
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
325
+ wasm$1.__wbindgen_free(r0, r1);
326
+ }
327
+ }
328
+
320
329
  function handleError(f, args) {
321
330
  try {
322
331
  return f.apply(this, args);
@@ -328,8 +337,8 @@ function handleError(f, args) {
328
337
  function getArrayU8FromWasm0(ptr, len) {
329
338
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
330
339
  }
331
- function __wbg_adapter_220(arg0, arg1, arg2, arg3) {
332
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h05b8fb12110402b0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
340
+ function __wbg_adapter_260(arg0, arg1, arg2, arg3) {
341
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__ha446eb95921e2107(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
333
342
  }
334
343
 
335
344
  /**
@@ -377,6 +386,202 @@ MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448:6,"6":"MLS_256_DHKEMX448_CHACHA2
377
386
  */
378
387
  MLS_256_DHKEMP384_AES256GCM_SHA384_P384:7,"7":"MLS_256_DHKEMP384_AES256GCM_SHA384_P384", });
379
388
  /**
389
+ * See [core_crypto::e2e_identity::types::E2eiAcmeChallenge]
390
+ */
391
+ class AcmeChallenge {
392
+
393
+ static __wrap(ptr) {
394
+ const obj = Object.create(AcmeChallenge.prototype);
395
+ obj.ptr = ptr;
396
+
397
+ return obj;
398
+ }
399
+
400
+ __destroy_into_raw() {
401
+ const ptr = this.ptr;
402
+ this.ptr = 0;
403
+
404
+ return ptr;
405
+ }
406
+
407
+ free() {
408
+ const ptr = this.__destroy_into_raw();
409
+ wasm$1.__wbg_acmechallenge_free(ptr);
410
+ }
411
+ /**
412
+ * @param {Uint8Array} delegate
413
+ * @param {string} url
414
+ */
415
+ constructor(delegate, url) {
416
+ const ptr0 = passStringToWasm0(url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
417
+ const len0 = WASM_VECTOR_LEN;
418
+ const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0);
419
+ return AcmeChallenge.__wrap(ret);
420
+ }
421
+ /**
422
+ * @returns {Uint8Array}
423
+ */
424
+ get delegate() {
425
+ const ret = wasm$1.acmechallenge_delegate(this.ptr);
426
+ return takeObject(ret);
427
+ }
428
+ /**
429
+ * @returns {string}
430
+ */
431
+ get url() {
432
+ try {
433
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
434
+ wasm$1.acmechallenge_url(retptr, this.ptr);
435
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
436
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
437
+ return getStringFromWasm0(r0, r1);
438
+ } finally {
439
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
440
+ wasm$1.__wbindgen_free(r0, r1);
441
+ }
442
+ }
443
+ }
444
+ /**
445
+ * See [core_crypto::e2e_identity::types::E2eiAcmeDirectory]
446
+ */
447
+ class AcmeDirectory {
448
+
449
+ static __wrap(ptr) {
450
+ const obj = Object.create(AcmeDirectory.prototype);
451
+ obj.ptr = ptr;
452
+
453
+ return obj;
454
+ }
455
+
456
+ __destroy_into_raw() {
457
+ const ptr = this.ptr;
458
+ this.ptr = 0;
459
+
460
+ return ptr;
461
+ }
462
+
463
+ free() {
464
+ const ptr = this.__destroy_into_raw();
465
+ wasm$1.__wbg_acmedirectory_free(ptr);
466
+ }
467
+ /**
468
+ * @param {string} new_nonce
469
+ * @param {string} new_account
470
+ * @param {string} new_order
471
+ */
472
+ constructor(new_nonce, new_account, new_order) {
473
+ const ptr0 = passStringToWasm0(new_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
474
+ const len0 = WASM_VECTOR_LEN;
475
+ const ptr1 = passStringToWasm0(new_account, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
476
+ const len1 = WASM_VECTOR_LEN;
477
+ const ptr2 = passStringToWasm0(new_order, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
478
+ const len2 = WASM_VECTOR_LEN;
479
+ const ret = wasm$1.acmedirectory_new(ptr0, len0, ptr1, len1, ptr2, len2);
480
+ return AcmeDirectory.__wrap(ret);
481
+ }
482
+ /**
483
+ * @returns {string}
484
+ */
485
+ get new_nonce() {
486
+ try {
487
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
488
+ wasm$1.acmedirectory_new_nonce(retptr, this.ptr);
489
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
490
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
491
+ return getStringFromWasm0(r0, r1);
492
+ } finally {
493
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
494
+ wasm$1.__wbindgen_free(r0, r1);
495
+ }
496
+ }
497
+ /**
498
+ * @returns {string}
499
+ */
500
+ get new_account() {
501
+ try {
502
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
503
+ wasm$1.acmechallenge_url(retptr, this.ptr);
504
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
505
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
506
+ return getStringFromWasm0(r0, r1);
507
+ } finally {
508
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
509
+ wasm$1.__wbindgen_free(r0, r1);
510
+ }
511
+ }
512
+ /**
513
+ * @returns {string}
514
+ */
515
+ get new_order() {
516
+ try {
517
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
518
+ wasm$1.acmedirectory_new_order(retptr, this.ptr);
519
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
520
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
521
+ return getStringFromWasm0(r0, r1);
522
+ } finally {
523
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
524
+ wasm$1.__wbindgen_free(r0, r1);
525
+ }
526
+ }
527
+ }
528
+ /**
529
+ * See [core_crypto::e2e_identity::types::E2eiAcmeFinalize]
530
+ */
531
+ class AcmeFinalize {
532
+
533
+ static __wrap(ptr) {
534
+ const obj = Object.create(AcmeFinalize.prototype);
535
+ obj.ptr = ptr;
536
+
537
+ return obj;
538
+ }
539
+
540
+ __destroy_into_raw() {
541
+ const ptr = this.ptr;
542
+ this.ptr = 0;
543
+
544
+ return ptr;
545
+ }
546
+
547
+ free() {
548
+ const ptr = this.__destroy_into_raw();
549
+ wasm$1.__wbg_acmefinalize_free(ptr);
550
+ }
551
+ /**
552
+ * @param {Uint8Array} delegate
553
+ * @param {string} certificate_url
554
+ */
555
+ constructor(delegate, certificate_url) {
556
+ const ptr0 = passStringToWasm0(certificate_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
557
+ const len0 = WASM_VECTOR_LEN;
558
+ const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0);
559
+ return AcmeFinalize.__wrap(ret);
560
+ }
561
+ /**
562
+ * @returns {Uint8Array}
563
+ */
564
+ get delegate() {
565
+ const ret = wasm$1.acmechallenge_delegate(this.ptr);
566
+ return takeObject(ret);
567
+ }
568
+ /**
569
+ * @returns {string}
570
+ */
571
+ get certificate_url() {
572
+ try {
573
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
574
+ wasm$1.acmechallenge_url(retptr, this.ptr);
575
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
576
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
577
+ return getStringFromWasm0(r0, r1);
578
+ } finally {
579
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
580
+ wasm$1.__wbindgen_free(r0, r1);
581
+ }
582
+ }
583
+ }
584
+ /**
380
585
  */
381
586
  class CommitBundle {
382
587
 
@@ -1233,6 +1438,15 @@ class CoreCrypto$1 {
1233
1438
  const ret = wasm$1.corecrypto_get_client_ids(this.ptr, ptr0, len0);
1234
1439
  return takeObject(ret);
1235
1440
  }
1441
+ /**
1442
+ * see [core_crypto::MlsCentral::new_acme_enrollment]
1443
+ * @param {number} ciphersuite
1444
+ * @returns {Promise<WireE2eIdentity>}
1445
+ */
1446
+ new_acme_enrollment(ciphersuite) {
1447
+ const ret = wasm$1.corecrypto_new_acme_enrollment(this.ptr, ciphersuite);
1448
+ return takeObject(ret);
1449
+ }
1236
1450
  }
1237
1451
  /**
1238
1452
  * see [core_crypto::prelude::CoreCryptoCallbacks]
@@ -1469,6 +1683,130 @@ class MemberAddedMessages {
1469
1683
  }
1470
1684
  }
1471
1685
  /**
1686
+ * See [core_crypto::e2e_identity::types::E2eiNewAcmeAuthz]
1687
+ */
1688
+ class NewAcmeAuthz {
1689
+
1690
+ static __wrap(ptr) {
1691
+ const obj = Object.create(NewAcmeAuthz.prototype);
1692
+ obj.ptr = ptr;
1693
+
1694
+ return obj;
1695
+ }
1696
+
1697
+ __destroy_into_raw() {
1698
+ const ptr = this.ptr;
1699
+ this.ptr = 0;
1700
+
1701
+ return ptr;
1702
+ }
1703
+
1704
+ free() {
1705
+ const ptr = this.__destroy_into_raw();
1706
+ wasm$1.__wbg_newacmeauthz_free(ptr);
1707
+ }
1708
+ /**
1709
+ * @param {string} identifier
1710
+ * @param {AcmeChallenge | undefined} wire_http_challenge
1711
+ * @param {AcmeChallenge | undefined} wire_oidc_challenge
1712
+ */
1713
+ constructor(identifier, wire_http_challenge, wire_oidc_challenge) {
1714
+ const ptr0 = passStringToWasm0(identifier, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1715
+ const len0 = WASM_VECTOR_LEN;
1716
+ let ptr1 = 0;
1717
+ if (!isLikeNone(wire_http_challenge)) {
1718
+ _assertClass(wire_http_challenge, AcmeChallenge);
1719
+ ptr1 = wire_http_challenge.ptr;
1720
+ wire_http_challenge.ptr = 0;
1721
+ }
1722
+ let ptr2 = 0;
1723
+ if (!isLikeNone(wire_oidc_challenge)) {
1724
+ _assertClass(wire_oidc_challenge, AcmeChallenge);
1725
+ ptr2 = wire_oidc_challenge.ptr;
1726
+ wire_oidc_challenge.ptr = 0;
1727
+ }
1728
+ const ret = wasm$1.newacmeauthz_new(ptr0, len0, ptr1, ptr2);
1729
+ return NewAcmeAuthz.__wrap(ret);
1730
+ }
1731
+ /**
1732
+ * @returns {string}
1733
+ */
1734
+ get identifier() {
1735
+ try {
1736
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1737
+ wasm$1.acmedirectory_new_nonce(retptr, this.ptr);
1738
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1739
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1740
+ return getStringFromWasm0(r0, r1);
1741
+ } finally {
1742
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
1743
+ wasm$1.__wbindgen_free(r0, r1);
1744
+ }
1745
+ }
1746
+ /**
1747
+ * @returns {AcmeChallenge | undefined}
1748
+ */
1749
+ get wire_http_challenge() {
1750
+ const ret = wasm$1.newacmeauthz_wire_http_challenge(this.ptr);
1751
+ return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
1752
+ }
1753
+ /**
1754
+ * @returns {AcmeChallenge | undefined}
1755
+ */
1756
+ get wire_oidc_challenge() {
1757
+ const ret = wasm$1.newacmeauthz_wire_oidc_challenge(this.ptr);
1758
+ return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
1759
+ }
1760
+ }
1761
+ /**
1762
+ * See [core_crypto::e2e_identity::types::E2eiNewAcmeOrder]
1763
+ */
1764
+ class NewAcmeOrder {
1765
+
1766
+ static __wrap(ptr) {
1767
+ const obj = Object.create(NewAcmeOrder.prototype);
1768
+ obj.ptr = ptr;
1769
+
1770
+ return obj;
1771
+ }
1772
+
1773
+ __destroy_into_raw() {
1774
+ const ptr = this.ptr;
1775
+ this.ptr = 0;
1776
+
1777
+ return ptr;
1778
+ }
1779
+
1780
+ free() {
1781
+ const ptr = this.__destroy_into_raw();
1782
+ wasm$1.__wbg_newacmeorder_free(ptr);
1783
+ }
1784
+ /**
1785
+ * @param {Uint8Array} delegate
1786
+ * @param {(Uint8Array)[]} authorizations
1787
+ */
1788
+ constructor(delegate, authorizations) {
1789
+ const ptr0 = passArrayJsValueToWasm0(authorizations, wasm$1.__wbindgen_malloc);
1790
+ const len0 = WASM_VECTOR_LEN;
1791
+ const ret = wasm$1.newacmeorder_new(addHeapObject(delegate), ptr0, len0);
1792
+ return NewAcmeOrder.__wrap(ret);
1793
+ }
1794
+ /**
1795
+ * @returns {Uint8Array}
1796
+ */
1797
+ get delegate() {
1798
+ const ret = wasm$1.acmechallenge_delegate(this.ptr);
1799
+ return takeObject(ret);
1800
+ }
1801
+ /**
1802
+ * @returns {Array<any>}
1803
+ */
1804
+ get authorizations() {
1805
+ const ret = wasm$1.newacmeorder_authorizations(this.ptr);
1806
+ return takeObject(ret);
1807
+ }
1808
+ }
1809
+ /**
1472
1810
  */
1473
1811
  class ProposalBundle {
1474
1812
 
@@ -1493,60 +1831,467 @@ class ProposalBundle {
1493
1831
  /**
1494
1832
  * @returns {Uint8Array}
1495
1833
  */
1496
- get proposal() {
1497
- const ret = wasm$1.commitbundle_commit(this.ptr);
1498
- return takeObject(ret);
1834
+ get proposal() {
1835
+ const ret = wasm$1.commitbundle_commit(this.ptr);
1836
+ return takeObject(ret);
1837
+ }
1838
+ /**
1839
+ * @returns {Uint8Array}
1840
+ */
1841
+ get proposal_ref() {
1842
+ const ret = wasm$1.conversationinitbundle_commit(this.ptr);
1843
+ return takeObject(ret);
1844
+ }
1845
+ }
1846
+ /**
1847
+ */
1848
+ class PublicGroupStateBundle {
1849
+
1850
+ static __wrap(ptr) {
1851
+ const obj = Object.create(PublicGroupStateBundle.prototype);
1852
+ obj.ptr = ptr;
1853
+
1854
+ return obj;
1855
+ }
1856
+
1857
+ __destroy_into_raw() {
1858
+ const ptr = this.ptr;
1859
+ this.ptr = 0;
1860
+
1861
+ return ptr;
1862
+ }
1863
+
1864
+ free() {
1865
+ const ptr = this.__destroy_into_raw();
1866
+ wasm$1.__wbg_publicgroupstatebundle_free(ptr);
1867
+ }
1868
+ /**
1869
+ * @returns {number}
1870
+ */
1871
+ get encryption_type() {
1872
+ const ret = wasm$1.publicgroupstatebundle_encryption_type(this.ptr);
1873
+ return ret;
1874
+ }
1875
+ /**
1876
+ * @returns {number}
1877
+ */
1878
+ get ratchet_tree_type() {
1879
+ const ret = wasm$1.publicgroupstatebundle_ratchet_tree_type(this.ptr);
1880
+ return ret;
1881
+ }
1882
+ /**
1883
+ * @returns {Uint8Array}
1884
+ */
1885
+ get payload() {
1886
+ const ret = wasm$1.commitbundle_commit(this.ptr);
1887
+ return takeObject(ret);
1888
+ }
1889
+ }
1890
+ /**
1891
+ */
1892
+ class WireE2eIdentity$1 {
1893
+
1894
+ static __wrap(ptr) {
1895
+ const obj = Object.create(WireE2eIdentity$1.prototype);
1896
+ obj.ptr = ptr;
1897
+
1898
+ return obj;
1899
+ }
1900
+
1901
+ __destroy_into_raw() {
1902
+ const ptr = this.ptr;
1903
+ this.ptr = 0;
1904
+
1905
+ return ptr;
1906
+ }
1907
+
1908
+ free() {
1909
+ const ptr = this.__destroy_into_raw();
1910
+ wasm$1.__wbg_wiree2eidentity_free(ptr);
1911
+ }
1912
+ /**
1913
+ * See [core_crypto::e2e_identity::WireE2eIdentity::directory_response]
1914
+ * @param {Uint8Array} directory
1915
+ * @returns {any}
1916
+ */
1917
+ directory_response(directory) {
1918
+ try {
1919
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1920
+ const ptr0 = passArray8ToWasm0(directory, wasm$1.__wbindgen_malloc);
1921
+ const len0 = WASM_VECTOR_LEN;
1922
+ wasm$1.wiree2eidentity_directory_response(retptr, this.ptr, ptr0, len0);
1923
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1924
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1925
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1926
+ if (r2) {
1927
+ throw takeObject(r1);
1928
+ }
1929
+ return takeObject(r0);
1930
+ } finally {
1931
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
1932
+ }
1933
+ }
1934
+ /**
1935
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_request]
1936
+ * @param {any} directory
1937
+ * @param {string} previous_nonce
1938
+ * @returns {Uint8Array}
1939
+ */
1940
+ new_account_request(directory, previous_nonce) {
1941
+ try {
1942
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1943
+ const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1944
+ const len0 = WASM_VECTOR_LEN;
1945
+ wasm$1.wiree2eidentity_new_account_request(retptr, this.ptr, addHeapObject(directory), ptr0, len0);
1946
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1947
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1948
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1949
+ if (r2) {
1950
+ throw takeObject(r1);
1951
+ }
1952
+ return takeObject(r0);
1953
+ } finally {
1954
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
1955
+ }
1956
+ }
1957
+ /**
1958
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_response]
1959
+ * @param {Uint8Array} account
1960
+ * @returns {Uint8Array}
1961
+ */
1962
+ new_account_response(account) {
1963
+ try {
1964
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1965
+ wasm$1.wiree2eidentity_new_account_response(retptr, this.ptr, addHeapObject(account));
1966
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1967
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1968
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1969
+ if (r2) {
1970
+ throw takeObject(r1);
1971
+ }
1972
+ return takeObject(r0);
1973
+ } finally {
1974
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
1975
+ }
1976
+ }
1977
+ /**
1978
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
1979
+ * @param {string} handle
1980
+ * @param {string} client_id
1981
+ * @param {number} expiry_days
1982
+ * @param {any} directory
1983
+ * @param {Uint8Array} account
1984
+ * @param {string} previous_nonce
1985
+ * @returns {Uint8Array}
1986
+ */
1987
+ new_order_request(handle, client_id, expiry_days, directory, account, previous_nonce) {
1988
+ try {
1989
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1990
+ const ptr0 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1991
+ const len0 = WASM_VECTOR_LEN;
1992
+ const ptr1 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1993
+ const len1 = WASM_VECTOR_LEN;
1994
+ const ptr2 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1995
+ const len2 = WASM_VECTOR_LEN;
1996
+ wasm$1.wiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, expiry_days, addHeapObject(directory), addHeapObject(account), ptr2, len2);
1997
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1998
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1999
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2000
+ if (r2) {
2001
+ throw takeObject(r1);
2002
+ }
2003
+ return takeObject(r0);
2004
+ } finally {
2005
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2006
+ }
2007
+ }
2008
+ /**
2009
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_response]
2010
+ * @param {Uint8Array} order
2011
+ * @returns {any}
2012
+ */
2013
+ new_order_response(order) {
2014
+ try {
2015
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2016
+ wasm$1.wiree2eidentity_new_order_response(retptr, this.ptr, addHeapObject(order));
2017
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2018
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2019
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2020
+ if (r2) {
2021
+ throw takeObject(r1);
2022
+ }
2023
+ return takeObject(r0);
2024
+ } finally {
2025
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2026
+ }
2027
+ }
2028
+ /**
2029
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_request]
2030
+ * @param {string} url
2031
+ * @param {Uint8Array} account
2032
+ * @param {string} previous_nonce
2033
+ * @returns {Uint8Array}
2034
+ */
2035
+ new_authz_request(url, account, previous_nonce) {
2036
+ try {
2037
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2038
+ const ptr0 = passStringToWasm0(url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2039
+ const len0 = WASM_VECTOR_LEN;
2040
+ const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2041
+ const len1 = WASM_VECTOR_LEN;
2042
+ wasm$1.wiree2eidentity_new_authz_request(retptr, this.ptr, ptr0, len0, addHeapObject(account), ptr1, len1);
2043
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2044
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2045
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2046
+ if (r2) {
2047
+ throw takeObject(r1);
2048
+ }
2049
+ return takeObject(r0);
2050
+ } finally {
2051
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2052
+ }
2053
+ }
2054
+ /**
2055
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_response]
2056
+ * @param {Uint8Array} authz
2057
+ * @returns {any}
2058
+ */
2059
+ new_authz_response(authz) {
2060
+ try {
2061
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2062
+ wasm$1.wiree2eidentity_new_authz_response(retptr, this.ptr, addHeapObject(authz));
2063
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2064
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2065
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2066
+ if (r2) {
2067
+ throw takeObject(r1);
2068
+ }
2069
+ return takeObject(r0);
2070
+ } finally {
2071
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2072
+ }
2073
+ }
2074
+ /**
2075
+ * See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
2076
+ * @param {string} access_token_url
2077
+ * @param {string} user_id
2078
+ * @param {bigint} client_id
2079
+ * @param {string} domain
2080
+ * @param {any} client_id_challenge
2081
+ * @param {string} backend_nonce
2082
+ * @param {number} expiry_days
2083
+ * @returns {string}
2084
+ */
2085
+ create_dpop_token(access_token_url, user_id, client_id, domain, client_id_challenge, backend_nonce, expiry_days) {
2086
+ try {
2087
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2088
+ const ptr0 = passStringToWasm0(access_token_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2089
+ const len0 = WASM_VECTOR_LEN;
2090
+ const ptr1 = passStringToWasm0(user_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2091
+ const len1 = WASM_VECTOR_LEN;
2092
+ const ptr2 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2093
+ const len2 = WASM_VECTOR_LEN;
2094
+ const ptr3 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2095
+ const len3 = WASM_VECTOR_LEN;
2096
+ wasm$1.wiree2eidentity_create_dpop_token(retptr, this.ptr, ptr0, len0, ptr1, len1, client_id, ptr2, len2, addHeapObject(client_id_challenge), ptr3, len3, expiry_days);
2097
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2098
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2099
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2100
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
2101
+ var ptr4 = r0;
2102
+ var len4 = r1;
2103
+ if (r3) {
2104
+ ptr4 = 0; len4 = 0;
2105
+ throw takeObject(r2);
2106
+ }
2107
+ return getStringFromWasm0(ptr4, len4);
2108
+ } finally {
2109
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2110
+ wasm$1.__wbindgen_free(ptr4, len4);
2111
+ }
2112
+ }
2113
+ /**
2114
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_challenge_request]
2115
+ * @param {any} handle_challenge
2116
+ * @param {Uint8Array} account
2117
+ * @param {string} previous_nonce
2118
+ * @returns {Uint8Array}
2119
+ */
2120
+ new_challenge_request(handle_challenge, account, previous_nonce) {
2121
+ try {
2122
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2123
+ const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2124
+ const len0 = WASM_VECTOR_LEN;
2125
+ wasm$1.wiree2eidentity_new_challenge_request(retptr, this.ptr, addHeapObject(handle_challenge), addHeapObject(account), ptr0, len0);
2126
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2127
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2128
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2129
+ if (r2) {
2130
+ throw takeObject(r1);
2131
+ }
2132
+ return takeObject(r0);
2133
+ } finally {
2134
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2135
+ }
2136
+ }
2137
+ /**
2138
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_challenge_response]
2139
+ * @param {Uint8Array} challenge
2140
+ */
2141
+ new_challenge_response(challenge) {
2142
+ try {
2143
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2144
+ wasm$1.wiree2eidentity_new_challenge_response(retptr, this.ptr, addHeapObject(challenge));
2145
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2146
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2147
+ if (r1) {
2148
+ throw takeObject(r0);
2149
+ }
2150
+ } finally {
2151
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2152
+ }
2153
+ }
2154
+ /**
2155
+ * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_request]
2156
+ * @param {string} order_url
2157
+ * @param {Uint8Array} account
2158
+ * @param {string} previous_nonce
2159
+ * @returns {Uint8Array}
2160
+ */
2161
+ check_order_request(order_url, account, previous_nonce) {
2162
+ try {
2163
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2164
+ const ptr0 = passStringToWasm0(order_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2165
+ const len0 = WASM_VECTOR_LEN;
2166
+ const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2167
+ const len1 = WASM_VECTOR_LEN;
2168
+ wasm$1.wiree2eidentity_check_order_request(retptr, this.ptr, ptr0, len0, addHeapObject(account), ptr1, len1);
2169
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2170
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2171
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2172
+ if (r2) {
2173
+ throw takeObject(r1);
2174
+ }
2175
+ return takeObject(r0);
2176
+ } finally {
2177
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2178
+ }
2179
+ }
2180
+ /**
2181
+ * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_response]
2182
+ * @param {Uint8Array} order
2183
+ * @returns {Uint8Array}
2184
+ */
2185
+ check_order_response(order) {
2186
+ try {
2187
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2188
+ wasm$1.wiree2eidentity_check_order_response(retptr, this.ptr, addHeapObject(order));
2189
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2190
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2191
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2192
+ if (r2) {
2193
+ throw takeObject(r1);
2194
+ }
2195
+ return takeObject(r0);
2196
+ } finally {
2197
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2198
+ }
1499
2199
  }
1500
2200
  /**
2201
+ * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_request]
2202
+ * @param {(Uint8Array)[]} domains
2203
+ * @param {Uint8Array} order
2204
+ * @param {Uint8Array} account
2205
+ * @param {string} previous_nonce
1501
2206
  * @returns {Uint8Array}
1502
2207
  */
1503
- get proposal_ref() {
1504
- const ret = wasm$1.conversationinitbundle_commit(this.ptr);
1505
- return takeObject(ret);
1506
- }
1507
- }
1508
- /**
1509
- */
1510
- class PublicGroupStateBundle {
1511
-
1512
- static __wrap(ptr) {
1513
- const obj = Object.create(PublicGroupStateBundle.prototype);
1514
- obj.ptr = ptr;
1515
-
1516
- return obj;
1517
- }
1518
-
1519
- __destroy_into_raw() {
1520
- const ptr = this.ptr;
1521
- this.ptr = 0;
1522
-
1523
- return ptr;
1524
- }
1525
-
1526
- free() {
1527
- const ptr = this.__destroy_into_raw();
1528
- wasm$1.__wbg_publicgroupstatebundle_free(ptr);
2208
+ finalize_request(domains, order, account, previous_nonce) {
2209
+ try {
2210
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2211
+ const ptr0 = passArrayJsValueToWasm0(domains, wasm$1.__wbindgen_malloc);
2212
+ const len0 = WASM_VECTOR_LEN;
2213
+ const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2214
+ const len1 = WASM_VECTOR_LEN;
2215
+ wasm$1.wiree2eidentity_finalize_request(retptr, this.ptr, ptr0, len0, addHeapObject(order), addHeapObject(account), ptr1, len1);
2216
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2217
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2218
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2219
+ if (r2) {
2220
+ throw takeObject(r1);
2221
+ }
2222
+ return takeObject(r0);
2223
+ } finally {
2224
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2225
+ }
1529
2226
  }
1530
2227
  /**
1531
- * @returns {number}
2228
+ * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_response]
2229
+ * @param {Uint8Array} finalize
2230
+ * @returns {any}
1532
2231
  */
1533
- get encryption_type() {
1534
- const ret = wasm$1.publicgroupstatebundle_encryption_type(this.ptr);
1535
- return ret;
2232
+ finalize_response(finalize) {
2233
+ try {
2234
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2235
+ wasm$1.wiree2eidentity_finalize_response(retptr, this.ptr, addHeapObject(finalize));
2236
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2237
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2238
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2239
+ if (r2) {
2240
+ throw takeObject(r1);
2241
+ }
2242
+ return takeObject(r0);
2243
+ } finally {
2244
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2245
+ }
1536
2246
  }
1537
2247
  /**
1538
- * @returns {number}
2248
+ * See [core_crypto::e2e_identity::WireE2eIdentity::certificate_request]
2249
+ * @param {any} finalize
2250
+ * @param {Uint8Array} account
2251
+ * @param {string} previous_nonce
2252
+ * @returns {Uint8Array}
1539
2253
  */
1540
- get ratchet_tree_type() {
1541
- const ret = wasm$1.publicgroupstatebundle_ratchet_tree_type(this.ptr);
1542
- return ret;
2254
+ certificate_request(finalize, account, previous_nonce) {
2255
+ try {
2256
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2257
+ const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2258
+ const len0 = WASM_VECTOR_LEN;
2259
+ wasm$1.wiree2eidentity_certificate_request(retptr, this.ptr, addHeapObject(finalize), addHeapObject(account), ptr0, len0);
2260
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2261
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2262
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2263
+ if (r2) {
2264
+ throw takeObject(r1);
2265
+ }
2266
+ return takeObject(r0);
2267
+ } finally {
2268
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2269
+ }
1543
2270
  }
1544
2271
  /**
1545
- * @returns {Uint8Array}
2272
+ * See [core_crypto::e2e_identity::WireE2eIdentity::certificate_response]
2273
+ * @param {string} certificate_chain
2274
+ * @returns {(Uint8Array)[]}
1546
2275
  */
1547
- get payload() {
1548
- const ret = wasm$1.commitbundle_commit(this.ptr);
1549
- return takeObject(ret);
2276
+ certificate_response(certificate_chain) {
2277
+ try {
2278
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2279
+ const ptr0 = passStringToWasm0(certificate_chain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2280
+ const len0 = WASM_VECTOR_LEN;
2281
+ wasm$1.wiree2eidentity_certificate_response(retptr, this.ptr, ptr0, len0);
2282
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2283
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2284
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2285
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
2286
+ if (r3) {
2287
+ throw takeObject(r2);
2288
+ }
2289
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2290
+ wasm$1.__wbindgen_free(r0, r1 * 4);
2291
+ return v1;
2292
+ } finally {
2293
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2294
+ }
1550
2295
  }
1551
2296
  }
1552
2297
 
@@ -1701,6 +2446,10 @@ function getImports() {
1701
2446
  const ret = CoreCrypto$1.__wrap(arg0);
1702
2447
  return addHeapObject(ret);
1703
2448
  };
2449
+ imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
2450
+ const ret = new Object();
2451
+ return addHeapObject(ret);
2452
+ };
1704
2453
  imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
1705
2454
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1706
2455
  };
@@ -1708,8 +2457,8 @@ function getImports() {
1708
2457
  const ret = arg0;
1709
2458
  return addHeapObject(ret);
1710
2459
  };
1711
- imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
1712
- const ret = new Object();
2460
+ imports.wbg.__wbg_wiree2eidentity_new = function(arg0) {
2461
+ const ret = WireE2eIdentity$1.__wrap(arg0);
1713
2462
  return addHeapObject(ret);
1714
2463
  };
1715
2464
  imports.wbg.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
@@ -1727,7 +2476,7 @@ function getImports() {
1727
2476
  const a = state0.a;
1728
2477
  state0.a = 0;
1729
2478
  try {
1730
- return __wbg_adapter_220(a, state0.b, arg0, arg1);
2479
+ return __wbg_adapter_260(a, state0.b, arg0, arg1);
1731
2480
  } finally {
1732
2481
  state0.a = a;
1733
2482
  }
@@ -1742,9 +2491,6 @@ function getImports() {
1742
2491
  const ret = new Array();
1743
2492
  return addHeapObject(ret);
1744
2493
  };
1745
- imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
1746
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1747
- };
1748
2494
  imports.wbg.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
1749
2495
  const ret = getObject(arg0).push(getObject(arg1));
1750
2496
  return ret;
@@ -1757,6 +2503,9 @@ function getImports() {
1757
2503
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1758
2504
  return addHeapObject(ret);
1759
2505
  };
2506
+ imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
2507
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2508
+ };
1760
2509
  imports.wbg.__wbg_call_3999bee59e9f7719 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1761
2510
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1762
2511
  return addHeapObject(ret);
@@ -1773,6 +2522,14 @@ function getImports() {
1773
2522
  const ret = ProposalBundle.__wrap(arg0);
1774
2523
  return addHeapObject(ret);
1775
2524
  };
2525
+ imports.wbg.__wbg_now_4d4a1d65c7a8c0ba = function() {
2526
+ const ret = Date.now();
2527
+ return ret;
2528
+ };
2529
+ imports.wbg.__wbg_now_78244d2ced74c026 = function() {
2530
+ const ret = performance.now();
2531
+ return ret;
2532
+ };
1776
2533
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
1777
2534
  const ret = new Error();
1778
2535
  return addHeapObject(ret);
@@ -1824,25 +2581,22 @@ function getImports() {
1824
2581
  const ret = false;
1825
2582
  return ret;
1826
2583
  };
1827
- imports.wbg.__wbg_open_a31c3fe1fdc244eb = function() { return handleError(function (arg0, arg1, arg2) {
1828
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
2584
+ imports.wbg.__wbg_openCursor_e036069f0e326708 = function() { return handleError(function (arg0, arg1) {
2585
+ const ret = getObject(arg0).openCursor(getObject(arg1));
1829
2586
  return addHeapObject(ret);
1830
2587
  }, arguments) };
1831
- imports.wbg.__wbg_open_c5d5fb2df44b9d10 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1832
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2588
+ imports.wbg.__wbg_openCursor_f055654a98eeab7f = function() { return handleError(function (arg0) {
2589
+ const ret = getObject(arg0).openCursor();
1833
2590
  return addHeapObject(ret);
1834
2591
  }, arguments) };
1835
- imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
1836
- getObject(arg0).onupgradeneeded = getObject(arg1);
1837
- };
1838
2592
  imports.wbg.__wbg_setonsuccess_5f71593bc51653a3 = function(arg0, arg1) {
1839
2593
  getObject(arg0).onsuccess = getObject(arg1);
1840
2594
  };
1841
2595
  imports.wbg.__wbg_setonerror_d5771cc5bf9ea74c = function(arg0, arg1) {
1842
2596
  getObject(arg0).onerror = getObject(arg1);
1843
2597
  };
1844
- imports.wbg.__wbg_delete_8abedd1043b4105d = function() { return handleError(function (arg0, arg1) {
1845
- const ret = getObject(arg0).delete(getObject(arg1));
2598
+ imports.wbg.__wbg_get_6285bf458a1ee758 = function() { return handleError(function (arg0, arg1) {
2599
+ const ret = getObject(arg0).get(getObject(arg1));
1846
2600
  return addHeapObject(ret);
1847
2601
  }, arguments) };
1848
2602
  imports.wbg.__wbg_count_b0e88953a0ea909c = function() { return handleError(function (arg0) {
@@ -1853,8 +2607,8 @@ function getImports() {
1853
2607
  const ret = getObject(arg0).count(getObject(arg1));
1854
2608
  return addHeapObject(ret);
1855
2609
  }, arguments) };
1856
- imports.wbg.__wbg_get_6285bf458a1ee758 = function() { return handleError(function (arg0, arg1) {
1857
- const ret = getObject(arg0).get(getObject(arg1));
2610
+ imports.wbg.__wbg_delete_8abedd1043b4105d = function() { return handleError(function (arg0, arg1) {
2611
+ const ret = getObject(arg0).delete(getObject(arg1));
1858
2612
  return addHeapObject(ret);
1859
2613
  }, arguments) };
1860
2614
  imports.wbg.__wbg_put_84e7fc93eee27b28 = function() { return handleError(function (arg0, arg1, arg2) {
@@ -1865,14 +2619,17 @@ function getImports() {
1865
2619
  const ret = getObject(arg0).put(getObject(arg1));
1866
2620
  return addHeapObject(ret);
1867
2621
  }, arguments) };
1868
- imports.wbg.__wbg_openCursor_e036069f0e326708 = function() { return handleError(function (arg0, arg1) {
1869
- const ret = getObject(arg0).openCursor(getObject(arg1));
2622
+ imports.wbg.__wbg_open_a31c3fe1fdc244eb = function() { return handleError(function (arg0, arg1, arg2) {
2623
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
1870
2624
  return addHeapObject(ret);
1871
2625
  }, arguments) };
1872
- imports.wbg.__wbg_openCursor_f055654a98eeab7f = function() { return handleError(function (arg0) {
1873
- const ret = getObject(arg0).openCursor();
2626
+ imports.wbg.__wbg_open_c5d5fb2df44b9d10 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2627
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1874
2628
  return addHeapObject(ret);
1875
2629
  }, arguments) };
2630
+ imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
2631
+ getObject(arg0).onupgradeneeded = getObject(arg1);
2632
+ };
1876
2633
  imports.wbg.__wbg_index_86861edf1478f49c = function() { return handleError(function (arg0, arg1, arg2) {
1877
2634
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
1878
2635
  return addHeapObject(ret);
@@ -2021,10 +2778,6 @@ function getImports() {
2021
2778
  const ret = getObject(arg0).result;
2022
2779
  return addHeapObject(ret);
2023
2780
  }, arguments) };
2024
- imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
2025
- const ret = getObject(arg0).error;
2026
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2027
- }, arguments) };
2028
2781
  imports.wbg.__wbg_contains_6cf516181cd86571 = function(arg0, arg1, arg2) {
2029
2782
  const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2030
2783
  return ret;
@@ -2051,6 +2804,10 @@ function getImports() {
2051
2804
  imports.wbg.__wbg_deleteObjectStore_1b698c5fd1bc077d = function() { return handleError(function (arg0, arg1, arg2) {
2052
2805
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2053
2806
  }, arguments) };
2807
+ imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
2808
+ const ret = getObject(arg0).error;
2809
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2810
+ }, arguments) };
2054
2811
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2055
2812
  const ret = !getObject(arg0);
2056
2813
  return ret;
@@ -2076,6 +2833,24 @@ function getImports() {
2076
2833
  const ret = getObject(arg0).toString();
2077
2834
  return addHeapObject(ret);
2078
2835
  };
2836
+ imports.wbg.__wbg_instanceof_Window_acc97ff9f5d2c7b4 = function(arg0) {
2837
+ let result;
2838
+ try {
2839
+ result = getObject(arg0) instanceof Window;
2840
+ } catch {
2841
+ result = false;
2842
+ }
2843
+ const ret = result;
2844
+ return ret;
2845
+ };
2846
+ imports.wbg.__wbg_crypto_9f07beb1e97bfa1b = function() { return handleError(function (arg0) {
2847
+ const ret = getObject(arg0).crypto;
2848
+ return addHeapObject(ret);
2849
+ }, arguments) };
2850
+ imports.wbg.__wbg_getRandomValues_f134f772d240c51f = function() { return handleError(function (arg0, arg1, arg2) {
2851
+ const ret = getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
2852
+ return addHeapObject(ret);
2853
+ }, arguments) };
2079
2854
  imports.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003 = function(arg0) {
2080
2855
  let result;
2081
2856
  try {
@@ -2151,12 +2926,12 @@ function getImports() {
2151
2926
  const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2152
2927
  return addHeapObject(ret);
2153
2928
  }, arguments) };
2154
- imports.wbg.__wbindgen_closure_wrapper2373 = function(arg0, arg1, arg2) {
2155
- const ret = makeMutClosure(arg0, arg1, 122, __wbg_adapter_52);
2929
+ imports.wbg.__wbindgen_closure_wrapper2639 = function(arg0, arg1, arg2) {
2930
+ const ret = makeMutClosure(arg0, arg1, 142, __wbg_adapter_52);
2156
2931
  return addHeapObject(ret);
2157
2932
  };
2158
- imports.wbg.__wbindgen_closure_wrapper3847 = function(arg0, arg1, arg2) {
2159
- const ret = makeMutClosure(arg0, arg1, 122, __wbg_adapter_55);
2933
+ imports.wbg.__wbindgen_closure_wrapper4541 = function(arg0, arg1, arg2) {
2934
+ const ret = makeMutClosure(arg0, arg1, 142, __wbg_adapter_55);
2160
2935
  return addHeapObject(ret);
2161
2936
  };
2162
2937
 
@@ -2189,9 +2964,7 @@ function initSync(module) {
2189
2964
  }
2190
2965
 
2191
2966
  async function init(input) {
2192
- if (typeof input === 'undefined') {
2193
- input = new URL('index_bg.wasm', import.meta.url);
2194
- }
2967
+
2195
2968
  const imports = getImports();
2196
2969
 
2197
2970
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
@@ -2208,6 +2981,9 @@ var exports = /*#__PURE__*/Object.freeze({
2208
2981
  version: version,
2209
2982
  WirePolicy: WirePolicy$1,
2210
2983
  Ciphersuite: Ciphersuite$1,
2984
+ AcmeChallenge: AcmeChallenge,
2985
+ AcmeDirectory: AcmeDirectory,
2986
+ AcmeFinalize: AcmeFinalize,
2211
2987
  CommitBundle: CommitBundle,
2212
2988
  ConversationConfiguration: ConversationConfiguration,
2213
2989
  ConversationInitBundle: ConversationInitBundle,
@@ -2217,8 +2993,11 @@ var exports = /*#__PURE__*/Object.freeze({
2217
2993
  DecryptedMessage: DecryptedMessage,
2218
2994
  Invitee: Invitee,
2219
2995
  MemberAddedMessages: MemberAddedMessages,
2996
+ NewAcmeAuthz: NewAcmeAuthz,
2997
+ NewAcmeOrder: NewAcmeOrder,
2220
2998
  ProposalBundle: ProposalBundle,
2221
2999
  PublicGroupStateBundle: PublicGroupStateBundle,
3000
+ WireE2eIdentity: WireE2eIdentity$1,
2222
3001
  initSync: initSync,
2223
3002
  'default': init
2224
3003
  });
@@ -2226,7 +3005,7 @@ var exports = /*#__PURE__*/Object.freeze({
2226
3005
  var wasm = async (opt = {}) => {
2227
3006
  let {importHook, serverPath} = opt;
2228
3007
 
2229
- let path = "assets/core_crypto_ffi-69d2b02f.wasm";
3008
+ let path = "assets/core_crypto_ffi-7a5675cc.wasm";
2230
3009
 
2231
3010
  if (serverPath != null) {
2232
3011
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -2242,39 +3021,39 @@ var wasm = async (opt = {}) => {
2242
3021
 
2243
3022
  // Wire
2244
3023
  // Copyright (C) 2022 Wire Swiss GmbH
2245
- var _a, _CoreCrypto_module, _CoreCrypto_cc;
3024
+ var _a, _CoreCrypto_module, _CoreCrypto_cc, _b, _WireE2eIdentity_module, _WireE2eIdentity_e2ei;
2246
3025
  /**
2247
- * see [core_crypto::prelude::CiphersuiteName]
2248
- */
3026
+ * see [core_crypto::prelude::CiphersuiteName]
3027
+ */
2249
3028
  var Ciphersuite;
2250
3029
  (function (Ciphersuite) {
2251
3030
  /**
2252
- * DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
2253
- */
3031
+ * DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
3032
+ */
2254
3033
  Ciphersuite[Ciphersuite["MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519"] = 1] = "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519";
2255
3034
  /**
2256
- * DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256
2257
- */
3035
+ * DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256
3036
+ */
2258
3037
  Ciphersuite[Ciphersuite["MLS_128_DHKEMP256_AES128GCM_SHA256_P256"] = 2] = "MLS_128_DHKEMP256_AES128GCM_SHA256_P256";
2259
3038
  /**
2260
- * DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
2261
- */
3039
+ * DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
3040
+ */
2262
3041
  Ciphersuite[Ciphersuite["MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519"] = 3] = "MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519";
2263
3042
  /**
2264
- * DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
2265
- */
3043
+ * DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
3044
+ */
2266
3045
  Ciphersuite[Ciphersuite["MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448"] = 4] = "MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448";
2267
3046
  /**
2268
- * DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521
2269
- */
3047
+ * DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521
3048
+ */
2270
3049
  Ciphersuite[Ciphersuite["MLS_256_DHKEMP521_AES256GCM_SHA512_P521"] = 5] = "MLS_256_DHKEMP521_AES256GCM_SHA512_P521";
2271
3050
  /**
2272
- * DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
2273
- */
3051
+ * DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
3052
+ */
2274
3053
  Ciphersuite[Ciphersuite["MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448"] = 6] = "MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448";
2275
3054
  /**
2276
- * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
2277
- */
3055
+ * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
3056
+ */
2278
3057
  Ciphersuite[Ciphersuite["MLS_256_DHKEMP384_AES256GCM_SHA384_P384"] = 7] = "MLS_256_DHKEMP384_AES256GCM_SHA384_P384";
2279
3058
  })(Ciphersuite || (Ciphersuite = {}));
2280
3059
  /**
@@ -2820,7 +3599,7 @@ class CoreCrypto {
2820
3599
  * **CAUTION**: only use this when you had an explicit response from the Delivery Service
2821
3600
  * e.g. 403. Do not use otherwise e.g. 5xx responses, timeout etc..
2822
3601
  * **DO NOT** use when Delivery Service responds 409, pending state will be renewed
2823
- * in {@link CoreCrypto.decrypt_message}
3602
+ * in {@link CoreCrypto.decryptMessage}
2824
3603
  *
2825
3604
  * @param conversationId - The group's ID
2826
3605
  */
@@ -3006,7 +3785,7 @@ class CoreCrypto {
3006
3785
  *
3007
3786
  * @param prekey - the prekey bundle to get the fingerprint from
3008
3787
  * @returns Hex-encoded public key string
3009
- **/
3788
+ **/
3010
3789
  static proteusFingerprintPrekeybundle(prekey) {
3011
3790
  return __classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto.proteus_fingerprint_prekeybundle(prekey);
3012
3791
  }
@@ -3018,6 +3797,18 @@ class CoreCrypto {
3018
3797
  async proteusCryptoboxMigrate(storeName) {
3019
3798
  return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").proteus_cryptobox_migrate(storeName);
3020
3799
  }
3800
+ /**
3801
+ * Creates an enrollment instance with private key material you can use in order to fetch
3802
+ * a new x509 certificate from the acme server.
3803
+ * Make sure to call [WireE2eIdentity::free] (not yet available) to dispose this instance and its associated
3804
+ * keying material.
3805
+ *
3806
+ * @param ciphersuite - For generating signing key material. Only {@link Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519} is supported currently
3807
+ */
3808
+ async newAcmeEnrollment() {
3809
+ const e2ei = await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_acme_enrollment(Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519);
3810
+ return new WireE2eIdentity(e2ei, __classPrivateFieldGet(CoreCrypto, _a, "f", _CoreCrypto_module));
3811
+ }
3021
3812
  /**
3022
3813
  * Returns the current version of {@link CoreCrypto}
3023
3814
  *
@@ -3033,5 +3824,197 @@ class CoreCrypto {
3033
3824
  _a = CoreCrypto, _CoreCrypto_cc = new WeakMap();
3034
3825
  /** @hidden */
3035
3826
  _CoreCrypto_module = { value: void 0 };
3827
+ class WireE2eIdentity {
3828
+ /** @hidden */
3829
+ constructor(e2ei, module) {
3830
+ /** @hidden */
3831
+ _WireE2eIdentity_e2ei.set(this, void 0);
3832
+ __classPrivateFieldSet(this, _WireE2eIdentity_e2ei, e2ei, "f");
3833
+ if (!__classPrivateFieldGet(WireE2eIdentity, _b, "f", _WireE2eIdentity_module)) {
3834
+ __classPrivateFieldSet(WireE2eIdentity, _b, module, "f", _WireE2eIdentity_module);
3835
+ }
3836
+ }
3837
+ /**
3838
+ * Parses the response from `GET /acme/{provisioner-name}/directory`.
3839
+ * Use this {@link AcmeDirectory} in the next step to fetch the first nonce from the acme server. Use
3840
+ * {@link AcmeDirectory.newNonce}.
3841
+ *
3842
+ * @param directory HTTP response body
3843
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.1.1
3844
+ */
3845
+ directoryResponse(directory) {
3846
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").directory_response(directory);
3847
+ }
3848
+ /**
3849
+ * For creating a new acme account. This returns a signed JWS-alike request body to send to
3850
+ * `POST /acme/{provisioner-name}/new-account`.
3851
+ *
3852
+ * @param directory you got from {@link directoryResponse}
3853
+ * @param previousNonce you got from calling `HEAD {@link AcmeDirectory.newNonce}`
3854
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
3855
+ */
3856
+ newAccountRequest(directory, previousNonce) {
3857
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_account_request(directory, previousNonce);
3858
+ }
3859
+ /**
3860
+ * Parses the response from `POST /acme/{provisioner-name}/new-account`.
3861
+ * @param account HTTP response body
3862
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
3863
+ */
3864
+ newAccountResponse(account) {
3865
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_account_response(account);
3866
+ }
3867
+ /**
3868
+ * Creates a new acme order for the handle (userId + display name) and the clientId.
3869
+ *
3870
+ * @param handle domain of the authorization server e.g. `idp.example.org`
3871
+ * @param clientId domain of the wire-server e.g. `wire.example.org`
3872
+ * @param expiryDays generated x509 certificate expiry
3873
+ * @param directory you got from {@link directoryResponse}
3874
+ * @param account you got from {@link newAccountResponse}
3875
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
3876
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3877
+ */
3878
+ newOrderRequest(handle, clientId, expiryDays, directory, account, previousNonce) {
3879
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(handle, clientId, expiryDays, directory, account, previousNonce);
3880
+ }
3881
+ /**
3882
+ * Parses the response from `POST /acme/{provisioner-name}/new-order`.
3883
+ *
3884
+ * @param order HTTP response body
3885
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3886
+ */
3887
+ newOrderResponse(order) {
3888
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_response(order);
3889
+ }
3890
+ /**
3891
+ * Creates a new authorization request.
3892
+ *
3893
+ * @param url one of the URL in new order's authorizations (use {@link NewAcmeOrder.authorizations} from {@link newOrderResponse})
3894
+ * @param account you got from {@link newAccountResponse}
3895
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-order` (or from the
3896
+ * previous to this method if you are creating the second authorization)
3897
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
3898
+ */
3899
+ newAuthzRequest(url, account, previousNonce) {
3900
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_authz_request(url, account, previousNonce);
3901
+ }
3902
+ /**
3903
+ * Parses the response from `POST /acme/{provisioner-name}/authz/{authz-id}`
3904
+ *
3905
+ * You then have to map the challenge from this authorization object. The `client_id_challenge`
3906
+ * will be the one with the `client_id_host` (you supplied to {@link newOrderRequest}) identifier,
3907
+ * the other will be your `handle_challenge`.
3908
+ *
3909
+ * @param authz HTTP response body
3910
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
3911
+ */
3912
+ newAuthzResponse(authz) {
3913
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_authz_response(authz);
3914
+ }
3915
+ /**
3916
+ * Generates a new client Dpop JWT token. It demonstrates proof of possession of the nonces
3917
+ * (from wire-server & acme server) and will be verified by the acme server when verifying the
3918
+ * challenge (in order to deliver a certificate).
3919
+ *
3920
+ * Then send it to `POST /clients/{id}/access-token`
3921
+ * {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token} on wire-server.
3922
+ *
3923
+ * @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}
3924
+ * @param userId an UUIDv4 uniquely identifying the user
3925
+ * @param clientId client identifier
3926
+ * @param domain owning backend domain e.g. `wire.com`
3927
+ * @param clientIdChallenge you found after {@link newAuthzResponse}
3928
+ * @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}
3929
+ * @param expiryDays token expiry in days
3930
+ */
3931
+ createDpopToken(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays) {
3932
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays);
3933
+ }
3934
+ /**
3935
+ * Creates a new challenge request.
3936
+ *
3937
+ * @param handleChallenge you found after {@link newAuthzResponse}
3938
+ * @param account you found after {@link newAccountResponse}
3939
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
3940
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
3941
+ */
3942
+ newChallengeRequest(handleChallenge, account, previousNonce) {
3943
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_request(handleChallenge, account, previousNonce);
3944
+ }
3945
+ /**
3946
+ * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}`.
3947
+ *
3948
+ * @param challenge HTTP response body
3949
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
3950
+ */
3951
+ newChallengeResponse(challenge) {
3952
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_response(challenge);
3953
+ }
3954
+ /**
3955
+ * Verifies that the previous challenge has been completed.
3956
+ *
3957
+ * @param orderUrl `location` header from http response you got from {@link newOrderResponse}
3958
+ * @param account you found after {@link newAccountResponse}
3959
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/challenge/{challenge-id}`
3960
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3961
+ */
3962
+ checkOrderRequest(orderUrl, account, previousNonce) {
3963
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").check_order_request(orderUrl, account, previousNonce);
3964
+ }
3965
+ /**
3966
+ * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}`.
3967
+ *
3968
+ * @param order HTTP response body
3969
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3970
+ */
3971
+ checkOrderResponse(order) {
3972
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").check_order_response(order);
3973
+ }
3974
+ /**
3975
+ * Final step before fetching the certificate.
3976
+ *
3977
+ * @param domains you want to generate a certificate for e.g. `["wire.com"]`
3978
+ * @param order you got from {@link checkOrderResponse}
3979
+ * @param account you found after {@link newAccountResponse}
3980
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
3981
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3982
+ */
3983
+ finalizeRequest(domains, order, account, previousNonce) {
3984
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(domains, order, account, previousNonce);
3985
+ }
3986
+ /**
3987
+ * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}/finalize`.
3988
+ *
3989
+ * @param finalize HTTP response body
3990
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
3991
+ */
3992
+ finalizeResponse(finalize) {
3993
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_response(finalize);
3994
+ }
3995
+ /**
3996
+ * Creates a request for finally fetching the x509 certificate.
3997
+ *
3998
+ * @param finalize you got from {@link finalizeResponse}
3999
+ * @param account you got from {@link newAccountResponse}
4000
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}/finalize`
4001
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
4002
+ */
4003
+ certificateRequest(finalize, account, previousNonce) {
4004
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").certificate_request(finalize, account, previousNonce);
4005
+ }
4006
+ /**
4007
+ * Parses the response from `POST /acme/{provisioner-name}/certificate/{certificate-id}`.
4008
+ *
4009
+ * @param certificateChain HTTP string response body
4010
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
4011
+ */
4012
+ certificateResponse(certificateChain) {
4013
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").certificate_response(certificateChain);
4014
+ }
4015
+ }
4016
+ _b = WireE2eIdentity, _WireE2eIdentity_e2ei = new WeakMap();
4017
+ /** @hidden */
4018
+ _WireE2eIdentity_module = { value: void 0 };
3036
4019
 
3037
- export { Ciphersuite, CoreCrypto, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WirePolicy };
4020
+ export { Ciphersuite, CoreCrypto, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WireE2eIdentity, WirePolicy };