@wireapp/core-crypto 1.0.0-rc.33 → 1.0.0-rc.34
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
Binary file
|
@@ -1,5 +1,3 @@
|
|
1
|
-
/* tslint:disable */
|
2
|
-
/* eslint-disable */
|
3
1
|
/**
|
4
2
|
* see [core_crypto::prelude::DeviceStatus]
|
5
3
|
*/
|
@@ -94,6 +92,37 @@ export class NewAcmeOrder {
|
|
94
92
|
readonly delegate: Uint8Array;
|
95
93
|
}
|
96
94
|
/**
|
95
|
+
*/
|
96
|
+
export class ProposalBundle {
|
97
|
+
free(): void;
|
98
|
+
/**
|
99
|
+
* New CRL Distribution of members of this group
|
100
|
+
*/
|
101
|
+
readonly crlNewDistributionPoints: (string)[] | undefined;
|
102
|
+
/**
|
103
|
+
* TLS-serialized MLS proposal that needs to be fanned out to other (existing) members of the conversation
|
104
|
+
*/
|
105
|
+
readonly proposal: Uint8Array;
|
106
|
+
/**
|
107
|
+
* Unique identifier of a proposal. Use this in {@link CoreCrypto.clearPendingProposal} to roll back (delete) the proposal
|
108
|
+
*/
|
109
|
+
readonly proposalRef: Uint8Array;
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* see [core_crypto::prelude::WelcomeBundle]
|
113
|
+
*/
|
114
|
+
export class WelcomeBundle {
|
115
|
+
free(): void;
|
116
|
+
/**
|
117
|
+
* New CRL Distribution of members of this group
|
118
|
+
*/
|
119
|
+
readonly crlNewDistributionPoints: (string)[] | undefined;
|
120
|
+
/**
|
121
|
+
* Identifier of the joined conversation
|
122
|
+
*/
|
123
|
+
readonly id: Uint8Array;
|
124
|
+
}
|
125
|
+
/**
|
97
126
|
* Represents the identity claims identifying a client
|
98
127
|
* Those claims are verifiable by any member in the group
|
99
128
|
*/
|
@@ -291,6 +320,10 @@ export interface MemberAddedMessages {
|
|
291
320
|
* @readonly
|
292
321
|
*/
|
293
322
|
groupInfo: GroupInfoBundle;
|
323
|
+
/**
|
324
|
+
* New CRL distribution points that appeared by the introduction of a new credential
|
325
|
+
*/
|
326
|
+
crlNewDistributionPoints?: string[];
|
294
327
|
}
|
295
328
|
/**
|
296
329
|
* Data shape for a MLS generic commit + optional bundle (aka stapled commit & welcome)
|
@@ -387,6 +420,10 @@ export interface RotateBundle {
|
|
387
420
|
* @readonly
|
388
421
|
*/
|
389
422
|
keyPackageRefsToRemove: Uint8Array[];
|
423
|
+
/**
|
424
|
+
* New CRL distribution points that appeared by the introduction of a new credential
|
425
|
+
*/
|
426
|
+
crlNewDistributionPoints?: string[];
|
390
427
|
}
|
391
428
|
/**
|
392
429
|
* Params for CoreCrypto deferred initialization
|
@@ -451,6 +488,10 @@ export interface ConversationInitBundle {
|
|
451
488
|
* @readonly
|
452
489
|
*/
|
453
490
|
groupInfo: GroupInfoBundle;
|
491
|
+
/**
|
492
|
+
* New CRL distribution points that appeared by the introduction of a new credential
|
493
|
+
*/
|
494
|
+
crlNewDistributionPoints?: string[];
|
454
495
|
}
|
455
496
|
/**
|
456
497
|
* Supporting struct for CRL registration result
|
@@ -554,23 +595,6 @@ export interface BufferedDecryptedMessage {
|
|
554
595
|
*/
|
555
596
|
crlNewDistributionPoints?: string[];
|
556
597
|
}
|
557
|
-
/**
|
558
|
-
* Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
|
559
|
-
*/
|
560
|
-
export interface ProposalBundle {
|
561
|
-
/**
|
562
|
-
* TLS-serialized MLS proposal that needs to be fanned out to other (existing) members of the conversation
|
563
|
-
*
|
564
|
-
* @readonly
|
565
|
-
*/
|
566
|
-
proposal: Uint8Array;
|
567
|
-
/**
|
568
|
-
* Unique identifier of a proposal. Use this in {@link CoreCrypto.clearPendingProposal} to roll back (delete) the proposal
|
569
|
-
*
|
570
|
-
* @readonly
|
571
|
-
*/
|
572
|
-
proposalRef: ProposalRef;
|
573
|
-
}
|
574
598
|
/**
|
575
599
|
* MLS Proposal type
|
576
600
|
*/
|
@@ -875,7 +899,7 @@ export declare class CoreCrypto {
|
|
875
899
|
* @param configuration - configuration of the MLS group
|
876
900
|
* @returns The conversation ID of the newly joined group. You can use the same ID to decrypt/encrypt messages
|
877
901
|
*/
|
878
|
-
processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<
|
902
|
+
processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<WelcomeBundle>;
|
879
903
|
/**
|
880
904
|
* Get the client's public signature key. To upload to the DS for further backend side validation
|
881
905
|
*
|
@@ -1202,38 +1226,38 @@ export declare class CoreCrypto {
|
|
1202
1226
|
* @param clientId - client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:6add501bacd1d90e@example.com`
|
1203
1227
|
* @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
|
1204
1228
|
* @param handle - user handle e.g. `alice.smith.qa@example.com`
|
1205
|
-
* @param
|
1229
|
+
* @param expirySec - generated x509 certificate expiry
|
1206
1230
|
* @param ciphersuite - for generating signing key material
|
1207
1231
|
* @param team - name of the Wire team a user belongs to
|
1208
1232
|
* @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiMlsInitOnly}
|
1209
1233
|
*/
|
1210
|
-
e2eiNewEnrollment(clientId: string, displayName: string, handle: string,
|
1234
|
+
e2eiNewEnrollment(clientId: string, displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
|
1211
1235
|
/**
|
1212
1236
|
* Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI.
|
1213
1237
|
* Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
|
1214
1238
|
*
|
1215
1239
|
* @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
|
1216
1240
|
* @param handle - user handle e.g. `alice.smith.qa@example.com`
|
1217
|
-
* @param
|
1241
|
+
* @param expirySec - generated x509 certificate expiry
|
1218
1242
|
* @param ciphersuite - for generating signing key material
|
1219
1243
|
* @param team - name of the Wire team a user belongs to
|
1220
1244
|
* @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
|
1221
1245
|
*/
|
1222
|
-
e2eiNewActivationEnrollment(displayName: string, handle: string,
|
1246
|
+
e2eiNewActivationEnrollment(displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
|
1223
1247
|
/**
|
1224
1248
|
* Generates an E2EI enrollment instance for a E2EI client (with a X509 certificate credential)
|
1225
1249
|
* having to change/rotate their credential, either because the former one is expired or it
|
1226
1250
|
* has been revoked. It lets you change the DisplayName or the handle
|
1227
1251
|
* if you need to. Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
|
1228
1252
|
*
|
1229
|
-
* @param
|
1253
|
+
* @param expirySec - generated x509 certificate expiry
|
1230
1254
|
* @param ciphersuite - for generating signing key material
|
1231
1255
|
* @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
|
1232
1256
|
* @param handle - user handle e.g. `alice.smith.qa@example.com`
|
1233
1257
|
* @param team - name of the Wire team a user belongs to
|
1234
1258
|
* @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
|
1235
1259
|
*/
|
1236
|
-
e2eiNewRotateEnrollment(
|
1260
|
+
e2eiNewRotateEnrollment(expirySec: number, ciphersuite: Ciphersuite, displayName?: string, handle?: string, team?: string): Promise<E2eiEnrollment>;
|
1237
1261
|
/**
|
1238
1262
|
* Use this method to initialize end-to-end identity when a client signs up and the grace period is already expired ;
|
1239
1263
|
* that means he cannot initialize with a Basic credential
|
@@ -232,7 +232,7 @@ var handleError = function(f, args) {
|
|
232
232
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
233
233
|
}
|
234
234
|
};
|
235
|
-
var
|
235
|
+
var __wbg_adapter_417 = function(arg0, arg1, arg2, arg3) {
|
236
236
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h639173e274a4a014(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
237
237
|
};
|
238
238
|
async function __wbg_load(module, imports) {
|
@@ -262,8 +262,12 @@ async function __wbg_load(module, imports) {
|
|
262
262
|
var __wbg_get_imports = function() {
|
263
263
|
const imports = {};
|
264
264
|
imports.wbg = {};
|
265
|
-
imports.wbg.
|
266
|
-
const ret =
|
265
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
266
|
+
const ret = arg0;
|
267
|
+
return addHeapObject(ret);
|
268
|
+
};
|
269
|
+
imports.wbg.__wbg_newacmeorder_new = function(arg0) {
|
270
|
+
const ret = NewAcmeOrder.__wrap(arg0);
|
267
271
|
return addHeapObject(ret);
|
268
272
|
};
|
269
273
|
imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
|
@@ -274,41 +278,41 @@ var __wbg_get_imports = function() {
|
|
274
278
|
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
275
279
|
return addHeapObject(ret);
|
276
280
|
};
|
277
|
-
imports.wbg.
|
278
|
-
|
279
|
-
return addHeapObject(ret);
|
281
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
282
|
+
takeObject(arg0);
|
280
283
|
};
|
281
|
-
imports.wbg.
|
282
|
-
const ret =
|
284
|
+
imports.wbg.__wbg_corecrypto_new = function(arg0) {
|
285
|
+
const ret = CoreCrypto.__wrap(arg0);
|
283
286
|
return addHeapObject(ret);
|
284
287
|
};
|
285
|
-
imports.wbg.
|
286
|
-
const ret =
|
288
|
+
imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
|
289
|
+
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
287
290
|
return addHeapObject(ret);
|
288
291
|
};
|
289
292
|
imports.wbg.__wbg_proposalbundle_new = function(arg0) {
|
290
293
|
const ret = ProposalBundle.__wrap(arg0);
|
291
294
|
return addHeapObject(ret);
|
292
295
|
};
|
293
|
-
imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
|
294
|
-
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
295
|
-
return addHeapObject(ret);
|
296
|
-
};
|
297
296
|
imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
|
298
297
|
const ret = BufferedDecryptedMessage.__wrap(arg0);
|
299
298
|
return addHeapObject(ret);
|
300
299
|
};
|
301
|
-
imports.wbg.
|
302
|
-
const ret =
|
300
|
+
imports.wbg.__wbg_acmedirectory_new = function(arg0) {
|
301
|
+
const ret = AcmeDirectory.__wrap(arg0);
|
303
302
|
return addHeapObject(ret);
|
304
303
|
};
|
305
|
-
imports.wbg.
|
306
|
-
|
304
|
+
imports.wbg.__wbg_commitbundle_new = function(arg0) {
|
305
|
+
const ret = CommitBundle.__wrap(arg0);
|
306
|
+
return addHeapObject(ret);
|
307
307
|
};
|
308
308
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
309
309
|
const ret = getObject(arg0);
|
310
310
|
return addHeapObject(ret);
|
311
311
|
};
|
312
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
313
|
+
const ret = BigInt.asUintN(64, arg0);
|
314
|
+
return addHeapObject(ret);
|
315
|
+
};
|
312
316
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
313
317
|
const ret = getStringFromWasm0(arg0, arg1);
|
314
318
|
return addHeapObject(ret);
|
@@ -321,10 +325,6 @@ var __wbg_get_imports = function() {
|
|
321
325
|
const ret = getObject(arg0) === null;
|
322
326
|
return ret;
|
323
327
|
};
|
324
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
325
|
-
const ret = BigInt.asUintN(64, arg0);
|
326
|
-
return addHeapObject(ret);
|
327
|
-
};
|
328
328
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
329
329
|
const obj = getObject(arg1);
|
330
330
|
const ret = typeof obj === "string" ? obj : undefined;
|
@@ -886,7 +886,7 @@ var __wbg_get_imports = function() {
|
|
886
886
|
const a = state0.a;
|
887
887
|
state0.a = 0;
|
888
888
|
try {
|
889
|
-
return
|
889
|
+
return __wbg_adapter_417(a, state0.b, arg02, arg12);
|
890
890
|
} finally {
|
891
891
|
state0.a = a;
|
892
892
|
}
|
@@ -966,12 +966,12 @@ var __wbg_get_imports = function() {
|
|
966
966
|
const ret = wasm.memory;
|
967
967
|
return addHeapObject(ret);
|
968
968
|
};
|
969
|
-
imports.wbg.
|
969
|
+
imports.wbg.__wbindgen_closure_wrapper2502 = function(arg0, arg1, arg2) {
|
970
970
|
const ret = makeMutClosure(arg0, arg1, 648, __wbg_adapter_54);
|
971
971
|
return addHeapObject(ret);
|
972
972
|
};
|
973
|
-
imports.wbg.
|
974
|
-
const ret = makeMutClosure(arg0, arg1,
|
973
|
+
imports.wbg.__wbindgen_closure_wrapper11505 = function(arg0, arg1, arg2) {
|
974
|
+
const ret = makeMutClosure(arg0, arg1, 1588, __wbg_adapter_57);
|
975
975
|
return addHeapObject(ret);
|
976
976
|
};
|
977
977
|
return imports;
|
@@ -1033,13 +1033,11 @@ var cachedFloat64Memory0 = null;
|
|
1033
1033
|
var cachedBigInt64Memory0 = null;
|
1034
1034
|
var cachedUint32Memory0 = null;
|
1035
1035
|
var cachedUint16Memory0 = null;
|
1036
|
-
var
|
1037
|
-
|
1038
|
-
"
|
1039
|
-
|
1040
|
-
"
|
1041
|
-
Revoked: 2,
|
1042
|
-
"2": "Revoked"
|
1036
|
+
var WirePolicy = Object.freeze({
|
1037
|
+
Plaintext: 1,
|
1038
|
+
"1": "Plaintext",
|
1039
|
+
Ciphertext: 2,
|
1040
|
+
"2": "Ciphertext"
|
1043
1041
|
});
|
1044
1042
|
var CredentialType = Object.freeze({
|
1045
1043
|
Basic: 1,
|
@@ -1065,11 +1063,13 @@ var Ciphersuite = Object.freeze({
|
|
1065
1063
|
MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519: 61489,
|
1066
1064
|
"61489": "MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519"
|
1067
1065
|
});
|
1068
|
-
var
|
1069
|
-
|
1070
|
-
"
|
1071
|
-
|
1072
|
-
"
|
1066
|
+
var DeviceStatus = Object.freeze({
|
1067
|
+
Valid: 0,
|
1068
|
+
"0": "Valid",
|
1069
|
+
Expired: 1,
|
1070
|
+
"1": "Expired",
|
1071
|
+
Revoked: 2,
|
1072
|
+
"2": "Revoked"
|
1073
1073
|
});
|
1074
1074
|
|
1075
1075
|
class AcmeChallenge {
|
@@ -1268,9 +1268,21 @@ class BufferedDecryptedMessage {
|
|
1268
1268
|
const ret = wasm.buffereddecryptedmessage_identity(this.__wbg_ptr);
|
1269
1269
|
return ret === 0 ? undefined : WireIdentity.__wrap(ret);
|
1270
1270
|
}
|
1271
|
-
get
|
1272
|
-
|
1273
|
-
|
1271
|
+
get crlNewDistributionPoints() {
|
1272
|
+
try {
|
1273
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
1274
|
+
wasm.__wbg_get_buffereddecryptedmessage_crlNewDistributionPoints(retptr, this.__wbg_ptr);
|
1275
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
1276
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
1277
|
+
let v1;
|
1278
|
+
if (r0 !== 0) {
|
1279
|
+
v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
1280
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
1281
|
+
}
|
1282
|
+
return v1;
|
1283
|
+
} finally {
|
1284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
1285
|
+
}
|
1274
1286
|
}
|
1275
1287
|
}
|
1276
1288
|
|
@@ -1349,7 +1361,7 @@ class CoreCrypto {
|
|
1349
1361
|
const ptr = this.__destroy_into_raw();
|
1350
1362
|
wasm.__wbg_corecrypto_free(ptr);
|
1351
1363
|
}
|
1352
|
-
e2ei_new_enrollment(client_id, display_name, handle, team,
|
1364
|
+
e2ei_new_enrollment(client_id, display_name, handle, team, expiry_sec, ciphersuite) {
|
1353
1365
|
const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1354
1366
|
const len0 = WASM_VECTOR_LEN;
|
1355
1367
|
const ptr1 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
@@ -1358,27 +1370,27 @@ class CoreCrypto {
|
|
1358
1370
|
const len2 = WASM_VECTOR_LEN;
|
1359
1371
|
var ptr3 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1360
1372
|
var len3 = WASM_VECTOR_LEN;
|
1361
|
-
const ret = wasm.corecrypto_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3,
|
1373
|
+
const ret = wasm.corecrypto_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_sec, ciphersuite);
|
1362
1374
|
return takeObject(ret);
|
1363
1375
|
}
|
1364
|
-
e2ei_new_activation_enrollment(display_name, handle, team,
|
1376
|
+
e2ei_new_activation_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
1365
1377
|
const ptr0 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1366
1378
|
const len0 = WASM_VECTOR_LEN;
|
1367
1379
|
const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1368
1380
|
const len1 = WASM_VECTOR_LEN;
|
1369
1381
|
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1370
1382
|
var len2 = WASM_VECTOR_LEN;
|
1371
|
-
const ret = wasm.corecrypto_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2,
|
1383
|
+
const ret = wasm.corecrypto_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
1372
1384
|
return takeObject(ret);
|
1373
1385
|
}
|
1374
|
-
e2ei_new_rotate_enrollment(display_name, handle, team,
|
1386
|
+
e2ei_new_rotate_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
1375
1387
|
var ptr0 = isLikeNone(display_name) ? 0 : passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1376
1388
|
var len0 = WASM_VECTOR_LEN;
|
1377
1389
|
var ptr1 = isLikeNone(handle) ? 0 : passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1378
1390
|
var len1 = WASM_VECTOR_LEN;
|
1379
1391
|
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1380
1392
|
var len2 = WASM_VECTOR_LEN;
|
1381
|
-
const ret = wasm.corecrypto_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2,
|
1393
|
+
const ret = wasm.corecrypto_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
1382
1394
|
return takeObject(ret);
|
1383
1395
|
}
|
1384
1396
|
e2ei_register_acme_ca(trust_anchor_pem) {
|
@@ -2175,12 +2187,46 @@ class ProposalBundle {
|
|
2175
2187
|
wasm.__wbg_proposalbundle_free(ptr);
|
2176
2188
|
}
|
2177
2189
|
get proposal() {
|
2178
|
-
|
2179
|
-
|
2190
|
+
try {
|
2191
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
2192
|
+
wasm.__wbg_get_acmechallenge_delegate(retptr, this.__wbg_ptr);
|
2193
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2194
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2195
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
2196
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
2197
|
+
return v1;
|
2198
|
+
} finally {
|
2199
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
2200
|
+
}
|
2180
2201
|
}
|
2181
|
-
get
|
2182
|
-
|
2183
|
-
|
2202
|
+
get proposalRef() {
|
2203
|
+
try {
|
2204
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
2205
|
+
wasm.__wbg_get_proposalbundle_proposalRef(retptr, this.__wbg_ptr);
|
2206
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2207
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2208
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
2209
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
2210
|
+
return v1;
|
2211
|
+
} finally {
|
2212
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
2213
|
+
}
|
2214
|
+
}
|
2215
|
+
get crlNewDistributionPoints() {
|
2216
|
+
try {
|
2217
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
2218
|
+
wasm.__wbg_get_proposalbundle_crlNewDistributionPoints(retptr, this.__wbg_ptr);
|
2219
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2220
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2221
|
+
let v1;
|
2222
|
+
if (r0 !== 0) {
|
2223
|
+
v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
2224
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
2225
|
+
}
|
2226
|
+
return v1;
|
2227
|
+
} finally {
|
2228
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
2229
|
+
}
|
2184
2230
|
}
|
2185
2231
|
}
|
2186
2232
|
|
@@ -2226,6 +2272,47 @@ class ProteusAutoPrekeyBundle {
|
|
2226
2272
|
wasm.__wbg_set_proteusautoprekeybundle_pkb(this.__wbg_ptr, ptr0, len0);
|
2227
2273
|
}
|
2228
2274
|
}
|
2275
|
+
class WelcomeBundle {
|
2276
|
+
__destroy_into_raw() {
|
2277
|
+
const ptr = this.__wbg_ptr;
|
2278
|
+
this.__wbg_ptr = 0;
|
2279
|
+
return ptr;
|
2280
|
+
}
|
2281
|
+
free() {
|
2282
|
+
const ptr = this.__destroy_into_raw();
|
2283
|
+
wasm.__wbg_welcomebundle_free(ptr);
|
2284
|
+
}
|
2285
|
+
get id() {
|
2286
|
+
try {
|
2287
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
2288
|
+
wasm.__wbg_get_acmechallenge_delegate(retptr, this.__wbg_ptr);
|
2289
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2290
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2291
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
2292
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
2293
|
+
return v1;
|
2294
|
+
} finally {
|
2295
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
2296
|
+
}
|
2297
|
+
}
|
2298
|
+
get crlNewDistributionPoints() {
|
2299
|
+
try {
|
2300
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
2301
|
+
wasm.__wbg_get_welcomebundle_crlNewDistributionPoints(retptr, this.__wbg_ptr);
|
2302
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2303
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2304
|
+
let v1;
|
2305
|
+
if (r0 !== 0) {
|
2306
|
+
v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
2307
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
2308
|
+
}
|
2309
|
+
return v1;
|
2310
|
+
} finally {
|
2311
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
2312
|
+
}
|
2313
|
+
}
|
2314
|
+
}
|
2315
|
+
|
2229
2316
|
class WireIdentity {
|
2230
2317
|
static __wrap(ptr) {
|
2231
2318
|
ptr = ptr >>> 0;
|
@@ -2542,7 +2629,7 @@ class CoreCrypto2 {
|
|
2542
2629
|
}
|
2543
2630
|
try {
|
2544
2631
|
const ffiDecryptedMessage = await CoreCryptoError.asyncMapErr(this.#cc.decrypt_message(conversationId, payload));
|
2545
|
-
const ffiCommitDelay = ffiDecryptedMessage.
|
2632
|
+
const ffiCommitDelay = ffiDecryptedMessage.commitDelay;
|
2546
2633
|
let commitDelay = undefined;
|
2547
2634
|
if (typeof ffiCommitDelay === "number" && ffiCommitDelay >= 0) {
|
2548
2635
|
commitDelay = ffiCommitDelay * 1000;
|
@@ -2550,10 +2637,10 @@ class CoreCrypto2 {
|
|
2550
2637
|
const ret = {
|
2551
2638
|
message: ffiDecryptedMessage.message,
|
2552
2639
|
proposals: ffiDecryptedMessage.proposals,
|
2553
|
-
isActive: ffiDecryptedMessage.
|
2640
|
+
isActive: ffiDecryptedMessage.isActive,
|
2554
2641
|
senderClientId: ffiDecryptedMessage.sender_client_id,
|
2555
2642
|
commitDelay,
|
2556
|
-
hasEpochChanged: ffiDecryptedMessage.
|
2643
|
+
hasEpochChanged: ffiDecryptedMessage.hasEpochChanged,
|
2557
2644
|
bufferedMessages: ffiDecryptedMessage.buffered_messages?.map((m) => {
|
2558
2645
|
return {
|
2559
2646
|
message: m.message,
|
@@ -2562,10 +2649,10 @@ class CoreCrypto2 {
|
|
2562
2649
|
senderClientId: m.sender_client_id,
|
2563
2650
|
commitDelay: m.commit_delay,
|
2564
2651
|
hasEpochChanged: m.has_epoch_changed,
|
2565
|
-
crlNewDistributionPoints: m.
|
2652
|
+
crlNewDistributionPoints: m.crlNewDistributionPoints
|
2566
2653
|
};
|
2567
2654
|
}),
|
2568
|
-
crlNewDistributionPoints: ffiDecryptedMessage.
|
2655
|
+
crlNewDistributionPoints: ffiDecryptedMessage.crlNewDistributionPoints
|
2569
2656
|
};
|
2570
2657
|
return ret;
|
2571
2658
|
} catch (e) {
|
@@ -2607,7 +2694,8 @@ class CoreCrypto2 {
|
|
2607
2694
|
encryptionType: gi.encryption_type,
|
2608
2695
|
ratchetTreeType: gi.ratchet_tree_type,
|
2609
2696
|
payload: gi.payload
|
2610
|
-
}
|
2697
|
+
},
|
2698
|
+
crlNewDistributionPoints: ffiRet.crlNewDistributionPoints
|
2611
2699
|
};
|
2612
2700
|
return ret;
|
2613
2701
|
} catch (e) {
|
@@ -2714,7 +2802,8 @@ class CoreCrypto2 {
|
|
2714
2802
|
encryptionType: gi.encryption_type,
|
2715
2803
|
ratchetTreeType: gi.ratchet_tree_type,
|
2716
2804
|
payload: gi.payload
|
2717
|
-
}
|
2805
|
+
},
|
2806
|
+
crlNewDistributionPoints: ffiInitMessage.crlNewDistributionPoints
|
2718
2807
|
};
|
2719
2808
|
return ret;
|
2720
2809
|
} catch (e) {
|
@@ -2813,16 +2902,16 @@ class CoreCrypto2 {
|
|
2813
2902
|
async proteusLastErrorCode() {
|
2814
2903
|
return await this.#cc.proteus_last_error_code();
|
2815
2904
|
}
|
2816
|
-
async e2eiNewEnrollment(clientId, displayName, handle,
|
2817
|
-
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_enrollment(clientId, displayName, handle, team,
|
2905
|
+
async e2eiNewEnrollment(clientId, displayName, handle, expirySec, ciphersuite, team) {
|
2906
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_enrollment(clientId, displayName, handle, team, expirySec, ciphersuite));
|
2818
2907
|
return new E2eiEnrollment(e2ei);
|
2819
2908
|
}
|
2820
|
-
async e2eiNewActivationEnrollment(displayName, handle,
|
2821
|
-
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_activation_enrollment(displayName, handle, team,
|
2909
|
+
async e2eiNewActivationEnrollment(displayName, handle, expirySec, ciphersuite, team) {
|
2910
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_activation_enrollment(displayName, handle, team, expirySec, ciphersuite));
|
2822
2911
|
return new E2eiEnrollment(e2ei);
|
2823
2912
|
}
|
2824
|
-
async e2eiNewRotateEnrollment(
|
2825
|
-
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_rotate_enrollment(displayName, handle, team,
|
2913
|
+
async e2eiNewRotateEnrollment(expirySec, ciphersuite, displayName, handle, team) {
|
2914
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_rotate_enrollment(displayName, handle, team, expirySec, ciphersuite));
|
2826
2915
|
return new E2eiEnrollment(e2ei);
|
2827
2916
|
}
|
2828
2917
|
async e2eiMlsInitOnly(enrollment, certificateChain, nbKeyPackage) {
|
@@ -2842,7 +2931,8 @@ class CoreCrypto2 {
|
|
2842
2931
|
const ret = {
|
2843
2932
|
commits: ffiRet.commits,
|
2844
2933
|
newKeyPackages: ffiRet.new_key_packages,
|
2845
|
-
keyPackageRefsToRemove: ffiRet.key_package_refs_to_remove
|
2934
|
+
keyPackageRefsToRemove: ffiRet.key_package_refs_to_remove,
|
2935
|
+
crlNewDistributionPoints: ffiRet.crlNewDistributionPoints
|
2846
2936
|
};
|
2847
2937
|
return ret;
|
2848
2938
|
}
|
@@ -2948,8 +3038,10 @@ var E2eiConversationState;
|
|
2948
3038
|
export {
|
2949
3039
|
WirePolicy2 as WirePolicy,
|
2950
3040
|
WireIdentity,
|
3041
|
+
WelcomeBundle,
|
2951
3042
|
RatchetTreeType,
|
2952
3043
|
ProposalType,
|
3044
|
+
ProposalBundle,
|
2953
3045
|
NewAcmeOrder,
|
2954
3046
|
NewAcmeAuthz,
|
2955
3047
|
GroupInfoEncryptionType,
|