@wireapp/core-crypto 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -35,6 +35,14 @@ const heap = new Array(128).fill(undefined);
35
35
  heap.push(undefined, null, true, false);
36
36
  function getObject(idx) { return heap[idx]; }
37
37
  let heap_next = heap.length;
38
+ function addHeapObject(obj) {
39
+ if (heap_next === heap.length)
40
+ heap.push(heap.length + 1);
41
+ const idx = heap_next;
42
+ heap_next = heap[idx];
43
+ heap[idx] = obj;
44
+ return idx;
45
+ }
38
46
  function dropObject(idx) {
39
47
  if (idx < 132)
40
48
  return;
@@ -46,14 +54,6 @@ function takeObject(idx) {
46
54
  dropObject(idx);
47
55
  return ret;
48
56
  }
49
- function addHeapObject(obj) {
50
- if (heap_next === heap.length)
51
- heap.push(heap.length + 1);
52
- const idx = heap_next;
53
- heap_next = heap[idx];
54
- heap[idx] = obj;
55
- return idx;
56
- }
57
57
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
58
58
  if (typeof TextDecoder !== 'undefined') {
59
59
  cachedTextDecoder.decode();
@@ -230,12 +230,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
230
230
  return real;
231
231
  }
232
232
  function __wbg_adapter_52(arg0, arg1, arg2) {
233
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hca6e257aac6d0416(arg0, arg1, addHeapObject(arg2));
233
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9c249377169e2f4c(arg0, arg1, addHeapObject(arg2));
234
234
  }
235
235
  function __wbg_adapter_55(arg0, arg1, arg2) {
236
236
  try {
237
237
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
238
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h82968d72c5531950(retptr, arg0, arg1, addHeapObject(arg2));
238
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hee720ad0abaf79d4(retptr, arg0, arg1, addHeapObject(arg2));
239
239
  var r0 = getInt32Memory0()[retptr / 4 + 0];
240
240
  var r1 = getInt32Memory0()[retptr / 4 + 1];
241
241
  if (r1) {
@@ -300,7 +300,7 @@ function handleError(f, args) {
300
300
  }
301
301
  }
302
302
  function __wbg_adapter_288(arg0, arg1, arg2, arg3) {
303
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__ha54056c10ac24945(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
303
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__ha9bc5bb1a764a589(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
304
304
  }
305
305
  /**
306
306
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -2600,13 +2600,13 @@ async function __wbg_load(module, imports) {
2600
2600
  function __wbg_get_imports() {
2601
2601
  const imports = {};
2602
2602
  imports.wbg = {};
2603
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2604
- takeObject(arg0);
2605
- };
2606
2603
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2607
2604
  const ret = getObject(arg0);
2608
2605
  return addHeapObject(ret);
2609
2606
  };
2607
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2608
+ takeObject(arg0);
2609
+ };
2610
2610
  imports.wbg.__wbindgen_is_object = function (arg0) {
2611
2611
  const val = getObject(arg0);
2612
2612
  const ret = typeof (val) === 'object' && val !== null;
@@ -2663,24 +2663,16 @@ function __wbg_get_imports() {
2663
2663
  const ret = getObject(arg0).length;
2664
2664
  return ret;
2665
2665
  };
2666
- imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
2667
- const ret = new Uint8Array(getObject(arg0));
2668
- return addHeapObject(ret);
2669
- };
2670
2666
  imports.wbg.__wbg_call_587b30eea3e09332 = function () {
2671
2667
  return handleError(function (arg0, arg1, arg2) {
2672
2668
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2673
2669
  return addHeapObject(ret);
2674
2670
  }, arguments);
2675
2671
  };
2676
- imports.wbg.__wbg_new_0394642eae39db16 = function () {
2677
- const ret = new Array();
2672
+ imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
2673
+ const ret = new Uint8Array(getObject(arg0));
2678
2674
  return addHeapObject(ret);
2679
2675
  };
2680
- imports.wbg.__wbg_push_109cfc26d02582dd = function (arg0, arg1) {
2681
- const ret = getObject(arg0).push(getObject(arg1));
2682
- return ret;
2683
- };
2684
2676
  imports.wbg.__wbg_new_2b55e405e4af4986 = function (arg0, arg1) {
2685
2677
  try {
2686
2678
  var state0 = { a: arg0, b: arg1 };
@@ -2701,10 +2693,14 @@ function __wbg_get_imports() {
2701
2693
  state0.a = state0.b = 0;
2702
2694
  }
2703
2695
  };
2704
- imports.wbg.__wbindgen_number_new = function (arg0) {
2705
- const ret = arg0;
2696
+ imports.wbg.__wbg_new_0394642eae39db16 = function () {
2697
+ const ret = new Array();
2706
2698
  return addHeapObject(ret);
2707
2699
  };
2700
+ imports.wbg.__wbg_push_109cfc26d02582dd = function (arg0, arg1) {
2701
+ const ret = getObject(arg0).push(getObject(arg1));
2702
+ return ret;
2703
+ };
2708
2704
  imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function () {
2709
2705
  const ret = new Map();
2710
2706
  return addHeapObject(ret);
@@ -2713,16 +2709,20 @@ function __wbg_get_imports() {
2713
2709
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2714
2710
  return addHeapObject(ret);
2715
2711
  };
2716
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2717
- const ret = BigInt.asUintN(64, arg0);
2712
+ imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
2713
+ const ret = new Object();
2718
2714
  return addHeapObject(ret);
2719
2715
  };
2720
2716
  imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2721
2717
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2722
2718
  return addHeapObject(ret);
2723
2719
  };
2724
- imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
2725
- const ret = new Object();
2720
+ imports.wbg.__wbindgen_number_new = function (arg0) {
2721
+ const ret = arg0;
2722
+ return addHeapObject(ret);
2723
+ };
2724
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2725
+ const ret = BigInt.asUintN(64, arg0);
2726
2726
  return addHeapObject(ret);
2727
2727
  };
2728
2728
  imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
@@ -3091,12 +3091,6 @@ function __wbg_get_imports() {
3091
3091
  const ret = getObject(arg0).target;
3092
3092
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
3093
3093
  };
3094
- imports.wbg.__wbg_error_a16f2288166003c0 = function () {
3095
- return handleError(function (arg0) {
3096
- const ret = getObject(arg0).error;
3097
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
3098
- }, arguments);
3099
- };
3100
3094
  imports.wbg.__wbg_result_fcdf1e20f03fa375 = function () {
3101
3095
  return handleError(function (arg0) {
3102
3096
  const ret = getObject(arg0).result;
@@ -3137,6 +3131,12 @@ function __wbg_get_imports() {
3137
3131
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
3138
3132
  }, arguments);
3139
3133
  };
3134
+ imports.wbg.__wbg_error_a16f2288166003c0 = function () {
3135
+ return handleError(function (arg0) {
3136
+ const ret = getObject(arg0).error;
3137
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3138
+ }, arguments);
3139
+ };
3140
3140
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
3141
3141
  const ret = !getObject(arg0);
3142
3142
  return ret;
@@ -3301,12 +3301,12 @@ function __wbg_get_imports() {
3301
3301
  return addHeapObject(ret);
3302
3302
  }, arguments);
3303
3303
  };
3304
- imports.wbg.__wbindgen_closure_wrapper1663 = function (arg0, arg1, arg2) {
3305
- const ret = makeMutClosure(arg0, arg1, 162, __wbg_adapter_52);
3304
+ imports.wbg.__wbindgen_closure_wrapper1659 = function (arg0, arg1, arg2) {
3305
+ const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_52);
3306
3306
  return addHeapObject(ret);
3307
3307
  };
3308
- imports.wbg.__wbindgen_closure_wrapper4791 = function (arg0, arg1, arg2) {
3309
- const ret = makeMutClosure(arg0, arg1, 162, __wbg_adapter_55);
3308
+ imports.wbg.__wbindgen_closure_wrapper4794 = function (arg0, arg1, arg2) {
3309
+ const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_55);
3310
3310
  return addHeapObject(ret);
3311
3311
  };
3312
3312
  return imports;
@@ -3373,7 +3373,7 @@ var exports = /*#__PURE__*/Object.freeze({
3373
3373
  var wasm = async (opt = {}) => {
3374
3374
  let {importHook, serverPath} = opt;
3375
3375
 
3376
- let path = "assets/core_crypto_ffi-3aab42da.wasm";
3376
+ let path = "assets/core_crypto_ffi-8c5ea533.wasm";
3377
3377
 
3378
3378
  if (serverPath != null) {
3379
3379
  path = serverPath + /[^\/\\]*$/.exec(path)[0];