@wireapp/core-crypto 10.5.4 → 11.0.0-pre.3

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.
@@ -109,7 +109,159 @@ export declare enum MlsError_Tags {
109
109
  * Errors produced by the MLS layer.
110
110
  */
111
111
  export declare const MlsError: Readonly<{
112
- instanceOf: (obj: any) => obj is MlsError;
112
+ instanceOf: (obj: any) => obj is {
113
+ readonly tag: MlsError_Tags.ConversationAlreadyExists;
114
+ readonly inner: Readonly<{
115
+ conversationId: Uint8Array;
116
+ }>;
117
+ /**
118
+ * @private
119
+ * This field is private and should not be used, use `tag` instead.
120
+ */
121
+ readonly [uniffiTypeNameSymbol]: "MlsError";
122
+ name: string;
123
+ message: string;
124
+ stack?: string;
125
+ cause?: unknown;
126
+ } | {
127
+ readonly tag: MlsError_Tags.DuplicateMessage;
128
+ /**
129
+ * @private
130
+ * This field is private and should not be used, use `tag` instead.
131
+ */
132
+ readonly [uniffiTypeNameSymbol]: "MlsError";
133
+ name: string;
134
+ message: string;
135
+ stack?: string;
136
+ cause?: unknown;
137
+ } | {
138
+ readonly tag: MlsError_Tags.BufferedFutureMessage;
139
+ /**
140
+ * @private
141
+ * This field is private and should not be used, use `tag` instead.
142
+ */
143
+ readonly [uniffiTypeNameSymbol]: "MlsError";
144
+ name: string;
145
+ message: string;
146
+ stack?: string;
147
+ cause?: unknown;
148
+ } | {
149
+ readonly tag: MlsError_Tags.WrongEpoch;
150
+ /**
151
+ * @private
152
+ * This field is private and should not be used, use `tag` instead.
153
+ */
154
+ readonly [uniffiTypeNameSymbol]: "MlsError";
155
+ name: string;
156
+ message: string;
157
+ stack?: string;
158
+ cause?: unknown;
159
+ } | {
160
+ readonly tag: MlsError_Tags.BufferedCommit;
161
+ /**
162
+ * @private
163
+ * This field is private and should not be used, use `tag` instead.
164
+ */
165
+ readonly [uniffiTypeNameSymbol]: "MlsError";
166
+ name: string;
167
+ message: string;
168
+ stack?: string;
169
+ cause?: unknown;
170
+ } | {
171
+ readonly tag: MlsError_Tags.MessageEpochTooOld;
172
+ /**
173
+ * @private
174
+ * This field is private and should not be used, use `tag` instead.
175
+ */
176
+ readonly [uniffiTypeNameSymbol]: "MlsError";
177
+ name: string;
178
+ message: string;
179
+ stack?: string;
180
+ cause?: unknown;
181
+ } | {
182
+ readonly tag: MlsError_Tags.SelfCommitIgnored;
183
+ /**
184
+ * @private
185
+ * This field is private and should not be used, use `tag` instead.
186
+ */
187
+ readonly [uniffiTypeNameSymbol]: "MlsError";
188
+ name: string;
189
+ message: string;
190
+ stack?: string;
191
+ cause?: unknown;
192
+ } | {
193
+ readonly tag: MlsError_Tags.UnmergedPendingGroup;
194
+ /**
195
+ * @private
196
+ * This field is private and should not be used, use `tag` instead.
197
+ */
198
+ readonly [uniffiTypeNameSymbol]: "MlsError";
199
+ name: string;
200
+ message: string;
201
+ stack?: string;
202
+ cause?: unknown;
203
+ } | {
204
+ readonly tag: MlsError_Tags.StaleProposal;
205
+ /**
206
+ * @private
207
+ * This field is private and should not be used, use `tag` instead.
208
+ */
209
+ readonly [uniffiTypeNameSymbol]: "MlsError";
210
+ name: string;
211
+ message: string;
212
+ stack?: string;
213
+ cause?: unknown;
214
+ } | {
215
+ readonly tag: MlsError_Tags.StaleCommit;
216
+ /**
217
+ * @private
218
+ * This field is private and should not be used, use `tag` instead.
219
+ */
220
+ readonly [uniffiTypeNameSymbol]: "MlsError";
221
+ name: string;
222
+ message: string;
223
+ stack?: string;
224
+ cause?: unknown;
225
+ } | {
226
+ readonly tag: MlsError_Tags.OrphanWelcome;
227
+ /**
228
+ * @private
229
+ * This field is private and should not be used, use `tag` instead.
230
+ */
231
+ readonly [uniffiTypeNameSymbol]: "MlsError";
232
+ name: string;
233
+ message: string;
234
+ stack?: string;
235
+ cause?: unknown;
236
+ } | {
237
+ readonly tag: MlsError_Tags.MessageRejected;
238
+ readonly inner: Readonly<{
239
+ reason: string;
240
+ }>;
241
+ /**
242
+ * @private
243
+ * This field is private and should not be used, use `tag` instead.
244
+ */
245
+ readonly [uniffiTypeNameSymbol]: "MlsError";
246
+ name: string;
247
+ message: string;
248
+ stack?: string;
249
+ cause?: unknown;
250
+ } | {
251
+ readonly tag: MlsError_Tags.Other;
252
+ readonly inner: Readonly<{
253
+ msg: string;
254
+ }>;
255
+ /**
256
+ * @private
257
+ * This field is private and should not be used, use `tag` instead.
258
+ */
259
+ readonly [uniffiTypeNameSymbol]: "MlsError";
260
+ name: string;
261
+ message: string;
262
+ stack?: string;
263
+ cause?: unknown;
264
+ };
113
265
  ConversationAlreadyExists: {
114
266
  new (inner: {
115
267
  conversationId: Uint8Array;
@@ -939,7 +1091,54 @@ export declare enum ProteusError_Tags {
939
1091
  * Errors produced by the Proteus layer.
940
1092
  */
941
1093
  export declare const ProteusError: Readonly<{
942
- instanceOf: (obj: any) => obj is ProteusError;
1094
+ instanceOf: (obj: any) => obj is {
1095
+ readonly tag: ProteusError_Tags.SessionNotFound;
1096
+ /**
1097
+ * @private
1098
+ * This field is private and should not be used, use `tag` instead.
1099
+ */
1100
+ readonly [uniffiTypeNameSymbol]: "ProteusError";
1101
+ name: string;
1102
+ message: string;
1103
+ stack?: string;
1104
+ cause?: unknown;
1105
+ } | {
1106
+ readonly tag: ProteusError_Tags.DuplicateMessage;
1107
+ /**
1108
+ * @private
1109
+ * This field is private and should not be used, use `tag` instead.
1110
+ */
1111
+ readonly [uniffiTypeNameSymbol]: "ProteusError";
1112
+ name: string;
1113
+ message: string;
1114
+ stack?: string;
1115
+ cause?: unknown;
1116
+ } | {
1117
+ readonly tag: ProteusError_Tags.RemoteIdentityChanged;
1118
+ /**
1119
+ * @private
1120
+ * This field is private and should not be used, use `tag` instead.
1121
+ */
1122
+ readonly [uniffiTypeNameSymbol]: "ProteusError";
1123
+ name: string;
1124
+ message: string;
1125
+ stack?: string;
1126
+ cause?: unknown;
1127
+ } | {
1128
+ readonly tag: ProteusError_Tags.Other;
1129
+ readonly inner: Readonly<{
1130
+ errorCode: number;
1131
+ }>;
1132
+ /**
1133
+ * @private
1134
+ * This field is private and should not be used, use `tag` instead.
1135
+ */
1136
+ readonly [uniffiTypeNameSymbol]: "ProteusError";
1137
+ name: string;
1138
+ message: string;
1139
+ stack?: string;
1140
+ cause?: unknown;
1141
+ };
943
1142
  SessionNotFound: {
944
1143
  new (): {
945
1144
  readonly tag: ProteusError_Tags.SessionNotFound;
@@ -1202,6 +1401,7 @@ export declare enum CoreCryptoError_Tags {
1202
1401
  Mls = "Mls",
1203
1402
  Proteus = "Proteus",
1204
1403
  E2ei = "E2ei",
1404
+ RustyJwt = "RustyJwt",
1205
1405
  TransactionFailed = "TransactionFailed",
1206
1406
  Other = "Other"
1207
1407
  }
@@ -1209,7 +1409,91 @@ export declare enum CoreCryptoError_Tags {
1209
1409
  * The primary error type returned across the CoreCrypto FFI boundary.
1210
1410
  */
1211
1411
  export declare const CoreCryptoError: Readonly<{
1212
- instanceOf: (obj: any) => obj is CoreCryptoError;
1412
+ instanceOf: (obj: any) => obj is {
1413
+ readonly tag: CoreCryptoError_Tags.Mls;
1414
+ readonly inner: Readonly<{
1415
+ mlsError: MlsError;
1416
+ }>;
1417
+ /**
1418
+ * @private
1419
+ * This field is private and should not be used, use `tag` instead.
1420
+ */
1421
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1422
+ name: string;
1423
+ message: string;
1424
+ stack?: string;
1425
+ cause?: unknown;
1426
+ } | {
1427
+ readonly tag: CoreCryptoError_Tags.Proteus;
1428
+ readonly inner: Readonly<{
1429
+ exception: ProteusError;
1430
+ }>;
1431
+ /**
1432
+ * @private
1433
+ * This field is private and should not be used, use `tag` instead.
1434
+ */
1435
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1436
+ name: string;
1437
+ message: string;
1438
+ stack?: string;
1439
+ cause?: unknown;
1440
+ } | {
1441
+ readonly tag: CoreCryptoError_Tags.E2ei;
1442
+ readonly inner: Readonly<{
1443
+ e2eiError: string;
1444
+ }>;
1445
+ /**
1446
+ * @private
1447
+ * This field is private and should not be used, use `tag` instead.
1448
+ */
1449
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1450
+ name: string;
1451
+ message: string;
1452
+ stack?: string;
1453
+ cause?: unknown;
1454
+ } | {
1455
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1456
+ readonly inner: Readonly<{
1457
+ msg: string;
1458
+ }>;
1459
+ /**
1460
+ * @private
1461
+ * This field is private and should not be used, use `tag` instead.
1462
+ */
1463
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1464
+ name: string;
1465
+ message: string;
1466
+ stack?: string;
1467
+ cause?: unknown;
1468
+ } | {
1469
+ readonly tag: CoreCryptoError_Tags.TransactionFailed;
1470
+ readonly inner: Readonly<{
1471
+ error: string;
1472
+ }>;
1473
+ /**
1474
+ * @private
1475
+ * This field is private and should not be used, use `tag` instead.
1476
+ */
1477
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1478
+ name: string;
1479
+ message: string;
1480
+ stack?: string;
1481
+ cause?: unknown;
1482
+ } | {
1483
+ readonly tag: CoreCryptoError_Tags.Other;
1484
+ readonly inner: Readonly<{
1485
+ msg: string;
1486
+ }>;
1487
+ /**
1488
+ * @private
1489
+ * This field is private and should not be used, use `tag` instead.
1490
+ */
1491
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1492
+ name: string;
1493
+ message: string;
1494
+ stack?: string;
1495
+ cause?: unknown;
1496
+ };
1213
1497
  Mls: {
1214
1498
  new (inner: {
1215
1499
  mlsError: MlsError;
@@ -1474,6 +1758,94 @@ export declare const CoreCryptoError: Readonly<{
1474
1758
  stackTraceLimit: number;
1475
1759
  isError(value: unknown): value is Error;
1476
1760
  };
1761
+ RustyJwt: {
1762
+ new (inner: {
1763
+ msg: string;
1764
+ }): {
1765
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1766
+ readonly inner: Readonly<{
1767
+ msg: string;
1768
+ }>;
1769
+ /**
1770
+ * @private
1771
+ * This field is private and should not be used, use `tag` instead.
1772
+ */
1773
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1774
+ name: string;
1775
+ message: string;
1776
+ stack?: string;
1777
+ cause?: unknown;
1778
+ };
1779
+ "new"(inner: {
1780
+ msg: string;
1781
+ }): {
1782
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1783
+ readonly inner: Readonly<{
1784
+ msg: string;
1785
+ }>;
1786
+ /**
1787
+ * @private
1788
+ * This field is private and should not be used, use `tag` instead.
1789
+ */
1790
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1791
+ name: string;
1792
+ message: string;
1793
+ stack?: string;
1794
+ cause?: unknown;
1795
+ };
1796
+ instanceOf(obj: any): obj is {
1797
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1798
+ readonly inner: Readonly<{
1799
+ msg: string;
1800
+ }>;
1801
+ /**
1802
+ * @private
1803
+ * This field is private and should not be used, use `tag` instead.
1804
+ */
1805
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1806
+ name: string;
1807
+ message: string;
1808
+ stack?: string;
1809
+ cause?: unknown;
1810
+ };
1811
+ hasInner(obj: any): obj is {
1812
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1813
+ readonly inner: Readonly<{
1814
+ msg: string;
1815
+ }>;
1816
+ /**
1817
+ * @private
1818
+ * This field is private and should not be used, use `tag` instead.
1819
+ */
1820
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1821
+ name: string;
1822
+ message: string;
1823
+ stack?: string;
1824
+ cause?: unknown;
1825
+ };
1826
+ getInner(obj: {
1827
+ readonly tag: CoreCryptoError_Tags.RustyJwt;
1828
+ readonly inner: Readonly<{
1829
+ msg: string;
1830
+ }>;
1831
+ /**
1832
+ * @private
1833
+ * This field is private and should not be used, use `tag` instead.
1834
+ */
1835
+ readonly [uniffiTypeNameSymbol]: "CoreCryptoError";
1836
+ name: string;
1837
+ message: string;
1838
+ stack?: string;
1839
+ cause?: unknown;
1840
+ }): Readonly<{
1841
+ msg: string;
1842
+ }>;
1843
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1844
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1845
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1846
+ stackTraceLimit: number;
1847
+ isError(value: unknown): value is Error;
1848
+ };
1477
1849
  TransactionFailed: {
1478
1850
  new (inner: {
1479
1851
  error: string;
@@ -1654,7 +2026,7 @@ export declare const CoreCryptoError: Readonly<{
1654
2026
  /**
1655
2027
  * The primary error type returned across the CoreCrypto FFI boundary.
1656
2028
  */
1657
- export type CoreCryptoError = InstanceType<typeof CoreCryptoError["Mls" | "Proteus" | "E2ei" | "TransactionFailed" | "Other"]>;
2029
+ export type CoreCryptoError = InstanceType<typeof CoreCryptoError["Mls" | "Proteus" | "E2ei" | "RustyJwt" | "TransactionFailed" | "Other"]>;
1658
2030
  type WelcomeLike = Welcome;
1659
2031
  /**
1660
2032
  * A TLS-serialized Welcome message.
@@ -1786,6 +2158,8 @@ export declare class ClientId extends UniffiAbstractObject {
1786
2158
  copyBytes(): Uint8Array;
1787
2159
  /**
1788
2160
  * Copy the wrapped data into a direct representation of the `<user-id>:<device-id>@<domain>` format.
2161
+ *
2162
+ * Fails for history client ids, as they don't have that format.
1789
2163
  */
1790
2164
  deserialize(): DeserializedClientId;
1791
2165
  equals(other: ClientId): boolean;
@@ -1843,6 +2217,11 @@ export declare class DeviceId extends UniffiAbstractObject {
1843
2217
  /**
1844
2218
  * This directly represents a `ClientId` of the `<userid>:<device-id>@<domain>` format.
1845
2219
  * Instantiate via [ClientId::deserialize].
2220
+ *
2221
+ * Its `Display` reproduces the bytes of the [`ClientId`] it came from, so the device id is
2222
+ * rendered as unpadded hex. Note that this differs from [`DeviceId::to_hex_string`], which is
2223
+ * fixed-width: a client id is not a hex-encoded binary value, and only the unpadded form matches
2224
+ * what an E2EI certificate carries.
1846
2225
  */
1847
2226
  export type DeserializedClientId = {
1848
2227
  /**
@@ -2106,7 +2485,51 @@ export declare enum CipherSuite {
2106
2485
  /**
2107
2486
  * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
2108
2487
  */
2109
- Mls256Dhkemp384Aes256gcmSha384P384 = 7
2488
+ Mls256Dhkemp384Aes256gcmSha384P384 = 7,
2489
+ /**
2490
+ * ML-KEM-768+X25519 hybrid KEM | AES-GCM 128 | SHA2-256 | Ed25519
2491
+ */
2492
+ Mls128Mlkem768x25519Aes128gcmSha256Ed25519 = 61441,
2493
+ /**
2494
+ * ML-KEM-768+X25519 hybrid KEM | AES-GCM 256 | SHA2-384 | Ed25519
2495
+ */
2496
+ Mls128Mlkem768x25519Aes256gcmSha384Ed25519 = 61442,
2497
+ /**
2498
+ * ML-KEM-768+P-256 hybrid KEM | AES-GCM 128 | SHA2-256 | ECDSA P-256
2499
+ */
2500
+ Mls128Mlkem768p256Aes128gcmSha256P256 = 61443,
2501
+ /**
2502
+ * ML-KEM-768+P-256 hybrid KEM | AES-GCM 256 | SHA2-384 | ECDSA P-256
2503
+ */
2504
+ Mls128Mlkem768p256Aes256gcmSha384P256 = 61444,
2505
+ /**
2506
+ * ML-KEM-1024+P-384 hybrid KEM | AES-GCM 256 | SHA2-384 | ECDSA P-384
2507
+ */
2508
+ Mls192Mlkem1024p384Aes256gcmSha384P384 = 61445,
2509
+ /**
2510
+ * ML-KEM-768 (pure) | AES-GCM 256 | SHA2-384 | Ed25519
2511
+ */
2512
+ Mls128Mlkem768Aes256gcmSha384Ed25519 = 61446,
2513
+ /**
2514
+ * ML-KEM-768 (pure) | AES-GCM 256 | SHA2-384 | ECDSA P-256
2515
+ */
2516
+ Mls128Mlkem768Aes256gcmSha384P256 = 61447,
2517
+ /**
2518
+ * ML-KEM-1024 (pure) | AES-GCM 256 | SHA2-384 | ECDSA P-384
2519
+ */
2520
+ Mls192Mlkem1024Aes256gcmSha384P384 = 61448,
2521
+ /**
2522
+ * ML-KEM-768+X25519 hybrid KEM | ChaCha20Poly1305 | SHA2-384 | ML-DSA-44
2523
+ */
2524
+ Mls128Mlkem768x25519Chacha20poly1305Sha384Mldsa44 = 61449,
2525
+ /**
2526
+ * ML-KEM-768 (pure) | AES-GCM 256 | SHA2-384 | ML-DSA-65
2527
+ */
2528
+ Mls192Mlkem768Aes256gcmSha384Mldsa65 = 61450,
2529
+ /**
2530
+ * ML-KEM-1024 (pure) | AES-GCM 256 | SHA2-384 | ML-DSA-87
2531
+ */
2532
+ Mls256Mlkem1024Aes256gcmSha384Mldsa87 = 61451
2110
2533
  }
2111
2534
  /**
2112
2535
  * Configuration for an X509 credential acquisition flow.
@@ -2154,23 +2577,96 @@ export declare const X509CredentialAcquisitionConfiguration: Readonly<{
2154
2577
  defaults: () => Partial<X509CredentialAcquisitionConfiguration>;
2155
2578
  }>;
2156
2579
  declare enum BufferedDecryptedMessage_Tags {
2157
- Text = "Text",
2580
+ ApplicationMessage = "ApplicationMessage",
2158
2581
  Commit = "Commit",
2159
- Proposal = "Proposal"
2582
+ Proposal = "Proposal",
2583
+ Transient = "Transient",
2584
+ TransientTargeted = "TransientTargeted",
2585
+ PersistedTargeted = "PersistedTargeted"
2160
2586
  }
2161
2587
  /**
2162
2588
  * A decrypted message that was buffered due to out-of-order delivery by the delivery service.
2163
2589
  * It represents messages for the new epoch that arrived before the commit that created it.
2164
2590
  */
2165
2591
  export declare const BufferedDecryptedMessage: Readonly<{
2166
- instanceOf: (obj: any) => obj is BufferedDecryptedMessage;
2167
- Text: {
2592
+ instanceOf: (obj: any) => obj is {
2593
+ readonly tag: BufferedDecryptedMessage_Tags.ApplicationMessage;
2594
+ readonly inner: Readonly<{
2595
+ plaintext: Uint8Array;
2596
+ senderClientId: ClientIdLike;
2597
+ identity: WireIdentity;
2598
+ }>;
2599
+ /**
2600
+ * @private
2601
+ * This field is private and should not be used, use `tag` instead.
2602
+ */
2603
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2604
+ } | {
2605
+ readonly tag: BufferedDecryptedMessage_Tags.Commit;
2606
+ readonly inner: Readonly<{
2607
+ isActive: boolean;
2608
+ identity: WireIdentity;
2609
+ }>;
2610
+ /**
2611
+ * @private
2612
+ * This field is private and should not be used, use `tag` instead.
2613
+ */
2614
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2615
+ } | {
2616
+ readonly tag: BufferedDecryptedMessage_Tags.Proposal;
2617
+ readonly inner: Readonly<{
2618
+ delay?: bigint;
2619
+ identity: WireIdentity;
2620
+ }>;
2621
+ /**
2622
+ * @private
2623
+ * This field is private and should not be used, use `tag` instead.
2624
+ */
2625
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2626
+ } | {
2627
+ readonly tag: BufferedDecryptedMessage_Tags.Transient;
2628
+ readonly inner: Readonly<{
2629
+ plaintext: Uint8Array;
2630
+ senderClientId: ClientIdLike;
2631
+ identity: WireIdentity;
2632
+ }>;
2633
+ /**
2634
+ * @private
2635
+ * This field is private and should not be used, use `tag` instead.
2636
+ */
2637
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2638
+ } | {
2639
+ readonly tag: BufferedDecryptedMessage_Tags.TransientTargeted;
2640
+ readonly inner: Readonly<{
2641
+ plaintext: Uint8Array;
2642
+ senderClientId: ClientIdLike;
2643
+ identity: WireIdentity;
2644
+ }>;
2645
+ /**
2646
+ * @private
2647
+ * This field is private and should not be used, use `tag` instead.
2648
+ */
2649
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2650
+ } | {
2651
+ readonly tag: BufferedDecryptedMessage_Tags.PersistedTargeted;
2652
+ readonly inner: Readonly<{
2653
+ plaintext: Uint8Array;
2654
+ senderClientId: ClientIdLike;
2655
+ identity: WireIdentity;
2656
+ }>;
2657
+ /**
2658
+ * @private
2659
+ * This field is private and should not be used, use `tag` instead.
2660
+ */
2661
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2662
+ };
2663
+ ApplicationMessage: {
2168
2664
  new (inner: {
2169
2665
  plaintext: Uint8Array;
2170
2666
  senderClientId: ClientIdLike;
2171
2667
  identity: WireIdentity;
2172
2668
  }): {
2173
- readonly tag: BufferedDecryptedMessage_Tags.Text;
2669
+ readonly tag: BufferedDecryptedMessage_Tags.ApplicationMessage;
2174
2670
  readonly inner: Readonly<{
2175
2671
  plaintext: Uint8Array;
2176
2672
  senderClientId: ClientIdLike;
@@ -2187,7 +2683,7 @@ export declare const BufferedDecryptedMessage: Readonly<{
2187
2683
  senderClientId: ClientIdLike;
2188
2684
  identity: WireIdentity;
2189
2685
  }): {
2190
- readonly tag: BufferedDecryptedMessage_Tags.Text;
2686
+ readonly tag: BufferedDecryptedMessage_Tags.ApplicationMessage;
2191
2687
  readonly inner: Readonly<{
2192
2688
  plaintext: Uint8Array;
2193
2689
  senderClientId: ClientIdLike;
@@ -2200,7 +2696,7 @@ export declare const BufferedDecryptedMessage: Readonly<{
2200
2696
  readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2201
2697
  };
2202
2698
  instanceOf(obj: any): obj is {
2203
- readonly tag: BufferedDecryptedMessage_Tags.Text;
2699
+ readonly tag: BufferedDecryptedMessage_Tags.ApplicationMessage;
2204
2700
  readonly inner: Readonly<{
2205
2701
  plaintext: Uint8Array;
2206
2702
  senderClientId: ClientIdLike;
@@ -2301,12 +2797,159 @@ export declare const BufferedDecryptedMessage: Readonly<{
2301
2797
  readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2302
2798
  };
2303
2799
  };
2800
+ Transient: {
2801
+ new (inner: {
2802
+ plaintext: Uint8Array;
2803
+ senderClientId: ClientIdLike;
2804
+ identity: WireIdentity;
2805
+ }): {
2806
+ readonly tag: BufferedDecryptedMessage_Tags.Transient;
2807
+ readonly inner: Readonly<{
2808
+ plaintext: Uint8Array;
2809
+ senderClientId: ClientIdLike;
2810
+ identity: WireIdentity;
2811
+ }>;
2812
+ /**
2813
+ * @private
2814
+ * This field is private and should not be used, use `tag` instead.
2815
+ */
2816
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2817
+ };
2818
+ "new"(inner: {
2819
+ plaintext: Uint8Array;
2820
+ senderClientId: ClientIdLike;
2821
+ identity: WireIdentity;
2822
+ }): {
2823
+ readonly tag: BufferedDecryptedMessage_Tags.Transient;
2824
+ readonly inner: Readonly<{
2825
+ plaintext: Uint8Array;
2826
+ senderClientId: ClientIdLike;
2827
+ identity: WireIdentity;
2828
+ }>;
2829
+ /**
2830
+ * @private
2831
+ * This field is private and should not be used, use `tag` instead.
2832
+ */
2833
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2834
+ };
2835
+ instanceOf(obj: any): obj is {
2836
+ readonly tag: BufferedDecryptedMessage_Tags.Transient;
2837
+ readonly inner: Readonly<{
2838
+ plaintext: Uint8Array;
2839
+ senderClientId: ClientIdLike;
2840
+ identity: WireIdentity;
2841
+ }>;
2842
+ /**
2843
+ * @private
2844
+ * This field is private and should not be used, use `tag` instead.
2845
+ */
2846
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2847
+ };
2848
+ };
2849
+ TransientTargeted: {
2850
+ new (inner: {
2851
+ plaintext: Uint8Array;
2852
+ senderClientId: ClientIdLike;
2853
+ identity: WireIdentity;
2854
+ }): {
2855
+ readonly tag: BufferedDecryptedMessage_Tags.TransientTargeted;
2856
+ readonly inner: Readonly<{
2857
+ plaintext: Uint8Array;
2858
+ senderClientId: ClientIdLike;
2859
+ identity: WireIdentity;
2860
+ }>;
2861
+ /**
2862
+ * @private
2863
+ * This field is private and should not be used, use `tag` instead.
2864
+ */
2865
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2866
+ };
2867
+ "new"(inner: {
2868
+ plaintext: Uint8Array;
2869
+ senderClientId: ClientIdLike;
2870
+ identity: WireIdentity;
2871
+ }): {
2872
+ readonly tag: BufferedDecryptedMessage_Tags.TransientTargeted;
2873
+ readonly inner: Readonly<{
2874
+ plaintext: Uint8Array;
2875
+ senderClientId: ClientIdLike;
2876
+ identity: WireIdentity;
2877
+ }>;
2878
+ /**
2879
+ * @private
2880
+ * This field is private and should not be used, use `tag` instead.
2881
+ */
2882
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2883
+ };
2884
+ instanceOf(obj: any): obj is {
2885
+ readonly tag: BufferedDecryptedMessage_Tags.TransientTargeted;
2886
+ readonly inner: Readonly<{
2887
+ plaintext: Uint8Array;
2888
+ senderClientId: ClientIdLike;
2889
+ identity: WireIdentity;
2890
+ }>;
2891
+ /**
2892
+ * @private
2893
+ * This field is private and should not be used, use `tag` instead.
2894
+ */
2895
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2896
+ };
2897
+ };
2898
+ PersistedTargeted: {
2899
+ new (inner: {
2900
+ plaintext: Uint8Array;
2901
+ senderClientId: ClientIdLike;
2902
+ identity: WireIdentity;
2903
+ }): {
2904
+ readonly tag: BufferedDecryptedMessage_Tags.PersistedTargeted;
2905
+ readonly inner: Readonly<{
2906
+ plaintext: Uint8Array;
2907
+ senderClientId: ClientIdLike;
2908
+ identity: WireIdentity;
2909
+ }>;
2910
+ /**
2911
+ * @private
2912
+ * This field is private and should not be used, use `tag` instead.
2913
+ */
2914
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2915
+ };
2916
+ "new"(inner: {
2917
+ plaintext: Uint8Array;
2918
+ senderClientId: ClientIdLike;
2919
+ identity: WireIdentity;
2920
+ }): {
2921
+ readonly tag: BufferedDecryptedMessage_Tags.PersistedTargeted;
2922
+ readonly inner: Readonly<{
2923
+ plaintext: Uint8Array;
2924
+ senderClientId: ClientIdLike;
2925
+ identity: WireIdentity;
2926
+ }>;
2927
+ /**
2928
+ * @private
2929
+ * This field is private and should not be used, use `tag` instead.
2930
+ */
2931
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2932
+ };
2933
+ instanceOf(obj: any): obj is {
2934
+ readonly tag: BufferedDecryptedMessage_Tags.PersistedTargeted;
2935
+ readonly inner: Readonly<{
2936
+ plaintext: Uint8Array;
2937
+ senderClientId: ClientIdLike;
2938
+ identity: WireIdentity;
2939
+ }>;
2940
+ /**
2941
+ * @private
2942
+ * This field is private and should not be used, use `tag` instead.
2943
+ */
2944
+ readonly [uniffiTypeNameSymbol]: "BufferedDecryptedMessage";
2945
+ };
2946
+ };
2304
2947
  }>;
2305
2948
  /**
2306
2949
  * A decrypted message that was buffered due to out-of-order delivery by the delivery service.
2307
2950
  * It represents messages for the new epoch that arrived before the commit that created it.
2308
2951
  */
2309
- export type BufferedDecryptedMessage = InstanceType<typeof BufferedDecryptedMessage["Text" | "Commit" | "Proposal"]>;
2952
+ export type BufferedDecryptedMessage = InstanceType<typeof BufferedDecryptedMessage["ApplicationMessage" | "Commit" | "Proposal" | "Transient" | "TransientTargeted" | "PersistedTargeted"]>;
2310
2953
  /**
2311
2954
  * Defines the log level for CoreCrypto.
2312
2955
  */
@@ -2319,22 +2962,96 @@ export declare enum CoreCryptoLogLevel {
2319
2962
  Error = 6
2320
2963
  }
2321
2964
  declare enum DecryptedMessage_Tags {
2322
- Text = "Text",
2965
+ ApplicationMessage = "ApplicationMessage",
2323
2966
  Commit = "Commit",
2324
- Proposal = "Proposal"
2967
+ Proposal = "Proposal",
2968
+ Transient = "Transient",
2969
+ TransientTargeted = "TransientTargeted",
2970
+ PersistedTargeted = "PersistedTargeted"
2325
2971
  }
2326
2972
  /**
2327
2973
  * Represents the items a consumer might require after decrypting a message.
2328
2974
  */
2329
2975
  export declare const DecryptedMessage: Readonly<{
2330
- instanceOf: (obj: any) => obj is DecryptedMessage;
2331
- Text: {
2976
+ instanceOf: (obj: any) => obj is {
2977
+ readonly tag: DecryptedMessage_Tags.ApplicationMessage;
2978
+ readonly inner: Readonly<{
2979
+ plaintext: Uint8Array;
2980
+ senderClientId: ClientIdLike;
2981
+ identity: WireIdentity;
2982
+ }>;
2983
+ /**
2984
+ * @private
2985
+ * This field is private and should not be used, use `tag` instead.
2986
+ */
2987
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
2988
+ } | {
2989
+ readonly tag: DecryptedMessage_Tags.Commit;
2990
+ readonly inner: Readonly<{
2991
+ isActive: boolean;
2992
+ bufferedMessages?: Array<BufferedDecryptedMessage>;
2993
+ identity: WireIdentity;
2994
+ }>;
2995
+ /**
2996
+ * @private
2997
+ * This field is private and should not be used, use `tag` instead.
2998
+ */
2999
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3000
+ } | {
3001
+ readonly tag: DecryptedMessage_Tags.Proposal;
3002
+ readonly inner: Readonly<{
3003
+ delay?: bigint;
3004
+ identity: WireIdentity;
3005
+ }>;
3006
+ /**
3007
+ * @private
3008
+ * This field is private and should not be used, use `tag` instead.
3009
+ */
3010
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3011
+ } | {
3012
+ readonly tag: DecryptedMessage_Tags.Transient;
3013
+ readonly inner: Readonly<{
3014
+ plaintext: Uint8Array;
3015
+ senderClientId: ClientIdLike;
3016
+ identity: WireIdentity;
3017
+ }>;
3018
+ /**
3019
+ * @private
3020
+ * This field is private and should not be used, use `tag` instead.
3021
+ */
3022
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3023
+ } | {
3024
+ readonly tag: DecryptedMessage_Tags.TransientTargeted;
3025
+ readonly inner: Readonly<{
3026
+ plaintext: Uint8Array;
3027
+ senderClientId: ClientIdLike;
3028
+ identity: WireIdentity;
3029
+ }>;
3030
+ /**
3031
+ * @private
3032
+ * This field is private and should not be used, use `tag` instead.
3033
+ */
3034
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3035
+ } | {
3036
+ readonly tag: DecryptedMessage_Tags.PersistedTargeted;
3037
+ readonly inner: Readonly<{
3038
+ plaintext: Uint8Array;
3039
+ senderClientId: ClientIdLike;
3040
+ identity: WireIdentity;
3041
+ }>;
3042
+ /**
3043
+ * @private
3044
+ * This field is private and should not be used, use `tag` instead.
3045
+ */
3046
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3047
+ };
3048
+ ApplicationMessage: {
2332
3049
  new (inner: {
2333
3050
  plaintext: Uint8Array;
2334
3051
  senderClientId: ClientIdLike;
2335
3052
  identity: WireIdentity;
2336
3053
  }): {
2337
- readonly tag: DecryptedMessage_Tags.Text;
3054
+ readonly tag: DecryptedMessage_Tags.ApplicationMessage;
2338
3055
  readonly inner: Readonly<{
2339
3056
  plaintext: Uint8Array;
2340
3057
  senderClientId: ClientIdLike;
@@ -2351,7 +3068,7 @@ export declare const DecryptedMessage: Readonly<{
2351
3068
  senderClientId: ClientIdLike;
2352
3069
  identity: WireIdentity;
2353
3070
  }): {
2354
- readonly tag: DecryptedMessage_Tags.Text;
3071
+ readonly tag: DecryptedMessage_Tags.ApplicationMessage;
2355
3072
  readonly inner: Readonly<{
2356
3073
  plaintext: Uint8Array;
2357
3074
  senderClientId: ClientIdLike;
@@ -2364,7 +3081,7 @@ export declare const DecryptedMessage: Readonly<{
2364
3081
  readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
2365
3082
  };
2366
3083
  instanceOf(obj: any): obj is {
2367
- readonly tag: DecryptedMessage_Tags.Text;
3084
+ readonly tag: DecryptedMessage_Tags.ApplicationMessage;
2368
3085
  readonly inner: Readonly<{
2369
3086
  plaintext: Uint8Array;
2370
3087
  senderClientId: ClientIdLike;
@@ -2470,11 +3187,158 @@ export declare const DecryptedMessage: Readonly<{
2470
3187
  readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
2471
3188
  };
2472
3189
  };
3190
+ Transient: {
3191
+ new (inner: {
3192
+ plaintext: Uint8Array;
3193
+ senderClientId: ClientIdLike;
3194
+ identity: WireIdentity;
3195
+ }): {
3196
+ readonly tag: DecryptedMessage_Tags.Transient;
3197
+ readonly inner: Readonly<{
3198
+ plaintext: Uint8Array;
3199
+ senderClientId: ClientIdLike;
3200
+ identity: WireIdentity;
3201
+ }>;
3202
+ /**
3203
+ * @private
3204
+ * This field is private and should not be used, use `tag` instead.
3205
+ */
3206
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3207
+ };
3208
+ "new"(inner: {
3209
+ plaintext: Uint8Array;
3210
+ senderClientId: ClientIdLike;
3211
+ identity: WireIdentity;
3212
+ }): {
3213
+ readonly tag: DecryptedMessage_Tags.Transient;
3214
+ readonly inner: Readonly<{
3215
+ plaintext: Uint8Array;
3216
+ senderClientId: ClientIdLike;
3217
+ identity: WireIdentity;
3218
+ }>;
3219
+ /**
3220
+ * @private
3221
+ * This field is private and should not be used, use `tag` instead.
3222
+ */
3223
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3224
+ };
3225
+ instanceOf(obj: any): obj is {
3226
+ readonly tag: DecryptedMessage_Tags.Transient;
3227
+ readonly inner: Readonly<{
3228
+ plaintext: Uint8Array;
3229
+ senderClientId: ClientIdLike;
3230
+ identity: WireIdentity;
3231
+ }>;
3232
+ /**
3233
+ * @private
3234
+ * This field is private and should not be used, use `tag` instead.
3235
+ */
3236
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3237
+ };
3238
+ };
3239
+ TransientTargeted: {
3240
+ new (inner: {
3241
+ plaintext: Uint8Array;
3242
+ senderClientId: ClientIdLike;
3243
+ identity: WireIdentity;
3244
+ }): {
3245
+ readonly tag: DecryptedMessage_Tags.TransientTargeted;
3246
+ readonly inner: Readonly<{
3247
+ plaintext: Uint8Array;
3248
+ senderClientId: ClientIdLike;
3249
+ identity: WireIdentity;
3250
+ }>;
3251
+ /**
3252
+ * @private
3253
+ * This field is private and should not be used, use `tag` instead.
3254
+ */
3255
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3256
+ };
3257
+ "new"(inner: {
3258
+ plaintext: Uint8Array;
3259
+ senderClientId: ClientIdLike;
3260
+ identity: WireIdentity;
3261
+ }): {
3262
+ readonly tag: DecryptedMessage_Tags.TransientTargeted;
3263
+ readonly inner: Readonly<{
3264
+ plaintext: Uint8Array;
3265
+ senderClientId: ClientIdLike;
3266
+ identity: WireIdentity;
3267
+ }>;
3268
+ /**
3269
+ * @private
3270
+ * This field is private and should not be used, use `tag` instead.
3271
+ */
3272
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3273
+ };
3274
+ instanceOf(obj: any): obj is {
3275
+ readonly tag: DecryptedMessage_Tags.TransientTargeted;
3276
+ readonly inner: Readonly<{
3277
+ plaintext: Uint8Array;
3278
+ senderClientId: ClientIdLike;
3279
+ identity: WireIdentity;
3280
+ }>;
3281
+ /**
3282
+ * @private
3283
+ * This field is private and should not be used, use `tag` instead.
3284
+ */
3285
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3286
+ };
3287
+ };
3288
+ PersistedTargeted: {
3289
+ new (inner: {
3290
+ plaintext: Uint8Array;
3291
+ senderClientId: ClientIdLike;
3292
+ identity: WireIdentity;
3293
+ }): {
3294
+ readonly tag: DecryptedMessage_Tags.PersistedTargeted;
3295
+ readonly inner: Readonly<{
3296
+ plaintext: Uint8Array;
3297
+ senderClientId: ClientIdLike;
3298
+ identity: WireIdentity;
3299
+ }>;
3300
+ /**
3301
+ * @private
3302
+ * This field is private and should not be used, use `tag` instead.
3303
+ */
3304
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3305
+ };
3306
+ "new"(inner: {
3307
+ plaintext: Uint8Array;
3308
+ senderClientId: ClientIdLike;
3309
+ identity: WireIdentity;
3310
+ }): {
3311
+ readonly tag: DecryptedMessage_Tags.PersistedTargeted;
3312
+ readonly inner: Readonly<{
3313
+ plaintext: Uint8Array;
3314
+ senderClientId: ClientIdLike;
3315
+ identity: WireIdentity;
3316
+ }>;
3317
+ /**
3318
+ * @private
3319
+ * This field is private and should not be used, use `tag` instead.
3320
+ */
3321
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3322
+ };
3323
+ instanceOf(obj: any): obj is {
3324
+ readonly tag: DecryptedMessage_Tags.PersistedTargeted;
3325
+ readonly inner: Readonly<{
3326
+ plaintext: Uint8Array;
3327
+ senderClientId: ClientIdLike;
3328
+ identity: WireIdentity;
3329
+ }>;
3330
+ /**
3331
+ * @private
3332
+ * This field is private and should not be used, use `tag` instead.
3333
+ */
3334
+ readonly [uniffiTypeNameSymbol]: "DecryptedMessage";
3335
+ };
3336
+ };
2473
3337
  }>;
2474
3338
  /**
2475
3339
  * Represents the items a consumer might require after decrypting a message.
2476
3340
  */
2477
- export type DecryptedMessage = InstanceType<typeof DecryptedMessage["Text" | "Commit" | "Proposal"]>;
3341
+ export type DecryptedMessage = InstanceType<typeof DecryptedMessage["ApplicationMessage" | "Commit" | "Proposal" | "Transient" | "TransientTargeted" | "PersistedTargeted"]>;
2478
3342
  /**
2479
3343
  * The end-to-end identity verification state of a conversation.
2480
3344
  *
@@ -2641,7 +3505,21 @@ declare enum MlsTransportError_Tags {
2641
3505
  * Errors returned by MLS transport callbacks exposed through FFI.
2642
3506
  */
2643
3507
  export declare const MlsTransportError: Readonly<{
2644
- instanceOf: (obj: any) => obj is MlsTransportError;
3508
+ instanceOf: (obj: any) => obj is {
3509
+ readonly tag: MlsTransportError_Tags.MessageRejected;
3510
+ readonly inner: Readonly<{
3511
+ reason: string;
3512
+ }>;
3513
+ /**
3514
+ * @private
3515
+ * This field is private and should not be used, use `tag` instead.
3516
+ */
3517
+ readonly [uniffiTypeNameSymbol]: "MlsTransportError";
3518
+ name: string;
3519
+ message: string;
3520
+ stack?: string;
3521
+ cause?: unknown;
3522
+ };
2645
3523
  MessageRejected: {
2646
3524
  new (inner: {
2647
3525
  reason: string;
@@ -2796,7 +3674,21 @@ declare enum PkiEnvironmentHooksError_Tags {
2796
3674
  * An error returned by a `PkiEnvironmentHooks` callback implementation.
2797
3675
  */
2798
3676
  export declare const PkiEnvironmentHooksError: Readonly<{
2799
- instanceOf: (obj: any) => obj is PkiEnvironmentHooksError;
3677
+ instanceOf: (obj: any) => obj is {
3678
+ readonly tag: PkiEnvironmentHooksError_Tags.Error;
3679
+ readonly inner: Readonly<{
3680
+ reason: string;
3681
+ }>;
3682
+ /**
3683
+ * @private
3684
+ * This field is private and should not be used, use `tag` instead.
3685
+ */
3686
+ readonly [uniffiTypeNameSymbol]: "PkiEnvironmentHooksError";
3687
+ name: string;
3688
+ message: string;
3689
+ stack?: string;
3690
+ cause?: unknown;
3691
+ };
2800
3692
  Error: {
2801
3693
  new (inner: {
2802
3694
  reason: string;
@@ -2915,13 +3807,18 @@ export declare enum SignatureScheme {
2915
3807
  */
2916
3808
  Ed448 = 2056
2917
3809
  }
2918
- declare enum TargetedMessagePolicy {
3810
+ /**
3811
+ * The policy to encrypt the targeted message with.
3812
+ */
3813
+ export declare enum TargetedMessagePolicy {
2919
3814
  /**
2920
- * Won't be persisted and will only be visible to currently online members who immediately process it.
3815
+ * The delivery service won't persist this message: it is delivered only to members who are
3816
+ * connected at the time, and dropped for everyone else.
2921
3817
  */
2922
3818
  Transient = 0,
2923
3819
  /**
2924
- * May be persisted and buffered, will also be delivered and processed by currently offline members.
3820
+ * May be persisted and buffered by the delivery service, and so will also be delivered to,
3821
+ * and processed by, members who are currently offline.
2925
3822
  */
2926
3823
  Persisted = 1
2927
3824
  }
@@ -3040,7 +3937,8 @@ declare class Credential$1 extends UniffiAbstractObject {
3040
3937
  /**
3041
3938
  * Get the earliest possible validity of this credential, expressed as seconds after the unix epoch.
3042
3939
  *
3043
- * Basic credentials have no defined earliest validity and will always return 0.
3940
+ * For an X509 credential this is the leaf certificate's `not_before` claim. A basic credential
3941
+ * has no such claim, and reads as the time it was persisted.
3044
3942
  */
3045
3943
  earliestValidity(): bigint;
3046
3944
  /**
@@ -3091,7 +3989,8 @@ export declare class CredentialRef extends UniffiAbstractObject {
3091
3989
  /**
3092
3990
  * Get the earliest possible validity of this credential, expressed as seconds after the unix epoch.
3093
3991
  *
3094
- * Basic credentials have no defined earliest validity and will always return 0.
3992
+ * For an X509 credential this is the leaf certificate's `not_before` claim. A basic credential
3993
+ * has no such claim, and reads as the time it was persisted.
3095
3994
  */
3096
3995
  earliestValidity(): bigint;
3097
3996
  /**
@@ -3132,7 +4031,7 @@ export declare class ExternalSender extends UniffiAbstractObject {
3132
4031
  /**
3133
4032
  * Parse an external sender given a JWK.
3134
4033
  *
3135
- * This expects a raw json serialized JWK. It works with any Signature scheme.
4034
+ * This expects a raw json serialized JWK of an Ed25519 key, or of an ECDSA key on P-256, P-384 or P-521.
3136
4035
  */
3137
4036
  static parseJwk(jwk: Uint8Array): ExternalSenderLike;
3138
4037
  /**
@@ -3214,14 +4113,19 @@ export interface MlsTransport {
3214
4113
  }): Promise<MlsTransportData>;
3215
4114
  }
3216
4115
  type CoreCryptoContextLike = CoreCryptoContext;
3217
- declare class CoreCryptoContext extends UniffiAbstractObject {
4116
+ /**
4117
+ * The `CoreCryptoContext` holds the primary `CoreCrypto` APIs.
4118
+ *
4119
+ * An instance of this struct is provided to the closure passed to `CoreCryptoFfi::transaction`.
4120
+ *
4121
+ * Every mutable operation is done through this struct. Operations are buffered in memory
4122
+ * and persisted to the keystore when the transaction completes.
4123
+ */
4124
+ export declare class CoreCryptoContext extends UniffiAbstractObject {
3218
4125
  readonly [uniffiTypeNameSymbol] = "CoreCryptoContext";
3219
4126
  readonly [destructorGuardSymbol]: UniffiGcObject;
3220
4127
  readonly [pointerLiteralSymbol]: UniffiHandle;
3221
- /**
3222
- * This is only needed to allow TS inheritance and should be hidden from library consumers.
3223
- */
3224
- constructor(instance: CoreCryptoContextLike);
4128
+ private constructor();
3225
4129
  /**
3226
4130
  * Adds members to the conversation using their key packages, sending the resulting commit via the transport.
3227
4131
  */
@@ -3230,12 +4134,6 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3230
4134
  }): Promise<void>;
3231
4135
  /**
3232
4136
  * Adds a `Credential` to this client.
3233
- *
3234
- * Note that while an arbitrary number of credentials can be generated,
3235
- * those which are added to a CoreCrypto instance must be distinct in credential type,
3236
- * signature scheme, and the timestamp of creation. This timestamp has only
3237
- * 1 second of resolution, limiting the number of credentials which
3238
- * can be added. This is a known limitation and will be relaxed in the future.
3239
4137
  */
3240
4138
  addCredential(credential: CredentialLike, asyncOpts_?: {
3241
4139
  signal: AbortSignal;
@@ -3287,7 +4185,10 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3287
4185
  }): Promise<void>;
3288
4186
  /**
3289
4187
  * Decrypts an MLS message received in the given conversation.
3290
- * **Note**: this will discard any local pending operations.
4188
+ *
4189
+ * A commit from another member supersedes any local pending commit and consumes the pending
4190
+ * proposals it references. Our own commit, delivered back to us, is merged. Proposals and
4191
+ * application messages leave local pending state untouched.
3291
4192
  */
3292
4193
  decryptMessage(conversationId: ConversationIdLike, payload: Uint8Array, asyncOpts_?: {
3293
4194
  signal: AbortSignal;
@@ -3304,12 +4205,6 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3304
4205
  e2eiConversationState(conversationId: ConversationIdLike, asyncOpts_?: {
3305
4206
  signal: AbortSignal;
3306
4207
  }): Promise<E2eiConversationState>;
3307
- /**
3308
- * Returns true if end-to-end identity is enabled for the given cipher_suite.
3309
- */
3310
- e2eiIsEnabled(cipherSuite: CipherSuite, asyncOpts_?: {
3311
- signal: AbortSignal;
3312
- }): Promise<boolean>;
3313
4208
  /**
3314
4209
  * Enables history sharing for the given conversation.
3315
4210
  */
@@ -3331,6 +4226,15 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3331
4226
  encryptTargetedMessage(conversationId: ConversationIdLike, recipient: ClientIdLike, policy: TargetedMessagePolicy, message: Uint8Array, asyncOpts_?: {
3332
4227
  signal: AbortSignal;
3333
4228
  }): Promise<Uint8Array>;
4229
+ /**
4230
+ * Encrypts a transient plaintext message for all members of the given conversation.
4231
+ *
4232
+ * Any feature using a targeted, transient or transient targeted message MUST specify why the lower security
4233
+ * guarantees (compared to MLS application messages) are acceptable and/or how they are mitigated.
4234
+ */
4235
+ encryptTransientMessage(conversationId: ConversationIdLike, message: Uint8Array, asyncOpts_?: {
4236
+ signal: AbortSignal;
4237
+ }): Promise<Uint8Array>;
3334
4238
  /**
3335
4239
  * Derives and exports a secret of `key_length` bytes for the given conversation.
3336
4240
  *
@@ -3488,6 +4392,8 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3488
4392
  * `proteus_new_prekey_auto` to have a free ID chosen instead.
3489
4393
  *
3490
4394
  * Warning: the Proteus client must be initialized with `proteus_init` first or an error will be returned.
4395
+ *
4396
+ * This function has been deprecated. Any callers should update to use `proteus_new_prekey_auto` instead.
3491
4397
  */
3492
4398
  proteusNewPrekey(prekeyId: number, asyncOpts_?: {
3493
4399
  signal: AbortSignal;
@@ -3554,15 +4460,11 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3554
4460
  /**
3555
4461
  * Remove a `KeyPackage` from the database.
3556
4462
  */
3557
- removeKeyPackage(kpRef: KeyPackageRefLike, asyncOpts_?: {
3558
- signal: AbortSignal;
3559
- }): Promise<void>;
4463
+ removeKeyPackage(kpRef: KeyPackageRefLike): Promise<void>;
3560
4464
  /**
3561
4465
  * Remove all `KeyPackage`s associated with this credential ref.
3562
4466
  */
3563
- removeKeyPackagesFor(credentialRef: CredentialRefLike, asyncOpts_?: {
3564
- signal: AbortSignal;
3565
- }): Promise<void>;
4467
+ removeKeyPackagesFor(credentialRef: CredentialRefLike): Promise<void>;
3566
4468
  /**
3567
4469
  * Set the credential ref for the given conversation.
3568
4470
  */
@@ -3575,9 +4477,7 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3575
4477
  * The stored data can be retrieved via `get_data`. Keep the data size reasonable;
3576
4478
  * this is not a general-purpose key-value store.
3577
4479
  */
3578
- setData(data: Uint8Array, asyncOpts_?: {
3579
- signal: AbortSignal;
3580
- }): Promise<void>;
4480
+ setData(data: Uint8Array): Promise<void>;
3581
4481
  /**
3582
4482
  * Updates this client's key material in the conversation by sending an update commit.
3583
4483
  */
@@ -3725,18 +4625,6 @@ declare class CoreCryptoFfi extends UniffiAbstractObject {
3725
4625
  e2eiConversationState(conversationId: ConversationIdLike, asyncOpts_?: {
3726
4626
  signal: AbortSignal;
3727
4627
  }): Promise<E2eiConversationState>;
3728
- /**
3729
- * Returns true if end-to-end identity is enabled for the given cipher_suite.
3730
- */
3731
- e2eiIsEnabled(cipherSuite: CipherSuite, asyncOpts_?: {
3732
- signal: AbortSignal;
3733
- }): Promise<boolean>;
3734
- /**
3735
- * Returns true if the PKI environment has been set up and its provider is configured.
3736
- */
3737
- e2eiIsPkiEnvSetup(asyncOpts_?: {
3738
- signal: AbortSignal;
3739
- }): Promise<boolean>;
3740
4628
  /**
3741
4629
  * Derives and exports a secret of `key_length` bytes for the given conversation.
3742
4630
  *
@@ -3856,6 +4744,9 @@ declare class CoreCryptoFfi extends UniffiAbstractObject {
3856
4744
  }): Promise<void>;
3857
4745
  /**
3858
4746
  * Re-seed the MLS session's CSPRNG with the provided entropy seed.
4747
+ *
4748
+ * `seed` must be exactly 32 bytes long; any other length is an error. Note that this replaces
4749
+ * the CSPRNG's state outright rather than mixing the new seed into it.
3859
4750
  */
3860
4751
  reseed(seed: Uint8Array, asyncOpts_?: {
3861
4752
  signal: AbortSignal;
@@ -3932,9 +4823,7 @@ export declare class Database extends UniffiAbstractObject {
3932
4823
  * Create an in-memory database whose data will be lost when the instance is dropped.
3933
4824
  * In-memory databases are never encrypted.
3934
4825
  */
3935
- static inMemory(asyncOpts_?: {
3936
- signal: AbortSignal;
3937
- }): Promise<DatabaseLike>;
4826
+ static inMemory(): DatabaseLike;
3938
4827
  /**
3939
4828
  * Open or create a database.
3940
4829
  */
@@ -4070,8 +4959,6 @@ declare class X509CredentialAcquisition extends UniffiAbstractObject {
4070
4959
  uniffiDestroy(): void;
4071
4960
  static instanceOf(obj_: any): obj_ is X509CredentialAcquisition;
4072
4961
  }
4073
- declare class CoreCryptoContext$1 extends CoreCryptoContext {
4074
- }
4075
4962
  export interface CredentialFindFilters {
4076
4963
  clientId?: ClientId;
4077
4964
  publicKey?: Uint8Array;
@@ -4105,7 +4992,7 @@ export declare class CoreCrypto extends CoreCryptoFfi {
4105
4992
  *
4106
4993
  * @returns the result of the callback will be returned from this call
4107
4994
  */
4108
- transaction<R>(callback: (ctx: CoreCryptoContext$1) => Promise<R>): Promise<R>;
4995
+ transaction<R>(callback: (ctx: CoreCryptoContext) => Promise<R>): Promise<R>;
4109
4996
  /**
4110
4997
  * Get those credentials known to this instance which match the provided filters
4111
4998
  *
@@ -4133,7 +5020,6 @@ declare class X509CredentialAcquisition$1 extends X509CredentialAcquisition {
4133
5020
  export declare function initWasmModule(path?: string): Promise<void>;
4134
5021
 
4135
5022
  export {
4136
- CoreCryptoContext$1 as CoreCryptoContext,
4137
5023
  Credential$1 as Credential,
4138
5024
  MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
4139
5025
  MlsRatchetTreeType as RatchetTreeType,