@wireapp/core-crypto 11.0.0 → 11.0.2
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.
|
Binary file
|
|
@@ -924,7 +924,7 @@ export const sqlite3_os_init: () => number;
|
|
|
924
924
|
export const __wbg_jspi_task_poll: (a: number) => void;
|
|
925
925
|
export const _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueINtNtCs4NIexwV1FGX_4core6result6ResultuNtB8_7JsErrorEKb1_ECs6OPVFd5KbZe_6js_sys: (a: number, b: number, c: any) => [number, number];
|
|
926
926
|
export const _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress4_1__6invokeINtCs6OPVFd5KbZe_6js_sys8FunctionFNtB8_7JsValueENtNtB8_3sys9UndefinedEB14_uKb1_EB17_: (a: number, b: number, c: any, d: any) => void;
|
|
927
|
-
export const
|
|
927
|
+
export const _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuKb1_ECsl3EkdlbQ3RX_20core_crypto_keystore: (a: number, b: number, c: any) => void;
|
|
928
928
|
export const _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features9gen_Event5EventuKb1_ECsbZGnklYUYj7_3idb: (a: number, b: number, c: any) => void;
|
|
929
929
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
930
930
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
package/dist/corecrypto.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export declare enum MlsError_Tags {
|
|
|
103
103
|
StaleCommit = "StaleCommit",
|
|
104
104
|
OrphanWelcome = "OrphanWelcome",
|
|
105
105
|
MessageRejected = "MessageRejected",
|
|
106
|
+
InvalidCredentials = "InvalidCredentials",
|
|
106
107
|
Other = "Other"
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
@@ -247,6 +248,20 @@ export declare const MlsError: Readonly<{
|
|
|
247
248
|
message: string;
|
|
248
249
|
stack?: string;
|
|
249
250
|
cause?: unknown;
|
|
251
|
+
} | {
|
|
252
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
253
|
+
readonly inner: Readonly<{
|
|
254
|
+
reason: string;
|
|
255
|
+
}>;
|
|
256
|
+
/**
|
|
257
|
+
* @private
|
|
258
|
+
* This field is private and should not be used, use `tag` instead.
|
|
259
|
+
*/
|
|
260
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
261
|
+
name: string;
|
|
262
|
+
message: string;
|
|
263
|
+
stack?: string;
|
|
264
|
+
cause?: unknown;
|
|
250
265
|
} | {
|
|
251
266
|
readonly tag: MlsError_Tags.Other;
|
|
252
267
|
readonly inner: Readonly<{
|
|
@@ -988,6 +1003,94 @@ export declare const MlsError: Readonly<{
|
|
|
988
1003
|
stackTraceLimit: number;
|
|
989
1004
|
isError(value: unknown): value is Error;
|
|
990
1005
|
};
|
|
1006
|
+
InvalidCredentials: {
|
|
1007
|
+
new (inner: {
|
|
1008
|
+
reason: string;
|
|
1009
|
+
}): {
|
|
1010
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
1011
|
+
readonly inner: Readonly<{
|
|
1012
|
+
reason: string;
|
|
1013
|
+
}>;
|
|
1014
|
+
/**
|
|
1015
|
+
* @private
|
|
1016
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
1019
|
+
name: string;
|
|
1020
|
+
message: string;
|
|
1021
|
+
stack?: string;
|
|
1022
|
+
cause?: unknown;
|
|
1023
|
+
};
|
|
1024
|
+
"new"(inner: {
|
|
1025
|
+
reason: string;
|
|
1026
|
+
}): {
|
|
1027
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
1028
|
+
readonly inner: Readonly<{
|
|
1029
|
+
reason: string;
|
|
1030
|
+
}>;
|
|
1031
|
+
/**
|
|
1032
|
+
* @private
|
|
1033
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1034
|
+
*/
|
|
1035
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
1036
|
+
name: string;
|
|
1037
|
+
message: string;
|
|
1038
|
+
stack?: string;
|
|
1039
|
+
cause?: unknown;
|
|
1040
|
+
};
|
|
1041
|
+
instanceOf(obj: any): obj is {
|
|
1042
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
1043
|
+
readonly inner: Readonly<{
|
|
1044
|
+
reason: string;
|
|
1045
|
+
}>;
|
|
1046
|
+
/**
|
|
1047
|
+
* @private
|
|
1048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
1051
|
+
name: string;
|
|
1052
|
+
message: string;
|
|
1053
|
+
stack?: string;
|
|
1054
|
+
cause?: unknown;
|
|
1055
|
+
};
|
|
1056
|
+
hasInner(obj: any): obj is {
|
|
1057
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
1058
|
+
readonly inner: Readonly<{
|
|
1059
|
+
reason: string;
|
|
1060
|
+
}>;
|
|
1061
|
+
/**
|
|
1062
|
+
* @private
|
|
1063
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1064
|
+
*/
|
|
1065
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
1066
|
+
name: string;
|
|
1067
|
+
message: string;
|
|
1068
|
+
stack?: string;
|
|
1069
|
+
cause?: unknown;
|
|
1070
|
+
};
|
|
1071
|
+
getInner(obj: {
|
|
1072
|
+
readonly tag: MlsError_Tags.InvalidCredentials;
|
|
1073
|
+
readonly inner: Readonly<{
|
|
1074
|
+
reason: string;
|
|
1075
|
+
}>;
|
|
1076
|
+
/**
|
|
1077
|
+
* @private
|
|
1078
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly [uniffiTypeNameSymbol]: "MlsError";
|
|
1081
|
+
name: string;
|
|
1082
|
+
message: string;
|
|
1083
|
+
stack?: string;
|
|
1084
|
+
cause?: unknown;
|
|
1085
|
+
}): Readonly<{
|
|
1086
|
+
reason: string;
|
|
1087
|
+
}>;
|
|
1088
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1089
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1090
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1091
|
+
stackTraceLimit: number;
|
|
1092
|
+
isError(value: unknown): value is Error;
|
|
1093
|
+
};
|
|
991
1094
|
Other: {
|
|
992
1095
|
new (inner: {
|
|
993
1096
|
msg: string;
|
|
@@ -1080,7 +1183,7 @@ export declare const MlsError: Readonly<{
|
|
|
1080
1183
|
/**
|
|
1081
1184
|
* Errors produced by the MLS layer.
|
|
1082
1185
|
*/
|
|
1083
|
-
export type MlsError = InstanceType<typeof MlsError["ConversationAlreadyExists" | "DuplicateMessage" | "BufferedFutureMessage" | "WrongEpoch" | "BufferedCommit" | "MessageEpochTooOld" | "SelfCommitIgnored" | "UnmergedPendingGroup" | "StaleProposal" | "StaleCommit" | "OrphanWelcome" | "MessageRejected" | "Other"]>;
|
|
1186
|
+
export type MlsError = InstanceType<typeof MlsError["ConversationAlreadyExists" | "DuplicateMessage" | "BufferedFutureMessage" | "WrongEpoch" | "BufferedCommit" | "MessageEpochTooOld" | "SelfCommitIgnored" | "UnmergedPendingGroup" | "StaleProposal" | "StaleCommit" | "OrphanWelcome" | "MessageRejected" | "InvalidCredentials" | "Other"]>;
|
|
1084
1187
|
export declare enum ProteusError_Tags {
|
|
1085
1188
|
SessionNotFound = "SessionNotFound",
|
|
1086
1189
|
DuplicateMessage = "DuplicateMessage",
|
package/dist/corecrypto.js
CHANGED
|
@@ -477,7 +477,7 @@ __export(exports_wasm_bindgen, {
|
|
|
477
477
|
ForeignFutureCompleteF32: () => ForeignFutureCompleteF32
|
|
478
478
|
});
|
|
479
479
|
|
|
480
|
-
// packages/browser/src/autogenerated/wasm-bindgen/snippets/core-crypto-keystore-
|
|
480
|
+
// packages/browser/src/autogenerated/wasm-bindgen/snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js
|
|
481
481
|
var exports_opfs_vfs = {};
|
|
482
482
|
__export(exports_opfs_vfs, {
|
|
483
483
|
write: () => write,
|
|
@@ -3296,7 +3296,7 @@ function __wbg_get_imports() {
|
|
|
3296
3296
|
var ptr1 = ret.__destroy_into_raw();
|
|
3297
3297
|
return ptr1;
|
|
3298
3298
|
},
|
|
3299
|
-
|
|
3299
|
+
__wbg_clearTimeout_6db2c7091cc66280: function(arg0) {
|
|
3300
3300
|
clearTimeout(arg0);
|
|
3301
3301
|
},
|
|
3302
3302
|
__wbg_close_39a0adee471336e2: function(arg0) {
|
|
@@ -3411,7 +3411,7 @@ function __wbg_get_imports() {
|
|
|
3411
3411
|
const ret = arg0.execute;
|
|
3412
3412
|
return ret;
|
|
3413
3413
|
},
|
|
3414
|
-
|
|
3414
|
+
__wbg_exists_389a4c01e8b3531f: function(arg0, arg1) {
|
|
3415
3415
|
const ret = exists(getStringFromWasm0(arg0, arg1));
|
|
3416
3416
|
return ret;
|
|
3417
3417
|
},
|
|
@@ -3793,7 +3793,7 @@ function __wbg_get_imports() {
|
|
|
3793
3793
|
return ret;
|
|
3794
3794
|
}, arguments);
|
|
3795
3795
|
},
|
|
3796
|
-
|
|
3796
|
+
__wbg_open_5a607260231fba95: function(arg0, arg1, arg2) {
|
|
3797
3797
|
const ret = open(getStringFromWasm0(arg0, arg1), arg2 !== 0);
|
|
3798
3798
|
return ret;
|
|
3799
3799
|
},
|
|
@@ -3850,7 +3850,7 @@ function __wbg_get_imports() {
|
|
|
3850
3850
|
const ret = Math.random();
|
|
3851
3851
|
return ret;
|
|
3852
3852
|
},
|
|
3853
|
-
|
|
3853
|
+
__wbg_remove_e5a149a356da1a1c: function(arg0, arg1) {
|
|
3854
3854
|
const ret = remove(getStringFromWasm0(arg0, arg1));
|
|
3855
3855
|
return ret;
|
|
3856
3856
|
},
|
|
@@ -3921,7 +3921,7 @@ function __wbg_get_imports() {
|
|
|
3921
3921
|
const ret = arg0.send_commit_bundle;
|
|
3922
3922
|
return ret;
|
|
3923
3923
|
},
|
|
3924
|
-
|
|
3924
|
+
__wbg_setTimeout_425a75b085da4e10: function(arg0, arg1) {
|
|
3925
3925
|
const ret = setTimeout(arg0, arg1);
|
|
3926
3926
|
return ret;
|
|
3927
3927
|
},
|
|
@@ -3977,7 +3977,7 @@ function __wbg_get_imports() {
|
|
|
3977
3977
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3978
3978
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3979
3979
|
},
|
|
3980
|
-
|
|
3980
|
+
__wbg_start_b3eef0d78e5310b2: function(arg0, arg1) {
|
|
3981
3981
|
const ret = start(getStringFromWasm0(arg0, arg1));
|
|
3982
3982
|
return ret;
|
|
3983
3983
|
},
|
|
@@ -4102,7 +4102,7 @@ function __wbg_get_imports() {
|
|
|
4102
4102
|
return ret;
|
|
4103
4103
|
},
|
|
4104
4104
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
4105
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4105
|
+
const ret = makeMutClosure(arg0, arg1, _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuKb1_ECsl3EkdlbQ3RX_20core_crypto_keystore);
|
|
4106
4106
|
return ret;
|
|
4107
4107
|
},
|
|
4108
4108
|
__wbindgen_generic_0000000000000004: function(arg0) {
|
|
@@ -4145,21 +4145,21 @@ function __wbg_get_imports() {
|
|
|
4145
4145
|
return {
|
|
4146
4146
|
__proto__: null,
|
|
4147
4147
|
"./index_bg.js": import0,
|
|
4148
|
-
"./snippets/core-crypto-keystore-
|
|
4149
|
-
"./snippets/core-crypto-keystore-
|
|
4150
|
-
"./snippets/core-crypto-keystore-
|
|
4151
|
-
"./snippets/core-crypto-keystore-
|
|
4152
|
-
"./snippets/core-crypto-keystore-
|
|
4153
|
-
"./snippets/core-crypto-keystore-
|
|
4154
|
-
"./snippets/core-crypto-keystore-
|
|
4155
|
-
"./snippets/core-crypto-keystore-
|
|
4148
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4149
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4150
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4151
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4152
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4153
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4154
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs,
|
|
4155
|
+
"./snippets/core-crypto-keystore-7fe48724e8e174ed/src/connection/opfs_vfs.js": exports_opfs_vfs
|
|
4156
4156
|
};
|
|
4157
4157
|
}
|
|
4158
4158
|
function _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features9gen_Event5EventuKb1_ECsbZGnklYUYj7_3idb(arg0, arg1, arg2) {
|
|
4159
4159
|
wasm2._RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features9gen_Event5EventuKb1_ECsbZGnklYUYj7_3idb(arg0, arg1, arg2);
|
|
4160
4160
|
}
|
|
4161
|
-
function
|
|
4162
|
-
wasm2.
|
|
4161
|
+
function _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuKb1_ECsl3EkdlbQ3RX_20core_crypto_keystore(arg0, arg1, arg2) {
|
|
4162
|
+
wasm2._RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCs4g1QEnyMkXh_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuKb1_ECsl3EkdlbQ3RX_20core_crypto_keystore(arg0, arg1, arg2);
|
|
4163
4163
|
}
|
|
4164
4164
|
function _RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueINtNtCs4NIexwV1FGX_4core6result6ResultuNtB8_7JsErrorEKb1_ECs6OPVFd5KbZe_6js_sys(arg0, arg1, arg2) {
|
|
4165
4165
|
const ret = wasm2._RINvNvNtNtCseJanozDyQMl_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueINtNtCs4NIexwV1FGX_4core6result6ResultuNtB8_7JsErrorEKb1_ECs6OPVFd5KbZe_6js_sys(arg0, arg1, arg2);
|
|
@@ -5543,6 +5543,7 @@ var MlsError_Tags;
|
|
|
5543
5543
|
MlsError_Tags2["StaleCommit"] = "StaleCommit";
|
|
5544
5544
|
MlsError_Tags2["OrphanWelcome"] = "OrphanWelcome";
|
|
5545
5545
|
MlsError_Tags2["MessageRejected"] = "MessageRejected";
|
|
5546
|
+
MlsError_Tags2["InvalidCredentials"] = "InvalidCredentials";
|
|
5546
5547
|
MlsError_Tags2["Other"] = "Other";
|
|
5547
5548
|
})(MlsError_Tags ||= {});
|
|
5548
5549
|
var MlsError = (() => {
|
|
@@ -5761,6 +5762,28 @@ var MlsError = (() => {
|
|
|
5761
5762
|
}
|
|
5762
5763
|
}
|
|
5763
5764
|
|
|
5765
|
+
class InvalidCredentials_ extends UniffiError {
|
|
5766
|
+
[uniffiTypeNameSymbol] = "MlsError";
|
|
5767
|
+
tag = "InvalidCredentials" /* InvalidCredentials */;
|
|
5768
|
+
inner;
|
|
5769
|
+
constructor(inner) {
|
|
5770
|
+
super("MlsError", "InvalidCredentials");
|
|
5771
|
+
this.inner = Object.freeze(inner);
|
|
5772
|
+
}
|
|
5773
|
+
static new(inner) {
|
|
5774
|
+
return new InvalidCredentials_(inner);
|
|
5775
|
+
}
|
|
5776
|
+
static instanceOf(obj) {
|
|
5777
|
+
return obj.tag === "InvalidCredentials" /* InvalidCredentials */;
|
|
5778
|
+
}
|
|
5779
|
+
static hasInner(obj) {
|
|
5780
|
+
return InvalidCredentials_.instanceOf(obj);
|
|
5781
|
+
}
|
|
5782
|
+
static getInner(obj) {
|
|
5783
|
+
return obj.inner;
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
|
|
5764
5787
|
class Other_ extends UniffiError {
|
|
5765
5788
|
[uniffiTypeNameSymbol] = "MlsError";
|
|
5766
5789
|
tag = "Other" /* Other */;
|
|
@@ -5799,6 +5822,7 @@ var MlsError = (() => {
|
|
|
5799
5822
|
StaleCommit: StaleCommit_,
|
|
5800
5823
|
OrphanWelcome: OrphanWelcome_,
|
|
5801
5824
|
MessageRejected: MessageRejected_,
|
|
5825
|
+
InvalidCredentials: InvalidCredentials_,
|
|
5802
5826
|
Other: Other_
|
|
5803
5827
|
});
|
|
5804
5828
|
})();
|
|
@@ -5832,6 +5856,8 @@ var FfiConverterTypeMlsError = (() => {
|
|
|
5832
5856
|
case 12:
|
|
5833
5857
|
return new MlsError.MessageRejected({ reason: FfiConverterString.readFromCursor(c) });
|
|
5834
5858
|
case 13:
|
|
5859
|
+
return new MlsError.InvalidCredentials({ reason: FfiConverterString.readFromCursor(c) });
|
|
5860
|
+
case 14:
|
|
5835
5861
|
return new MlsError.Other({ msg: FfiConverterString.readFromCursor(c) });
|
|
5836
5862
|
default:
|
|
5837
5863
|
throw new UniffiInternalError.UnexpectedEnumCase;
|
|
@@ -5891,9 +5917,15 @@ var FfiConverterTypeMlsError = (() => {
|
|
|
5891
5917
|
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
5892
5918
|
return;
|
|
5893
5919
|
}
|
|
5894
|
-
case "
|
|
5920
|
+
case "InvalidCredentials" /* InvalidCredentials */: {
|
|
5895
5921
|
c.writeI32(13);
|
|
5896
5922
|
const inner = value.inner;
|
|
5923
|
+
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
5924
|
+
return;
|
|
5925
|
+
}
|
|
5926
|
+
case "Other" /* Other */: {
|
|
5927
|
+
c.writeI32(14);
|
|
5928
|
+
const inner = value.inner;
|
|
5897
5929
|
FfiConverterString.writeIntoCursor(inner.msg, c);
|
|
5898
5930
|
return;
|
|
5899
5931
|
}
|
|
@@ -5945,6 +5977,12 @@ var FfiConverterTypeMlsError = (() => {
|
|
|
5945
5977
|
size2 += FfiConverterString.allocationSize(inner.reason);
|
|
5946
5978
|
return size2;
|
|
5947
5979
|
}
|
|
5980
|
+
case "InvalidCredentials" /* InvalidCredentials */: {
|
|
5981
|
+
const inner = value.inner;
|
|
5982
|
+
let size2 = 4;
|
|
5983
|
+
size2 += FfiConverterString.allocationSize(inner.reason);
|
|
5984
|
+
return size2;
|
|
5985
|
+
}
|
|
5948
5986
|
case "Other" /* Other */: {
|
|
5949
5987
|
const inner = value.inner;
|
|
5950
5988
|
let size2 = 4;
|