@wireapp/core-crypto 1.0.0-rc.13 → 1.0.0-rc.14

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": "1.0.0-rc.13",
3
+ "version": "1.0.0-rc.14",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -35,29 +35,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
35
35
  };
36
36
 
37
37
  let wasm$1;
38
- const heap = new Array(128).fill(undefined);
39
- heap.push(undefined, null, true, false);
40
- function getObject(idx) { return heap[idx]; }
41
- let heap_next = heap.length;
42
- function dropObject(idx) {
43
- if (idx < 132)
44
- return;
45
- heap[idx] = heap_next;
46
- heap_next = idx;
47
- }
48
- function takeObject(idx) {
49
- const ret = getObject(idx);
50
- dropObject(idx);
51
- return ret;
52
- }
53
- function addHeapObject(obj) {
54
- if (heap_next === heap.length)
55
- heap.push(heap.length + 1);
56
- const idx = heap_next;
57
- heap_next = heap[idx];
58
- heap[idx] = obj;
59
- return idx;
60
- }
61
38
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
62
39
  if (typeof TextDecoder !== 'undefined') {
63
40
  cachedTextDecoder.decode();
@@ -73,6 +50,29 @@ function getStringFromWasm0(ptr, len) {
73
50
  ptr = ptr >>> 0;
74
51
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
75
52
  }
53
+ const heap = new Array(128).fill(undefined);
54
+ heap.push(undefined, null, true, false);
55
+ let heap_next = heap.length;
56
+ function addHeapObject(obj) {
57
+ if (heap_next === heap.length)
58
+ heap.push(heap.length + 1);
59
+ const idx = heap_next;
60
+ heap_next = heap[idx];
61
+ heap[idx] = obj;
62
+ return idx;
63
+ }
64
+ function getObject(idx) { return heap[idx]; }
65
+ function dropObject(idx) {
66
+ if (idx < 132)
67
+ return;
68
+ heap[idx] = heap_next;
69
+ heap_next = idx;
70
+ }
71
+ function takeObject(idx) {
72
+ const ret = getObject(idx);
73
+ dropObject(idx);
74
+ return ret;
75
+ }
76
76
  let WASM_VECTOR_LEN = 0;
77
77
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
78
78
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -234,12 +234,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
234
234
  return real;
235
235
  }
236
236
  function __wbg_adapter_52(arg0, arg1, arg2) {
237
- wasm$1.wasm_bindgen__convert__closures__invoke1_mut__he49f61f93f482307(arg0, arg1, addHeapObject(arg2));
237
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__ha447962224b266eb(arg0, arg1, addHeapObject(arg2));
238
238
  }
239
239
  function __wbg_adapter_55(arg0, arg1, arg2) {
240
240
  try {
241
241
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
242
- wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h699880155985670b(retptr, arg0, arg1, addHeapObject(arg2));
242
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h356d4ae76e3804e9(retptr, arg0, arg1, addHeapObject(arg2));
243
243
  var r0 = getInt32Memory0()[retptr / 4 + 0];
244
244
  var r1 = getInt32Memory0()[retptr / 4 + 1];
245
245
  if (r1) {
@@ -314,7 +314,7 @@ function handleError(f, args) {
314
314
  }
315
315
  }
316
316
  function __wbg_adapter_308(arg0, arg1, arg2, arg3) {
317
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__hce9b3acf9dc10eb7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
317
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h818732dcca963bda(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
318
318
  }
319
319
  /**
320
320
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -2939,9 +2939,32 @@ async function __wbg_load(module, imports) {
2939
2939
  function __wbg_get_imports() {
2940
2940
  const imports = {};
2941
2941
  imports.wbg = {};
2942
+ imports.wbg.__wbg_new_b51585de1b234aff = function () {
2943
+ const ret = new Object();
2944
+ return addHeapObject(ret);
2945
+ };
2946
+ imports.wbg.__wbg_new_56693dbed0c32988 = function () {
2947
+ const ret = new Map();
2948
+ return addHeapObject(ret);
2949
+ };
2950
+ imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
2951
+ const ret = getStringFromWasm0(arg0, arg1);
2952
+ return addHeapObject(ret);
2953
+ };
2954
+ imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function (arg0, arg1, arg2) {
2955
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2956
+ return addHeapObject(ret);
2957
+ };
2942
2958
  imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2943
2959
  takeObject(arg0);
2944
2960
  };
2961
+ imports.wbg.__wbindgen_is_string = function (arg0) {
2962
+ const ret = typeof (getObject(arg0)) === 'string';
2963
+ return ret;
2964
+ };
2965
+ imports.wbg.__wbg_set_bd72c078edfa51ad = function (arg0, arg1, arg2) {
2966
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2967
+ };
2945
2968
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2946
2969
  const ret = getObject(arg0);
2947
2970
  return addHeapObject(ret);
@@ -2977,10 +3000,6 @@ function __wbg_get_imports() {
2977
3000
  const ret = getObject(arg0).length;
2978
3001
  return ret;
2979
3002
  };
2980
- imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
2981
- const ret = getStringFromWasm0(arg0, arg1);
2982
- return addHeapObject(ret);
2983
- };
2984
3003
  imports.wbg.__wbg_get_fc26906e5ae1ea85 = function () {
2985
3004
  return handleError(function (arg0, arg1) {
2986
3005
  const ret = getObject(arg0).get(getObject(arg1));
@@ -3017,39 +3036,24 @@ function __wbg_get_imports() {
3017
3036
  const ret = arg0;
3018
3037
  return addHeapObject(ret);
3019
3038
  };
3020
- imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
3021
- const ret = FfiWireE2EIdentity.__wrap(arg0);
3039
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
3040
+ const ret = BigInt.asUintN(64, arg0);
3022
3041
  return addHeapObject(ret);
3023
3042
  };
3024
- imports.wbg.__wbg_new_b51585de1b234aff = function () {
3025
- const ret = new Object();
3043
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
3044
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
3026
3045
  return addHeapObject(ret);
3027
3046
  };
3028
- imports.wbg.__wbg_set_bd72c078edfa51ad = function (arg0, arg1, arg2) {
3029
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3030
- };
3031
3047
  imports.wbg.__wbg_new_898a68150f225f2e = function () {
3032
3048
  const ret = new Array();
3033
3049
  return addHeapObject(ret);
3034
3050
  };
3035
- imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
3036
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3037
- };
3038
3051
  imports.wbg.__wbg_push_ca1c26067ef907ac = function (arg0, arg1) {
3039
3052
  const ret = getObject(arg0).push(getObject(arg1));
3040
3053
  return ret;
3041
3054
  };
3042
- imports.wbg.__wbg_new_56693dbed0c32988 = function () {
3043
- const ret = new Map();
3044
- return addHeapObject(ret);
3045
- };
3046
- imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function (arg0, arg1, arg2) {
3047
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
3048
- return addHeapObject(ret);
3049
- };
3050
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
3051
- const ret = BigInt.asUintN(64, arg0);
3052
- return addHeapObject(ret);
3055
+ imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
3056
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3053
3057
  };
3054
3058
  imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
3055
3059
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
@@ -3191,10 +3195,6 @@ function __wbg_get_imports() {
3191
3195
  state0.a = state0.b = 0;
3192
3196
  }
3193
3197
  };
3194
- imports.wbg.__wbindgen_is_string = function (arg0) {
3195
- const ret = typeof (getObject(arg0)) === 'string';
3196
- return ret;
3197
- };
3198
3198
  imports.wbg.__wbg_reject_7bd6ac9617013c02 = function (arg0) {
3199
3199
  const ret = Promise.reject(getObject(arg0));
3200
3200
  return addHeapObject(ret);
@@ -3322,6 +3322,15 @@ function __wbg_get_imports() {
3322
3322
  return addHeapObject(ret);
3323
3323
  }, arguments);
3324
3324
  };
3325
+ imports.wbg.__wbg_subarray_13db269f57aa838d = function (arg0, arg1, arg2) {
3326
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3327
+ return addHeapObject(ret);
3328
+ };
3329
+ imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function () {
3330
+ return handleError(function (arg0, arg1) {
3331
+ getObject(arg0).getRandomValues(getObject(arg1));
3332
+ }, arguments);
3333
+ };
3325
3334
  imports.wbg.__wbindgen_memory = function () {
3326
3335
  const ret = wasm$1.memory;
3327
3336
  return addHeapObject(ret);
@@ -3339,15 +3348,6 @@ function __wbg_get_imports() {
3339
3348
  getObject(arg0).randomFillSync(takeObject(arg1));
3340
3349
  }, arguments);
3341
3350
  };
3342
- imports.wbg.__wbg_subarray_13db269f57aa838d = function (arg0, arg1, arg2) {
3343
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3344
- return addHeapObject(ret);
3345
- };
3346
- imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function () {
3347
- return handleError(function (arg0, arg1) {
3348
- getObject(arg0).getRandomValues(getObject(arg1));
3349
- }, arguments);
3350
- };
3351
3351
  imports.wbg.__wbg_crypto_c48a774b022d20ac = function (arg0) {
3352
3352
  const ret = getObject(arg0).crypto;
3353
3353
  return addHeapObject(ret);
@@ -3457,12 +3457,6 @@ function __wbg_get_imports() {
3457
3457
  const ret = getObject(arg0).target;
3458
3458
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
3459
3459
  };
3460
- imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
3461
- return handleError(function (arg0) {
3462
- const ret = getObject(arg0).error;
3463
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
3464
- }, arguments);
3465
- };
3466
3460
  imports.wbg.__wbg_result_edff16ff107d6acb = function () {
3467
3461
  return handleError(function (arg0) {
3468
3462
  const ret = getObject(arg0).result;
@@ -3503,6 +3497,12 @@ function __wbg_get_imports() {
3503
3497
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
3504
3498
  }, arguments);
3505
3499
  };
3500
+ imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
3501
+ return handleError(function (arg0) {
3502
+ const ret = getObject(arg0).error;
3503
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3504
+ }, arguments);
3505
+ };
3506
3506
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
3507
3507
  const ret = !getObject(arg0);
3508
3508
  return ret;
@@ -3631,12 +3631,12 @@ function __wbg_get_imports() {
3631
3631
  return addHeapObject(ret);
3632
3632
  }, arguments);
3633
3633
  };
3634
- imports.wbg.__wbindgen_closure_wrapper1746 = function (arg0, arg1, arg2) {
3635
- const ret = makeMutClosure(arg0, arg1, 149, __wbg_adapter_52);
3634
+ imports.wbg.__wbindgen_closure_wrapper1743 = function (arg0, arg1, arg2) {
3635
+ const ret = makeMutClosure(arg0, arg1, 146, __wbg_adapter_52);
3636
3636
  return addHeapObject(ret);
3637
3637
  };
3638
- imports.wbg.__wbindgen_closure_wrapper4866 = function (arg0, arg1, arg2) {
3639
- const ret = makeMutClosure(arg0, arg1, 149, __wbg_adapter_55);
3638
+ imports.wbg.__wbindgen_closure_wrapper4858 = function (arg0, arg1, arg2) {
3639
+ const ret = makeMutClosure(arg0, arg1, 146, __wbg_adapter_55);
3640
3640
  return addHeapObject(ret);
3641
3641
  };
3642
3642
  return imports;
@@ -3703,7 +3703,7 @@ var exports = /*#__PURE__*/Object.freeze({
3703
3703
  initSync: initSync
3704
3704
  });
3705
3705
 
3706
- const wasm_path = "assets/core_crypto_ffi-3baa8d34.wasm";
3706
+ const wasm_path = "assets/core_crypto_ffi-105754e9.wasm";
3707
3707
 
3708
3708
 
3709
3709
  var wasm = async (opt = {}) => {