@wireapp/core-crypto 0.6.0-rc.8 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "0.6.0-rc.8",
3
+ "version": "0.6.0",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -950,15 +950,17 @@ export declare class WireE2eIdentity {
950
950
  /**
951
951
  * Creates a new acme order for the handle (userId + display name) and the clientId.
952
952
  *
953
- * @param handle domain of the authorization server e.g. `idp.example.org`
954
- * @param clientId domain of the wire-server e.g. `wire.example.org`
953
+ * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
954
+ * @param domain DNS name of owning backend e.g. `example.com`
955
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `impp:wireapp=NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ/6add501bacd1d90e@example.com`
956
+ * @param handle user handle e.g. `impp:wireapp=alice.smith.qa@example.com`
955
957
  * @param expiryDays generated x509 certificate expiry
956
958
  * @param directory you got from {@link directoryResponse}
957
959
  * @param account you got from {@link newAccountResponse}
958
960
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
959
961
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
960
962
  */
961
- newOrderRequest(handle: string, clientId: string, expiryDays: number, directory: AcmeDirectory, account: AcmeAccount, previousNonce: string): JsonRawData;
963
+ newOrderRequest(displayName: string, domain: string, clientId: string, handle: string, expiryDays: number, directory: AcmeDirectory, account: AcmeAccount, previousNonce: string): JsonRawData;
962
964
  /**
963
965
  * Parses the response from `POST /acme/{provisioner-name}/new-order`.
964
966
  *
@@ -1005,14 +1007,25 @@ export declare class WireE2eIdentity {
1005
1007
  */
1006
1008
  createDpopToken(accessTokenUrl: string, userId: string, clientId: bigint, domain: string, clientIdChallenge: AcmeChallenge, backendNonce: string, expiryDays: number): string;
1007
1009
  /**
1008
- * Creates a new challenge request.
1010
+ * Creates a new challenge request for Wire Dpop challenge.
1009
1011
  *
1010
- * @param handleChallenge you found after {@link newAuthzResponse}
1012
+ * @param accessToken returned by wire-server from https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token
1013
+ * @param dpopChallenge you found after {@link newAuthzResponse}
1011
1014
  * @param account you found after {@link newAccountResponse}
1012
1015
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
1013
1016
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1014
1017
  */
1015
- newChallengeRequest(handleChallenge: AcmeChallenge, account: AcmeAccount, previousNonce: string): JsonRawData;
1018
+ newDpopChallengeRequest(accessToken: string, dpopChallenge: AcmeChallenge, account: AcmeAccount, previousNonce: string): JsonRawData;
1019
+ /**
1020
+ * Creates a new challenge request for Wire Oidc challenge.
1021
+ *
1022
+ * @param idToken you get back from Identity Provider
1023
+ * @param oidcChallenge you found after {@link newAuthzResponse}
1024
+ * @param account you found after {@link newAccountResponse}
1025
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
1026
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1027
+ */
1028
+ newOidcChallengeRequest(idToken: string, oidcChallenge: AcmeChallenge, account: AcmeAccount, previousNonce: string): JsonRawData;
1016
1029
  /**
1017
1030
  * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}`.
1018
1031
  *
@@ -1039,13 +1052,12 @@ export declare class WireE2eIdentity {
1039
1052
  /**
1040
1053
  * Final step before fetching the certificate.
1041
1054
  *
1042
- * @param domains - domains you want to generate a certificate for e.g. `["wire.com"]`
1043
1055
  * @param order - order you got from {@link checkOrderResponse}
1044
1056
  * @param account - account you found after {@link newAccountResponse}
1045
1057
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
1046
1058
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1047
1059
  */
1048
- finalizeRequest(domains: string[], order: AcmeOrder, account: AcmeAccount, previousNonce: string): JsonRawData;
1060
+ finalizeRequest(order: AcmeOrder, account: AcmeAccount, previousNonce: string): JsonRawData;
1049
1061
  /**
1050
1062
  * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}/finalize`.
1051
1063
  *
@@ -228,7 +228,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
228
228
  function __wbg_adapter_52(arg0, arg1, arg2) {
229
229
  try {
230
230
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
231
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b669391a1ca469a(retptr, arg0, arg1, addHeapObject(arg2));
231
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h07d37b19e83c7ae3(retptr, arg0, arg1, addHeapObject(arg2));
232
232
  var r0 = getInt32Memory0()[retptr / 4 + 0];
233
233
  var r1 = getInt32Memory0()[retptr / 4 + 1];
234
234
  if (r1) {
@@ -240,7 +240,7 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
240
240
  }
241
241
  }
242
242
  function __wbg_adapter_55(arg0, arg1, arg2) {
243
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha3d8e2730fb8635e(arg0, arg1, addHeapObject(arg2));
243
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hde4447b48c9e13f3(arg0, arg1, addHeapObject(arg2));
244
244
  }
245
245
  function _assertClass(instance, klass) {
246
246
  if (!(instance instanceof klass)) {
@@ -290,8 +290,8 @@ function handleError(f, args) {
290
290
  function getArrayU8FromWasm0(ptr, len) {
291
291
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
292
292
  }
293
- function __wbg_adapter_271(arg0, arg1, arg2, arg3) {
294
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h191981cd1d6b08cc(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
293
+ function __wbg_adapter_268(arg0, arg1, arg2, arg3) {
294
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h1934ea7100a9edf0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
295
295
  }
296
296
  /**
297
297
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -1664,24 +1664,30 @@ class FfiWireE2EIdentity {
1664
1664
  }
1665
1665
  /**
1666
1666
  * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
1667
- * @param {string} handle
1667
+ * @param {string} display_name
1668
+ * @param {string} domain
1668
1669
  * @param {string} client_id
1670
+ * @param {string} handle
1669
1671
  * @param {number} expiry_days
1670
1672
  * @param {any} directory
1671
1673
  * @param {Uint8Array} account
1672
1674
  * @param {string} previous_nonce
1673
1675
  * @returns {Uint8Array}
1674
1676
  */
1675
- new_order_request(handle, client_id, expiry_days, directory, account, previous_nonce) {
1677
+ new_order_request(display_name, domain, client_id, handle, expiry_days, directory, account, previous_nonce) {
1676
1678
  try {
1677
1679
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1678
- const ptr0 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1680
+ const ptr0 = passStringToWasm0(display_name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1679
1681
  const len0 = WASM_VECTOR_LEN;
1680
- const ptr1 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1682
+ const ptr1 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1681
1683
  const len1 = WASM_VECTOR_LEN;
1682
- const ptr2 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1684
+ const ptr2 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1683
1685
  const len2 = WASM_VECTOR_LEN;
1684
- wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, expiry_days, addHeapObject(directory), addHeapObject(account), ptr2, len2);
1686
+ const ptr3 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1687
+ const len3 = WASM_VECTOR_LEN;
1688
+ const ptr4 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1689
+ const len4 = WASM_VECTOR_LEN;
1690
+ wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_days, addHeapObject(directory), addHeapObject(account), ptr4, len4);
1685
1691
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1686
1692
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1687
1693
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1805,18 +1811,49 @@ class FfiWireE2EIdentity {
1805
1811
  }
1806
1812
  }
1807
1813
  /**
1808
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_challenge_request]
1809
- * @param {any} handle_challenge
1814
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_dpop_challenge_request]
1815
+ * @param {string} access_token
1816
+ * @param {any} dpop_challenge
1810
1817
  * @param {Uint8Array} account
1811
1818
  * @param {string} previous_nonce
1812
1819
  * @returns {Uint8Array}
1813
1820
  */
1814
- new_challenge_request(handle_challenge, account, previous_nonce) {
1821
+ new_dpop_challenge_request(access_token, dpop_challenge, account, previous_nonce) {
1815
1822
  try {
1816
1823
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1817
- const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1824
+ const ptr0 = passStringToWasm0(access_token, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1818
1825
  const len0 = WASM_VECTOR_LEN;
1819
- wasm$1.ffiwiree2eidentity_new_challenge_request(retptr, this.ptr, addHeapObject(handle_challenge), addHeapObject(account), ptr0, len0);
1826
+ const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1827
+ const len1 = WASM_VECTOR_LEN;
1828
+ wasm$1.ffiwiree2eidentity_new_dpop_challenge_request(retptr, this.ptr, ptr0, len0, addHeapObject(dpop_challenge), addHeapObject(account), ptr1, len1);
1829
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1830
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1831
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1832
+ if (r2) {
1833
+ throw takeObject(r1);
1834
+ }
1835
+ return takeObject(r0);
1836
+ }
1837
+ finally {
1838
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
1839
+ }
1840
+ }
1841
+ /**
1842
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_oidc_challenge_request]
1843
+ * @param {string} id_token
1844
+ * @param {any} oidc_challenge
1845
+ * @param {Uint8Array} account
1846
+ * @param {string} previous_nonce
1847
+ * @returns {Uint8Array}
1848
+ */
1849
+ new_oidc_challenge_request(id_token, oidc_challenge, account, previous_nonce) {
1850
+ try {
1851
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1852
+ const ptr0 = passStringToWasm0(id_token, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1853
+ const len0 = WASM_VECTOR_LEN;
1854
+ const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1855
+ const len1 = WASM_VECTOR_LEN;
1856
+ wasm$1.ffiwiree2eidentity_new_oidc_challenge_request(retptr, this.ptr, ptr0, len0, addHeapObject(oidc_challenge), addHeapObject(account), ptr1, len1);
1820
1857
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1821
1858
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1822
1859
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1897,20 +1934,17 @@ class FfiWireE2EIdentity {
1897
1934
  }
1898
1935
  /**
1899
1936
  * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_request]
1900
- * @param {(string)[]} domains
1901
1937
  * @param {Uint8Array} order
1902
1938
  * @param {Uint8Array} account
1903
1939
  * @param {string} previous_nonce
1904
1940
  * @returns {Uint8Array}
1905
1941
  */
1906
- finalize_request(domains, order, account, previous_nonce) {
1942
+ finalize_request(order, account, previous_nonce) {
1907
1943
  try {
1908
1944
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1909
- const ptr0 = passArrayJsValueToWasm0(domains, wasm$1.__wbindgen_malloc);
1945
+ const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1910
1946
  const len0 = WASM_VECTOR_LEN;
1911
- const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1912
- const len1 = WASM_VECTOR_LEN;
1913
- wasm$1.ffiwiree2eidentity_finalize_request(retptr, this.ptr, ptr0, len0, addHeapObject(order), addHeapObject(account), ptr1, len1);
1947
+ wasm$1.ffiwiree2eidentity_finalize_request(retptr, this.ptr, addHeapObject(order), addHeapObject(account), ptr0, len0);
1914
1948
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1915
1949
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1916
1950
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -2108,16 +2142,16 @@ class NewAcmeAuthz {
2108
2142
  }
2109
2143
  /**
2110
2144
  * @param {string} identifier
2111
- * @param {AcmeChallenge | undefined} wire_http_challenge
2145
+ * @param {AcmeChallenge | undefined} wire_dpop_challenge
2112
2146
  * @param {AcmeChallenge | undefined} wire_oidc_challenge
2113
2147
  */
2114
- constructor(identifier, wire_http_challenge, wire_oidc_challenge) {
2148
+ constructor(identifier, wire_dpop_challenge, wire_oidc_challenge) {
2115
2149
  const ptr0 = passStringToWasm0(identifier, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2116
2150
  const len0 = WASM_VECTOR_LEN;
2117
2151
  let ptr1 = 0;
2118
- if (!isLikeNone(wire_http_challenge)) {
2119
- _assertClass(wire_http_challenge, AcmeChallenge);
2120
- ptr1 = wire_http_challenge.__destroy_into_raw();
2152
+ if (!isLikeNone(wire_dpop_challenge)) {
2153
+ _assertClass(wire_dpop_challenge, AcmeChallenge);
2154
+ ptr1 = wire_dpop_challenge.__destroy_into_raw();
2121
2155
  }
2122
2156
  let ptr2 = 0;
2123
2157
  if (!isLikeNone(wire_oidc_challenge)) {
@@ -2146,8 +2180,8 @@ class NewAcmeAuthz {
2146
2180
  /**
2147
2181
  * @returns {AcmeChallenge | undefined}
2148
2182
  */
2149
- get wire_http_challenge() {
2150
- const ret = wasm$1.newacmeauthz_wire_http_challenge(this.ptr);
2183
+ get wire_dpop_challenge() {
2184
+ const ret = wasm$1.newacmeauthz_wire_dpop_challenge(this.ptr);
2151
2185
  return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
2152
2186
  }
2153
2187
  /**
@@ -2373,32 +2407,16 @@ function getImports() {
2373
2407
  const ret = getObject(arg0).length;
2374
2408
  return ret;
2375
2409
  };
2410
+ imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2411
+ const ret = new Uint8Array(getObject(arg0));
2412
+ return addHeapObject(ret);
2413
+ };
2376
2414
  imports.wbg.__wbg_call_9495de66fdbe016b = function () {
2377
2415
  return handleError(function (arg0, arg1, arg2) {
2378
2416
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2379
2417
  return addHeapObject(ret);
2380
2418
  }, arguments);
2381
2419
  };
2382
- imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2383
- const ret = new Uint8Array(getObject(arg0));
2384
- return addHeapObject(ret);
2385
- };
2386
- imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2387
- const ret = getObject(arg0).push(getObject(arg1));
2388
- return ret;
2389
- };
2390
- imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
2391
- const ret = new Map();
2392
- return addHeapObject(ret);
2393
- };
2394
- imports.wbg.__wbg_set_388c4c6422704173 = function (arg0, arg1, arg2) {
2395
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2396
- return addHeapObject(ret);
2397
- };
2398
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2399
- const ret = BigInt.asUintN(64, arg0);
2400
- return addHeapObject(ret);
2401
- };
2402
2420
  imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function (arg0, arg1) {
2403
2421
  try {
2404
2422
  var state0 = { a: arg0, b: arg1 };
@@ -2406,7 +2424,7 @@ function getImports() {
2406
2424
  const a = state0.a;
2407
2425
  state0.a = 0;
2408
2426
  try {
2409
- return __wbg_adapter_271(a, state0.b, arg0, arg1);
2427
+ return __wbg_adapter_268(a, state0.b, arg0, arg1);
2410
2428
  }
2411
2429
  finally {
2412
2430
  state0.a = a;
@@ -2423,6 +2441,22 @@ function getImports() {
2423
2441
  const ret = FfiWireE2EIdentity.__wrap(arg0);
2424
2442
  return addHeapObject(ret);
2425
2443
  };
2444
+ imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2445
+ const ret = getObject(arg0).push(getObject(arg1));
2446
+ return ret;
2447
+ };
2448
+ imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
2449
+ const ret = new Map();
2450
+ return addHeapObject(ret);
2451
+ };
2452
+ imports.wbg.__wbg_set_388c4c6422704173 = function (arg0, arg1, arg2) {
2453
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2454
+ return addHeapObject(ret);
2455
+ };
2456
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2457
+ const ret = BigInt.asUintN(64, arg0);
2458
+ return addHeapObject(ret);
2459
+ };
2426
2460
  imports.wbg.__wbg_setonsuccess_925a7718d3f62bc1 = function (arg0, arg1) {
2427
2461
  getObject(arg0).onsuccess = getObject(arg1);
2428
2462
  };
@@ -2507,8 +2541,8 @@ function getImports() {
2507
2541
  return addHeapObject(ret);
2508
2542
  }, arguments);
2509
2543
  };
2510
- imports.wbg.__wbg_length_ea0846e494e3b16e = function (arg0) {
2511
- const ret = getObject(arg0).length;
2544
+ imports.wbg.__wbg_now_78244d2ced74c026 = function () {
2545
+ const ret = performance.now();
2512
2546
  return ret;
2513
2547
  };
2514
2548
  imports.wbg.__wbg_reject_57029f54148d79c3 = function (arg0) {
@@ -2523,10 +2557,6 @@ function getImports() {
2523
2557
  const ret = Date.now();
2524
2558
  return ret;
2525
2559
  };
2526
- imports.wbg.__wbg_now_78244d2ced74c026 = function () {
2527
- const ret = performance.now();
2528
- return ret;
2529
- };
2530
2560
  imports.wbg.__wbg_new_abda76e883ba8a5f = function () {
2531
2561
  const ret = new Error();
2532
2562
  return addHeapObject(ret);
@@ -2701,10 +2731,6 @@ function getImports() {
2701
2731
  const ret = new Uint8Array(arg0 >>> 0);
2702
2732
  return addHeapObject(ret);
2703
2733
  };
2704
- imports.wbg.__wbg_charCodeAt_d78a90aced59e02f = function (arg0, arg1) {
2705
- const ret = getObject(arg0).charCodeAt(arg1 >>> 0);
2706
- return ret;
2707
- };
2708
2734
  imports.wbg.__wbg_next_88560ec06a094dea = function () {
2709
2735
  return handleError(function (arg0) {
2710
2736
  const ret = getObject(arg0).next();
@@ -2786,12 +2812,6 @@ function getImports() {
2786
2812
  const ret = getObject(arg0).target;
2787
2813
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2788
2814
  };
2789
- imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2790
- return handleError(function (arg0) {
2791
- const ret = getObject(arg0).error;
2792
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2793
- }, arguments);
2794
- };
2795
2815
  imports.wbg.__wbg_result_3a1fef332bc47038 = function () {
2796
2816
  return handleError(function (arg0) {
2797
2817
  const ret = getObject(arg0).result;
@@ -2832,6 +2852,12 @@ function getImports() {
2832
2852
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2833
2853
  }, arguments);
2834
2854
  };
2855
+ imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2856
+ return handleError(function (arg0) {
2857
+ const ret = getObject(arg0).error;
2858
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2859
+ }, arguments);
2860
+ };
2835
2861
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
2836
2862
  const ret = !getObject(arg0);
2837
2863
  return ret;
@@ -2877,29 +2903,6 @@ function getImports() {
2877
2903
  const ret = getObject(arg0).toString();
2878
2904
  return addHeapObject(ret);
2879
2905
  };
2880
- imports.wbg.__wbg_instanceof_Window_e266f02eee43b570 = function (arg0) {
2881
- let result;
2882
- try {
2883
- result = getObject(arg0) instanceof Window;
2884
- }
2885
- catch {
2886
- result = false;
2887
- }
2888
- const ret = result;
2889
- return ret;
2890
- };
2891
- imports.wbg.__wbg_crypto_71b946c90b06fb5b = function () {
2892
- return handleError(function (arg0) {
2893
- const ret = getObject(arg0).crypto;
2894
- return addHeapObject(ret);
2895
- }, arguments);
2896
- };
2897
- imports.wbg.__wbg_getRandomValues_2a91ccd2d6c499b0 = function () {
2898
- return handleError(function (arg0, arg1, arg2) {
2899
- const ret = getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
2900
- return addHeapObject(ret);
2901
- }, arguments);
2902
- };
2903
2906
  imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function (arg0) {
2904
2907
  let result;
2905
2908
  try {
@@ -3015,12 +3018,12 @@ function getImports() {
3015
3018
  return addHeapObject(ret);
3016
3019
  }, arguments);
3017
3020
  };
3018
- imports.wbg.__wbindgen_closure_wrapper4402 = function (arg0, arg1, arg2) {
3019
- const ret = makeMutClosure(arg0, arg1, 145, __wbg_adapter_52);
3021
+ imports.wbg.__wbindgen_closure_wrapper4410 = function (arg0, arg1, arg2) {
3022
+ const ret = makeMutClosure(arg0, arg1, 143, __wbg_adapter_52);
3020
3023
  return addHeapObject(ret);
3021
3024
  };
3022
- imports.wbg.__wbindgen_closure_wrapper4858 = function (arg0, arg1, arg2) {
3023
- const ret = makeMutClosure(arg0, arg1, 145, __wbg_adapter_55);
3025
+ imports.wbg.__wbindgen_closure_wrapper4895 = function (arg0, arg1, arg2) {
3026
+ const ret = makeMutClosure(arg0, arg1, 143, __wbg_adapter_55);
3024
3027
  return addHeapObject(ret);
3025
3028
  };
3026
3029
  return imports;
@@ -3080,7 +3083,7 @@ var exports = /*#__PURE__*/Object.freeze({
3080
3083
  var wasm = async (opt = {}) => {
3081
3084
  let {importHook, serverPath} = opt;
3082
3085
 
3083
- let path = "assets/core_crypto_ffi-d7dac5b2.wasm";
3086
+ let path = "assets/core_crypto_ffi-49b28313.wasm";
3084
3087
 
3085
3088
  if (serverPath != null) {
3086
3089
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -4116,17 +4119,19 @@ class WireE2eIdentity {
4116
4119
  /**
4117
4120
  * Creates a new acme order for the handle (userId + display name) and the clientId.
4118
4121
  *
4119
- * @param handle domain of the authorization server e.g. `idp.example.org`
4120
- * @param clientId domain of the wire-server e.g. `wire.example.org`
4122
+ * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4123
+ * @param domain DNS name of owning backend e.g. `example.com`
4124
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `impp:wireapp=NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ/6add501bacd1d90e@example.com`
4125
+ * @param handle user handle e.g. `impp:wireapp=alice.smith.qa@example.com`
4121
4126
  * @param expiryDays generated x509 certificate expiry
4122
4127
  * @param directory you got from {@link directoryResponse}
4123
4128
  * @param account you got from {@link newAccountResponse}
4124
4129
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
4125
4130
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4126
4131
  */
4127
- newOrderRequest(handle, clientId, expiryDays, directory, account, previousNonce) {
4132
+ newOrderRequest(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce) {
4128
4133
  try {
4129
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(handle, clientId, expiryDays, directory, account, previousNonce);
4134
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce);
4130
4135
  }
4131
4136
  catch (e) {
4132
4137
  throw CoreCryptoError.fromStdError(e);
@@ -4206,16 +4211,34 @@ class WireE2eIdentity {
4206
4211
  }
4207
4212
  }
4208
4213
  /**
4209
- * Creates a new challenge request.
4214
+ * Creates a new challenge request for Wire Dpop challenge.
4215
+ *
4216
+ * @param accessToken returned by wire-server from https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token
4217
+ * @param dpopChallenge you found after {@link newAuthzResponse}
4218
+ * @param account you found after {@link newAccountResponse}
4219
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
4220
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
4221
+ */
4222
+ newDpopChallengeRequest(accessToken, dpopChallenge, account, previousNonce) {
4223
+ try {
4224
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_dpop_challenge_request(accessToken, dpopChallenge, account, previousNonce);
4225
+ }
4226
+ catch (e) {
4227
+ throw CoreCryptoError.fromStdError(e);
4228
+ }
4229
+ }
4230
+ /**
4231
+ * Creates a new challenge request for Wire Oidc challenge.
4210
4232
  *
4211
- * @param handleChallenge you found after {@link newAuthzResponse}
4233
+ * @param idToken you get back from Identity Provider
4234
+ * @param oidcChallenge you found after {@link newAuthzResponse}
4212
4235
  * @param account you found after {@link newAccountResponse}
4213
4236
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
4214
4237
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
4215
4238
  */
4216
- newChallengeRequest(handleChallenge, account, previousNonce) {
4239
+ newOidcChallengeRequest(idToken, oidcChallenge, account, previousNonce) {
4217
4240
  try {
4218
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_request(handleChallenge, account, previousNonce);
4241
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_oidc_challenge_request(idToken, oidcChallenge, account, previousNonce);
4219
4242
  }
4220
4243
  catch (e) {
4221
4244
  throw CoreCryptoError.fromStdError(e);
@@ -4268,15 +4291,14 @@ class WireE2eIdentity {
4268
4291
  /**
4269
4292
  * Final step before fetching the certificate.
4270
4293
  *
4271
- * @param domains - domains you want to generate a certificate for e.g. `["wire.com"]`
4272
4294
  * @param order - order you got from {@link checkOrderResponse}
4273
4295
  * @param account - account you found after {@link newAccountResponse}
4274
4296
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
4275
4297
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4276
4298
  */
4277
- finalizeRequest(domains, order, account, previousNonce) {
4299
+ finalizeRequest(order, account, previousNonce) {
4278
4300
  try {
4279
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(domains, order, account, previousNonce);
4301
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(order, account, previousNonce);
4280
4302
  }
4281
4303
  catch (e) {
4282
4304
  throw CoreCryptoError.fromStdError(e);