@wireapp/core-crypto 1.0.0-rc.32 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "1.0.0-rc.32",
3
+ "version": "1.0.0-rc.34",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -92,6 +92,37 @@ export class NewAcmeOrder {
92
92
  readonly delegate: Uint8Array;
93
93
  }
94
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
+ /**
95
126
  * Represents the identity claims identifying a client
96
127
  * Those claims are verifiable by any member in the group
97
128
  */
@@ -289,6 +320,10 @@ export interface MemberAddedMessages {
289
320
  * @readonly
290
321
  */
291
322
  groupInfo: GroupInfoBundle;
323
+ /**
324
+ * New CRL distribution points that appeared by the introduction of a new credential
325
+ */
326
+ crlNewDistributionPoints?: string[];
292
327
  }
293
328
  /**
294
329
  * Data shape for a MLS generic commit + optional bundle (aka stapled commit & welcome)
@@ -385,6 +420,10 @@ export interface RotateBundle {
385
420
  * @readonly
386
421
  */
387
422
  keyPackageRefsToRemove: Uint8Array[];
423
+ /**
424
+ * New CRL distribution points that appeared by the introduction of a new credential
425
+ */
426
+ crlNewDistributionPoints?: string[];
388
427
  }
389
428
  /**
390
429
  * Params for CoreCrypto deferred initialization
@@ -449,6 +488,10 @@ export interface ConversationInitBundle {
449
488
  * @readonly
450
489
  */
451
490
  groupInfo: GroupInfoBundle;
491
+ /**
492
+ * New CRL distribution points that appeared by the introduction of a new credential
493
+ */
494
+ crlNewDistributionPoints?: string[];
452
495
  }
453
496
  /**
454
497
  * Supporting struct for CRL registration result
@@ -552,23 +595,6 @@ export interface BufferedDecryptedMessage {
552
595
  */
553
596
  crlNewDistributionPoints?: string[];
554
597
  }
555
- /**
556
- * Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
557
- */
558
- export interface ProposalBundle {
559
- /**
560
- * TLS-serialized MLS proposal that needs to be fanned out to other (existing) members of the conversation
561
- *
562
- * @readonly
563
- */
564
- proposal: Uint8Array;
565
- /**
566
- * Unique identifier of a proposal. Use this in {@link CoreCrypto.clearPendingProposal} to roll back (delete) the proposal
567
- *
568
- * @readonly
569
- */
570
- proposalRef: ProposalRef;
571
- }
572
598
  /**
573
599
  * MLS Proposal type
574
600
  */
@@ -873,7 +899,7 @@ export declare class CoreCrypto {
873
899
  * @param configuration - configuration of the MLS group
874
900
  * @returns The conversation ID of the newly joined group. You can use the same ID to decrypt/encrypt messages
875
901
  */
876
- processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<ConversationId>;
902
+ processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<WelcomeBundle>;
877
903
  /**
878
904
  * Get the client's public signature key. To upload to the DS for further backend side validation
879
905
  *
@@ -1200,38 +1226,38 @@ export declare class CoreCrypto {
1200
1226
  * @param clientId - client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:6add501bacd1d90e@example.com`
1201
1227
  * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1202
1228
  * @param handle - user handle e.g. `alice.smith.qa@example.com`
1203
- * @param expiryDays - generated x509 certificate expiry
1229
+ * @param expirySec - generated x509 certificate expiry
1204
1230
  * @param ciphersuite - for generating signing key material
1205
1231
  * @param team - name of the Wire team a user belongs to
1206
1232
  * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiMlsInitOnly}
1207
1233
  */
1208
- e2eiNewEnrollment(clientId: string, displayName: string, handle: string, expiryDays: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1234
+ e2eiNewEnrollment(clientId: string, displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1209
1235
  /**
1210
1236
  * Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI.
1211
1237
  * Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
1212
1238
  *
1213
1239
  * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1214
1240
  * @param handle - user handle e.g. `alice.smith.qa@example.com`
1215
- * @param expiryDays - generated x509 certificate expiry
1241
+ * @param expirySec - generated x509 certificate expiry
1216
1242
  * @param ciphersuite - for generating signing key material
1217
1243
  * @param team - name of the Wire team a user belongs to
1218
1244
  * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
1219
1245
  */
1220
- e2eiNewActivationEnrollment(displayName: string, handle: string, expiryDays: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1246
+ e2eiNewActivationEnrollment(displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1221
1247
  /**
1222
1248
  * Generates an E2EI enrollment instance for a E2EI client (with a X509 certificate credential)
1223
1249
  * having to change/rotate their credential, either because the former one is expired or it
1224
1250
  * has been revoked. It lets you change the DisplayName or the handle
1225
1251
  * if you need to. Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
1226
1252
  *
1227
- * @param expiryDays - generated x509 certificate expiry
1253
+ * @param expirySec - generated x509 certificate expiry
1228
1254
  * @param ciphersuite - for generating signing key material
1229
1255
  * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1230
1256
  * @param handle - user handle e.g. `alice.smith.qa@example.com`
1231
1257
  * @param team - name of the Wire team a user belongs to
1232
1258
  * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
1233
1259
  */
1234
- e2eiNewRotateEnrollment(expiryDays: number, ciphersuite: Ciphersuite, displayName?: string, handle?: string, team?: string): Promise<E2eiEnrollment>;
1260
+ e2eiNewRotateEnrollment(expirySec: number, ciphersuite: Ciphersuite, displayName?: string, handle?: string, team?: string): Promise<E2eiEnrollment>;
1235
1261
  /**
1236
1262
  * Use this method to initialize end-to-end identity when a client signs up and the grace period is already expired ;
1237
1263
  * that means he cannot initialize with a Basic credential
@@ -1442,11 +1468,10 @@ export declare class E2eiEnrollment {
1442
1468
  * Creates a new challenge request for Wire Oidc challenge.
1443
1469
  *
1444
1470
  * @param idToken you get back from Identity Provider
1445
- * @param refreshToken you get back from Identity Provider to renew the access token
1446
1471
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
1447
1472
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1448
1473
  */
1449
- newOidcChallengeRequest(idToken: string, refreshToken: string, previousNonce: string): Promise<JsonRawData>;
1474
+ newOidcChallengeRequest(idToken: string, previousNonce: string): Promise<JsonRawData>;
1450
1475
  /**
1451
1476
  * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}` for the OIDC challenge.
1452
1477
  *
@@ -1454,7 +1479,7 @@ export declare class E2eiEnrollment {
1454
1479
  * @param challenge HTTP response body
1455
1480
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1456
1481
  */
1457
- newOidcChallengeResponse(cc: CoreCrypto, challenge: JsonRawData): Promise<void>;
1482
+ newOidcChallengeResponse(challenge: JsonRawData): Promise<void>;
1458
1483
  /**
1459
1484
  * Verifies that the previous challenge has been completed.
1460
1485
  *
@@ -1493,12 +1518,6 @@ export declare class E2eiEnrollment {
1493
1518
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
1494
1519
  */
1495
1520
  certificateRequest(previousNonce: string): Promise<JsonRawData>;
1496
- /**
1497
- * Lets clients retrieve the OIDC refresh token to try to renew the user's authorization.
1498
- * If it's expired, the user needs to reauthenticate and they will update the refresh token
1499
- * in {@link newOidcChallengeRequest}
1500
- */
1501
- getRefreshToken(): Promise<String>;
1502
1521
  }
1503
1522
  /**
1504
1523
  * Indicates the state of a Conversation regarding end-to-end identity.
@@ -232,7 +232,7 @@ var handleError = function(f, args) {
232
232
  wasm.__wbindgen_exn_store(addHeapObject(e));
233
233
  }
234
234
  };
235
- var __wbg_adapter_413 = function(arg0, arg1, arg2, arg3) {
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,20 +262,16 @@ async function __wbg_load(module, imports) {
262
262
  var __wbg_get_imports = function() {
263
263
  const imports = {};
264
264
  imports.wbg = {};
265
- imports.wbg.__wbg_acmedirectory_new = function(arg0) {
266
- const ret = AcmeDirectory.__wrap(arg0);
267
- return addHeapObject(ret);
268
- };
269
- imports.wbg.__wbg_commitbundle_new = function(arg0) {
270
- const ret = CommitBundle.__wrap(arg0);
265
+ imports.wbg.__wbindgen_number_new = function(arg0) {
266
+ const ret = arg0;
271
267
  return addHeapObject(ret);
272
268
  };
273
- imports.wbg.__wbg_corecrypto_new = function(arg0) {
274
- const ret = CoreCrypto.__wrap(arg0);
269
+ imports.wbg.__wbg_newacmeorder_new = function(arg0) {
270
+ const ret = NewAcmeOrder.__wrap(arg0);
275
271
  return addHeapObject(ret);
276
272
  };
277
- imports.wbg.__wbindgen_number_new = function(arg0) {
278
- const ret = arg0;
273
+ imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
274
+ const ret = NewAcmeAuthz.__wrap(arg0);
279
275
  return addHeapObject(ret);
280
276
  };
281
277
  imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
@@ -285,30 +281,38 @@ var __wbg_get_imports = function() {
285
281
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
286
282
  takeObject(arg0);
287
283
  };
288
- imports.wbg.__wbg_proposalbundle_new = function(arg0) {
289
- const ret = ProposalBundle.__wrap(arg0);
290
- return addHeapObject(ret);
291
- };
292
- imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
293
- const ret = NewAcmeAuthz.__wrap(arg0);
294
- return addHeapObject(ret);
295
- };
296
- imports.wbg.__wbg_newacmeorder_new = function(arg0) {
297
- const ret = NewAcmeOrder.__wrap(arg0);
284
+ imports.wbg.__wbg_corecrypto_new = function(arg0) {
285
+ const ret = CoreCrypto.__wrap(arg0);
298
286
  return addHeapObject(ret);
299
287
  };
300
288
  imports.wbg.__wbg_proteusautoprekeybundle_new = function(arg0) {
301
289
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
302
290
  return addHeapObject(ret);
303
291
  };
292
+ imports.wbg.__wbg_proposalbundle_new = function(arg0) {
293
+ const ret = ProposalBundle.__wrap(arg0);
294
+ return addHeapObject(ret);
295
+ };
304
296
  imports.wbg.__wbg_buffereddecryptedmessage_new = function(arg0) {
305
297
  const ret = BufferedDecryptedMessage.__wrap(arg0);
306
298
  return addHeapObject(ret);
307
299
  };
300
+ imports.wbg.__wbg_acmedirectory_new = function(arg0) {
301
+ const ret = AcmeDirectory.__wrap(arg0);
302
+ return addHeapObject(ret);
303
+ };
304
+ imports.wbg.__wbg_commitbundle_new = function(arg0) {
305
+ const ret = CommitBundle.__wrap(arg0);
306
+ return addHeapObject(ret);
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 __wbg_adapter_413(a, state0.b, arg02, arg12);
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.__wbindgen_closure_wrapper2515 = function(arg0, arg1, arg2) {
970
- const ret = makeMutClosure(arg0, arg1, 651, __wbg_adapter_54);
969
+ imports.wbg.__wbindgen_closure_wrapper2502 = function(arg0, arg1, arg2) {
970
+ const ret = makeMutClosure(arg0, arg1, 648, __wbg_adapter_54);
971
971
  return addHeapObject(ret);
972
972
  };
973
- imports.wbg.__wbindgen_closure_wrapper11461 = function(arg0, arg1, arg2) {
974
- const ret = makeMutClosure(arg0, arg1, 1589, __wbg_adapter_57);
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,6 +1033,12 @@ var cachedFloat64Memory0 = null;
1033
1033
  var cachedBigInt64Memory0 = null;
1034
1034
  var cachedUint32Memory0 = null;
1035
1035
  var cachedUint16Memory0 = null;
1036
+ var WirePolicy = Object.freeze({
1037
+ Plaintext: 1,
1038
+ "1": "Plaintext",
1039
+ Ciphertext: 2,
1040
+ "2": "Ciphertext"
1041
+ });
1036
1042
  var CredentialType = Object.freeze({
1037
1043
  Basic: 1,
1038
1044
  "1": "Basic",
@@ -1057,12 +1063,6 @@ var Ciphersuite = Object.freeze({
1057
1063
  MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519: 61489,
1058
1064
  "61489": "MLS_128_X25519KYBER768DRAFT00_AES128GCM_SHA256_Ed25519"
1059
1065
  });
1060
- var WirePolicy = Object.freeze({
1061
- Plaintext: 1,
1062
- "1": "Plaintext",
1063
- Ciphertext: 2,
1064
- "2": "Ciphertext"
1065
- });
1066
1066
  var DeviceStatus = Object.freeze({
1067
1067
  Valid: 0,
1068
1068
  "0": "Valid",
@@ -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 crl_new_distribution_points() {
1272
- const ret = wasm.buffereddecryptedmessage_crl_new_distribution_points(this.__wbg_ptr);
1273
- return takeObject(ret);
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, expiry_days, ciphersuite) {
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, expiry_days, ciphersuite);
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, expiry_days, ciphersuite) {
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, expiry_days, ciphersuite);
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, expiry_days, ciphersuite) {
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, expiry_days, ciphersuite);
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) {
@@ -1989,19 +2001,16 @@ class FfiWireE2EIdentity {
1989
2001
  const ret = wasm.ffiwiree2eidentity_new_dpop_challenge_response(this.__wbg_ptr, addHeapObject(challenge));
1990
2002
  return takeObject(ret);
1991
2003
  }
1992
- new_oidc_challenge_request(id_token, refresh_token, previous_nonce) {
2004
+ new_oidc_challenge_request(id_token, previous_nonce) {
1993
2005
  const ptr0 = passStringToWasm0(id_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1994
2006
  const len0 = WASM_VECTOR_LEN;
1995
- const ptr1 = passStringToWasm0(refresh_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2007
+ const ptr1 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1996
2008
  const len1 = WASM_VECTOR_LEN;
1997
- const ptr2 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1998
- const len2 = WASM_VECTOR_LEN;
1999
- const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
2009
+ const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
2000
2010
  return takeObject(ret);
2001
2011
  }
2002
- new_oidc_challenge_response(cc, challenge) {
2003
- _assertClass(cc, CoreCrypto);
2004
- const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_response(this.__wbg_ptr, cc.__wbg_ptr, addHeapObject(challenge));
2012
+ new_oidc_challenge_response(challenge) {
2013
+ const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_response(this.__wbg_ptr, addHeapObject(challenge));
2005
2014
  return takeObject(ret);
2006
2015
  }
2007
2016
  check_order_request(order_url, previous_nonce) {
@@ -2032,10 +2041,6 @@ class FfiWireE2EIdentity {
2032
2041
  const ret = wasm.ffiwiree2eidentity_certificate_request(this.__wbg_ptr, ptr0, len0);
2033
2042
  return takeObject(ret);
2034
2043
  }
2035
- get_refresh_token() {
2036
- const ret = wasm.ffiwiree2eidentity_get_refresh_token(this.__wbg_ptr);
2037
- return takeObject(ret);
2038
- }
2039
2044
  }
2040
2045
 
2041
2046
  class GroupInfoBundle {
@@ -2182,12 +2187,46 @@ class ProposalBundle {
2182
2187
  wasm.__wbg_proposalbundle_free(ptr);
2183
2188
  }
2184
2189
  get proposal() {
2185
- const ret = wasm.proposalbundle_proposal(this.__wbg_ptr);
2186
- return takeObject(ret);
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
+ }
2187
2201
  }
2188
- get proposal_ref() {
2189
- const ret = wasm.proposalbundle_proposal_ref(this.__wbg_ptr);
2190
- return takeObject(ret);
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
+ }
2191
2230
  }
2192
2231
  }
2193
2232
 
@@ -2233,6 +2272,47 @@ class ProteusAutoPrekeyBundle {
2233
2272
  wasm.__wbg_set_proteusautoprekeybundle_pkb(this.__wbg_ptr, ptr0, len0);
2234
2273
  }
2235
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
+
2236
2316
  class WireIdentity {
2237
2317
  static __wrap(ptr) {
2238
2318
  ptr = ptr >>> 0;
@@ -2549,7 +2629,7 @@ class CoreCrypto2 {
2549
2629
  }
2550
2630
  try {
2551
2631
  const ffiDecryptedMessage = await CoreCryptoError.asyncMapErr(this.#cc.decrypt_message(conversationId, payload));
2552
- const ffiCommitDelay = ffiDecryptedMessage.commit_delay;
2632
+ const ffiCommitDelay = ffiDecryptedMessage.commitDelay;
2553
2633
  let commitDelay = undefined;
2554
2634
  if (typeof ffiCommitDelay === "number" && ffiCommitDelay >= 0) {
2555
2635
  commitDelay = ffiCommitDelay * 1000;
@@ -2557,10 +2637,10 @@ class CoreCrypto2 {
2557
2637
  const ret = {
2558
2638
  message: ffiDecryptedMessage.message,
2559
2639
  proposals: ffiDecryptedMessage.proposals,
2560
- isActive: ffiDecryptedMessage.is_active,
2640
+ isActive: ffiDecryptedMessage.isActive,
2561
2641
  senderClientId: ffiDecryptedMessage.sender_client_id,
2562
2642
  commitDelay,
2563
- hasEpochChanged: ffiDecryptedMessage.has_epoch_changed,
2643
+ hasEpochChanged: ffiDecryptedMessage.hasEpochChanged,
2564
2644
  bufferedMessages: ffiDecryptedMessage.buffered_messages?.map((m) => {
2565
2645
  return {
2566
2646
  message: m.message,
@@ -2569,10 +2649,10 @@ class CoreCrypto2 {
2569
2649
  senderClientId: m.sender_client_id,
2570
2650
  commitDelay: m.commit_delay,
2571
2651
  hasEpochChanged: m.has_epoch_changed,
2572
- crlNewDistributionPoints: m.crl_new_distribution_points
2652
+ crlNewDistributionPoints: m.crlNewDistributionPoints
2573
2653
  };
2574
2654
  }),
2575
- crlNewDistributionPoints: ffiDecryptedMessage.crl_new_distribution_points
2655
+ crlNewDistributionPoints: ffiDecryptedMessage.crlNewDistributionPoints
2576
2656
  };
2577
2657
  return ret;
2578
2658
  } catch (e) {
@@ -2614,7 +2694,8 @@ class CoreCrypto2 {
2614
2694
  encryptionType: gi.encryption_type,
2615
2695
  ratchetTreeType: gi.ratchet_tree_type,
2616
2696
  payload: gi.payload
2617
- }
2697
+ },
2698
+ crlNewDistributionPoints: ffiRet.crlNewDistributionPoints
2618
2699
  };
2619
2700
  return ret;
2620
2701
  } catch (e) {
@@ -2721,7 +2802,8 @@ class CoreCrypto2 {
2721
2802
  encryptionType: gi.encryption_type,
2722
2803
  ratchetTreeType: gi.ratchet_tree_type,
2723
2804
  payload: gi.payload
2724
- }
2805
+ },
2806
+ crlNewDistributionPoints: ffiInitMessage.crlNewDistributionPoints
2725
2807
  };
2726
2808
  return ret;
2727
2809
  } catch (e) {
@@ -2820,16 +2902,16 @@ class CoreCrypto2 {
2820
2902
  async proteusLastErrorCode() {
2821
2903
  return await this.#cc.proteus_last_error_code();
2822
2904
  }
2823
- async e2eiNewEnrollment(clientId, displayName, handle, expiryDays, ciphersuite, team) {
2824
- const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_enrollment(clientId, displayName, handle, team, expiryDays, ciphersuite));
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));
2825
2907
  return new E2eiEnrollment(e2ei);
2826
2908
  }
2827
- async e2eiNewActivationEnrollment(displayName, handle, expiryDays, ciphersuite, team) {
2828
- const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_activation_enrollment(displayName, handle, team, expiryDays, ciphersuite));
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));
2829
2911
  return new E2eiEnrollment(e2ei);
2830
2912
  }
2831
- async e2eiNewRotateEnrollment(expiryDays, ciphersuite, displayName, handle, team) {
2832
- const e2ei = await CoreCryptoError.asyncMapErr(this.#cc.e2ei_new_rotate_enrollment(displayName, handle, team, expiryDays, ciphersuite));
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));
2833
2915
  return new E2eiEnrollment(e2ei);
2834
2916
  }
2835
2917
  async e2eiMlsInitOnly(enrollment, certificateChain, nbKeyPackage) {
@@ -2849,7 +2931,8 @@ class CoreCrypto2 {
2849
2931
  const ret = {
2850
2932
  commits: ffiRet.commits,
2851
2933
  newKeyPackages: ffiRet.new_key_packages,
2852
- keyPackageRefsToRemove: ffiRet.key_package_refs_to_remove
2934
+ keyPackageRefsToRemove: ffiRet.key_package_refs_to_remove,
2935
+ crlNewDistributionPoints: ffiRet.crlNewDistributionPoints
2853
2936
  };
2854
2937
  return ret;
2855
2938
  }
@@ -2924,11 +3007,11 @@ class E2eiEnrollment {
2924
3007
  async newDpopChallengeResponse(challenge) {
2925
3008
  return await CoreCryptoError.asyncMapErr(this.#enrollment.new_dpop_challenge_response(challenge));
2926
3009
  }
2927
- async newOidcChallengeRequest(idToken, refreshToken, previousNonce) {
2928
- return await CoreCryptoError.asyncMapErr(this.#enrollment.new_oidc_challenge_request(idToken, refreshToken, previousNonce));
3010
+ async newOidcChallengeRequest(idToken, previousNonce) {
3011
+ return await CoreCryptoError.asyncMapErr(this.#enrollment.new_oidc_challenge_request(idToken, previousNonce));
2929
3012
  }
2930
- async newOidcChallengeResponse(cc, challenge) {
2931
- return await CoreCryptoError.asyncMapErr(this.#enrollment.new_oidc_challenge_response(cc.inner(), challenge));
3013
+ async newOidcChallengeResponse(challenge) {
3014
+ return await CoreCryptoError.asyncMapErr(this.#enrollment.new_oidc_challenge_response(challenge));
2932
3015
  }
2933
3016
  async checkOrderRequest(orderUrl, previousNonce) {
2934
3017
  return await CoreCryptoError.asyncMapErr(this.#enrollment.check_order_request(orderUrl, previousNonce));
@@ -2945,9 +3028,6 @@ class E2eiEnrollment {
2945
3028
  async certificateRequest(previousNonce) {
2946
3029
  return await CoreCryptoError.asyncMapErr(this.#enrollment.certificate_request(previousNonce));
2947
3030
  }
2948
- async getRefreshToken() {
2949
- return await CoreCryptoError.asyncMapErr(this.#enrollment.get_refresh_token());
2950
- }
2951
3031
  }
2952
3032
  var E2eiConversationState;
2953
3033
  (function(E2eiConversationState2) {
@@ -2958,8 +3038,10 @@ var E2eiConversationState;
2958
3038
  export {
2959
3039
  WirePolicy2 as WirePolicy,
2960
3040
  WireIdentity,
3041
+ WelcomeBundle,
2961
3042
  RatchetTreeType,
2962
3043
  ProposalType,
3044
+ ProposalBundle,
2963
3045
  NewAcmeOrder,
2964
3046
  NewAcmeAuthz,
2965
3047
  GroupInfoEncryptionType,