@wireapp/core-crypto 9.3.3 → 9.3.5
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 +1 -1
- package/src/autogenerated/core-crypto-ffi_bg.wasm +0 -0
- package/src/autogenerated/core-crypto-ffi_bg.wasm.d.ts +199 -199
- package/src/corecrypto.d.ts +187 -187
- package/src/corecrypto.js +541 -550
package/src/corecrypto.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined")
|
|
5
|
-
return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
1
|
// src/CoreCryptoError.ts
|
|
10
2
|
class CoreCryptoError extends Error {
|
|
11
3
|
errorStack;
|
|
@@ -60,12 +52,12 @@ class CoreCryptoError extends Error {
|
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
54
|
var ErrorType;
|
|
63
|
-
((
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
((ErrorType) => {
|
|
56
|
+
ErrorType["Mls"] = "Mls";
|
|
57
|
+
ErrorType["Proteus"] = "Proteus";
|
|
58
|
+
ErrorType["E2ei"] = "E2ei";
|
|
59
|
+
ErrorType["TransactionFailed"] = "TransactionFailed";
|
|
60
|
+
ErrorType["Other"] = "Other";
|
|
69
61
|
})(ErrorType ||= {});
|
|
70
62
|
function isCcErrorGeneric(error) {
|
|
71
63
|
return typeof error === "object" && error !== null && "errorStack" in error && "context" in error && "type" in error;
|
|
@@ -83,20 +75,20 @@ function isOtherError(error) {
|
|
|
83
75
|
return isCcError(error, "Other" /* Other */);
|
|
84
76
|
}
|
|
85
77
|
var MlsErrorType;
|
|
86
|
-
((
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
78
|
+
((MlsErrorType) => {
|
|
79
|
+
MlsErrorType["ConversationAlreadyExists"] = "ConversationAlreadyExists";
|
|
80
|
+
MlsErrorType["DuplicateMessage"] = "DuplicateMessage";
|
|
81
|
+
MlsErrorType["BufferedFutureMessage"] = "BufferedFutureMessage";
|
|
82
|
+
MlsErrorType["WrongEpoch"] = "WrongEpoch";
|
|
83
|
+
MlsErrorType["BufferedCommit"] = "BufferedCommit";
|
|
84
|
+
MlsErrorType["MessageEpochTooOld"] = "MessageEpochTooOld";
|
|
85
|
+
MlsErrorType["SelfCommitIgnored"] = "SelfCommitIgnored";
|
|
86
|
+
MlsErrorType["UnmergedPendingGroup"] = "UnmergedPendingGroup";
|
|
87
|
+
MlsErrorType["StaleProposal"] = "StaleProposal";
|
|
88
|
+
MlsErrorType["StaleCommit"] = "StaleCommit";
|
|
89
|
+
MlsErrorType["OrphanWelcome"] = "OrphanWelcome";
|
|
90
|
+
MlsErrorType["MessageRejected"] = "MessageRejected";
|
|
91
|
+
MlsErrorType["Other"] = "Other";
|
|
100
92
|
})(MlsErrorType ||= {});
|
|
101
93
|
function isMlsError(error, errorType) {
|
|
102
94
|
return isCcError(error, "Mls" /* Mls */) && error.context !== undefined && error.context.type === errorType;
|
|
@@ -138,11 +130,11 @@ function isMlsOtherError(error) {
|
|
|
138
130
|
return isMlsError(error, "Other" /* Other */);
|
|
139
131
|
}
|
|
140
132
|
var ProteusErrorType;
|
|
141
|
-
((
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
((ProteusErrorType) => {
|
|
134
|
+
ProteusErrorType["SessionNotFound"] = "SessionNotFound";
|
|
135
|
+
ProteusErrorType["DuplicateMessage"] = "DuplicateMessage";
|
|
136
|
+
ProteusErrorType["RemoteIdentityChanged"] = "RemoteIdentityChanged";
|
|
137
|
+
ProteusErrorType["Other"] = "Other";
|
|
146
138
|
})(ProteusErrorType ||= {});
|
|
147
139
|
function isProteusError(error, errorType) {
|
|
148
140
|
return isCcError(error, "Proteus" /* Proteus */) && error.context !== undefined && error.context.type === errorType;
|
|
@@ -200,10 +192,10 @@ if (!("encodeInto" in cachedTextEncoder)) {
|
|
|
200
192
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
201
193
|
if (realloc === undefined) {
|
|
202
194
|
const buf = cachedTextEncoder.encode(arg);
|
|
203
|
-
const
|
|
204
|
-
getUint8ArrayMemory0().subarray(
|
|
195
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
196
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
205
197
|
WASM_VECTOR_LEN = buf.length;
|
|
206
|
-
return
|
|
198
|
+
return ptr;
|
|
207
199
|
}
|
|
208
200
|
let len = arg.length;
|
|
209
201
|
let ptr = malloc(len, 1) >>> 0;
|
|
@@ -345,17 +337,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
345
337
|
CLOSURE_DTORS.register(real, state, state);
|
|
346
338
|
return real;
|
|
347
339
|
}
|
|
348
|
-
function _assertClass(instance, klass) {
|
|
349
|
-
if (!(instance instanceof klass)) {
|
|
350
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
354
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
355
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
356
|
-
WASM_VECTOR_LEN = arg.length;
|
|
357
|
-
return ptr;
|
|
358
|
-
}
|
|
359
340
|
function takeFromExternrefTable0(idx) {
|
|
360
341
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
361
342
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -372,6 +353,17 @@ function ciphersuiteDefault() {
|
|
|
372
353
|
const ret = wasm.ciphersuiteDefault();
|
|
373
354
|
return ret;
|
|
374
355
|
}
|
|
356
|
+
function _assertClass(instance, klass) {
|
|
357
|
+
if (!(instance instanceof klass)) {
|
|
358
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
362
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
363
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
364
|
+
WASM_VECTOR_LEN = arg.length;
|
|
365
|
+
return ptr;
|
|
366
|
+
}
|
|
375
367
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
376
368
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
377
369
|
for (let i = 0;i < array.length; i++) {
|
|
@@ -381,6 +373,14 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
381
373
|
WASM_VECTOR_LEN = array.length;
|
|
382
374
|
return ptr;
|
|
383
375
|
}
|
|
376
|
+
function openDatabase(name, key) {
|
|
377
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
379
|
+
_assertClass(key, DatabaseKey);
|
|
380
|
+
var ptr1 = key.__destroy_into_raw();
|
|
381
|
+
const ret = wasm.openDatabase(ptr0, len0, ptr1);
|
|
382
|
+
return ret;
|
|
383
|
+
}
|
|
384
384
|
function migrateDatabaseKeyTypeToBytes(path, old_key, new_key) {
|
|
385
385
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
386
386
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -398,14 +398,6 @@ function updateDatabaseKey(name, old_key, new_key) {
|
|
|
398
398
|
const ret = wasm.updateDatabaseKey(ptr0, len0, old_key.__wbg_ptr, new_key.__wbg_ptr);
|
|
399
399
|
return ret;
|
|
400
400
|
}
|
|
401
|
-
function openDatabase(name, key) {
|
|
402
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
403
|
-
const len0 = WASM_VECTOR_LEN;
|
|
404
|
-
_assertClass(key, DatabaseKey);
|
|
405
|
-
var ptr1 = key.__destroy_into_raw();
|
|
406
|
-
const ret = wasm.openDatabase(ptr0, len0, ptr1);
|
|
407
|
-
return ret;
|
|
408
|
-
}
|
|
409
401
|
function version() {
|
|
410
402
|
let deferred1_0;
|
|
411
403
|
let deferred1_1;
|
|
@@ -422,17 +414,17 @@ function build_metadata() {
|
|
|
422
414
|
const ret = wasm.build_metadata();
|
|
423
415
|
return BuildMetadata.__wrap(ret);
|
|
424
416
|
}
|
|
425
|
-
function
|
|
426
|
-
wasm.
|
|
417
|
+
function __wbg_adapter_18(arg0, arg1, arg2) {
|
|
418
|
+
wasm.closure2505_externref_shim(arg0, arg1, arg2);
|
|
427
419
|
}
|
|
428
|
-
function
|
|
429
|
-
wasm.
|
|
420
|
+
function __wbg_adapter_23(arg0, arg1, arg2) {
|
|
421
|
+
wasm.closure2883_externref_shim(arg0, arg1, arg2);
|
|
430
422
|
}
|
|
431
423
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
432
|
-
wasm.
|
|
424
|
+
wasm.closure942_externref_shim(arg0, arg1, arg2);
|
|
433
425
|
}
|
|
434
|
-
function
|
|
435
|
-
wasm.
|
|
426
|
+
function __wbg_adapter_479(arg0, arg1, arg2, arg3) {
|
|
427
|
+
wasm.closure2986_externref_shim(arg0, arg1, arg2, arg3);
|
|
436
428
|
}
|
|
437
429
|
var Ciphersuite = Object.freeze({
|
|
438
430
|
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
|
|
@@ -801,6 +793,12 @@ class ClientId {
|
|
|
801
793
|
const ptr = this.__destroy_into_raw();
|
|
802
794
|
wasm.__wbg_clientid_free(ptr, 0);
|
|
803
795
|
}
|
|
796
|
+
copyBytes() {
|
|
797
|
+
const ret = wasm.clientid_copyBytes(this.__wbg_ptr);
|
|
798
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
799
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
800
|
+
return v1;
|
|
801
|
+
}
|
|
804
802
|
constructor(bytes) {
|
|
805
803
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
806
804
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -809,12 +807,6 @@ class ClientId {
|
|
|
809
807
|
ClientIdFinalization.register(this, this.__wbg_ptr, this);
|
|
810
808
|
return this;
|
|
811
809
|
}
|
|
812
|
-
copyBytes() {
|
|
813
|
-
const ret = wasm.clientid_copyBytes(this.__wbg_ptr);
|
|
814
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
815
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
816
|
-
return v1;
|
|
817
|
-
}
|
|
818
810
|
}
|
|
819
811
|
if (Symbol.dispose)
|
|
820
812
|
ClientId.prototype[Symbol.dispose] = ClientId.prototype.free;
|
|
@@ -943,6 +935,12 @@ class ConversationId {
|
|
|
943
935
|
const ptr = this.__destroy_into_raw();
|
|
944
936
|
wasm.__wbg_conversationid_free(ptr, 0);
|
|
945
937
|
}
|
|
938
|
+
copyBytes() {
|
|
939
|
+
const ret = wasm.conversationid_copyBytes(this.__wbg_ptr);
|
|
940
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
941
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
942
|
+
return v1;
|
|
943
|
+
}
|
|
946
944
|
constructor(bytes) {
|
|
947
945
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
948
946
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -951,12 +949,6 @@ class ConversationId {
|
|
|
951
949
|
ConversationIdFinalization.register(this, this.__wbg_ptr, this);
|
|
952
950
|
return this;
|
|
953
951
|
}
|
|
954
|
-
copyBytes() {
|
|
955
|
-
const ret = wasm.conversationid_copyBytes(this.__wbg_ptr);
|
|
956
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
957
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
958
|
-
return v1;
|
|
959
|
-
}
|
|
960
952
|
}
|
|
961
953
|
if (Symbol.dispose)
|
|
962
954
|
ConversationId.prototype[Symbol.dispose] = ConversationId.prototype.free;
|
|
@@ -980,32 +972,66 @@ class CoreCrypto {
|
|
|
980
972
|
const ptr = this.__destroy_into_raw();
|
|
981
973
|
wasm.__wbg_corecrypto_free(ptr, 0);
|
|
982
974
|
}
|
|
983
|
-
|
|
984
|
-
const
|
|
975
|
+
static deferred_init(path, key, entropy_seed) {
|
|
976
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
977
|
+
const len0 = WASM_VECTOR_LEN;
|
|
978
|
+
_assertClass(key, DatabaseKey);
|
|
979
|
+
var ptr1 = key.__destroy_into_raw();
|
|
980
|
+
var ptr2 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
|
981
|
+
var len2 = WASM_VECTOR_LEN;
|
|
982
|
+
const ret = wasm.corecrypto_deferred_init(ptr0, len0, ptr1, ptr2, len2);
|
|
985
983
|
return ret;
|
|
986
984
|
}
|
|
987
|
-
|
|
988
|
-
const
|
|
985
|
+
close() {
|
|
986
|
+
const ptr = this.__destroy_into_raw();
|
|
987
|
+
const ret = wasm.corecrypto_close(ptr);
|
|
989
988
|
return ret;
|
|
990
989
|
}
|
|
991
|
-
|
|
990
|
+
static async_new(path, key, client_id, ciphersuites, entropy_seed, nb_key_package) {
|
|
991
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
992
|
+
const len0 = WASM_VECTOR_LEN;
|
|
993
|
+
_assertClass(key, DatabaseKey);
|
|
994
|
+
var ptr1 = key.__destroy_into_raw();
|
|
995
|
+
let ptr2 = 0;
|
|
996
|
+
if (!isLikeNone(client_id)) {
|
|
997
|
+
_assertClass(client_id, ClientId);
|
|
998
|
+
ptr2 = client_id.__destroy_into_raw();
|
|
999
|
+
}
|
|
1000
|
+
var ptr3 = isLikeNone(ciphersuites) ? 0 : passArrayJsValueToWasm0(ciphersuites, wasm.__wbindgen_malloc);
|
|
1001
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1002
|
+
var ptr4 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
|
1003
|
+
var len4 = WASM_VECTOR_LEN;
|
|
1004
|
+
const ret = wasm.corecrypto_async_new(ptr0, len0, ptr1, ptr2, ptr3, len3, ptr4, len4, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
|
1005
|
+
return ret;
|
|
1006
|
+
}
|
|
1007
|
+
reseed_rng(seed) {
|
|
1008
|
+
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
|
1009
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1010
|
+
const ret = wasm.corecrypto_reseed_rng(this.__wbg_ptr, ptr0, len0);
|
|
1011
|
+
return ret;
|
|
1012
|
+
}
|
|
1013
|
+
random_bytes(len) {
|
|
1014
|
+
const ret = wasm.corecrypto_random_bytes(this.__wbg_ptr, len);
|
|
1015
|
+
return ret;
|
|
1016
|
+
}
|
|
1017
|
+
get_client_ids(conversation_id) {
|
|
992
1018
|
_assertClass(conversation_id, ConversationId);
|
|
993
|
-
const ret = wasm.
|
|
1019
|
+
const ret = wasm.corecrypto_get_client_ids(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
994
1020
|
return ret;
|
|
995
1021
|
}
|
|
996
|
-
|
|
1022
|
+
export_secret_key(conversation_id, key_length) {
|
|
997
1023
|
_assertClass(conversation_id, ConversationId);
|
|
998
|
-
const ret = wasm.
|
|
1024
|
+
const ret = wasm.corecrypto_export_secret_key(this.__wbg_ptr, conversation_id.__wbg_ptr, key_length);
|
|
999
1025
|
return ret;
|
|
1000
1026
|
}
|
|
1001
|
-
|
|
1027
|
+
conversation_epoch(conversation_id) {
|
|
1002
1028
|
_assertClass(conversation_id, ConversationId);
|
|
1003
|
-
const ret = wasm.
|
|
1029
|
+
const ret = wasm.corecrypto_conversation_epoch(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1004
1030
|
return ret;
|
|
1005
1031
|
}
|
|
1006
|
-
|
|
1032
|
+
conversation_exists(conversation_id) {
|
|
1007
1033
|
_assertClass(conversation_id, ConversationId);
|
|
1008
|
-
const ret = wasm.
|
|
1034
|
+
const ret = wasm.corecrypto_conversation_exists(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1009
1035
|
return ret;
|
|
1010
1036
|
}
|
|
1011
1037
|
get_external_sender(conversation_id) {
|
|
@@ -1013,9 +1039,9 @@ class CoreCrypto {
|
|
|
1013
1039
|
const ret = wasm.corecrypto_get_external_sender(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1014
1040
|
return ret;
|
|
1015
1041
|
}
|
|
1016
|
-
|
|
1042
|
+
conversation_ciphersuite(conversation_id) {
|
|
1017
1043
|
_assertClass(conversation_id, ConversationId);
|
|
1018
|
-
const ret = wasm.
|
|
1044
|
+
const ret = wasm.corecrypto_conversation_ciphersuite(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1019
1045
|
return ret;
|
|
1020
1046
|
}
|
|
1021
1047
|
is_history_sharing_enabled(conversation_id) {
|
|
@@ -1023,11 +1049,22 @@ class CoreCrypto {
|
|
|
1023
1049
|
const ret = wasm.corecrypto_is_history_sharing_enabled(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1024
1050
|
return ret;
|
|
1025
1051
|
}
|
|
1026
|
-
|
|
1027
|
-
_assertClass(
|
|
1028
|
-
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1052
|
+
provide_transport(callbacks) {
|
|
1053
|
+
_assertClass(callbacks, MlsTransport);
|
|
1054
|
+
var ptr0 = callbacks.__destroy_into_raw();
|
|
1055
|
+
const ret = wasm.corecrypto_provide_transport(this.__wbg_ptr, ptr0);
|
|
1056
|
+
return ret;
|
|
1057
|
+
}
|
|
1058
|
+
register_epoch_observer(epoch_observer) {
|
|
1059
|
+
_assertClass(epoch_observer, EpochObserver);
|
|
1060
|
+
var ptr0 = epoch_observer.__destroy_into_raw();
|
|
1061
|
+
const ret = wasm.corecrypto_register_epoch_observer(this.__wbg_ptr, ptr0);
|
|
1062
|
+
return ret;
|
|
1063
|
+
}
|
|
1064
|
+
register_history_observer(history_observer) {
|
|
1065
|
+
_assertClass(history_observer, HistoryObserver);
|
|
1066
|
+
var ptr0 = history_observer.__destroy_into_raw();
|
|
1067
|
+
const ret = wasm.corecrypto_register_history_observer(this.__wbg_ptr, ptr0);
|
|
1031
1068
|
return ret;
|
|
1032
1069
|
}
|
|
1033
1070
|
get_user_identities(conversation_id, user_ids) {
|
|
@@ -1037,29 +1074,28 @@ class CoreCrypto {
|
|
|
1037
1074
|
const ret = wasm.corecrypto_get_user_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1038
1075
|
return ret;
|
|
1039
1076
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1077
|
+
get_device_identities(conversation_id, device_ids) {
|
|
1078
|
+
_assertClass(conversation_id, ConversationId);
|
|
1079
|
+
const ptr0 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
|
|
1080
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1081
|
+
const ret = wasm.corecrypto_get_device_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1042
1082
|
return ret;
|
|
1043
1083
|
}
|
|
1044
1084
|
e2ei_is_enabled(ciphersuite) {
|
|
1045
1085
|
const ret = wasm.corecrypto_e2ei_is_enabled(this.__wbg_ptr, ciphersuite);
|
|
1046
1086
|
return ret;
|
|
1047
1087
|
}
|
|
1088
|
+
e2ei_is_pki_env_setup() {
|
|
1089
|
+
const ret = wasm.corecrypto_e2ei_is_pki_env_setup(this.__wbg_ptr);
|
|
1090
|
+
return ret;
|
|
1091
|
+
}
|
|
1048
1092
|
e2ei_conversation_state(conversation_id) {
|
|
1049
1093
|
_assertClass(conversation_id, ConversationId);
|
|
1050
1094
|
const ret = wasm.corecrypto_e2ei_conversation_state(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1051
1095
|
return ret;
|
|
1052
1096
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
var ptr0 = epoch_observer.__destroy_into_raw();
|
|
1056
|
-
const ret = wasm.corecrypto_register_epoch_observer(this.__wbg_ptr, ptr0);
|
|
1057
|
-
return ret;
|
|
1058
|
-
}
|
|
1059
|
-
register_history_observer(history_observer) {
|
|
1060
|
-
_assertClass(history_observer, HistoryObserver);
|
|
1061
|
-
var ptr0 = history_observer.__destroy_into_raw();
|
|
1062
|
-
const ret = wasm.corecrypto_register_history_observer(this.__wbg_ptr, ptr0);
|
|
1097
|
+
client_public_key(ciphersuite, credential_type) {
|
|
1098
|
+
const ret = wasm.corecrypto_client_public_key(this.__wbg_ptr, ciphersuite, credential_type);
|
|
1063
1099
|
return ret;
|
|
1064
1100
|
}
|
|
1065
1101
|
static set_logger(logger) {
|
|
@@ -1070,10 +1106,12 @@ class CoreCrypto {
|
|
|
1070
1106
|
static set_max_log_level(level) {
|
|
1071
1107
|
wasm.corecrypto_set_max_log_level(level);
|
|
1072
1108
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1109
|
+
transaction(command) {
|
|
1110
|
+
const ret = wasm.corecrypto_transaction(this.__wbg_ptr, command);
|
|
1111
|
+
return ret;
|
|
1112
|
+
}
|
|
1113
|
+
proteus_fingerprint() {
|
|
1114
|
+
const ret = wasm.corecrypto_proteus_fingerprint(this.__wbg_ptr);
|
|
1077
1115
|
return ret;
|
|
1078
1116
|
}
|
|
1079
1117
|
proteus_session_exists(session_id) {
|
|
@@ -1082,10 +1120,6 @@ class CoreCrypto {
|
|
|
1082
1120
|
const ret = wasm.corecrypto_proteus_session_exists(this.__wbg_ptr, ptr0, len0);
|
|
1083
1121
|
return ret;
|
|
1084
1122
|
}
|
|
1085
|
-
proteus_fingerprint() {
|
|
1086
|
-
const ret = wasm.corecrypto_proteus_fingerprint(this.__wbg_ptr);
|
|
1087
|
-
return ret;
|
|
1088
|
-
}
|
|
1089
1123
|
proteus_fingerprint_local(session_id) {
|
|
1090
1124
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1091
1125
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -1126,48 +1160,6 @@ class CoreCrypto {
|
|
|
1126
1160
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1127
1161
|
}
|
|
1128
1162
|
}
|
|
1129
|
-
random_bytes(len) {
|
|
1130
|
-
const ret = wasm.corecrypto_random_bytes(this.__wbg_ptr, len);
|
|
1131
|
-
return ret;
|
|
1132
|
-
}
|
|
1133
|
-
reseed_rng(seed) {
|
|
1134
|
-
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
|
1135
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1136
|
-
const ret = wasm.corecrypto_reseed_rng(this.__wbg_ptr, ptr0, len0);
|
|
1137
|
-
return ret;
|
|
1138
|
-
}
|
|
1139
|
-
static async_new(path, key, client_id, ciphersuites, entropy_seed, nb_key_package) {
|
|
1140
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1141
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1142
|
-
_assertClass(key, DatabaseKey);
|
|
1143
|
-
var ptr1 = key.__destroy_into_raw();
|
|
1144
|
-
let ptr2 = 0;
|
|
1145
|
-
if (!isLikeNone(client_id)) {
|
|
1146
|
-
_assertClass(client_id, ClientId);
|
|
1147
|
-
ptr2 = client_id.__destroy_into_raw();
|
|
1148
|
-
}
|
|
1149
|
-
var ptr3 = isLikeNone(ciphersuites) ? 0 : passArrayJsValueToWasm0(ciphersuites, wasm.__wbindgen_malloc);
|
|
1150
|
-
var len3 = WASM_VECTOR_LEN;
|
|
1151
|
-
var ptr4 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
|
1152
|
-
var len4 = WASM_VECTOR_LEN;
|
|
1153
|
-
const ret = wasm.corecrypto_async_new(ptr0, len0, ptr1, ptr2, ptr3, len3, ptr4, len4, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
|
1154
|
-
return ret;
|
|
1155
|
-
}
|
|
1156
|
-
static deferred_init(path, key, entropy_seed) {
|
|
1157
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1158
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1159
|
-
_assertClass(key, DatabaseKey);
|
|
1160
|
-
var ptr1 = key.__destroy_into_raw();
|
|
1161
|
-
var ptr2 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
|
1162
|
-
var len2 = WASM_VECTOR_LEN;
|
|
1163
|
-
const ret = wasm.corecrypto_deferred_init(ptr0, len0, ptr1, ptr2, len2);
|
|
1164
|
-
return ret;
|
|
1165
|
-
}
|
|
1166
|
-
close() {
|
|
1167
|
-
const ptr = this.__destroy_into_raw();
|
|
1168
|
-
const ret = wasm.corecrypto_close(ptr);
|
|
1169
|
-
return ret;
|
|
1170
|
-
}
|
|
1171
1163
|
static history_client(history_secret) {
|
|
1172
1164
|
_assertClass(history_secret, HistorySecret);
|
|
1173
1165
|
var ptr0 = history_secret.__destroy_into_raw();
|
|
@@ -1197,137 +1189,113 @@ class CoreCryptoContext {
|
|
|
1197
1189
|
const ptr = this.__destroy_into_raw();
|
|
1198
1190
|
wasm.__wbg_corecryptocontext_free(ptr, 0);
|
|
1199
1191
|
}
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1203
|
-
const ptr1 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1204
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1205
|
-
const ptr2 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1206
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1207
|
-
var ptr3 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1208
|
-
var len3 = WASM_VECTOR_LEN;
|
|
1209
|
-
const ret = wasm.corecryptocontext_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_sec, ciphersuite);
|
|
1192
|
+
random_bytes(len) {
|
|
1193
|
+
const ret = wasm.corecryptocontext_random_bytes(this.__wbg_ptr, len);
|
|
1210
1194
|
return ret;
|
|
1211
1195
|
}
|
|
1212
|
-
|
|
1213
|
-
const
|
|
1196
|
+
get_data() {
|
|
1197
|
+
const ret = wasm.corecryptocontext_get_data(this.__wbg_ptr);
|
|
1198
|
+
return ret;
|
|
1199
|
+
}
|
|
1200
|
+
set_data(data) {
|
|
1201
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1214
1202
|
const len0 = WASM_VECTOR_LEN;
|
|
1215
|
-
const
|
|
1216
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1217
|
-
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1218
|
-
var len2 = WASM_VECTOR_LEN;
|
|
1219
|
-
const ret = wasm.corecryptocontext_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
|
1203
|
+
const ret = wasm.corecryptocontext_set_data(this.__wbg_ptr, ptr0, len0);
|
|
1220
1204
|
return ret;
|
|
1221
1205
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
var ptr1 = isLikeNone(handle) ? 0 : passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1226
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1227
|
-
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1228
|
-
var len2 = WASM_VECTOR_LEN;
|
|
1229
|
-
const ret = wasm.corecryptocontext_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
|
1230
|
-
return ret;
|
|
1231
|
-
}
|
|
1232
|
-
e2ei_register_acme_ca(trust_anchor_pem) {
|
|
1233
|
-
const ptr0 = passStringToWasm0(trust_anchor_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1234
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1235
|
-
const ret = wasm.corecryptocontext_e2ei_register_acme_ca(this.__wbg_ptr, ptr0, len0);
|
|
1206
|
+
get_client_ids(conversation_id) {
|
|
1207
|
+
_assertClass(conversation_id, ConversationId);
|
|
1208
|
+
const ret = wasm.corecryptocontext_get_client_ids(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1236
1209
|
return ret;
|
|
1237
1210
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1211
|
+
decrypt_message(conversation_id, payload) {
|
|
1212
|
+
_assertClass(conversation_id, ConversationId);
|
|
1213
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
1240
1214
|
const len0 = WASM_VECTOR_LEN;
|
|
1241
|
-
const ret = wasm.
|
|
1215
|
+
const ret = wasm.corecryptocontext_decrypt_message(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1242
1216
|
return ret;
|
|
1243
1217
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1218
|
+
encrypt_message(conversation_id, message) {
|
|
1219
|
+
_assertClass(conversation_id, ConversationId);
|
|
1220
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
|
1246
1221
|
const len0 = WASM_VECTOR_LEN;
|
|
1247
|
-
const
|
|
1248
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1249
|
-
const ret = wasm.corecryptocontext_e2ei_register_crl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1222
|
+
const ret = wasm.corecryptocontext_encrypt_message(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1250
1223
|
return ret;
|
|
1251
1224
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
var ptr0 = enrollment.__destroy_into_raw();
|
|
1255
|
-
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1256
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1257
|
-
const ret = wasm.corecryptocontext_e2ei_mls_init_only(this.__wbg_ptr, ptr0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
|
1225
|
+
client_public_key(ciphersuite, credential_type) {
|
|
1226
|
+
const ret = wasm.corecryptocontext_client_public_key(this.__wbg_ptr, ciphersuite, credential_type);
|
|
1258
1227
|
return ret;
|
|
1259
1228
|
}
|
|
1260
|
-
|
|
1229
|
+
export_secret_key(conversation_id, key_length) {
|
|
1261
1230
|
_assertClass(conversation_id, ConversationId);
|
|
1262
|
-
const ret = wasm.
|
|
1231
|
+
const ret = wasm.corecryptocontext_export_secret_key(this.__wbg_ptr, conversation_id.__wbg_ptr, key_length);
|
|
1263
1232
|
return ret;
|
|
1264
1233
|
}
|
|
1265
|
-
|
|
1266
|
-
_assertClass(
|
|
1267
|
-
|
|
1268
|
-
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1269
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1270
|
-
const ret = wasm.corecryptocontext_save_x509_credential(this.__wbg_ptr, ptr0, ptr1, len1);
|
|
1234
|
+
wipe_conversation(conversation_id) {
|
|
1235
|
+
_assertClass(conversation_id, ConversationId);
|
|
1236
|
+
const ret = wasm.corecryptocontext_wipe_conversation(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1271
1237
|
return ret;
|
|
1272
1238
|
}
|
|
1273
|
-
|
|
1274
|
-
const ret = wasm.
|
|
1239
|
+
client_keypackages(ciphersuite, credential_type, amount_requested) {
|
|
1240
|
+
const ret = wasm.corecryptocontext_client_keypackages(this.__wbg_ptr, ciphersuite, credential_type, amount_requested);
|
|
1275
1241
|
return ret;
|
|
1276
1242
|
}
|
|
1277
|
-
|
|
1278
|
-
_assertClass(
|
|
1279
|
-
|
|
1280
|
-
const ret = wasm.corecryptocontext_e2ei_enrollment_stash(this.__wbg_ptr, ptr0);
|
|
1243
|
+
conversation_epoch(conversation_id) {
|
|
1244
|
+
_assertClass(conversation_id, ConversationId);
|
|
1245
|
+
const ret = wasm.corecryptocontext_conversation_epoch(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1281
1246
|
return ret;
|
|
1282
1247
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
const
|
|
1286
|
-
const ret = wasm.corecryptocontext_e2ei_enrollment_stash_pop(this.__wbg_ptr, ptr0, len0);
|
|
1248
|
+
conversation_exists(conversation_id) {
|
|
1249
|
+
_assertClass(conversation_id, ConversationId);
|
|
1250
|
+
const ret = wasm.corecryptocontext_conversation_exists(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1287
1251
|
return ret;
|
|
1288
1252
|
}
|
|
1289
|
-
|
|
1253
|
+
create_conversation(conversation_id, creator_credential_type, config) {
|
|
1290
1254
|
_assertClass(conversation_id, ConversationId);
|
|
1291
|
-
|
|
1255
|
+
_assertClass(config, ConversationConfiguration);
|
|
1256
|
+
var ptr0 = config.__destroy_into_raw();
|
|
1257
|
+
const ret = wasm.corecryptocontext_create_conversation(this.__wbg_ptr, conversation_id.__wbg_ptr, creator_credential_type, ptr0);
|
|
1292
1258
|
return ret;
|
|
1293
1259
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1260
|
+
get_external_sender(conversation_id) {
|
|
1261
|
+
_assertClass(conversation_id, ConversationId);
|
|
1262
|
+
const ret = wasm.corecryptocontext_get_external_sender(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1296
1263
|
return ret;
|
|
1297
1264
|
}
|
|
1298
|
-
|
|
1265
|
+
enable_history_sharing(conversation_id) {
|
|
1299
1266
|
_assertClass(conversation_id, ConversationId);
|
|
1300
|
-
const
|
|
1301
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1302
|
-
const ret = wasm.corecryptocontext_get_device_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1267
|
+
const ret = wasm.corecryptocontext_enable_history_sharing(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1303
1268
|
return ret;
|
|
1304
1269
|
}
|
|
1305
|
-
|
|
1270
|
+
update_keying_material(conversation_id) {
|
|
1306
1271
|
_assertClass(conversation_id, ConversationId);
|
|
1307
|
-
const
|
|
1308
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1309
|
-
const ret = wasm.corecryptocontext_get_user_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1272
|
+
const ret = wasm.corecryptocontext_update_keying_material(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1310
1273
|
return ret;
|
|
1311
1274
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1275
|
+
disable_history_sharing(conversation_id) {
|
|
1276
|
+
_assertClass(conversation_id, ConversationId);
|
|
1277
|
+
const ret = wasm.corecryptocontext_disable_history_sharing(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1314
1278
|
return ret;
|
|
1315
1279
|
}
|
|
1316
|
-
|
|
1317
|
-
_assertClass(
|
|
1318
|
-
var ptr0 =
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
const ret = wasm.
|
|
1280
|
+
join_by_external_commit(group_info, custom_configuration, credential_type) {
|
|
1281
|
+
_assertClass(group_info, GroupInfo);
|
|
1282
|
+
var ptr0 = group_info.__destroy_into_raw();
|
|
1283
|
+
_assertClass(custom_configuration, CustomConfiguration);
|
|
1284
|
+
var ptr1 = custom_configuration.__destroy_into_raw();
|
|
1285
|
+
const ret = wasm.corecryptocontext_join_by_external_commit(this.__wbg_ptr, ptr0, ptr1, credential_type);
|
|
1322
1286
|
return ret;
|
|
1323
1287
|
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1288
|
+
process_welcome_message(welcome_message, custom_configuration) {
|
|
1289
|
+
_assertClass(welcome_message, Welcome);
|
|
1290
|
+
var ptr0 = welcome_message.__destroy_into_raw();
|
|
1291
|
+
_assertClass(custom_configuration, CustomConfiguration);
|
|
1292
|
+
var ptr1 = custom_configuration.__destroy_into_raw();
|
|
1293
|
+
const ret = wasm.corecryptocontext_process_welcome_message(this.__wbg_ptr, ptr0, ptr1);
|
|
1326
1294
|
return ret;
|
|
1327
1295
|
}
|
|
1328
|
-
|
|
1296
|
+
commit_pending_proposals(conversation_id) {
|
|
1329
1297
|
_assertClass(conversation_id, ConversationId);
|
|
1330
|
-
const ret = wasm.
|
|
1298
|
+
const ret = wasm.corecryptocontext_commit_pending_proposals(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1331
1299
|
return ret;
|
|
1332
1300
|
}
|
|
1333
1301
|
conversation_ciphersuite(conversation_id) {
|
|
@@ -1335,176 +1303,206 @@ class CoreCryptoContext {
|
|
|
1335
1303
|
const ret = wasm.corecryptocontext_conversation_ciphersuite(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1336
1304
|
return ret;
|
|
1337
1305
|
}
|
|
1338
|
-
|
|
1306
|
+
add_clients_to_conversation(conversation_id, key_packages) {
|
|
1339
1307
|
_assertClass(conversation_id, ConversationId);
|
|
1340
|
-
const
|
|
1308
|
+
const ptr0 = passArrayJsValueToWasm0(key_packages, wasm.__wbindgen_malloc);
|
|
1309
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1310
|
+
const ret = wasm.corecryptocontext_add_clients_to_conversation(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1341
1311
|
return ret;
|
|
1342
1312
|
}
|
|
1343
|
-
|
|
1344
|
-
_assertClass(
|
|
1345
|
-
|
|
1313
|
+
mark_conversation_as_child_of(child_id, parent_id) {
|
|
1314
|
+
_assertClass(child_id, ConversationId);
|
|
1315
|
+
_assertClass(parent_id, ConversationId);
|
|
1316
|
+
const ret = wasm.corecryptocontext_mark_conversation_as_child_of(this.__wbg_ptr, child_id.__wbg_ptr, parent_id.__wbg_ptr);
|
|
1346
1317
|
return ret;
|
|
1347
1318
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
const ret = wasm.corecryptocontext_export_secret_key(this.__wbg_ptr, conversation_id.__wbg_ptr, key_length);
|
|
1319
|
+
client_valid_keypackages_count(ciphersuite, credential_type) {
|
|
1320
|
+
const ret = wasm.corecryptocontext_client_valid_keypackages_count(this.__wbg_ptr, ciphersuite, credential_type);
|
|
1351
1321
|
return ret;
|
|
1352
1322
|
}
|
|
1353
|
-
|
|
1323
|
+
remove_clients_from_conversation(conversation_id, clients) {
|
|
1354
1324
|
_assertClass(conversation_id, ConversationId);
|
|
1355
|
-
const
|
|
1325
|
+
const ptr0 = passArrayJsValueToWasm0(clients, wasm.__wbindgen_malloc);
|
|
1326
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1327
|
+
const ret = wasm.corecryptocontext_remove_clients_from_conversation(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1356
1328
|
return ret;
|
|
1357
1329
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1330
|
+
mls_init(client_id, ciphersuites, nb_key_package) {
|
|
1331
|
+
_assertClass(client_id, ClientId);
|
|
1332
|
+
var ptr0 = client_id.__destroy_into_raw();
|
|
1333
|
+
const ptr1 = passArrayJsValueToWasm0(ciphersuites, wasm.__wbindgen_malloc);
|
|
1334
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1335
|
+
const ret = wasm.corecryptocontext_mls_init(this.__wbg_ptr, ptr0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
|
1360
1336
|
return ret;
|
|
1361
1337
|
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1338
|
+
e2ei_rotate(conversation_id) {
|
|
1339
|
+
_assertClass(conversation_id, ConversationId);
|
|
1340
|
+
const ret = wasm.corecryptocontext_e2ei_rotate(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1364
1341
|
return ret;
|
|
1365
1342
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
_assertClass(config, ConversationConfiguration);
|
|
1369
|
-
var ptr0 = config.__destroy_into_raw();
|
|
1370
|
-
const ret = wasm.corecryptocontext_create_conversation(this.__wbg_ptr, conversation_id.__wbg_ptr, creator_credential_type, ptr0);
|
|
1343
|
+
e2ei_is_enabled(ciphersuite) {
|
|
1344
|
+
const ret = wasm.corecryptocontext_e2ei_is_enabled(this.__wbg_ptr, ciphersuite);
|
|
1371
1345
|
return ret;
|
|
1372
1346
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
const ret = wasm.
|
|
1347
|
+
e2ei_register_crl(crl_dp, crl_der) {
|
|
1348
|
+
const ptr0 = passStringToWasm0(crl_dp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1349
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1350
|
+
const ptr1 = passArray8ToWasm0(crl_der, wasm.__wbindgen_malloc);
|
|
1351
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1352
|
+
const ret = wasm.corecryptocontext_e2ei_register_crl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1379
1353
|
return ret;
|
|
1380
1354
|
}
|
|
1381
|
-
|
|
1382
|
-
_assertClass(
|
|
1383
|
-
|
|
1355
|
+
e2ei_mls_init_only(enrollment, certificate_chain, nb_key_package) {
|
|
1356
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
|
1357
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
|
1358
|
+
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1359
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1360
|
+
const ret = wasm.corecryptocontext_e2ei_mls_init_only(this.__wbg_ptr, ptr0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
|
1361
|
+
return ret;
|
|
1362
|
+
}
|
|
1363
|
+
e2ei_new_enrollment(client_id, display_name, handle, team, expiry_sec, ciphersuite) {
|
|
1364
|
+
const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1384
1365
|
const len0 = WASM_VECTOR_LEN;
|
|
1385
|
-
const
|
|
1366
|
+
const ptr1 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1367
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1368
|
+
const ptr2 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1369
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1370
|
+
var ptr3 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1371
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1372
|
+
const ret = wasm.corecryptocontext_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_sec, ciphersuite);
|
|
1386
1373
|
return ret;
|
|
1387
1374
|
}
|
|
1388
|
-
|
|
1375
|
+
get_user_identities(conversation_id, user_ids) {
|
|
1389
1376
|
_assertClass(conversation_id, ConversationId);
|
|
1390
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
1377
|
+
const ptr0 = passArrayJsValueToWasm0(user_ids, wasm.__wbindgen_malloc);
|
|
1391
1378
|
const len0 = WASM_VECTOR_LEN;
|
|
1392
|
-
const ret = wasm.
|
|
1379
|
+
const ret = wasm.corecryptocontext_get_user_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1393
1380
|
return ret;
|
|
1394
1381
|
}
|
|
1395
|
-
|
|
1396
|
-
_assertClass(
|
|
1397
|
-
|
|
1398
|
-
const
|
|
1382
|
+
save_x509_credential(enrollment, certificate_chain) {
|
|
1383
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
|
1384
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
|
1385
|
+
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1386
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1387
|
+
const ret = wasm.corecryptocontext_save_x509_credential(this.__wbg_ptr, ptr0, ptr1, len1);
|
|
1399
1388
|
return ret;
|
|
1400
1389
|
}
|
|
1401
|
-
|
|
1402
|
-
_assertClass(
|
|
1403
|
-
|
|
1390
|
+
e2ei_enrollment_stash(enrollment) {
|
|
1391
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
|
1392
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
|
1393
|
+
const ret = wasm.corecryptocontext_e2ei_enrollment_stash(this.__wbg_ptr, ptr0);
|
|
1404
1394
|
return ret;
|
|
1405
1395
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
const ret = wasm.corecryptocontext_commit_pending_proposals(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1396
|
+
e2ei_is_pki_env_setup() {
|
|
1397
|
+
const ret = wasm.corecryptocontext_e2ei_is_pki_env_setup(this.__wbg_ptr);
|
|
1409
1398
|
return ret;
|
|
1410
1399
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
const
|
|
1400
|
+
e2ei_register_acme_ca(trust_anchor_pem) {
|
|
1401
|
+
const ptr0 = passStringToWasm0(trust_anchor_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1402
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1403
|
+
const ret = wasm.corecryptocontext_e2ei_register_acme_ca(this.__wbg_ptr, ptr0, len0);
|
|
1414
1404
|
return ret;
|
|
1415
1405
|
}
|
|
1416
|
-
|
|
1406
|
+
get_device_identities(conversation_id, device_ids) {
|
|
1417
1407
|
_assertClass(conversation_id, ConversationId);
|
|
1418
|
-
const ptr0 =
|
|
1408
|
+
const ptr0 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
|
|
1419
1409
|
const len0 = WASM_VECTOR_LEN;
|
|
1420
|
-
const ret = wasm.
|
|
1410
|
+
const ret = wasm.corecryptocontext_get_device_identities(this.__wbg_ptr, conversation_id.__wbg_ptr, ptr0, len0);
|
|
1421
1411
|
return ret;
|
|
1422
1412
|
}
|
|
1423
|
-
|
|
1413
|
+
e2ei_conversation_state(conversation_id) {
|
|
1424
1414
|
_assertClass(conversation_id, ConversationId);
|
|
1425
|
-
const
|
|
1415
|
+
const ret = wasm.corecryptocontext_e2ei_conversation_state(this.__wbg_ptr, conversation_id.__wbg_ptr);
|
|
1416
|
+
return ret;
|
|
1417
|
+
}
|
|
1418
|
+
delete_stale_key_packages(ciphersuite) {
|
|
1419
|
+
const ret = wasm.corecryptocontext_delete_stale_key_packages(this.__wbg_ptr, ciphersuite);
|
|
1420
|
+
return ret;
|
|
1421
|
+
}
|
|
1422
|
+
e2ei_enrollment_stash_pop(handle) {
|
|
1423
|
+
const ptr0 = passArray8ToWasm0(handle, wasm.__wbindgen_malloc);
|
|
1426
1424
|
const len0 = WASM_VECTOR_LEN;
|
|
1427
|
-
const ret = wasm.
|
|
1425
|
+
const ret = wasm.corecryptocontext_e2ei_enrollment_stash_pop(this.__wbg_ptr, ptr0, len0);
|
|
1428
1426
|
return ret;
|
|
1429
1427
|
}
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1434
|
-
var
|
|
1435
|
-
|
|
1428
|
+
e2ei_new_rotate_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
|
1429
|
+
var ptr0 = isLikeNone(display_name) ? 0 : passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1430
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1431
|
+
var ptr1 = isLikeNone(handle) ? 0 : passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1432
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1433
|
+
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1434
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1435
|
+
const ret = wasm.corecryptocontext_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
|
1436
1436
|
return ret;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
const
|
|
1438
|
+
e2ei_register_intermediate_ca(cert_pem) {
|
|
1439
|
+
const ptr0 = passStringToWasm0(cert_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1440
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1441
|
+
const ret = wasm.corecryptocontext_e2ei_register_intermediate_ca(this.__wbg_ptr, ptr0, len0);
|
|
1441
1442
|
return ret;
|
|
1442
1443
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
const
|
|
1444
|
+
e2ei_new_activation_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
|
1445
|
+
const ptr0 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1446
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1447
|
+
const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1448
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1449
|
+
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1450
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1451
|
+
const ret = wasm.corecryptocontext_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
|
1446
1452
|
return ret;
|
|
1447
1453
|
}
|
|
1448
1454
|
proteus_init() {
|
|
1449
1455
|
const ret = wasm.corecryptocontext_proteus_init(this.__wbg_ptr);
|
|
1450
1456
|
return ret;
|
|
1451
1457
|
}
|
|
1452
|
-
|
|
1458
|
+
proteus_decrypt(session_id, ciphertext) {
|
|
1453
1459
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1454
1460
|
const len0 = WASM_VECTOR_LEN;
|
|
1455
|
-
const ptr1 = passArray8ToWasm0(
|
|
1461
|
+
const ptr1 = passArray8ToWasm0(ciphertext, wasm.__wbindgen_malloc);
|
|
1456
1462
|
const len1 = WASM_VECTOR_LEN;
|
|
1457
|
-
const ret = wasm.
|
|
1463
|
+
const ret = wasm.corecryptocontext_proteus_decrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1458
1464
|
return ret;
|
|
1459
1465
|
}
|
|
1460
|
-
|
|
1466
|
+
proteus_encrypt(session_id, plaintext) {
|
|
1461
1467
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1462
1468
|
const len0 = WASM_VECTOR_LEN;
|
|
1463
|
-
const ptr1 = passArray8ToWasm0(
|
|
1469
|
+
const ptr1 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);
|
|
1464
1470
|
const len1 = WASM_VECTOR_LEN;
|
|
1465
|
-
const ret = wasm.
|
|
1471
|
+
const ret = wasm.corecryptocontext_proteus_encrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1466
1472
|
return ret;
|
|
1467
1473
|
}
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1470
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1471
|
-
const ret = wasm.corecryptocontext_proteus_session_save(this.__wbg_ptr, ptr0, len0);
|
|
1474
|
+
proteus_new_prekey(prekey_id) {
|
|
1475
|
+
const ret = wasm.corecryptocontext_proteus_new_prekey(this.__wbg_ptr, prekey_id);
|
|
1472
1476
|
return ret;
|
|
1473
1477
|
}
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1477
|
-
const ret = wasm.corecryptocontext_proteus_session_delete(this.__wbg_ptr, ptr0, len0);
|
|
1478
|
+
proteus_fingerprint() {
|
|
1479
|
+
const ret = wasm.corecryptocontext_proteus_fingerprint(this.__wbg_ptr);
|
|
1478
1480
|
return ret;
|
|
1479
1481
|
}
|
|
1480
|
-
|
|
1482
|
+
proteus_decrypt_safe(session_id, ciphertext) {
|
|
1481
1483
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1482
1484
|
const len0 = WASM_VECTOR_LEN;
|
|
1483
|
-
const
|
|
1485
|
+
const ptr1 = passArray8ToWasm0(ciphertext, wasm.__wbindgen_malloc);
|
|
1486
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1487
|
+
const ret = wasm.corecryptocontext_proteus_decrypt_safe(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1484
1488
|
return ret;
|
|
1485
1489
|
}
|
|
1486
|
-
|
|
1490
|
+
proteus_session_save(session_id) {
|
|
1487
1491
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1488
1492
|
const len0 = WASM_VECTOR_LEN;
|
|
1489
|
-
const
|
|
1490
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1491
|
-
const ret = wasm.corecryptocontext_proteus_decrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1493
|
+
const ret = wasm.corecryptocontext_proteus_session_save(this.__wbg_ptr, ptr0, len0);
|
|
1492
1494
|
return ret;
|
|
1493
1495
|
}
|
|
1494
|
-
|
|
1496
|
+
proteus_session_delete(session_id) {
|
|
1495
1497
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1496
1498
|
const len0 = WASM_VECTOR_LEN;
|
|
1497
|
-
const
|
|
1498
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1499
|
-
const ret = wasm.corecryptocontext_proteus_decrypt_safe(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1499
|
+
const ret = wasm.corecryptocontext_proteus_session_delete(this.__wbg_ptr, ptr0, len0);
|
|
1500
1500
|
return ret;
|
|
1501
1501
|
}
|
|
1502
|
-
|
|
1502
|
+
proteus_session_exists(session_id) {
|
|
1503
1503
|
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1504
1504
|
const len0 = WASM_VECTOR_LEN;
|
|
1505
|
-
const
|
|
1506
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1507
|
-
const ret = wasm.corecryptocontext_proteus_encrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1505
|
+
const ret = wasm.corecryptocontext_proteus_session_exists(this.__wbg_ptr, ptr0, len0);
|
|
1508
1506
|
return ret;
|
|
1509
1507
|
}
|
|
1510
1508
|
proteus_encrypt_batched(sessions, plaintext) {
|
|
@@ -1515,20 +1513,12 @@ class CoreCryptoContext {
|
|
|
1515
1513
|
const ret = wasm.corecryptocontext_proteus_encrypt_batched(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1516
1514
|
return ret;
|
|
1517
1515
|
}
|
|
1518
|
-
proteus_new_prekey(prekey_id) {
|
|
1519
|
-
const ret = wasm.corecryptocontext_proteus_new_prekey(this.__wbg_ptr, prekey_id);
|
|
1520
|
-
return ret;
|
|
1521
|
-
}
|
|
1522
1516
|
proteus_new_prekey_auto() {
|
|
1523
1517
|
const ret = wasm.corecryptocontext_proteus_new_prekey_auto(this.__wbg_ptr);
|
|
1524
1518
|
return ret;
|
|
1525
1519
|
}
|
|
1526
|
-
|
|
1527
|
-
const ret = wasm.
|
|
1528
|
-
return ret;
|
|
1529
|
-
}
|
|
1530
|
-
proteus_fingerprint() {
|
|
1531
|
-
const ret = wasm.corecryptocontext_proteus_fingerprint(this.__wbg_ptr);
|
|
1520
|
+
proteus_reload_sessions() {
|
|
1521
|
+
const ret = wasm.corecryptocontext_proteus_reload_sessions(this.__wbg_ptr);
|
|
1532
1522
|
return ret;
|
|
1533
1523
|
}
|
|
1534
1524
|
proteus_fingerprint_local(session_id) {
|
|
@@ -1543,8 +1533,24 @@ class CoreCryptoContext {
|
|
|
1543
1533
|
const ret = wasm.corecryptocontext_proteus_fingerprint_remote(this.__wbg_ptr, ptr0, len0);
|
|
1544
1534
|
return ret;
|
|
1545
1535
|
}
|
|
1546
|
-
|
|
1547
|
-
const ret = wasm.
|
|
1536
|
+
proteus_last_resort_prekey() {
|
|
1537
|
+
const ret = wasm.corecryptocontext_proteus_last_resort_prekey(this.__wbg_ptr);
|
|
1538
|
+
return ret;
|
|
1539
|
+
}
|
|
1540
|
+
proteus_session_from_prekey(session_id, prekey) {
|
|
1541
|
+
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1542
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1543
|
+
const ptr1 = passArray8ToWasm0(prekey, wasm.__wbindgen_malloc);
|
|
1544
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1545
|
+
const ret = wasm.corecryptocontext_proteus_session_from_prekey(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1546
|
+
return ret;
|
|
1547
|
+
}
|
|
1548
|
+
proteus_session_from_message(session_id, envelope) {
|
|
1549
|
+
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1550
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1551
|
+
const ptr1 = passArray8ToWasm0(envelope, wasm.__wbindgen_malloc);
|
|
1552
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1553
|
+
const ret = wasm.corecryptocontext_proteus_session_from_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1548
1554
|
return ret;
|
|
1549
1555
|
}
|
|
1550
1556
|
static proteus_last_resort_prekey_id() {
|
|
@@ -1575,20 +1581,6 @@ class CoreCryptoContext {
|
|
|
1575
1581
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1576
1582
|
}
|
|
1577
1583
|
}
|
|
1578
|
-
set_data(data) {
|
|
1579
|
-
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1580
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1581
|
-
const ret = wasm.corecryptocontext_set_data(this.__wbg_ptr, ptr0, len0);
|
|
1582
|
-
return ret;
|
|
1583
|
-
}
|
|
1584
|
-
get_data() {
|
|
1585
|
-
const ret = wasm.corecryptocontext_get_data(this.__wbg_ptr);
|
|
1586
|
-
return ret;
|
|
1587
|
-
}
|
|
1588
|
-
random_bytes(len) {
|
|
1589
|
-
const ret = wasm.corecryptocontext_random_bytes(this.__wbg_ptr, len);
|
|
1590
|
-
return ret;
|
|
1591
|
-
}
|
|
1592
1584
|
}
|
|
1593
1585
|
if (Symbol.dispose)
|
|
1594
1586
|
CoreCryptoContext.prototype[Symbol.dispose] = CoreCryptoContext.prototype.free;
|
|
@@ -1637,6 +1629,12 @@ class CrlRegistration {
|
|
|
1637
1629
|
const ptr = this.__destroy_into_raw();
|
|
1638
1630
|
wasm.__wbg_crlregistration_free(ptr, 0);
|
|
1639
1631
|
}
|
|
1632
|
+
constructor(dirty, expiration) {
|
|
1633
|
+
const ret = wasm.crlregistration_new(dirty, !isLikeNone(expiration), isLikeNone(expiration) ? BigInt(0) : expiration);
|
|
1634
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1635
|
+
CrlRegistrationFinalization.register(this, this.__wbg_ptr, this);
|
|
1636
|
+
return this;
|
|
1637
|
+
}
|
|
1640
1638
|
get dirty() {
|
|
1641
1639
|
const ret = wasm.__wbg_get_crlregistration_dirty(this.__wbg_ptr);
|
|
1642
1640
|
return ret !== 0;
|
|
@@ -1651,12 +1649,6 @@ class CrlRegistration {
|
|
|
1651
1649
|
set expiration(arg0) {
|
|
1652
1650
|
wasm.__wbg_set_crlregistration_expiration(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
1653
1651
|
}
|
|
1654
|
-
constructor(dirty, expiration) {
|
|
1655
|
-
const ret = wasm.crlregistration_new(dirty, !isLikeNone(expiration), isLikeNone(expiration) ? BigInt(0) : expiration);
|
|
1656
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1657
|
-
CrlRegistrationFinalization.register(this, this.__wbg_ptr, this);
|
|
1658
|
-
return this;
|
|
1659
|
-
}
|
|
1660
1652
|
}
|
|
1661
1653
|
if (Symbol.dispose)
|
|
1662
1654
|
CrlRegistration.prototype[Symbol.dispose] = CrlRegistration.prototype.free;
|
|
@@ -1680,6 +1672,12 @@ class CustomConfiguration {
|
|
|
1680
1672
|
const ptr = this.__destroy_into_raw();
|
|
1681
1673
|
wasm.__wbg_customconfiguration_free(ptr, 0);
|
|
1682
1674
|
}
|
|
1675
|
+
constructor(key_rotation_span, wire_policy) {
|
|
1676
|
+
const ret = wasm.customconfiguration_new(isLikeNone(key_rotation_span) ? 4294967297 : key_rotation_span >>> 0, isLikeNone(wire_policy) ? 0 : wire_policy);
|
|
1677
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1678
|
+
CustomConfigurationFinalization.register(this, this.__wbg_ptr, this);
|
|
1679
|
+
return this;
|
|
1680
|
+
}
|
|
1683
1681
|
get keyRotationSpan() {
|
|
1684
1682
|
const ret = wasm.__wbg_get_customconfiguration_keyRotationSpan(this.__wbg_ptr);
|
|
1685
1683
|
return ret === 4294967297 ? undefined : ret;
|
|
@@ -1694,12 +1692,6 @@ class CustomConfiguration {
|
|
|
1694
1692
|
set wirePolicy(arg0) {
|
|
1695
1693
|
wasm.__wbg_set_customconfiguration_wirePolicy(this.__wbg_ptr, isLikeNone(arg0) ? 0 : arg0);
|
|
1696
1694
|
}
|
|
1697
|
-
constructor(key_rotation_span, wire_policy) {
|
|
1698
|
-
const ret = wasm.customconfiguration_new(isLikeNone(key_rotation_span) ? 4294967297 : key_rotation_span >>> 0, isLikeNone(wire_policy) ? 0 : wire_policy);
|
|
1699
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1700
|
-
CustomConfigurationFinalization.register(this, this.__wbg_ptr, this);
|
|
1701
|
-
return this;
|
|
1702
|
-
}
|
|
1703
1695
|
}
|
|
1704
1696
|
if (Symbol.dispose)
|
|
1705
1697
|
CustomConfiguration.prototype[Symbol.dispose] = CustomConfiguration.prototype.free;
|
|
@@ -1874,6 +1866,12 @@ class ExternalSenderKey {
|
|
|
1874
1866
|
const ptr = this.__destroy_into_raw();
|
|
1875
1867
|
wasm.__wbg_externalsenderkey_free(ptr, 0);
|
|
1876
1868
|
}
|
|
1869
|
+
copyBytes() {
|
|
1870
|
+
const ret = wasm.externalsenderkey_copyBytes(this.__wbg_ptr);
|
|
1871
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1872
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1873
|
+
return v1;
|
|
1874
|
+
}
|
|
1877
1875
|
constructor(bytes) {
|
|
1878
1876
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1879
1877
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -1882,12 +1880,6 @@ class ExternalSenderKey {
|
|
|
1882
1880
|
ExternalSenderKeyFinalization.register(this, this.__wbg_ptr, this);
|
|
1883
1881
|
return this;
|
|
1884
1882
|
}
|
|
1885
|
-
copyBytes() {
|
|
1886
|
-
const ret = wasm.externalsenderkey_copyBytes(this.__wbg_ptr);
|
|
1887
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1888
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1889
|
-
return v1;
|
|
1890
|
-
}
|
|
1891
1883
|
}
|
|
1892
1884
|
if (Symbol.dispose)
|
|
1893
1885
|
ExternalSenderKey.prototype[Symbol.dispose] = ExternalSenderKey.prototype.free;
|
|
@@ -1911,34 +1903,22 @@ class FfiWireE2EIdentity {
|
|
|
1911
1903
|
const ptr = this.__destroy_into_raw();
|
|
1912
1904
|
wasm.__wbg_ffiwiree2eidentity_free(ptr, 0);
|
|
1913
1905
|
}
|
|
1914
|
-
|
|
1915
|
-
const ptr0 = passArray8ToWasm0(directory, wasm.__wbindgen_malloc);
|
|
1916
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1917
|
-
const ret = wasm.ffiwiree2eidentity_directory_response(this.__wbg_ptr, ptr0, len0);
|
|
1918
|
-
return ret;
|
|
1919
|
-
}
|
|
1920
|
-
new_account_request(previous_nonce) {
|
|
1906
|
+
finalize_request(previous_nonce) {
|
|
1921
1907
|
const ptr0 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1922
1908
|
const len0 = WASM_VECTOR_LEN;
|
|
1923
|
-
const ret = wasm.
|
|
1924
|
-
return ret;
|
|
1925
|
-
}
|
|
1926
|
-
new_account_response(account) {
|
|
1927
|
-
const ptr0 = passArray8ToWasm0(account, wasm.__wbindgen_malloc);
|
|
1928
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1929
|
-
const ret = wasm.ffiwiree2eidentity_new_account_response(this.__wbg_ptr, ptr0, len0);
|
|
1909
|
+
const ret = wasm.ffiwiree2eidentity_finalize_request(this.__wbg_ptr, ptr0, len0);
|
|
1930
1910
|
return ret;
|
|
1931
1911
|
}
|
|
1932
|
-
|
|
1933
|
-
const ptr0 = passStringToWasm0(
|
|
1912
|
+
create_dpop_token(expiry_secs, backend_nonce) {
|
|
1913
|
+
const ptr0 = passStringToWasm0(backend_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1934
1914
|
const len0 = WASM_VECTOR_LEN;
|
|
1935
|
-
const ret = wasm.
|
|
1915
|
+
const ret = wasm.ffiwiree2eidentity_create_dpop_token(this.__wbg_ptr, expiry_secs, ptr0, len0);
|
|
1936
1916
|
return ret;
|
|
1937
1917
|
}
|
|
1938
|
-
|
|
1939
|
-
const ptr0 = passArray8ToWasm0(
|
|
1918
|
+
finalize_response(finalize) {
|
|
1919
|
+
const ptr0 = passArray8ToWasm0(finalize, wasm.__wbindgen_malloc);
|
|
1940
1920
|
const len0 = WASM_VECTOR_LEN;
|
|
1941
|
-
const ret = wasm.
|
|
1921
|
+
const ret = wasm.ffiwiree2eidentity_finalize_response(this.__wbg_ptr, ptr0, len0);
|
|
1942
1922
|
return ret;
|
|
1943
1923
|
}
|
|
1944
1924
|
new_authz_request(url, previous_nonce) {
|
|
@@ -1949,30 +1929,34 @@ class FfiWireE2EIdentity {
|
|
|
1949
1929
|
const ret = wasm.ffiwiree2eidentity_new_authz_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1950
1930
|
return ret;
|
|
1951
1931
|
}
|
|
1952
|
-
|
|
1953
|
-
const ptr0 =
|
|
1932
|
+
new_order_request(previous_nonce) {
|
|
1933
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1954
1934
|
const len0 = WASM_VECTOR_LEN;
|
|
1955
|
-
const ret = wasm.
|
|
1935
|
+
const ret = wasm.ffiwiree2eidentity_new_order_request(this.__wbg_ptr, ptr0, len0);
|
|
1956
1936
|
return ret;
|
|
1957
1937
|
}
|
|
1958
|
-
|
|
1959
|
-
const ptr0 =
|
|
1938
|
+
directory_response(directory) {
|
|
1939
|
+
const ptr0 = passArray8ToWasm0(directory, wasm.__wbindgen_malloc);
|
|
1940
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1941
|
+
const ret = wasm.ffiwiree2eidentity_directory_response(this.__wbg_ptr, ptr0, len0);
|
|
1942
|
+
return ret;
|
|
1943
|
+
}
|
|
1944
|
+
new_authz_response(authz) {
|
|
1945
|
+
const ptr0 = passArray8ToWasm0(authz, wasm.__wbindgen_malloc);
|
|
1960
1946
|
const len0 = WASM_VECTOR_LEN;
|
|
1961
|
-
const ret = wasm.
|
|
1947
|
+
const ret = wasm.ffiwiree2eidentity_new_authz_response(this.__wbg_ptr, ptr0, len0);
|
|
1962
1948
|
return ret;
|
|
1963
1949
|
}
|
|
1964
|
-
|
|
1965
|
-
const ptr0 =
|
|
1950
|
+
new_order_response(order) {
|
|
1951
|
+
const ptr0 = passArray8ToWasm0(order, wasm.__wbindgen_malloc);
|
|
1966
1952
|
const len0 = WASM_VECTOR_LEN;
|
|
1967
|
-
const
|
|
1968
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1969
|
-
const ret = wasm.ffiwiree2eidentity_new_dpop_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1953
|
+
const ret = wasm.ffiwiree2eidentity_new_order_response(this.__wbg_ptr, ptr0, len0);
|
|
1970
1954
|
return ret;
|
|
1971
1955
|
}
|
|
1972
|
-
|
|
1973
|
-
const ptr0 =
|
|
1956
|
+
certificate_request(previous_nonce) {
|
|
1957
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1974
1958
|
const len0 = WASM_VECTOR_LEN;
|
|
1975
|
-
const ret = wasm.
|
|
1959
|
+
const ret = wasm.ffiwiree2eidentity_certificate_request(this.__wbg_ptr, ptr0, len0);
|
|
1976
1960
|
return ret;
|
|
1977
1961
|
}
|
|
1978
1962
|
check_order_request(order_url, previous_nonce) {
|
|
@@ -1983,28 +1967,30 @@ class FfiWireE2EIdentity {
|
|
|
1983
1967
|
const ret = wasm.ffiwiree2eidentity_check_order_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1984
1968
|
return ret;
|
|
1985
1969
|
}
|
|
1986
|
-
|
|
1987
|
-
const ptr0 =
|
|
1970
|
+
new_account_request(previous_nonce) {
|
|
1971
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1988
1972
|
const len0 = WASM_VECTOR_LEN;
|
|
1989
|
-
const ret = wasm.
|
|
1973
|
+
const ret = wasm.ffiwiree2eidentity_new_account_request(this.__wbg_ptr, ptr0, len0);
|
|
1990
1974
|
return ret;
|
|
1991
1975
|
}
|
|
1992
|
-
|
|
1993
|
-
const ptr0 =
|
|
1976
|
+
check_order_response(order) {
|
|
1977
|
+
const ptr0 = passArray8ToWasm0(order, wasm.__wbindgen_malloc);
|
|
1994
1978
|
const len0 = WASM_VECTOR_LEN;
|
|
1995
|
-
const ret = wasm.
|
|
1979
|
+
const ret = wasm.ffiwiree2eidentity_check_order_response(this.__wbg_ptr, ptr0, len0);
|
|
1996
1980
|
return ret;
|
|
1997
1981
|
}
|
|
1998
|
-
|
|
1999
|
-
const ptr0 = passArray8ToWasm0(
|
|
1982
|
+
new_account_response(account) {
|
|
1983
|
+
const ptr0 = passArray8ToWasm0(account, wasm.__wbindgen_malloc);
|
|
2000
1984
|
const len0 = WASM_VECTOR_LEN;
|
|
2001
|
-
const ret = wasm.
|
|
1985
|
+
const ret = wasm.ffiwiree2eidentity_new_account_response(this.__wbg_ptr, ptr0, len0);
|
|
2002
1986
|
return ret;
|
|
2003
1987
|
}
|
|
2004
|
-
|
|
2005
|
-
const ptr0 = passStringToWasm0(
|
|
1988
|
+
new_dpop_challenge_request(access_token, previous_nonce) {
|
|
1989
|
+
const ptr0 = passStringToWasm0(access_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2006
1990
|
const len0 = WASM_VECTOR_LEN;
|
|
2007
|
-
const
|
|
1991
|
+
const ptr1 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1992
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1993
|
+
const ret = wasm.ffiwiree2eidentity_new_dpop_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2008
1994
|
return ret;
|
|
2009
1995
|
}
|
|
2010
1996
|
new_oidc_challenge_request(id_token, previous_nonce) {
|
|
@@ -2015,6 +2001,12 @@ class FfiWireE2EIdentity {
|
|
|
2015
2001
|
const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2016
2002
|
return ret;
|
|
2017
2003
|
}
|
|
2004
|
+
new_dpop_challenge_response(challenge) {
|
|
2005
|
+
const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
|
|
2006
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2007
|
+
const ret = wasm.ffiwiree2eidentity_new_dpop_challenge_response(this.__wbg_ptr, ptr0, len0);
|
|
2008
|
+
return ret;
|
|
2009
|
+
}
|
|
2018
2010
|
new_oidc_challenge_response(challenge) {
|
|
2019
2011
|
const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
|
|
2020
2012
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2044,6 +2036,12 @@ class GroupInfo {
|
|
|
2044
2036
|
const ptr = this.__destroy_into_raw();
|
|
2045
2037
|
wasm.__wbg_groupinfo_free(ptr, 0);
|
|
2046
2038
|
}
|
|
2039
|
+
copyBytes() {
|
|
2040
|
+
const ret = wasm.groupinfo_copyBytes(this.__wbg_ptr);
|
|
2041
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2042
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2043
|
+
return v1;
|
|
2044
|
+
}
|
|
2047
2045
|
constructor(bytes) {
|
|
2048
2046
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2049
2047
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2052,12 +2050,6 @@ class GroupInfo {
|
|
|
2052
2050
|
GroupInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
2053
2051
|
return this;
|
|
2054
2052
|
}
|
|
2055
|
-
copyBytes() {
|
|
2056
|
-
const ret = wasm.groupinfo_copyBytes(this.__wbg_ptr);
|
|
2057
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2058
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2059
|
-
return v1;
|
|
2060
|
-
}
|
|
2061
2053
|
}
|
|
2062
2054
|
if (Symbol.dispose)
|
|
2063
2055
|
GroupInfo.prototype[Symbol.dispose] = GroupInfo.prototype.free;
|
|
@@ -2152,16 +2144,6 @@ class HistorySecret {
|
|
|
2152
2144
|
const ptr = this.__destroy_into_raw();
|
|
2153
2145
|
wasm.__wbg_historysecret_free(ptr, 0);
|
|
2154
2146
|
}
|
|
2155
|
-
get clientId() {
|
|
2156
|
-
const ret = wasm.__wbg_get_historysecret_clientId(this.__wbg_ptr);
|
|
2157
|
-
return ClientId.__wrap(ret);
|
|
2158
|
-
}
|
|
2159
|
-
get data() {
|
|
2160
|
-
const ret = wasm.__wbg_get_historysecret_data(this.__wbg_ptr);
|
|
2161
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2162
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2163
|
-
return v1;
|
|
2164
|
-
}
|
|
2165
2147
|
constructor(client_id, data) {
|
|
2166
2148
|
_assertClass(client_id, ClientId);
|
|
2167
2149
|
var ptr0 = client_id.__destroy_into_raw();
|
|
@@ -2175,6 +2157,16 @@ class HistorySecret {
|
|
|
2175
2157
|
HistorySecretFinalization.register(this, this.__wbg_ptr, this);
|
|
2176
2158
|
return this;
|
|
2177
2159
|
}
|
|
2160
|
+
get clientId() {
|
|
2161
|
+
const ret = wasm.__wbg_get_groupinfobundle_payload(this.__wbg_ptr);
|
|
2162
|
+
return ClientId.__wrap(ret);
|
|
2163
|
+
}
|
|
2164
|
+
get data() {
|
|
2165
|
+
const ret = wasm.__wbg_get_historysecret_data(this.__wbg_ptr);
|
|
2166
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2167
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2168
|
+
return v1;
|
|
2169
|
+
}
|
|
2178
2170
|
}
|
|
2179
2171
|
if (Symbol.dispose)
|
|
2180
2172
|
HistorySecret.prototype[Symbol.dispose] = HistorySecret.prototype.free;
|
|
@@ -2204,6 +2196,12 @@ class KeyPackage {
|
|
|
2204
2196
|
const ptr = this.__destroy_into_raw();
|
|
2205
2197
|
wasm.__wbg_keypackage_free(ptr, 0);
|
|
2206
2198
|
}
|
|
2199
|
+
copyBytes() {
|
|
2200
|
+
const ret = wasm.keypackage_copyBytes(this.__wbg_ptr);
|
|
2201
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2202
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2203
|
+
return v1;
|
|
2204
|
+
}
|
|
2207
2205
|
constructor(bytes) {
|
|
2208
2206
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2209
2207
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2212,12 +2210,6 @@ class KeyPackage {
|
|
|
2212
2210
|
KeyPackageFinalization.register(this, this.__wbg_ptr, this);
|
|
2213
2211
|
return this;
|
|
2214
2212
|
}
|
|
2215
|
-
copyBytes() {
|
|
2216
|
-
const ret = wasm.keypackage_copyBytes(this.__wbg_ptr);
|
|
2217
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2218
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2219
|
-
return v1;
|
|
2220
|
-
}
|
|
2221
2213
|
}
|
|
2222
2214
|
if (Symbol.dispose)
|
|
2223
2215
|
KeyPackage.prototype[Symbol.dispose] = KeyPackage.prototype.free;
|
|
@@ -2259,12 +2251,6 @@ class MlsTransportData {
|
|
|
2259
2251
|
const ptr = this.__destroy_into_raw();
|
|
2260
2252
|
wasm.__wbg_mlstransportdata_free(ptr, 0);
|
|
2261
2253
|
}
|
|
2262
|
-
get data() {
|
|
2263
|
-
const ret = wasm.__wbg_get_mlstransportdata_data(this.__wbg_ptr);
|
|
2264
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2265
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2266
|
-
return v1;
|
|
2267
|
-
}
|
|
2268
2254
|
constructor(buf) {
|
|
2269
2255
|
const ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
|
|
2270
2256
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2273,6 +2259,12 @@ class MlsTransportData {
|
|
|
2273
2259
|
MlsTransportDataFinalization.register(this, this.__wbg_ptr, this);
|
|
2274
2260
|
return this;
|
|
2275
2261
|
}
|
|
2262
|
+
get data() {
|
|
2263
|
+
const ret = wasm.__wbg_get_mlstransportdata_data(this.__wbg_ptr);
|
|
2264
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2265
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2266
|
+
return v1;
|
|
2267
|
+
}
|
|
2276
2268
|
}
|
|
2277
2269
|
if (Symbol.dispose)
|
|
2278
2270
|
MlsTransportData.prototype[Symbol.dispose] = MlsTransportData.prototype.free;
|
|
@@ -2331,7 +2323,6 @@ class MlsTransportResponse {
|
|
|
2331
2323
|
if (Symbol.dispose)
|
|
2332
2324
|
MlsTransportResponse.prototype[Symbol.dispose] = MlsTransportResponse.prototype.free;
|
|
2333
2325
|
var NewAcmeAuthzFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_newacmeauthz_free(ptr >>> 0, 1));
|
|
2334
|
-
|
|
2335
2326
|
class NewAcmeAuthz {
|
|
2336
2327
|
static __wrap(ptr) {
|
|
2337
2328
|
ptr = ptr >>> 0;
|
|
@@ -2466,6 +2457,12 @@ class SecretKey {
|
|
|
2466
2457
|
const ptr = this.__destroy_into_raw();
|
|
2467
2458
|
wasm.__wbg_secretkey_free(ptr, 0);
|
|
2468
2459
|
}
|
|
2460
|
+
copyBytes() {
|
|
2461
|
+
const ret = wasm.secretkey_copyBytes(this.__wbg_ptr);
|
|
2462
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2463
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2464
|
+
return v1;
|
|
2465
|
+
}
|
|
2469
2466
|
constructor(bytes) {
|
|
2470
2467
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2471
2468
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2474,12 +2471,6 @@ class SecretKey {
|
|
|
2474
2471
|
SecretKeyFinalization.register(this, this.__wbg_ptr, this);
|
|
2475
2472
|
return this;
|
|
2476
2473
|
}
|
|
2477
|
-
copyBytes() {
|
|
2478
|
-
const ret = wasm.secretkey_copyBytes(this.__wbg_ptr);
|
|
2479
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2480
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2481
|
-
return v1;
|
|
2482
|
-
}
|
|
2483
2474
|
}
|
|
2484
2475
|
if (Symbol.dispose)
|
|
2485
2476
|
SecretKey.prototype[Symbol.dispose] = SecretKey.prototype.free;
|
|
@@ -2503,6 +2494,12 @@ class Welcome {
|
|
|
2503
2494
|
const ptr = this.__destroy_into_raw();
|
|
2504
2495
|
wasm.__wbg_welcome_free(ptr, 0);
|
|
2505
2496
|
}
|
|
2497
|
+
copyBytes() {
|
|
2498
|
+
const ret = wasm.welcome_copyBytes(this.__wbg_ptr);
|
|
2499
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2500
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2501
|
+
return v1;
|
|
2502
|
+
}
|
|
2506
2503
|
constructor(bytes) {
|
|
2507
2504
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2508
2505
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -2511,12 +2508,6 @@ class Welcome {
|
|
|
2511
2508
|
WelcomeFinalization.register(this, this.__wbg_ptr, this);
|
|
2512
2509
|
return this;
|
|
2513
2510
|
}
|
|
2514
|
-
copyBytes() {
|
|
2515
|
-
const ret = wasm.welcome_copyBytes(this.__wbg_ptr);
|
|
2516
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2517
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2518
|
-
return v1;
|
|
2519
|
-
}
|
|
2520
2511
|
}
|
|
2521
2512
|
if (Symbol.dispose)
|
|
2522
2513
|
Welcome.prototype[Symbol.dispose] = Welcome.prototype.free;
|
|
@@ -2541,7 +2532,7 @@ class WelcomeBundle {
|
|
|
2541
2532
|
wasm.__wbg_welcomebundle_free(ptr, 0);
|
|
2542
2533
|
}
|
|
2543
2534
|
get id() {
|
|
2544
|
-
const ret = wasm.
|
|
2535
|
+
const ret = wasm.__wbg_get_groupinfobundle_payload(this.__wbg_ptr);
|
|
2545
2536
|
return ConversationId.__wrap(ret);
|
|
2546
2537
|
}
|
|
2547
2538
|
get crlNewDistributionPoints() {
|
|
@@ -2898,7 +2889,7 @@ function __wbg_get_imports() {
|
|
|
2898
2889
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2899
2890
|
}
|
|
2900
2891
|
};
|
|
2901
|
-
imports.wbg.
|
|
2892
|
+
imports.wbg.__wbg_execute_92dfbdf51fadfa93 = function() {
|
|
2902
2893
|
return handleError(function(arg0, arg1) {
|
|
2903
2894
|
const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
|
|
2904
2895
|
return ret;
|
|
@@ -3147,11 +3138,11 @@ function __wbg_get_imports() {
|
|
|
3147
3138
|
imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
3148
3139
|
try {
|
|
3149
3140
|
var state0 = { a: arg0, b: arg1 };
|
|
3150
|
-
var cb0 = (
|
|
3141
|
+
var cb0 = (arg0, arg1) => {
|
|
3151
3142
|
const a = state0.a;
|
|
3152
3143
|
state0.a = 0;
|
|
3153
3144
|
try {
|
|
3154
|
-
return
|
|
3145
|
+
return __wbg_adapter_479(a, state0.b, arg0, arg1);
|
|
3155
3146
|
} finally {
|
|
3156
3147
|
state0.a = a;
|
|
3157
3148
|
}
|
|
@@ -3546,6 +3537,10 @@ function __wbg_get_imports() {
|
|
|
3546
3537
|
const ret = v0;
|
|
3547
3538
|
return ret;
|
|
3548
3539
|
};
|
|
3540
|
+
imports.wbg.__wbindgen_cast_3fda284bdcf7704e = function(arg0, arg1) {
|
|
3541
|
+
const ret = makeMutClosure(arg0, arg1, 941, __wbg_adapter_30);
|
|
3542
|
+
return ret;
|
|
3543
|
+
};
|
|
3549
3544
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
3550
3545
|
const ret = BigInt.asUintN(64, arg0);
|
|
3551
3546
|
return ret;
|
|
@@ -3556,8 +3551,8 @@ function __wbg_get_imports() {
|
|
|
3556
3551
|
const ret = v0;
|
|
3557
3552
|
return ret;
|
|
3558
3553
|
};
|
|
3559
|
-
imports.wbg.
|
|
3560
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3554
|
+
imports.wbg.__wbindgen_cast_497f9f19c9eb4ede = function(arg0, arg1) {
|
|
3555
|
+
const ret = makeMutClosure(arg0, arg1, 2504, __wbg_adapter_18);
|
|
3561
3556
|
return ret;
|
|
3562
3557
|
};
|
|
3563
3558
|
imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
|
|
@@ -3566,12 +3561,8 @@ function __wbg_get_imports() {
|
|
|
3566
3561
|
const ret = v0;
|
|
3567
3562
|
return ret;
|
|
3568
3563
|
};
|
|
3569
|
-
imports.wbg.
|
|
3570
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3571
|
-
return ret;
|
|
3572
|
-
};
|
|
3573
|
-
imports.wbg.__wbindgen_cast_a834b411bd2663eb = function(arg0, arg1) {
|
|
3574
|
-
const ret = makeMutClosure(arg0, arg1, 2596, __wbg_adapter_30);
|
|
3564
|
+
imports.wbg.__wbindgen_cast_9d5cbea1975bde9f = function(arg0, arg1) {
|
|
3565
|
+
const ret = makeMutClosure(arg0, arg1, 2882, __wbg_adapter_23);
|
|
3575
3566
|
return ret;
|
|
3576
3567
|
};
|
|
3577
3568
|
imports.wbg.__wbindgen_cast_b77aa29fa8fe8560 = function(arg0, arg1) {
|
|
@@ -3790,10 +3781,10 @@ class E2eiEnrollment {
|
|
|
3790
3781
|
}
|
|
3791
3782
|
}
|
|
3792
3783
|
var E2eiConversationState2;
|
|
3793
|
-
((
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3784
|
+
((E2eiConversationState) => {
|
|
3785
|
+
E2eiConversationState[E2eiConversationState["Verified"] = 1] = "Verified";
|
|
3786
|
+
E2eiConversationState[E2eiConversationState["NotVerified"] = 2] = "NotVerified";
|
|
3787
|
+
E2eiConversationState[E2eiConversationState["NotEnabled"] = 3] = "NotEnabled";
|
|
3797
3788
|
})(E2eiConversationState2 ||= {});
|
|
3798
3789
|
|
|
3799
3790
|
// src/ConversationConfiguration.ts
|
|
@@ -4077,13 +4068,13 @@ function loggerIntoFfi(logger) {
|
|
|
4077
4068
|
return new CoreCryptoLogger(logFn, logThis);
|
|
4078
4069
|
}
|
|
4079
4070
|
var CoreCryptoLogLevel2;
|
|
4080
|
-
((
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4071
|
+
((CoreCryptoLogLevel) => {
|
|
4072
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Off"] = 1] = "Off";
|
|
4073
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Trace"] = 2] = "Trace";
|
|
4074
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Debug"] = 3] = "Debug";
|
|
4075
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Info"] = 4] = "Info";
|
|
4076
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Warn"] = 5] = "Warn";
|
|
4077
|
+
CoreCryptoLogLevel[CoreCryptoLogLevel["Error"] = 6] = "Error";
|
|
4087
4078
|
})(CoreCryptoLogLevel2 ||= {});
|
|
4088
4079
|
function setMaxLogLevel(level) {
|
|
4089
4080
|
CoreCrypto2.setMaxLogLevel(level);
|
|
@@ -4262,68 +4253,68 @@ async function initWasmModule(location = undefined) {
|
|
|
4262
4253
|
}
|
|
4263
4254
|
}
|
|
4264
4255
|
export {
|
|
4265
|
-
|
|
4266
|
-
updateDatabaseKey,
|
|
4267
|
-
setMaxLogLevel,
|
|
4268
|
-
setLogger,
|
|
4269
|
-
openDatabase,
|
|
4270
|
-
migrateDatabaseKeyTypeToBytes,
|
|
4271
|
-
isTransactionFailedError,
|
|
4272
|
-
isProteusSessionNotFoundError,
|
|
4273
|
-
isProteusRemoteIdentityChangedError,
|
|
4274
|
-
isProteusOtherError,
|
|
4275
|
-
isProteusError,
|
|
4276
|
-
isProteusDuplicateMessageError,
|
|
4277
|
-
isOtherError,
|
|
4278
|
-
isMlsWrongEpochError,
|
|
4279
|
-
isMlsUnmergedPendingGroupError,
|
|
4280
|
-
isMlsStaleProposalError,
|
|
4281
|
-
isMlsStaleCommitError,
|
|
4282
|
-
isMlsSelfCommitIgnoredError,
|
|
4283
|
-
isMlsOtherError,
|
|
4284
|
-
isMlsOrphanWelcomeError,
|
|
4285
|
-
isMlsMessageRejectedError,
|
|
4286
|
-
isMlsError,
|
|
4287
|
-
isMlsDuplicateMessageError,
|
|
4288
|
-
isMlsConversationAlreadyExistsError,
|
|
4289
|
-
isMlsBufferedFutureMessageError,
|
|
4290
|
-
isMlsBufferedCommitError,
|
|
4291
|
-
isE2eiError,
|
|
4292
|
-
isCcError,
|
|
4293
|
-
initWasmModule,
|
|
4294
|
-
ciphersuiteFromU16,
|
|
4295
|
-
ciphersuiteDefault,
|
|
4296
|
-
buildMetadata,
|
|
4297
|
-
X509Identity2 as X509Identity,
|
|
4298
|
-
WirePolicy,
|
|
4299
|
-
WireIdentity4 as WireIdentity,
|
|
4300
|
-
WelcomeBundle,
|
|
4301
|
-
Welcome,
|
|
4302
|
-
SecretKey,
|
|
4303
|
-
MlsRatchetTreeType as RatchetTreeType,
|
|
4304
|
-
ProteusErrorType,
|
|
4305
|
-
NewAcmeOrder,
|
|
4306
|
-
NewAcmeAuthz,
|
|
4307
|
-
MlsTransportData,
|
|
4308
|
-
MlsErrorType,
|
|
4309
|
-
MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
|
|
4310
|
-
GroupInfo,
|
|
4311
|
-
ExternalSenderKey,
|
|
4312
|
-
ErrorType,
|
|
4313
|
-
E2eiEnrollment,
|
|
4314
|
-
E2eiConversationState2 as E2eiConversationState,
|
|
4315
|
-
DeviceStatus,
|
|
4316
|
-
DatabaseKey,
|
|
4317
|
-
Database,
|
|
4318
|
-
CustomConfiguration,
|
|
4319
|
-
CredentialType,
|
|
4320
|
-
CoreCryptoLogLevel2 as CoreCryptoLogLevel,
|
|
4321
|
-
CoreCryptoError,
|
|
4322
|
-
CoreCryptoContext2 as CoreCryptoContext,
|
|
4323
|
-
CoreCrypto2 as CoreCrypto,
|
|
4324
|
-
ConversationId,
|
|
4325
|
-
ClientId,
|
|
4326
|
-
Ciphersuite,
|
|
4256
|
+
AcmeChallenge,
|
|
4327
4257
|
BuildMetadata2 as BuildMetadata,
|
|
4328
|
-
|
|
4258
|
+
Ciphersuite,
|
|
4259
|
+
ClientId,
|
|
4260
|
+
ConversationId,
|
|
4261
|
+
CoreCrypto2 as CoreCrypto,
|
|
4262
|
+
CoreCryptoContext2 as CoreCryptoContext,
|
|
4263
|
+
CoreCryptoError,
|
|
4264
|
+
CoreCryptoLogLevel2 as CoreCryptoLogLevel,
|
|
4265
|
+
CredentialType,
|
|
4266
|
+
CustomConfiguration,
|
|
4267
|
+
Database,
|
|
4268
|
+
DatabaseKey,
|
|
4269
|
+
DeviceStatus,
|
|
4270
|
+
E2eiConversationState2 as E2eiConversationState,
|
|
4271
|
+
E2eiEnrollment,
|
|
4272
|
+
ErrorType,
|
|
4273
|
+
ExternalSenderKey,
|
|
4274
|
+
GroupInfo,
|
|
4275
|
+
MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
|
|
4276
|
+
MlsErrorType,
|
|
4277
|
+
MlsTransportData,
|
|
4278
|
+
NewAcmeAuthz,
|
|
4279
|
+
NewAcmeOrder,
|
|
4280
|
+
ProteusErrorType,
|
|
4281
|
+
MlsRatchetTreeType as RatchetTreeType,
|
|
4282
|
+
SecretKey,
|
|
4283
|
+
Welcome,
|
|
4284
|
+
WelcomeBundle,
|
|
4285
|
+
WireIdentity4 as WireIdentity,
|
|
4286
|
+
WirePolicy,
|
|
4287
|
+
X509Identity2 as X509Identity,
|
|
4288
|
+
buildMetadata,
|
|
4289
|
+
ciphersuiteDefault,
|
|
4290
|
+
ciphersuiteFromU16,
|
|
4291
|
+
initWasmModule,
|
|
4292
|
+
isCcError,
|
|
4293
|
+
isE2eiError,
|
|
4294
|
+
isMlsBufferedCommitError,
|
|
4295
|
+
isMlsBufferedFutureMessageError,
|
|
4296
|
+
isMlsConversationAlreadyExistsError,
|
|
4297
|
+
isMlsDuplicateMessageError,
|
|
4298
|
+
isMlsError,
|
|
4299
|
+
isMlsMessageRejectedError,
|
|
4300
|
+
isMlsOrphanWelcomeError,
|
|
4301
|
+
isMlsOtherError,
|
|
4302
|
+
isMlsSelfCommitIgnoredError,
|
|
4303
|
+
isMlsStaleCommitError,
|
|
4304
|
+
isMlsStaleProposalError,
|
|
4305
|
+
isMlsUnmergedPendingGroupError,
|
|
4306
|
+
isMlsWrongEpochError,
|
|
4307
|
+
isOtherError,
|
|
4308
|
+
isProteusDuplicateMessageError,
|
|
4309
|
+
isProteusError,
|
|
4310
|
+
isProteusOtherError,
|
|
4311
|
+
isProteusRemoteIdentityChangedError,
|
|
4312
|
+
isProteusSessionNotFoundError,
|
|
4313
|
+
isTransactionFailedError,
|
|
4314
|
+
migrateDatabaseKeyTypeToBytes,
|
|
4315
|
+
openDatabase,
|
|
4316
|
+
setLogger,
|
|
4317
|
+
setMaxLogLevel,
|
|
4318
|
+
updateDatabaseKey,
|
|
4319
|
+
version2 as version
|
|
4329
4320
|
};
|