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

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.1",
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
  *
@@ -226,9 +226,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
226
  return real;
227
227
  }
228
228
  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__hbc1e83b65f289d81(arg0, arg1, addHeapObject(arg2));
230
+ }
231
+ function __wbg_adapter_55(arg0, arg1, arg2) {
229
232
  try {
230
233
  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));
234
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7f871b07edcecab4(retptr, arg0, arg1, addHeapObject(arg2));
232
235
  var r0 = getInt32Memory0()[retptr / 4 + 0];
233
236
  var r1 = getInt32Memory0()[retptr / 4 + 1];
234
237
  if (r1) {
@@ -239,9 +242,6 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
239
242
  wasm$1.__wbindgen_add_to_stack_pointer(16);
240
243
  }
241
244
  }
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));
244
- }
245
245
  function _assertClass(instance, klass) {
246
246
  if (!(instance instanceof klass)) {
247
247
  throw new Error(`expected instance of ${klass.name}`);
@@ -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_270(arg0, arg1, arg2, arg3) {
294
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h642728bf8a354f9a(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
  /**
@@ -2383,22 +2417,6 @@ function getImports() {
2383
2417
  const ret = new Uint8Array(getObject(arg0));
2384
2418
  return addHeapObject(ret);
2385
2419
  };
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_270(a, state0.b, arg0, arg1);
2410
2428
  }
2411
2429
  finally {
2412
2430
  state0.a = a;
@@ -2419,10 +2437,26 @@ function getImports() {
2419
2437
  state0.a = state0.b = 0;
2420
2438
  }
2421
2439
  };
2440
+ imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2441
+ const ret = getObject(arg0).push(getObject(arg1));
2442
+ return ret;
2443
+ };
2422
2444
  imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2423
2445
  const ret = FfiWireE2EIdentity.__wrap(arg0);
2424
2446
  return addHeapObject(ret);
2425
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
  };
@@ -2495,20 +2529,32 @@ function getImports() {
2495
2529
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2496
2530
  return addHeapObject(ret);
2497
2531
  };
2532
+ imports.wbg.__wbg_instanceof_Promise_4333c4e5587e8936 = function (arg0) {
2533
+ let result;
2534
+ try {
2535
+ result = getObject(arg0) instanceof Promise;
2536
+ }
2537
+ catch {
2538
+ result = false;
2539
+ }
2540
+ const ret = result;
2541
+ return ret;
2542
+ };
2543
+ imports.wbg.__wbg_then_f753623316e2873a = function (arg0, arg1, arg2) {
2544
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2545
+ return addHeapObject(ret);
2546
+ };
2547
+ imports.wbg.__wbg_warn_e57696dbb3977030 = function (arg0) {
2548
+ console.warn(getObject(arg0));
2549
+ };
2498
2550
  imports.wbg.__wbg_call_96878afb7a8201ca = function () {
2499
2551
  return handleError(function (arg0, arg1, arg2, arg3) {
2500
2552
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2501
2553
  return addHeapObject(ret);
2502
2554
  }, arguments);
2503
2555
  };
2504
- imports.wbg.__wbg_call_99043a1e2a9e5916 = function () {
2505
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2506
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2507
- return addHeapObject(ret);
2508
- }, arguments);
2509
- };
2510
- imports.wbg.__wbg_length_ea0846e494e3b16e = function (arg0) {
2511
- const ret = getObject(arg0).length;
2556
+ imports.wbg.__wbg_now_78244d2ced74c026 = function () {
2557
+ const ret = performance.now();
2512
2558
  return ret;
2513
2559
  };
2514
2560
  imports.wbg.__wbg_reject_57029f54148d79c3 = function (arg0) {
@@ -2523,10 +2569,6 @@ function getImports() {
2523
2569
  const ret = Date.now();
2524
2570
  return ret;
2525
2571
  };
2526
- imports.wbg.__wbg_now_78244d2ced74c026 = function () {
2527
- const ret = performance.now();
2528
- return ret;
2529
- };
2530
2572
  imports.wbg.__wbg_new_abda76e883ba8a5f = function () {
2531
2573
  const ret = new Error();
2532
2574
  return addHeapObject(ret);
@@ -2701,10 +2743,6 @@ function getImports() {
2701
2743
  const ret = new Uint8Array(arg0 >>> 0);
2702
2744
  return addHeapObject(ret);
2703
2745
  };
2704
- imports.wbg.__wbg_charCodeAt_d78a90aced59e02f = function (arg0, arg1) {
2705
- const ret = getObject(arg0).charCodeAt(arg1 >>> 0);
2706
- return ret;
2707
- };
2708
2746
  imports.wbg.__wbg_next_88560ec06a094dea = function () {
2709
2747
  return handleError(function (arg0) {
2710
2748
  const ret = getObject(arg0).next();
@@ -2757,6 +2795,12 @@ function getImports() {
2757
2795
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2758
2796
  return addHeapObject(ret);
2759
2797
  };
2798
+ imports.wbg.__wbg_call_99043a1e2a9e5916 = function () {
2799
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2800
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2801
+ return addHeapObject(ret);
2802
+ }, arguments);
2803
+ };
2760
2804
  imports.wbg.__wbg_set_6aa458a4ebdb65cb = function () {
2761
2805
  return handleError(function (arg0, arg1, arg2) {
2762
2806
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
@@ -2786,12 +2830,6 @@ function getImports() {
2786
2830
  const ret = getObject(arg0).target;
2787
2831
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2788
2832
  };
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
2833
  imports.wbg.__wbg_result_3a1fef332bc47038 = function () {
2796
2834
  return handleError(function (arg0) {
2797
2835
  const ret = getObject(arg0).result;
@@ -2832,6 +2870,12 @@ function getImports() {
2832
2870
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2833
2871
  }, arguments);
2834
2872
  };
2873
+ imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2874
+ return handleError(function (arg0) {
2875
+ const ret = getObject(arg0).error;
2876
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2877
+ }, arguments);
2878
+ };
2835
2879
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
2836
2880
  const ret = !getObject(arg0);
2837
2881
  return ret;
@@ -2877,29 +2921,6 @@ function getImports() {
2877
2921
  const ret = getObject(arg0).toString();
2878
2922
  return addHeapObject(ret);
2879
2923
  };
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
2924
  imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function (arg0) {
2904
2925
  let result;
2905
2926
  try {
@@ -2947,10 +2968,6 @@ function getImports() {
2947
2968
  const ret = getObject(arg0).then(getObject(arg1));
2948
2969
  return addHeapObject(ret);
2949
2970
  };
2950
- imports.wbg.__wbg_then_f753623316e2873a = function (arg0, arg1, arg2) {
2951
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2952
- return addHeapObject(ret);
2953
- };
2954
2971
  imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function (arg0) {
2955
2972
  const ret = Promise.resolve(getObject(arg0));
2956
2973
  return addHeapObject(ret);
@@ -3015,12 +3032,12 @@ function getImports() {
3015
3032
  return addHeapObject(ret);
3016
3033
  }, arguments);
3017
3034
  };
3018
- imports.wbg.__wbindgen_closure_wrapper4402 = function (arg0, arg1, arg2) {
3019
- const ret = makeMutClosure(arg0, arg1, 145, __wbg_adapter_52);
3035
+ imports.wbg.__wbindgen_closure_wrapper1526 = function (arg0, arg1, arg2) {
3036
+ const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_52);
3020
3037
  return addHeapObject(ret);
3021
3038
  };
3022
- imports.wbg.__wbindgen_closure_wrapper4858 = function (arg0, arg1, arg2) {
3023
- const ret = makeMutClosure(arg0, arg1, 145, __wbg_adapter_55);
3039
+ imports.wbg.__wbindgen_closure_wrapper4415 = function (arg0, arg1, arg2) {
3040
+ const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_55);
3024
3041
  return addHeapObject(ret);
3025
3042
  };
3026
3043
  return imports;
@@ -3080,7 +3097,7 @@ var exports = /*#__PURE__*/Object.freeze({
3080
3097
  var wasm = async (opt = {}) => {
3081
3098
  let {importHook, serverPath} = opt;
3082
3099
 
3083
- let path = "assets/core_crypto_ffi-d7dac5b2.wasm";
3100
+ let path = "assets/core_crypto_ffi-d45ab989.wasm";
3084
3101
 
3085
3102
  if (serverPath != null) {
3086
3103
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -4116,17 +4133,19 @@ class WireE2eIdentity {
4116
4133
  /**
4117
4134
  * Creates a new acme order for the handle (userId + display name) and the clientId.
4118
4135
  *
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`
4136
+ * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4137
+ * @param domain DNS name of owning backend e.g. `example.com`
4138
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `impp:wireapp=NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ/6add501bacd1d90e@example.com`
4139
+ * @param handle user handle e.g. `impp:wireapp=alice.smith.qa@example.com`
4121
4140
  * @param expiryDays generated x509 certificate expiry
4122
4141
  * @param directory you got from {@link directoryResponse}
4123
4142
  * @param account you got from {@link newAccountResponse}
4124
4143
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
4125
4144
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4126
4145
  */
4127
- newOrderRequest(handle, clientId, expiryDays, directory, account, previousNonce) {
4146
+ newOrderRequest(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce) {
4128
4147
  try {
4129
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(handle, clientId, expiryDays, directory, account, previousNonce);
4148
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce);
4130
4149
  }
4131
4150
  catch (e) {
4132
4151
  throw CoreCryptoError.fromStdError(e);
@@ -4206,16 +4225,34 @@ class WireE2eIdentity {
4206
4225
  }
4207
4226
  }
4208
4227
  /**
4209
- * Creates a new challenge request.
4228
+ * Creates a new challenge request for Wire Dpop challenge.
4229
+ *
4230
+ * @param accessToken returned by wire-server from https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token
4231
+ * @param dpopChallenge you found after {@link newAuthzResponse}
4232
+ * @param account you found after {@link newAccountResponse}
4233
+ * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
4234
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
4235
+ */
4236
+ newDpopChallengeRequest(accessToken, dpopChallenge, account, previousNonce) {
4237
+ try {
4238
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_dpop_challenge_request(accessToken, dpopChallenge, account, previousNonce);
4239
+ }
4240
+ catch (e) {
4241
+ throw CoreCryptoError.fromStdError(e);
4242
+ }
4243
+ }
4244
+ /**
4245
+ * Creates a new challenge request for Wire Oidc challenge.
4210
4246
  *
4211
- * @param handleChallenge you found after {@link newAuthzResponse}
4247
+ * @param idToken you get back from Identity Provider
4248
+ * @param oidcChallenge you found after {@link newAuthzResponse}
4212
4249
  * @param account you found after {@link newAccountResponse}
4213
4250
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
4214
4251
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
4215
4252
  */
4216
- newChallengeRequest(handleChallenge, account, previousNonce) {
4253
+ newOidcChallengeRequest(idToken, oidcChallenge, account, previousNonce) {
4217
4254
  try {
4218
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_request(handleChallenge, account, previousNonce);
4255
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_oidc_challenge_request(idToken, oidcChallenge, account, previousNonce);
4219
4256
  }
4220
4257
  catch (e) {
4221
4258
  throw CoreCryptoError.fromStdError(e);
@@ -4268,15 +4305,14 @@ class WireE2eIdentity {
4268
4305
  /**
4269
4306
  * Final step before fetching the certificate.
4270
4307
  *
4271
- * @param domains - domains you want to generate a certificate for e.g. `["wire.com"]`
4272
4308
  * @param order - order you got from {@link checkOrderResponse}
4273
4309
  * @param account - account you found after {@link newAccountResponse}
4274
4310
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
4275
4311
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4276
4312
  */
4277
- finalizeRequest(domains, order, account, previousNonce) {
4313
+ finalizeRequest(order, account, previousNonce) {
4278
4314
  try {
4279
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(domains, order, account, previousNonce);
4315
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(order, account, previousNonce);
4280
4316
  }
4281
4317
  catch (e) {
4282
4318
  throw CoreCryptoError.fromStdError(e);