@wireapp/core-crypto 0.10.0 → 1.0.0-pre.1

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": "0.10.0",
3
+ "version": "1.0.0-pre.1",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -152,11 +152,11 @@ export interface MemberAddedMessages {
152
152
  */
153
153
  welcome: Uint8Array;
154
154
  /**
155
- * MLS PublicGroupState (GroupInfo in draft-15) which is required for joining a group by external commit
155
+ * MLS GroupInfo which is required for joining a group by external commit
156
156
  *
157
157
  * @readonly
158
158
  */
159
- publicGroupState: PublicGroupStateBundle;
159
+ groupInfo: GroupInfoBundle;
160
160
  }
161
161
  /**
162
162
  * Data shape for a MLS generic commit + optional bundle (aka stapled commit & welcome)
@@ -175,35 +175,35 @@ export interface CommitBundle {
175
175
  */
176
176
  welcome?: Uint8Array;
177
177
  /**
178
- * MLS PublicGroupState (GroupInfo in draft-15) which is required for joining a group by external commit
178
+ * MLS GroupInfo which is required for joining a group by external commit
179
179
  *
180
180
  * @readonly
181
181
  */
182
- publicGroupState: PublicGroupStateBundle;
182
+ groupInfo: GroupInfoBundle;
183
183
  }
184
184
  /**
185
- * Wraps a PublicGroupState in order to efficiently upload it to the Delivery Service.
185
+ * Wraps a GroupInfo in order to efficiently upload it to the Delivery Service.
186
186
  * This is not part of MLS protocol but parts might be standardized at some point.
187
187
  */
188
- export interface PublicGroupStateBundle {
188
+ export interface GroupInfoBundle {
189
189
  /**
190
- * see {@link PublicGroupStateEncryptionType}
190
+ * see {@link GroupInfoEncryptionType}
191
191
  */
192
- encryptionType: PublicGroupStateEncryptionType;
192
+ encryptionType: GroupInfoEncryptionType;
193
193
  /**
194
194
  * see {@link RatchetTreeType}
195
195
  */
196
196
  ratchetTreeType: RatchetTreeType;
197
197
  /**
198
- * TLS-serialized PublicGroupState
198
+ * TLS-serialized GroupInfo
199
199
  */
200
200
  payload: Uint8Array;
201
201
  }
202
202
  /**
203
- * Informs whether the PublicGroupState is confidential
204
- * see [core_crypto::mls::conversation::public_group_state::PublicGroupStateEncryptionType]
203
+ * Informs whether the GroupInfo is confidential
204
+ * see [core_crypto::mls::conversation::group_info::GroupInfoEncryptionType]
205
205
  */
206
- export declare enum PublicGroupStateEncryptionType {
206
+ export declare enum GroupInfoEncryptionType {
207
207
  /**
208
208
  * Unencrypted
209
209
  */
@@ -215,11 +215,11 @@ export declare enum PublicGroupStateEncryptionType {
215
215
  }
216
216
  /**
217
217
  * Represents different ways of carrying the Ratchet Tree with some optimizations to save some space
218
- * see [core_crypto::mls::conversation::public_group_state::RatchetTreeType]
218
+ * see [core_crypto::mls::conversation::group_info::RatchetTreeType]
219
219
  */
220
220
  export declare enum RatchetTreeType {
221
221
  /**
222
- * Complete PublicGroupState
222
+ * Complete GroupInfo
223
223
  */
224
224
  Full = 1,
225
225
  /**
@@ -302,7 +302,7 @@ export interface ConversationInitBundle {
302
302
  *
303
303
  * @readonly
304
304
  */
305
- publicGroupState: PublicGroupStateBundle;
305
+ groupInfo: GroupInfoBundle;
306
306
  }
307
307
  /**
308
308
  * This is a wrapper for all the possible outcomes you can get after decrypting a message
@@ -431,11 +431,7 @@ export declare enum ExternalProposalType {
431
431
  /**
432
432
  * This allows to propose the addition of other clients to the MLS group/conversation
433
433
  */
434
- Add = 0,
435
- /**
436
- * This allows to propose the removal of clients from the MLS group/conversation
437
- */
438
- Remove = 1
434
+ Add = 0
439
435
  }
440
436
  export interface ExternalProposalArgs {
441
437
  /**
@@ -448,12 +444,6 @@ export interface ExternalProposalArgs {
448
444
  */
449
445
  epoch: number;
450
446
  }
451
- export interface ExternalRemoveProposalArgs extends ExternalProposalArgs {
452
- /**
453
- * KeyPackageRef of the client that needs to be removed in the proposal
454
- */
455
- keyPackageRef: Uint8Array;
456
- }
457
447
  export interface ExternalAddProposalArgs extends ExternalProposalArgs {
458
448
  /**
459
449
  * {@link Ciphersuite} to propose to join the MLS group with.
@@ -759,16 +749,16 @@ export declare class CoreCrypto {
759
749
  * @returns A {@link ProposalBundle} containing the Proposal and its reference in order to roll it back if necessary
760
750
  */
761
751
  newProposal(proposalType: ProposalType, args: ProposalArgs | AddProposalArgs | RemoveProposalArgs): Promise<ProposalBundle>;
762
- newExternalProposal(externalProposalType: ExternalProposalType, args: ExternalAddProposalArgs | ExternalRemoveProposalArgs): Promise<Uint8Array>;
752
+ newExternalProposal(externalProposalType: ExternalProposalType, args: ExternalAddProposalArgs): Promise<Uint8Array>;
763
753
  /**
764
- * Exports public group state for use in external commits
754
+ * Exports GroupInfo for use in external commits
765
755
  *
766
756
  * @param conversationId - MLS Conversation ID
767
- * @returns TLS-serialized MLS public group state
757
+ * @returns TLS-serialized MLS GroupInfo
768
758
  */
769
- exportGroupState(conversationId: ConversationId): Promise<Uint8Array>;
759
+ exportGroupInfo(conversationId: ConversationId): Promise<Uint8Array>;
770
760
  /**
771
- * Allows to create an external commit to "apply" to join a group through its public group state.
761
+ * Allows to create an external commit to "apply" to join a group through its GroupInfo.
772
762
  *
773
763
  * If the Delivery Service accepts the external commit, you have to {@link CoreCrypto.mergePendingGroupFromExternalCommit}
774
764
  * in order to get back a functional MLS group. On the opposite, if it rejects it, you can either retry by just
@@ -777,14 +767,14 @@ export declare class CoreCrypto {
777
767
  * {@link CoreCrypto.clearPendingGroupFromExternalCommit} in order not to bloat the user's storage but nothing
778
768
  * bad can happen if you forget to except some storage space wasted.
779
769
  *
780
- * @param publicGroupState - a TLS encoded PublicGroupState fetched from the Delivery Service
770
+ * @param groupInfo - a TLS encoded GroupInfo fetched from the Delivery Service
781
771
  * @param credentialType - kind of Credential to use for joining this group. If {@link CredentialType.Basic} is
782
772
  * chosen and no Credential has been created yet for it, a new one will be generated.
783
773
  * @param configuration - configuration of the MLS group
784
774
  * When {@link CredentialType.X509} is chosen, it fails when no Credential has been created for the given {@link Ciphersuite}.
785
775
  * @returns see {@link ConversationInitBundle}
786
776
  */
787
- joinByExternalCommit(publicGroupState: Uint8Array, credentialType: CredentialType, configuration?: CustomConfiguration): Promise<ConversationInitBundle>;
777
+ joinByExternalCommit(groupInfo: Uint8Array, credentialType: CredentialType, configuration?: CustomConfiguration): Promise<ConversationInitBundle>;
788
778
  /**
789
779
  * This merges the commit generated by {@link CoreCrypto.joinByExternalCommit}, persists the group permanently
790
780
  * and deletes the temporary one. This step makes the group operational and ready to encrypt/decrypt message
@@ -1027,6 +1017,14 @@ export declare class CoreCrypto {
1027
1017
  * @returns the persisted enrollment instance
1028
1018
  */
1029
1019
  e2eiEnrollmentStashPop(handle: Uint8Array): Promise<WireE2eIdentity>;
1020
+ /**
1021
+ * Indicates when to mark a conversation as degraded i.e. when not all its members have a X509.
1022
+ * Credential generated by Wire's end-to-end identity enrollment
1023
+ *
1024
+ * @param conversationId The group's ID
1025
+ * @returns true if all the members have valid X509 credentials
1026
+ */
1027
+ e2eiIsDegraded(conversationId: ConversationId): Promise<boolean>;
1030
1028
  /**
1031
1029
  * Returns the current version of {@link CoreCrypto}
1032
1030
  *
@@ -1136,7 +1134,6 @@ export declare class WireE2eIdentity {
1136
1134
  * Verifies that the previous challenge has been completed.
1137
1135
  *
1138
1136
  * @param orderUrl `location` header from http response you got from {@link newOrderResponse}
1139
- * @param account you found after {@link newAccountResponse}
1140
1137
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/challenge/{challenge-id}`
1141
1138
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1142
1139
  */
@@ -1152,7 +1149,6 @@ export declare class WireE2eIdentity {
1152
1149
  /**
1153
1150
  * Final step before fetching the certificate.
1154
1151
  *
1155
- * @param order - order you got from {@link checkOrderResponse}
1156
1152
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
1157
1153
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1158
1154
  */
@@ -35,14 +35,6 @@ const heap = new Array(128).fill(undefined);
35
35
  heap.push(undefined, null, true, false);
36
36
  function getObject(idx) { return heap[idx]; }
37
37
  let heap_next = heap.length;
38
- function addHeapObject(obj) {
39
- if (heap_next === heap.length)
40
- heap.push(heap.length + 1);
41
- const idx = heap_next;
42
- heap_next = heap[idx];
43
- heap[idx] = obj;
44
- return idx;
45
- }
46
38
  function dropObject(idx) {
47
39
  if (idx < 132)
48
40
  return;
@@ -54,6 +46,14 @@ function takeObject(idx) {
54
46
  dropObject(idx);
55
47
  return ret;
56
48
  }
49
+ function addHeapObject(obj) {
50
+ if (heap_next === heap.length)
51
+ heap.push(heap.length + 1);
52
+ const idx = heap_next;
53
+ heap_next = heap[idx];
54
+ heap[idx] = obj;
55
+ return idx;
56
+ }
57
57
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
58
58
  if (typeof TextDecoder !== 'undefined') {
59
59
  cachedTextDecoder.decode();
@@ -230,12 +230,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
230
230
  return real;
231
231
  }
232
232
  function __wbg_adapter_52(arg0, arg1, arg2) {
233
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb4735603d1460e0b(arg0, arg1, addHeapObject(arg2));
233
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__h66a7206f8c7c0090(arg0, arg1, addHeapObject(arg2));
234
234
  }
235
235
  function __wbg_adapter_55(arg0, arg1, arg2) {
236
236
  try {
237
237
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
238
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hae47a88d8cc19d80(retptr, arg0, arg1, addHeapObject(arg2));
238
+ wasm$1.wasm_bindgen__convert__closures__invoke1_mut__hfd1454cbb6b3bfdc(retptr, arg0, arg1, addHeapObject(arg2));
239
239
  var r0 = getInt32Memory0()[retptr / 4 + 0];
240
240
  var r1 = getInt32Memory0()[retptr / 4 + 1];
241
241
  if (r1) {
@@ -300,7 +300,7 @@ function handleError(f, args) {
300
300
  }
301
301
  }
302
302
  function __wbg_adapter_288(arg0, arg1, arg2, arg3) {
303
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h29314eb9a720dde0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
303
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h6061d6c1e1d69fb6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
304
304
  }
305
305
  /**
306
306
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -563,11 +563,11 @@ class CommitBundle {
563
563
  return takeObject(ret);
564
564
  }
565
565
  /**
566
- * @returns {PublicGroupStateBundle}
566
+ * @returns {GroupInfoBundle}
567
567
  */
568
- get public_group_state() {
569
- const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
570
- return PublicGroupStateBundle.__wrap(ret);
568
+ get group_info() {
569
+ const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
570
+ return GroupInfoBundle.__wrap(ret);
571
571
  }
572
572
  }
573
573
  /**
@@ -629,11 +629,11 @@ class ConversationInitBundle {
629
629
  return takeObject(ret);
630
630
  }
631
631
  /**
632
- * @returns {PublicGroupStateBundle}
632
+ * @returns {GroupInfoBundle}
633
633
  */
634
- get public_group_state() {
635
- const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
636
- return PublicGroupStateBundle.__wrap(ret);
634
+ get group_info() {
635
+ const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
636
+ return GroupInfoBundle.__wrap(ret);
637
637
  }
638
638
  }
639
639
  /**
@@ -712,6 +712,19 @@ let CoreCrypto$1 = class CoreCrypto {
712
712
  return takeObject(ret);
713
713
  }
714
714
  /**
715
+ * Returns [`WasmCryptoResult<bool>`]
716
+ *
717
+ * see [core_crypto::mls::MlsCentral::e2ei_is_degraded]
718
+ * @param {Uint8Array} conversation_id
719
+ * @returns {Promise<any>}
720
+ */
721
+ e2ei_is_degraded(conversation_id) {
722
+ const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
723
+ const len0 = WASM_VECTOR_LEN;
724
+ const ret = wasm$1.corecrypto_e2ei_is_degraded(this.__wbg_ptr, ptr0, len0);
725
+ return takeObject(ret);
726
+ }
727
+ /**
715
728
  * Returns the current version of CoreCrypto
716
729
  * @returns {string}
717
730
  */
@@ -1138,44 +1151,27 @@ let CoreCrypto$1 = class CoreCrypto {
1138
1151
  /**
1139
1152
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1140
1153
  *
1141
- * see [core_crypto::mls::MlsCentral::new_external_remove_proposal]
1154
+ * see [core_crypto::mls::MlsCentral::export_group_info]
1142
1155
  * @param {Uint8Array} conversation_id
1143
- * @param {number} epoch
1144
- * @param {Uint8Array} keypackage_ref
1145
1156
  * @returns {Promise<any>}
1146
1157
  */
1147
- new_external_remove_proposal(conversation_id, epoch, keypackage_ref) {
1158
+ export_group_info(conversation_id) {
1148
1159
  const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1149
1160
  const len0 = WASM_VECTOR_LEN;
1150
- const ptr1 = passArray8ToWasm0(keypackage_ref, wasm$1.__wbindgen_malloc);
1151
- const len1 = WASM_VECTOR_LEN;
1152
- const ret = wasm$1.corecrypto_new_external_remove_proposal(this.__wbg_ptr, ptr0, len0, epoch, ptr1, len1);
1153
- return takeObject(ret);
1154
- }
1155
- /**
1156
- * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1157
- *
1158
- * see [core_crypto::mls::MlsCentral::export_public_group_state]
1159
- * @param {Uint8Array} conversation_id
1160
- * @returns {Promise<any>}
1161
- */
1162
- export_group_state(conversation_id) {
1163
- const ptr0 = passArray8ToWasm0(conversation_id, wasm$1.__wbindgen_malloc);
1164
- const len0 = WASM_VECTOR_LEN;
1165
- const ret = wasm$1.corecrypto_export_group_state(this.__wbg_ptr, ptr0, len0);
1161
+ const ret = wasm$1.corecrypto_export_group_info(this.__wbg_ptr, ptr0, len0);
1166
1162
  return takeObject(ret);
1167
1163
  }
1168
1164
  /**
1169
1165
  * Returns: [`WasmCryptoResult<ConversationInitBundle>`]
1170
1166
  *
1171
1167
  * see [core_crypto::mls::MlsCentral::join_by_external_commit]
1172
- * @param {Uint8Array} public_group_state
1168
+ * @param {Uint8Array} group_info
1173
1169
  * @param {CustomConfiguration} custom_configuration
1174
1170
  * @param {number} credential_type
1175
1171
  * @returns {Promise<any>}
1176
1172
  */
1177
- join_by_external_commit(public_group_state, custom_configuration, credential_type) {
1178
- const ptr0 = passArray8ToWasm0(public_group_state, wasm$1.__wbindgen_malloc);
1173
+ join_by_external_commit(group_info, custom_configuration, credential_type) {
1174
+ const ptr0 = passArray8ToWasm0(group_info, wasm$1.__wbindgen_malloc);
1179
1175
  const len0 = WASM_VECTOR_LEN;
1180
1176
  _assertClass(custom_configuration, CustomConfiguration);
1181
1177
  var ptr1 = custom_configuration.__destroy_into_raw();
@@ -2110,6 +2106,46 @@ class FfiWireE2EIdentity {
2110
2106
  }
2111
2107
  }
2112
2108
  /**
2109
+ */
2110
+ class GroupInfoBundle {
2111
+ static __wrap(ptr) {
2112
+ ptr = ptr >>> 0;
2113
+ const obj = Object.create(GroupInfoBundle.prototype);
2114
+ obj.__wbg_ptr = ptr;
2115
+ return obj;
2116
+ }
2117
+ __destroy_into_raw() {
2118
+ const ptr = this.__wbg_ptr;
2119
+ this.__wbg_ptr = 0;
2120
+ return ptr;
2121
+ }
2122
+ free() {
2123
+ const ptr = this.__destroy_into_raw();
2124
+ wasm$1.__wbg_groupinfobundle_free(ptr);
2125
+ }
2126
+ /**
2127
+ * @returns {number}
2128
+ */
2129
+ get encryption_type() {
2130
+ const ret = wasm$1.groupinfobundle_encryption_type(this.__wbg_ptr);
2131
+ return ret;
2132
+ }
2133
+ /**
2134
+ * @returns {number}
2135
+ */
2136
+ get ratchet_tree_type() {
2137
+ const ret = wasm$1.groupinfobundle_ratchet_tree_type(this.__wbg_ptr);
2138
+ return ret;
2139
+ }
2140
+ /**
2141
+ * @returns {Uint8Array}
2142
+ */
2143
+ get payload() {
2144
+ const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2145
+ return takeObject(ret);
2146
+ }
2147
+ }
2148
+ /**
2113
2149
  * see [core_crypto::prelude::ConversationMember]
2114
2150
  */
2115
2151
  class Invitee {
@@ -2173,11 +2209,11 @@ class MemberAddedMessages {
2173
2209
  /**
2174
2210
  * @param {Uint8Array} welcome
2175
2211
  * @param {Uint8Array} commit
2176
- * @param {PublicGroupStateBundle} public_group_state
2212
+ * @param {GroupInfoBundle} group_info
2177
2213
  */
2178
- constructor(welcome, commit, public_group_state) {
2179
- _assertClass(public_group_state, PublicGroupStateBundle);
2180
- var ptr0 = public_group_state.__destroy_into_raw();
2214
+ constructor(welcome, commit, group_info) {
2215
+ _assertClass(group_info, GroupInfoBundle);
2216
+ var ptr0 = group_info.__destroy_into_raw();
2181
2217
  const ret = wasm$1.memberaddedmessages_new(addHeapObject(welcome), addHeapObject(commit), ptr0);
2182
2218
  return MemberAddedMessages.__wrap(ret);
2183
2219
  }
@@ -2196,11 +2232,11 @@ class MemberAddedMessages {
2196
2232
  return takeObject(ret);
2197
2233
  }
2198
2234
  /**
2199
- * @returns {PublicGroupStateBundle}
2235
+ * @returns {GroupInfoBundle}
2200
2236
  */
2201
- get public_group_state() {
2202
- const ret = wasm$1.commitbundle_public_group_state(this.__wbg_ptr);
2203
- return PublicGroupStateBundle.__wrap(ret);
2237
+ get group_info() {
2238
+ const ret = wasm$1.commitbundle_group_info(this.__wbg_ptr);
2239
+ return GroupInfoBundle.__wrap(ret);
2204
2240
  }
2205
2241
  }
2206
2242
  /**
@@ -2413,46 +2449,6 @@ class ProteusAutoPrekeyBundle {
2413
2449
  }
2414
2450
  }
2415
2451
  /**
2416
- */
2417
- class PublicGroupStateBundle {
2418
- static __wrap(ptr) {
2419
- ptr = ptr >>> 0;
2420
- const obj = Object.create(PublicGroupStateBundle.prototype);
2421
- obj.__wbg_ptr = ptr;
2422
- return obj;
2423
- }
2424
- __destroy_into_raw() {
2425
- const ptr = this.__wbg_ptr;
2426
- this.__wbg_ptr = 0;
2427
- return ptr;
2428
- }
2429
- free() {
2430
- const ptr = this.__destroy_into_raw();
2431
- wasm$1.__wbg_publicgroupstatebundle_free(ptr);
2432
- }
2433
- /**
2434
- * @returns {number}
2435
- */
2436
- get encryption_type() {
2437
- const ret = wasm$1.publicgroupstatebundle_encryption_type(this.__wbg_ptr);
2438
- return ret;
2439
- }
2440
- /**
2441
- * @returns {number}
2442
- */
2443
- get ratchet_tree_type() {
2444
- const ret = wasm$1.publicgroupstatebundle_ratchet_tree_type(this.__wbg_ptr);
2445
- return ret;
2446
- }
2447
- /**
2448
- * @returns {Uint8Array}
2449
- */
2450
- get payload() {
2451
- const ret = wasm$1.acmechallenge_delegate(this.__wbg_ptr);
2452
- return takeObject(ret);
2453
- }
2454
- }
2455
- /**
2456
2452
  * see [core_crypto::prelude::WireIdentity]
2457
2453
  */
2458
2454
  class WireIdentity {
@@ -2601,13 +2597,13 @@ async function __wbg_load(module, imports) {
2601
2597
  function __wbg_get_imports() {
2602
2598
  const imports = {};
2603
2599
  imports.wbg = {};
2600
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2601
+ takeObject(arg0);
2602
+ };
2604
2603
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2605
2604
  const ret = getObject(arg0);
2606
2605
  return addHeapObject(ret);
2607
2606
  };
2608
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2609
- takeObject(arg0);
2610
- };
2611
2607
  imports.wbg.__wbindgen_is_object = function (arg0) {
2612
2608
  const val = getObject(arg0);
2613
2609
  const ret = typeof (val) === 'object' && val !== null;
@@ -2625,6 +2621,12 @@ function __wbg_get_imports() {
2625
2621
  const ret = getObject(arg0) in getObject(arg1);
2626
2622
  return ret;
2627
2623
  };
2624
+ imports.wbg.__wbg_objectStore_6eb812526333c917 = function () {
2625
+ return handleError(function (arg0, arg1, arg2) {
2626
+ const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2627
+ return addHeapObject(ret);
2628
+ }, arguments);
2629
+ };
2628
2630
  imports.wbg.__wbg_objectStoreNames_432a9424fbdfefda = function (arg0) {
2629
2631
  const ret = getObject(arg0).objectStoreNames;
2630
2632
  return addHeapObject(ret);
@@ -2637,6 +2639,12 @@ function __wbg_get_imports() {
2637
2639
  const ret = getStringFromWasm0(arg0, arg1);
2638
2640
  return addHeapObject(ret);
2639
2641
  };
2642
+ imports.wbg.__wbg_get_a9b507527c0f6958 = function () {
2643
+ return handleError(function (arg0, arg1) {
2644
+ const ret = getObject(arg0).get(getObject(arg1));
2645
+ return addHeapObject(ret);
2646
+ }, arguments);
2647
+ };
2640
2648
  imports.wbg.__wbindgen_is_null = function (arg0) {
2641
2649
  const ret = getObject(arg0) === null;
2642
2650
  return ret;
@@ -2653,6 +2661,16 @@ function __wbg_get_imports() {
2653
2661
  const ret = getObject(arg0).length;
2654
2662
  return ret;
2655
2663
  };
2664
+ imports.wbg.__wbg_call_587b30eea3e09332 = function () {
2665
+ return handleError(function (arg0, arg1, arg2) {
2666
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2667
+ return addHeapObject(ret);
2668
+ }, arguments);
2669
+ };
2670
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2671
+ const ret = BigInt.asUintN(64, arg0);
2672
+ return addHeapObject(ret);
2673
+ };
2656
2674
  imports.wbg.__wbg_new_2b55e405e4af4986 = function (arg0, arg1) {
2657
2675
  try {
2658
2676
  var state0 = { a: arg0, b: arg1 };
@@ -2673,16 +2691,14 @@ function __wbg_get_imports() {
2673
2691
  state0.a = state0.b = 0;
2674
2692
  }
2675
2693
  };
2676
- imports.wbg.__wbg_call_587b30eea3e09332 = function () {
2677
- return handleError(function (arg0, arg1, arg2) {
2678
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2679
- return addHeapObject(ret);
2680
- }, arguments);
2681
- };
2682
2694
  imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
2683
2695
  const ret = new Uint8Array(getObject(arg0));
2684
2696
  return addHeapObject(ret);
2685
2697
  };
2698
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2699
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2700
+ return addHeapObject(ret);
2701
+ };
2686
2702
  imports.wbg.__wbg_new_0394642eae39db16 = function () {
2687
2703
  const ret = new Array();
2688
2704
  return addHeapObject(ret);
@@ -2691,20 +2707,22 @@ function __wbg_get_imports() {
2691
2707
  const ret = getObject(arg0).push(getObject(arg1));
2692
2708
  return ret;
2693
2709
  };
2694
- imports.wbg.__wbindgen_number_new = function (arg0) {
2695
- const ret = arg0;
2696
- return addHeapObject(ret);
2697
- };
2698
2710
  imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
2699
2711
  const ret = new Object();
2700
2712
  return addHeapObject(ret);
2701
2713
  };
2702
- imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2703
- const ret = BigInt.asUintN(64, arg0);
2714
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2715
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
2704
2716
  return addHeapObject(ret);
2705
2717
  };
2706
- imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2707
- const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2718
+ imports.wbg.__wbg_set_b4da98d504ac6091 = function (arg0, arg1, arg2) {
2719
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2720
+ };
2721
+ imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2722
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2723
+ };
2724
+ imports.wbg.__wbindgen_number_new = function (arg0) {
2725
+ const ret = arg0;
2708
2726
  return addHeapObject(ret);
2709
2727
  };
2710
2728
  imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function () {
@@ -2715,14 +2733,22 @@ function __wbg_get_imports() {
2715
2733
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2716
2734
  return addHeapObject(ret);
2717
2735
  };
2718
- imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2719
- const ret = FfiWireE2EIdentity.__wrap(arg0);
2720
- return addHeapObject(ret);
2721
- };
2722
2736
  imports.wbg.__wbg_new_87297f22973157c8 = function (arg0, arg1) {
2723
2737
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2724
2738
  return addHeapObject(ret);
2725
2739
  };
2740
+ imports.wbg.__wbg_openCursor_63250aa904924858 = function () {
2741
+ return handleError(function (arg0, arg1) {
2742
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2743
+ return addHeapObject(ret);
2744
+ }, arguments);
2745
+ };
2746
+ imports.wbg.__wbg_openCursor_2da32f6b7767a8f6 = function () {
2747
+ return handleError(function (arg0) {
2748
+ const ret = getObject(arg0).openCursor();
2749
+ return addHeapObject(ret);
2750
+ }, arguments);
2751
+ };
2726
2752
  imports.wbg.__wbg_setonsuccess_d668ac71ae816a35 = function (arg0, arg1) {
2727
2753
  getObject(arg0).onsuccess = getObject(arg1);
2728
2754
  };
@@ -2783,9 +2809,6 @@ function __wbg_get_imports() {
2783
2809
  const ret = CoreCrypto$1.__wrap(arg0);
2784
2810
  return addHeapObject(ret);
2785
2811
  };
2786
- imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2787
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2788
- };
2789
2812
  imports.wbg.__wbg_instanceof_Promise_4b9b76dc9c35f96e = function (arg0) {
2790
2813
  let result;
2791
2814
  try {
@@ -2834,9 +2857,6 @@ function __wbg_get_imports() {
2834
2857
  const ret = Promise.reject(getObject(arg0));
2835
2858
  return addHeapObject(ret);
2836
2859
  };
2837
- imports.wbg.__wbg_set_b4da98d504ac6091 = function (arg0, arg1, arg2) {
2838
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2839
- };
2840
2860
  imports.wbg.__wbg_proposalbundle_new = function (arg0) {
2841
2861
  const ret = ProposalBundle.__wrap(arg0);
2842
2862
  return addHeapObject(ret);
@@ -2938,12 +2958,6 @@ function __wbg_get_imports() {
2938
2958
  return addHeapObject(ret);
2939
2959
  }, arguments);
2940
2960
  };
2941
- imports.wbg.__wbg_openCursor_9f2ba6afb4885925 = function () {
2942
- return handleError(function (arg0, arg1) {
2943
- const ret = getObject(arg0).openCursor(getObject(arg1));
2944
- return addHeapObject(ret);
2945
- }, arguments);
2946
- };
2947
2961
  imports.wbg.__wbindgen_memory = function () {
2948
2962
  const ret = wasm$1.memory;
2949
2963
  return addHeapObject(ret);
@@ -2956,7 +2970,7 @@ function __wbg_get_imports() {
2956
2970
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2957
2971
  return addHeapObject(ret);
2958
2972
  };
2959
- imports.wbg.__wbg_randomFillSync_e950366c42764a07 = function () {
2973
+ imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function () {
2960
2974
  return handleError(function (arg0, arg1) {
2961
2975
  getObject(arg0).randomFillSync(takeObject(arg1));
2962
2976
  }, arguments);
@@ -2965,24 +2979,24 @@ function __wbg_get_imports() {
2965
2979
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2966
2980
  return addHeapObject(ret);
2967
2981
  };
2968
- imports.wbg.__wbg_getRandomValues_3774744e221a22ad = function () {
2982
+ imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function () {
2969
2983
  return handleError(function (arg0, arg1) {
2970
2984
  getObject(arg0).getRandomValues(getObject(arg1));
2971
2985
  }, arguments);
2972
2986
  };
2973
- imports.wbg.__wbg_crypto_70a96de3b6b73dac = function (arg0) {
2987
+ imports.wbg.__wbg_crypto_c48a774b022d20ac = function (arg0) {
2974
2988
  const ret = getObject(arg0).crypto;
2975
2989
  return addHeapObject(ret);
2976
2990
  };
2977
- imports.wbg.__wbg_process_dd1577445152112e = function (arg0) {
2991
+ imports.wbg.__wbg_process_298734cf255a885d = function (arg0) {
2978
2992
  const ret = getObject(arg0).process;
2979
2993
  return addHeapObject(ret);
2980
2994
  };
2981
- imports.wbg.__wbg_versions_58036bec3add9e6f = function (arg0) {
2995
+ imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function (arg0) {
2982
2996
  const ret = getObject(arg0).versions;
2983
2997
  return addHeapObject(ret);
2984
2998
  };
2985
- imports.wbg.__wbg_node_6a9d28205ed5b0d8 = function (arg0) {
2999
+ imports.wbg.__wbg_node_1cd7a5d853dbea79 = function (arg0) {
2986
3000
  const ret = getObject(arg0).node;
2987
3001
  return addHeapObject(ret);
2988
3002
  };
@@ -2990,7 +3004,7 @@ function __wbg_get_imports() {
2990
3004
  const ret = typeof (getObject(arg0)) === 'string';
2991
3005
  return ret;
2992
3006
  };
2993
- imports.wbg.__wbg_require_f05d779769764e82 = function () {
3007
+ imports.wbg.__wbg_require_8f08ceecec0f4fee = function () {
2994
3008
  return handleError(function () {
2995
3009
  const ret = module.require;
2996
3010
  return addHeapObject(ret);
@@ -3000,7 +3014,7 @@ function __wbg_get_imports() {
3000
3014
  const ret = typeof (getObject(arg0)) === 'function';
3001
3015
  return ret;
3002
3016
  };
3003
- imports.wbg.__wbg_msCrypto_adbc770ec9eca9c7 = function (arg0) {
3017
+ imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function (arg0) {
3004
3018
  const ret = getObject(arg0).msCrypto;
3005
3019
  return addHeapObject(ret);
3006
3020
  };
@@ -3249,54 +3263,18 @@ function __wbg_get_imports() {
3249
3263
  return addHeapObject(ret);
3250
3264
  }, arguments);
3251
3265
  };
3252
- imports.wbg.__wbg_openCursor_5d4f2d7a9e60117c = function () {
3253
- return handleError(function (arg0) {
3254
- const ret = getObject(arg0).openCursor();
3255
- return addHeapObject(ret);
3256
- }, arguments);
3257
- };
3258
- imports.wbg.__wbg_openCursor_88c75b521e6a6818 = function () {
3259
- return handleError(function (arg0, arg1, arg2) {
3260
- const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
3261
- return addHeapObject(ret);
3262
- }, arguments);
3263
- };
3264
- imports.wbg.__wbg_get_a9b507527c0f6958 = function () {
3265
- return handleError(function (arg0, arg1) {
3266
- const ret = getObject(arg0).get(getObject(arg1));
3267
- return addHeapObject(ret);
3268
- }, arguments);
3269
- };
3270
- imports.wbg.__wbg_openCursor_2da32f6b7767a8f6 = function () {
3271
- return handleError(function (arg0) {
3272
- const ret = getObject(arg0).openCursor();
3273
- return addHeapObject(ret);
3274
- }, arguments);
3275
- };
3276
- imports.wbg.__wbg_openCursor_63250aa904924858 = function () {
3277
- return handleError(function (arg0, arg1) {
3278
- const ret = getObject(arg0).openCursor(getObject(arg1));
3279
- return addHeapObject(ret);
3280
- }, arguments);
3281
- };
3282
3266
  imports.wbg.__wbg_openCursor_4a2cac5b1c5cf36b = function () {
3283
3267
  return handleError(function (arg0, arg1, arg2) {
3284
3268
  const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
3285
3269
  return addHeapObject(ret);
3286
3270
  }, arguments);
3287
3271
  };
3288
- imports.wbg.__wbg_objectStore_6eb812526333c917 = function () {
3289
- return handleError(function (arg0, arg1, arg2) {
3290
- const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
3291
- return addHeapObject(ret);
3292
- }, arguments);
3293
- };
3294
- imports.wbg.__wbindgen_closure_wrapper1634 = function (arg0, arg1, arg2) {
3295
- const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_52);
3272
+ imports.wbg.__wbindgen_closure_wrapper1899 = function (arg0, arg1, arg2) {
3273
+ const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_52);
3296
3274
  return addHeapObject(ret);
3297
3275
  };
3298
- imports.wbg.__wbindgen_closure_wrapper4776 = function (arg0, arg1, arg2) {
3299
- const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_55);
3276
+ imports.wbg.__wbindgen_closure_wrapper4477 = function (arg0, arg1, arg2) {
3277
+ const ret = makeMutClosure(arg0, arg1, 158, __wbg_adapter_55);
3300
3278
  return addHeapObject(ret);
3301
3279
  };
3302
3280
  return imports;
@@ -3347,13 +3325,13 @@ var exports = /*#__PURE__*/Object.freeze({
3347
3325
  CustomConfiguration: CustomConfiguration,
3348
3326
  DecryptedMessage: DecryptedMessage,
3349
3327
  FfiWireE2EIdentity: FfiWireE2EIdentity,
3328
+ GroupInfoBundle: GroupInfoBundle,
3350
3329
  Invitee: Invitee,
3351
3330
  MemberAddedMessages: MemberAddedMessages,
3352
3331
  NewAcmeAuthz: NewAcmeAuthz,
3353
3332
  NewAcmeOrder: NewAcmeOrder,
3354
3333
  ProposalBundle: ProposalBundle,
3355
3334
  ProteusAutoPrekeyBundle: ProteusAutoPrekeyBundle,
3356
- PublicGroupStateBundle: PublicGroupStateBundle,
3357
3335
  WireIdentity: WireIdentity,
3358
3336
  WirePolicy: WirePolicy$1,
3359
3337
  default: __wbg_init,
@@ -3363,7 +3341,7 @@ var exports = /*#__PURE__*/Object.freeze({
3363
3341
  var wasm = async (opt = {}) => {
3364
3342
  let {importHook, serverPath} = opt;
3365
3343
 
3366
- let path = "assets/core_crypto_ffi-3ec195cb.wasm";
3344
+ let path = "assets/core_crypto_ffi-8052e3ff.wasm";
3367
3345
 
3368
3346
  if (serverPath != null) {
3369
3347
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -3498,28 +3476,28 @@ var WirePolicy;
3498
3476
  WirePolicy[WirePolicy["Ciphertext"] = 2] = "Ciphertext";
3499
3477
  })(WirePolicy || (WirePolicy = {}));
3500
3478
  /**
3501
- * Informs whether the PublicGroupState is confidential
3502
- * see [core_crypto::mls::conversation::public_group_state::PublicGroupStateEncryptionType]
3479
+ * Informs whether the GroupInfo is confidential
3480
+ * see [core_crypto::mls::conversation::group_info::GroupInfoEncryptionType]
3503
3481
  */
3504
- var PublicGroupStateEncryptionType;
3505
- (function (PublicGroupStateEncryptionType) {
3482
+ var GroupInfoEncryptionType;
3483
+ (function (GroupInfoEncryptionType) {
3506
3484
  /**
3507
3485
  * Unencrypted
3508
3486
  */
3509
- PublicGroupStateEncryptionType[PublicGroupStateEncryptionType["Plaintext"] = 1] = "Plaintext";
3487
+ GroupInfoEncryptionType[GroupInfoEncryptionType["Plaintext"] = 1] = "Plaintext";
3510
3488
  /**
3511
3489
  * Encrypted in a JWE (not yet implemented)
3512
3490
  */
3513
- PublicGroupStateEncryptionType[PublicGroupStateEncryptionType["JweEncrypted"] = 2] = "JweEncrypted";
3514
- })(PublicGroupStateEncryptionType || (PublicGroupStateEncryptionType = {}));
3491
+ GroupInfoEncryptionType[GroupInfoEncryptionType["JweEncrypted"] = 2] = "JweEncrypted";
3492
+ })(GroupInfoEncryptionType || (GroupInfoEncryptionType = {}));
3515
3493
  /**
3516
3494
  * Represents different ways of carrying the Ratchet Tree with some optimizations to save some space
3517
- * see [core_crypto::mls::conversation::public_group_state::RatchetTreeType]
3495
+ * see [core_crypto::mls::conversation::group_info::RatchetTreeType]
3518
3496
  */
3519
3497
  var RatchetTreeType;
3520
3498
  (function (RatchetTreeType) {
3521
3499
  /**
3522
- * Complete PublicGroupState
3500
+ * Complete GroupInfo
3523
3501
  */
3524
3502
  RatchetTreeType[RatchetTreeType["Full"] = 1] = "Full";
3525
3503
  /**
@@ -3558,10 +3536,6 @@ var ExternalProposalType;
3558
3536
  * This allows to propose the addition of other clients to the MLS group/conversation
3559
3537
  */
3560
3538
  ExternalProposalType[ExternalProposalType["Add"] = 0] = "Add";
3561
- /**
3562
- * This allows to propose the removal of clients from the MLS group/conversation
3563
- */
3564
- ExternalProposalType[ExternalProposalType["Remove"] = 1] = "Remove";
3565
3539
  })(ExternalProposalType || (ExternalProposalType = {}));
3566
3540
  /**
3567
3541
  * Wrapper for the WASM-compiled version of CoreCrypto
@@ -3882,14 +3856,14 @@ class CoreCrypto {
3882
3856
  const ffiClients = clients.map((invitee) => new (__classPrivateFieldGet(CoreCrypto, _a, "f", _CoreCrypto_module).Invitee)(invitee.id, invitee.kp));
3883
3857
  const ffiRet = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").add_clients_to_conversation(conversationId, ffiClients));
3884
3858
  ffiClients.forEach(c => c.free());
3885
- const pgs = ffiRet.public_group_state;
3859
+ const gi = ffiRet.group_info;
3886
3860
  const ret = {
3887
3861
  welcome: ffiRet.welcome,
3888
3862
  commit: ffiRet.commit,
3889
- publicGroupState: {
3890
- encryptionType: pgs.encryption_type,
3891
- ratchetTreeType: pgs.ratchet_tree_type,
3892
- payload: pgs.payload
3863
+ groupInfo: {
3864
+ encryptionType: gi.encryption_type,
3865
+ ratchetTreeType: gi.ratchet_tree_type,
3866
+ payload: gi.payload
3893
3867
  },
3894
3868
  };
3895
3869
  return ret;
@@ -3914,14 +3888,14 @@ class CoreCrypto {
3914
3888
  async removeClientsFromConversation(conversationId, clientIds) {
3915
3889
  try {
3916
3890
  const ffiRet = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").remove_clients_from_conversation(conversationId, clientIds));
3917
- const pgs = ffiRet.public_group_state;
3891
+ const gi = ffiRet.group_info;
3918
3892
  const ret = {
3919
3893
  welcome: ffiRet.welcome,
3920
3894
  commit: ffiRet.commit,
3921
- publicGroupState: {
3922
- encryptionType: pgs.encryption_type,
3923
- ratchetTreeType: pgs.ratchet_tree_type,
3924
- payload: pgs.payload
3895
+ groupInfo: {
3896
+ encryptionType: gi.encryption_type,
3897
+ ratchetTreeType: gi.ratchet_tree_type,
3898
+ payload: gi.payload
3925
3899
  },
3926
3900
  };
3927
3901
  return ret;
@@ -3944,14 +3918,14 @@ class CoreCrypto {
3944
3918
  async updateKeyingMaterial(conversationId) {
3945
3919
  try {
3946
3920
  const ffiRet = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").update_keying_material(conversationId));
3947
- const pgs = ffiRet.public_group_state;
3921
+ const gi = ffiRet.group_info;
3948
3922
  const ret = {
3949
3923
  welcome: ffiRet.welcome,
3950
3924
  commit: ffiRet.commit,
3951
- publicGroupState: {
3952
- encryptionType: pgs.encryption_type,
3953
- ratchetTreeType: pgs.ratchet_tree_type,
3954
- payload: pgs.payload
3925
+ groupInfo: {
3926
+ encryptionType: gi.encryption_type,
3927
+ ratchetTreeType: gi.ratchet_tree_type,
3928
+ payload: gi.payload
3955
3929
  },
3956
3930
  };
3957
3931
  return ret;
@@ -3977,14 +3951,14 @@ class CoreCrypto {
3977
3951
  if (!ffiCommitBundle) {
3978
3952
  return undefined;
3979
3953
  }
3980
- const pgs = ffiCommitBundle.public_group_state;
3954
+ const gi = ffiCommitBundle.group_info;
3981
3955
  return {
3982
3956
  welcome: ffiCommitBundle.welcome,
3983
3957
  commit: ffiCommitBundle.commit,
3984
- publicGroupState: {
3985
- encryptionType: pgs.encryption_type,
3986
- ratchetTreeType: pgs.ratchet_tree_type,
3987
- payload: pgs.payload
3958
+ groupInfo: {
3959
+ encryptionType: gi.encryption_type,
3960
+ ratchetTreeType: gi.ratchet_tree_type,
3961
+ payload: gi.payload
3988
3962
  },
3989
3963
  };
3990
3964
  }
@@ -4027,27 +4001,21 @@ class CoreCrypto {
4027
4001
  let addArgs = args;
4028
4002
  return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_external_add_proposal(args.conversationId, args.epoch, addArgs.ciphersuite, addArgs.credentialType));
4029
4003
  }
4030
- case ExternalProposalType.Remove: {
4031
- if (!args.keyPackageRef) {
4032
- throw new Error("keyPackageRef is not contained in the external proposal arguments");
4033
- }
4034
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_external_remove_proposal(args.conversationId, args.epoch, args.keyPackageRef));
4035
- }
4036
4004
  default:
4037
4005
  throw new Error("Invalid external proposal type!");
4038
4006
  }
4039
4007
  }
4040
4008
  /**
4041
- * Exports public group state for use in external commits
4009
+ * Exports GroupInfo for use in external commits
4042
4010
  *
4043
4011
  * @param conversationId - MLS Conversation ID
4044
- * @returns TLS-serialized MLS public group state
4012
+ * @returns TLS-serialized MLS GroupInfo
4045
4013
  */
4046
- async exportGroupState(conversationId) {
4047
- return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").export_group_state(conversationId));
4014
+ async exportGroupInfo(conversationId) {
4015
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").export_group_info(conversationId));
4048
4016
  }
4049
4017
  /**
4050
- * Allows to create an external commit to "apply" to join a group through its public group state.
4018
+ * Allows to create an external commit to "apply" to join a group through its GroupInfo.
4051
4019
  *
4052
4020
  * If the Delivery Service accepts the external commit, you have to {@link CoreCrypto.mergePendingGroupFromExternalCommit}
4053
4021
  * in order to get back a functional MLS group. On the opposite, if it rejects it, you can either retry by just
@@ -4056,26 +4024,26 @@ class CoreCrypto {
4056
4024
  * {@link CoreCrypto.clearPendingGroupFromExternalCommit} in order not to bloat the user's storage but nothing
4057
4025
  * bad can happen if you forget to except some storage space wasted.
4058
4026
  *
4059
- * @param publicGroupState - a TLS encoded PublicGroupState fetched from the Delivery Service
4027
+ * @param groupInfo - a TLS encoded GroupInfo fetched from the Delivery Service
4060
4028
  * @param credentialType - kind of Credential to use for joining this group. If {@link CredentialType.Basic} is
4061
4029
  * chosen and no Credential has been created yet for it, a new one will be generated.
4062
4030
  * @param configuration - configuration of the MLS group
4063
4031
  * When {@link CredentialType.X509} is chosen, it fails when no Credential has been created for the given {@link Ciphersuite}.
4064
4032
  * @returns see {@link ConversationInitBundle}
4065
4033
  */
4066
- async joinByExternalCommit(publicGroupState, credentialType, configuration = {}) {
4034
+ async joinByExternalCommit(groupInfo, credentialType, configuration = {}) {
4067
4035
  try {
4068
4036
  const { keyRotationSpan, wirePolicy } = configuration || {};
4069
4037
  const config = new (__classPrivateFieldGet(CoreCrypto, _a, "f", _CoreCrypto_module).CustomConfiguration)(keyRotationSpan, wirePolicy);
4070
- const ffiInitMessage = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").join_by_external_commit(publicGroupState, config, credentialType));
4071
- const pgs = ffiInitMessage.public_group_state;
4038
+ const ffiInitMessage = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").join_by_external_commit(groupInfo, config, credentialType));
4039
+ const gi = ffiInitMessage.group_info;
4072
4040
  const ret = {
4073
4041
  conversationId: ffiInitMessage.conversation_id,
4074
4042
  commit: ffiInitMessage.commit,
4075
- publicGroupState: {
4076
- encryptionType: pgs.encryption_type,
4077
- ratchetTreeType: pgs.ratchet_tree_type,
4078
- payload: pgs.payload
4043
+ groupInfo: {
4044
+ encryptionType: gi.encryption_type,
4045
+ ratchetTreeType: gi.ratchet_tree_type,
4046
+ payload: gi.payload
4079
4047
  },
4080
4048
  };
4081
4049
  return ret;
@@ -4401,6 +4369,16 @@ class CoreCrypto {
4401
4369
  const e2ei = await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_enrollment_stash_pop(handle));
4402
4370
  return new WireE2eIdentity(e2ei);
4403
4371
  }
4372
+ /**
4373
+ * Indicates when to mark a conversation as degraded i.e. when not all its members have a X509.
4374
+ * Credential generated by Wire's end-to-end identity enrollment
4375
+ *
4376
+ * @param conversationId The group's ID
4377
+ * @returns true if all the members have valid X509 credentials
4378
+ */
4379
+ async e2eiIsDegraded(conversationId) {
4380
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").e2ei_is_degraded(conversationId));
4381
+ }
4404
4382
  /**
4405
4383
  * Returns the current version of {@link CoreCrypto}
4406
4384
  *
@@ -4603,7 +4581,6 @@ class WireE2eIdentity {
4603
4581
  * Verifies that the previous challenge has been completed.
4604
4582
  *
4605
4583
  * @param orderUrl `location` header from http response you got from {@link newOrderResponse}
4606
- * @param account you found after {@link newAccountResponse}
4607
4584
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/challenge/{challenge-id}`
4608
4585
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4609
4586
  */
@@ -4633,7 +4610,6 @@ class WireE2eIdentity {
4633
4610
  /**
4634
4611
  * Final step before fetching the certificate.
4635
4612
  *
4636
- * @param order - order you got from {@link checkOrderResponse}
4637
4613
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
4638
4614
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4639
4615
  */
@@ -4677,4 +4653,4 @@ class WireE2eIdentity {
4677
4653
  }
4678
4654
  _WireE2eIdentity_e2ei = new WeakMap();
4679
4655
 
4680
- export { Ciphersuite, CoreCrypto, CoreCryptoError, CredentialType, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WireE2eIdentity, WirePolicy };
4656
+ export { Ciphersuite, CoreCrypto, CoreCryptoError, CredentialType, ExternalProposalType, GroupInfoEncryptionType, ProposalType, RatchetTreeType, WireE2eIdentity, WirePolicy };