@wireapp/core-crypto 1.0.0-pre.6 → 1.0.0-pre.7

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-pre.6",
3
+ "version": "1.0.0-pre.7",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -39,6 +39,14 @@ const heap = new Array(128).fill(undefined);
39
39
  heap.push(undefined, null, true, false);
40
40
  function getObject(idx) { return heap[idx]; }
41
41
  let heap_next = heap.length;
42
+ function addHeapObject(obj) {
43
+ if (heap_next === heap.length)
44
+ heap.push(heap.length + 1);
45
+ const idx = heap_next;
46
+ heap_next = heap[idx];
47
+ heap[idx] = obj;
48
+ return idx;
49
+ }
42
50
  function dropObject(idx) {
43
51
  if (idx < 132)
44
52
  return;
@@ -50,14 +58,6 @@ function takeObject(idx) {
50
58
  dropObject(idx);
51
59
  return ret;
52
60
  }
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
61
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
62
62
  if (typeof TextDecoder !== 'undefined') {
63
63
  cachedTextDecoder.decode();
@@ -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__h6753e79a5afa6507(arg0, arg1, addHeapObject(arg2));
237
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h3add802d7f539fd6(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__h199cb285c50c9ce7(retptr, arg0, arg1, addHeapObject(arg2));
242
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__hcf65d5abe1723dcf(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_296(arg0, arg1, arg2, arg3) {
317
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h2879afd4df4d79bb(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
317
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h7d17d9f660171c31(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
318
318
  }
319
319
  /**
320
320
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -576,7 +576,7 @@ class CommitBundle {
576
576
  * @returns {Uint8Array}
577
577
  */
578
578
  get commit() {
579
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
579
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
580
580
  return takeObject(ret);
581
581
  }
582
582
  /**
@@ -642,21 +642,21 @@ class ConversationInitBundle {
642
642
  * @returns {Uint8Array}
643
643
  */
644
644
  get conversation_id() {
645
- const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
645
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
646
646
  return takeObject(ret);
647
647
  }
648
648
  /**
649
649
  * @returns {Uint8Array}
650
650
  */
651
651
  get commit() {
652
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
652
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
653
653
  return takeObject(ret);
654
654
  }
655
655
  /**
656
656
  * @returns {GroupInfoBundle}
657
657
  */
658
658
  get group_info() {
659
- const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
659
+ const ret = wasm$1.conversationinitbundle_group_info(this.__wbg_ptr);
660
660
  return GroupInfoBundle.__wrap(ret);
661
661
  }
662
662
  }
@@ -2260,7 +2260,7 @@ class Invitee {
2260
2260
  * @returns {Uint8Array}
2261
2261
  */
2262
2262
  get kp() {
2263
- const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2263
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2264
2264
  return takeObject(ret);
2265
2265
  }
2266
2266
  }
@@ -2298,21 +2298,21 @@ class MemberAddedMessages {
2298
2298
  * @returns {Uint8Array}
2299
2299
  */
2300
2300
  get welcome() {
2301
- const ret = wasm$1.conversationinitbundle_conversation_id(this.__wbg_ptr);
2301
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2302
2302
  return takeObject(ret);
2303
2303
  }
2304
2304
  /**
2305
2305
  * @returns {Uint8Array}
2306
2306
  */
2307
2307
  get commit() {
2308
- const ret = wasm$1.commitbundle_commit(this.__wbg_ptr);
2308
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2309
2309
  return takeObject(ret);
2310
2310
  }
2311
2311
  /**
2312
2312
  * @returns {GroupInfoBundle}
2313
2313
  */
2314
2314
  get group_info() {
2315
- const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
2315
+ const ret = wasm$1.conversationinitbundle_group_info(this.__wbg_ptr);
2316
2316
  return GroupInfoBundle.__wrap(ret);
2317
2317
  }
2318
2318
  }
@@ -2364,7 +2364,7 @@ class NewAcmeAuthz {
2364
2364
  let deferred1_1;
2365
2365
  try {
2366
2366
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2367
- wasm$1.newacmeauthz_identifier(retptr, this.__wbg_ptr);
2367
+ wasm$1.acmedirectory_newNonce(retptr, this.__wbg_ptr);
2368
2368
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2369
2369
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2370
2370
  deferred1_0 = r0;
@@ -2464,7 +2464,7 @@ class ProposalBundle {
2464
2464
  * @returns {Uint8Array}
2465
2465
  */
2466
2466
  get proposal_ref() {
2467
- const ret = wasm$1.invitee_kp(this.__wbg_ptr);
2467
+ const ret = wasm$1.conversationinitbundle_commit(this.__wbg_ptr);
2468
2468
  return takeObject(ret);
2469
2469
  }
2470
2470
  }
@@ -2728,9 +2728,6 @@ async function __wbg_load(module, imports) {
2728
2728
  function __wbg_get_imports() {
2729
2729
  const imports = {};
2730
2730
  imports.wbg = {};
2731
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2732
- takeObject(arg0);
2733
- };
2734
2731
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2735
2732
  const ret = getObject(arg0);
2736
2733
  return addHeapObject(ret);
@@ -2740,6 +2737,9 @@ function __wbg_get_imports() {
2740
2737
  const ret = typeof (val) === 'object' && val !== null;
2741
2738
  return ret;
2742
2739
  };
2740
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2741
+ takeObject(arg0);
2742
+ };
2743
2743
  imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function (arg0, arg1) {
2744
2744
  const ret = getObject(arg0)[getObject(arg1)];
2745
2745
  return addHeapObject(ret);
@@ -2798,14 +2798,6 @@ function __wbg_get_imports() {
2798
2798
  return addHeapObject(ret);
2799
2799
  }, arguments);
2800
2800
  };
2801
- imports.wbg.__wbg_new_8125e318e6245eed = function (arg0) {
2802
- const ret = new Uint8Array(getObject(arg0));
2803
- return addHeapObject(ret);
2804
- };
2805
- imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2806
- const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2807
- return addHeapObject(ret);
2808
- };
2809
2801
  imports.wbg.__wbg_new_43f1b47c28813cbd = function (arg0, arg1) {
2810
2802
  try {
2811
2803
  var state0 = { a: arg0, b: arg1 };
@@ -2826,6 +2818,10 @@ function __wbg_get_imports() {
2826
2818
  state0.a = state0.b = 0;
2827
2819
  }
2828
2820
  };
2821
+ imports.wbg.__wbg_new_8125e318e6245eed = function (arg0) {
2822
+ const ret = new Uint8Array(getObject(arg0));
2823
+ return addHeapObject(ret);
2824
+ };
2829
2825
  imports.wbg.__wbg_new_b51585de1b234aff = function () {
2830
2826
  const ret = new Object();
2831
2827
  return addHeapObject(ret);
@@ -2838,6 +2834,10 @@ function __wbg_get_imports() {
2838
2834
  const ret = BigInt.asUintN(64, arg0);
2839
2835
  return addHeapObject(ret);
2840
2836
  };
2837
+ imports.wbg.__wbindgen_number_new = function (arg0) {
2838
+ const ret = arg0;
2839
+ return addHeapObject(ret);
2840
+ };
2841
2841
  imports.wbg.__wbg_new_898a68150f225f2e = function () {
2842
2842
  const ret = new Array();
2843
2843
  return addHeapObject(ret);
@@ -2852,10 +2852,6 @@ function __wbg_get_imports() {
2852
2852
  imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2853
2853
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2854
2854
  };
2855
- imports.wbg.__wbindgen_number_new = function (arg0) {
2856
- const ret = arg0;
2857
- return addHeapObject(ret);
2858
- };
2859
2855
  imports.wbg.__wbg_new_56693dbed0c32988 = function () {
2860
2856
  const ret = new Map();
2861
2857
  return addHeapObject(ret);
@@ -2864,6 +2860,10 @@ function __wbg_get_imports() {
2864
2860
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2865
2861
  return addHeapObject(ret);
2866
2862
  };
2863
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2864
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2865
+ return addHeapObject(ret);
2866
+ };
2867
2867
  imports.wbg.__wbg_new_d258248ed531ff54 = function (arg0, arg1) {
2868
2868
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2869
2869
  return addHeapObject(ret);
@@ -3242,12 +3242,6 @@ function __wbg_get_imports() {
3242
3242
  const ret = getObject(arg0).target;
3243
3243
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
3244
3244
  };
3245
- imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
3246
- return handleError(function (arg0) {
3247
- const ret = getObject(arg0).error;
3248
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
3249
- }, arguments);
3250
- };
3251
3245
  imports.wbg.__wbg_result_edff16ff107d6acb = function () {
3252
3246
  return handleError(function (arg0) {
3253
3247
  const ret = getObject(arg0).result;
@@ -3288,6 +3282,12 @@ function __wbg_get_imports() {
3288
3282
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
3289
3283
  }, arguments);
3290
3284
  };
3285
+ imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
3286
+ return handleError(function (arg0) {
3287
+ const ret = getObject(arg0).error;
3288
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3289
+ }, arguments);
3290
+ };
3291
3291
  imports.wbg.__wbindgen_is_falsy = function (arg0) {
3292
3292
  const ret = !getObject(arg0);
3293
3293
  return ret;
@@ -3416,11 +3416,11 @@ function __wbg_get_imports() {
3416
3416
  return addHeapObject(ret);
3417
3417
  }, arguments);
3418
3418
  };
3419
- imports.wbg.__wbindgen_closure_wrapper1975 = function (arg0, arg1, arg2) {
3419
+ imports.wbg.__wbindgen_closure_wrapper1984 = function (arg0, arg1, arg2) {
3420
3420
  const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_52);
3421
3421
  return addHeapObject(ret);
3422
3422
  };
3423
- imports.wbg.__wbindgen_closure_wrapper4660 = function (arg0, arg1, arg2) {
3423
+ imports.wbg.__wbindgen_closure_wrapper4645 = function (arg0, arg1, arg2) {
3424
3424
  const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_55);
3425
3425
  return addHeapObject(ret);
3426
3426
  };
@@ -3489,7 +3489,7 @@ var exports = /*#__PURE__*/Object.freeze({
3489
3489
  var wasm = async (opt = {}) => {
3490
3490
  let {importHook, serverPath} = opt;
3491
3491
 
3492
- let path = "assets/core_crypto_ffi-94b8d149.wasm";
3492
+ let path = "assets/core_crypto_ffi-b0fc8cb4.wasm";
3493
3493
 
3494
3494
  if (serverPath != null) {
3495
3495
  path = serverPath + /[^\/\\]*$/.exec(path)[0];