@wireapp/core-crypto 1.0.0-rc.8 → 1.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/platforms/web/assets/{core_crypto_ffi-ded089fb.wasm → core_crypto_ffi-713c72c1.wasm}
RENAMED
Binary file
|
@@ -446,6 +446,10 @@ export interface WireIdentity {
|
|
446
446
|
* DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
|
447
447
|
*/
|
448
448
|
domain: string;
|
449
|
+
/**
|
450
|
+
* X509 certificate identifying this client in the MLS group ; PEM encoded
|
451
|
+
*/
|
452
|
+
certificate: string;
|
449
453
|
}
|
450
454
|
/**
|
451
455
|
* Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
|
@@ -1363,6 +1367,12 @@ export interface AcmeDirectory {
|
|
1363
1367
|
* @readonly
|
1364
1368
|
*/
|
1365
1369
|
newOrder: string;
|
1370
|
+
/**
|
1371
|
+
* Revocation URL
|
1372
|
+
*
|
1373
|
+
* @readonly
|
1374
|
+
*/
|
1375
|
+
revokeCert: string;
|
1366
1376
|
}
|
1367
1377
|
/**
|
1368
1378
|
* Result of an order creation
|
@@ -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();
|
@@ -239,7 +239,7 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
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__h3c15a82f614455aa(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) {
|
@@ -313,7 +313,7 @@ function handleError(f, args) {
|
|
313
313
|
wasm$1.__wbindgen_exn_store(addHeapObject(e));
|
314
314
|
}
|
315
315
|
}
|
316
|
-
function
|
316
|
+
function __wbg_adapter_312(arg0, arg1, arg2, arg3) {
|
317
317
|
wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h5286c52f12e3fed2(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
318
318
|
}
|
319
319
|
/**
|
@@ -481,15 +481,18 @@ class AcmeDirectory {
|
|
481
481
|
* @param {string} new_nonce
|
482
482
|
* @param {string} new_account
|
483
483
|
* @param {string} new_order
|
484
|
+
* @param {string} revoke_cert
|
484
485
|
*/
|
485
|
-
constructor(new_nonce, new_account, new_order) {
|
486
|
+
constructor(new_nonce, new_account, new_order, revoke_cert) {
|
486
487
|
const ptr0 = passStringToWasm0(new_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
487
488
|
const len0 = WASM_VECTOR_LEN;
|
488
489
|
const ptr1 = passStringToWasm0(new_account, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
489
490
|
const len1 = WASM_VECTOR_LEN;
|
490
491
|
const ptr2 = passStringToWasm0(new_order, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
491
492
|
const len2 = WASM_VECTOR_LEN;
|
492
|
-
const
|
493
|
+
const ptr3 = passStringToWasm0(revoke_cert, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
494
|
+
const len3 = WASM_VECTOR_LEN;
|
495
|
+
const ret = wasm$1.acmedirectory_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
493
496
|
return AcmeDirectory.__wrap(ret);
|
494
497
|
}
|
495
498
|
/**
|
@@ -552,6 +555,26 @@ class AcmeDirectory {
|
|
552
555
|
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
553
556
|
}
|
554
557
|
}
|
558
|
+
/**
|
559
|
+
* @returns {string}
|
560
|
+
*/
|
561
|
+
get revokeCert() {
|
562
|
+
let deferred1_0;
|
563
|
+
let deferred1_1;
|
564
|
+
try {
|
565
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
566
|
+
wasm$1.acmedirectory_revokeCert(retptr, this.__wbg_ptr);
|
567
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
568
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
569
|
+
deferred1_0 = r0;
|
570
|
+
deferred1_1 = r1;
|
571
|
+
return getStringFromWasm0(r0, r1);
|
572
|
+
}
|
573
|
+
finally {
|
574
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
575
|
+
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
576
|
+
}
|
577
|
+
}
|
555
578
|
}
|
556
579
|
/**
|
557
580
|
* to avoid recursion
|
@@ -2780,8 +2803,9 @@ class WireIdentity {
|
|
2780
2803
|
* @param {string} handle
|
2781
2804
|
* @param {string} display_name
|
2782
2805
|
* @param {string} domain
|
2806
|
+
* @param {string} certificate
|
2783
2807
|
*/
|
2784
|
-
constructor(client_id, handle, display_name, domain) {
|
2808
|
+
constructor(client_id, handle, display_name, domain, certificate) {
|
2785
2809
|
const ptr0 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2786
2810
|
const len0 = WASM_VECTOR_LEN;
|
2787
2811
|
const ptr1 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
@@ -2790,7 +2814,9 @@ class WireIdentity {
|
|
2790
2814
|
const len2 = WASM_VECTOR_LEN;
|
2791
2815
|
const ptr3 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2792
2816
|
const len3 = WASM_VECTOR_LEN;
|
2793
|
-
const
|
2817
|
+
const ptr4 = passStringToWasm0(certificate, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2818
|
+
const len4 = WASM_VECTOR_LEN;
|
2819
|
+
const ret = wasm$1.wireidentity_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
2794
2820
|
return WireIdentity.__wrap(ret);
|
2795
2821
|
}
|
2796
2822
|
/**
|
@@ -2861,7 +2887,27 @@ class WireIdentity {
|
|
2861
2887
|
let deferred1_1;
|
2862
2888
|
try {
|
2863
2889
|
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2864
|
-
wasm$1.
|
2890
|
+
wasm$1.acmedirectory_revokeCert(retptr, this.__wbg_ptr);
|
2891
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2892
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2893
|
+
deferred1_0 = r0;
|
2894
|
+
deferred1_1 = r1;
|
2895
|
+
return getStringFromWasm0(r0, r1);
|
2896
|
+
}
|
2897
|
+
finally {
|
2898
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2899
|
+
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
2900
|
+
}
|
2901
|
+
}
|
2902
|
+
/**
|
2903
|
+
* @returns {string}
|
2904
|
+
*/
|
2905
|
+
get certificate() {
|
2906
|
+
let deferred1_0;
|
2907
|
+
let deferred1_1;
|
2908
|
+
try {
|
2909
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2910
|
+
wasm$1.wireidentity_certificate(retptr, this.__wbg_ptr);
|
2865
2911
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2866
2912
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2867
2913
|
deferred1_0 = r0;
|
@@ -2905,9 +2951,6 @@ async function __wbg_load(module, imports) {
|
|
2905
2951
|
function __wbg_get_imports() {
|
2906
2952
|
const imports = {};
|
2907
2953
|
imports.wbg = {};
|
2908
|
-
imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
|
2909
|
-
takeObject(arg0);
|
2910
|
-
};
|
2911
2954
|
imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
|
2912
2955
|
const ret = getObject(arg0);
|
2913
2956
|
return addHeapObject(ret);
|
@@ -2917,6 +2960,9 @@ function __wbg_get_imports() {
|
|
2917
2960
|
const ret = typeof (val) === 'object' && val !== null;
|
2918
2961
|
return ret;
|
2919
2962
|
};
|
2963
|
+
imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
|
2964
|
+
takeObject(arg0);
|
2965
|
+
};
|
2920
2966
|
imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function (arg0, arg1) {
|
2921
2967
|
const ret = getObject(arg0)[getObject(arg1)];
|
2922
2968
|
return addHeapObject(ret);
|
@@ -2969,34 +3015,46 @@ function __wbg_get_imports() {
|
|
2969
3015
|
const ret = getObject(arg0).length;
|
2970
3016
|
return ret;
|
2971
3017
|
};
|
3018
|
+
imports.wbg.__wbg_new_8125e318e6245eed = function (arg0) {
|
3019
|
+
const ret = new Uint8Array(getObject(arg0));
|
3020
|
+
return addHeapObject(ret);
|
3021
|
+
};
|
2972
3022
|
imports.wbg.__wbg_call_01734de55d61e11d = function () {
|
2973
3023
|
return handleError(function (arg0, arg1, arg2) {
|
2974
3024
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
2975
3025
|
return addHeapObject(ret);
|
2976
3026
|
}, arguments);
|
2977
3027
|
};
|
2978
|
-
imports.wbg.
|
2979
|
-
const ret = new
|
3028
|
+
imports.wbg.__wbg_new_56693dbed0c32988 = function () {
|
3029
|
+
const ret = new Map();
|
2980
3030
|
return addHeapObject(ret);
|
2981
3031
|
};
|
2982
|
-
imports.wbg.
|
2983
|
-
const ret =
|
3032
|
+
imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function (arg0, arg1, arg2) {
|
3033
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
2984
3034
|
return addHeapObject(ret);
|
2985
3035
|
};
|
2986
|
-
imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
|
2987
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
2988
|
-
};
|
2989
3036
|
imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
|
2990
3037
|
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
2991
3038
|
return addHeapObject(ret);
|
2992
3039
|
};
|
3040
|
+
imports.wbg.__wbindgen_number_new = function (arg0) {
|
3041
|
+
const ret = arg0;
|
3042
|
+
return addHeapObject(ret);
|
3043
|
+
};
|
3044
|
+
imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
|
3045
|
+
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
3046
|
+
return addHeapObject(ret);
|
3047
|
+
};
|
3048
|
+
imports.wbg.__wbg_new_898a68150f225f2e = function () {
|
3049
|
+
const ret = new Array();
|
3050
|
+
return addHeapObject(ret);
|
3051
|
+
};
|
2993
3052
|
imports.wbg.__wbg_push_ca1c26067ef907ac = function (arg0, arg1) {
|
2994
3053
|
const ret = getObject(arg0).push(getObject(arg1));
|
2995
3054
|
return ret;
|
2996
3055
|
};
|
2997
|
-
imports.wbg.
|
2998
|
-
|
2999
|
-
return addHeapObject(ret);
|
3056
|
+
imports.wbg.__wbg_set_502d29070ea18557 = function (arg0, arg1, arg2) {
|
3057
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
3000
3058
|
};
|
3001
3059
|
imports.wbg.__wbg_new_b51585de1b234aff = function () {
|
3002
3060
|
const ret = new Object();
|
@@ -3005,20 +3063,8 @@ function __wbg_get_imports() {
|
|
3005
3063
|
imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
|
3006
3064
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
3007
3065
|
};
|
3008
|
-
imports.wbg.
|
3009
|
-
const ret = arg0;
|
3010
|
-
return addHeapObject(ret);
|
3011
|
-
};
|
3012
|
-
imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
|
3013
|
-
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
3014
|
-
return addHeapObject(ret);
|
3015
|
-
};
|
3016
|
-
imports.wbg.__wbg_new_56693dbed0c32988 = function () {
|
3017
|
-
const ret = new Map();
|
3018
|
-
return addHeapObject(ret);
|
3019
|
-
};
|
3020
|
-
imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function (arg0, arg1, arg2) {
|
3021
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
3066
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
|
3067
|
+
const ret = BigInt.asUintN(64, arg0);
|
3022
3068
|
return addHeapObject(ret);
|
3023
3069
|
};
|
3024
3070
|
imports.wbg.__wbg_new_d258248ed531ff54 = function (arg0, arg1) {
|
@@ -3144,7 +3190,7 @@ function __wbg_get_imports() {
|
|
3144
3190
|
const a = state0.a;
|
3145
3191
|
state0.a = 0;
|
3146
3192
|
try {
|
3147
|
-
return
|
3193
|
+
return __wbg_adapter_312(a, state0.b, arg0, arg1);
|
3148
3194
|
}
|
3149
3195
|
finally {
|
3150
3196
|
state0.a = a;
|
@@ -3597,11 +3643,11 @@ function __wbg_get_imports() {
|
|
3597
3643
|
return addHeapObject(ret);
|
3598
3644
|
}, arguments);
|
3599
3645
|
};
|
3600
|
-
imports.wbg.
|
3646
|
+
imports.wbg.__wbindgen_closure_wrapper1715 = function (arg0, arg1, arg2) {
|
3601
3647
|
const ret = makeMutClosure(arg0, arg1, 149, __wbg_adapter_52);
|
3602
3648
|
return addHeapObject(ret);
|
3603
3649
|
};
|
3604
|
-
imports.wbg.
|
3650
|
+
imports.wbg.__wbindgen_closure_wrapper4850 = function (arg0, arg1, arg2) {
|
3605
3651
|
const ret = makeMutClosure(arg0, arg1, 149, __wbg_adapter_55);
|
3606
3652
|
return addHeapObject(ret);
|
3607
3653
|
};
|
@@ -3669,7 +3715,7 @@ var exports = /*#__PURE__*/Object.freeze({
|
|
3669
3715
|
initSync: initSync
|
3670
3716
|
});
|
3671
3717
|
|
3672
|
-
const wasm_path = "assets/core_crypto_ffi-
|
3718
|
+
const wasm_path = "assets/core_crypto_ffi-713c72c1.wasm";
|
3673
3719
|
|
3674
3720
|
|
3675
3721
|
var wasm = async (opt = {}) => {
|