@wireapp/core-crypto 9.1.2 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "9.1.2",
3
+ "version": "9.2.0",
4
4
  "author": "Wire CoreCrypto team <team.corecrypto@wire.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,6 +51,7 @@ export const corecrypto_get_device_identities: (a: number, b: number, c: number,
51
51
  export const corecrypto_get_user_identities: (a: number, b: number, c: number, d: number) => any;
52
52
  export const corecrypto_e2ei_is_pki_env_setup: (a: number) => any;
53
53
  export const corecrypto_e2ei_is_enabled: (a: number, b: number) => any;
54
+ export const corecrypto_e2ei_conversation_state: (a: number, b: number) => any;
54
55
  export const __wbg_epochobserver_free: (a: number, b: number) => void;
55
56
  export const epochobserver_new: (a: any, b: any) => [number, number, number];
56
57
  export const corecrypto_register_epoch_observer: (a: number, b: number) => any;
@@ -246,11 +247,11 @@ export const __wbg_get_decryptedmessage_senderClientId: (a: number) => number;
246
247
  export const __wbg_get_decryptedmessage_identity: (a: number) => number;
247
248
  export const __wbg_get_decryptedmessage_commitDelay: (a: number) => [number, bigint];
248
249
  export const __wbg_get_decryptedmessage_message: (a: number) => [number, number];
250
+ export const welcome_new: (a: number, b: number) => number;
249
251
  export const keypackage_new: (a: number, b: number) => number;
250
- export const externalsenderkey_new: (a: number, b: number) => number;
251
252
  export const groupinfo_new: (a: number, b: number) => number;
253
+ export const externalsenderkey_new: (a: number, b: number) => number;
252
254
  export const secretkey_new: (a: number, b: number) => number;
253
- export const welcome_new: (a: number, b: number) => number;
254
255
  export const conversationid_new: (a: number, b: number) => number;
255
256
  export const __wbg_proteusautoprekeybundle_free: (a: number, b: number) => void;
256
257
  export const __wbg_welcome_free: (a: number, b: number) => void;
@@ -270,8 +271,8 @@ export const __wbindgen_free: (a: number, b: number, c: number) => void;
270
271
  export const __externref_drop_slice: (a: number, b: number) => void;
271
272
  export const __wbindgen_export_7: WebAssembly.Table;
272
273
  export const __externref_table_dealloc: (a: number) => void;
273
- export const closure1021_externref_shim: (a: number, b: number, c: any) => void;
274
- export const closure2587_externref_shim: (a: number, b: number, c: any) => void;
275
- export const closure2900_externref_shim: (a: number, b: number, c: any) => void;
276
- export const closure3001_externref_shim: (a: number, b: number, c: any, d: any) => void;
274
+ export const closure2600_externref_shim: (a: number, b: number, c: any) => void;
275
+ export const closure2909_externref_shim: (a: number, b: number, c: any) => void;
276
+ export const closure1026_externref_shim: (a: number, b: number, c: any) => void;
277
+ export const closure3010_externref_shim: (a: number, b: number, c: any, d: any) => void;
277
278
  export const __wbindgen_start: () => void;
package/src/corecrypto.js CHANGED
@@ -1,19 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __toESM = (mod, isNodeMode, target) => {
7
- target = mod != null ? __create(__getProtoOf(mod)) : {};
8
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
- for (let key of __getOwnPropNames(mod))
10
- if (!__hasOwnProp.call(to, key))
11
- __defProp(to, key, {
12
- get: () => mod[key],
13
- enumerable: true
14
- });
15
- return to;
16
- };
17
1
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
2
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
3
  }) : x)(function(x) {
@@ -438,17 +422,17 @@ function build_metadata() {
438
422
  const ret = wasm.build_metadata();
439
423
  return BuildMetadata.__wrap(ret);
440
424
  }
441
- function __wbg_adapter_10(arg0, arg1, arg2) {
442
- wasm.closure1021_externref_shim(arg0, arg1, arg2);
425
+ function __wbg_adapter_8(arg0, arg1, arg2) {
426
+ wasm.closure2600_externref_shim(arg0, arg1, arg2);
443
427
  }
444
- function __wbg_adapter_15(arg0, arg1, arg2) {
445
- wasm.closure2587_externref_shim(arg0, arg1, arg2);
428
+ function __wbg_adapter_13(arg0, arg1, arg2) {
429
+ wasm.closure2909_externref_shim(arg0, arg1, arg2);
446
430
  }
447
431
  function __wbg_adapter_18(arg0, arg1, arg2) {
448
- wasm.closure2900_externref_shim(arg0, arg1, arg2);
432
+ wasm.closure1026_externref_shim(arg0, arg1, arg2);
449
433
  }
450
- function __wbg_adapter_510(arg0, arg1, arg2, arg3) {
451
- wasm.closure3001_externref_shim(arg0, arg1, arg2, arg3);
434
+ function __wbg_adapter_511(arg0, arg1, arg2, arg3) {
435
+ wasm.closure3010_externref_shim(arg0, arg1, arg2, arg3);
452
436
  }
453
437
  var Ciphersuite = Object.freeze({
454
438
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
@@ -1061,6 +1045,11 @@ class CoreCrypto {
1061
1045
  const ret = wasm.corecrypto_e2ei_is_enabled(this.__wbg_ptr, ciphersuite);
1062
1046
  return ret;
1063
1047
  }
1048
+ e2ei_conversation_state(conversation_id) {
1049
+ _assertClass(conversation_id, ConversationId);
1050
+ const ret = wasm.corecrypto_e2ei_conversation_state(this.__wbg_ptr, conversation_id.__wbg_ptr);
1051
+ return ret;
1052
+ }
1064
1053
  register_epoch_observer(epoch_observer) {
1065
1054
  _assertClass(epoch_observer, EpochObserver);
1066
1055
  var ptr0 = epoch_observer.__destroy_into_raw();
@@ -2909,7 +2898,7 @@ function __wbg_get_imports() {
2909
2898
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2910
2899
  }
2911
2900
  };
2912
- imports.wbg.__wbg_execute_7a329812137e03ee = function() {
2901
+ imports.wbg.__wbg_execute_09ff4bbba08ec862 = function() {
2913
2902
  return handleError(function(arg0, arg1) {
2914
2903
  const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
2915
2904
  return ret;
@@ -2945,7 +2934,7 @@ function __wbg_get_imports() {
2945
2934
  return ret;
2946
2935
  }, arguments);
2947
2936
  };
2948
- imports.wbg.__wbg_getRandomValues_38a1ff1ea09f6cc7 = function() {
2937
+ imports.wbg.__wbg_getRandomValues_9b655bdd369112f2 = function() {
2949
2938
  return handleError(function(arg0, arg1) {
2950
2939
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2951
2940
  }, arguments);
@@ -3162,7 +3151,7 @@ function __wbg_get_imports() {
3162
3151
  const a = state0.a;
3163
3152
  state0.a = 0;
3164
3153
  try {
3165
- return __wbg_adapter_510(a, state0.b, arg02, arg12);
3154
+ return __wbg_adapter_511(a, state0.b, arg02, arg12);
3166
3155
  } finally {
3167
3156
  state0.a = a;
3168
3157
  }
@@ -3551,16 +3540,16 @@ function __wbg_get_imports() {
3551
3540
  const ret = v0;
3552
3541
  return ret;
3553
3542
  };
3543
+ imports.wbg.__wbindgen_cast_2baa7f4ea256cb04 = function(arg0, arg1) {
3544
+ const ret = makeMutClosure(arg0, arg1, 2908, __wbg_adapter_13);
3545
+ return ret;
3546
+ };
3554
3547
  imports.wbg.__wbindgen_cast_2e1c22bbccdbf7b5 = function(arg0, arg1) {
3555
3548
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3556
3549
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3557
3550
  const ret = v0;
3558
3551
  return ret;
3559
3552
  };
3560
- imports.wbg.__wbindgen_cast_3b24be8277f06041 = function(arg0, arg1) {
3561
- const ret = makeMutClosure(arg0, arg1, 2899, __wbg_adapter_18);
3562
- return ret;
3563
- };
3564
3553
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
3565
3554
  const ret = BigInt.asUintN(64, arg0);
3566
3555
  return ret;
@@ -3571,8 +3560,8 @@ function __wbg_get_imports() {
3571
3560
  const ret = v0;
3572
3561
  return ret;
3573
3562
  };
3574
- imports.wbg.__wbindgen_cast_63e1f1d269ff3fa8 = function(arg0, arg1) {
3575
- const ret = makeMutClosure(arg0, arg1, 2586, __wbg_adapter_15);
3563
+ imports.wbg.__wbindgen_cast_77ac86d8075f2f98 = function(arg0, arg1) {
3564
+ const ret = makeMutClosure(arg0, arg1, 1025, __wbg_adapter_18);
3576
3565
  return ret;
3577
3566
  };
3578
3567
  imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
@@ -3581,10 +3570,6 @@ function __wbg_get_imports() {
3581
3570
  const ret = v0;
3582
3571
  return ret;
3583
3572
  };
3584
- imports.wbg.__wbindgen_cast_9b175b9f4d06c9c3 = function(arg0, arg1) {
3585
- const ret = makeMutClosure(arg0, arg1, 1020, __wbg_adapter_10);
3586
- return ret;
3587
- };
3588
3573
  imports.wbg.__wbindgen_cast_b77aa29fa8fe8560 = function(arg0, arg1) {
3589
3574
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3590
3575
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3595,6 +3580,10 @@ function __wbg_get_imports() {
3595
3580
  const ret = getArrayU8FromWasm0(arg0, arg1);
3596
3581
  return ret;
3597
3582
  };
3583
+ imports.wbg.__wbindgen_cast_cbc163adba6f840a = function(arg0, arg1) {
3584
+ const ret = makeMutClosure(arg0, arg1, 2599, __wbg_adapter_8);
3585
+ return ret;
3586
+ };
3598
3587
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
3599
3588
  const ret = arg0;
3600
3589
  return ret;