@wireapp/core-crypto 1.0.0-rc.5 → 1.0.0-rc.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,56 @@
1
+ /**
2
+ * For creating a challenge.
3
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
4
+ */
5
+ export class AcmeChallenge {
6
+ free(): void;
7
+ /**
8
+ * Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be accessed
9
+ */
10
+ readonly delegate: Uint8Array;
11
+ /**
12
+ * Non-standard, Wire specific claim. Indicates the consumer from where it should get the challenge proof.
13
+ * Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint for an OIDC challenge
14
+ */
15
+ readonly target: string;
16
+ /**
17
+ * URL of this challenge
18
+ */
19
+ readonly url: string;
20
+ }
21
+ /**
22
+ * Result of an authorization creation.
23
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
24
+ */
25
+ export class NewAcmeAuthz {
26
+ free(): void;
27
+ /**
28
+ * Associated ACME Challenge
29
+ */
30
+ readonly challenge: AcmeChallenge;
31
+ /**
32
+ * DNS entry associated with those challenge
33
+ */
34
+ readonly identifier: string;
35
+ /**
36
+ * ACME challenge + ACME key thumbprint
37
+ */
38
+ readonly keyauth: string | undefined;
39
+ }
40
+ /**
41
+ * Result of an order creation.
42
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
43
+ */
44
+ export class NewAcmeOrder {
45
+ free(): void;
46
+ /**
47
+ */
48
+ readonly authorizations: (Uint8Array)[];
49
+ /**
50
+ * Contains raw JSON data of this order. This is parsed by the underlying Rust library hence should not be accessed
51
+ */
52
+ readonly delegate: Uint8Array;
53
+ }
1
54
  /**
2
55
  * Error wrapper that takes care of extracting rich error details across the FFI (through JSON parsing)
3
56
  *
@@ -79,24 +132,6 @@ export interface ConversationConfiguration {
79
132
  * Implementation specific configuration
80
133
  */
81
134
  custom?: CustomConfiguration;
82
- /**
83
- * Trust anchors to be added in the group's context extensions
84
- */
85
- perDomainTrustAnchors?: PerDomainTrustAnchor[];
86
- }
87
- /**
88
- * A wrapper containing the configuration for trust anchors to be added in the group's context
89
- * extensions
90
- */
91
- export interface PerDomainTrustAnchor {
92
- /**
93
- * Domain name of the owning backend this anchor refers to. One of the certificate in the chain has to have this domain in its SANs
94
- */
95
- domain_name: string;
96
- /**
97
- * PEM encoded (partial) certificate chain. This contains the certificate chain for the CA certificate issuing the E2E Identity certificates
98
- */
99
- intermediate_certificate_chain: string;
100
135
  }
101
136
  /**
102
137
  * see [core_crypto::prelude::MlsWirePolicy]
@@ -179,6 +214,10 @@ export interface MemberAddedMessages {
179
214
  * @readonly
180
215
  */
181
216
  groupInfo: GroupInfoBundle;
217
+ /**
218
+ * New CRL distribution points that appeared by the introduction of a new credential
219
+ */
220
+ crlNewDistributionPoints?: string[];
182
221
  }
183
222
  /**
184
223
  * Data shape for a MLS generic commit + optional bundle (aka stapled commit & welcome)
@@ -262,7 +301,7 @@ export interface RotateBundle {
262
301
  *
263
302
  * @readonly
264
303
  */
265
- commits: CommitBundle[];
304
+ commits: Map<string, CommitBundle>;
266
305
  /**
267
306
  * Fresh KeyPackages with the new Credential
268
307
  *
@@ -275,6 +314,10 @@ export interface RotateBundle {
275
314
  * @readonly
276
315
  */
277
316
  keyPackageRefsToRemove: Uint8Array[];
317
+ /**
318
+ * New CRL distribution points that appeared by the introduction of a new credential
319
+ */
320
+ crlNewDistributionPoints?: string[];
278
321
  }
279
322
  /**
280
323
  * Params for CoreCrypto deferred initialization
@@ -303,6 +346,10 @@ export interface CoreCryptoDeferredParams {
303
346
  * .wasm file path, this will be useful in case your bundling system likes to relocate files (i.e. what webpack does)
304
347
  */
305
348
  wasmFilePath?: string;
349
+ /**
350
+ * Number of initial KeyPackage to create when initializing the client
351
+ */
352
+ nbKeyPackage?: number;
306
353
  }
307
354
  /**
308
355
  * Params for CoreCrypto initialization
@@ -315,19 +362,6 @@ export interface CoreCryptoParams extends CoreCryptoDeferredParams {
315
362
  */
316
363
  clientId: ClientId;
317
364
  }
318
- /**
319
- * Data shape for adding clients to a conversation
320
- */
321
- export interface Invitee {
322
- /**
323
- * Client ID as a byte array
324
- */
325
- id: ClientId;
326
- /**
327
- * MLS KeyPackage belonging to the aforementioned client
328
- */
329
- kp: Uint8Array;
330
- }
331
365
  export interface ConversationInitBundle {
332
366
  /**
333
367
  * Conversation ID of the conversation created
@@ -348,6 +382,27 @@ export interface ConversationInitBundle {
348
382
  * @readonly
349
383
  */
350
384
  groupInfo: GroupInfoBundle;
385
+ /**
386
+ * New CRL distribution points that appeared by the introduction of a new credential
387
+ */
388
+ crlNewDistributionPoints?: string[];
389
+ }
390
+ /**
391
+ * Supporting struct for CRL registration result
392
+ */
393
+ export interface CRLRegistration {
394
+ /**
395
+ * Whether this CRL modifies the old CRL (i.e. has a different revocated cert list)
396
+ *
397
+ * @readonly
398
+ */
399
+ dirty: boolean;
400
+ /**
401
+ * Optional expiration timestamp
402
+ *
403
+ * @readonly
404
+ */
405
+ expiration?: number;
351
406
  }
352
407
  /**
353
408
  * This is a wrapper for all the possible outcomes you can get after decrypting a message
@@ -386,17 +441,65 @@ export interface DecryptedMessage {
386
441
  * Present for all messages
387
442
  */
388
443
  identity?: WireIdentity;
444
+ /**
445
+ * Only set when the decrypted message is a commit.
446
+ * Contains buffered messages for next epoch which were received before the commit creating the epoch
447
+ * because the DS did not fan them out in order.
448
+ */
449
+ bufferedMessages?: BufferedDecryptedMessage[];
450
+ /**
451
+ * New CRL distribution points that appeared by the introduction of a new credential
452
+ */
453
+ crlNewDistributionPoints?: string[];
454
+ }
455
+ /**
456
+ * Almost same as {@link DecryptedMessage} but avoids recursion
457
+ */
458
+ export interface BufferedDecryptedMessage {
459
+ /**
460
+ * see {@link DecryptedMessage.message}
461
+ */
462
+ message?: Uint8Array;
463
+ /**
464
+ * see {@link DecryptedMessage.proposals}
465
+ */
466
+ proposals: ProposalBundle[];
467
+ /**
468
+ * see {@link DecryptedMessage.isActive}
469
+ */
470
+ isActive: boolean;
471
+ /**
472
+ * see {@link DecryptedMessage.commitDelay}
473
+ */
474
+ commitDelay?: number;
475
+ /**
476
+ * see {@link DecryptedMessage.senderClientId}
477
+ */
478
+ senderClientId?: ClientId;
479
+ /**
480
+ * see {@link DecryptedMessage.hasEpochChanged}
481
+ */
482
+ hasEpochChanged: boolean;
483
+ /**
484
+ * see {@link DecryptedMessage.identity}
485
+ */
486
+ identity?: WireIdentity;
487
+ /**
488
+ * see {@link DecryptedMessage.crlNewDistributionPoints}
489
+ */
490
+ crlNewDistributionPoints?: string[];
389
491
  }
390
492
  /**
391
- * Represents the identity claims identifying a client. Those claims are verifiable by any member in the group
493
+ * Represents the identity claims identifying a client
494
+ * Those claims are verifiable by any member in the group
392
495
  */
393
496
  export interface WireIdentity {
394
497
  /**
395
- * Represents the identity claims identifying a client. Those claims are verifiable by any member in the group
498
+ * Unique client identifier
396
499
  */
397
500
  clientId: string;
398
501
  /**
399
- * user handle e.g. `john_wire`
502
+ * User handle e.g. `john_wire`
400
503
  */
401
504
  handle: string;
402
505
  /**
@@ -407,6 +510,66 @@ export interface WireIdentity {
407
510
  * DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
408
511
  */
409
512
  domain: string;
513
+ /**
514
+ * X509 certificate identifying this client in the MLS group ; PEM encoded
515
+ */
516
+ certificate: string;
517
+ /**
518
+ * Status of the Credential at the moment T when this object is created
519
+ */
520
+ status: DeviceStatus;
521
+ /**
522
+ * MLS thumbprint
523
+ */
524
+ thumbprint: string;
525
+ /**
526
+ * X509 certificate serial number
527
+ */
528
+ serialNumber: string;
529
+ /**
530
+ * X509 certificate not before as Unix timestamp
531
+ */
532
+ notBefore: bigint;
533
+ /**
534
+ * X509 certificate not after as Unix timestamp
535
+ */
536
+ notAfter: bigint;
537
+ }
538
+ export interface AcmeDirectory {
539
+ /**
540
+ * URL for fetching a new nonce. Use this only for creating a new account.
541
+ */
542
+ newNonce: string;
543
+ /**
544
+ * URL for creating a new account.
545
+ */
546
+ newAccount: string;
547
+ /**
548
+ * URL for creating a new order.
549
+ */
550
+ newOrder: string;
551
+ /**
552
+ * Revocation URL
553
+ */
554
+ revokeCert: string;
555
+ }
556
+ /**
557
+ * Indicates the standalone status of a device Credential in a MLS group at a moment T.
558
+ * This does not represent the states where a device is not using MLS or is not using end-to-end identity
559
+ */
560
+ export declare enum DeviceStatus {
561
+ /**
562
+ * All is fine
563
+ */
564
+ Valid = 0,
565
+ /**
566
+ * The Credential's certificate is expired
567
+ */
568
+ Expired = 1,
569
+ /**
570
+ * The Credential's certificate is revoked
571
+ */
572
+ Revoked = 2
410
573
  }
411
574
  /**
412
575
  * Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
@@ -424,6 +587,26 @@ export interface ProposalBundle {
424
587
  * @readonly
425
588
  */
426
589
  proposalRef: ProposalRef;
590
+ /**
591
+ * New CRL Distribution of members of this group
592
+ *
593
+ * @readonly
594
+ */
595
+ crlNewDistributionPoints?: string[];
596
+ }
597
+ export interface WelcomeBundle {
598
+ /**
599
+ * Conversation ID
600
+ *
601
+ * @readonly
602
+ */
603
+ id: Uint8Array;
604
+ /**
605
+ * New CRL Distribution of members of this group
606
+ *
607
+ * @readonly
608
+ */
609
+ crlNewDistributionPoints?: string[];
427
610
  }
428
611
  /**
429
612
  * MLS Proposal type
@@ -540,6 +723,10 @@ export interface CoreCryptoCallbacks {
540
723
  */
541
724
  export declare class CoreCrypto {
542
725
  #private;
726
+ /**
727
+ * Should only be used internally
728
+ */
729
+ inner(): unknown;
543
730
  /**
544
731
  * This is your entrypoint to initialize {@link CoreCrypto}!
545
732
  *
@@ -573,7 +760,7 @@ export declare class CoreCrypto {
573
760
  * });
574
761
  * ````
575
762
  */
576
- static init({ databaseName, key, clientId, wasmFilePath, ciphersuites, entropySeed }: CoreCryptoParams): Promise<CoreCrypto>;
763
+ static init({ databaseName, key, clientId, wasmFilePath, ciphersuites, entropySeed, nbKeyPackage, }: CoreCryptoParams): Promise<CoreCrypto>;
577
764
  /**
578
765
  * Almost identical to {@link CoreCrypto.init} but allows a 2 phase initialization of MLS.
579
766
  * First, calling this will set up the keystore and will allow generating proteus prekeys.
@@ -581,14 +768,15 @@ export declare class CoreCrypto {
581
768
  * Use this clientId to initialize MLS with {@link CoreCrypto.mlsInit}.
582
769
  * @param params - {@link CoreCryptoDeferredParams}
583
770
  */
584
- static deferredInit({ databaseName, key, ciphersuites, entropySeed, wasmFilePath }: CoreCryptoDeferredParams): Promise<CoreCrypto>;
771
+ static deferredInit({ databaseName, key, ciphersuites, entropySeed, wasmFilePath, nbKeyPackage, }: CoreCryptoDeferredParams): Promise<CoreCrypto>;
585
772
  /**
586
773
  * Use this after {@link CoreCrypto.deferredInit} when you have a clientId. It initializes MLS.
587
774
  *
588
775
  * @param clientId - {@link CoreCryptoParams#clientId} but required
589
776
  * @param ciphersuites - All the ciphersuites supported by this MLS client
777
+ * @param nbKeyPackage - number of initial KeyPackage to create when initializing the client
590
778
  */
591
- mlsInit(clientId: ClientId, ciphersuites: Ciphersuite[]): Promise<void>;
779
+ mlsInit(clientId: ClientId, ciphersuites: Ciphersuite[], nbKeyPackage?: number): Promise<void>;
592
780
  /**
593
781
  * Generates a MLS KeyPair/CredentialBundle with a temporary, random client ID.
594
782
  * This method is designed to be used in conjunction with {@link CoreCrypto.mlsInitWithClientId} and represents the first step in this process
@@ -625,7 +813,7 @@ export declare class CoreCrypto {
625
813
  /**
626
814
  * Closes this {@link CoreCrypto} instance and deallocates all loaded resources
627
815
  *
628
- * **CAUTION**: This {@link CoreCrypto} instance won't be useable after a call to this method, but there's no way to express this requirement in TypeScript so you'll get errors instead!
816
+ * **CAUTION**: This {@link CoreCrypto} instance won't be usable after a call to this method, but there's no way to express this requirement in TypeScript, so you'll get errors instead!
629
817
  */
630
818
  close(): Promise<void>;
631
819
  /**
@@ -691,7 +879,12 @@ export declare class CoreCrypto {
691
879
  */
692
880
  createConversation(conversationId: ConversationId, creatorCredentialType: CredentialType, configuration?: ConversationConfiguration): Promise<any>;
693
881
  /**
694
- * Decrypts a message for a given conversation
882
+ * Decrypts a message for a given conversation.
883
+ *
884
+ * Note: you should catch & ignore the following error reasons:
885
+ * * "We already decrypted this message once"
886
+ * * "You tried to join with an external commit but did not merge it yet. We will reapply this message for you when you merge your external commit"
887
+ * * "Incoming message is for a future epoch. We will buffer it until the commit for that epoch arrives"
695
888
  *
696
889
  * @param conversationId - The ID of the conversation
697
890
  * @param payload - The encrypted message buffer
@@ -708,34 +901,26 @@ export declare class CoreCrypto {
708
901
  * @returns The encrypted payload for the given group. This needs to be fanned out to the other members of the group.
709
902
  */
710
903
  encryptMessage(conversationId: ConversationId, message: Uint8Array): Promise<Uint8Array>;
711
- /**
712
- * Updates the trust anchors for a conversation. This should be called when a federated event happens (new team added/removed).
713
- * Clients should add and/or remove trust anchors from the new backend to the conversation. The method will check
714
- * for duplicated domains and the validity of the certificate chain.
715
- *
716
- * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterwards **ONLY IF** the Delivery Service responds
717
- * '200 OK' to the {@link CommitBundle} upload. It will "merge" the commit locally i.e. increment the local group
718
- * epoch, use new encryption secrets etc...
719
- *
720
- * @param conversationId - The ID of the conversation
721
- * @param removeDomainNames - Domains to remove from the trust anchors
722
- * @param addTrustAnchors - New trust anchors to add to the conversation
723
- *
724
- * @returns A {@link CommitBundle}
725
- */
726
- update_trust_anchors_from_conversation(conversationId: ConversationId, removeDomainNames: string[], addTrustAnchors: PerDomainTrustAnchor[]): Promise<CommitBundle>;
727
904
  /**
728
905
  * Ingest a TLS-serialized MLS welcome message to join an existing MLS group
729
906
  *
907
+ * Important: you have to catch the error with this reason "Although this Welcome seems valid, the local KeyPackage
908
+ * it references has already been deleted locally. Join this group with an external commit", ignore it and then try
909
+ * to join this group with an external commit.
910
+ *
730
911
  * @param welcomeMessage - TLS-serialized MLS Welcome message
731
912
  * @param configuration - configuration of the MLS group
732
913
  * @returns The conversation ID of the newly joined group. You can use the same ID to decrypt/encrypt messages
733
914
  */
734
- processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<ConversationId>;
915
+ processWelcomeMessage(welcomeMessage: Uint8Array, configuration?: CustomConfiguration): Promise<WelcomeBundle>;
735
916
  /**
736
- * @returns The client's public key
917
+ * Get the client's public signature key. To upload to the DS for further backend side validation
918
+ *
919
+ * @param ciphersuite - of the signature key to get
920
+ * @param credentialType - of the public key to look for
921
+ * @returns the client's public signature key
737
922
  */
738
- clientPublicKey(ciphersuite: Ciphersuite): Promise<Uint8Array>;
923
+ clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType): Promise<Uint8Array>;
739
924
  /**
740
925
  *
741
926
  * @param ciphersuite - of the KeyPackages to count
@@ -762,21 +947,21 @@ export declare class CoreCrypto {
762
947
  /**
763
948
  * Adds new clients to a conversation, assuming the current client has the right to add new clients to the conversation.
764
949
  *
765
- * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterwards **ONLY IF** the Delivery Service responds
950
+ * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterward **ONLY IF** the Delivery Service responds
766
951
  * '200 OK' to the {@link CommitBundle} upload. It will "merge" the commit locally i.e. increment the local group
767
952
  * epoch, use new encryption secrets etc...
768
953
  *
769
954
  * @param conversationId - The ID of the conversation
770
- * @param clients - Array of {@link Invitee} (which are Client ID / KeyPackage pairs)
955
+ * @param keyPackages - KeyPackages of the new clients to add
771
956
  *
772
957
  * @returns A {@link CommitBundle}
773
958
  */
774
- addClientsToConversation(conversationId: ConversationId, clients: Invitee[]): Promise<MemberAddedMessages>;
959
+ addClientsToConversation(conversationId: ConversationId, keyPackages: Uint8Array[]): Promise<MemberAddedMessages>;
775
960
  /**
776
961
  * Removes the provided clients from a conversation; Assuming those clients exist and the current client is allowed
777
962
  * to do so, otherwise this operation does nothing.
778
963
  *
779
- * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterwards **ONLY IF** the Delivery Service responds
964
+ * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterward **ONLY IF** the Delivery Service responds
780
965
  * '200 OK' to the {@link CommitBundle} upload. It will "merge" the commit locally i.e. increment the local group
781
966
  * epoch, use new encryption secrets etc...
782
967
  *
@@ -787,9 +972,9 @@ export declare class CoreCrypto {
787
972
  */
788
973
  removeClientsFromConversation(conversationId: ConversationId, clientIds: ClientId[]): Promise<CommitBundle>;
789
974
  /**
790
- * Creates an update commit which forces every client to update their keypackages in the conversation
975
+ * Creates an update commit which forces every client to update their LeafNode in the conversation
791
976
  *
792
- * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterwards **ONLY IF** the Delivery Service responds
977
+ * **CAUTION**: {@link CoreCrypto.commitAccepted} **HAS TO** be called afterward **ONLY IF** the Delivery Service responds
793
978
  * '200 OK' to the {@link CommitBundle} upload. It will "merge" the commit locally i.e. increment the local group
794
979
  * epoch, use new encryption secrets etc...
795
980
  *
@@ -819,6 +1004,9 @@ export declare class CoreCrypto {
819
1004
  * @returns A {@link ProposalBundle} containing the Proposal and its reference in order to roll it back if necessary
820
1005
  */
821
1006
  newProposal(proposalType: ProposalType, args: ProposalArgs | AddProposalArgs | RemoveProposalArgs): Promise<ProposalBundle>;
1007
+ /**
1008
+ * Creates a new external Add proposal for self client to join a conversation.
1009
+ */
822
1010
  newExternalProposal(externalProposalType: ExternalProposalType, args: ExternalAddProposalArgs): Promise<Uint8Array>;
823
1011
  /**
824
1012
  * Allows to create an external commit to "apply" to join a group through its GroupInfo.
@@ -843,8 +1031,9 @@ export declare class CoreCrypto {
843
1031
  * and deletes the temporary one. This step makes the group operational and ready to encrypt/decrypt message
844
1032
  *
845
1033
  * @param conversationId - The ID of the conversation
1034
+ * @returns eventually decrypted buffered messages if any
846
1035
  */
847
- mergePendingGroupFromExternalCommit(conversationId: ConversationId): Promise<DecryptedMessage[] | undefined>;
1036
+ mergePendingGroupFromExternalCommit(conversationId: ConversationId): Promise<BufferedDecryptedMessage[] | undefined>;
848
1037
  /**
849
1038
  * In case the external commit generated by {@link CoreCrypto.joinByExternalCommit} is rejected by the Delivery Service, and we
850
1039
  * want to abort this external commit once for all, we can wipe out the pending group from the keystore in order
@@ -854,26 +1043,24 @@ export declare class CoreCrypto {
854
1043
  */
855
1044
  clearPendingGroupFromExternalCommit(conversationId: ConversationId): Promise<void>;
856
1045
  /**
857
- * Allows to mark the latest commit produced as "accepted" and be able to safely merge it
858
- * into the local group state
1046
+ * Allows to mark the latest commit produced as "accepted" and be able to safely merge it into the local group state
859
1047
  *
860
1048
  * @param conversationId - The group's ID
1049
+ * @returns the messages from current epoch which had been buffered, if any
861
1050
  */
862
- commitAccepted(conversationId: ConversationId): Promise<void>;
1051
+ commitAccepted(conversationId: ConversationId): Promise<BufferedDecryptedMessage[] | undefined>;
863
1052
  /**
864
- * Allows to remove a pending proposal (rollback). Use this when backend rejects the proposal you just sent e.g. if permissions
865
- * have changed meanwhile.
1053
+ * Allows to remove a pending proposal (rollback). Use this when backend rejects the proposal you just sent e.g. if permissions have changed meanwhile.
866
1054
  *
867
1055
  * **CAUTION**: only use this when you had an explicit response from the Delivery Service
868
- * e.g. 403 or 409. Do not use otherwise e.g. 5xx responses, timeout etc..
1056
+ * e.g. 403 or 409. Do not use otherwise e.g. 5xx responses, timeout etc
869
1057
  *
870
1058
  * @param conversationId - The group's ID
871
1059
  * @param proposalRef - A reference to the proposal to delete. You get one when using {@link CoreCrypto.newProposal}
872
1060
  */
873
1061
  clearPendingProposal(conversationId: ConversationId, proposalRef: ProposalRef): Promise<void>;
874
1062
  /**
875
- * Allows to remove a pending commit (rollback). Use this when backend rejects the commit you just sent e.g. if permissions
876
- * have changed meanwhile.
1063
+ * Allows to remove a pending commit (rollback). Use this when backend rejects the commit you just sent e.g. if permissions have changed meanwhile.
877
1064
  *
878
1065
  * **CAUTION**: only use this when you had an explicit response from the Delivery Service
879
1066
  * e.g. 403. Do not use otherwise e.g. 5xx responses, timeout etc..
@@ -893,6 +1080,15 @@ export declare class CoreCrypto {
893
1080
  * @returns A `Uint8Array` representing the derived key
894
1081
  */
895
1082
  exportSecretKey(conversationId: ConversationId, keyLength: number): Promise<Uint8Array>;
1083
+ /**
1084
+ * Returns the raw public key of the single external sender present in this group.
1085
+ * This should be used to initialize a subconversation
1086
+ *
1087
+ * @param conversationId - The group's ID
1088
+ *
1089
+ * @returns A `Uint8Array` representing the external sender raw public key
1090
+ */
1091
+ getExternalSender(conversationId: ConversationId): Promise<Uint8Array>;
896
1092
  /**
897
1093
  * Returns all clients from group's members
898
1094
  *
@@ -917,7 +1113,7 @@ export declare class CoreCrypto {
917
1113
  */
918
1114
  reseedRng(seed: Uint8Array): Promise<void>;
919
1115
  /**
920
- * Initiailizes the proteus client
1116
+ * Initializes the proteus client
921
1117
  */
922
1118
  proteusInit(): Promise<void>;
923
1119
  /**
@@ -1050,47 +1246,81 @@ export declare class CoreCrypto {
1050
1246
  * Creates an enrollment instance with private key material you can use in order to fetch
1051
1247
  * a new x509 certificate from the acme server.
1052
1248
  *
1053
- * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
1054
- * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
1055
- * @param handle user handle e.g. `alice.smith.qa@example.com`
1056
- * @param expiryDays generated x509 certificate expiry
1249
+ * @param clientId - client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:6add501bacd1d90e@example.com`
1250
+ * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1251
+ * @param handle - user handle e.g. `alice.smith.qa@example.com`
1252
+ * @param expirySec - generated x509 certificate expiry
1057
1253
  * @param ciphersuite - for generating signing key material
1058
- * @returns The new {@link WireE2eIdentity} object
1254
+ * @param team - name of the Wire team a user belongs to
1255
+ * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiMlsInitOnly}
1059
1256
  */
1060
- e2eiNewEnrollment(clientId: string, displayName: string, handle: string, expiryDays: number, ciphersuite: Ciphersuite): Promise<WireE2eIdentity>;
1257
+ e2eiNewEnrollment(clientId: string, displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1061
1258
  /**
1062
1259
  * Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI.
1063
1260
  * Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
1064
1261
  *
1065
- * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
1066
- * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
1067
- * @param handle user handle e.g. `alice.smith.qa@example.com`
1068
- * @param expiryDays generated x509 certificate expiry
1262
+ * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1263
+ * @param handle - user handle e.g. `alice.smith.qa@example.com`
1264
+ * @param expirySec - generated x509 certificate expiry
1069
1265
  * @param ciphersuite - for generating signing key material
1070
- * @returns The new {@link WireE2eIdentity} object
1266
+ * @param team - name of the Wire team a user belongs to
1267
+ * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
1071
1268
  */
1072
- e2eiNewActivationEnrollment(clientId: string, displayName: string, handle: string, expiryDays: number, ciphersuite: Ciphersuite): Promise<WireE2eIdentity>;
1269
+ e2eiNewActivationEnrollment(displayName: string, handle: string, expirySec: number, ciphersuite: Ciphersuite, team?: string): Promise<E2eiEnrollment>;
1073
1270
  /**
1074
1271
  * Generates an E2EI enrollment instance for a E2EI client (with a X509 certificate credential)
1075
1272
  * having to change/rotate their credential, either because the former one is expired or it
1076
1273
  * has been revoked. It lets you change the DisplayName or the handle
1077
1274
  * if you need to. Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation.
1078
1275
  *
1079
- * @param clientId client identifier with user b64Url encoded & clientId hex encoded e.g. `NDUyMGUyMmY2YjA3NGU3NjkyZjE1NjJjZTAwMmQ2NTQ:6add501bacd1d90e@example.com`
1080
- * @param expiryDays generated x509 certificate expiry
1276
+ * @param expirySec - generated x509 certificate expiry
1081
1277
  * @param ciphersuite - for generating signing key material
1082
- * @param displayName human readable name displayed in the application e.g. `Smith, Alice M (QA)`
1083
- * @param handle user handle e.g. `alice.smith.qa@example.com`
1084
- * @returns The new {@link WireE2eIdentity} object
1278
+ * @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)`
1279
+ * @param handle - user handle e.g. `alice.smith.qa@example.com`
1280
+ * @param team - name of the Wire team a user belongs to
1281
+ * @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll}
1085
1282
  */
1086
- e2eiNewRotateEnrollment(clientId: string, expiryDays: number, ciphersuite: Ciphersuite, displayName?: string, handle?: string): Promise<WireE2eIdentity>;
1283
+ e2eiNewRotateEnrollment(expirySec: number, ciphersuite: Ciphersuite, displayName?: string, handle?: string, team?: string): Promise<E2eiEnrollment>;
1087
1284
  /**
1088
- * Use this method to initialize end-to-end identity when a client signs up and the grace period is already expired ; that means he cannot initialize with a Basic credential
1285
+ * Use this method to initialize end-to-end identity when a client signs up and the grace period is already expired ;
1286
+ * that means he cannot initialize with a Basic credential
1089
1287
  *
1090
1288
  * @param enrollment - the enrollment instance used to fetch the certificates
1091
1289
  * @param certificateChain - the raw response from ACME server
1092
- */
1093
- e2eiMlsInitOnly(enrollment: WireE2eIdentity, certificateChain: string): Promise<void>;
1290
+ * @param nbKeyPackage - number of initial KeyPackage to create when initializing the client
1291
+ * @returns a MlsClient initialized with only a x509 credential
1292
+ */
1293
+ e2eiMlsInitOnly(enrollment: E2eiEnrollment, certificateChain: string, nbKeyPackage?: number): Promise<string[] | undefined>;
1294
+ /**
1295
+ * Registers a Root Trust Anchor CA for the use in E2EI processing.
1296
+ *
1297
+ * Please note that without a Root Trust Anchor, all validations *will* fail;
1298
+ * So this is the first step to perform after initializing your E2EI client
1299
+ *
1300
+ * @param trustAnchorPEM - PEM certificate to anchor as a Trust Root
1301
+ */
1302
+ e2eiRegisterAcmeCA(trustAnchorPEM: string): Promise<void>;
1303
+ /**
1304
+ * Registers an Intermediate CA for the use in E2EI processing.
1305
+ *
1306
+ * Please note that a Root Trust Anchor CA is needed to validate Intermediate CAs;
1307
+ * You **need** to have a Root CA registered before calling this
1308
+ *
1309
+ * @param certPEM - PEM certificate to register as an Intermediate CA
1310
+ */
1311
+ e2eiRegisterIntermediateCA(certPEM: string): Promise<string[] | undefined>;
1312
+ /**
1313
+ * Registers a CRL for the use in E2EI processing.
1314
+ *
1315
+ * Please note that a Root Trust Anchor CA is needed to validate CRLs;
1316
+ * You **need** to have a Root CA registered before calling this
1317
+ *
1318
+ * @param crlDP - CRL Distribution Point; Basically the URL you fetched it from
1319
+ * @param crlDER - DER representation of the CRL
1320
+ *
1321
+ * @returns a {@link CRLRegistration} with the dirty state of the new CRL (see struct) and its expiration timestamp
1322
+ */
1323
+ e2eiRegisterCRL(crlDP: string, crlDER: Uint8Array): Promise<CRLRegistration>;
1094
1324
  /**
1095
1325
  * Creates a commit in all local conversations for changing the credential. Requires first
1096
1326
  * having enrolled a new X509 certificate with either {@link CoreCrypto.e2eiNewActivationEnrollment}
@@ -1099,8 +1329,9 @@ export declare class CoreCrypto {
1099
1329
  * @param enrollment - the enrollment instance used to fetch the certificates
1100
1330
  * @param certificateChain - the raw response from ACME server
1101
1331
  * @param newKeyPackageCount - number of KeyPackages with new identity to generate
1332
+ * @returns a {@link RotateBundle} with commits to fan-out to other group members, KeyPackages to upload and old ones to delete
1102
1333
  */
1103
- e2eiRotateAll(enrollment: WireE2eIdentity, certificateChain: string, newKeyPackageCount: number): Promise<RotateBundle>;
1334
+ e2eiRotateAll(enrollment: E2eiEnrollment, certificateChain: string, newKeyPackageCount: number): Promise<RotateBundle>;
1104
1335
  /**
1105
1336
  * Allows persisting an active enrollment (for example while redirecting the user during OAuth) in order to resume
1106
1337
  * it later with {@link e2eiEnrollmentStashPop}
@@ -1108,16 +1339,16 @@ export declare class CoreCrypto {
1108
1339
  * @param enrollment the enrollment instance to persist
1109
1340
  * @returns a handle to fetch the enrollment later with {@link e2eiEnrollmentStashPop}
1110
1341
  */
1111
- e2eiEnrollmentStash(enrollment: WireE2eIdentity): Promise<Uint8Array>;
1342
+ e2eiEnrollmentStash(enrollment: E2eiEnrollment): Promise<Uint8Array>;
1112
1343
  /**
1113
1344
  * Fetches the persisted enrollment and deletes it from the keystore
1114
1345
  *
1115
1346
  * @param handle returned by {@link e2eiEnrollmentStash}
1116
1347
  * @returns the persisted enrollment instance
1117
1348
  */
1118
- e2eiEnrollmentStashPop(handle: Uint8Array): Promise<WireE2eIdentity>;
1349
+ e2eiEnrollmentStashPop(handle: Uint8Array): Promise<E2eiEnrollment>;
1119
1350
  /**
1120
- * Indicates when to mark a conversation as degraded i.e. when not all its members have a X509.
1351
+ * Indicates when to mark a conversation as not verified i.e. when not all its members have a X509.
1121
1352
  * Credential generated by Wire's end-to-end identity enrollment
1122
1353
  *
1123
1354
  * @param conversationId The group's ID
@@ -1128,9 +1359,37 @@ export declare class CoreCrypto {
1128
1359
  * Returns true when end-to-end-identity is enabled for the given Ciphersuite
1129
1360
  *
1130
1361
  * @param ciphersuite of the credential to check
1131
- * @returns true end-to-end identity is enabled for the given ciphersuite
1362
+ * @returns true if end-to-end identity is enabled for the given ciphersuite
1132
1363
  */
1133
1364
  e2eiIsEnabled(ciphersuite: Ciphersuite): Promise<boolean>;
1365
+ /**
1366
+ * From a given conversation, get the identity of the members supplied. Identity is only present for members with a
1367
+ * Certificate Credential (after turning on end-to-end identity).
1368
+ *
1369
+ * @param conversationId - identifier of the conversation
1370
+ * @param deviceIds - identifiers of the devices
1371
+ * @returns identities or if no member has a x509 certificate, it will return an empty List
1372
+ */
1373
+ getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId[]): Promise<WireIdentity[]>;
1374
+ /**
1375
+ * From a given conversation, get the identity of the users (device holders) supplied.
1376
+ * Identity is only present for devices with a Certificate Credential (after turning on end-to-end identity).
1377
+ * If no member has a x509 certificate, it will return an empty Vec.
1378
+ *
1379
+ * @param conversationId - identifier of the conversation
1380
+ * @param userIds - user identifiers hyphenated UUIDv4 e.g. 'bd4c7053-1c5a-4020-9559-cd7bf7961954'
1381
+ * @returns a Map with all the identities for a given users. Consumers are then recommended to reduce those identities to determine the actual status of a user.
1382
+ */
1383
+ getUserIdentities(conversationId: ConversationId, userIds: string[]): Promise<Map<string, WireIdentity[]>>;
1384
+ /**
1385
+ * Gets the e2ei conversation state from a `GroupInfo`. Useful to check if the group has e2ei
1386
+ * turned on or not before joining it.
1387
+ *
1388
+ * @param groupInfo - a TLS encoded GroupInfo fetched from the Delivery Service
1389
+ * @param credentialType - kind of Credential to check usage of. Defaults to X509 for now as no other value will give any result.
1390
+ * @returns see {@link E2eiConversationState}
1391
+ */
1392
+ getCredentialInUse(groupInfo: Uint8Array, credentialType?: CredentialType): Promise<E2eiConversationState>;
1134
1393
  /**
1135
1394
  * Returns the current version of {@link CoreCrypto}
1136
1395
  *
@@ -1139,7 +1398,7 @@ export declare class CoreCrypto {
1139
1398
  static version(): string;
1140
1399
  }
1141
1400
  type JsonRawData = Uint8Array;
1142
- export declare class WireE2eIdentity {
1401
+ export declare class E2eiEnrollment {
1143
1402
  #private;
1144
1403
  /** @hidden */
1145
1404
  constructor(e2ei: unknown);
@@ -1156,7 +1415,7 @@ export declare class WireE2eIdentity {
1156
1415
  * @param directory HTTP response body
1157
1416
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.1.1
1158
1417
  */
1159
- directoryResponse(directory: JsonRawData): AcmeDirectory;
1418
+ directoryResponse(directory: JsonRawData): Promise<AcmeDirectory>;
1160
1419
  /**
1161
1420
  * For creating a new acme account. This returns a signed JWS-alike request body to send to
1162
1421
  * `POST /acme/{provisioner-name}/new-account`.
@@ -1164,27 +1423,27 @@ export declare class WireE2eIdentity {
1164
1423
  * @param previousNonce you got from calling `HEAD {@link AcmeDirectory.newNonce}`
1165
1424
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
1166
1425
  */
1167
- newAccountRequest(previousNonce: string): JsonRawData;
1426
+ newAccountRequest(previousNonce: string): Promise<JsonRawData>;
1168
1427
  /**
1169
1428
  * Parses the response from `POST /acme/{provisioner-name}/new-account`.
1170
1429
  * @param account HTTP response body
1171
1430
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
1172
1431
  */
1173
- newAccountResponse(account: JsonRawData): void;
1432
+ newAccountResponse(account: JsonRawData): Promise<void>;
1174
1433
  /**
1175
1434
  * Creates a new acme order for the handle (userId + display name) and the clientId.
1176
1435
  *
1177
1436
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
1178
1437
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1179
1438
  */
1180
- newOrderRequest(previousNonce: string): JsonRawData;
1439
+ newOrderRequest(previousNonce: string): Promise<JsonRawData>;
1181
1440
  /**
1182
1441
  * Parses the response from `POST /acme/{provisioner-name}/new-order`.
1183
1442
  *
1184
1443
  * @param order HTTP response body
1185
1444
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1186
1445
  */
1187
- newOrderResponse(order: JsonRawData): NewAcmeOrder;
1446
+ newOrderResponse(order: JsonRawData): Promise<NewAcmeOrder>;
1188
1447
  /**
1189
1448
  * Creates a new authorization request.
1190
1449
  *
@@ -1193,14 +1452,14 @@ export declare class WireE2eIdentity {
1193
1452
  * previous to this method if you are creating the second authorization)
1194
1453
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
1195
1454
  */
1196
- newAuthzRequest(url: string, previousNonce: string): JsonRawData;
1455
+ newAuthzRequest(url: string, previousNonce: string): Promise<JsonRawData>;
1197
1456
  /**
1198
1457
  * Parses the response from `POST /acme/{provisioner-name}/authz/{authz-id}`
1199
1458
  *
1200
1459
  * @param authz HTTP response body
1201
1460
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
1202
1461
  */
1203
- newAuthzResponse(authz: JsonRawData): NewAcmeAuthz;
1462
+ newAuthzResponse(authz: JsonRawData): Promise<NewAcmeAuthz>;
1204
1463
  /**
1205
1464
  * Generates a new client Dpop JWT token. It demonstrates proof of possession of the nonces
1206
1465
  * (from wire-server & acme server) and will be verified by the acme server when verifying the
@@ -1212,7 +1471,7 @@ export declare class WireE2eIdentity {
1212
1471
  * @param expirySecs of the client Dpop JWT. This should be equal to the grace period set in Team Management
1213
1472
  * @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}
1214
1473
  */
1215
- createDpopToken(expirySecs: number, backendNonce: string): Uint8Array;
1474
+ createDpopToken(expirySecs: number, backendNonce: string): Promise<Uint8Array>;
1216
1475
  /**
1217
1476
  * Creates a new challenge request for Wire Dpop challenge.
1218
1477
  *
@@ -1220,7 +1479,14 @@ export declare class WireE2eIdentity {
1220
1479
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
1221
1480
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1222
1481
  */
1223
- newDpopChallengeRequest(accessToken: string, previousNonce: string): JsonRawData;
1482
+ newDpopChallengeRequest(accessToken: string, previousNonce: string): Promise<JsonRawData>;
1483
+ /**
1484
+ * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}` for the DPoP challenge.
1485
+ *
1486
+ * @param challenge HTTP response body
1487
+ * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1488
+ */
1489
+ newDpopChallengeResponse(challenge: JsonRawData): Promise<void>;
1224
1490
  /**
1225
1491
  * Creates a new challenge request for Wire Oidc challenge.
1226
1492
  *
@@ -1228,14 +1494,15 @@ export declare class WireE2eIdentity {
1228
1494
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
1229
1495
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1230
1496
  */
1231
- newOidcChallengeRequest(idToken: string, previousNonce: string): JsonRawData;
1497
+ newOidcChallengeRequest(idToken: string, previousNonce: string): Promise<JsonRawData>;
1232
1498
  /**
1233
- * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}`.
1499
+ * Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}` for the OIDC challenge.
1234
1500
  *
1501
+ * @param cc the CoreCrypto instance
1235
1502
  * @param challenge HTTP response body
1236
1503
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1237
1504
  */
1238
- newChallengeResponse(challenge: JsonRawData): void;
1505
+ newOidcChallengeResponse(challenge: JsonRawData): Promise<void>;
1239
1506
  /**
1240
1507
  * Verifies that the previous challenge has been completed.
1241
1508
  *
@@ -1243,22 +1510,22 @@ export declare class WireE2eIdentity {
1243
1510
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/challenge/{challenge-id}`
1244
1511
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1245
1512
  */
1246
- checkOrderRequest(orderUrl: string, previousNonce: string): JsonRawData;
1513
+ checkOrderRequest(orderUrl: string, previousNonce: string): Promise<JsonRawData>;
1247
1514
  /**
1248
1515
  * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}`.
1249
1516
  *
1250
1517
  * @param order HTTP response body
1251
- * @return the finalize url to use with {@link finalizeRequest}
1518
+ * @return finalize url to use with {@link finalizeRequest}
1252
1519
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1253
1520
  */
1254
- checkOrderResponse(order: JsonRawData): string;
1521
+ checkOrderResponse(order: JsonRawData): Promise<string>;
1255
1522
  /**
1256
1523
  * Final step before fetching the certificate.
1257
1524
  *
1258
1525
  * @param previousNonce - `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
1259
1526
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1260
1527
  */
1261
- finalizeRequest(previousNonce: string): JsonRawData;
1528
+ finalizeRequest(previousNonce: string): Promise<JsonRawData>;
1262
1529
  /**
1263
1530
  * Parses the response from `POST /acme/{provisioner-name}/order/{order-id}/finalize`.
1264
1531
  *
@@ -1266,105 +1533,14 @@ export declare class WireE2eIdentity {
1266
1533
  * @return the certificate url to use with {@link certificateRequest}
1267
1534
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1268
1535
  */
1269
- finalizeResponse(finalize: JsonRawData): string;
1536
+ finalizeResponse(finalize: JsonRawData): Promise<string>;
1270
1537
  /**
1271
1538
  * Creates a request for finally fetching the x509 certificate.
1272
1539
  *
1273
1540
  * @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}/finalize`
1274
1541
  * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
1275
1542
  */
1276
- certificateRequest(previousNonce: string): JsonRawData;
1277
- }
1278
- /**
1279
- * Holds URLs of all the standard ACME endpoint supported on an ACME server.
1280
- * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.1.1
1281
- */
1282
- export interface AcmeDirectory {
1283
- /**
1284
- * URL for fetching a new nonce. Use this only for creating a new account.
1285
- *
1286
- * @readonly
1287
- */
1288
- newNonce: string;
1289
- /**
1290
- * URL for creating a new account.
1291
- *
1292
- * @readonly
1293
- */
1294
- newAccount: string;
1295
- /**
1296
- * URL for creating a new order.
1297
- *
1298
- * @readonly
1299
- */
1300
- newOrder: string;
1301
- }
1302
- /**
1303
- * Result of an order creation
1304
- * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
1305
- */
1306
- export interface NewAcmeOrder {
1307
- /**
1308
- * Contains raw JSON data of this order. This is parsed by the underlying Rust library hence should not be accessed
1309
- *
1310
- * @readonly
1311
- */
1312
- delegate: Uint8Array;
1313
- /**
1314
- * An authorization for each domain to create
1315
- *
1316
- * @readonly
1317
- */
1318
- authorizations: Uint8Array[];
1319
- }
1320
- /**
1321
- * Result of an authorization creation.
1322
- * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
1323
- */
1324
- export interface NewAcmeAuthz {
1325
- /**
1326
- * DNS entry associated with those challenge
1327
- *
1328
- * @readonly
1329
- */
1330
- identifier: string;
1331
- /**
1332
- * Challenge for the clientId
1333
- *
1334
- * @readonly
1335
- */
1336
- wireDpopChallenge?: AcmeChallenge;
1337
- /**
1338
- * Challenge for the userId and displayName
1339
- *
1340
- * @readonly
1341
- */
1342
- wireOidcChallenge?: AcmeChallenge;
1343
- }
1344
- /**
1345
- * For creating a challenge
1346
- * @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
1347
- */
1348
- export interface AcmeChallenge {
1349
- /**
1350
- * Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be accessed
1351
- *
1352
- * @readonly
1353
- */
1354
- delegate: Uint8Array;
1355
- /**
1356
- * URL of this challenge
1357
- *
1358
- * @readonly
1359
- */
1360
- url: string;
1361
- /**
1362
- * Non-standard, Wire specific claim. Indicates the consumer from where it should get the challenge proof.
1363
- * Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint for an OIDC challenge
1364
- *
1365
- * @readonly
1366
- */
1367
- target: string;
1543
+ certificateRequest(previousNonce: string): Promise<JsonRawData>;
1368
1544
  }
1369
1545
  /**
1370
1546
  * Indicates the state of a Conversation regarding end-to-end identity.
@@ -1379,9 +1555,9 @@ export declare enum E2eiConversationState {
1379
1555
  /**
1380
1556
  * Some clients are either still Basic or their certificate is expired
1381
1557
  */
1382
- Degraded = 2,
1558
+ NotVerified = 2,
1383
1559
  /**
1384
- * All clients are still Basic. If all client have expired certificates, Degraded is returned.
1560
+ * All clients are still Basic. If all client have expired certificates, NotVerified is returned.
1385
1561
  */
1386
1562
  NotEnabled = 3
1387
1563
  }