@wireapp/core-crypto 0.6.0-rc.1 → 0.6.0-rc.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.6.0-rc.1",
3
+ "version": "0.6.0-rc.2",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -36,15 +36,6 @@ function getObject(idx) { return heap[idx]; }
36
36
 
37
37
  let heap_next = heap.length;
38
38
 
39
- function addHeapObject(obj) {
40
- if (heap_next === heap.length) heap.push(heap.length + 1);
41
- const idx = heap_next;
42
- heap_next = heap[idx];
43
-
44
- heap[idx] = obj;
45
- return idx;
46
- }
47
-
48
39
  function dropObject(idx) {
49
40
  if (idx < 36) return;
50
41
  heap[idx] = heap_next;
@@ -57,6 +48,15 @@ function takeObject(idx) {
57
48
  return ret;
58
49
  }
59
50
 
51
+ function addHeapObject(obj) {
52
+ if (heap_next === heap.length) heap.push(heap.length + 1);
53
+ const idx = heap_next;
54
+ heap_next = heap[idx];
55
+
56
+ heap[idx] = obj;
57
+ return idx;
58
+ }
59
+
60
60
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
61
61
 
62
62
  cachedTextDecoder.decode();
@@ -252,7 +252,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
252
252
  function __wbg_adapter_52(arg0, arg1, arg2) {
253
253
  try {
254
254
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
255
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h150b30eeb1e9e4d8(retptr, arg0, arg1, addHeapObject(arg2));
255
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5a2d63dc59f76e61(retptr, arg0, arg1, addHeapObject(arg2));
256
256
  var r0 = getInt32Memory0()[retptr / 4 + 0];
257
257
  var r1 = getInt32Memory0()[retptr / 4 + 1];
258
258
  if (r1) {
@@ -264,7 +264,7 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
264
264
  }
265
265
 
266
266
  function __wbg_adapter_55(arg0, arg1, arg2) {
267
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heba224c0328f088b(arg0, arg1, addHeapObject(arg2));
267
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6d113a8418e47593(arg0, arg1, addHeapObject(arg2));
268
268
  }
269
269
 
270
270
  /**
@@ -329,7 +329,7 @@ function getArrayU8FromWasm0(ptr, len) {
329
329
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
330
330
  }
331
331
  function __wbg_adapter_219(arg0, arg1, arg2, arg3) {
332
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h35e2dd043ef02cb8(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
332
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h05b8fb12110402b0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
333
333
  }
334
334
 
335
335
  /**
@@ -1572,6 +1572,9 @@ async function load(module, imports) {
1572
1572
  function getImports() {
1573
1573
  const imports = {};
1574
1574
  imports.wbg = {};
1575
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1576
+ takeObject(arg0);
1577
+ };
1575
1578
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1576
1579
  const ret = getObject(arg0);
1577
1580
  return addHeapObject(ret);
@@ -1581,9 +1584,6 @@ function getImports() {
1581
1584
  const ret = typeof(val) === 'object' && val !== null;
1582
1585
  return ret;
1583
1586
  };
1584
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1585
- takeObject(arg0);
1586
- };
1587
1587
  imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
1588
1588
  const ret = getObject(arg0)[getObject(arg1)];
1589
1589
  return addHeapObject(ret);
@@ -1708,6 +1708,22 @@ function getImports() {
1708
1708
  const ret = new Uint8Array(getObject(arg0));
1709
1709
  return addHeapObject(ret);
1710
1710
  };
1711
+ imports.wbg.__wbg_new_268f7b7dd3430798 = function() {
1712
+ const ret = new Map();
1713
+ return addHeapObject(ret);
1714
+ };
1715
+ imports.wbg.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
1716
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1717
+ return addHeapObject(ret);
1718
+ };
1719
+ imports.wbg.__wbg_new_1d9a920c6bfc44a8 = function() {
1720
+ const ret = new Array();
1721
+ return addHeapObject(ret);
1722
+ };
1723
+ imports.wbg.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
1724
+ const ret = getObject(arg0).push(getObject(arg1));
1725
+ return ret;
1726
+ };
1711
1727
  imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
1712
1728
  try {
1713
1729
  var state0 = {a: arg0, b: arg1};
@@ -1726,22 +1742,6 @@ function getImports() {
1726
1742
  state0.a = state0.b = 0;
1727
1743
  }
1728
1744
  };
1729
- imports.wbg.__wbg_new_1d9a920c6bfc44a8 = function() {
1730
- const ret = new Array();
1731
- return addHeapObject(ret);
1732
- };
1733
- imports.wbg.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
1734
- const ret = getObject(arg0).push(getObject(arg1));
1735
- return ret;
1736
- };
1737
- imports.wbg.__wbg_new_268f7b7dd3430798 = function() {
1738
- const ret = new Map();
1739
- return addHeapObject(ret);
1740
- };
1741
- imports.wbg.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
1742
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1743
- return addHeapObject(ret);
1744
- };
1745
1745
  imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
1746
1746
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1747
1747
  };
@@ -1815,20 +1815,10 @@ function getImports() {
1815
1815
  imports.wbg.__wbg_setonsuccess_5f71593bc51653a3 = function(arg0, arg1) {
1816
1816
  getObject(arg0).onsuccess = getObject(arg1);
1817
1817
  };
1818
- imports.wbg.__wbg_setonerror_d5771cc5bf9ea74c = function(arg0, arg1) {
1819
- getObject(arg0).onerror = getObject(arg1);
1820
- };
1821
- imports.wbg.__wbg_open_a31c3fe1fdc244eb = function() { return handleError(function (arg0, arg1, arg2) {
1822
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
1823
- return addHeapObject(ret);
1824
- }, arguments) };
1825
- imports.wbg.__wbg_open_c5d5fb2df44b9d10 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1826
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1818
+ imports.wbg.__wbg_delete_8abedd1043b4105d = function() { return handleError(function (arg0, arg1) {
1819
+ const ret = getObject(arg0).delete(getObject(arg1));
1827
1820
  return addHeapObject(ret);
1828
1821
  }, arguments) };
1829
- imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
1830
- getObject(arg0).onupgradeneeded = getObject(arg1);
1831
- };
1832
1822
  imports.wbg.__wbg_put_84e7fc93eee27b28 = function() { return handleError(function (arg0, arg1, arg2) {
1833
1823
  const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
1834
1824
  return addHeapObject(ret);
@@ -1837,10 +1827,6 @@ function getImports() {
1837
1827
  const ret = getObject(arg0).put(getObject(arg1));
1838
1828
  return addHeapObject(ret);
1839
1829
  }, arguments) };
1840
- imports.wbg.__wbg_delete_8abedd1043b4105d = function() { return handleError(function (arg0, arg1) {
1841
- const ret = getObject(arg0).delete(getObject(arg1));
1842
- return addHeapObject(ret);
1843
- }, arguments) };
1844
1830
  imports.wbg.__wbg_openCursor_e036069f0e326708 = function() { return handleError(function (arg0, arg1) {
1845
1831
  const ret = getObject(arg0).openCursor(getObject(arg1));
1846
1832
  return addHeapObject(ret);
@@ -1853,6 +1839,24 @@ function getImports() {
1853
1839
  const ret = getObject(arg0).get(getObject(arg1));
1854
1840
  return addHeapObject(ret);
1855
1841
  }, arguments) };
1842
+ imports.wbg.__wbg_deleteDatabase_f6454de6a88aebde = function() { return handleError(function (arg0, arg1, arg2) {
1843
+ const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
1844
+ return addHeapObject(ret);
1845
+ }, arguments) };
1846
+ imports.wbg.__wbg_close_5a04b9ce11dade22 = function(arg0) {
1847
+ getObject(arg0).close();
1848
+ };
1849
+ imports.wbg.__wbg_setonerror_d5771cc5bf9ea74c = function(arg0, arg1) {
1850
+ getObject(arg0).onerror = getObject(arg1);
1851
+ };
1852
+ imports.wbg.__wbg_count_b0e88953a0ea909c = function() { return handleError(function (arg0) {
1853
+ const ret = getObject(arg0).count();
1854
+ return addHeapObject(ret);
1855
+ }, arguments) };
1856
+ imports.wbg.__wbg_count_46eda68a16dbe30e = function() { return handleError(function (arg0, arg1) {
1857
+ const ret = getObject(arg0).count(getObject(arg1));
1858
+ return addHeapObject(ret);
1859
+ }, arguments) };
1856
1860
  imports.wbg.__wbg_index_86861edf1478f49c = function() { return handleError(function (arg0, arg1, arg2) {
1857
1861
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
1858
1862
  return addHeapObject(ret);
@@ -1873,21 +1877,17 @@ function getImports() {
1873
1877
  const ret = getObject(arg0).openCursor(getObject(arg1));
1874
1878
  return addHeapObject(ret);
1875
1879
  }, arguments) };
1876
- imports.wbg.__wbg_close_5a04b9ce11dade22 = function(arg0) {
1877
- getObject(arg0).close();
1878
- };
1879
- imports.wbg.__wbg_deleteDatabase_f6454de6a88aebde = function() { return handleError(function (arg0, arg1, arg2) {
1880
- const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
1881
- return addHeapObject(ret);
1882
- }, arguments) };
1883
- imports.wbg.__wbg_count_b0e88953a0ea909c = function() { return handleError(function (arg0) {
1884
- const ret = getObject(arg0).count();
1880
+ imports.wbg.__wbg_open_a31c3fe1fdc244eb = function() { return handleError(function (arg0, arg1, arg2) {
1881
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
1885
1882
  return addHeapObject(ret);
1886
1883
  }, arguments) };
1887
- imports.wbg.__wbg_count_46eda68a16dbe30e = function() { return handleError(function (arg0, arg1) {
1888
- const ret = getObject(arg0).count(getObject(arg1));
1884
+ imports.wbg.__wbg_open_c5d5fb2df44b9d10 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1885
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1889
1886
  return addHeapObject(ret);
1890
1887
  }, arguments) };
1888
+ imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
1889
+ getObject(arg0).onupgradeneeded = getObject(arg1);
1890
+ };
1891
1891
  imports.wbg.__wbg_randomFillSync_6894564c2c334c42 = function() { return handleError(function (arg0, arg1, arg2) {
1892
1892
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
1893
1893
  }, arguments) };
@@ -2009,6 +2009,10 @@ function getImports() {
2009
2009
  const ret = getObject(arg0).result;
2010
2010
  return addHeapObject(ret);
2011
2011
  }, arguments) };
2012
+ imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
2013
+ const ret = getObject(arg0).error;
2014
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2015
+ }, arguments) };
2012
2016
  imports.wbg.__wbg_contains_6cf516181cd86571 = function(arg0, arg1, arg2) {
2013
2017
  const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2014
2018
  return ret;
@@ -2035,10 +2039,6 @@ function getImports() {
2035
2039
  imports.wbg.__wbg_deleteObjectStore_1b698c5fd1bc077d = function() { return handleError(function (arg0, arg1, arg2) {
2036
2040
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
2037
2041
  }, arguments) };
2038
- imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
2039
- const ret = getObject(arg0).error;
2040
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2041
- }, arguments) };
2042
2042
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2043
2043
  const ret = !getObject(arg0);
2044
2044
  return ret;
@@ -2139,7 +2139,7 @@ function getImports() {
2139
2139
  const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2140
2140
  return addHeapObject(ret);
2141
2141
  }, arguments) };
2142
- imports.wbg.__wbindgen_closure_wrapper2363 = function(arg0, arg1, arg2) {
2142
+ imports.wbg.__wbindgen_closure_wrapper2357 = function(arg0, arg1, arg2) {
2143
2143
  const ret = makeMutClosure(arg0, arg1, 122, __wbg_adapter_52);
2144
2144
  return addHeapObject(ret);
2145
2145
  };
@@ -2214,7 +2214,7 @@ var exports = /*#__PURE__*/Object.freeze({
2214
2214
  var wasm = async (opt = {}) => {
2215
2215
  let {importHook, serverPath} = opt;
2216
2216
 
2217
- let path = "assets/core_crypto_ffi-b8c4f151.wasm";
2217
+ let path = "assets/core_crypto_ffi-394802ae.wasm";
2218
2218
 
2219
2219
  if (serverPath != null) {
2220
2220
  path = serverPath + /[^\/\\]*$/.exec(path)[0];