@wireapp/core-crypto 0.6.1 → 0.6.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.1",
3
+ "version": "0.6.2",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -2407,15 +2407,19 @@ function getImports() {
2407
2407
  const ret = getObject(arg0).length;
2408
2408
  return ret;
2409
2409
  };
2410
+ imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2411
+ const ret = new Uint8Array(getObject(arg0));
2412
+ return addHeapObject(ret);
2413
+ };
2410
2414
  imports.wbg.__wbg_call_9495de66fdbe016b = function () {
2411
2415
  return handleError(function (arg0, arg1, arg2) {
2412
2416
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2413
2417
  return addHeapObject(ret);
2414
2418
  }, arguments);
2415
2419
  };
2416
- imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2417
- const ret = new Uint8Array(getObject(arg0));
2418
- return addHeapObject(ret);
2420
+ imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2421
+ const ret = getObject(arg0).push(getObject(arg1));
2422
+ return ret;
2419
2423
  };
2420
2424
  imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function (arg0, arg1) {
2421
2425
  try {
@@ -2437,14 +2441,14 @@ function getImports() {
2437
2441
  state0.a = state0.b = 0;
2438
2442
  }
2439
2443
  };
2440
- imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2441
- const ret = getObject(arg0).push(getObject(arg1));
2442
- return ret;
2443
- };
2444
2444
  imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2445
2445
  const ret = FfiWireE2EIdentity.__wrap(arg0);
2446
2446
  return addHeapObject(ret);
2447
2447
  };
2448
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2449
+ const ret = BigInt.asUintN(64, arg0);
2450
+ return addHeapObject(ret);
2451
+ };
2448
2452
  imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
2449
2453
  const ret = new Map();
2450
2454
  return addHeapObject(ret);
@@ -2453,10 +2457,6 @@ function getImports() {
2453
2457
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2454
2458
  return addHeapObject(ret);
2455
2459
  };
2456
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2457
- const ret = BigInt.asUintN(64, arg0);
2458
- return addHeapObject(ret);
2459
- };
2460
2460
  imports.wbg.__wbg_setonsuccess_925a7718d3f62bc1 = function (arg0, arg1) {
2461
2461
  getObject(arg0).onsuccess = getObject(arg1);
2462
2462
  };
@@ -3032,11 +3032,11 @@ function getImports() {
3032
3032
  return addHeapObject(ret);
3033
3033
  }, arguments);
3034
3034
  };
3035
- imports.wbg.__wbindgen_closure_wrapper1526 = function (arg0, arg1, arg2) {
3035
+ imports.wbg.__wbindgen_closure_wrapper1524 = function (arg0, arg1, arg2) {
3036
3036
  const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_52);
3037
3037
  return addHeapObject(ret);
3038
3038
  };
3039
- imports.wbg.__wbindgen_closure_wrapper4415 = function (arg0, arg1, arg2) {
3039
+ imports.wbg.__wbindgen_closure_wrapper4412 = function (arg0, arg1, arg2) {
3040
3040
  const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_55);
3041
3041
  return addHeapObject(ret);
3042
3042
  };
@@ -3097,7 +3097,7 @@ var exports = /*#__PURE__*/Object.freeze({
3097
3097
  var wasm = async (opt = {}) => {
3098
3098
  let {importHook, serverPath} = opt;
3099
3099
 
3100
- let path = "assets/core_crypto_ffi-d45ab989.wasm";
3100
+ let path = "assets/core_crypto_ffi-75ec2ae1.wasm";
3101
3101
 
3102
3102
  if (serverPath != null) {
3103
3103
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -3489,9 +3489,11 @@ class CoreCrypto {
3489
3489
  }
3490
3490
  try {
3491
3491
  const ffiDecryptedMessage = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").decrypt_message(conversationId, payload));
3492
- const commitDelay = ffiDecryptedMessage.commit_delay ?
3493
- ffiDecryptedMessage.commit_delay * 1000 :
3494
- undefined;
3492
+ const ffiCommitDelay = ffiDecryptedMessage.commit_delay;
3493
+ let commitDelay = undefined;
3494
+ if (typeof ffiCommitDelay === "number" && ffiCommitDelay >= 0) {
3495
+ commitDelay = ffiCommitDelay * 1000;
3496
+ }
3495
3497
  const ret = {
3496
3498
  message: ffiDecryptedMessage.message,
3497
3499
  proposals: ffiDecryptedMessage.proposals,