@wireapp/core-crypto 0.6.2 → 0.7.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "0.6.2",
3
+ "version": "0.7.0-rc.2",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -108,6 +108,23 @@ export type ClientId = Uint8Array;
108
108
  * Alias for proposal reference. It is a byte array of size 16.
109
109
  */
110
110
  export type ProposalRef = Uint8Array;
111
+ /**
112
+ * Data shape for proteusNewPrekeyAuto() call returns.
113
+ */
114
+ export interface ProteusAutoPrekeyBundle {
115
+ /**
116
+ * Proteus PreKey id
117
+ *
118
+ * @readonly
119
+ */
120
+ id: number;
121
+ /**
122
+ * CBOR-serialized Proteus PreKeyBundle
123
+ *
124
+ * @readonly
125
+ */
126
+ pkb: Uint8Array;
127
+ }
111
128
  /**
112
129
  * Data shape for the returned MLS commit & welcome message tuple upon adding clients to a conversation
113
130
  */
@@ -429,7 +446,7 @@ export interface CoreCryptoCallbacks {
429
446
  * @param clientId - id of a client
430
447
  * @param existingClients - all the clients currently within the MLS group
431
448
  */
432
- clientIsExistingGroupUser: (conversationId: Uint8Array, clientId: Uint8Array, existingClients: Uint8Array[]) => Promise<boolean>;
449
+ clientIsExistingGroupUser: (conversationId: Uint8Array, clientId: Uint8Array, existingClients: Uint8Array[], parent_conversation_clients?: Uint8Array[]) => Promise<boolean>;
433
450
  }
434
451
  /**
435
452
  * Wrapper for the WASM-compiled version of CoreCrypto
@@ -502,6 +519,13 @@ export declare class CoreCrypto {
502
519
  mlsInitWithClientId(clientId: ClientId, signaturePublicKey: Uint8Array): Promise<void>;
503
520
  /** @hidden */
504
521
  private constructor();
522
+ /**
523
+ * If this returns > 1 you **cannot** call {@link CoreCrypto.wipe} or {@link CoreCrypto.close} as they will produce an error because of the
524
+ * outstanding references that were detected.
525
+ *
526
+ * @returns the count of strong refs for this CoreCrypto instance
527
+ */
528
+ strongRefCount(): number;
505
529
  /**
506
530
  * Wipes the {@link CoreCrypto} backing storage (i.e. {@link https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API | IndexedDB} database)
507
531
  *
@@ -537,6 +561,14 @@ export declare class CoreCrypto {
537
561
  * ```
538
562
  */
539
563
  conversationExists(conversationId: ConversationId): Promise<boolean>;
564
+ /**
565
+ * Marks a conversation as child of another one
566
+ * This will mostly affect the behavior of the callbacks (the parentConversationClients parameter will be filled)
567
+ *
568
+ * @param childId - conversation identifier of the child conversation
569
+ * @param parentId - conversation identifier of the parent conversation
570
+ */
571
+ markConversationAsChildOf(childId: ConversationId, parentId: ConversationId): Promise<void>;
540
572
  /**
541
573
  * Returns the current epoch of a conversation
542
574
  *
@@ -847,9 +879,9 @@ export declare class CoreCrypto {
847
879
  /**
848
880
  * Creates a new prekey with an automatically generated ID..
849
881
  *
850
- * @returns A CBOR-serialized version of the PreKeyBundle corresponding to the newly generated and stored PreKey
882
+ * @returns A CBOR-serialized version of the PreKeyBundle corresponding to the newly generated and stored PreKey accompanied by its ID
851
883
  */
852
- proteusNewPrekeyAuto(): Promise<Uint8Array>;
884
+ proteusNewPrekeyAuto(): Promise<ProteusAutoPrekeyBundle>;
853
885
  /**
854
886
  * Proteus last resort prekey stuff
855
887
  *
@@ -906,6 +938,7 @@ export declare class CoreCrypto {
906
938
  * keying material.
907
939
  *
908
940
  * @param ciphersuite - For generating signing key material. Only {@link Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519} is supported currently
941
+ * @returns The new {@link WireE2eIdentity} object
909
942
  */
910
943
  newAcmeEnrollment(ciphersuite?: Ciphersuite): Promise<WireE2eIdentity>;
911
944
  /**
@@ -951,16 +984,15 @@ export declare class WireE2eIdentity {
951
984
  * Creates a new acme order for the handle (userId + display name) and the clientId.
952
985
  *
953
986
  * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
954
- * @param domain DNS name of owning backend e.g. `example.com`
955
- * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `impp:wireapp=NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ/6add501bacd1d90e@example.com`
956
- * @param handle user handle e.g. `impp:wireapp=alice.smith.qa@example.com`
987
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
988
+ * @param handle user handle e.g. `alice.smith.qa@example.com`
957
989
  * @param expiryDays generated x509 certificate expiry
958
990
  * @param directory you got from {@link directoryResponse}
959
991
  * @param account you got from {@link newAccountResponse}
960
992
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
961
993
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
962
994
  */
963
- newOrderRequest(displayName: string, domain: string, clientId: string, handle: string, expiryDays: number, directory: AcmeDirectory, account: AcmeAccount, previousNonce: string): JsonRawData;
995
+ newOrderRequest(displayName: string, clientId: string, handle: string, expiryDays: number, directory: AcmeDirectory, account: AcmeAccount, previousNonce: string): JsonRawData;
964
996
  /**
965
997
  * Parses the response from `POST /acme/{provisioner-name}/new-order`.
966
998
  *
@@ -981,10 +1013,6 @@ export declare class WireE2eIdentity {
981
1013
  /**
982
1014
  * Parses the response from `POST /acme/{provisioner-name}/authz/{authz-id}`
983
1015
  *
984
- * You then have to map the challenge from this authorization object. The `client_id_challenge`
985
- * will be the one with the `client_id_host` (you supplied to {@link newOrderRequest}) identifier,
986
- * the other will be your `handle_challenge`.
987
- *
988
1016
  * @param authz HTTP response body
989
1017
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
990
1018
  */
@@ -998,14 +1026,12 @@ export declare class WireE2eIdentity {
998
1026
  * {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token} on wire-server.
999
1027
  *
1000
1028
  * @param accessTokenUrl backend endpoint where this token will be sent. Should be this one {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token}
1001
- * @param userId an UUIDv4 uniquely identifying the user
1002
- * @param clientId client identifier
1003
- * @param domain owning backend domain e.g. `wire.com`
1004
- * @param clientIdChallenge you found after {@link newAuthzResponse}
1029
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
1030
+ * @param dpopChallenge you found after {@link newAuthzResponse}
1005
1031
  * @param backendNonce you get by calling `GET /clients/token/nonce` on wire-server as defined here {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/get_clients__client__nonce}
1006
1032
  * @param expiryDays token expiry in days
1007
1033
  */
1008
- createDpopToken(accessTokenUrl: string, userId: string, clientId: bigint, domain: string, clientIdChallenge: AcmeChallenge, backendNonce: string, expiryDays: number): string;
1034
+ createDpopToken(accessTokenUrl: string, clientId: string, dpopChallenge: AcmeChallenge, backendNonce: string, expiryDays: number): string;
1009
1035
  /**
1010
1036
  * Creates a new challenge request for Wire Dpop challenge.
1011
1037
  *
@@ -1140,7 +1166,7 @@ export interface NewAcmeAuthz {
1140
1166
  *
1141
1167
  * @readonly
1142
1168
  */
1143
- wireHttpChallenge: AcmeChallenge | null;
1169
+ wireDpopChallenge: AcmeChallenge | null;
1144
1170
  /**
1145
1171
  * Challenge for the userId and displayName
1146
1172
  *
@@ -226,12 +226,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
226
  return real;
227
227
  }
228
228
  function __wbg_adapter_52(arg0, arg1, arg2) {
229
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc1e83b65f289d81(arg0, arg1, addHeapObject(arg2));
229
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h52d25f5c9b3d3ff2(arg0, arg1, addHeapObject(arg2));
230
230
  }
231
231
  function __wbg_adapter_55(arg0, arg1, arg2) {
232
232
  try {
233
233
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
234
- wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7f871b07edcecab4(retptr, arg0, arg1, addHeapObject(arg2));
234
+ wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf21a7c6a12593e32(retptr, arg0, arg1, addHeapObject(arg2));
235
235
  var r0 = getInt32Memory0()[retptr / 4 + 0];
236
236
  var r1 = getInt32Memory0()[retptr / 4 + 1];
237
237
  if (r1) {
@@ -279,6 +279,9 @@ function getArrayJsValueFromWasm0(ptr, len) {
279
279
  }
280
280
  return result;
281
281
  }
282
+ function getArrayU8FromWasm0(ptr, len) {
283
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
284
+ }
282
285
  function handleError(f, args) {
283
286
  try {
284
287
  return f.apply(this, args);
@@ -287,11 +290,8 @@ function handleError(f, args) {
287
290
  wasm$1.__wbindgen_exn_store(addHeapObject(e));
288
291
  }
289
292
  }
290
- function getArrayU8FromWasm0(ptr, len) {
291
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
292
- }
293
- function __wbg_adapter_270(arg0, arg1, arg2, arg3) {
294
- wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h642728bf8a354f9a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
293
+ function __wbg_adapter_282(arg0, arg1, arg2, arg3) {
294
+ wasm$1.wasm_bindgen__convert__closures__invoke2_mut__h48b463a50f27b62f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
295
295
  }
296
296
  /**
297
297
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -659,7 +659,7 @@ let CoreCrypto$1 = class CoreCrypto {
659
659
  }
660
660
  }
661
661
  /**
662
- * see [core_crypto::MlsCentral::try_new]
662
+ * see [core_crypto::mls::MlsCentral::try_new]
663
663
  * @param {string} path
664
664
  * @param {string} key
665
665
  * @param {Uint8Array} client_id
@@ -679,7 +679,7 @@ let CoreCrypto$1 = class CoreCrypto {
679
679
  return takeObject(ret);
680
680
  }
681
681
  /**
682
- * see [core_crypto::MlsCentral::try_new]
682
+ * see [core_crypto::mls::MlsCentral::try_new]
683
683
  * @param {string} path
684
684
  * @param {string} key
685
685
  * @param {Uint8Array | undefined} entropy_seed
@@ -696,7 +696,7 @@ let CoreCrypto$1 = class CoreCrypto {
696
696
  return takeObject(ret);
697
697
  }
698
698
  /**
699
- * see [core_crypto::MlsCentral::mls_init]
699
+ * see [core_crypto::mls::MlsCentral::mls_init]
700
700
  * @param {Uint8Array} client_id
701
701
  * @returns {Promise<Promise<any>>}
702
702
  */
@@ -709,7 +709,7 @@ let CoreCrypto$1 = class CoreCrypto {
709
709
  /**
710
710
  * Returns [`WasmCryptoResult<Vec<u8>>`]
711
711
  *
712
- * See [core_crypto::MlsCentral::mls_generate_keypair]
712
+ * See [core_crypto::mls::MlsCentral::mls_generate_keypair]
713
713
  * @returns {Promise<any>}
714
714
  */
715
715
  mls_generate_keypair() {
@@ -719,7 +719,7 @@ let CoreCrypto$1 = class CoreCrypto {
719
719
  /**
720
720
  * Returns [`WasmCryptoResult<()>`]
721
721
  *
722
- * See [core_crypto::MlsCentral::mls_init_with_client_id]
722
+ * See [core_crypto::mls::MlsCentral::mls_init_with_client_id]
723
723
  * @param {Uint8Array} client_id
724
724
  * @param {Uint8Array} signature_public_key
725
725
  * @returns {Promise<any>}
@@ -733,9 +733,17 @@ let CoreCrypto$1 = class CoreCrypto {
733
733
  return takeObject(ret);
734
734
  }
735
735
  /**
736
+ * Returns the Arc strong ref count
737
+ * @returns {number}
738
+ */
739
+ strong_ref_count() {
740
+ const ret = wasm$1.corecrypto_strong_ref_count(this.ptr);
741
+ return ret >>> 0;
742
+ }
743
+ /**
736
744
  * Returns: [`WasmCryptoResult<()>`]
737
745
  *
738
- * see [core_crypto::MlsCentral::close]
746
+ * see [core_crypto::mls::MlsCentral::close]
739
747
  * @returns {Promise<any>}
740
748
  */
741
749
  close() {
@@ -746,7 +754,7 @@ let CoreCrypto$1 = class CoreCrypto {
746
754
  /**
747
755
  * Returns: [`WasmCryptoResult<()>`]
748
756
  *
749
- * see [core_crypto::MlsCentral::wipe]
757
+ * see [core_crypto::mls::MlsCentral::wipe]
750
758
  * @returns {Promise<any>}
751
759
  */
752
760
  wipe() {
@@ -757,7 +765,7 @@ let CoreCrypto$1 = class CoreCrypto {
757
765
  /**
758
766
  * Returns: [`WasmCryptoResult<()>`]
759
767
  *
760
- * see [core_crypto::MlsCentral::callbacks]
768
+ * see [core_crypto::mls::MlsCentral::callbacks]
761
769
  * @param {CoreCryptoWasmCallbacks} callbacks
762
770
  * @returns {Promise<any>}
763
771
  */
@@ -770,7 +778,7 @@ let CoreCrypto$1 = class CoreCrypto {
770
778
  /**
771
779
  * Returns:: [`WasmCryptoResult<js_sys::Uint8Array>`]
772
780
  *
773
- * see [core_crypto::MlsCentral::client_public_key]
781
+ * see [core_crypto::mls::MlsCentral::client_public_key]
774
782
  * @returns {Promise<any>}
775
783
  */
776
784
  client_public_key() {
@@ -780,7 +788,7 @@ let CoreCrypto$1 = class CoreCrypto {
780
788
  /**
781
789
  * Returns: [`WasmCryptoResult<js_sys::Array<js_sys::Uint8Array>>`]
782
790
  *
783
- * see [core_crypto::MlsCentral::client_keypackages]
791
+ * see [core_crypto::mls::MlsCentral::client_keypackages]
784
792
  * @param {number} amount_requested
785
793
  * @returns {Promise<any>}
786
794
  */
@@ -791,7 +799,7 @@ let CoreCrypto$1 = class CoreCrypto {
791
799
  /**
792
800
  * Returns: [`WasmCryptoResult<usize>`]
793
801
  *
794
- * see [core_crypto::MlsCentral::client_valid_keypackages_count]
802
+ * see [core_crypto::mls::MlsCentral::client_valid_keypackages_count]
795
803
  * @returns {Promise<any>}
796
804
  */
797
805
  client_valid_keypackages_count() {
@@ -801,7 +809,7 @@ let CoreCrypto$1 = class CoreCrypto {
801
809
  /**
802
810
  * Returns: [`WasmCryptoResult<()>`]
803
811
  *
804
- * see [core_crypto::MlsCentral::new_conversation]
812
+ * see [core_crypto::mls::MlsCentral::new_conversation]
805
813
  * @param {Uint8Array} conversation_id
806
814
  * @param {ConversationConfiguration} config
807
815
  * @returns {Promise<any>}
@@ -817,7 +825,7 @@ let CoreCrypto$1 = class CoreCrypto {
817
825
  /**
818
826
  * Returns [`WasmCryptoResult<u64>`]
819
827
  *
820
- * see [core_crypto::MlsCentral::conversation_epoch]
828
+ * see [core_crypto::mls::MlsCentral::conversation_epoch]
821
829
  * @param {Uint8Array} conversation_id
822
830
  * @returns {Promise<any>}
823
831
  */
@@ -830,7 +838,7 @@ let CoreCrypto$1 = class CoreCrypto {
830
838
  /**
831
839
  * Returns: [`bool`]
832
840
  *
833
- * see [core_crypto::MlsCentral::conversation_exists]
841
+ * see [core_crypto::mls::MlsCentral::conversation_exists]
834
842
  * @param {Uint8Array} conversation_id
835
843
  * @returns {Promise<any>}
836
844
  */
@@ -843,7 +851,7 @@ let CoreCrypto$1 = class CoreCrypto {
843
851
  /**
844
852
  * Returns: [`WasmCryptoResult<Uint8Array>`]
845
853
  *
846
- * see [core_crypto::MlsCentral::process_raw_welcome_message]
854
+ * see [core_crypto::mls::MlsCentral::process_raw_welcome_message]
847
855
  * @param {Uint8Array} welcome_message
848
856
  * @param {CustomConfiguration} custom_configuration
849
857
  * @returns {Promise<any>}
@@ -859,7 +867,7 @@ let CoreCrypto$1 = class CoreCrypto {
859
867
  /**
860
868
  * Returns: [`WasmCryptoResult<Option<MemberAddedMessages>>`]
861
869
  *
862
- * see [core_crypto::MlsCentral::add_members_to_conversation]
870
+ * see [core_crypto::mls::MlsCentral::add_members_to_conversation]
863
871
  * @param {Uint8Array} conversation_id
864
872
  * @param {any[]} clients
865
873
  * @returns {Promise<any>}
@@ -875,7 +883,7 @@ let CoreCrypto$1 = class CoreCrypto {
875
883
  /**
876
884
  * Returns: [`WasmCryptoResult<Option<js_sys::Uint8Array>>`]
877
885
  *
878
- * see [core_crypto::MlsCentral::remove_members_from_conversation]
886
+ * see [core_crypto::mls::MlsCentral::remove_members_from_conversation]
879
887
  * @param {Uint8Array} conversation_id
880
888
  * @param {(Uint8Array)[]} clients
881
889
  * @returns {Promise<any>}
@@ -889,9 +897,25 @@ let CoreCrypto$1 = class CoreCrypto {
889
897
  return takeObject(ret);
890
898
  }
891
899
  /**
900
+ * Returns: [`WasmCryptoResult<()>`]
901
+ *
902
+ * see [core_crypto::mls::MlsCentral::mark_conversation_as_child_of]
903
+ * @param {Uint8Array} child_id
904
+ * @param {Uint8Array} parent_id
905
+ * @returns {Promise<any>}
906
+ */
907
+ mark_conversation_as_child_of(child_id, parent_id) {
908
+ const ptr0 = passArray8ToWasm0(child_id, wasm$1.__wbindgen_malloc);
909
+ const len0 = WASM_VECTOR_LEN;
910
+ const ptr1 = passArray8ToWasm0(parent_id, wasm$1.__wbindgen_malloc);
911
+ const len1 = WASM_VECTOR_LEN;
912
+ const ret = wasm$1.corecrypto_mark_conversation_as_child_of(this.ptr, ptr0, len0, ptr1, len1);
913
+ return takeObject(ret);
914
+ }
915
+ /**
892
916
  * Returns: [`WasmCryptoResult<CommitBundle>`]
893
917
  *
894
- * see [core_crypto::MlsCentral::update_keying_material]
918
+ * see [core_crypto::mls::MlsCentral::update_keying_material]
895
919
  * @param {Uint8Array} conversation_id
896
920
  * @returns {Promise<any>}
897
921
  */
@@ -902,7 +926,7 @@ let CoreCrypto$1 = class CoreCrypto {
902
926
  return takeObject(ret);
903
927
  }
904
928
  /**
905
- * see [core_crypto::MlsCentral::commit_pending_proposals]
929
+ * see [core_crypto::mls::MlsCentral::commit_pending_proposals]
906
930
  * @param {Uint8Array} conversation_id
907
931
  * @returns {Promise<any>}
908
932
  */
@@ -915,7 +939,7 @@ let CoreCrypto$1 = class CoreCrypto {
915
939
  /**
916
940
  * Returns: [`WasmCryptoResult<()>`]
917
941
  *
918
- * see [core_crypto::MlsCentral::wipe_conversation]
942
+ * see [core_crypto::mls::MlsCentral::wipe_conversation]
919
943
  * @param {Uint8Array} conversation_id
920
944
  * @returns {Promise<any>}
921
945
  */
@@ -928,7 +952,7 @@ let CoreCrypto$1 = class CoreCrypto {
928
952
  /**
929
953
  * Returns: [`WasmCryptoResult<DecryptedMessage>`]
930
954
  *
931
- * see [core_crypto::MlsCentral::decrypt_message]
955
+ * see [core_crypto::mls::MlsCentral::decrypt_message]
932
956
  * @param {Uint8Array} conversation_id
933
957
  * @param {Uint8Array} payload
934
958
  * @returns {Promise<any>}
@@ -944,7 +968,7 @@ let CoreCrypto$1 = class CoreCrypto {
944
968
  /**
945
969
  * Returns: [`WasmCryptoResult<Uint8Array>`]
946
970
  *
947
- * see [core_crypto::MlsCentral::encrypt_message]
971
+ * see [core_crypto::mls::MlsCentral::encrypt_message]
948
972
  * @param {Uint8Array} conversation_id
949
973
  * @param {Uint8Array} message
950
974
  * @returns {Promise<any>}
@@ -960,7 +984,7 @@ let CoreCrypto$1 = class CoreCrypto {
960
984
  /**
961
985
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
962
986
  *
963
- * see [core_crypto::MlsCentral::new_proposal]
987
+ * see [core_crypto::mls::MlsCentral::new_proposal]
964
988
  * @param {Uint8Array} conversation_id
965
989
  * @param {Uint8Array} keypackage
966
990
  * @returns {Promise<any>}
@@ -976,7 +1000,7 @@ let CoreCrypto$1 = class CoreCrypto {
976
1000
  /**
977
1001
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
978
1002
  *
979
- * see [core_crypto::MlsCentral::new_proposal]
1003
+ * see [core_crypto::mls::MlsCentral::new_proposal]
980
1004
  * @param {Uint8Array} conversation_id
981
1005
  * @returns {Promise<any>}
982
1006
  */
@@ -989,7 +1013,7 @@ let CoreCrypto$1 = class CoreCrypto {
989
1013
  /**
990
1014
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
991
1015
  *
992
- * see [core_crypto::MlsCentral::new_proposal]
1016
+ * see [core_crypto::mls::MlsCentral::new_proposal]
993
1017
  * @param {Uint8Array} conversation_id
994
1018
  * @param {Uint8Array} client_id
995
1019
  * @returns {Promise<any>}
@@ -1005,7 +1029,7 @@ let CoreCrypto$1 = class CoreCrypto {
1005
1029
  /**
1006
1030
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1007
1031
  *
1008
- * see [core_crypto::MlsCentral::new_external_add_proposal]
1032
+ * see [core_crypto::mls::MlsCentral::new_external_add_proposal]
1009
1033
  * @param {Uint8Array} conversation_id
1010
1034
  * @param {number} epoch
1011
1035
  * @returns {Promise<any>}
@@ -1019,7 +1043,7 @@ let CoreCrypto$1 = class CoreCrypto {
1019
1043
  /**
1020
1044
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1021
1045
  *
1022
- * see [core_crypto::MlsCentral::new_external_remove_proposal]
1046
+ * see [core_crypto::mls::MlsCentral::new_external_remove_proposal]
1023
1047
  * @param {Uint8Array} conversation_id
1024
1048
  * @param {number} epoch
1025
1049
  * @param {Uint8Array} keypackage_ref
@@ -1036,7 +1060,7 @@ let CoreCrypto$1 = class CoreCrypto {
1036
1060
  /**
1037
1061
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1038
1062
  *
1039
- * see [core_crypto::MlsCentral::export_public_group_state]
1063
+ * see [core_crypto::mls::MlsCentral::export_public_group_state]
1040
1064
  * @param {Uint8Array} conversation_id
1041
1065
  * @returns {Promise<any>}
1042
1066
  */
@@ -1049,7 +1073,7 @@ let CoreCrypto$1 = class CoreCrypto {
1049
1073
  /**
1050
1074
  * Returns: [`WasmCryptoResult<ConversationInitBundle>`]
1051
1075
  *
1052
- * see [core_crypto::MlsCentral::join_by_external_commit]
1076
+ * see [core_crypto::mls::MlsCentral::join_by_external_commit]
1053
1077
  * @param {Uint8Array} public_group_state
1054
1078
  * @param {CustomConfiguration} custom_configuration
1055
1079
  * @returns {Promise<any>}
@@ -1065,7 +1089,7 @@ let CoreCrypto$1 = class CoreCrypto {
1065
1089
  /**
1066
1090
  * Returns: [`WasmCryptoResult<()>`]
1067
1091
  *
1068
- * see [core_crypto::MlsCentral::merge_pending_group_from_external_commit]
1092
+ * see [core_crypto::mls::MlsCentral::merge_pending_group_from_external_commit]
1069
1093
  * @param {Uint8Array} conversation_id
1070
1094
  * @returns {Promise<any>}
1071
1095
  */
@@ -1078,7 +1102,7 @@ let CoreCrypto$1 = class CoreCrypto {
1078
1102
  /**
1079
1103
  * Returns: [`WasmCryptoResult<()>`]
1080
1104
  *
1081
- * see [core_crypto::MlsCentral::clear_pending_group_from_external_commit]
1105
+ * see [core_crypto::mls::MlsCentral::clear_pending_group_from_external_commit]
1082
1106
  * @param {Uint8Array} conversation_id
1083
1107
  * @returns {Promise<any>}
1084
1108
  */
@@ -1089,7 +1113,7 @@ let CoreCrypto$1 = class CoreCrypto {
1089
1113
  return takeObject(ret);
1090
1114
  }
1091
1115
  /**
1092
- * see [core_crypto::MlsCentral::commit_accepted]
1116
+ * see [core_crypto::mls::MlsCentral::commit_accepted]
1093
1117
  * @param {Uint8Array} conversation_id
1094
1118
  * @returns {Promise<any>}
1095
1119
  */
@@ -1100,7 +1124,7 @@ let CoreCrypto$1 = class CoreCrypto {
1100
1124
  return takeObject(ret);
1101
1125
  }
1102
1126
  /**
1103
- * see [core_crypto::MlsCentral::clear_pending_proposal]
1127
+ * see [core_crypto::mls::MlsCentral::clear_pending_proposal]
1104
1128
  * @param {Uint8Array} conversation_id
1105
1129
  * @param {Uint8Array} proposal_ref
1106
1130
  * @returns {Promise<any>}
@@ -1114,7 +1138,7 @@ let CoreCrypto$1 = class CoreCrypto {
1114
1138
  return takeObject(ret);
1115
1139
  }
1116
1140
  /**
1117
- * see [core_crypto::MlsCentral::clear_pending_commit]
1141
+ * see [core_crypto::mls::MlsCentral::clear_pending_commit]
1118
1142
  * @param {Uint8Array} conversation_id
1119
1143
  * @returns {Promise<any>}
1120
1144
  */
@@ -1127,7 +1151,7 @@ let CoreCrypto$1 = class CoreCrypto {
1127
1151
  /**
1128
1152
  * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
1129
1153
  *
1130
- * see [core_crypto::MlsCentral::random_bytes]
1154
+ * see [core_crypto::mls::MlsCentral::random_bytes]
1131
1155
  * @param {number} len
1132
1156
  * @returns {Promise<any>}
1133
1157
  */
@@ -1291,7 +1315,7 @@ let CoreCrypto$1 = class CoreCrypto {
1291
1315
  return takeObject(ret);
1292
1316
  }
1293
1317
  /**
1294
- * Returns: [`WasmCryptoResult<Uint8Array>`]
1318
+ * Returns: [`WasmCryptoResult<ProteusAutoPrekeyBundle>`]
1295
1319
  *
1296
1320
  * see [core_crypto::proteus::ProteusCentral::new_prekey]
1297
1321
  * @returns {Promise<Promise<any>>}
@@ -1423,7 +1447,7 @@ let CoreCrypto$1 = class CoreCrypto {
1423
1447
  /**
1424
1448
  * Returns: [`WasmCryptoResult<Vec<u8>>`]
1425
1449
  *
1426
- * see [core_crypto::MlsCentral::export_secret_key]
1450
+ * see [core_crypto::mls::MlsCentral::export_secret_key]
1427
1451
  * @param {Uint8Array} conversation_id
1428
1452
  * @param {number} key_length
1429
1453
  * @returns {Promise<any>}
@@ -1437,7 +1461,7 @@ let CoreCrypto$1 = class CoreCrypto {
1437
1461
  /**
1438
1462
  * Returns: [`WasmCryptoResult<Box<[js_sys::Uint8Array]>`]
1439
1463
  *
1440
- * see [core_crypto::MlsCentral::get_client_ids]
1464
+ * see [core_crypto::mls::MlsCentral::get_client_ids]
1441
1465
  * @param {Uint8Array} conversation_id
1442
1466
  * @returns {Promise<any>}
1443
1467
  */
@@ -1448,7 +1472,7 @@ let CoreCrypto$1 = class CoreCrypto {
1448
1472
  return takeObject(ret);
1449
1473
  }
1450
1474
  /**
1451
- * see [core_crypto::MlsCentral::new_acme_enrollment]
1475
+ * see [core_crypto::mls::MlsCentral::new_acme_enrollment]
1452
1476
  * @param {number} ciphersuite
1453
1477
  * @returns {Promise<FfiWireE2EIdentity>}
1454
1478
  */
@@ -1665,7 +1689,6 @@ class FfiWireE2EIdentity {
1665
1689
  /**
1666
1690
  * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
1667
1691
  * @param {string} display_name
1668
- * @param {string} domain
1669
1692
  * @param {string} client_id
1670
1693
  * @param {string} handle
1671
1694
  * @param {number} expiry_days
@@ -1674,20 +1697,18 @@ class FfiWireE2EIdentity {
1674
1697
  * @param {string} previous_nonce
1675
1698
  * @returns {Uint8Array}
1676
1699
  */
1677
- new_order_request(display_name, domain, client_id, handle, expiry_days, directory, account, previous_nonce) {
1700
+ new_order_request(display_name, client_id, handle, expiry_days, directory, account, previous_nonce) {
1678
1701
  try {
1679
1702
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1680
1703
  const ptr0 = passStringToWasm0(display_name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1681
1704
  const len0 = WASM_VECTOR_LEN;
1682
- const ptr1 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1705
+ const ptr1 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1683
1706
  const len1 = WASM_VECTOR_LEN;
1684
- const ptr2 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1707
+ const ptr2 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1685
1708
  const len2 = WASM_VECTOR_LEN;
1686
- const ptr3 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1709
+ const ptr3 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1687
1710
  const len3 = WASM_VECTOR_LEN;
1688
- const ptr4 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1689
- const len4 = WASM_VECTOR_LEN;
1690
- wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_days, addHeapObject(directory), addHeapObject(account), ptr4, len4);
1711
+ wasm$1.ffiwiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_days, addHeapObject(directory), addHeapObject(account), ptr3, len3);
1691
1712
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1692
1713
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1693
1714
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1772,42 +1793,38 @@ class FfiWireE2EIdentity {
1772
1793
  /**
1773
1794
  * See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
1774
1795
  * @param {string} access_token_url
1775
- * @param {string} user_id
1776
- * @param {bigint} client_id
1777
- * @param {string} domain
1778
- * @param {any} client_id_challenge
1796
+ * @param {string} client_id
1797
+ * @param {any} dpop_challenge
1779
1798
  * @param {string} backend_nonce
1780
1799
  * @param {number} expiry_days
1781
1800
  * @returns {string}
1782
1801
  */
1783
- create_dpop_token(access_token_url, user_id, client_id, domain, client_id_challenge, backend_nonce, expiry_days) {
1802
+ create_dpop_token(access_token_url, client_id, dpop_challenge, backend_nonce, expiry_days) {
1784
1803
  try {
1785
1804
  const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
1786
1805
  const ptr0 = passStringToWasm0(access_token_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1787
1806
  const len0 = WASM_VECTOR_LEN;
1788
- const ptr1 = passStringToWasm0(user_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1807
+ const ptr1 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1789
1808
  const len1 = WASM_VECTOR_LEN;
1790
- const ptr2 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1809
+ const ptr2 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1791
1810
  const len2 = WASM_VECTOR_LEN;
1792
- const ptr3 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
1793
- const len3 = WASM_VECTOR_LEN;
1794
- wasm$1.ffiwiree2eidentity_create_dpop_token(retptr, this.ptr, ptr0, len0, ptr1, len1, client_id, ptr2, len2, addHeapObject(client_id_challenge), ptr3, len3, expiry_days);
1811
+ wasm$1.ffiwiree2eidentity_create_dpop_token(retptr, this.ptr, ptr0, len0, ptr1, len1, addHeapObject(dpop_challenge), ptr2, len2, expiry_days);
1795
1812
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1796
1813
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1797
1814
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1798
1815
  var r3 = getInt32Memory0()[retptr / 4 + 3];
1799
- var ptr4 = r0;
1800
- var len4 = r1;
1816
+ var ptr3 = r0;
1817
+ var len3 = r1;
1801
1818
  if (r3) {
1802
- ptr4 = 0;
1803
- len4 = 0;
1819
+ ptr3 = 0;
1820
+ len3 = 0;
1804
1821
  throw takeObject(r2);
1805
1822
  }
1806
- return getStringFromWasm0(ptr4, len4);
1823
+ return getStringFromWasm0(ptr3, len3);
1807
1824
  }
1808
1825
  finally {
1809
1826
  wasm$1.__wbindgen_add_to_stack_pointer(16);
1810
- wasm$1.__wbindgen_free(ptr4, len4);
1827
+ wasm$1.__wbindgen_free(ptr3, len3);
1811
1828
  }
1812
1829
  }
1813
1830
  /**
@@ -2269,6 +2286,62 @@ class ProposalBundle {
2269
2286
  }
2270
2287
  /**
2271
2288
  */
2289
+ class ProteusAutoPrekeyBundle {
2290
+ static __wrap(ptr) {
2291
+ const obj = Object.create(ProteusAutoPrekeyBundle.prototype);
2292
+ obj.ptr = ptr;
2293
+ return obj;
2294
+ }
2295
+ __destroy_into_raw() {
2296
+ const ptr = this.ptr;
2297
+ this.ptr = 0;
2298
+ return ptr;
2299
+ }
2300
+ free() {
2301
+ const ptr = this.__destroy_into_raw();
2302
+ wasm$1.__wbg_proteusautoprekeybundle_free(ptr);
2303
+ }
2304
+ /**
2305
+ * @returns {number}
2306
+ */
2307
+ get id() {
2308
+ const ret = wasm$1.__wbg_get_proteusautoprekeybundle_id(this.ptr);
2309
+ return ret;
2310
+ }
2311
+ /**
2312
+ * @param {number} arg0
2313
+ */
2314
+ set id(arg0) {
2315
+ wasm$1.__wbg_set_proteusautoprekeybundle_id(this.ptr, arg0);
2316
+ }
2317
+ /**
2318
+ * @returns {Uint8Array}
2319
+ */
2320
+ get pkb() {
2321
+ try {
2322
+ const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
2323
+ wasm$1.__wbg_get_proteusautoprekeybundle_pkb(retptr, this.ptr);
2324
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2325
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2326
+ var v0 = getArrayU8FromWasm0(r0, r1).slice();
2327
+ wasm$1.__wbindgen_free(r0, r1 * 1);
2328
+ return v0;
2329
+ }
2330
+ finally {
2331
+ wasm$1.__wbindgen_add_to_stack_pointer(16);
2332
+ }
2333
+ }
2334
+ /**
2335
+ * @param {Uint8Array} arg0
2336
+ */
2337
+ set pkb(arg0) {
2338
+ const ptr0 = passArray8ToWasm0(arg0, wasm$1.__wbindgen_malloc);
2339
+ const len0 = WASM_VECTOR_LEN;
2340
+ wasm$1.__wbg_set_proteusautoprekeybundle_pkb(this.ptr, ptr0, len0);
2341
+ }
2342
+ }
2343
+ /**
2344
+ */
2272
2345
  class PublicGroupStateBundle {
2273
2346
  static __wrap(ptr) {
2274
2347
  const obj = Object.create(PublicGroupStateBundle.prototype);
@@ -2337,27 +2410,9 @@ async function load(module, imports) {
2337
2410
  function getImports() {
2338
2411
  const imports = {};
2339
2412
  imports.wbg = {};
2340
- imports.wbg.__wbg_new_f9876326328f45ed = function () {
2341
- const ret = new Object();
2342
- return addHeapObject(ret);
2343
- };
2344
- imports.wbg.__wbg_new_b525de17f44a8943 = function () {
2345
- const ret = new Array();
2346
- return addHeapObject(ret);
2347
- };
2348
- imports.wbg.__wbg_set_17224bc548dd1d7b = function (arg0, arg1, arg2) {
2349
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2350
- };
2351
- imports.wbg.__wbg_set_20cbc34131e76824 = function (arg0, arg1, arg2) {
2352
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2353
- };
2354
2413
  imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
2355
2414
  takeObject(arg0);
2356
2415
  };
2357
- imports.wbg.__wbindgen_number_new = function (arg0) {
2358
- const ret = arg0;
2359
- return addHeapObject(ret);
2360
- };
2361
2416
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
2362
2417
  const ret = getObject(arg0);
2363
2418
  return addHeapObject(ret);
@@ -2367,7 +2422,7 @@ function getImports() {
2367
2422
  const ret = typeof (val) === 'object' && val !== null;
2368
2423
  return ret;
2369
2424
  };
2370
- imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function (arg0, arg1) {
2425
+ imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function (arg0, arg1) {
2371
2426
  const ret = getObject(arg0)[getObject(arg1)];
2372
2427
  return addHeapObject(ret);
2373
2428
  };
@@ -2407,19 +2462,23 @@ function getImports() {
2407
2462
  const ret = getObject(arg0).length;
2408
2463
  return ret;
2409
2464
  };
2410
- imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2411
- const ret = new Uint8Array(getObject(arg0));
2412
- return addHeapObject(ret);
2413
- };
2414
2465
  imports.wbg.__wbg_call_9495de66fdbe016b = function () {
2415
2466
  return handleError(function (arg0, arg1, arg2) {
2416
2467
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2417
2468
  return addHeapObject(ret);
2418
2469
  }, arguments);
2419
2470
  };
2420
- imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2421
- const ret = getObject(arg0).push(getObject(arg1));
2422
- return ret;
2471
+ imports.wbg.__wbindgen_number_new = function (arg0) {
2472
+ const ret = arg0;
2473
+ return addHeapObject(ret);
2474
+ };
2475
+ imports.wbg.__wbg_new_537b7341ce90bb31 = function (arg0) {
2476
+ const ret = new Uint8Array(getObject(arg0));
2477
+ return addHeapObject(ret);
2478
+ };
2479
+ imports.wbg.__wbg_proteusautoprekeybundle_new = function (arg0) {
2480
+ const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
2481
+ return addHeapObject(ret);
2423
2482
  };
2424
2483
  imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function (arg0, arg1) {
2425
2484
  try {
@@ -2428,7 +2487,7 @@ function getImports() {
2428
2487
  const a = state0.a;
2429
2488
  state0.a = 0;
2430
2489
  try {
2431
- return __wbg_adapter_270(a, state0.b, arg0, arg1);
2490
+ return __wbg_adapter_282(a, state0.b, arg0, arg1);
2432
2491
  }
2433
2492
  finally {
2434
2493
  state0.a = a;
@@ -2441,14 +2500,26 @@ function getImports() {
2441
2500
  state0.a = state0.b = 0;
2442
2501
  }
2443
2502
  };
2444
- imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2445
- const ret = FfiWireE2EIdentity.__wrap(arg0);
2503
+ imports.wbg.__wbg_new_f9876326328f45ed = function () {
2504
+ const ret = new Object();
2446
2505
  return addHeapObject(ret);
2447
2506
  };
2507
+ imports.wbg.__wbg_new_b525de17f44a8943 = function () {
2508
+ const ret = new Array();
2509
+ return addHeapObject(ret);
2510
+ };
2511
+ imports.wbg.__wbg_push_49c286f04dd3bf59 = function (arg0, arg1) {
2512
+ const ret = getObject(arg0).push(getObject(arg1));
2513
+ return ret;
2514
+ };
2448
2515
  imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
2449
2516
  const ret = BigInt.asUintN(64, arg0);
2450
2517
  return addHeapObject(ret);
2451
2518
  };
2519
+ imports.wbg.__wbg_ffiwiree2eidentity_new = function (arg0) {
2520
+ const ret = FfiWireE2EIdentity.__wrap(arg0);
2521
+ return addHeapObject(ret);
2522
+ };
2452
2523
  imports.wbg.__wbg_new_f841cc6f2098f4b5 = function () {
2453
2524
  const ret = new Map();
2454
2525
  return addHeapObject(ret);
@@ -2460,6 +2531,14 @@ function getImports() {
2460
2531
  imports.wbg.__wbg_setonsuccess_925a7718d3f62bc1 = function (arg0, arg1) {
2461
2532
  getObject(arg0).onsuccess = getObject(arg1);
2462
2533
  };
2534
+ imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function (arg0) {
2535
+ const ret = Array.isArray(getObject(arg0));
2536
+ return ret;
2537
+ };
2538
+ imports.wbg.__wbg_get_27fe3dac1c4d0224 = function (arg0, arg1) {
2539
+ const ret = getObject(arg0)[arg1 >>> 0];
2540
+ return addHeapObject(ret);
2541
+ };
2463
2542
  imports.wbg.__wbg_new0_25059e40b1c02766 = function () {
2464
2543
  const ret = new Date();
2465
2544
  return addHeapObject(ret);
@@ -2509,22 +2588,20 @@ function getImports() {
2509
2588
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2510
2589
  return addHeapObject(ret);
2511
2590
  };
2512
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function (arg0) {
2513
- const ret = Array.isArray(getObject(arg0));
2514
- return ret;
2515
- };
2516
2591
  imports.wbg.__wbg_iterator_55f114446221aa5a = function () {
2517
2592
  const ret = Symbol.iterator;
2518
2593
  return addHeapObject(ret);
2519
2594
  };
2520
- imports.wbg.__wbg_get_27fe3dac1c4d0224 = function (arg0, arg1) {
2521
- const ret = getObject(arg0)[arg1 >>> 0];
2522
- return addHeapObject(ret);
2523
- };
2524
2595
  imports.wbg.__wbg_corecrypto_new = function (arg0) {
2525
2596
  const ret = CoreCrypto$1.__wrap(arg0);
2526
2597
  return addHeapObject(ret);
2527
2598
  };
2599
+ imports.wbg.__wbg_set_17224bc548dd1d7b = function (arg0, arg1, arg2) {
2600
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2601
+ };
2602
+ imports.wbg.__wbg_set_841ac57cff3d672b = function (arg0, arg1, arg2) {
2603
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2604
+ };
2528
2605
  imports.wbg.__wbg_new_15d3966e9981a196 = function (arg0, arg1) {
2529
2606
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2530
2607
  return addHeapObject(ret);
@@ -2547,13 +2624,36 @@ function getImports() {
2547
2624
  imports.wbg.__wbg_warn_e57696dbb3977030 = function (arg0) {
2548
2625
  console.warn(getObject(arg0));
2549
2626
  };
2627
+ imports.wbg.__wbg_String_88810dfeb4021902 = function (arg0, arg1) {
2628
+ const ret = String(getObject(arg1));
2629
+ const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
2630
+ const len0 = WASM_VECTOR_LEN;
2631
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
2632
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2633
+ };
2550
2634
  imports.wbg.__wbg_call_96878afb7a8201ca = function () {
2551
2635
  return handleError(function (arg0, arg1, arg2, arg3) {
2552
2636
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2553
2637
  return addHeapObject(ret);
2554
2638
  }, arguments);
2555
2639
  };
2556
- imports.wbg.__wbg_now_78244d2ced74c026 = function () {
2640
+ imports.wbg.__wbg_call_99043a1e2a9e5916 = function () {
2641
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2642
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2643
+ return addHeapObject(ret);
2644
+ }, arguments);
2645
+ };
2646
+ imports.wbg.__wbg_of_4065463fbe892f00 = function (arg0, arg1, arg2, arg3) {
2647
+ const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2648
+ return addHeapObject(ret);
2649
+ };
2650
+ imports.wbg.__wbg_apply_aedce30790c00792 = function () {
2651
+ return handleError(function (arg0, arg1, arg2) {
2652
+ const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
2653
+ return addHeapObject(ret);
2654
+ }, arguments);
2655
+ };
2656
+ imports.wbg.__wbg_now_e2bd027927d3eced = function () {
2557
2657
  const ret = performance.now();
2558
2658
  return ret;
2559
2659
  };
@@ -2565,7 +2665,7 @@ function getImports() {
2565
2665
  const ret = ProposalBundle.__wrap(arg0);
2566
2666
  return addHeapObject(ret);
2567
2667
  };
2568
- imports.wbg.__wbg_now_4d4a1d65c7a8c0ba = function () {
2668
+ imports.wbg.__wbg_now_2e07eedfb4ac9dbe = function () {
2569
2669
  const ret = Date.now();
2570
2670
  return ret;
2571
2671
  };
@@ -2599,6 +2699,10 @@ function getImports() {
2599
2699
  imports.wbg.__wbg_setonerror_7cbe775a0abc7a8e = function (arg0, arg1) {
2600
2700
  getObject(arg0).onerror = getObject(arg1);
2601
2701
  };
2702
+ imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function (arg0, arg1) {
2703
+ const ret = getObject(arg0)[getObject(arg1)];
2704
+ return addHeapObject(ret);
2705
+ };
2602
2706
  imports.wbg.__wbg_name_31ef05f12c1d72c6 = function (arg0, arg1) {
2603
2707
  const ret = getObject(arg1).name;
2604
2708
  const ptr0 = passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
@@ -2624,6 +2728,9 @@ function getImports() {
2624
2728
  const ret = false;
2625
2729
  return ret;
2626
2730
  };
2731
+ imports.wbg.__wbg_set_20cbc34131e76824 = function (arg0, arg1, arg2) {
2732
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2733
+ };
2627
2734
  imports.wbg.__wbg_close_98f3a5ab91060b8b = function (arg0) {
2628
2735
  getObject(arg0).close();
2629
2736
  };
@@ -2795,12 +2902,6 @@ function getImports() {
2795
2902
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2796
2903
  return addHeapObject(ret);
2797
2904
  };
2798
- imports.wbg.__wbg_call_99043a1e2a9e5916 = function () {
2799
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2800
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2801
- return addHeapObject(ret);
2802
- }, arguments);
2803
- };
2804
2905
  imports.wbg.__wbg_set_6aa458a4ebdb65cb = function () {
2805
2906
  return handleError(function (arg0, arg1, arg2) {
2806
2907
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
@@ -3032,12 +3133,12 @@ function getImports() {
3032
3133
  return addHeapObject(ret);
3033
3134
  }, arguments);
3034
3135
  };
3035
- imports.wbg.__wbindgen_closure_wrapper1524 = function (arg0, arg1, arg2) {
3036
- const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_52);
3136
+ imports.wbg.__wbindgen_closure_wrapper1546 = function (arg0, arg1, arg2) {
3137
+ const ret = makeMutClosure(arg0, arg1, 165, __wbg_adapter_52);
3037
3138
  return addHeapObject(ret);
3038
3139
  };
3039
- imports.wbg.__wbindgen_closure_wrapper4412 = function (arg0, arg1, arg2) {
3040
- const ret = makeMutClosure(arg0, arg1, 144, __wbg_adapter_55);
3140
+ imports.wbg.__wbindgen_closure_wrapper4706 = function (arg0, arg1, arg2) {
3141
+ const ret = makeMutClosure(arg0, arg1, 165, __wbg_adapter_55);
3041
3142
  return addHeapObject(ret);
3042
3143
  };
3043
3144
  return imports;
@@ -3088,6 +3189,7 @@ var exports = /*#__PURE__*/Object.freeze({
3088
3189
  NewAcmeAuthz: NewAcmeAuthz,
3089
3190
  NewAcmeOrder: NewAcmeOrder,
3090
3191
  ProposalBundle: ProposalBundle,
3192
+ ProteusAutoPrekeyBundle: ProteusAutoPrekeyBundle,
3091
3193
  PublicGroupStateBundle: PublicGroupStateBundle,
3092
3194
  WirePolicy: WirePolicy$1,
3093
3195
  default: init,
@@ -3097,7 +3199,7 @@ var exports = /*#__PURE__*/Object.freeze({
3097
3199
  var wasm = async (opt = {}) => {
3098
3200
  let {importHook, serverPath} = opt;
3099
3201
 
3100
- let path = "assets/core_crypto_ffi-75ec2ae1.wasm";
3202
+ let path = "assets/core_crypto_ffi-09d69604.wasm";
3101
3203
 
3102
3204
  if (serverPath != null) {
3103
3205
  path = serverPath + /[^\/\\]*$/.exec(path)[0];
@@ -3382,6 +3484,15 @@ class CoreCrypto {
3382
3484
  _CoreCrypto_cc.set(this, void 0);
3383
3485
  __classPrivateFieldSet(this, _CoreCrypto_cc, cc, "f");
3384
3486
  }
3487
+ /**
3488
+ * If this returns > 1 you **cannot** call {@link CoreCrypto.wipe} or {@link CoreCrypto.close} as they will produce an error because of the
3489
+ * outstanding references that were detected.
3490
+ *
3491
+ * @returns the count of strong refs for this CoreCrypto instance
3492
+ */
3493
+ strongRefCount() {
3494
+ return __classPrivateFieldGet(this, _CoreCrypto_cc, "f").strong_ref_count();
3495
+ }
3385
3496
  /**
3386
3497
  * Wipes the {@link CoreCrypto} backing storage (i.e. {@link https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API | IndexedDB} database)
3387
3498
  *
@@ -3431,6 +3542,16 @@ class CoreCrypto {
3431
3542
  async conversationExists(conversationId) {
3432
3543
  return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").conversation_exists(conversationId));
3433
3544
  }
3545
+ /**
3546
+ * Marks a conversation as child of another one
3547
+ * This will mostly affect the behavior of the callbacks (the parentConversationClients parameter will be filled)
3548
+ *
3549
+ * @param childId - conversation identifier of the child conversation
3550
+ * @param parentId - conversation identifier of the parent conversation
3551
+ */
3552
+ async markConversationAsChildOf(childId, parentId) {
3553
+ return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").mark_conversation_as_child_of(childId, parentId));
3554
+ }
3434
3555
  /**
3435
3556
  * Returns the current epoch of a conversation
3436
3557
  *
@@ -3969,7 +4090,7 @@ class CoreCrypto {
3969
4090
  /**
3970
4091
  * Creates a new prekey with an automatically generated ID..
3971
4092
  *
3972
- * @returns A CBOR-serialized version of the PreKeyBundle corresponding to the newly generated and stored PreKey
4093
+ * @returns A CBOR-serialized version of the PreKeyBundle corresponding to the newly generated and stored PreKey accompanied by its ID
3973
4094
  */
3974
4095
  async proteusNewPrekeyAuto() {
3975
4096
  return await CoreCryptoError.asyncMapErr(__classPrivateFieldGet(this, _CoreCrypto_cc, "f").proteus_new_prekey_auto());
@@ -4052,6 +4173,7 @@ class CoreCrypto {
4052
4173
  * keying material.
4053
4174
  *
4054
4175
  * @param ciphersuite - For generating signing key material. Only {@link Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519} is supported currently
4176
+ * @returns The new {@link WireE2eIdentity} object
4055
4177
  */
4056
4178
  async newAcmeEnrollment(ciphersuite = Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519) {
4057
4179
  if (ciphersuite !== Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519) {
@@ -4136,18 +4258,17 @@ class WireE2eIdentity {
4136
4258
  * Creates a new acme order for the handle (userId + display name) and the clientId.
4137
4259
  *
4138
4260
  * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
4139
- * @param domain DNS name of owning backend e.g. `example.com`
4140
- * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `impp:wireapp=NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ/6add501bacd1d90e@example.com`
4141
- * @param handle user handle e.g. `impp:wireapp=alice.smith.qa@example.com`
4261
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
4262
+ * @param handle user handle e.g. `alice.smith.qa@example.com`
4142
4263
  * @param expiryDays generated x509 certificate expiry
4143
4264
  * @param directory you got from {@link directoryResponse}
4144
4265
  * @param account you got from {@link newAccountResponse}
4145
4266
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
4146
4267
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
4147
4268
  */
4148
- newOrderRequest(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce) {
4269
+ newOrderRequest(displayName, clientId, handle, expiryDays, directory, account, previousNonce) {
4149
4270
  try {
4150
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(displayName, domain, clientId, handle, expiryDays, directory, account, previousNonce);
4271
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(displayName, clientId, handle, expiryDays, directory, account, previousNonce);
4151
4272
  }
4152
4273
  catch (e) {
4153
4274
  throw CoreCryptoError.fromStdError(e);
@@ -4187,10 +4308,6 @@ class WireE2eIdentity {
4187
4308
  /**
4188
4309
  * Parses the response from `POST /acme/{provisioner-name}/authz/{authz-id}`
4189
4310
  *
4190
- * You then have to map the challenge from this authorization object. The `client_id_challenge`
4191
- * will be the one with the `client_id_host` (you supplied to {@link newOrderRequest}) identifier,
4192
- * the other will be your `handle_challenge`.
4193
- *
4194
4311
  * @param authz HTTP response body
4195
4312
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
4196
4313
  */
@@ -4211,16 +4328,14 @@ class WireE2eIdentity {
4211
4328
  * {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token} on wire-server.
4212
4329
  *
4213
4330
  * @param accessTokenUrl backend endpoint where this token will be sent. Should be this one {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token}
4214
- * @param userId an UUIDv4 uniquely identifying the user
4215
- * @param clientId client identifier
4216
- * @param domain owning backend domain e.g. `wire.com`
4217
- * @param clientIdChallenge you found after {@link newAuthzResponse}
4331
+ * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
4332
+ * @param dpopChallenge you found after {@link newAuthzResponse}
4218
4333
  * @param backendNonce you get by calling `GET /clients/token/nonce` on wire-server as defined here {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/get_clients__client__nonce}
4219
4334
  * @param expiryDays token expiry in days
4220
4335
  */
4221
- createDpopToken(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays) {
4336
+ createDpopToken(accessTokenUrl, clientId, dpopChallenge, backendNonce, expiryDays) {
4222
4337
  try {
4223
- return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays);
4338
+ return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(accessTokenUrl, clientId, dpopChallenge, backendNonce, expiryDays);
4224
4339
  }
4225
4340
  catch (e) {
4226
4341
  throw CoreCryptoError.fromStdError(e);