@wireapp/core-crypto 1.0.0-rc.5 → 1.0.0-rc.6
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
Binary file
|
@@ -727,6 +727,10 @@ export declare class CoreCrypto {
|
|
727
727
|
/**
|
728
728
|
* Ingest a TLS-serialized MLS welcome message to join an existing MLS group
|
729
729
|
*
|
730
|
+
* Important: you have to catch the error with this reason "Although this Welcome seems valid, the local KeyPackage
|
731
|
+
* it references has already been deleted locally. Join this group with an external commit", ignore it and then try
|
732
|
+
* to join this group with an external commit.
|
733
|
+
*
|
730
734
|
* @param welcomeMessage - TLS-serialized MLS Welcome message
|
731
735
|
* @param configuration - configuration of the MLS group
|
732
736
|
* @returns The conversation ID of the newly joined group. You can use the same ID to decrypt/encrypt messages
|
@@ -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.
|
237
|
+
wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h17baf5e1d66e67f4(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.
|
242
|
+
wasm$1.wasm_bindgen__convert__closures__invoke1_mut__hdbae48319fb47112(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_299(arg0, arg1, arg2, arg3) {
|
317
|
-
wasm$1.
|
317
|
+
wasm$1.wasm_bindgen__convert__closures__invoke2_mut__haf4f26fdea6dc8ca(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
318
318
|
}
|
319
319
|
/**
|
320
320
|
* see [core_crypto::prelude::MlsWirePolicy]
|
@@ -2879,37 +2879,32 @@ function __wbg_get_imports() {
|
|
2879
2879
|
const ret = arg0;
|
2880
2880
|
return addHeapObject(ret);
|
2881
2881
|
};
|
2882
|
-
imports.wbg.__wbg_new_898a68150f225f2e = function () {
|
2883
|
-
const ret = new Array();
|
2884
|
-
return addHeapObject(ret);
|
2885
|
-
};
|
2886
|
-
imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
|
2887
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
2888
|
-
};
|
2889
2882
|
imports.wbg.__wbg_new_8125e318e6245eed = function (arg0) {
|
2890
2883
|
const ret = new Uint8Array(getObject(arg0));
|
2891
2884
|
return addHeapObject(ret);
|
2892
2885
|
};
|
2886
|
+
imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
|
2887
|
+
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
2888
|
+
return addHeapObject(ret);
|
2889
|
+
};
|
2893
2890
|
imports.wbg.__wbg_new_b51585de1b234aff = function () {
|
2894
2891
|
const ret = new Object();
|
2895
2892
|
return addHeapObject(ret);
|
2896
2893
|
};
|
2897
|
-
imports.wbg.
|
2898
|
-
const ret =
|
2894
|
+
imports.wbg.__wbg_new_898a68150f225f2e = function () {
|
2895
|
+
const ret = new Array();
|
2899
2896
|
return addHeapObject(ret);
|
2900
2897
|
};
|
2898
|
+
imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
|
2899
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
2900
|
+
};
|
2901
|
+
imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
|
2902
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
2903
|
+
};
|
2901
2904
|
imports.wbg.__wbg_push_ca1c26067ef907ac = function (arg0, arg1) {
|
2902
2905
|
const ret = getObject(arg0).push(getObject(arg1));
|
2903
2906
|
return ret;
|
2904
2907
|
};
|
2905
|
-
imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
|
2906
|
-
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
2907
|
-
return addHeapObject(ret);
|
2908
|
-
};
|
2909
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
|
2910
|
-
const ret = BigInt.asUintN(64, arg0);
|
2911
|
-
return addHeapObject(ret);
|
2912
|
-
};
|
2913
2908
|
imports.wbg.__wbg_new_56693dbed0c32988 = function () {
|
2914
2909
|
const ret = new Map();
|
2915
2910
|
return addHeapObject(ret);
|
@@ -2918,8 +2913,13 @@ function __wbg_get_imports() {
|
|
2918
2913
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
2919
2914
|
return addHeapObject(ret);
|
2920
2915
|
};
|
2921
|
-
imports.wbg.
|
2922
|
-
|
2916
|
+
imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
|
2917
|
+
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
2918
|
+
return addHeapObject(ret);
|
2919
|
+
};
|
2920
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
|
2921
|
+
const ret = BigInt.asUintN(64, arg0);
|
2922
|
+
return addHeapObject(ret);
|
2923
2923
|
};
|
2924
2924
|
imports.wbg.__wbg_new_d258248ed531ff54 = function (arg0, arg1) {
|
2925
2925
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
@@ -3134,6 +3134,10 @@ function __wbg_get_imports() {
|
|
3134
3134
|
return addHeapObject(ret);
|
3135
3135
|
}, arguments);
|
3136
3136
|
};
|
3137
|
+
imports.wbg.__wbg_now_9c5990bda04c7e53 = function () {
|
3138
|
+
const ret = Date.now();
|
3139
|
+
return ret;
|
3140
|
+
};
|
3137
3141
|
imports.wbg.__wbg_put_fb32824d87feec5c = function () {
|
3138
3142
|
return handleError(function (arg0, arg1, arg2) {
|
3139
3143
|
const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
|
@@ -3176,10 +3180,6 @@ function __wbg_get_imports() {
|
|
3176
3180
|
return addHeapObject(ret);
|
3177
3181
|
}, arguments);
|
3178
3182
|
};
|
3179
|
-
imports.wbg.__wbg_now_9c5990bda04c7e53 = function () {
|
3180
|
-
const ret = Date.now();
|
3181
|
-
return ret;
|
3182
|
-
};
|
3183
3183
|
imports.wbg.__wbindgen_memory = function () {
|
3184
3184
|
const ret = wasm$1.memory;
|
3185
3185
|
return addHeapObject(ret);
|
@@ -3319,6 +3319,12 @@ function __wbg_get_imports() {
|
|
3319
3319
|
const ret = getObject(arg0).target;
|
3320
3320
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
3321
3321
|
};
|
3322
|
+
imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
|
3323
|
+
return handleError(function (arg0) {
|
3324
|
+
const ret = getObject(arg0).error;
|
3325
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
3326
|
+
}, arguments);
|
3327
|
+
};
|
3322
3328
|
imports.wbg.__wbg_result_edff16ff107d6acb = function () {
|
3323
3329
|
return handleError(function (arg0) {
|
3324
3330
|
const ret = getObject(arg0).result;
|
@@ -3359,12 +3365,6 @@ function __wbg_get_imports() {
|
|
3359
3365
|
getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
|
3360
3366
|
}, arguments);
|
3361
3367
|
};
|
3362
|
-
imports.wbg.__wbg_error_8a79f35fe9368563 = function () {
|
3363
|
-
return handleError(function (arg0) {
|
3364
|
-
const ret = getObject(arg0).error;
|
3365
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
3366
|
-
}, arguments);
|
3367
|
-
};
|
3368
3368
|
imports.wbg.__wbindgen_is_falsy = function (arg0) {
|
3369
3369
|
const ret = !getObject(arg0);
|
3370
3370
|
return ret;
|
@@ -3493,12 +3493,12 @@ function __wbg_get_imports() {
|
|
3493
3493
|
return addHeapObject(ret);
|
3494
3494
|
}, arguments);
|
3495
3495
|
};
|
3496
|
-
imports.wbg.
|
3497
|
-
const ret = makeMutClosure(arg0, arg1,
|
3496
|
+
imports.wbg.__wbindgen_closure_wrapper1951 = function (arg0, arg1, arg2) {
|
3497
|
+
const ret = makeMutClosure(arg0, arg1, 167, __wbg_adapter_52);
|
3498
3498
|
return addHeapObject(ret);
|
3499
3499
|
};
|
3500
|
-
imports.wbg.
|
3501
|
-
const ret = makeMutClosure(arg0, arg1,
|
3500
|
+
imports.wbg.__wbindgen_closure_wrapper4727 = function (arg0, arg1, arg2) {
|
3501
|
+
const ret = makeMutClosure(arg0, arg1, 167, __wbg_adapter_55);
|
3502
3502
|
return addHeapObject(ret);
|
3503
3503
|
};
|
3504
3504
|
return imports;
|
@@ -3567,7 +3567,7 @@ var exports = /*#__PURE__*/Object.freeze({
|
|
3567
3567
|
var wasm = async (opt = {}) => {
|
3568
3568
|
let {importHook, serverPath} = opt;
|
3569
3569
|
|
3570
|
-
let path = "assets/core_crypto_ffi-
|
3570
|
+
let path = "assets/core_crypto_ffi-8c0bd9a1.wasm";
|
3571
3571
|
|
3572
3572
|
if (serverPath != null) {
|
3573
3573
|
path = serverPath + /[^\/\\]*$/.exec(path)[0];
|
@@ -4065,6 +4065,10 @@ class CoreCrypto {
|
|
4065
4065
|
/**
|
4066
4066
|
* Ingest a TLS-serialized MLS welcome message to join an existing MLS group
|
4067
4067
|
*
|
4068
|
+
* Important: you have to catch the error with this reason "Although this Welcome seems valid, the local KeyPackage
|
4069
|
+
* it references has already been deleted locally. Join this group with an external commit", ignore it and then try
|
4070
|
+
* to join this group with an external commit.
|
4071
|
+
*
|
4068
4072
|
* @param welcomeMessage - TLS-serialized MLS Welcome message
|
4069
4073
|
* @param configuration - configuration of the MLS group
|
4070
4074
|
* @returns The conversation ID of the newly joined group. You can use the same ID to decrypt/encrypt messages
|
@@ -4657,7 +4661,13 @@ class CoreCrypto {
|
|
4657
4661
|
* @param newKeyPackageCount - number of KeyPackages with new identity to generate
|
4658
4662
|
*/
|
4659
4663
|
async e2eiRotateAll(enrollment, certificateChain, newKeyPackageCount) {
|
4660
|
-
|
4664
|
+
const ffiRet = await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_rotate_all(enrollment.inner(), certificateChain, newKeyPackageCount);
|
4665
|
+
const ret = {
|
4666
|
+
commits: ffiRet.commits,
|
4667
|
+
newKeyPackages: ffiRet.new_key_packages,
|
4668
|
+
keyPackageRefsToRemove: ffiRet.key_package_refs_to_remove,
|
4669
|
+
};
|
4670
|
+
return ret;
|
4661
4671
|
}
|
4662
4672
|
/**
|
4663
4673
|
* Allows persisting an active enrollment (for example while redirecting the user during OAuth) in order to resume
|
Binary file
|