@wireapp/core-crypto 9.2.0 → 9.3.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.2.0",
3
+ "version": "9.3.0",
4
4
  "author": "Wire CoreCrypto team <team.corecrypto@wire.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -247,12 +247,12 @@ export const __wbg_get_decryptedmessage_senderClientId: (a: number) => number;
247
247
  export const __wbg_get_decryptedmessage_identity: (a: number) => number;
248
248
  export const __wbg_get_decryptedmessage_commitDelay: (a: number) => [number, bigint];
249
249
  export const __wbg_get_decryptedmessage_message: (a: number) => [number, number];
250
+ export const secretkey_new: (a: number, b: number) => number;
250
251
  export const welcome_new: (a: number, b: number) => number;
251
252
  export const keypackage_new: (a: number, b: number) => number;
253
+ export const conversationid_new: (a: number, b: number) => number;
252
254
  export const groupinfo_new: (a: number, b: number) => number;
253
255
  export const externalsenderkey_new: (a: number, b: number) => number;
254
- export const secretkey_new: (a: number, b: number) => number;
255
- export const conversationid_new: (a: number, b: number) => number;
256
256
  export const __wbg_proteusautoprekeybundle_free: (a: number, b: number) => void;
257
257
  export const __wbg_welcome_free: (a: number, b: number) => void;
258
258
  export const __wbg_mlstransportdata_free: (a: number, b: number) => void;
@@ -268,11 +268,11 @@ export const __wbindgen_exn_store: (a: number) => void;
268
268
  export const __externref_table_alloc: () => number;
269
269
  export const __wbindgen_export_4: WebAssembly.Table;
270
270
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
271
+ export const __wbindgen_export_6: WebAssembly.Table;
271
272
  export const __externref_drop_slice: (a: number, b: number) => void;
272
- export const __wbindgen_export_7: WebAssembly.Table;
273
273
  export const __externref_table_dealloc: (a: number) => 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
274
  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;
275
+ export const closure2905_externref_shim: (a: number, b: number, c: any) => void;
276
+ export const closure2597_externref_shim: (a: number, b: number, c: any) => void;
277
+ export const closure3007_externref_shim: (a: number, b: number, c: any, d: any) => void;
278
278
  export const __wbindgen_start: () => void;
package/src/corecrypto.js CHANGED
@@ -1,3 +1,19 @@
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
+ };
1
17
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
18
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
19
  }) : x)(function(x) {
@@ -311,18 +327,8 @@ ${val.stack}`;
311
327
  }
312
328
  return className;
313
329
  }
314
- function getArrayJsValueFromWasm0(ptr, len) {
315
- ptr = ptr >>> 0;
316
- const mem = getDataViewMemory0();
317
- const result = [];
318
- for (let i = ptr;i < ptr + 4 * len; i += 4) {
319
- result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
320
- }
321
- wasm.__externref_drop_slice(ptr, len);
322
- return result;
323
- }
324
330
  var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((state) => {
325
- wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
331
+ wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
326
332
  });
327
333
  function makeMutClosure(arg0, arg1, dtor, f) {
328
334
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -334,7 +340,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
334
340
  return f(a, state.b, ...args);
335
341
  } finally {
336
342
  if (--state.cnt === 0) {
337
- wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
343
+ wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
338
344
  CLOSURE_DTORS.unregister(state);
339
345
  } else {
340
346
  state.a = a;
@@ -345,6 +351,16 @@ function makeMutClosure(arg0, arg1, dtor, f) {
345
351
  CLOSURE_DTORS.register(real, state, state);
346
352
  return real;
347
353
  }
354
+ function getArrayJsValueFromWasm0(ptr, len) {
355
+ ptr = ptr >>> 0;
356
+ const mem = getDataViewMemory0();
357
+ const result = [];
358
+ for (let i = ptr;i < ptr + 4 * len; i += 4) {
359
+ result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
360
+ }
361
+ wasm.__externref_drop_slice(ptr, len);
362
+ return result;
363
+ }
348
364
  function _assertClass(instance, klass) {
349
365
  if (!(instance instanceof klass)) {
350
366
  throw new Error(`expected instance of ${klass.name}`);
@@ -423,16 +439,16 @@ function build_metadata() {
423
439
  return BuildMetadata.__wrap(ret);
424
440
  }
425
441
  function __wbg_adapter_8(arg0, arg1, arg2) {
426
- wasm.closure2600_externref_shim(arg0, arg1, arg2);
442
+ wasm.closure1026_externref_shim(arg0, arg1, arg2);
427
443
  }
428
- function __wbg_adapter_13(arg0, arg1, arg2) {
429
- wasm.closure2909_externref_shim(arg0, arg1, arg2);
444
+ function __wbg_adapter_19(arg0, arg1, arg2) {
445
+ wasm.closure2905_externref_shim(arg0, arg1, arg2);
430
446
  }
431
- function __wbg_adapter_18(arg0, arg1, arg2) {
432
- wasm.closure1026_externref_shim(arg0, arg1, arg2);
447
+ function __wbg_adapter_30(arg0, arg1, arg2) {
448
+ wasm.closure2597_externref_shim(arg0, arg1, arg2);
433
449
  }
434
450
  function __wbg_adapter_511(arg0, arg1, arg2, arg3) {
435
- wasm.closure3010_externref_shim(arg0, arg1, arg2, arg3);
451
+ wasm.closure3007_externref_shim(arg0, arg1, arg2, arg3);
436
452
  }
437
453
  var Ciphersuite = Object.freeze({
438
454
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
@@ -2898,7 +2914,7 @@ function __wbg_get_imports() {
2898
2914
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2899
2915
  }
2900
2916
  };
2901
- imports.wbg.__wbg_execute_09ff4bbba08ec862 = function() {
2917
+ imports.wbg.__wbg_execute_ceed124e81aadaf1 = function() {
2902
2918
  return handleError(function(arg0, arg1) {
2903
2919
  const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
2904
2920
  return ret;
@@ -3530,6 +3546,10 @@ function __wbg_get_imports() {
3530
3546
  const ret = WireIdentity.__wrap(arg0);
3531
3547
  return ret;
3532
3548
  };
3549
+ imports.wbg.__wbindgen_cast_0c43e13425ebdddc = function(arg0, arg1) {
3550
+ const ret = makeMutClosure(arg0, arg1, 2904, __wbg_adapter_19);
3551
+ return ret;
3552
+ };
3533
3553
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
3534
3554
  const ret = getStringFromWasm0(arg0, arg1);
3535
3555
  return ret;
@@ -3540,10 +3560,6 @@ function __wbg_get_imports() {
3540
3560
  const ret = v0;
3541
3561
  return ret;
3542
3562
  };
3543
- imports.wbg.__wbindgen_cast_2baa7f4ea256cb04 = function(arg0, arg1) {
3544
- const ret = makeMutClosure(arg0, arg1, 2908, __wbg_adapter_13);
3545
- return ret;
3546
- };
3547
3563
  imports.wbg.__wbindgen_cast_2e1c22bbccdbf7b5 = function(arg0, arg1) {
3548
3564
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3549
3565
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3561,7 +3577,7 @@ function __wbg_get_imports() {
3561
3577
  return ret;
3562
3578
  };
3563
3579
  imports.wbg.__wbindgen_cast_77ac86d8075f2f98 = function(arg0, arg1) {
3564
- const ret = makeMutClosure(arg0, arg1, 1025, __wbg_adapter_18);
3580
+ const ret = makeMutClosure(arg0, arg1, 1025, __wbg_adapter_8);
3565
3581
  return ret;
3566
3582
  };
3567
3583
  imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
@@ -3570,6 +3586,10 @@ function __wbg_get_imports() {
3570
3586
  const ret = v0;
3571
3587
  return ret;
3572
3588
  };
3589
+ imports.wbg.__wbindgen_cast_a834b411bd2663eb = function(arg0, arg1) {
3590
+ const ret = makeMutClosure(arg0, arg1, 2596, __wbg_adapter_30);
3591
+ return ret;
3592
+ };
3573
3593
  imports.wbg.__wbindgen_cast_b77aa29fa8fe8560 = function(arg0, arg1) {
3574
3594
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3575
3595
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3580,10 +3600,6 @@ function __wbg_get_imports() {
3580
3600
  const ret = getArrayU8FromWasm0(arg0, arg1);
3581
3601
  return ret;
3582
3602
  };
3583
- imports.wbg.__wbindgen_cast_cbc163adba6f840a = function(arg0, arg1) {
3584
- const ret = makeMutClosure(arg0, arg1, 2599, __wbg_adapter_8);
3585
- return ret;
3586
- };
3587
3603
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
3588
3604
  const ret = arg0;
3589
3605
  return ret;