@wireapp/core-crypto 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
7
- "types": "platforms/web/corecrypto.d.js",
7
+ "types": "platforms/web/corecrypto.d.ts",
8
8
  "scripts": {
9
9
  "prepare": "npm run build",
10
10
  "build": "npm run clean && rollup -c crypto-ffi/bindings/js/rollup.config.js",
@@ -34,6 +34,14 @@ const heap = new Array(128).fill(undefined);
34
34
  heap.push(undefined, null, true, false);
35
35
  function getObject(idx) { return heap[idx]; }
36
36
  let heap_next = heap.length;
37
+ function addHeapObject(obj) {
38
+ if (heap_next === heap.length)
39
+ heap.push(heap.length + 1);
40
+ const idx = heap_next;
41
+ heap_next = heap[idx];
42
+ heap[idx] = obj;
43
+ return idx;
44
+ }
37
45
  function dropObject(idx) {
38
46
  if (idx < 132)
39
47
  return;
@@ -45,14 +53,6 @@ function takeObject(idx) {
45
53
  dropObject(idx);
46
54
  return ret;
47
55
  }
48
- function addHeapObject(obj) {
49
- if (heap_next === heap.length)
50
- heap.push(heap.length + 1);
51
- const idx = heap_next;
52
- heap_next = heap[idx];
53
- heap[idx] = obj;
54
- return idx;
55
- }
56
56
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
57
57
  cachedTextDecoder.decode();
58
58
  let cachedUint8Memory0 = null;
@@ -226,12 +226,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
226
  return real;
227
227
  }
228
228
  function __wbg_adapter_52(arg0, arg1, arg2) {
229
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4f5b84878d1a1cd6(arg0, arg1, addHeapObject(arg2));
229
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h56c36d723a01191f(arg0, arg1, addHeapObject(arg2));
230
230
  }
231
231
  function __wbg_adapter_55(arg0, arg1, arg2) {
232
232
  try {
233
233
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
234
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h86787f18fe84dc73(retptr, arg0, arg1, addHeapObject(arg2));
234
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdcf886fad5e08d14(retptr, arg0, arg1, addHeapObject(arg2));
235
235
  var r0 = getInt32Memory0()[retptr / 4 + 0];
236
236
  var r1 = getInt32Memory0()[retptr / 4 + 1];
237
237
  if (r1) {
@@ -282,7 +282,7 @@ function handleError(f, args) {
282
282
  }
283
283
  }
284
284
  function __wbg_adapter_285(arg0, arg1, arg2, arg3) {
285
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h77a2ddbf015f399a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
285
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h1ca1c588492035e5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
286
286
  }
287
287
  /**
288
288
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -2427,9 +2427,6 @@ async function load(module, imports) {
2427
2427
  function getImports() {
2428
2428
  const imports = {};
2429
2429
  imports.wbg = {};
2430
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2431
- takeObject(arg0);
2432
- };
2433
2430
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2434
2431
  const ret = getObject(arg0);
2435
2432
  return addHeapObject(ret);
@@ -2439,6 +2436,9 @@ function getImports() {
2439
2436
  const ret = typeof (val) === 'object' && val !== null;
2440
2437
  return ret;
2441
2438
  };
2439
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2440
+ takeObject(arg0);
2441
+ };
2442
2442
  imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function (arg0, arg1) {
2443
2443
  const ret = getObject(arg0)[getObject(arg1)];
2444
2444
  return addHeapObject(ret);
@@ -2479,22 +2479,18 @@ function getImports() {
2479
2479
  const ret = getObject(arg0).length;
2480
2480
  return ret;
2481
2481
  };
2482
- imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2483
- const ret = new Uint8Array(getObject(arg0));
2484
- return addHeapObject(ret);
2485
- };
2486
2482
  imports.wbg.__wbg_call_9495de66fdbe016b = function () {
2487
2483
  return handleError(function (arg0, arg1, arg2) {
2488
2484
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2489
2485
  return addHeapObject(ret);
2490
2486
  }, arguments);
2491
2487
  };
2492
- imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2493
- const ret = FfiWireE2EIdentity.__wrap(arg0);
2488
+ imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2489
+ const ret = new Uint8Array(getObject(arg0));
2494
2490
  return addHeapObject(ret);
2495
2491
  };
2496
- imports.wbg.__wbg_new_f9876326328f45ed = function () {
2497
- const ret = new Object();
2492
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2493
+ const ret = BigInt.asUintN(64, arg0);
2498
2494
  return addHeapObject(ret);
2499
2495
  };
2500
2496
  imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
@@ -2505,10 +2501,6 @@ function getImports() {
2505
2501
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2506
2502
  return addHeapObject(ret);
2507
2503
  };
2508
- imports.wbg.__wbindgen_number_new = function (arg0) {
2509
- const ret = arg0;
2510
- return addHeapObject(ret);
2511
- };
2512
2504
  imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function (arg0, arg1) {
2513
2505
  try {
2514
2506
  var state0 = { a: arg0, b: arg1 };
@@ -2529,6 +2521,14 @@ function getImports() {
2529
2521
  state0.a = state0.b = 0;
2530
2522
  }
2531
2523
  };
2524
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2525
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2526
+ return addHeapObject(ret);
2527
+ };
2528
+ imports.wbg.__wbindgen_number_new = function (arg0) {
2529
+ const ret = arg0;
2530
+ return addHeapObject(ret);
2531
+ };
2532
2532
  imports.wbg.__wbg_new_b525de17f44a8943 = function () {
2533
2533
  const ret = new Array();
2534
2534
  return addHeapObject(ret);
@@ -2537,12 +2537,12 @@ function getImports() {
2537
2537
  const ret = getObject(arg0).push(getObject(arg1));
2538
2538
  return ret;
2539
2539
  };
2540
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2541
- const ret = BigInt.asUintN(64, arg0);
2540
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2541
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
2542
2542
  return addHeapObject(ret);
2543
2543
  };
2544
- imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2545
- const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2544
+ imports.wbg.__wbg_new_f9876326328f45ed = function () {
2545
+ const ret = new Object();
2546
2546
  return addHeapObject(ret);
2547
2547
  };
2548
2548
  imports.wbg.__wbg_setonsuccess_925a7718d3f62bc1 = function (arg0, arg1) {
@@ -2926,12 +2926,6 @@ function getImports() {
2926
2926
  const ret = getObject(arg0).target;
2927
2927
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2928
2928
  };
2929
- imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2930
- return handleError(function (arg0) {
2931
- const ret = getObject(arg0).error;
2932
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2933
- }, arguments);
2934
- };
2935
2929
  imports.wbg.__wbg_result_3a1fef332bc47038 = function () {
2936
2930
  return handleError(function (arg0) {
2937
2931
  const ret = getObject(arg0).result;
@@ -2972,6 +2966,12 @@ function getImports() {
2972
2966
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2973
2967
  }, arguments);
2974
2968
  };
2969
+ imports.wbg.__wbg_error_f64b8d41ed4d2fdc = function () {
2970
+ return handleError(function (arg0) {
2971
+ const ret = getObject(arg0).error;
2972
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2973
+ }, arguments);
2974
+ };
2975
2975
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
2976
2976
  const ret = !getObject(arg0);
2977
2977
  return ret;
@@ -3136,12 +3136,12 @@ function getImports() {
3136
3136
  return addHeapObject(ret);
3137
3137
  }, arguments);
3138
3138
  };
3139
- imports.wbg.__wbindgen_closure_wrapper1537 = function (arg0, arg1, arg2) {
3140
- const ret = makeMutClosure(arg0, arg1, 155, __wbg_adapter_52);
3139
+ imports.wbg.__wbindgen_closure_wrapper1540 = function (arg0, arg1, arg2) {
3140
+ const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_52);
3141
3141
  return addHeapObject(ret);
3142
3142
  };
3143
- imports.wbg.__wbindgen_closure_wrapper4550 = function (arg0, arg1, arg2) {
3144
- const ret = makeMutClosure(arg0, arg1, 155, __wbg_adapter_55);
3143
+ imports.wbg.__wbindgen_closure_wrapper4618 = function (arg0, arg1, arg2) {
3144
+ const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_55);
3145
3145
  return addHeapObject(ret);
3146
3146
  };
3147
3147
  return imports;
@@ -3202,7 +3202,7 @@ var exports = /*#__PURE__*/Object.freeze({
3202
3202
  var wasm = async (opt = {}) => {
3203
3203
  let {importHook, serverPath} = opt;
3204
3204
 
3205
- let path = "assets/core_crypto_ffi-65dbc085.wasm";
3205
+ let path = "assets/core_crypto_ffi-db9a9765.wasm";
3206
3206
 
3207
3207
  if (serverPath != null) {
3208
3208
  path = serverPath + /[^\/\\]*$/.exec(path)[0];