@wireapp/core-crypto 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
Binary file
|
@@ -1,3 +1,13 @@
|
|
1
|
+
declare enum CredentialType {
|
2
|
+
/**
|
3
|
+
* Just a KeyPair
|
4
|
+
*/
|
5
|
+
Basic = 1,
|
6
|
+
/**
|
7
|
+
* A certificate obtained through e2e identity enrollment process
|
8
|
+
*/
|
9
|
+
X509 = 2
|
10
|
+
}
|
1
11
|
declare enum Ciphersuite {
|
2
12
|
/**
|
3
13
|
* DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
|
@@ -28,16 +38,6 @@ declare enum Ciphersuite {
|
|
28
38
|
*/
|
29
39
|
MLS_256_DHKEMP384_AES256GCM_SHA384_P384 = 7
|
30
40
|
}
|
31
|
-
declare enum CredentialType {
|
32
|
-
/**
|
33
|
-
* Just a KeyPair
|
34
|
-
*/
|
35
|
-
Basic = 1,
|
36
|
-
/**
|
37
|
-
* A certificate obtained through e2e identity enrollment process
|
38
|
-
*/
|
39
|
-
X509 = 2
|
40
|
-
}
|
41
41
|
declare enum WirePolicy {
|
42
42
|
/**
|
43
43
|
* Handshake messages are never encrypted
|
@@ -13,14 +13,6 @@ var takeObject = function(idx) {
|
|
13
13
|
dropObject(idx);
|
14
14
|
return ret;
|
15
15
|
};
|
16
|
-
var addHeapObject = function(obj) {
|
17
|
-
if (heap_next === heap.length)
|
18
|
-
heap.push(heap.length + 1);
|
19
|
-
const idx = heap_next;
|
20
|
-
heap_next = heap[idx];
|
21
|
-
heap[idx] = obj;
|
22
|
-
return idx;
|
23
|
-
};
|
24
16
|
var getUint8ArrayMemory0 = function() {
|
25
17
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
26
18
|
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
@@ -31,6 +23,14 @@ var getStringFromWasm0 = function(ptr, len) {
|
|
31
23
|
ptr = ptr >>> 0;
|
32
24
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
33
25
|
};
|
26
|
+
var addHeapObject = function(obj) {
|
27
|
+
if (heap_next === heap.length)
|
28
|
+
heap.push(heap.length + 1);
|
29
|
+
const idx = heap_next;
|
30
|
+
heap_next = heap[idx];
|
31
|
+
heap[idx] = obj;
|
32
|
+
return idx;
|
33
|
+
};
|
34
34
|
var passStringToWasm0 = function(arg, malloc, realloc) {
|
35
35
|
if (realloc === undefined) {
|
36
36
|
const buf = cachedTextEncoder.encode(arg);
|
@@ -152,13 +152,13 @@ var makeMutClosure = function(arg0, arg1, dtor, f) {
|
|
152
152
|
return real;
|
153
153
|
};
|
154
154
|
var __wbg_adapter_54 = function(arg0, arg1, arg2) {
|
155
|
-
wasm.
|
155
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hff2684683db17a09(arg0, arg1, addHeapObject(arg2));
|
156
156
|
};
|
157
157
|
var __wbg_adapter_57 = function(arg0, arg1, arg2) {
|
158
|
-
wasm.
|
158
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5a7de9fb06510c10(arg0, arg1, addHeapObject(arg2));
|
159
159
|
};
|
160
160
|
var __wbg_adapter_60 = function(arg0, arg1, arg2) {
|
161
|
-
wasm.
|
161
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3476f7c9293a904a(arg0, arg1, addHeapObject(arg2));
|
162
162
|
};
|
163
163
|
var getArrayJsValueFromWasm0 = function(ptr, len) {
|
164
164
|
ptr = ptr >>> 0;
|
@@ -210,7 +210,7 @@ var handleError = function(f, args) {
|
|
210
210
|
}
|
211
211
|
};
|
212
212
|
var __wbg_adapter_512 = function(arg0, arg1, arg2, arg3) {
|
213
|
-
wasm.
|
213
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h76d6b1db634d2144(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
214
214
|
};
|
215
215
|
async function __wbg_load(module, imports) {
|
216
216
|
if (typeof Response === "function" && module instanceof Response) {
|
@@ -242,48 +242,52 @@ var __wbg_get_imports = function() {
|
|
242
242
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
243
243
|
takeObject(arg0);
|
244
244
|
};
|
245
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
246
|
-
const ret = arg0;
|
247
|
-
return addHeapObject(ret);
|
248
|
-
};
|
249
245
|
imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
|
250
246
|
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
251
247
|
return addHeapObject(ret);
|
252
248
|
};
|
253
|
-
imports.wbg.__wbg_acmedirectory_new = function(arg0) {
|
254
|
-
const ret = AcmeDirectory.__wrap(arg0);
|
255
|
-
return addHeapObject(ret);
|
256
|
-
};
|
257
249
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
258
250
|
const ret = getStringFromWasm0(arg0, arg1);
|
259
251
|
return addHeapObject(ret);
|
260
252
|
};
|
261
|
-
imports.wbg.
|
262
|
-
const ret =
|
253
|
+
imports.wbg.__wbg_acmedirectory_new = function(arg0) {
|
254
|
+
const ret = AcmeDirectory.__wrap(arg0);
|
263
255
|
return addHeapObject(ret);
|
264
256
|
};
|
265
|
-
imports.wbg.
|
266
|
-
const ret =
|
257
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
258
|
+
const ret = arg0;
|
259
|
+
return addHeapObject(ret);
|
260
|
+
};
|
261
|
+
imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
|
262
|
+
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
267
263
|
return addHeapObject(ret);
|
268
264
|
};
|
269
|
-
imports.wbg.
|
265
|
+
imports.wbg.__wbg_execute_73079ea1d8ef097c = function() {
|
270
266
|
return handleError(function(arg0, arg1) {
|
271
267
|
const ret = getObject(arg0).execute(CoreCryptoContext.__wrap(arg1));
|
272
268
|
return addHeapObject(ret);
|
273
269
|
}, arguments);
|
274
270
|
};
|
275
|
-
imports.wbg.
|
276
|
-
const ret =
|
271
|
+
imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
|
272
|
+
const ret = NewAcmeAuthz.__wrap(arg0);
|
277
273
|
return addHeapObject(ret);
|
278
274
|
};
|
279
|
-
imports.wbg.
|
280
|
-
const ret =
|
275
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
276
|
+
const ret = BigInt.asUintN(64, arg0);
|
277
|
+
return addHeapObject(ret);
|
278
|
+
};
|
279
|
+
imports.wbg.__wbg_newacmeorder_new = function(arg0) {
|
280
|
+
const ret = NewAcmeOrder.__wrap(arg0);
|
281
281
|
return addHeapObject(ret);
|
282
282
|
};
|
283
283
|
imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
|
284
284
|
const ret = BufferedDecryptedMessage.__wrap(arg0);
|
285
285
|
return addHeapObject(ret);
|
286
286
|
};
|
287
|
+
imports.wbg.__wbg_commitbundle_new = function(arg0) {
|
288
|
+
const ret = CommitBundle.__wrap(arg0);
|
289
|
+
return addHeapObject(ret);
|
290
|
+
};
|
287
291
|
imports.wbg.__wbg_proposalbundle_new = function(arg0) {
|
288
292
|
const ret = ProposalBundle.__wrap(arg0);
|
289
293
|
return addHeapObject(ret);
|
@@ -292,10 +296,6 @@ var __wbg_get_imports = function() {
|
|
292
296
|
const ret = CoreCrypto.__wrap(arg0);
|
293
297
|
return addHeapObject(ret);
|
294
298
|
};
|
295
|
-
imports.wbg.__wbg_commitbundle_new = function(arg0) {
|
296
|
-
const ret = CommitBundle.__wrap(arg0);
|
297
|
-
return addHeapObject(ret);
|
298
|
-
};
|
299
299
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
300
300
|
const ret = getObject(arg0);
|
301
301
|
return addHeapObject(ret);
|
@@ -1053,12 +1053,12 @@ var __wbg_get_imports = function() {
|
|
1053
1053
|
const ret = makeMutClosure(arg0, arg1, 899, __wbg_adapter_54);
|
1054
1054
|
return addHeapObject(ret);
|
1055
1055
|
};
|
1056
|
-
imports.wbg.
|
1057
|
-
const ret = makeMutClosure(arg0, arg1,
|
1056
|
+
imports.wbg.__wbindgen_closure_wrapper13455 = function(arg0, arg1, arg2) {
|
1057
|
+
const ret = makeMutClosure(arg0, arg1, 2169, __wbg_adapter_57);
|
1058
1058
|
return addHeapObject(ret);
|
1059
1059
|
};
|
1060
|
-
imports.wbg.
|
1061
|
-
const ret = makeMutClosure(arg0, arg1,
|
1060
|
+
imports.wbg.__wbindgen_closure_wrapper15450 = function(arg0, arg1, arg2) {
|
1061
|
+
const ret = makeMutClosure(arg0, arg1, 2402, __wbg_adapter_60);
|
1062
1062
|
return addHeapObject(ret);
|
1063
1063
|
};
|
1064
1064
|
return imports;
|
@@ -1123,6 +1123,21 @@ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: ()
|
|
1123
1123
|
wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);
|
1124
1124
|
});
|
1125
1125
|
var cachedUint16ArrayMemory0 = null;
|
1126
|
+
var DeviceStatus = Object.freeze({
|
1127
|
+
Valid: 1,
|
1128
|
+
"1": "Valid",
|
1129
|
+
Expired: 2,
|
1130
|
+
"2": "Expired",
|
1131
|
+
Revoked: 3,
|
1132
|
+
"3": "Revoked"
|
1133
|
+
});
|
1134
|
+
var CoreCryptoLogLevel = Object.freeze({ Off: 1, "1": "Off", Trace: 2, "2": "Trace", Debug: 3, "3": "Debug", Info: 4, "4": "Info", Warn: 5, "5": "Warn", Error: 6, "6": "Error" });
|
1135
|
+
var CredentialType = Object.freeze({
|
1136
|
+
Basic: 1,
|
1137
|
+
"1": "Basic",
|
1138
|
+
X509: 2,
|
1139
|
+
"2": "X509"
|
1140
|
+
});
|
1126
1141
|
var Ciphersuite = Object.freeze({
|
1127
1142
|
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
|
1128
1143
|
"1": "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519",
|
@@ -1139,21 +1154,6 @@ var Ciphersuite = Object.freeze({
|
|
1139
1154
|
MLS_256_DHKEMP384_AES256GCM_SHA384_P384: 7,
|
1140
1155
|
"7": "MLS_256_DHKEMP384_AES256GCM_SHA384_P384"
|
1141
1156
|
});
|
1142
|
-
var DeviceStatus = Object.freeze({
|
1143
|
-
Valid: 1,
|
1144
|
-
"1": "Valid",
|
1145
|
-
Expired: 2,
|
1146
|
-
"2": "Expired",
|
1147
|
-
Revoked: 3,
|
1148
|
-
"3": "Revoked"
|
1149
|
-
});
|
1150
|
-
var CredentialType = Object.freeze({
|
1151
|
-
Basic: 1,
|
1152
|
-
"1": "Basic",
|
1153
|
-
X509: 2,
|
1154
|
-
"2": "X509"
|
1155
|
-
});
|
1156
|
-
var CoreCryptoLogLevel = Object.freeze({ Off: 1, "1": "Off", Trace: 2, "2": "Trace", Debug: 3, "3": "Debug", Info: 4, "4": "Info", Warn: 5, "5": "Warn", Error: 6, "6": "Error" });
|
1157
1157
|
var WirePolicy = Object.freeze({
|
1158
1158
|
Plaintext: 1,
|
1159
1159
|
"1": "Plaintext",
|
@@ -3500,6 +3500,9 @@ class CoreCryptoError extends Error {
|
|
3500
3500
|
}
|
3501
3501
|
}
|
3502
3502
|
static fromStdError(e) {
|
3503
|
+
if (e instanceof CoreCryptoError) {
|
3504
|
+
return e;
|
3505
|
+
}
|
3503
3506
|
const opts = {
|
3504
3507
|
cause: e.cause || undefined,
|
3505
3508
|
stack: e.stack || undefined
|