@wireapp/core-crypto 1.0.0-rc.50 → 1.0.0-rc.51

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": "1.0.0-rc.50",
3
+ "version": "1.0.0-rc.51",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -19,6 +19,24 @@ export class AcmeChallenge {
19
19
  readonly url: string;
20
20
  }
21
21
  /**
22
+ * Dump of the PKI environemnt as PEM
23
+ */
24
+ export class E2eiDumpedPkiEnv {
25
+ free(): void;
26
+ /**
27
+ * CRLs registered in the PKI env
28
+ */
29
+ readonly crls: (string)[];
30
+ /**
31
+ * Intermediate CAs that are loaded
32
+ */
33
+ readonly intermediates: (string)[];
34
+ /**
35
+ * Root CA in use (i.e. Trust Anchor)
36
+ */
37
+ readonly root_ca: string;
38
+ }
39
+ /**
22
40
  * Result of an authorization creation.
23
41
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
24
42
  */
@@ -561,15 +579,15 @@ export declare enum DeviceStatus {
561
579
  /**
562
580
  * All is fine
563
581
  */
564
- Valid = 0,
582
+ Valid = 1,
565
583
  /**
566
584
  * The Credential's certificate is expired
567
585
  */
568
- Expired = 1,
586
+ Expired = 2,
569
587
  /**
570
588
  * The Credential's certificate is revoked
571
589
  */
572
- Revoked = 2
590
+ Revoked = 3
573
591
  }
574
592
  /**
575
593
  * Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
@@ -1292,34 +1310,44 @@ export declare class CoreCrypto {
1292
1310
  */
1293
1311
  e2eiMlsInitOnly(enrollment: E2eiEnrollment, certificateChain: string, nbKeyPackage?: number): Promise<string[] | undefined>;
1294
1312
  /**
1295
- * Registers a Root Trust Anchor CA for the use in E2EI processing.
1296
- *
1297
- * Please note that without a Root Trust Anchor, all validations *will* fail;
1298
- * So this is the first step to perform after initializing your E2EI client
1299
- *
1300
- * @param trustAnchorPEM - PEM certificate to anchor as a Trust Root
1301
- */
1313
+ * Dumps the PKI environment as PEM
1314
+ *
1315
+ * @returns a struct with different fields representing the PKI environment as PEM strings
1316
+ */
1317
+ e2eiDumpPKIEnv(): Promise<E2eiDumpedPkiEnv | undefined>;
1318
+ /**
1319
+ * @returns whether the E2EI PKI environment is setup (i.e. Root CA, Intermediates, CRLs)
1320
+ */
1321
+ e2eiIsPKIEnvSetup(): Promise<boolean>;
1322
+ /**
1323
+ * Registers a Root Trust Anchor CA for the use in E2EI processing.
1324
+ *
1325
+ * Please note that without a Root Trust Anchor, all validations *will* fail;
1326
+ * So this is the first step to perform after initializing your E2EI client
1327
+ *
1328
+ * @param trustAnchorPEM - PEM certificate to anchor as a Trust Root
1329
+ */
1302
1330
  e2eiRegisterAcmeCA(trustAnchorPEM: string): Promise<void>;
1303
1331
  /**
1304
- * Registers an Intermediate CA for the use in E2EI processing.
1305
- *
1306
- * Please note that a Root Trust Anchor CA is needed to validate Intermediate CAs;
1307
- * You **need** to have a Root CA registered before calling this
1308
- *
1309
- * @param certPEM - PEM certificate to register as an Intermediate CA
1310
- */
1332
+ * Registers an Intermediate CA for the use in E2EI processing.
1333
+ *
1334
+ * Please note that a Root Trust Anchor CA is needed to validate Intermediate CAs;
1335
+ * You **need** to have a Root CA registered before calling this
1336
+ *
1337
+ * @param certPEM - PEM certificate to register as an Intermediate CA
1338
+ */
1311
1339
  e2eiRegisterIntermediateCA(certPEM: string): Promise<string[] | undefined>;
1312
1340
  /**
1313
- * Registers a CRL for the use in E2EI processing.
1314
- *
1315
- * Please note that a Root Trust Anchor CA is needed to validate CRLs;
1316
- * You **need** to have a Root CA registered before calling this
1317
- *
1318
- * @param crlDP - CRL Distribution Point; Basically the URL you fetched it from
1319
- * @param crlDER - DER representation of the CRL
1320
- *
1321
- * @returns a {@link CRLRegistration} with the dirty state of the new CRL (see struct) and its expiration timestamp
1322
- */
1341
+ * Registers a CRL for the use in E2EI processing.
1342
+ *
1343
+ * Please note that a Root Trust Anchor CA is needed to validate CRLs;
1344
+ * You **need** to have a Root CA registered before calling this
1345
+ *
1346
+ * @param crlDP - CRL Distribution Point; Basically the URL you fetched it from
1347
+ * @param crlDER - DER representation of the CRL
1348
+ *
1349
+ * @returns a {@link CRLRegistration} with the dirty state of the new CRL (see struct) and its expiration timestamp
1350
+ */
1323
1351
  e2eiRegisterCRL(crlDP: string, crlDER: Uint8Array): Promise<CRLRegistration>;
1324
1352
  /**
1325
1353
  * Creates a commit in all local conversations for changing the credential. Requires first
@@ -160,12 +160,12 @@ var makeMutClosure = function(arg0, arg1, dtor, f) {
160
160
  return real;
161
161
  };
162
162
  var __wbg_adapter_54 = function(arg0, arg1, arg2) {
163
- wasm.wasm_bindgen__convert__closures__invoke1_mut__h710a87412ffe5e55(arg0, arg1, addHeapObject(arg2));
163
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__h6ec936e7e658dfc2(arg0, arg1, addHeapObject(arg2));
164
164
  };
165
165
  var __wbg_adapter_57 = function(arg0, arg1, arg2) {
166
166
  try {
167
167
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
168
- wasm.wasm_bindgen__convert__closures__invoke1_mut__h4359f72040c5aa5f(retptr, arg0, arg1, addHeapObject(arg2));
168
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__h679c32bb4cb8181f(retptr, arg0, arg1, addHeapObject(arg2));
169
169
  var r0 = getInt32Memory0()[retptr / 4 + 0];
170
170
  var r1 = getInt32Memory0()[retptr / 4 + 1];
171
171
  if (r1) {
@@ -235,8 +235,8 @@ var handleError = function(f, args) {
235
235
  wasm.__wbindgen_exn_store(addHeapObject(e));
236
236
  }
237
237
  };
238
- var __wbg_adapter_423 = function(arg0, arg1, arg2, arg3) {
239
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h75c112f6425ae305(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
238
+ var __wbg_adapter_428 = function(arg0, arg1, arg2, arg3) {
239
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h85cdc5a82a90a895(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
240
240
  };
241
241
  async function __wbg_load(module, imports) {
242
242
  if (typeof Response === "function" && module instanceof Response) {
@@ -265,43 +265,43 @@ async function __wbg_load(module, imports) {
265
265
  var __wbg_get_imports = function() {
266
266
  const imports = {};
267
267
  imports.wbg = {};
268
- imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
269
- const ret = NewAcmeAuthz.__wrap(arg0);
268
+ imports.wbg.__wbindgen_number_new = function(arg0) {
269
+ const ret = arg0;
270
+ return addHeapObject(ret);
271
+ };
272
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
273
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
270
274
  return addHeapObject(ret);
271
275
  };
272
276
  imports.wbg.__wbg_proposalbundle_new = function(arg0) {
273
277
  const ret = ProposalBundle.__wrap(arg0);
274
278
  return addHeapObject(ret);
275
279
  };
276
- imports.wbg.__wbg_newacmeorder_new = function(arg0) {
277
- const ret = NewAcmeOrder.__wrap(arg0);
280
+ imports.wbg.__wbg_commitbundle_new = function(arg0) {
281
+ const ret = CommitBundle.__wrap(arg0);
278
282
  return addHeapObject(ret);
279
283
  };
280
- imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
281
- const ret = BufferedDecryptedMessage.__wrap(arg0);
282
- return addHeapObject(ret);
284
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
285
+ takeObject(arg0);
283
286
  };
284
- imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
285
- const ret = FfiWireE2EIdentity.__wrap(arg0);
287
+ imports.wbg.__wbg_corecrypto_new = function(arg0) {
288
+ const ret = CoreCrypto.__wrap(arg0);
286
289
  return addHeapObject(ret);
287
290
  };
288
- imports.wbg.__wbg_commitbundle_new = function(arg0) {
289
- const ret = CommitBundle.__wrap(arg0);
291
+ imports.wbg.__wbg_newacmeorder_new = function(arg0) {
292
+ const ret = NewAcmeOrder.__wrap(arg0);
290
293
  return addHeapObject(ret);
291
294
  };
292
- imports.wbg.__wbindgen_number_new = function(arg0) {
293
- const ret = arg0;
295
+ imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
296
+ const ret = BufferedDecryptedMessage.__wrap(arg0);
294
297
  return addHeapObject(ret);
295
298
  };
296
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
297
- takeObject(arg0);
298
- };
299
- imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
300
- const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
299
+ imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
300
+ const ret = NewAcmeAuthz.__wrap(arg0);
301
301
  return addHeapObject(ret);
302
302
  };
303
- imports.wbg.__wbg_corecrypto_new = function(arg0) {
304
- const ret = CoreCrypto.__wrap(arg0);
303
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
304
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
305
305
  return addHeapObject(ret);
306
306
  };
307
307
  imports.wbg.__wbg_acmedirectory_new = function(arg0) {
@@ -312,6 +312,10 @@ var __wbg_get_imports = function() {
312
312
  const ret = getObject(arg0);
313
313
  return addHeapObject(ret);
314
314
  };
315
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
316
+ const ret = BigInt.asUintN(64, arg0);
317
+ return addHeapObject(ret);
318
+ };
315
319
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
316
320
  const ret = getStringFromWasm0(arg0, arg1);
317
321
  return addHeapObject(ret);
@@ -324,10 +328,6 @@ var __wbg_get_imports = function() {
324
328
  const ret = getObject(arg0) === null;
325
329
  return ret;
326
330
  };
327
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
328
- const ret = BigInt.asUintN(64, arg0);
329
- return addHeapObject(ret);
330
- };
331
331
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
332
332
  const obj = getObject(arg1);
333
333
  const ret = typeof obj === "string" ? obj : undefined;
@@ -899,7 +899,7 @@ var __wbg_get_imports = function() {
899
899
  const a = state0.a;
900
900
  state0.a = 0;
901
901
  try {
902
- return __wbg_adapter_423(a, state0.b, arg02, arg12);
902
+ return __wbg_adapter_428(a, state0.b, arg02, arg12);
903
903
  } finally {
904
904
  state0.a = a;
905
905
  }
@@ -979,12 +979,12 @@ var __wbg_get_imports = function() {
979
979
  const ret = wasm.memory;
980
980
  return addHeapObject(ret);
981
981
  };
982
- imports.wbg.__wbindgen_closure_wrapper2590 = function(arg0, arg1, arg2) {
983
- const ret = makeMutClosure(arg0, arg1, 652, __wbg_adapter_54);
982
+ imports.wbg.__wbindgen_closure_wrapper2666 = function(arg0, arg1, arg2) {
983
+ const ret = makeMutClosure(arg0, arg1, 667, __wbg_adapter_54);
984
984
  return addHeapObject(ret);
985
985
  };
986
- imports.wbg.__wbindgen_closure_wrapper13222 = function(arg0, arg1, arg2) {
987
- const ret = makeMutClosure(arg0, arg1, 2170, __wbg_adapter_57);
986
+ imports.wbg.__wbindgen_closure_wrapper13332 = function(arg0, arg1, arg2) {
987
+ const ret = makeMutClosure(arg0, arg1, 2203, __wbg_adapter_57);
988
988
  return addHeapObject(ret);
989
989
  };
990
990
  return imports;
@@ -1051,6 +1051,26 @@ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: ()
1051
1051
  });
1052
1052
  var cachedUint32Memory0 = null;
1053
1053
  var cachedUint16Memory0 = null;
1054
+ var WirePolicy = Object.freeze({
1055
+ Plaintext: 1,
1056
+ "1": "Plaintext",
1057
+ Ciphertext: 2,
1058
+ "2": "Ciphertext"
1059
+ });
1060
+ var DeviceStatus = Object.freeze({
1061
+ Valid: 1,
1062
+ "1": "Valid",
1063
+ Expired: 2,
1064
+ "2": "Expired",
1065
+ Revoked: 3,
1066
+ "3": "Revoked"
1067
+ });
1068
+ var CredentialType = Object.freeze({
1069
+ Basic: 1,
1070
+ "1": "Basic",
1071
+ X509: 2,
1072
+ "2": "X509"
1073
+ });
1054
1074
  var Ciphersuite = Object.freeze({
1055
1075
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
1056
1076
  "1": "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519",
@@ -1069,26 +1089,6 @@ var Ciphersuite = Object.freeze({
1069
1089
  MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519: 61489,
1070
1090
  "61489": "MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519"
1071
1091
  });
1072
- var WirePolicy = Object.freeze({
1073
- Plaintext: 1,
1074
- "1": "Plaintext",
1075
- Ciphertext: 2,
1076
- "2": "Ciphertext"
1077
- });
1078
- var DeviceStatus = Object.freeze({
1079
- Valid: 0,
1080
- "0": "Valid",
1081
- Expired: 1,
1082
- "1": "Expired",
1083
- Revoked: 2,
1084
- "2": "Revoked"
1085
- });
1086
- var CredentialType = Object.freeze({
1087
- Basic: 1,
1088
- "1": "Basic",
1089
- X509: 2,
1090
- "2": "X509"
1091
- });
1092
1092
  var AcmeChallengeFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1093
1093
  }, unregister: () => {
1094
1094
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_acmechallenge_free(ptr >>> 0));
@@ -1432,6 +1432,14 @@ class CoreCrypto {
1432
1432
  const ret = wasm.corecrypto_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
1433
1433
  return takeObject(ret);
1434
1434
  }
1435
+ e2ei_dump_pki_env() {
1436
+ const ret = wasm.corecrypto_e2ei_dump_pki_env(this.__wbg_ptr);
1437
+ return takeObject(ret);
1438
+ }
1439
+ e2ei_is_pki_env_setup() {
1440
+ const ret = wasm.corecrypto_e2ei_is_pki_env_setup(this.__wbg_ptr);
1441
+ return takeObject(ret);
1442
+ }
1435
1443
  e2ei_register_acme_ca(trust_anchor_pem) {
1436
1444
  const ptr0 = passStringToWasm0(trust_anchor_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1437
1445
  const len0 = WASM_VECTOR_LEN;
@@ -1989,6 +1997,64 @@ class CustomConfiguration {
1989
1997
  var DecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1990
1998
  }, unregister: () => {
1991
1999
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_decryptedmessage_free(ptr >>> 0));
2000
+ var E2eiDumpedPkiEnvFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2001
+ }, unregister: () => {
2002
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_e2eidumpedpkienv_free(ptr >>> 0));
2003
+
2004
+ class E2eiDumpedPkiEnv {
2005
+ __destroy_into_raw() {
2006
+ const ptr = this.__wbg_ptr;
2007
+ this.__wbg_ptr = 0;
2008
+ E2eiDumpedPkiEnvFinalization.unregister(this);
2009
+ return ptr;
2010
+ }
2011
+ free() {
2012
+ const ptr = this.__destroy_into_raw();
2013
+ wasm.__wbg_e2eidumpedpkienv_free(ptr);
2014
+ }
2015
+ get root_ca() {
2016
+ let deferred1_0;
2017
+ let deferred1_1;
2018
+ try {
2019
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2020
+ wasm.__wbg_get_acmedirectory_new_nonce(retptr, this.__wbg_ptr);
2021
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2022
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2023
+ deferred1_0 = r0;
2024
+ deferred1_1 = r1;
2025
+ return getStringFromWasm0(r0, r1);
2026
+ } finally {
2027
+ wasm.__wbindgen_add_to_stack_pointer(16);
2028
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2029
+ }
2030
+ }
2031
+ get intermediates() {
2032
+ try {
2033
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2034
+ wasm.__wbg_get_e2eidumpedpkienv_intermediates(retptr, this.__wbg_ptr);
2035
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2036
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2037
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2038
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
2039
+ return v1;
2040
+ } finally {
2041
+ wasm.__wbindgen_add_to_stack_pointer(16);
2042
+ }
2043
+ }
2044
+ get crls() {
2045
+ try {
2046
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2047
+ wasm.__wbg_get_e2eidumpedpkienv_crls(retptr, this.__wbg_ptr);
2048
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2049
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2050
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2051
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
2052
+ return v1;
2053
+ } finally {
2054
+ wasm.__wbindgen_add_to_stack_pointer(16);
2055
+ }
2056
+ }
2057
+ }
1992
2058
  var FfiWireE2EIdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1993
2059
  }, unregister: () => {
1994
2060
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_ffiwiree2eidentity_free(ptr >>> 0));
@@ -2370,7 +2436,7 @@ class WireIdentity {
2370
2436
  let deferred1_1;
2371
2437
  try {
2372
2438
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2373
- wasm.__wbg_get_wireidentity_client_id(retptr, this.__wbg_ptr);
2439
+ wasm.wireidentity_client_id(retptr, this.__wbg_ptr);
2374
2440
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2375
2441
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2376
2442
  deferred1_0 = r0;
@@ -2386,7 +2452,7 @@ class WireIdentity {
2386
2452
  let deferred1_1;
2387
2453
  try {
2388
2454
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2389
- wasm.__wbg_get_wireidentity_handle(retptr, this.__wbg_ptr);
2455
+ wasm.wireidentity_handle(retptr, this.__wbg_ptr);
2390
2456
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2391
2457
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2392
2458
  deferred1_0 = r0;
@@ -2402,7 +2468,7 @@ class WireIdentity {
2402
2468
  let deferred1_1;
2403
2469
  try {
2404
2470
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2405
- wasm.__wbg_get_wireidentity_display_name(retptr, this.__wbg_ptr);
2471
+ wasm.wireidentity_display_name(retptr, this.__wbg_ptr);
2406
2472
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2407
2473
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2408
2474
  deferred1_0 = r0;
@@ -2418,7 +2484,7 @@ class WireIdentity {
2418
2484
  let deferred1_1;
2419
2485
  try {
2420
2486
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2421
- wasm.__wbg_get_wireidentity_domain(retptr, this.__wbg_ptr);
2487
+ wasm.wireidentity_domain(retptr, this.__wbg_ptr);
2422
2488
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2423
2489
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2424
2490
  deferred1_0 = r0;
@@ -2434,7 +2500,7 @@ class WireIdentity {
2434
2500
  let deferred1_1;
2435
2501
  try {
2436
2502
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2437
- wasm.__wbg_get_wireidentity_certificate(retptr, this.__wbg_ptr);
2503
+ wasm.wireidentity_certificate(retptr, this.__wbg_ptr);
2438
2504
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2439
2505
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2440
2506
  deferred1_0 = r0;
@@ -2446,7 +2512,7 @@ class WireIdentity {
2446
2512
  }
2447
2513
  }
2448
2514
  get status() {
2449
- const ret = wasm.__wbg_get_wireidentity_status(this.__wbg_ptr);
2515
+ const ret = wasm.wireidentity_status(this.__wbg_ptr);
2450
2516
  return ret;
2451
2517
  }
2452
2518
  get thumbprint() {
@@ -2454,7 +2520,7 @@ class WireIdentity {
2454
2520
  let deferred1_1;
2455
2521
  try {
2456
2522
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2457
- wasm.__wbg_get_wireidentity_thumbprint(retptr, this.__wbg_ptr);
2523
+ wasm.wireidentity_thumbprint(retptr, this.__wbg_ptr);
2458
2524
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2459
2525
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2460
2526
  deferred1_0 = r0;
@@ -2470,7 +2536,7 @@ class WireIdentity {
2470
2536
  let deferred1_1;
2471
2537
  try {
2472
2538
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2473
- wasm.__wbg_get_wireidentity_serial_number(retptr, this.__wbg_ptr);
2539
+ wasm.wireidentity_serial_number(retptr, this.__wbg_ptr);
2474
2540
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2475
2541
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2476
2542
  deferred1_0 = r0;
@@ -2482,11 +2548,11 @@ class WireIdentity {
2482
2548
  }
2483
2549
  }
2484
2550
  get not_before() {
2485
- const ret = wasm.__wbg_get_wireidentity_not_before(this.__wbg_ptr);
2551
+ const ret = wasm.wireidentity_not_before(this.__wbg_ptr);
2486
2552
  return BigInt.asUintN(64, ret);
2487
2553
  }
2488
2554
  get not_after() {
2489
- const ret = wasm.__wbg_get_wireidentity_not_after(this.__wbg_ptr);
2555
+ const ret = wasm.wireidentity_not_after(this.__wbg_ptr);
2490
2556
  return BigInt.asUintN(64, ret);
2491
2557
  }
2492
2558
  }
@@ -2581,7 +2647,7 @@ var mapWireIdentity = (ffiIdentity) => {
2581
2647
  displayName: ffiIdentity.display_name,
2582
2648
  domain: ffiIdentity.domain,
2583
2649
  certificate: ffiIdentity.certificate,
2584
- status: ffiIdentity.status,
2650
+ status: DeviceStatus2[ffiIdentity.status],
2585
2651
  thumbprint: ffiIdentity.thumbprint,
2586
2652
  serialNumber: ffiIdentity.serial_number,
2587
2653
  notBefore: ffiIdentity.not_before,
@@ -2590,9 +2656,9 @@ var mapWireIdentity = (ffiIdentity) => {
2590
2656
  };
2591
2657
  var DeviceStatus2;
2592
2658
  (function(DeviceStatus3) {
2593
- DeviceStatus3[DeviceStatus3["Valid"] = 0] = "Valid";
2594
- DeviceStatus3[DeviceStatus3["Expired"] = 1] = "Expired";
2595
- DeviceStatus3[DeviceStatus3["Revoked"] = 2] = "Revoked";
2659
+ DeviceStatus3[DeviceStatus3["Valid"] = 1] = "Valid";
2660
+ DeviceStatus3[DeviceStatus3["Expired"] = 2] = "Expired";
2661
+ DeviceStatus3[DeviceStatus3["Revoked"] = 3] = "Revoked";
2596
2662
  })(DeviceStatus2 || (DeviceStatus2 = {}));
2597
2663
  var ProposalType;
2598
2664
  (function(ProposalType2) {
@@ -3009,6 +3075,12 @@ class CoreCrypto2 {
3009
3075
  async e2eiMlsInitOnly(enrollment, certificateChain, nbKeyPackage) {
3010
3076
  return await this.#cc.e2ei_mls_init_only(enrollment.inner(), certificateChain, nbKeyPackage);
3011
3077
  }
3078
+ async e2eiDumpPKIEnv() {
3079
+ return await this.#cc.e2ei_dump_pki_env();
3080
+ }
3081
+ async e2eiIsPKIEnvSetup() {
3082
+ return await this.#cc.e2ei_is_pki_env_setup();
3083
+ }
3012
3084
  async e2eiRegisterAcmeCA(trustAnchorPEM) {
3013
3085
  return await this.#cc.e2ei_register_acme_ca(trustAnchorPEM);
3014
3086
  }
@@ -3037,7 +3109,7 @@ class CoreCrypto2 {
3037
3109
  }
3038
3110
  async e2eiConversationState(conversationId) {
3039
3111
  let state = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_conversation_state(conversationId));
3040
- return E2eiConversationState[E2eiConversationState[state]];
3112
+ return E2eiConversationState[state];
3041
3113
  }
3042
3114
  async e2eiIsEnabled(ciphersuite) {
3043
3115
  return await CoreCryptoError.asyncMapErr(this.#cc.e2ei_is_enabled(ciphersuite));
@@ -3059,7 +3131,7 @@ class CoreCrypto2 {
3059
3131
  }
3060
3132
  async getCredentialInUse(groupInfo, credentialType = CredentialType2.X509) {
3061
3133
  let state = await CoreCryptoError.asyncMapErr(this.#cc.get_credential_in_use(groupInfo, credentialType));
3062
- return E2eiConversationState[E2eiConversationState[state]];
3134
+ return E2eiConversationState[state];
3063
3135
  }
3064
3136
  static version() {
3065
3137
  this.#assertModuleLoaded();
@@ -3151,6 +3223,7 @@ export {
3151
3223
  GroupInfoEncryptionType,
3152
3224
  ExternalProposalType,
3153
3225
  E2eiEnrollment,
3226
+ E2eiDumpedPkiEnv,
3154
3227
  E2eiConversationState,
3155
3228
  DeviceStatus2 as DeviceStatus,
3156
3229
  CredentialType2 as CredentialType,