@wireapp/core-crypto 1.0.0-rc.17 → 1.0.0-rc.19

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.17",
3
+ "version": "1.0.0-rc.19",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -1,3 +1,22 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * see [core_crypto::prelude::DeviceStatus]
5
+ */
6
+ export enum DeviceStatus {
7
+ /**
8
+ * All is fine
9
+ */
10
+ Valid = 0,
11
+ /**
12
+ * The Credential's certificate is expired
13
+ */
14
+ Expired = 1,
15
+ /**
16
+ * The Credential's certificate is revoked (not implemented yet)
17
+ */
18
+ Revoked = 2
19
+ }
1
20
  /**
2
21
  * For creating a challenge.
3
22
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
@@ -74,6 +93,41 @@ export class NewAcmeOrder {
74
93
  */
75
94
  readonly delegate: Uint8Array;
76
95
  }
96
+ /**
97
+ * Represents the identity claims identifying a client
98
+ * Those claims are verifiable by any member in the group
99
+ */
100
+ export class WireIdentity {
101
+ free(): void;
102
+ /**
103
+ * X509 certificate identifying this client in the MLS group ; PEM encoded
104
+ */
105
+ readonly certificate: string;
106
+ /**
107
+ * Unique client identifier e.g. `T4Coy4vdRzianwfOgXpn6A:6add501bacd1d90e@whitehouse.gov`
108
+ */
109
+ readonly clientId: string;
110
+ /**
111
+ * Name as displayed in the messaging application e.g. `John Fitzgerald Kennedy`
112
+ */
113
+ readonly displayName: string;
114
+ /**
115
+ * DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
116
+ */
117
+ readonly domain: string;
118
+ /**
119
+ * user handle e.g. `john_wire`
120
+ */
121
+ readonly handle: string;
122
+ /**
123
+ * Status of the Credential at the moment T when this object is created
124
+ */
125
+ readonly status: DeviceStatus;
126
+ /**
127
+ * MLS thumbprint
128
+ */
129
+ readonly thumbprint: string;
130
+ }
77
131
  /**
78
132
  * Error wrapper that takes care of extracting rich error details across the FFI (through JSON parsing)
79
133
  *
@@ -506,31 +560,6 @@ export interface BufferedDecryptedMessage {
506
560
  */
507
561
  identity?: WireIdentity;
508
562
  }
509
- /**
510
- * Represents the identity claims identifying a client. Those claims are verifiable by any member in the group
511
- */
512
- export interface WireIdentity {
513
- /**
514
- * Represents the identity claims identifying a client. Those claims are verifiable by any member in the group
515
- */
516
- clientId: string;
517
- /**
518
- * user handle e.g. `john_wire`
519
- */
520
- handle: string;
521
- /**
522
- * Name as displayed in the messaging application e.g. `John Fitzgerald Kennedy`
523
- */
524
- displayName: string;
525
- /**
526
- * DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
527
- */
528
- domain: string;
529
- /**
530
- * X509 certificate identifying this client in the MLS group ; PEM encoded
531
- */
532
- certificate: string;
533
- }
534
563
  /**
535
564
  * Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
536
565
  */
@@ -1278,10 +1307,20 @@ export declare class CoreCrypto {
1278
1307
  * Certificate Credential (after turning on end-to-end identity).
1279
1308
  *
1280
1309
  * @param conversationId - identifier of the conversation
1281
- * @param clientIds - identifiers of the user
1310
+ * @param deviceIds - identifiers of the devices
1282
1311
  * @returns identities or if no member has a x509 certificate, it will return an empty List
1283
1312
  */
1284
- getUserIdentities(conversationId: ConversationId, clientIds: ClientId[]): Promise<WireIdentity[]>;
1313
+ getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId[]): Promise<WireIdentity[]>;
1314
+ /**
1315
+ * From a given conversation, get the identity of the users (device holders) supplied.
1316
+ * Identity is only present for devices with a Certificate Credential (after turning on end-to-end identity).
1317
+ * If no member has a x509 certificate, it will return an empty Vec.
1318
+ *
1319
+ * @param conversationId - identifier of the conversation
1320
+ * @param userIds - user identifiers e.g. t6wRpI8BRSeviBwwiFp5MQ which is a base64UrlUnpadded UUIDv4
1321
+ * @returns a Map with all the identities for a given users. Consumers are then recommended to reduce those identities to determine the actual status of a user.
1322
+ */
1323
+ getUserIdentities(conversationId: ConversationId, userIds: string[]): Promise<Map<string, WireIdentity[]>>;
1285
1324
  /**
1286
1325
  * Returns the current version of {@link CoreCrypto}
1287
1326
  *
@@ -157,12 +157,12 @@ var makeMutClosure = function(arg0, arg1, dtor, f) {
157
157
  return real;
158
158
  };
159
159
  var __wbg_adapter_52 = function(arg0, arg1, arg2) {
160
- wasm.wasm_bindgen__convert__closures__invoke1_mut__h79f5c0247747398c(arg0, arg1, addHeapObject(arg2));
160
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__haa59db12f6db579c(arg0, arg1, addHeapObject(arg2));
161
161
  };
162
162
  var __wbg_adapter_55 = function(arg0, arg1, arg2) {
163
163
  try {
164
164
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
165
- wasm.wasm_bindgen__convert__closures__invoke1_mut__h06b64d18897db7ca(retptr, arg0, arg1, addHeapObject(arg2));
165
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__hceafba4929294a2f(retptr, arg0, arg1, addHeapObject(arg2));
166
166
  var r0 = getInt32Memory0()[retptr / 4 + 0];
167
167
  var r1 = getInt32Memory0()[retptr / 4 + 1];
168
168
  if (r1) {
@@ -232,8 +232,8 @@ var handleError = function(f, args) {
232
232
  wasm.__wbindgen_exn_store(addHeapObject(e));
233
233
  }
234
234
  };
235
- var __wbg_adapter_392 = function(arg0, arg1, arg2, arg3) {
236
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h93a96297e73de967(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
235
+ var __wbg_adapter_398 = function(arg0, arg1, arg2, arg3) {
236
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h61cfff0f57bf91cc(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
237
237
  };
238
238
  async function __wbg_load(module, imports) {
239
239
  if (typeof Response === "function" && module instanceof Response) {
@@ -265,22 +265,38 @@ var __wbg_get_imports = function() {
265
265
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
266
266
  takeObject(arg0);
267
267
  };
268
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
269
- const ret = getObject(arg0);
270
- return addHeapObject(ret);
271
- };
272
- imports.wbg.__wbindgen_number_new = function(arg0) {
273
- const ret = arg0;
268
+ imports.wbg.__wbg_commitbundle_new = function(arg0) {
269
+ const ret = CommitBundle.__wrap(arg0);
274
270
  return addHeapObject(ret);
275
271
  };
276
272
  imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
277
273
  const ret = FfiWireE2EIdentity.__wrap(arg0);
278
274
  return addHeapObject(ret);
279
275
  };
276
+ imports.wbg.__wbg_proposalbundle_new = function(arg0) {
277
+ const ret = ProposalBundle.__wrap(arg0);
278
+ return addHeapObject(ret);
279
+ };
280
+ imports.wbg.__wbindgen_number_new = function(arg0) {
281
+ const ret = arg0;
282
+ return addHeapObject(ret);
283
+ };
280
284
  imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
281
285
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
282
286
  return addHeapObject(ret);
283
287
  };
288
+ imports.wbg.__wbg_corecrypto_new = function(arg0) {
289
+ const ret = CoreCrypto.__wrap(arg0);
290
+ return addHeapObject(ret);
291
+ };
292
+ imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
293
+ const ret = BufferedDecryptedMessage.__wrap(arg0);
294
+ return addHeapObject(ret);
295
+ };
296
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
297
+ const ret = getObject(arg0);
298
+ return addHeapObject(ret);
299
+ };
284
300
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
285
301
  const ret = BigInt.asUintN(64, arg0);
286
302
  return addHeapObject(ret);
@@ -297,14 +313,6 @@ var __wbg_get_imports = function() {
297
313
  getInt32Memory0()[arg0 / 4 + 1] = len1;
298
314
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
299
315
  };
300
- imports.wbg.__wbg_proposalbundle_new = function(arg0) {
301
- const ret = ProposalBundle.__wrap(arg0);
302
- return addHeapObject(ret);
303
- };
304
- imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
305
- const ret = BufferedDecryptedMessage.__wrap(arg0);
306
- return addHeapObject(ret);
307
- };
308
316
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
309
317
  const ret = getObject(arg0) === undefined;
310
318
  return ret;
@@ -345,13 +353,13 @@ var __wbg_get_imports = function() {
345
353
  const ret = getStringFromWasm0(arg0, arg1);
346
354
  return addHeapObject(ret);
347
355
  };
348
- imports.wbg.__wbg_corecrypto_new = function(arg0) {
349
- const ret = CoreCrypto.__wrap(arg0);
356
+ imports.wbg.__wbg_queueMicrotask_2be8b97a81fe4d00 = function(arg0) {
357
+ const ret = getObject(arg0).queueMicrotask;
350
358
  return addHeapObject(ret);
351
359
  };
352
- imports.wbg.__wbg_commitbundle_new = function(arg0) {
353
- const ret = CommitBundle.__wrap(arg0);
354
- return addHeapObject(ret);
360
+ imports.wbg.__wbindgen_is_function = function(arg0) {
361
+ const ret = typeof getObject(arg0) === "function";
362
+ return ret;
355
363
  };
356
364
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
357
365
  const obj = takeObject(arg0).original;
@@ -362,7 +370,10 @@ var __wbg_get_imports = function() {
362
370
  const ret = false;
363
371
  return ret;
364
372
  };
365
- imports.wbg.__wbg_now_1e4c677328409625 = function() {
373
+ imports.wbg.__wbg_queueMicrotask_e5949c35d772a669 = function(arg0) {
374
+ queueMicrotask(getObject(arg0));
375
+ };
376
+ imports.wbg.__wbg_now_0343d9c3e0e8eedc = function() {
366
377
  const ret = Date.now();
367
378
  return ret;
368
379
  };
@@ -414,234 +425,234 @@ var __wbg_get_imports = function() {
414
425
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
415
426
  }
416
427
  };
417
- imports.wbg.__wbg_length_de272fc97200ec95 = function(arg0) {
428
+ imports.wbg.__wbg_length_b228e732960bf09f = function(arg0) {
418
429
  const ret = getObject(arg0).length;
419
430
  return ret;
420
431
  };
421
- imports.wbg.__wbg_contains_0f868d6343a00b39 = function(arg0, arg1, arg2) {
432
+ imports.wbg.__wbg_contains_8e00d590f033919f = function(arg0, arg1, arg2) {
422
433
  const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
423
434
  return ret;
424
435
  };
425
- imports.wbg.__wbg_get_fca5c2e9985ebaff = function(arg0, arg1, arg2) {
436
+ imports.wbg.__wbg_get_d6ccaeff9e0951a7 = function(arg0, arg1, arg2) {
426
437
  const ret = getObject(arg1)[arg2 >>> 0];
427
438
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
428
439
  var len1 = WASM_VECTOR_LEN;
429
440
  getInt32Memory0()[arg0 / 4 + 1] = len1;
430
441
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
431
442
  };
432
- imports.wbg.__wbg_target_f171e89c61e2bccf = function(arg0) {
443
+ imports.wbg.__wbg_target_6efb4504c149139f = function(arg0) {
433
444
  const ret = getObject(arg0).target;
434
445
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
435
446
  };
436
- imports.wbg.__wbg_key_1a7b60df5fef1cb0 = function() {
447
+ imports.wbg.__wbg_key_05b294ba6de250c8 = function() {
437
448
  return handleError(function(arg0) {
438
449
  const ret = getObject(arg0).key;
439
450
  return addHeapObject(ret);
440
451
  }, arguments);
441
452
  };
442
- imports.wbg.__wbg_advance_c7e5fd8d69236e91 = function() {
453
+ imports.wbg.__wbg_advance_0c90755732c0347a = function() {
443
454
  return handleError(function(arg0, arg1) {
444
455
  getObject(arg0).advance(arg1 >>> 0);
445
456
  }, arguments);
446
457
  };
447
- imports.wbg.__wbg_continue_b5a1b6eb1682ad84 = function() {
458
+ imports.wbg.__wbg_continue_6cf313be16a4a872 = function() {
448
459
  return handleError(function(arg0) {
449
460
  getObject(arg0).continue();
450
461
  }, arguments);
451
462
  };
452
- imports.wbg.__wbg_value_c49deffceeea3d79 = function() {
463
+ imports.wbg.__wbg_value_5a4429fda77716af = function() {
453
464
  return handleError(function(arg0) {
454
465
  const ret = getObject(arg0).value;
455
466
  return addHeapObject(ret);
456
467
  }, arguments);
457
468
  };
458
- imports.wbg.__wbg_name_fd6367bb4b1cd78f = function(arg0, arg1) {
469
+ imports.wbg.__wbg_name_31784b647df07159 = function(arg0, arg1) {
459
470
  const ret = getObject(arg1).name;
460
471
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
461
472
  const len1 = WASM_VECTOR_LEN;
462
473
  getInt32Memory0()[arg0 / 4 + 1] = len1;
463
474
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
464
475
  };
465
- imports.wbg.__wbg_objectStoreNames_774e47f8818de433 = function(arg0) {
476
+ imports.wbg.__wbg_objectStoreNames_91e7ba9d286ee70d = function(arg0) {
466
477
  const ret = getObject(arg0).objectStoreNames;
467
478
  return addHeapObject(ret);
468
479
  };
469
- imports.wbg.__wbg_close_29232080ee4839b2 = function(arg0) {
480
+ imports.wbg.__wbg_close_8721a441c465ae56 = function(arg0) {
470
481
  getObject(arg0).close();
471
482
  };
472
- imports.wbg.__wbg_createObjectStore_4394a46abe4d85f5 = function() {
483
+ imports.wbg.__wbg_createObjectStore_ffdde2afe7cc8221 = function() {
473
484
  return handleError(function(arg0, arg1, arg2, arg3) {
474
485
  const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2), getObject(arg3));
475
486
  return addHeapObject(ret);
476
487
  }, arguments);
477
488
  };
478
- imports.wbg.__wbg_deleteObjectStore_6598d1cfff53e9b0 = function() {
489
+ imports.wbg.__wbg_deleteObjectStore_b209cbe33e173df4 = function() {
479
490
  return handleError(function(arg0, arg1, arg2) {
480
491
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
481
492
  }, arguments);
482
493
  };
483
- imports.wbg.__wbg_transaction_64ded2617f47f79a = function() {
494
+ imports.wbg.__wbg_transaction_ba2cc1930cb9bc8c = function() {
484
495
  return handleError(function(arg0, arg1, arg2) {
485
496
  const ret = getObject(arg0).transaction(getObject(arg1), takeObject(arg2));
486
497
  return addHeapObject(ret);
487
498
  }, arguments);
488
499
  };
489
- imports.wbg.__wbg_instanceof_IdbFactory_737b6a04b9fa9269 = function(arg0) {
500
+ imports.wbg.__wbg_instanceof_IdbFactory_53c1835f1df94d9c = function(arg0) {
490
501
  let result;
491
502
  try {
492
503
  result = getObject(arg0) instanceof IDBFactory;
493
- } catch {
504
+ } catch (_) {
494
505
  result = false;
495
506
  }
496
507
  const ret = result;
497
508
  return ret;
498
509
  };
499
- imports.wbg.__wbg_deleteDatabase_c4a7d299bd51151e = function() {
510
+ imports.wbg.__wbg_deleteDatabase_c9a73536ad4de9db = function() {
500
511
  return handleError(function(arg0, arg1, arg2) {
501
512
  const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
502
513
  return addHeapObject(ret);
503
514
  }, arguments);
504
515
  };
505
- imports.wbg.__wbg_open_6a08b03c958d4ad0 = function() {
516
+ imports.wbg.__wbg_open_5c1f0b394e81527c = function() {
506
517
  return handleError(function(arg0, arg1, arg2, arg3) {
507
518
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
508
519
  return addHeapObject(ret);
509
520
  }, arguments);
510
521
  };
511
- imports.wbg.__wbg_open_11c83d2d4f1b9255 = function() {
522
+ imports.wbg.__wbg_open_76cacc0a1983a919 = function() {
512
523
  return handleError(function(arg0, arg1, arg2) {
513
524
  const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
514
525
  return addHeapObject(ret);
515
526
  }, arguments);
516
527
  };
517
- imports.wbg.__wbg_get_f14f327bf3003f81 = function() {
528
+ imports.wbg.__wbg_get_98d630f4c310b306 = function() {
518
529
  return handleError(function(arg0, arg1) {
519
530
  const ret = getObject(arg0).get(getObject(arg1));
520
531
  return addHeapObject(ret);
521
532
  }, arguments);
522
533
  };
523
- imports.wbg.__wbg_indexNames_44268b4ff8662a99 = function(arg0) {
534
+ imports.wbg.__wbg_indexNames_e00fd1ffe47bb9e6 = function(arg0) {
524
535
  const ret = getObject(arg0).indexNames;
525
536
  return addHeapObject(ret);
526
537
  };
527
- imports.wbg.__wbg_count_70955a2d988ad669 = function() {
538
+ imports.wbg.__wbg_count_d49c509723c23b48 = function() {
528
539
  return handleError(function(arg0) {
529
540
  const ret = getObject(arg0).count();
530
541
  return addHeapObject(ret);
531
542
  }, arguments);
532
543
  };
533
- imports.wbg.__wbg_count_39c67882648e40d7 = function() {
544
+ imports.wbg.__wbg_count_8ac192f7360218d1 = function() {
534
545
  return handleError(function(arg0, arg1) {
535
546
  const ret = getObject(arg0).count(getObject(arg1));
536
547
  return addHeapObject(ret);
537
548
  }, arguments);
538
549
  };
539
- imports.wbg.__wbg_createIndex_d6400c1715e93b4d = function() {
550
+ imports.wbg.__wbg_createIndex_51daebbb4c45f622 = function() {
540
551
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
541
552
  const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
542
553
  return addHeapObject(ret);
543
554
  }, arguments);
544
555
  };
545
- imports.wbg.__wbg_delete_ca1cfc48f1f7981c = function() {
556
+ imports.wbg.__wbg_delete_01dd21e8b0c79883 = function() {
546
557
  return handleError(function(arg0, arg1) {
547
558
  const ret = getObject(arg0).delete(getObject(arg1));
548
559
  return addHeapObject(ret);
549
560
  }, arguments);
550
561
  };
551
- imports.wbg.__wbg_deleteIndex_66002b783e73aceb = function() {
562
+ imports.wbg.__wbg_deleteIndex_eba05d09543a504b = function() {
552
563
  return handleError(function(arg0, arg1, arg2) {
553
564
  getObject(arg0).deleteIndex(getStringFromWasm0(arg1, arg2));
554
565
  }, arguments);
555
566
  };
556
- imports.wbg.__wbg_get_fc26906e5ae1ea85 = function() {
567
+ imports.wbg.__wbg_get_66c20950e3aea6e5 = function() {
557
568
  return handleError(function(arg0, arg1) {
558
569
  const ret = getObject(arg0).get(getObject(arg1));
559
570
  return addHeapObject(ret);
560
571
  }, arguments);
561
572
  };
562
- imports.wbg.__wbg_index_915f5cc0bddc21df = function() {
573
+ imports.wbg.__wbg_index_52452d486267203d = function() {
563
574
  return handleError(function(arg0, arg1, arg2) {
564
575
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
565
576
  return addHeapObject(ret);
566
577
  }, arguments);
567
578
  };
568
- imports.wbg.__wbg_openCursor_4d6f62b69b34be26 = function() {
579
+ imports.wbg.__wbg_openCursor_e8b991ba67d38034 = function() {
569
580
  return handleError(function(arg0) {
570
581
  const ret = getObject(arg0).openCursor();
571
582
  return addHeapObject(ret);
572
583
  }, arguments);
573
584
  };
574
- imports.wbg.__wbg_openCursor_555d508ba71b21cc = function() {
585
+ imports.wbg.__wbg_openCursor_05316787760c9eea = function() {
575
586
  return handleError(function(arg0, arg1) {
576
587
  const ret = getObject(arg0).openCursor(getObject(arg1));
577
588
  return addHeapObject(ret);
578
589
  }, arguments);
579
590
  };
580
- imports.wbg.__wbg_openCursor_3204283d52f4c9ba = function() {
591
+ imports.wbg.__wbg_openCursor_b7988a72614b6708 = function() {
581
592
  return handleError(function(arg0, arg1, arg2) {
582
593
  const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
583
594
  return addHeapObject(ret);
584
595
  }, arguments);
585
596
  };
586
- imports.wbg.__wbg_put_d6937bc51f51a398 = function() {
597
+ imports.wbg.__wbg_put_ea387555e5174caf = function() {
587
598
  return handleError(function(arg0, arg1) {
588
599
  const ret = getObject(arg0).put(getObject(arg1));
589
600
  return addHeapObject(ret);
590
601
  }, arguments);
591
602
  };
592
- imports.wbg.__wbg_put_fb32824d87feec5c = function() {
603
+ imports.wbg.__wbg_put_f93b43c5e246b00e = function() {
593
604
  return handleError(function(arg0, arg1, arg2) {
594
605
  const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
595
606
  return addHeapObject(ret);
596
607
  }, arguments);
597
608
  };
598
- imports.wbg.__wbg_setonupgradeneeded_5a39a65558c323b2 = function(arg0, arg1) {
609
+ imports.wbg.__wbg_setonupgradeneeded_16037a49fd0ba457 = function(arg0, arg1) {
599
610
  getObject(arg0).onupgradeneeded = getObject(arg1);
600
611
  };
601
- imports.wbg.__wbg_result_edff16ff107d6acb = function() {
612
+ imports.wbg.__wbg_result_7196a76180ba0d87 = function() {
602
613
  return handleError(function(arg0) {
603
614
  const ret = getObject(arg0).result;
604
615
  return addHeapObject(ret);
605
616
  }, arguments);
606
617
  };
607
- imports.wbg.__wbg_error_8a79f35fe9368563 = function() {
618
+ imports.wbg.__wbg_error_bf3d2269f973936a = function() {
608
619
  return handleError(function(arg0) {
609
620
  const ret = getObject(arg0).error;
610
621
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
611
622
  }, arguments);
612
623
  };
613
- imports.wbg.__wbg_transaction_7f009622f3035b10 = function(arg0) {
624
+ imports.wbg.__wbg_transaction_b06293a8488a047a = function(arg0) {
614
625
  const ret = getObject(arg0).transaction;
615
626
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
616
627
  };
617
- imports.wbg.__wbg_setonsuccess_f518a37d8228a576 = function(arg0, arg1) {
628
+ imports.wbg.__wbg_setonsuccess_24399c655e56d454 = function(arg0, arg1) {
618
629
  getObject(arg0).onsuccess = getObject(arg1);
619
630
  };
620
- imports.wbg.__wbg_setonerror_7bf21979c5219792 = function(arg0, arg1) {
631
+ imports.wbg.__wbg_setonerror_d9ee9dcf19767629 = function(arg0, arg1) {
621
632
  getObject(arg0).onerror = getObject(arg1);
622
633
  };
623
- imports.wbg.__wbg_objectStore_5a858a654147f96f = function() {
634
+ imports.wbg.__wbg_objectStore_84121dafd15ea284 = function() {
624
635
  return handleError(function(arg0, arg1, arg2) {
625
636
  const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
626
637
  return addHeapObject(ret);
627
638
  }, arguments);
628
639
  };
629
- imports.wbg.__wbg_warn_d60e832f9882c1b2 = function(arg0) {
640
+ imports.wbg.__wbg_warn_4affe1093892a4ef = function(arg0) {
630
641
  console.warn(getObject(arg0));
631
642
  };
632
- imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
643
+ imports.wbg.__wbg_crypto_58f13aa23ffcb166 = function(arg0) {
633
644
  const ret = getObject(arg0).crypto;
634
645
  return addHeapObject(ret);
635
646
  };
636
- imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
647
+ imports.wbg.__wbg_process_5b786e71d465a513 = function(arg0) {
637
648
  const ret = getObject(arg0).process;
638
649
  return addHeapObject(ret);
639
650
  };
640
- imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
651
+ imports.wbg.__wbg_versions_c2ab80650590b6a2 = function(arg0) {
641
652
  const ret = getObject(arg0).versions;
642
653
  return addHeapObject(ret);
643
654
  };
644
- imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
655
+ imports.wbg.__wbg_node_523d7bd03ef69fba = function(arg0) {
645
656
  const ret = getObject(arg0).node;
646
657
  return addHeapObject(ret);
647
658
  };
@@ -649,221 +660,217 @@ var __wbg_get_imports = function() {
649
660
  const ret = typeof getObject(arg0) === "string";
650
661
  return ret;
651
662
  };
652
- imports.wbg.__wbg_require_8f08ceecec0f4fee = function() {
663
+ imports.wbg.__wbg_require_2784e593a4674877 = function() {
653
664
  return handleError(function() {
654
665
  const ret = module_core_crypto_ffi.require;
655
666
  return addHeapObject(ret);
656
667
  }, arguments);
657
668
  };
658
- imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
669
+ imports.wbg.__wbg_msCrypto_abcb1295e768d1f2 = function(arg0) {
659
670
  const ret = getObject(arg0).msCrypto;
660
671
  return addHeapObject(ret);
661
672
  };
662
- imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() {
673
+ imports.wbg.__wbg_randomFillSync_a0d98aa11c81fe89 = function() {
663
674
  return handleError(function(arg0, arg1) {
664
675
  getObject(arg0).randomFillSync(takeObject(arg1));
665
676
  }, arguments);
666
677
  };
667
- imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() {
678
+ imports.wbg.__wbg_getRandomValues_504510b5564925af = function() {
668
679
  return handleError(function(arg0, arg1) {
669
680
  getObject(arg0).getRandomValues(getObject(arg1));
670
681
  }, arguments);
671
682
  };
672
- imports.wbg.__wbindgen_is_function = function(arg0) {
673
- const ret = typeof getObject(arg0) === "function";
674
- return ret;
675
- };
676
- imports.wbg.__wbg_self_1ff1d729e9aae938 = function() {
683
+ imports.wbg.__wbg_self_3fad056edded10bd = function() {
677
684
  return handleError(function() {
678
685
  const ret = self.self;
679
686
  return addHeapObject(ret);
680
687
  }, arguments);
681
688
  };
682
- imports.wbg.__wbg_window_5f4faef6c12b79ec = function() {
689
+ imports.wbg.__wbg_window_a4f46c98a61d4089 = function() {
683
690
  return handleError(function() {
684
691
  const ret = window.window;
685
692
  return addHeapObject(ret);
686
693
  }, arguments);
687
694
  };
688
- imports.wbg.__wbg_globalThis_1d39714405582d3c = function() {
695
+ imports.wbg.__wbg_globalThis_17eff828815f7d84 = function() {
689
696
  return handleError(function() {
690
697
  const ret = globalThis.globalThis;
691
698
  return addHeapObject(ret);
692
699
  }, arguments);
693
700
  };
694
- imports.wbg.__wbg_global_651f05c6a0944d1c = function() {
701
+ imports.wbg.__wbg_global_46f939f6541643c5 = function() {
695
702
  return handleError(function() {
696
703
  const ret = global.global;
697
704
  return addHeapObject(ret);
698
705
  }, arguments);
699
706
  };
700
- imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
707
+ imports.wbg.__wbg_newnoargs_ccdcae30fd002262 = function(arg0, arg1) {
701
708
  const ret = new Function(getStringFromWasm0(arg0, arg1));
702
709
  return addHeapObject(ret);
703
710
  };
704
- imports.wbg.__wbg_call_cb65541d95d71282 = function() {
711
+ imports.wbg.__wbg_call_669127b9d730c650 = function() {
705
712
  return handleError(function(arg0, arg1) {
706
713
  const ret = getObject(arg0).call(getObject(arg1));
707
714
  return addHeapObject(ret);
708
715
  }, arguments);
709
716
  };
710
- imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
717
+ imports.wbg.__wbg_get_4a9aa5157afeb382 = function(arg0, arg1) {
711
718
  const ret = getObject(arg0)[arg1 >>> 0];
712
719
  return addHeapObject(ret);
713
720
  };
714
- imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
721
+ imports.wbg.__wbg_length_cace2e0b3ddc0502 = function(arg0) {
715
722
  const ret = getObject(arg0).length;
716
723
  return ret;
717
724
  };
718
- imports.wbg.__wbg_new_898a68150f225f2e = function() {
725
+ imports.wbg.__wbg_new_08236689f0afb357 = function() {
719
726
  const ret = new Array;
720
727
  return addHeapObject(ret);
721
728
  };
722
- imports.wbg.__wbg_new_56693dbed0c32988 = function() {
729
+ imports.wbg.__wbg_new_1b94180eeb48f2a2 = function() {
723
730
  const ret = new Map;
724
731
  return addHeapObject(ret);
725
732
  };
726
- imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) {
733
+ imports.wbg.__wbg_next_15da6a3df9290720 = function(arg0) {
727
734
  const ret = getObject(arg0).next;
728
735
  return addHeapObject(ret);
729
736
  };
730
- imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() {
737
+ imports.wbg.__wbg_next_1989a20442400aaa = function() {
731
738
  return handleError(function(arg0) {
732
739
  const ret = getObject(arg0).next();
733
740
  return addHeapObject(ret);
734
741
  }, arguments);
735
742
  };
736
- imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
743
+ imports.wbg.__wbg_done_bc26bf4ada718266 = function(arg0) {
737
744
  const ret = getObject(arg0).done;
738
745
  return ret;
739
746
  };
740
- imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
747
+ imports.wbg.__wbg_value_0570714ff7d75f35 = function(arg0) {
741
748
  const ret = getObject(arg0).value;
742
749
  return addHeapObject(ret);
743
750
  };
744
- imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {
751
+ imports.wbg.__wbg_iterator_7ee1a391d310f8e4 = function() {
745
752
  const ret = Symbol.iterator;
746
753
  return addHeapObject(ret);
747
754
  };
748
- imports.wbg.__wbg_get_97b561fb56f034b5 = function() {
755
+ imports.wbg.__wbg_get_2aff440840bb6202 = function() {
749
756
  return handleError(function(arg0, arg1) {
750
757
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
751
758
  return addHeapObject(ret);
752
759
  }, arguments);
753
760
  };
754
- imports.wbg.__wbg_new_b51585de1b234aff = function() {
761
+ imports.wbg.__wbg_new_c728d68b8b34487e = function() {
755
762
  const ret = new Object;
756
763
  return addHeapObject(ret);
757
764
  };
758
- imports.wbg.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
765
+ imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
759
766
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
760
767
  };
761
- imports.wbg.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
768
+ imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
762
769
  const ret = Array.isArray(getObject(arg0));
763
770
  return ret;
764
771
  };
765
- imports.wbg.__wbg_of_cb684bc8f0eac408 = function(arg0, arg1, arg2, arg3) {
772
+ imports.wbg.__wbg_of_831062b15afcbd03 = function(arg0, arg1, arg2, arg3) {
766
773
  const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
767
774
  return addHeapObject(ret);
768
775
  };
769
- imports.wbg.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
776
+ imports.wbg.__wbg_push_fd3233d09cf81821 = function(arg0, arg1) {
770
777
  const ret = getObject(arg0).push(getObject(arg1));
771
778
  return ret;
772
779
  };
773
- imports.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb = function(arg0) {
780
+ imports.wbg.__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d = function(arg0) {
774
781
  let result;
775
782
  try {
776
783
  result = getObject(arg0) instanceof ArrayBuffer;
777
- } catch {
784
+ } catch (_) {
778
785
  result = false;
779
786
  }
780
787
  const ret = result;
781
788
  return ret;
782
789
  };
783
- imports.wbg.__wbg_new_d258248ed531ff54 = function(arg0, arg1) {
790
+ imports.wbg.__wbg_new_ab87fd305ed9004b = function(arg0, arg1) {
784
791
  const ret = new Error(getStringFromWasm0(arg0, arg1));
785
792
  return addHeapObject(ret);
786
793
  };
787
- imports.wbg.__wbg_toString_1c056108b87ba68b = function(arg0) {
794
+ imports.wbg.__wbg_toString_d0cefe4046ecb265 = function(arg0) {
788
795
  const ret = getObject(arg0).toString();
789
796
  return addHeapObject(ret);
790
797
  };
791
- imports.wbg.__wbg_apply_64be369596a02ae0 = function() {
798
+ imports.wbg.__wbg_apply_1c259fc7880fb101 = function() {
792
799
  return handleError(function(arg0, arg1, arg2) {
793
800
  const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
794
801
  return addHeapObject(ret);
795
802
  }, arguments);
796
803
  };
797
- imports.wbg.__wbg_call_01734de55d61e11d = function() {
804
+ imports.wbg.__wbg_call_53fc3abd42e24ec8 = function() {
798
805
  return handleError(function(arg0, arg1, arg2) {
799
806
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
800
807
  return addHeapObject(ret);
801
808
  }, arguments);
802
809
  };
803
- imports.wbg.__wbg_call_4c92f6aec1e1d6e6 = function() {
810
+ imports.wbg.__wbg_call_b6338d98f39c7046 = function() {
804
811
  return handleError(function(arg0, arg1, arg2, arg3) {
805
812
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
806
813
  return addHeapObject(ret);
807
814
  }, arguments);
808
815
  };
809
- imports.wbg.__wbg_call_776890ca77946e2f = function() {
816
+ imports.wbg.__wbg_call_969f20e81a933ce8 = function() {
810
817
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
811
818
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
812
819
  return addHeapObject(ret);
813
820
  }, arguments);
814
821
  };
815
- imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function(arg0, arg1, arg2) {
822
+ imports.wbg.__wbg_set_3355b9f2d3092e3b = function(arg0, arg1, arg2) {
816
823
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
817
824
  return addHeapObject(ret);
818
825
  };
819
- imports.wbg.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
826
+ imports.wbg.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
820
827
  const ret = Number.isSafeInteger(getObject(arg0));
821
828
  return ret;
822
829
  };
823
- imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function(arg0) {
830
+ imports.wbg.__wbg_getTime_ed6ee333b702f8fc = function(arg0) {
824
831
  const ret = getObject(arg0).getTime();
825
832
  return ret;
826
833
  };
827
- imports.wbg.__wbg_new0_c0be7df4b6bd481f = function() {
834
+ imports.wbg.__wbg_new0_ad75dd38f92424e2 = function() {
828
835
  const ret = new Date;
829
836
  return addHeapObject(ret);
830
837
  };
831
- imports.wbg.__wbg_now_9c5990bda04c7e53 = function() {
838
+ imports.wbg.__wbg_now_4579335d3581594c = function() {
832
839
  const ret = Date.now();
833
840
  return ret;
834
841
  };
835
- imports.wbg.__wbg_entries_e51f29c7bba0c054 = function(arg0) {
842
+ imports.wbg.__wbg_entries_6d727b73ee02b7ce = function(arg0) {
836
843
  const ret = Object.entries(getObject(arg0));
837
844
  return addHeapObject(ret);
838
845
  };
839
- imports.wbg.__wbg_set_092e06b0f9d71865 = function() {
846
+ imports.wbg.__wbg_set_40f7786a25a9cc7e = function() {
840
847
  return handleError(function(arg0, arg1, arg2) {
841
848
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
842
849
  return ret;
843
850
  }, arguments);
844
851
  };
845
- imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
852
+ imports.wbg.__wbg_buffer_344d9b41efe96da7 = function(arg0) {
846
853
  const ret = getObject(arg0).buffer;
847
854
  return addHeapObject(ret);
848
855
  };
849
- imports.wbg.__wbg_instanceof_Promise_0e98a5bf082e090f = function(arg0) {
856
+ imports.wbg.__wbg_instanceof_Promise_cfbcc42300367513 = function(arg0) {
850
857
  let result;
851
858
  try {
852
859
  result = getObject(arg0) instanceof Promise;
853
- } catch {
860
+ } catch (_) {
854
861
  result = false;
855
862
  }
856
863
  const ret = result;
857
864
  return ret;
858
865
  };
859
- imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
866
+ imports.wbg.__wbg_new_feb65b865d980ae2 = function(arg0, arg1) {
860
867
  try {
861
868
  var state0 = { a: arg0, b: arg1 };
862
869
  var cb0 = (arg02, arg12) => {
863
870
  const a = state0.a;
864
871
  state0.a = 0;
865
872
  try {
866
- return __wbg_adapter_392(a, state0.b, arg02, arg12);
873
+ return __wbg_adapter_398(a, state0.b, arg02, arg12);
867
874
  } finally {
868
875
  state0.a = a;
869
876
  }
@@ -874,52 +881,52 @@ var __wbg_get_imports = function() {
874
881
  state0.a = state0.b = 0;
875
882
  }
876
883
  };
877
- imports.wbg.__wbg_reject_7bd6ac9617013c02 = function(arg0) {
884
+ imports.wbg.__wbg_reject_e4f6a4fa90f72e0f = function(arg0) {
878
885
  const ret = Promise.reject(getObject(arg0));
879
886
  return addHeapObject(ret);
880
887
  };
881
- imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
888
+ imports.wbg.__wbg_resolve_a3252b2860f0a09e = function(arg0) {
882
889
  const ret = Promise.resolve(getObject(arg0));
883
890
  return addHeapObject(ret);
884
891
  };
885
- imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
892
+ imports.wbg.__wbg_then_89e1c559530b85cf = function(arg0, arg1) {
886
893
  const ret = getObject(arg0).then(getObject(arg1));
887
894
  return addHeapObject(ret);
888
895
  };
889
- imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
896
+ imports.wbg.__wbg_then_1bbc9edafd859b06 = function(arg0, arg1, arg2) {
890
897
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
891
898
  return addHeapObject(ret);
892
899
  };
893
- imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
900
+ imports.wbg.__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3 = function(arg0, arg1, arg2) {
894
901
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
895
902
  return addHeapObject(ret);
896
903
  };
897
- imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
904
+ imports.wbg.__wbg_new_d8a000788389a31e = function(arg0) {
898
905
  const ret = new Uint8Array(getObject(arg0));
899
906
  return addHeapObject(ret);
900
907
  };
901
- imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
908
+ imports.wbg.__wbg_set_dcfd613a3420f908 = function(arg0, arg1, arg2) {
902
909
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
903
910
  };
904
- imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
911
+ imports.wbg.__wbg_length_a5587d6cd79ab197 = function(arg0) {
905
912
  const ret = getObject(arg0).length;
906
913
  return ret;
907
914
  };
908
- imports.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4 = function(arg0) {
915
+ imports.wbg.__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1 = function(arg0) {
909
916
  let result;
910
917
  try {
911
918
  result = getObject(arg0) instanceof Uint8Array;
912
- } catch {
919
+ } catch (_) {
913
920
  result = false;
914
921
  }
915
922
  const ret = result;
916
923
  return ret;
917
924
  };
918
- imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
925
+ imports.wbg.__wbg_newwithlength_13b5319ab422dcf6 = function(arg0) {
919
926
  const ret = new Uint8Array(arg0 >>> 0);
920
927
  return addHeapObject(ret);
921
928
  };
922
- imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
929
+ imports.wbg.__wbg_subarray_6ca5cfa7fbb9abbe = function(arg0, arg1, arg2) {
923
930
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
924
931
  return addHeapObject(ret);
925
932
  };
@@ -943,12 +950,12 @@ var __wbg_get_imports = function() {
943
950
  const ret = wasm.memory;
944
951
  return addHeapObject(ret);
945
952
  };
946
- imports.wbg.__wbindgen_closure_wrapper2211 = function(arg0, arg1, arg2) {
947
- const ret = makeMutClosure(arg0, arg1, 353, __wbg_adapter_52);
953
+ imports.wbg.__wbindgen_closure_wrapper2230 = function(arg0, arg1, arg2) {
954
+ const ret = makeMutClosure(arg0, arg1, 357, __wbg_adapter_52);
948
955
  return addHeapObject(ret);
949
956
  };
950
- imports.wbg.__wbindgen_closure_wrapper9909 = function(arg0, arg1, arg2) {
951
- const ret = makeMutClosure(arg0, arg1, 1334, __wbg_adapter_55);
957
+ imports.wbg.__wbindgen_closure_wrapper9979 = function(arg0, arg1, arg2) {
958
+ const ret = makeMutClosure(arg0, arg1, 1317, __wbg_adapter_55);
952
959
  return addHeapObject(ret);
953
960
  };
954
961
  return imports;
@@ -1010,11 +1017,13 @@ if (typeof TextDecoder !== "undefined") {
1010
1017
  var cachedBigInt64Memory0 = null;
1011
1018
  var cachedUint32Memory0 = null;
1012
1019
  var cachedUint16Memory0 = null;
1013
- var WirePolicy = Object.freeze({
1014
- Plaintext: 1,
1015
- "1": "Plaintext",
1016
- Ciphertext: 2,
1017
- "2": "Ciphertext"
1020
+ var DeviceStatus = Object.freeze({
1021
+ Valid: 0,
1022
+ "0": "Valid",
1023
+ Expired: 1,
1024
+ "1": "Expired",
1025
+ Revoked: 2,
1026
+ "2": "Revoked"
1018
1027
  });
1019
1028
  var CredentialType = Object.freeze({
1020
1029
  Basic: 1,
@@ -1022,6 +1031,12 @@ var CredentialType = Object.freeze({
1022
1031
  X509: 2,
1023
1032
  "2": "X509"
1024
1033
  });
1034
+ var WirePolicy = Object.freeze({
1035
+ Plaintext: 1,
1036
+ "1": "Plaintext",
1037
+ Ciphertext: 2,
1038
+ "2": "Ciphertext"
1039
+ });
1025
1040
  var Ciphersuite = Object.freeze({
1026
1041
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
1027
1042
  "1": "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519",
@@ -1064,7 +1079,7 @@ class AcmeChallenge {
1064
1079
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1065
1080
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1066
1081
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
1067
- wasm.__wbindgen_free(r0, r1 * 1);
1082
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1068
1083
  return v1;
1069
1084
  } finally {
1070
1085
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1270,12 +1285,6 @@ class CommitBundle {
1270
1285
  }
1271
1286
 
1272
1287
  class ConversationConfiguration {
1273
- static __wrap(ptr) {
1274
- ptr = ptr >>> 0;
1275
- const obj = Object.create(ConversationConfiguration.prototype);
1276
- obj.__wbg_ptr = ptr;
1277
- return obj;
1278
- }
1279
1288
  __destroy_into_raw() {
1280
1289
  const ptr = this.__wbg_ptr;
1281
1290
  this.__wbg_ptr = 0;
@@ -1297,7 +1306,8 @@ class ConversationConfiguration {
1297
1306
  if (r2) {
1298
1307
  throw takeObject(r1);
1299
1308
  }
1300
- return ConversationConfiguration.__wrap(r0);
1309
+ this.__wbg_ptr = r0 >>> 0;
1310
+ return this;
1301
1311
  } finally {
1302
1312
  wasm.__wbindgen_add_to_stack_pointer(16);
1303
1313
  }
@@ -1387,10 +1397,18 @@ class CoreCrypto {
1387
1397
  const ret = wasm.corecrypto_e2ei_is_enabled(this.__wbg_ptr, ciphersuite);
1388
1398
  return takeObject(ret);
1389
1399
  }
1390
- get_user_identities(conversation_id, client_ids) {
1400
+ get_device_identities(conversation_id, device_ids) {
1391
1401
  const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
1392
1402
  const len0 = WASM_VECTOR_LEN;
1393
- const ptr1 = passArrayJsValueToWasm0(client_ids, wasm.__wbindgen_malloc);
1403
+ const ptr1 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
1404
+ const len1 = WASM_VECTOR_LEN;
1405
+ const ret = wasm.corecrypto_get_device_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1406
+ return takeObject(ret);
1407
+ }
1408
+ get_user_identities(conversation_id, user_ids) {
1409
+ const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
1410
+ const len0 = WASM_VECTOR_LEN;
1411
+ const ptr1 = passArrayJsValueToWasm0(user_ids, wasm.__wbindgen_malloc);
1394
1412
  const len1 = WASM_VECTOR_LEN;
1395
1413
  const ret = wasm.corecrypto_get_user_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1396
1414
  return takeObject(ret);
@@ -1828,12 +1846,6 @@ class CoreCrypto {
1828
1846
  }
1829
1847
 
1830
1848
  class CoreCryptoWasmCallbacks {
1831
- static __wrap(ptr) {
1832
- ptr = ptr >>> 0;
1833
- const obj = Object.create(CoreCryptoWasmCallbacks.prototype);
1834
- obj.__wbg_ptr = ptr;
1835
- return obj;
1836
- }
1837
1849
  __destroy_into_raw() {
1838
1850
  const ptr = this.__wbg_ptr;
1839
1851
  this.__wbg_ptr = 0;
@@ -1845,17 +1857,12 @@ class CoreCryptoWasmCallbacks {
1845
1857
  }
1846
1858
  constructor(authorize, user_authorize, client_is_existing_group_user, ctx) {
1847
1859
  const ret = wasm.corecryptowasmcallbacks_new(addHeapObject(authorize), addHeapObject(user_authorize), addHeapObject(client_is_existing_group_user), addHeapObject(ctx));
1848
- return CoreCryptoWasmCallbacks.__wrap(ret);
1860
+ this.__wbg_ptr = ret >>> 0;
1861
+ return this;
1849
1862
  }
1850
1863
  }
1851
1864
 
1852
1865
  class CustomConfiguration {
1853
- static __wrap(ptr) {
1854
- ptr = ptr >>> 0;
1855
- const obj = Object.create(CustomConfiguration.prototype);
1856
- obj.__wbg_ptr = ptr;
1857
- return obj;
1858
- }
1859
1866
  __destroy_into_raw() {
1860
1867
  const ptr = this.__wbg_ptr;
1861
1868
  this.__wbg_ptr = 0;
@@ -1867,7 +1874,8 @@ class CustomConfiguration {
1867
1874
  }
1868
1875
  constructor(key_rotation_span, wire_policy) {
1869
1876
  const ret = wasm.customconfiguration_new(!isLikeNone(key_rotation_span), isLikeNone(key_rotation_span) ? 0 : key_rotation_span, isLikeNone(wire_policy) ? 3 : wire_policy);
1870
- return CustomConfiguration.__wrap(ret);
1877
+ this.__wbg_ptr = ret >>> 0;
1878
+ return this;
1871
1879
  }
1872
1880
  }
1873
1881
  class FfiWireE2EIdentity {
@@ -2207,12 +2215,6 @@ class GroupInfoBundle {
2207
2215
  }
2208
2216
 
2209
2217
  class Invitee {
2210
- static __wrap(ptr) {
2211
- ptr = ptr >>> 0;
2212
- const obj = Object.create(Invitee.prototype);
2213
- obj.__wbg_ptr = ptr;
2214
- return obj;
2215
- }
2216
2218
  __destroy_into_raw() {
2217
2219
  const ptr = this.__wbg_ptr;
2218
2220
  this.__wbg_ptr = 0;
@@ -2224,7 +2226,8 @@ class Invitee {
2224
2226
  }
2225
2227
  constructor(id, kp) {
2226
2228
  const ret = wasm.invitee_new(addHeapObject(id), addHeapObject(kp));
2227
- return Invitee.__wrap(ret);
2229
+ this.__wbg_ptr = ret >>> 0;
2230
+ return this;
2228
2231
  }
2229
2232
  get id() {
2230
2233
  const ret = wasm.invitee_id(this.__wbg_ptr);
@@ -2300,7 +2303,7 @@ class NewAcmeOrder {
2300
2303
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2301
2304
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2302
2305
  var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2303
- wasm.__wbindgen_free(r0, r1 * 4);
2306
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
2304
2307
  return v1;
2305
2308
  } finally {
2306
2309
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2313,7 +2316,7 @@ class NewAcmeOrder {
2313
2316
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2314
2317
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2315
2318
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
2316
- wasm.__wbindgen_free(r0, r1 * 1);
2319
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2317
2320
  return v1;
2318
2321
  } finally {
2319
2322
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2376,7 +2379,7 @@ class ProteusAutoPrekeyBundle {
2376
2379
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2377
2380
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2378
2381
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
2379
- wasm.__wbindgen_free(r0, r1 * 1);
2382
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2380
2383
  return v1;
2381
2384
  } finally {
2382
2385
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2404,26 +2407,12 @@ class WireIdentity {
2404
2407
  const ptr = this.__destroy_into_raw();
2405
2408
  wasm.__wbg_wireidentity_free(ptr);
2406
2409
  }
2407
- constructor(client_id, handle, display_name, domain, certificate) {
2408
- const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2409
- const len0 = WASM_VECTOR_LEN;
2410
- const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2411
- const len1 = WASM_VECTOR_LEN;
2412
- const ptr2 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2413
- const len2 = WASM_VECTOR_LEN;
2414
- const ptr3 = passStringToWasm0(domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2415
- const len3 = WASM_VECTOR_LEN;
2416
- const ptr4 = passStringToWasm0(certificate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2417
- const len4 = WASM_VECTOR_LEN;
2418
- const ret = wasm.wireidentity_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
2419
- return WireIdentity.__wrap(ret);
2420
- }
2421
- get client_id() {
2410
+ get clientId() {
2422
2411
  let deferred1_0;
2423
2412
  let deferred1_1;
2424
2413
  try {
2425
2414
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2426
- wasm.wireidentity_client_id(retptr, this.__wbg_ptr);
2415
+ wasm.__wbg_get_acmedirectory_newNonce(retptr, this.__wbg_ptr);
2427
2416
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2428
2417
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2429
2418
  deferred1_0 = r0;
@@ -2439,7 +2428,7 @@ class WireIdentity {
2439
2428
  let deferred1_1;
2440
2429
  try {
2441
2430
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2442
- wasm.wireidentity_handle(retptr, this.__wbg_ptr);
2431
+ wasm.__wbg_get_acmechallenge_url(retptr, this.__wbg_ptr);
2443
2432
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2444
2433
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2445
2434
  deferred1_0 = r0;
@@ -2450,12 +2439,12 @@ class WireIdentity {
2450
2439
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2451
2440
  }
2452
2441
  }
2453
- get display_name() {
2442
+ get displayName() {
2454
2443
  let deferred1_0;
2455
2444
  let deferred1_1;
2456
2445
  try {
2457
2446
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2458
- wasm.wireidentity_display_name(retptr, this.__wbg_ptr);
2447
+ wasm.__wbg_get_acmechallenge_target(retptr, this.__wbg_ptr);
2459
2448
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2460
2449
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2461
2450
  deferred1_0 = r0;
@@ -2471,7 +2460,7 @@ class WireIdentity {
2471
2460
  let deferred1_1;
2472
2461
  try {
2473
2462
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2474
- wasm.wireidentity_domain(retptr, this.__wbg_ptr);
2463
+ wasm.__wbg_get_acmedirectory_revokeCert(retptr, this.__wbg_ptr);
2475
2464
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2476
2465
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2477
2466
  deferred1_0 = r0;
@@ -2487,7 +2476,27 @@ class WireIdentity {
2487
2476
  let deferred1_1;
2488
2477
  try {
2489
2478
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2490
- wasm.wireidentity_certificate(retptr, this.__wbg_ptr);
2479
+ wasm.__wbg_get_wireidentity_certificate(retptr, this.__wbg_ptr);
2480
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2481
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2482
+ deferred1_0 = r0;
2483
+ deferred1_1 = r1;
2484
+ return getStringFromWasm0(r0, r1);
2485
+ } finally {
2486
+ wasm.__wbindgen_add_to_stack_pointer(16);
2487
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2488
+ }
2489
+ }
2490
+ get status() {
2491
+ const ret = wasm.__wbg_get_wireidentity_status(this.__wbg_ptr);
2492
+ return ret;
2493
+ }
2494
+ get thumbprint() {
2495
+ let deferred1_0;
2496
+ let deferred1_1;
2497
+ try {
2498
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2499
+ wasm.__wbg_get_wireidentity_thumbprint(retptr, this.__wbg_ptr);
2491
2500
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2492
2501
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2493
2502
  deferred1_0 = r0;
@@ -3018,8 +3027,11 @@ class CoreCrypto2 {
3018
3027
  async e2eiIsEnabled(ciphersuite) {
3019
3028
  return await CoreCryptoError.asyncMapErr(this.#cc.e2ei_is_enabled(ciphersuite));
3020
3029
  }
3021
- async getUserIdentities(conversationId, clientIds) {
3022
- return await CoreCryptoError.asyncMapErr(this.#cc.get_user_identities(conversationId, clientIds));
3030
+ async getDeviceIdentities(conversationId, deviceIds) {
3031
+ return await CoreCryptoError.asyncMapErr(this.#cc.get_device_identities(conversationId, deviceIds));
3032
+ }
3033
+ async getUserIdentities(conversationId, userIds) {
3034
+ return await CoreCryptoError.asyncMapErr(this.#cc.get_user_identities(conversationId, userIds));
3023
3035
  }
3024
3036
  static version() {
3025
3037
  this.#assertModuleLoaded();
@@ -3159,6 +3171,7 @@ var E2eiConversationState;
3159
3171
  })(E2eiConversationState || (E2eiConversationState = {}));
3160
3172
  export {
3161
3173
  WirePolicy2 as WirePolicy,
3174
+ WireIdentity,
3162
3175
  RatchetTreeType,
3163
3176
  ProposalType,
3164
3177
  NewAcmeOrder,
@@ -3167,6 +3180,7 @@ export {
3167
3180
  ExternalProposalType,
3168
3181
  E2eiEnrollment,
3169
3182
  E2eiConversationState,
3183
+ DeviceStatus,
3170
3184
  CredentialType2 as CredentialType,
3171
3185
  CoreCryptoError,
3172
3186
  CoreCrypto2 as CoreCrypto,