@wireapp/core-crypto 10.2.0 → 10.4.0

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.
@@ -9,11 +9,7 @@ var DEFINITIONS = {
9
9
  },
10
10
  functions: {
11
11
  ffi_core_crypto_ffi_rust_future_poll_u8: {
12
- args: [
13
- FfiType.Handle,
14
- FfiType.Callback("RustFutureContinuationCallback"),
15
- FfiType.Handle
16
- ],
12
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
17
13
  ret: FfiType.Void,
18
14
  hasRustCallStatus: false
19
15
  },
@@ -33,11 +29,7 @@ var DEFINITIONS = {
33
29
  hasRustCallStatus: false
34
30
  },
35
31
  ffi_core_crypto_ffi_rust_future_poll_i8: {
36
- args: [
37
- FfiType.Handle,
38
- FfiType.Callback("RustFutureContinuationCallback"),
39
- FfiType.Handle
40
- ],
32
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
41
33
  ret: FfiType.Void,
42
34
  hasRustCallStatus: false
43
35
  },
@@ -57,11 +49,7 @@ var DEFINITIONS = {
57
49
  hasRustCallStatus: false
58
50
  },
59
51
  ffi_core_crypto_ffi_rust_future_poll_u16: {
60
- args: [
61
- FfiType.Handle,
62
- FfiType.Callback("RustFutureContinuationCallback"),
63
- FfiType.Handle
64
- ],
52
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
65
53
  ret: FfiType.Void,
66
54
  hasRustCallStatus: false
67
55
  },
@@ -81,11 +69,7 @@ var DEFINITIONS = {
81
69
  hasRustCallStatus: false
82
70
  },
83
71
  ffi_core_crypto_ffi_rust_future_poll_i16: {
84
- args: [
85
- FfiType.Handle,
86
- FfiType.Callback("RustFutureContinuationCallback"),
87
- FfiType.Handle
88
- ],
72
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
89
73
  ret: FfiType.Void,
90
74
  hasRustCallStatus: false
91
75
  },
@@ -105,11 +89,7 @@ var DEFINITIONS = {
105
89
  hasRustCallStatus: false
106
90
  },
107
91
  ffi_core_crypto_ffi_rust_future_poll_u32: {
108
- args: [
109
- FfiType.Handle,
110
- FfiType.Callback("RustFutureContinuationCallback"),
111
- FfiType.Handle
112
- ],
92
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
113
93
  ret: FfiType.Void,
114
94
  hasRustCallStatus: false
115
95
  },
@@ -129,11 +109,7 @@ var DEFINITIONS = {
129
109
  hasRustCallStatus: false
130
110
  },
131
111
  ffi_core_crypto_ffi_rust_future_poll_i32: {
132
- args: [
133
- FfiType.Handle,
134
- FfiType.Callback("RustFutureContinuationCallback"),
135
- FfiType.Handle
136
- ],
112
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
137
113
  ret: FfiType.Void,
138
114
  hasRustCallStatus: false
139
115
  },
@@ -153,11 +129,7 @@ var DEFINITIONS = {
153
129
  hasRustCallStatus: false
154
130
  },
155
131
  ffi_core_crypto_ffi_rust_future_poll_u64: {
156
- args: [
157
- FfiType.Handle,
158
- FfiType.Callback("RustFutureContinuationCallback"),
159
- FfiType.Handle
160
- ],
132
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
161
133
  ret: FfiType.Void,
162
134
  hasRustCallStatus: false
163
135
  },
@@ -177,11 +149,7 @@ var DEFINITIONS = {
177
149
  hasRustCallStatus: false
178
150
  },
179
151
  ffi_core_crypto_ffi_rust_future_poll_i64: {
180
- args: [
181
- FfiType.Handle,
182
- FfiType.Callback("RustFutureContinuationCallback"),
183
- FfiType.Handle
184
- ],
152
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
185
153
  ret: FfiType.Void,
186
154
  hasRustCallStatus: false
187
155
  },
@@ -201,11 +169,7 @@ var DEFINITIONS = {
201
169
  hasRustCallStatus: false
202
170
  },
203
171
  ffi_core_crypto_ffi_rust_future_poll_f32: {
204
- args: [
205
- FfiType.Handle,
206
- FfiType.Callback("RustFutureContinuationCallback"),
207
- FfiType.Handle
208
- ],
172
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
209
173
  ret: FfiType.Void,
210
174
  hasRustCallStatus: false
211
175
  },
@@ -225,11 +189,7 @@ var DEFINITIONS = {
225
189
  hasRustCallStatus: false
226
190
  },
227
191
  ffi_core_crypto_ffi_rust_future_poll_f64: {
228
- args: [
229
- FfiType.Handle,
230
- FfiType.Callback("RustFutureContinuationCallback"),
231
- FfiType.Handle
232
- ],
192
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
233
193
  ret: FfiType.Void,
234
194
  hasRustCallStatus: false
235
195
  },
@@ -249,11 +209,7 @@ var DEFINITIONS = {
249
209
  hasRustCallStatus: false
250
210
  },
251
211
  ffi_core_crypto_ffi_rust_future_poll_rust_buffer: {
252
- args: [
253
- FfiType.Handle,
254
- FfiType.Callback("RustFutureContinuationCallback"),
255
- FfiType.Handle
256
- ],
212
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
257
213
  ret: FfiType.Void,
258
214
  hasRustCallStatus: false
259
215
  },
@@ -273,11 +229,7 @@ var DEFINITIONS = {
273
229
  hasRustCallStatus: false
274
230
  },
275
231
  ffi_core_crypto_ffi_rust_future_poll_void: {
276
- args: [
277
- FfiType.Handle,
278
- FfiType.Callback("RustFutureContinuationCallback"),
279
- FfiType.Handle
280
- ],
232
+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],
281
233
  ret: FfiType.Void,
282
234
  hasRustCallStatus: false
283
235
  },
@@ -537,44 +489,32 @@ var DEFINITIONS = {
537
489
  hasRustCallStatus: true
538
490
  },
539
491
  uniffi_core_crypto_ffi_fn_init_callback_vtable_corecryptocommand: {
540
- args: [
541
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiCoreCryptoCommand"))
542
- ],
492
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiCoreCryptoCommand"))],
543
493
  ret: FfiType.Void,
544
494
  hasRustCallStatus: false
545
495
  },
546
496
  uniffi_core_crypto_ffi_fn_init_callback_vtable_corecryptologger: {
547
- args: [
548
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiCoreCryptoLogger"))
549
- ],
497
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiCoreCryptoLogger"))],
550
498
  ret: FfiType.Void,
551
499
  hasRustCallStatus: false
552
500
  },
553
501
  uniffi_core_crypto_ffi_fn_init_callback_vtable_epochobserver: {
554
- args: [
555
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiEpochObserver"))
556
- ],
502
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiEpochObserver"))],
557
503
  ret: FfiType.Void,
558
504
  hasRustCallStatus: false
559
505
  },
560
506
  uniffi_core_crypto_ffi_fn_init_callback_vtable_historyobserver: {
561
- args: [
562
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiHistoryObserver"))
563
- ],
507
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiHistoryObserver"))],
564
508
  ret: FfiType.Void,
565
509
  hasRustCallStatus: false
566
510
  },
567
511
  uniffi_core_crypto_ffi_fn_init_callback_vtable_mlstransport: {
568
- args: [
569
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiMlsTransport"))
570
- ],
512
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiMlsTransport"))],
571
513
  ret: FfiType.Void,
572
514
  hasRustCallStatus: false
573
515
  },
574
516
  uniffi_core_crypto_ffi_fn_init_callback_vtable_pkienvironmenthooks: {
575
- args: [
576
- FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiPkiEnvironmentHooks"))
577
- ],
517
+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCoreCryptoFfiPkiEnvironmentHooks"))],
578
518
  ret: FfiType.Void,
579
519
  hasRustCallStatus: false
580
520
  },
@@ -754,12 +694,7 @@ var DEFINITIONS = {
754
694
  hasRustCallStatus: false
755
695
  },
756
696
  uniffi_core_crypto_ffi_fn_method_corecryptocontext_create_conversation: {
757
- args: [
758
- FfiType.Handle,
759
- FfiType.Handle,
760
- FfiType.Handle,
761
- FfiType.RustBuffer
762
- ],
697
+ args: [FfiType.Handle, FfiType.Handle, FfiType.Handle, FfiType.RustBuffer],
763
698
  ret: FfiType.Handle,
764
699
  hasRustCallStatus: false
765
700
  },
@@ -793,6 +728,11 @@ var DEFINITIONS = {
793
728
  ret: FfiType.Handle,
794
729
  hasRustCallStatus: false
795
730
  },
731
+ uniffi_core_crypto_ffi_fn_method_corecryptocontext_encrypt_targeted_message: {
732
+ args: [FfiType.Handle, FfiType.Handle, FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer],
733
+ ret: FfiType.Handle,
734
+ hasRustCallStatus: false
735
+ },
796
736
  uniffi_core_crypto_ffi_fn_method_corecryptocontext_export_secret_key: {
797
737
  args: [FfiType.Handle, FfiType.Handle, FfiType.UInt32],
798
738
  ret: FfiType.Handle,
@@ -1019,14 +959,7 @@ var DEFINITIONS = {
1019
959
  hasRustCallStatus: false
1020
960
  },
1021
961
  uniffi_core_crypto_ffi_fn_method_corecryptoffi_find_credentials_ffi: {
1022
- args: [
1023
- FfiType.Handle,
1024
- FfiType.RustBuffer,
1025
- FfiType.RustBuffer,
1026
- FfiType.RustBuffer,
1027
- FfiType.RustBuffer,
1028
- FfiType.RustBuffer
1029
- ],
962
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],
1030
963
  ret: FfiType.Handle,
1031
964
  hasRustCallStatus: false
1032
965
  },
@@ -1111,12 +1044,7 @@ var DEFINITIONS = {
1111
1044
  hasRustCallStatus: false
1112
1045
  },
1113
1046
  uniffi_core_crypto_ffi_fn_method_corecryptologger_log: {
1114
- args: [
1115
- FfiType.Handle,
1116
- FfiType.RustBuffer,
1117
- FfiType.RustBuffer,
1118
- FfiType.RustBuffer
1119
- ],
1047
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],
1120
1048
  ret: FfiType.Void,
1121
1049
  hasRustCallStatus: true
1122
1050
  },
@@ -1365,25 +1293,23 @@ var DEFINITIONS = {
1365
1293
  ret: FfiType.Handle,
1366
1294
  hasRustCallStatus: false
1367
1295
  },
1296
+ uniffi_core_crypto_ffi_fn_method_pkienvironment_get_trust_anchors: {
1297
+ args: [FfiType.Handle],
1298
+ ret: FfiType.Handle,
1299
+ hasRustCallStatus: false
1300
+ },
1301
+ uniffi_core_crypto_ffi_fn_method_pkienvironment_remove_trust_anchor: {
1302
+ args: [FfiType.Handle, FfiType.RustBuffer],
1303
+ ret: FfiType.Handle,
1304
+ hasRustCallStatus: false
1305
+ },
1368
1306
  uniffi_core_crypto_ffi_fn_method_pkienvironmenthooks_http_request: {
1369
- args: [
1370
- FfiType.Handle,
1371
- FfiType.RustBuffer,
1372
- FfiType.RustBuffer,
1373
- FfiType.RustBuffer,
1374
- FfiType.RustBuffer
1375
- ],
1307
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],
1376
1308
  ret: FfiType.Handle,
1377
1309
  hasRustCallStatus: false
1378
1310
  },
1379
1311
  uniffi_core_crypto_ffi_fn_method_pkienvironmenthooks_authenticate: {
1380
- args: [
1381
- FfiType.Handle,
1382
- FfiType.RustBuffer,
1383
- FfiType.RustBuffer,
1384
- FfiType.RustBuffer,
1385
- FfiType.RustBuffer
1386
- ],
1312
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],
1387
1313
  ret: FfiType.Handle,
1388
1314
  hasRustCallStatus: false
1389
1315
  },
@@ -1473,12 +1399,7 @@ var DEFINITIONS = {
1473
1399
  hasRustCallStatus: true
1474
1400
  },
1475
1401
  uniffi_core_crypto_ffi_fn_constructor_x509credentialacquisition_new_from_credential_ref: {
1476
- args: [
1477
- FfiType.Handle,
1478
- FfiType.RustBuffer,
1479
- FfiType.Handle,
1480
- FfiType.RustBuffer
1481
- ],
1402
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.Handle, FfiType.RustBuffer],
1482
1403
  ret: FfiType.Handle,
1483
1404
  hasRustCallStatus: false
1484
1405
  },
@@ -1657,6 +1578,11 @@ var DEFINITIONS = {
1657
1578
  ret: FfiType.UInt16,
1658
1579
  hasRustCallStatus: false
1659
1580
  },
1581
+ uniffi_core_crypto_ffi_checksum_method_corecryptocontext_encrypt_targeted_message: {
1582
+ args: [],
1583
+ ret: FfiType.UInt16,
1584
+ hasRustCallStatus: false
1585
+ },
1660
1586
  uniffi_core_crypto_ffi_checksum_method_corecryptocontext_export_secret_key: {
1661
1587
  args: [],
1662
1588
  ret: FfiType.UInt16,
@@ -2172,6 +2098,16 @@ var DEFINITIONS = {
2172
2098
  ret: FfiType.UInt16,
2173
2099
  hasRustCallStatus: false
2174
2100
  },
2101
+ uniffi_core_crypto_ffi_checksum_method_pkienvironment_get_trust_anchors: {
2102
+ args: [],
2103
+ ret: FfiType.UInt16,
2104
+ hasRustCallStatus: false
2105
+ },
2106
+ uniffi_core_crypto_ffi_checksum_method_pkienvironment_remove_trust_anchor: {
2107
+ args: [],
2108
+ ret: FfiType.UInt16,
2109
+ hasRustCallStatus: false
2110
+ },
2175
2111
  uniffi_core_crypto_ffi_checksum_method_pkienvironmenthooks_http_request: {
2176
2112
  args: [],
2177
2113
  ret: FfiType.UInt16,
@@ -2255,12 +2191,7 @@ var DEFINITIONS = {
2255
2191
  hasRustCallStatus: false
2256
2192
  },
2257
2193
  CallbackInterfaceCoreCryptoFfiCoreCryptoCommandMethod0: {
2258
- args: [
2259
- FfiType.Handle,
2260
- FfiType.Handle,
2261
- FfiType.Callback("ForeignFutureCompletevoid"),
2262
- FfiType.Handle
2263
- ],
2194
+ args: [FfiType.Handle, FfiType.Handle, FfiType.Callback("ForeignFutureCompletevoid"), FfiType.Handle],
2264
2195
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2265
2196
  hasRustCallStatus: false,
2266
2197
  outReturn: true
@@ -2276,12 +2207,7 @@ var DEFINITIONS = {
2276
2207
  hasRustCallStatus: false
2277
2208
  },
2278
2209
  CallbackInterfaceCoreCryptoFfiCoreCryptoLoggerMethod0: {
2279
- args: [
2280
- FfiType.Handle,
2281
- FfiType.RustBuffer,
2282
- FfiType.RustBuffer,
2283
- FfiType.RustBuffer
2284
- ],
2210
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],
2285
2211
  ret: FfiType.VoidPointer,
2286
2212
  hasRustCallStatus: true,
2287
2213
  outReturn: true
@@ -2297,13 +2223,7 @@ var DEFINITIONS = {
2297
2223
  hasRustCallStatus: false
2298
2224
  },
2299
2225
  CallbackInterfaceCoreCryptoFfiEpochObserverMethod0: {
2300
- args: [
2301
- FfiType.Handle,
2302
- FfiType.Handle,
2303
- FfiType.UInt64,
2304
- FfiType.Callback("ForeignFutureCompletevoid"),
2305
- FfiType.Handle
2306
- ],
2226
+ args: [FfiType.Handle, FfiType.Handle, FfiType.UInt64, FfiType.Callback("ForeignFutureCompletevoid"), FfiType.Handle],
2307
2227
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2308
2228
  hasRustCallStatus: false,
2309
2229
  outReturn: true
@@ -2319,13 +2239,7 @@ var DEFINITIONS = {
2319
2239
  hasRustCallStatus: false
2320
2240
  },
2321
2241
  CallbackInterfaceCoreCryptoFfiHistoryObserverMethod0: {
2322
- args: [
2323
- FfiType.Handle,
2324
- FfiType.Handle,
2325
- FfiType.RustBuffer,
2326
- FfiType.Callback("ForeignFutureCompletevoid"),
2327
- FfiType.Handle
2328
- ],
2242
+ args: [FfiType.Handle, FfiType.Handle, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompletevoid"), FfiType.Handle],
2329
2243
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2330
2244
  hasRustCallStatus: false,
2331
2245
  outReturn: true
@@ -2341,31 +2255,18 @@ var DEFINITIONS = {
2341
2255
  hasRustCallStatus: false
2342
2256
  },
2343
2257
  CallbackInterfaceCoreCryptoFfiMlsTransportMethod0: {
2344
- args: [
2345
- FfiType.Handle,
2346
- FfiType.RustBuffer,
2347
- FfiType.Callback("ForeignFutureCompletevoid"),
2348
- FfiType.Handle
2349
- ],
2258
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompletevoid"), FfiType.Handle],
2350
2259
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2351
2260
  hasRustCallStatus: false,
2352
2261
  outReturn: true
2353
2262
  },
2354
2263
  ForeignFutureCompleterust_buffer: {
2355
- args: [
2356
- FfiType.Handle,
2357
- FfiType.Struct("ForeignFutureResultRustBuffer")
2358
- ],
2264
+ args: [FfiType.Handle, FfiType.Struct("ForeignFutureResultRustBuffer")],
2359
2265
  ret: FfiType.Void,
2360
2266
  hasRustCallStatus: false
2361
2267
  },
2362
2268
  CallbackInterfaceCoreCryptoFfiMlsTransportMethod1: {
2363
- args: [
2364
- FfiType.Handle,
2365
- FfiType.RustBuffer,
2366
- FfiType.Callback("ForeignFutureCompleterust_buffer"),
2367
- FfiType.Handle
2368
- ],
2269
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],
2369
2270
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2370
2271
  hasRustCallStatus: false,
2371
2272
  outReturn: true
@@ -2381,50 +2282,25 @@ var DEFINITIONS = {
2381
2282
  hasRustCallStatus: false
2382
2283
  },
2383
2284
  CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod0: {
2384
- args: [
2385
- FfiType.Handle,
2386
- FfiType.RustBuffer,
2387
- FfiType.RustBuffer,
2388
- FfiType.RustBuffer,
2389
- FfiType.RustBuffer,
2390
- FfiType.Callback("ForeignFutureCompleterust_buffer"),
2391
- FfiType.Handle
2392
- ],
2285
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],
2393
2286
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2394
2287
  hasRustCallStatus: false,
2395
2288
  outReturn: true
2396
2289
  },
2397
2290
  CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod1: {
2398
- args: [
2399
- FfiType.Handle,
2400
- FfiType.RustBuffer,
2401
- FfiType.RustBuffer,
2402
- FfiType.RustBuffer,
2403
- FfiType.RustBuffer,
2404
- FfiType.Callback("ForeignFutureCompleterust_buffer"),
2405
- FfiType.Handle
2406
- ],
2291
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],
2407
2292
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2408
2293
  hasRustCallStatus: false,
2409
2294
  outReturn: true
2410
2295
  },
2411
2296
  CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod2: {
2412
- args: [
2413
- FfiType.Handle,
2414
- FfiType.Callback("ForeignFutureCompleterust_buffer"),
2415
- FfiType.Handle
2416
- ],
2297
+ args: [FfiType.Handle, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],
2417
2298
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2418
2299
  hasRustCallStatus: false,
2419
2300
  outReturn: true
2420
2301
  },
2421
2302
  CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod3: {
2422
- args: [
2423
- FfiType.Handle,
2424
- FfiType.RustBuffer,
2425
- FfiType.Callback("ForeignFutureCompleterust_buffer"),
2426
- FfiType.Handle
2427
- ],
2303
+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],
2428
2304
  ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
2429
2305
  hasRustCallStatus: false,
2430
2306
  outReturn: true
@@ -2443,117 +2319,48 @@ var DEFINITIONS = {
2443
2319
  structs: {
2444
2320
  ForeignFutureDroppedCallbackStruct: [
2445
2321
  { name: "handle", type: FfiType.Handle },
2446
- {
2447
- name: "free",
2448
- type: FfiType.Callback("ForeignFutureDroppedCallback")
2449
- }
2322
+ { name: "free", type: FfiType.Callback("ForeignFutureDroppedCallback") }
2450
2323
  ],
2451
2324
  ForeignFutureResultVoid: [
2452
2325
  { name: "call_status", type: FfiType.RustCallStatus }
2453
2326
  ],
2454
2327
  VTableCallbackInterfaceCoreCryptoFfiCoreCryptoCommand: [
2455
- {
2456
- name: "uniffi_free",
2457
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_CoreCryptoCommand")
2458
- },
2459
- {
2460
- name: "uniffi_clone",
2461
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_CoreCryptoCommand")
2462
- },
2463
- {
2464
- name: "execute",
2465
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiCoreCryptoCommandMethod0")
2466
- }
2328
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_CoreCryptoCommand") },
2329
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_CoreCryptoCommand") },
2330
+ { name: "execute", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiCoreCryptoCommandMethod0") }
2467
2331
  ],
2468
2332
  VTableCallbackInterfaceCoreCryptoFfiCoreCryptoLogger: [
2469
- {
2470
- name: "uniffi_free",
2471
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_CoreCryptoLogger")
2472
- },
2473
- {
2474
- name: "uniffi_clone",
2475
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_CoreCryptoLogger")
2476
- },
2477
- {
2478
- name: "log",
2479
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiCoreCryptoLoggerMethod0")
2480
- }
2333
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_CoreCryptoLogger") },
2334
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_CoreCryptoLogger") },
2335
+ { name: "log", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiCoreCryptoLoggerMethod0") }
2481
2336
  ],
2482
2337
  VTableCallbackInterfaceCoreCryptoFfiEpochObserver: [
2483
- {
2484
- name: "uniffi_free",
2485
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_EpochObserver")
2486
- },
2487
- {
2488
- name: "uniffi_clone",
2489
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_EpochObserver")
2490
- },
2491
- {
2492
- name: "epoch_changed",
2493
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiEpochObserverMethod0")
2494
- }
2338
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_EpochObserver") },
2339
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_EpochObserver") },
2340
+ { name: "epoch_changed", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiEpochObserverMethod0") }
2495
2341
  ],
2496
2342
  VTableCallbackInterfaceCoreCryptoFfiHistoryObserver: [
2497
- {
2498
- name: "uniffi_free",
2499
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_HistoryObserver")
2500
- },
2501
- {
2502
- name: "uniffi_clone",
2503
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_HistoryObserver")
2504
- },
2505
- {
2506
- name: "history_client_created",
2507
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiHistoryObserverMethod0")
2508
- }
2343
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_HistoryObserver") },
2344
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_HistoryObserver") },
2345
+ { name: "history_client_created", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiHistoryObserverMethod0") }
2509
2346
  ],
2510
2347
  ForeignFutureResultRustBuffer: [
2511
2348
  { name: "return_value", type: FfiType.RustBuffer },
2512
2349
  { name: "call_status", type: FfiType.RustCallStatus }
2513
2350
  ],
2514
2351
  VTableCallbackInterfaceCoreCryptoFfiMlsTransport: [
2515
- {
2516
- name: "uniffi_free",
2517
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_MlsTransport")
2518
- },
2519
- {
2520
- name: "uniffi_clone",
2521
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_MlsTransport")
2522
- },
2523
- {
2524
- name: "send_commit_bundle",
2525
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiMlsTransportMethod0")
2526
- },
2527
- {
2528
- name: "prepare_for_transport",
2529
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiMlsTransportMethod1")
2530
- }
2352
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_MlsTransport") },
2353
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_MlsTransport") },
2354
+ { name: "send_commit_bundle", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiMlsTransportMethod0") },
2355
+ { name: "prepare_for_transport", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiMlsTransportMethod1") }
2531
2356
  ],
2532
2357
  VTableCallbackInterfaceCoreCryptoFfiPkiEnvironmentHooks: [
2533
- {
2534
- name: "uniffi_free",
2535
- type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_PkiEnvironmentHooks")
2536
- },
2537
- {
2538
- name: "uniffi_clone",
2539
- type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_PkiEnvironmentHooks")
2540
- },
2541
- {
2542
- name: "http_request",
2543
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod0")
2544
- },
2545
- {
2546
- name: "authenticate",
2547
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod1")
2548
- },
2549
- {
2550
- name: "get_backend_nonce",
2551
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod2")
2552
- },
2553
- {
2554
- name: "fetch_backend_access_token",
2555
- type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod3")
2556
- }
2358
+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCoreCryptoFfi_PkiEnvironmentHooks") },
2359
+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCoreCryptoFfi_PkiEnvironmentHooks") },
2360
+ { name: "http_request", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod0") },
2361
+ { name: "authenticate", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod1") },
2362
+ { name: "get_backend_nonce", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod2") },
2363
+ { name: "fetch_backend_access_token", type: FfiType.Callback("CallbackInterfaceCoreCryptoFfiPkiEnvironmentHooksMethod3") }
2557
2364
  ]
2558
2365
  }
2559
2366
  };
@@ -2588,6 +2395,7 @@ import {
2588
2395
  FfiConverterUInt64,
2589
2396
  FfiConverterUint8Array,
2590
2397
  UniffiAbstractObject,
2398
+ UniffiEnum,
2591
2399
  UniffiError,
2592
2400
  UniffiInternalError,
2593
2401
  UniffiResult,
@@ -2695,101 +2503,6 @@ function version() {
2695
2503
  return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_func_version(callStatus);
2696
2504
  }, FfiConverterString.lift.bind(FfiConverterString)));
2697
2505
  }
2698
-
2699
- class Uuid extends UniffiAbstractObject {
2700
- [uniffiTypeNameSymbol] = "Uuid";
2701
- [destructorGuardSymbol];
2702
- [pointerLiteralSymbol];
2703
- constructor(uuid) {
2704
- super();
2705
- const pointer = uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
2706
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_uuid_new(FfiConverterString.lower(uuid, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2707
- }, FfiConverterString.lift.bind(FfiConverterString));
2708
- this[pointerLiteralSymbol] = pointer;
2709
- this[destructorGuardSymbol] = uniffiTypeUuidObjectFactory.bless(pointer);
2710
- }
2711
- toString() {
2712
- return ((__rb) => {
2713
- try {
2714
- return FfiConverterString.lift(__rb);
2715
- } finally {
2716
- core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
2717
- }
2718
- })(uniffiCaller.rustCall((callStatus) => {
2719
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_display(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
2720
- }, FfiConverterString.lift.bind(FfiConverterString)));
2721
- }
2722
- equals(other) {
2723
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
2724
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_eq_eq(uniffiTypeUuidObjectFactory.clonePointer(this), FfiConverterTypeUuid.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2725
- }, FfiConverterString.lift.bind(FfiConverterString)));
2726
- }
2727
- hashCode() {
2728
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
2729
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_hash(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
2730
- }, FfiConverterString.lift.bind(FfiConverterString)));
2731
- }
2732
- uniffiDestroy() {
2733
- const ptr = this[destructorGuardSymbol];
2734
- if (ptr !== undefined) {
2735
- const pointer = uniffiTypeUuidObjectFactory.pointer(this);
2736
- uniffiTypeUuidObjectFactory.freePointer(pointer);
2737
- uniffiTypeUuidObjectFactory.unbless(ptr);
2738
- delete this[destructorGuardSymbol];
2739
- }
2740
- }
2741
- static instanceOf(obj_) {
2742
- return uniffiTypeUuidObjectFactory.isConcreteType(obj_);
2743
- }
2744
- }
2745
- var uniffiTypeUuidObjectFactory = (() => {
2746
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
2747
- uniffiTypeUuidObjectFactory.freePointer(heldValue);
2748
- }) : null;
2749
- return {
2750
- create(pointer) {
2751
- const instance = Object.create(Uuid.prototype);
2752
- instance[pointerLiteralSymbol] = pointer;
2753
- instance[destructorGuardSymbol] = this.bless(pointer);
2754
- instance[uniffiTypeNameSymbol] = "Uuid";
2755
- return instance;
2756
- },
2757
- bless(p) {
2758
- const ptr = {
2759
- p,
2760
- markDestroyed: () => {
2761
- return;
2762
- }
2763
- };
2764
- if (registry) {
2765
- registry.register(ptr, p, ptr);
2766
- }
2767
- return ptr;
2768
- },
2769
- unbless(ptr_) {
2770
- if (registry) {
2771
- registry.unregister(ptr_);
2772
- }
2773
- },
2774
- pointer(obj_) {
2775
- if (obj_[destructorGuardSymbol] === undefined) {
2776
- throw new UniffiInternalError.UnexpectedNullPointer;
2777
- }
2778
- return obj_[pointerLiteralSymbol];
2779
- },
2780
- clonePointer(obj_) {
2781
- const pointer = this.pointer(obj_);
2782
- return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_uuid(pointer, callStatus), FfiConverterString.lift);
2783
- },
2784
- freePointer(pointer) {
2785
- uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_uuid(pointer, callStatus), FfiConverterString.lift);
2786
- },
2787
- isConcreteType(obj_) {
2788
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Uuid";
2789
- }
2790
- };
2791
- })();
2792
- var FfiConverterTypeUuid = new FfiConverterObject(uniffiTypeUuidObjectFactory);
2793
2506
  var stringConverter = (() => {
2794
2507
  const encoder = new TextEncoder;
2795
2508
  const decoder = new TextDecoder;
@@ -2805,112 +2518,7 @@ var stringConverter = (() => {
2805
2518
  };
2806
2519
  })();
2807
2520
  var FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
2808
-
2809
- class DeviceId extends UniffiAbstractObject {
2810
- [uniffiTypeNameSymbol] = "DeviceId";
2811
- [destructorGuardSymbol];
2812
- [pointerLiteralSymbol];
2813
- constructor(id) {
2814
- super();
2815
- const pointer = uniffiCaller.rustCall((callStatus) => {
2816
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_deviceid_new(FfiConverterUInt64.lower(id, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2817
- }, FfiConverterString.lift.bind(FfiConverterString));
2818
- this[pointerLiteralSymbol] = pointer;
2819
- this[destructorGuardSymbol] = uniffiTypeDeviceIdObjectFactory.bless(pointer);
2820
- }
2821
- static fromHexString(hexString) {
2822
- return FfiConverterTypeDeviceId.lift(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
2823
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_deviceid_from_hex_string(FfiConverterString.lower(hexString, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2824
- }, FfiConverterString.lift.bind(FfiConverterString)));
2825
- }
2826
- toHexString() {
2827
- return ((__rb) => {
2828
- try {
2829
- return FfiConverterString.lift(__rb);
2830
- } finally {
2831
- core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
2832
- }
2833
- })(uniffiCaller.rustCall((callStatus) => {
2834
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_to_hex_string(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
2835
- }, FfiConverterString.lift.bind(FfiConverterString)));
2836
- }
2837
- toU64() {
2838
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
2839
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_to_u64(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
2840
- }, FfiConverterString.lift.bind(FfiConverterString)));
2841
- }
2842
- equals(other) {
2843
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
2844
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_eq_eq(uniffiTypeDeviceIdObjectFactory.clonePointer(this), FfiConverterTypeDeviceId.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2845
- }, FfiConverterString.lift.bind(FfiConverterString)));
2846
- }
2847
- hashCode() {
2848
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
2849
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_hash(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
2850
- }, FfiConverterString.lift.bind(FfiConverterString)));
2851
- }
2852
- uniffiDestroy() {
2853
- const ptr = this[destructorGuardSymbol];
2854
- if (ptr !== undefined) {
2855
- const pointer = uniffiTypeDeviceIdObjectFactory.pointer(this);
2856
- uniffiTypeDeviceIdObjectFactory.freePointer(pointer);
2857
- uniffiTypeDeviceIdObjectFactory.unbless(ptr);
2858
- delete this[destructorGuardSymbol];
2859
- }
2860
- }
2861
- static instanceOf(obj_) {
2862
- return uniffiTypeDeviceIdObjectFactory.isConcreteType(obj_);
2863
- }
2864
- }
2865
- var uniffiTypeDeviceIdObjectFactory = (() => {
2866
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
2867
- uniffiTypeDeviceIdObjectFactory.freePointer(heldValue);
2868
- }) : null;
2869
- return {
2870
- create(pointer) {
2871
- const instance = Object.create(DeviceId.prototype);
2872
- instance[pointerLiteralSymbol] = pointer;
2873
- instance[destructorGuardSymbol] = this.bless(pointer);
2874
- instance[uniffiTypeNameSymbol] = "DeviceId";
2875
- return instance;
2876
- },
2877
- bless(p) {
2878
- const ptr = {
2879
- p,
2880
- markDestroyed: () => {
2881
- return;
2882
- }
2883
- };
2884
- if (registry) {
2885
- registry.register(ptr, p, ptr);
2886
- }
2887
- return ptr;
2888
- },
2889
- unbless(ptr_) {
2890
- if (registry) {
2891
- registry.unregister(ptr_);
2892
- }
2893
- },
2894
- pointer(obj_) {
2895
- if (obj_[destructorGuardSymbol] === undefined) {
2896
- throw new UniffiInternalError.UnexpectedNullPointer;
2897
- }
2898
- return obj_[pointerLiteralSymbol];
2899
- },
2900
- clonePointer(obj_) {
2901
- const pointer = this.pointer(obj_);
2902
- return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_deviceid(pointer, callStatus), FfiConverterString.lift);
2903
- },
2904
- freePointer(pointer) {
2905
- uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_deviceid(pointer, callStatus), FfiConverterString.lift);
2906
- },
2907
- isConcreteType(obj_) {
2908
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DeviceId";
2909
- }
2910
- };
2911
- })();
2912
- var FfiConverterTypeDeviceId = new FfiConverterObject(uniffiTypeDeviceIdObjectFactory);
2913
- var DeserializedClientId = (() => {
2521
+ var BuildMetadata = (() => {
2914
2522
  const defaults = () => ({});
2915
2523
  const create = (() => {
2916
2524
  return uniffiCreateRecord(defaults);
@@ -2918,345 +2526,10 @@ var DeserializedClientId = (() => {
2918
2526
  return Object.freeze({
2919
2527
  create,
2920
2528
  new: create,
2921
- defaults: () => Object.freeze(defaults()),
2922
- toString(self_) {
2923
- return ((__rb) => {
2924
- try {
2925
- return FfiConverterString.lift(__rb);
2926
- } finally {
2927
- core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
2928
- }
2929
- })(uniffiCaller.rustCall((callStatus) => {
2930
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deserializedclientid_uniffi_trait_display(FfiConverterTypeDeserializedClientId.lower(self_, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2931
- }, FfiConverterString.lift.bind(FfiConverterString)));
2932
- }
2529
+ defaults: () => Object.freeze(defaults())
2933
2530
  });
2934
2531
  })();
2935
- var FfiConverterTypeDeserializedClientId = (() => {
2936
-
2937
- class FFIConverter extends AbstractFfiConverterByteArray {
2938
- read(from) {
2939
- return {
2940
- clientId: FfiConverterTypeClientId.read(from),
2941
- userId: FfiConverterTypeUuid.read(from),
2942
- deviceId: FfiConverterTypeDeviceId.read(from),
2943
- domain: FfiConverterString.read(from)
2944
- };
2945
- }
2946
- write(value, into) {
2947
- FfiConverterTypeClientId.write(value.clientId, into);
2948
- FfiConverterTypeUuid.write(value.userId, into);
2949
- FfiConverterTypeDeviceId.write(value.deviceId, into);
2950
- FfiConverterString.write(value.domain, into);
2951
- }
2952
- allocationSize(value) {
2953
- return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterTypeUuid.allocationSize(value.userId) + FfiConverterTypeDeviceId.allocationSize(value.deviceId) + FfiConverterString.allocationSize(value.domain);
2954
- }
2955
- }
2956
- return new FFIConverter;
2957
- })();
2958
-
2959
- class ClientId extends UniffiAbstractObject {
2960
- [uniffiTypeNameSymbol] = "ClientId";
2961
- [destructorGuardSymbol];
2962
- [pointerLiteralSymbol];
2963
- constructor(userId, deviceId, domain) {
2964
- super();
2965
- const pointer = uniffiCaller.rustCall((callStatus) => {
2966
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_clientid_new(FfiConverterTypeUuid.lower(userId, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterTypeDeviceId.lower(deviceId, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterString.lower(domain, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2967
- }, FfiConverterString.lift.bind(FfiConverterString));
2968
- this[pointerLiteralSymbol] = pointer;
2969
- this[destructorGuardSymbol] = uniffiTypeClientIdObjectFactory.bless(pointer);
2970
- }
2971
- copyBytes() {
2972
- return ((__rb) => {
2973
- try {
2974
- return FfiConverterUint8Array.lift(__rb);
2975
- } finally {
2976
- core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
2977
- }
2978
- })(uniffiCaller.rustCall((callStatus) => {
2979
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_copy_bytes(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
2980
- }, FfiConverterString.lift.bind(FfiConverterString)));
2981
- }
2982
- deserialize() {
2983
- return ((__rb) => {
2984
- try {
2985
- return FfiConverterTypeDeserializedClientId.lift(__rb);
2986
- } finally {
2987
- core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
2988
- }
2989
- })(uniffiCaller.rustCall((callStatus) => {
2990
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_deserialize(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
2991
- }, FfiConverterString.lift.bind(FfiConverterString)));
2992
- }
2993
- equals(other) {
2994
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
2995
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_eq_eq(uniffiTypeClientIdObjectFactory.clonePointer(this), FfiConverterTypeClientId.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
2996
- }, FfiConverterString.lift.bind(FfiConverterString)));
2997
- }
2998
- hashCode() {
2999
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
3000
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_hash(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
3001
- }, FfiConverterString.lift.bind(FfiConverterString)));
3002
- }
3003
- uniffiDestroy() {
3004
- const ptr = this[destructorGuardSymbol];
3005
- if (ptr !== undefined) {
3006
- const pointer = uniffiTypeClientIdObjectFactory.pointer(this);
3007
- uniffiTypeClientIdObjectFactory.freePointer(pointer);
3008
- uniffiTypeClientIdObjectFactory.unbless(ptr);
3009
- delete this[destructorGuardSymbol];
3010
- }
3011
- }
3012
- static instanceOf(obj_) {
3013
- return uniffiTypeClientIdObjectFactory.isConcreteType(obj_);
3014
- }
3015
- }
3016
- var uniffiTypeClientIdObjectFactory = (() => {
3017
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
3018
- uniffiTypeClientIdObjectFactory.freePointer(heldValue);
3019
- }) : null;
3020
- return {
3021
- create(pointer) {
3022
- const instance = Object.create(ClientId.prototype);
3023
- instance[pointerLiteralSymbol] = pointer;
3024
- instance[destructorGuardSymbol] = this.bless(pointer);
3025
- instance[uniffiTypeNameSymbol] = "ClientId";
3026
- return instance;
3027
- },
3028
- bless(p) {
3029
- const ptr = {
3030
- p,
3031
- markDestroyed: () => {
3032
- return;
3033
- }
3034
- };
3035
- if (registry) {
3036
- registry.register(ptr, p, ptr);
3037
- }
3038
- return ptr;
3039
- },
3040
- unbless(ptr_) {
3041
- if (registry) {
3042
- registry.unregister(ptr_);
3043
- }
3044
- },
3045
- pointer(obj_) {
3046
- if (obj_[destructorGuardSymbol] === undefined) {
3047
- throw new UniffiInternalError.UnexpectedNullPointer;
3048
- }
3049
- return obj_[pointerLiteralSymbol];
3050
- },
3051
- clonePointer(obj_) {
3052
- const pointer = this.pointer(obj_);
3053
- return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_clientid(pointer, callStatus), FfiConverterString.lift);
3054
- },
3055
- freePointer(pointer) {
3056
- uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_clientid(pointer, callStatus), FfiConverterString.lift);
3057
- },
3058
- isConcreteType(obj_) {
3059
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "ClientId";
3060
- }
3061
- };
3062
- })();
3063
- var FfiConverterTypeClientId = new FfiConverterObject(uniffiTypeClientIdObjectFactory);
3064
- var DeviceStatus;
3065
- ((DeviceStatus2) => {
3066
- DeviceStatus2[DeviceStatus2["Valid"] = 1] = "Valid";
3067
- DeviceStatus2[DeviceStatus2["Expired"] = 2] = "Expired";
3068
- DeviceStatus2[DeviceStatus2["Revoked"] = 3] = "Revoked";
3069
- })(DeviceStatus ||= {});
3070
- var FfiConverterTypeDeviceStatus = (() => {
3071
- const ordinalConverter = FfiConverterInt32;
3072
-
3073
- class FFIConverter extends AbstractFfiConverterByteArray {
3074
- read(from) {
3075
- switch (ordinalConverter.read(from)) {
3076
- case 1:
3077
- return 1 /* Valid */;
3078
- case 2:
3079
- return 2 /* Expired */;
3080
- case 3:
3081
- return 3 /* Revoked */;
3082
- default:
3083
- throw new UniffiInternalError.UnexpectedEnumCase;
3084
- }
3085
- }
3086
- write(value, into) {
3087
- switch (value) {
3088
- case 1 /* Valid */:
3089
- return ordinalConverter.write(1, into);
3090
- case 2 /* Expired */:
3091
- return ordinalConverter.write(2, into);
3092
- case 3 /* Revoked */:
3093
- return ordinalConverter.write(3, into);
3094
- }
3095
- }
3096
- allocationSize(value) {
3097
- return ordinalConverter.allocationSize(0);
3098
- }
3099
- }
3100
- return new FFIConverter;
3101
- })();
3102
- var CredentialType;
3103
- ((CredentialType2) => {
3104
- CredentialType2[CredentialType2["Basic"] = 1] = "Basic";
3105
- CredentialType2[CredentialType2["X509"] = 2] = "X509";
3106
- })(CredentialType ||= {});
3107
- var FfiConverterTypeCredentialType = (() => {
3108
- const ordinalConverter = FfiConverterInt32;
3109
-
3110
- class FFIConverter extends AbstractFfiConverterByteArray {
3111
- read(from) {
3112
- switch (ordinalConverter.read(from)) {
3113
- case 1:
3114
- return 1 /* Basic */;
3115
- case 2:
3116
- return 2 /* X509 */;
3117
- default:
3118
- throw new UniffiInternalError.UnexpectedEnumCase;
3119
- }
3120
- }
3121
- write(value, into) {
3122
- switch (value) {
3123
- case 1 /* Basic */:
3124
- return ordinalConverter.write(1, into);
3125
- case 2 /* X509 */:
3126
- return ordinalConverter.write(2, into);
3127
- }
3128
- }
3129
- allocationSize(value) {
3130
- return ordinalConverter.allocationSize(0);
3131
- }
3132
- }
3133
- return new FFIConverter;
3134
- })();
3135
- var FfiConverterTypeTimestamp = FfiConverterTimestamp;
3136
- var X509Identity = (() => {
3137
- const defaults = () => ({});
3138
- const create = (() => {
3139
- return uniffiCreateRecord(defaults);
3140
- })();
3141
- return Object.freeze({
3142
- create,
3143
- new: create,
3144
- defaults: () => Object.freeze(defaults())
3145
- });
3146
- })();
3147
- var FfiConverterTypeX509Identity = (() => {
3148
-
3149
- class FFIConverter extends AbstractFfiConverterByteArray {
3150
- read(from) {
3151
- return {
3152
- handle: FfiConverterString.read(from),
3153
- displayName: FfiConverterString.read(from),
3154
- domain: FfiConverterString.read(from),
3155
- certificate: FfiConverterString.read(from),
3156
- serialNumber: FfiConverterString.read(from),
3157
- notBefore: FfiConverterTypeTimestamp.read(from),
3158
- notAfter: FfiConverterTypeTimestamp.read(from)
3159
- };
3160
- }
3161
- write(value, into) {
3162
- FfiConverterString.write(value.handle, into);
3163
- FfiConverterString.write(value.displayName, into);
3164
- FfiConverterString.write(value.domain, into);
3165
- FfiConverterString.write(value.certificate, into);
3166
- FfiConverterString.write(value.serialNumber, into);
3167
- FfiConverterTypeTimestamp.write(value.notBefore, into);
3168
- FfiConverterTypeTimestamp.write(value.notAfter, into);
3169
- }
3170
- allocationSize(value) {
3171
- return FfiConverterString.allocationSize(value.handle) + FfiConverterString.allocationSize(value.displayName) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.certificate) + FfiConverterString.allocationSize(value.serialNumber) + FfiConverterTypeTimestamp.allocationSize(value.notBefore) + FfiConverterTypeTimestamp.allocationSize(value.notAfter);
3172
- }
3173
- }
3174
- return new FFIConverter;
3175
- })();
3176
- var WireIdentity = (() => {
3177
- const defaults = () => ({});
3178
- const create = (() => {
3179
- return uniffiCreateRecord(defaults);
3180
- })();
3181
- return Object.freeze({
3182
- create,
3183
- new: create,
3184
- defaults: () => Object.freeze(defaults())
3185
- });
3186
- })();
3187
- var FfiConverterTypeWireIdentity = (() => {
3188
-
3189
- class FFIConverter extends AbstractFfiConverterByteArray {
3190
- read(from) {
3191
- return {
3192
- clientId: FfiConverterOptionalTypeClientId.read(from),
3193
- status: FfiConverterTypeDeviceStatus.read(from),
3194
- thumbprint: FfiConverterString.read(from),
3195
- credentialType: FfiConverterTypeCredentialType.read(from),
3196
- x509Identity: FfiConverterOptionalTypeX509Identity.read(from)
3197
- };
3198
- }
3199
- write(value, into) {
3200
- FfiConverterOptionalTypeClientId.write(value.clientId, into);
3201
- FfiConverterTypeDeviceStatus.write(value.status, into);
3202
- FfiConverterString.write(value.thumbprint, into);
3203
- FfiConverterTypeCredentialType.write(value.credentialType, into);
3204
- FfiConverterOptionalTypeX509Identity.write(value.x509Identity, into);
3205
- }
3206
- allocationSize(value) {
3207
- return FfiConverterOptionalTypeClientId.allocationSize(value.clientId) + FfiConverterTypeDeviceStatus.allocationSize(value.status) + FfiConverterString.allocationSize(value.thumbprint) + FfiConverterTypeCredentialType.allocationSize(value.credentialType) + FfiConverterOptionalTypeX509Identity.allocationSize(value.x509Identity);
3208
- }
3209
- }
3210
- return new FFIConverter;
3211
- })();
3212
- var BufferedDecryptedMessage = (() => {
3213
- const defaults = () => ({});
3214
- const create = (() => {
3215
- return uniffiCreateRecord(defaults);
3216
- })();
3217
- return Object.freeze({
3218
- create,
3219
- new: create,
3220
- defaults: () => Object.freeze(defaults())
3221
- });
3222
- })();
3223
- var FfiConverterTypeBufferedDecryptedMessage = (() => {
3224
-
3225
- class FFIConverter extends AbstractFfiConverterByteArray {
3226
- read(from) {
3227
- return {
3228
- message: FfiConverterOptionalBytes.read(from),
3229
- isActive: FfiConverterBool.read(from),
3230
- commitDelay: FfiConverterOptionalUInt64.read(from),
3231
- senderClientId: FfiConverterOptionalTypeClientId.read(from),
3232
- identity: FfiConverterTypeWireIdentity.read(from)
3233
- };
3234
- }
3235
- write(value, into) {
3236
- FfiConverterOptionalBytes.write(value.message, into);
3237
- FfiConverterBool.write(value.isActive, into);
3238
- FfiConverterOptionalUInt64.write(value.commitDelay, into);
3239
- FfiConverterOptionalTypeClientId.write(value.senderClientId, into);
3240
- FfiConverterTypeWireIdentity.write(value.identity, into);
3241
- }
3242
- allocationSize(value) {
3243
- return FfiConverterOptionalBytes.allocationSize(value.message) + FfiConverterBool.allocationSize(value.isActive) + FfiConverterOptionalUInt64.allocationSize(value.commitDelay) + FfiConverterOptionalTypeClientId.allocationSize(value.senderClientId) + FfiConverterTypeWireIdentity.allocationSize(value.identity);
3244
- }
3245
- }
3246
- return new FFIConverter;
3247
- })();
3248
- var BuildMetadata = (() => {
3249
- const defaults = () => ({});
3250
- const create = (() => {
3251
- return uniffiCreateRecord(defaults);
3252
- })();
3253
- return Object.freeze({
3254
- create,
3255
- new: create,
3256
- defaults: () => Object.freeze(defaults())
3257
- });
3258
- })();
3259
- var FfiConverterTypeBuildMetadata = (() => {
2532
+ var FfiConverterTypeBuildMetadata = (() => {
3260
2533
 
3261
2534
  class FFIConverter extends AbstractFfiConverterByteArray {
3262
2535
  read(from) {
@@ -3569,9 +2842,7 @@ var FfiConverterTypeMlsError = (() => {
3569
2842
  read(from) {
3570
2843
  switch (ordinalConverter.read(from)) {
3571
2844
  case 1:
3572
- return new MlsError.ConversationAlreadyExists({
3573
- conversationId: FfiConverterUint8Array.read(from)
3574
- });
2845
+ return new MlsError.ConversationAlreadyExists({ conversationId: FfiConverterUint8Array.read(from) });
3575
2846
  case 2:
3576
2847
  return new MlsError.DuplicateMessage;
3577
2848
  case 3:
@@ -3593,13 +2864,9 @@ var FfiConverterTypeMlsError = (() => {
3593
2864
  case 11:
3594
2865
  return new MlsError.OrphanWelcome;
3595
2866
  case 12:
3596
- return new MlsError.MessageRejected({
3597
- reason: FfiConverterString.read(from)
3598
- });
2867
+ return new MlsError.MessageRejected({ reason: FfiConverterString.read(from) });
3599
2868
  case 13:
3600
- return new MlsError.Other({
3601
- msg: FfiConverterString.read(from)
3602
- });
2869
+ return new MlsError.Other({ msg: FfiConverterString.read(from) });
3603
2870
  default:
3604
2871
  throw new UniffiInternalError.UnexpectedEnumCase;
3605
2872
  }
@@ -3830,9 +3097,7 @@ var FfiConverterTypeProteusError = (() => {
3830
3097
  case 3:
3831
3098
  return new ProteusError.RemoteIdentityChanged;
3832
3099
  case 4:
3833
- return new ProteusError.Other({
3834
- errorCode: FfiConverterUInt16.read(from)
3835
- });
3100
+ return new ProteusError.Other({ errorCode: FfiConverterUInt16.read(from) });
3836
3101
  default:
3837
3102
  throw new UniffiInternalError.UnexpectedEnumCase;
3838
3103
  }
@@ -3937,237 +3202,565 @@ var CoreCryptoError = (() => {
3937
3202
  static getInner(obj) {
3938
3203
  return obj.inner;
3939
3204
  }
3940
- }
3205
+ }
3206
+
3207
+ class E2ei_ extends UniffiError {
3208
+ [uniffiTypeNameSymbol] = "CoreCryptoError";
3209
+ tag = "E2ei" /* E2ei */;
3210
+ inner;
3211
+ constructor(inner) {
3212
+ super("CoreCryptoError", "E2ei");
3213
+ this.inner = Object.freeze(inner);
3214
+ }
3215
+ static new(inner) {
3216
+ return new E2ei_(inner);
3217
+ }
3218
+ static instanceOf(obj) {
3219
+ return obj.tag === "E2ei" /* E2ei */;
3220
+ }
3221
+ static hasInner(obj) {
3222
+ return E2ei_.instanceOf(obj);
3223
+ }
3224
+ static getInner(obj) {
3225
+ return obj.inner;
3226
+ }
3227
+ }
3228
+
3229
+ class TransactionFailed_ extends UniffiError {
3230
+ [uniffiTypeNameSymbol] = "CoreCryptoError";
3231
+ tag = "TransactionFailed" /* TransactionFailed */;
3232
+ inner;
3233
+ constructor(inner) {
3234
+ super("CoreCryptoError", "TransactionFailed");
3235
+ this.inner = Object.freeze(inner);
3236
+ }
3237
+ static new(inner) {
3238
+ return new TransactionFailed_(inner);
3239
+ }
3240
+ static instanceOf(obj) {
3241
+ return obj.tag === "TransactionFailed" /* TransactionFailed */;
3242
+ }
3243
+ static hasInner(obj) {
3244
+ return TransactionFailed_.instanceOf(obj);
3245
+ }
3246
+ static getInner(obj) {
3247
+ return obj.inner;
3248
+ }
3249
+ }
3250
+
3251
+ class Other_ extends UniffiError {
3252
+ [uniffiTypeNameSymbol] = "CoreCryptoError";
3253
+ tag = "Other" /* Other */;
3254
+ inner;
3255
+ constructor(inner) {
3256
+ super("CoreCryptoError", "Other");
3257
+ this.inner = Object.freeze(inner);
3258
+ }
3259
+ static new(inner) {
3260
+ return new Other_(inner);
3261
+ }
3262
+ static instanceOf(obj) {
3263
+ return obj.tag === "Other" /* Other */;
3264
+ }
3265
+ static hasInner(obj) {
3266
+ return Other_.instanceOf(obj);
3267
+ }
3268
+ static getInner(obj) {
3269
+ return obj.inner;
3270
+ }
3271
+ }
3272
+ function instanceOf(obj) {
3273
+ return obj[uniffiTypeNameSymbol] === "CoreCryptoError";
3274
+ }
3275
+ return Object.freeze({
3276
+ instanceOf,
3277
+ Mls: Mls_,
3278
+ Proteus: Proteus_,
3279
+ E2ei: E2ei_,
3280
+ TransactionFailed: TransactionFailed_,
3281
+ Other: Other_
3282
+ });
3283
+ })();
3284
+ var FfiConverterTypeCoreCryptoError = (() => {
3285
+ const ordinalConverter = FfiConverterInt32;
3286
+
3287
+ class FFIConverter extends AbstractFfiConverterByteArray {
3288
+ read(from) {
3289
+ switch (ordinalConverter.read(from)) {
3290
+ case 1:
3291
+ return new CoreCryptoError.Mls({ mlsError: FfiConverterTypeMlsError.read(from) });
3292
+ case 2:
3293
+ return new CoreCryptoError.Proteus({ exception: FfiConverterTypeProteusError.read(from) });
3294
+ case 3:
3295
+ return new CoreCryptoError.E2ei({ e2eiError: FfiConverterString.read(from) });
3296
+ case 4:
3297
+ return new CoreCryptoError.TransactionFailed({ error: FfiConverterString.read(from) });
3298
+ case 5:
3299
+ return new CoreCryptoError.Other({ msg: FfiConverterString.read(from) });
3300
+ default:
3301
+ throw new UniffiInternalError.UnexpectedEnumCase;
3302
+ }
3303
+ }
3304
+ write(value, into) {
3305
+ switch (value.tag) {
3306
+ case "Mls" /* Mls */: {
3307
+ ordinalConverter.write(1, into);
3308
+ const inner = value.inner;
3309
+ FfiConverterTypeMlsError.write(inner.mlsError, into);
3310
+ return;
3311
+ }
3312
+ case "Proteus" /* Proteus */: {
3313
+ ordinalConverter.write(2, into);
3314
+ const inner = value.inner;
3315
+ FfiConverterTypeProteusError.write(inner.exception, into);
3316
+ return;
3317
+ }
3318
+ case "E2ei" /* E2ei */: {
3319
+ ordinalConverter.write(3, into);
3320
+ const inner = value.inner;
3321
+ FfiConverterString.write(inner.e2eiError, into);
3322
+ return;
3323
+ }
3324
+ case "TransactionFailed" /* TransactionFailed */: {
3325
+ ordinalConverter.write(4, into);
3326
+ const inner = value.inner;
3327
+ FfiConverterString.write(inner.error, into);
3328
+ return;
3329
+ }
3330
+ case "Other" /* Other */: {
3331
+ ordinalConverter.write(5, into);
3332
+ const inner = value.inner;
3333
+ FfiConverterString.write(inner.msg, into);
3334
+ return;
3335
+ }
3336
+ default:
3337
+ throw new UniffiInternalError.UnexpectedEnumCase;
3338
+ }
3339
+ }
3340
+ allocationSize(value) {
3341
+ switch (value.tag) {
3342
+ case "Mls" /* Mls */: {
3343
+ const inner = value.inner;
3344
+ let size = ordinalConverter.allocationSize(1);
3345
+ size += FfiConverterTypeMlsError.allocationSize(inner.mlsError);
3346
+ return size;
3347
+ }
3348
+ case "Proteus" /* Proteus */: {
3349
+ const inner = value.inner;
3350
+ let size = ordinalConverter.allocationSize(2);
3351
+ size += FfiConverterTypeProteusError.allocationSize(inner.exception);
3352
+ return size;
3353
+ }
3354
+ case "E2ei" /* E2ei */: {
3355
+ const inner = value.inner;
3356
+ let size = ordinalConverter.allocationSize(3);
3357
+ size += FfiConverterString.allocationSize(inner.e2eiError);
3358
+ return size;
3359
+ }
3360
+ case "TransactionFailed" /* TransactionFailed */: {
3361
+ const inner = value.inner;
3362
+ let size = ordinalConverter.allocationSize(4);
3363
+ size += FfiConverterString.allocationSize(inner.error);
3364
+ return size;
3365
+ }
3366
+ case "Other" /* Other */: {
3367
+ const inner = value.inner;
3368
+ let size = ordinalConverter.allocationSize(5);
3369
+ size += FfiConverterString.allocationSize(inner.msg);
3370
+ return size;
3371
+ }
3372
+ default:
3373
+ throw new UniffiInternalError.UnexpectedEnumCase;
3374
+ }
3375
+ }
3376
+ }
3377
+ return new FFIConverter;
3378
+ })();
3379
+
3380
+ class Welcome extends UniffiAbstractObject {
3381
+ [uniffiTypeNameSymbol] = "Welcome";
3382
+ [destructorGuardSymbol];
3383
+ [pointerLiteralSymbol];
3384
+ constructor(bytes) {
3385
+ super();
3386
+ const pointer = uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
3387
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_welcome_new(FfiConverterUint8Array.lower(bytes, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3388
+ }, FfiConverterString.lift.bind(FfiConverterString));
3389
+ this[pointerLiteralSymbol] = pointer;
3390
+ this[destructorGuardSymbol] = uniffiTypeWelcomeObjectFactory.bless(pointer);
3391
+ }
3392
+ serialize() {
3393
+ return ((__rb) => {
3394
+ try {
3395
+ return FfiConverterUint8Array.lift(__rb);
3396
+ } finally {
3397
+ core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
3398
+ }
3399
+ })(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
3400
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_welcome_serialize(uniffiTypeWelcomeObjectFactory.clonePointer(this), callStatus);
3401
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3402
+ }
3403
+ uniffiDestroy() {
3404
+ const ptr = this[destructorGuardSymbol];
3405
+ if (ptr !== undefined) {
3406
+ const pointer = uniffiTypeWelcomeObjectFactory.pointer(this);
3407
+ uniffiTypeWelcomeObjectFactory.freePointer(pointer);
3408
+ uniffiTypeWelcomeObjectFactory.unbless(ptr);
3409
+ delete this[destructorGuardSymbol];
3410
+ }
3411
+ }
3412
+ static instanceOf(obj_) {
3413
+ return uniffiTypeWelcomeObjectFactory.isConcreteType(obj_);
3414
+ }
3415
+ }
3416
+ var uniffiTypeWelcomeObjectFactory = (() => {
3417
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
3418
+ uniffiTypeWelcomeObjectFactory.freePointer(heldValue);
3419
+ }) : null;
3420
+ return {
3421
+ create(pointer) {
3422
+ const instance = Object.create(Welcome.prototype);
3423
+ instance[pointerLiteralSymbol] = pointer;
3424
+ instance[destructorGuardSymbol] = this.bless(pointer);
3425
+ instance[uniffiTypeNameSymbol] = "Welcome";
3426
+ return instance;
3427
+ },
3428
+ bless(p) {
3429
+ const ptr = {
3430
+ p,
3431
+ markDestroyed: () => {
3432
+ return;
3433
+ }
3434
+ };
3435
+ if (registry) {
3436
+ registry.register(ptr, p, ptr);
3437
+ }
3438
+ return ptr;
3439
+ },
3440
+ unbless(ptr_) {
3441
+ if (registry) {
3442
+ registry.unregister(ptr_);
3443
+ }
3444
+ },
3445
+ pointer(obj_) {
3446
+ if (obj_[destructorGuardSymbol] === undefined) {
3447
+ throw new UniffiInternalError.UnexpectedNullPointer;
3448
+ }
3449
+ return obj_[pointerLiteralSymbol];
3450
+ },
3451
+ clonePointer(obj_) {
3452
+ const pointer = this.pointer(obj_);
3453
+ return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_welcome(pointer, callStatus), FfiConverterString.lift);
3454
+ },
3455
+ freePointer(pointer) {
3456
+ uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_welcome(pointer, callStatus), FfiConverterString.lift);
3457
+ },
3458
+ isConcreteType(obj_) {
3459
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Welcome";
3460
+ }
3461
+ };
3462
+ })();
3463
+ var FfiConverterTypeWelcome = new FfiConverterObject(uniffiTypeWelcomeObjectFactory);
3464
+ var MlsGroupInfoEncryptionType;
3465
+ ((MlsGroupInfoEncryptionType2) => {
3466
+ MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["Plaintext"] = 1] = "Plaintext";
3467
+ MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["JweEncrypted"] = 2] = "JweEncrypted";
3468
+ })(MlsGroupInfoEncryptionType ||= {});
3469
+ var FfiConverterTypeMlsGroupInfoEncryptionType = (() => {
3470
+ const ordinalConverter = FfiConverterInt32;
3941
3471
 
3942
- class E2ei_ extends UniffiError {
3943
- [uniffiTypeNameSymbol] = "CoreCryptoError";
3944
- tag = "E2ei" /* E2ei */;
3945
- inner;
3946
- constructor(inner) {
3947
- super("CoreCryptoError", "E2ei");
3948
- this.inner = Object.freeze(inner);
3949
- }
3950
- static new(inner) {
3951
- return new E2ei_(inner);
3952
- }
3953
- static instanceOf(obj) {
3954
- return obj.tag === "E2ei" /* E2ei */;
3472
+ class FFIConverter extends AbstractFfiConverterByteArray {
3473
+ read(from) {
3474
+ switch (ordinalConverter.read(from)) {
3475
+ case 1:
3476
+ return 1 /* Plaintext */;
3477
+ case 2:
3478
+ return 2 /* JweEncrypted */;
3479
+ default:
3480
+ throw new UniffiInternalError.UnexpectedEnumCase;
3481
+ }
3955
3482
  }
3956
- static hasInner(obj) {
3957
- return E2ei_.instanceOf(obj);
3483
+ write(value, into) {
3484
+ switch (value) {
3485
+ case 1 /* Plaintext */:
3486
+ return ordinalConverter.write(1, into);
3487
+ case 2 /* JweEncrypted */:
3488
+ return ordinalConverter.write(2, into);
3489
+ }
3958
3490
  }
3959
- static getInner(obj) {
3960
- return obj.inner;
3491
+ allocationSize(value) {
3492
+ return ordinalConverter.allocationSize(0);
3961
3493
  }
3962
3494
  }
3495
+ return new FFIConverter;
3496
+ })();
3497
+ var MlsRatchetTreeType;
3498
+ ((MlsRatchetTreeType2) => {
3499
+ MlsRatchetTreeType2[MlsRatchetTreeType2["Full"] = 1] = "Full";
3500
+ MlsRatchetTreeType2[MlsRatchetTreeType2["Delta"] = 2] = "Delta";
3501
+ MlsRatchetTreeType2[MlsRatchetTreeType2["ByRef"] = 3] = "ByRef";
3502
+ })(MlsRatchetTreeType ||= {});
3503
+ var FfiConverterTypeMlsRatchetTreeType = (() => {
3504
+ const ordinalConverter = FfiConverterInt32;
3963
3505
 
3964
- class TransactionFailed_ extends UniffiError {
3965
- [uniffiTypeNameSymbol] = "CoreCryptoError";
3966
- tag = "TransactionFailed" /* TransactionFailed */;
3967
- inner;
3968
- constructor(inner) {
3969
- super("CoreCryptoError", "TransactionFailed");
3970
- this.inner = Object.freeze(inner);
3971
- }
3972
- static new(inner) {
3973
- return new TransactionFailed_(inner);
3974
- }
3975
- static instanceOf(obj) {
3976
- return obj.tag === "TransactionFailed" /* TransactionFailed */;
3506
+ class FFIConverter extends AbstractFfiConverterByteArray {
3507
+ read(from) {
3508
+ switch (ordinalConverter.read(from)) {
3509
+ case 1:
3510
+ return 1 /* Full */;
3511
+ case 2:
3512
+ return 2 /* Delta */;
3513
+ case 3:
3514
+ return 3 /* ByRef */;
3515
+ default:
3516
+ throw new UniffiInternalError.UnexpectedEnumCase;
3517
+ }
3977
3518
  }
3978
- static hasInner(obj) {
3979
- return TransactionFailed_.instanceOf(obj);
3519
+ write(value, into) {
3520
+ switch (value) {
3521
+ case 1 /* Full */:
3522
+ return ordinalConverter.write(1, into);
3523
+ case 2 /* Delta */:
3524
+ return ordinalConverter.write(2, into);
3525
+ case 3 /* ByRef */:
3526
+ return ordinalConverter.write(3, into);
3527
+ }
3980
3528
  }
3981
- static getInner(obj) {
3982
- return obj.inner;
3529
+ allocationSize(value) {
3530
+ return ordinalConverter.allocationSize(0);
3983
3531
  }
3984
3532
  }
3533
+ return new FFIConverter;
3534
+ })();
3535
+ var GroupInfoBundle = (() => {
3536
+ const defaults = () => ({});
3537
+ const create = (() => {
3538
+ return uniffiCreateRecord(defaults);
3539
+ })();
3540
+ return Object.freeze({
3541
+ create,
3542
+ new: create,
3543
+ defaults: () => Object.freeze(defaults())
3544
+ });
3545
+ })();
3546
+ var FfiConverterTypeGroupInfoBundle = (() => {
3985
3547
 
3986
- class Other_ extends UniffiError {
3987
- [uniffiTypeNameSymbol] = "CoreCryptoError";
3988
- tag = "Other" /* Other */;
3989
- inner;
3990
- constructor(inner) {
3991
- super("CoreCryptoError", "Other");
3992
- this.inner = Object.freeze(inner);
3993
- }
3994
- static new(inner) {
3995
- return new Other_(inner);
3996
- }
3997
- static instanceOf(obj) {
3998
- return obj.tag === "Other" /* Other */;
3548
+ class FFIConverter extends AbstractFfiConverterByteArray {
3549
+ read(from) {
3550
+ return {
3551
+ encryptionType: FfiConverterTypeMlsGroupInfoEncryptionType.read(from),
3552
+ ratchetTreeType: FfiConverterTypeMlsRatchetTreeType.read(from),
3553
+ payload: FfiConverterUint8Array.read(from)
3554
+ };
3999
3555
  }
4000
- static hasInner(obj) {
4001
- return Other_.instanceOf(obj);
3556
+ write(value, into) {
3557
+ FfiConverterTypeMlsGroupInfoEncryptionType.write(value.encryptionType, into);
3558
+ FfiConverterTypeMlsRatchetTreeType.write(value.ratchetTreeType, into);
3559
+ FfiConverterUint8Array.write(value.payload, into);
4002
3560
  }
4003
- static getInner(obj) {
4004
- return obj.inner;
3561
+ allocationSize(value) {
3562
+ return FfiConverterTypeMlsGroupInfoEncryptionType.allocationSize(value.encryptionType) + FfiConverterTypeMlsRatchetTreeType.allocationSize(value.ratchetTreeType) + FfiConverterUint8Array.allocationSize(value.payload);
4005
3563
  }
4006
3564
  }
4007
- function instanceOf(obj) {
4008
- return obj[uniffiTypeNameSymbol] === "CoreCryptoError";
4009
- }
3565
+ return new FFIConverter;
3566
+ })();
3567
+ var CommitBundle = (() => {
3568
+ const defaults = () => ({});
3569
+ const create = (() => {
3570
+ return uniffiCreateRecord(defaults);
3571
+ })();
4010
3572
  return Object.freeze({
4011
- instanceOf,
4012
- Mls: Mls_,
4013
- Proteus: Proteus_,
4014
- E2ei: E2ei_,
4015
- TransactionFailed: TransactionFailed_,
4016
- Other: Other_
3573
+ create,
3574
+ new: create,
3575
+ defaults: () => Object.freeze(defaults())
4017
3576
  });
4018
3577
  })();
4019
- var FfiConverterTypeCoreCryptoError = (() => {
4020
- const ordinalConverter = FfiConverterInt32;
3578
+ var FfiConverterTypeCommitBundle = (() => {
4021
3579
 
4022
3580
  class FFIConverter extends AbstractFfiConverterByteArray {
4023
3581
  read(from) {
4024
- switch (ordinalConverter.read(from)) {
4025
- case 1:
4026
- return new CoreCryptoError.Mls({
4027
- mlsError: FfiConverterTypeMlsError.read(from)
4028
- });
4029
- case 2:
4030
- return new CoreCryptoError.Proteus({
4031
- exception: FfiConverterTypeProteusError.read(from)
4032
- });
4033
- case 3:
4034
- return new CoreCryptoError.E2ei({
4035
- e2eiError: FfiConverterString.read(from)
4036
- });
4037
- case 4:
4038
- return new CoreCryptoError.TransactionFailed({
4039
- error: FfiConverterString.read(from)
4040
- });
4041
- case 5:
4042
- return new CoreCryptoError.Other({
4043
- msg: FfiConverterString.read(from)
4044
- });
4045
- default:
4046
- throw new UniffiInternalError.UnexpectedEnumCase;
4047
- }
3582
+ return {
3583
+ welcome: FfiConverterOptionalTypeWelcome.read(from),
3584
+ commit: FfiConverterUint8Array.read(from),
3585
+ groupInfo: FfiConverterTypeGroupInfoBundle.read(from),
3586
+ encryptedMessage: FfiConverterOptionalBytes.read(from)
3587
+ };
4048
3588
  }
4049
3589
  write(value, into) {
4050
- switch (value.tag) {
4051
- case "Mls" /* Mls */: {
4052
- ordinalConverter.write(1, into);
4053
- const inner = value.inner;
4054
- FfiConverterTypeMlsError.write(inner.mlsError, into);
4055
- return;
4056
- }
4057
- case "Proteus" /* Proteus */: {
4058
- ordinalConverter.write(2, into);
4059
- const inner = value.inner;
4060
- FfiConverterTypeProteusError.write(inner.exception, into);
4061
- return;
4062
- }
4063
- case "E2ei" /* E2ei */: {
4064
- ordinalConverter.write(3, into);
4065
- const inner = value.inner;
4066
- FfiConverterString.write(inner.e2eiError, into);
4067
- return;
4068
- }
4069
- case "TransactionFailed" /* TransactionFailed */: {
4070
- ordinalConverter.write(4, into);
4071
- const inner = value.inner;
4072
- FfiConverterString.write(inner.error, into);
4073
- return;
4074
- }
4075
- case "Other" /* Other */: {
4076
- ordinalConverter.write(5, into);
4077
- const inner = value.inner;
4078
- FfiConverterString.write(inner.msg, into);
4079
- return;
4080
- }
4081
- default:
4082
- throw new UniffiInternalError.UnexpectedEnumCase;
3590
+ FfiConverterOptionalTypeWelcome.write(value.welcome, into);
3591
+ FfiConverterUint8Array.write(value.commit, into);
3592
+ FfiConverterTypeGroupInfoBundle.write(value.groupInfo, into);
3593
+ FfiConverterOptionalBytes.write(value.encryptedMessage, into);
3594
+ }
3595
+ allocationSize(value) {
3596
+ return FfiConverterOptionalTypeWelcome.allocationSize(value.welcome) + FfiConverterUint8Array.allocationSize(value.commit) + FfiConverterTypeGroupInfoBundle.allocationSize(value.groupInfo) + FfiConverterOptionalBytes.allocationSize(value.encryptedMessage);
3597
+ }
3598
+ }
3599
+ return new FFIConverter;
3600
+ })();
3601
+
3602
+ class ClientId extends UniffiAbstractObject {
3603
+ [uniffiTypeNameSymbol] = "ClientId";
3604
+ [destructorGuardSymbol];
3605
+ [pointerLiteralSymbol];
3606
+ constructor(userId, deviceId, domain) {
3607
+ super();
3608
+ const pointer = uniffiCaller.rustCall((callStatus) => {
3609
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_clientid_new(FfiConverterTypeUuid.lower(userId, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterTypeDeviceId.lower(deviceId, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterString.lower(domain, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3610
+ }, FfiConverterString.lift.bind(FfiConverterString));
3611
+ this[pointerLiteralSymbol] = pointer;
3612
+ this[destructorGuardSymbol] = uniffiTypeClientIdObjectFactory.bless(pointer);
3613
+ }
3614
+ copyBytes() {
3615
+ return ((__rb) => {
3616
+ try {
3617
+ return FfiConverterUint8Array.lift(__rb);
3618
+ } finally {
3619
+ core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
3620
+ }
3621
+ })(uniffiCaller.rustCall((callStatus) => {
3622
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_copy_bytes(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
3623
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3624
+ }
3625
+ deserialize() {
3626
+ return ((__rb) => {
3627
+ try {
3628
+ return FfiConverterTypeDeserializedClientId.lift(__rb);
3629
+ } finally {
3630
+ core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
4083
3631
  }
3632
+ })(uniffiCaller.rustCall((callStatus) => {
3633
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_deserialize(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
3634
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3635
+ }
3636
+ equals(other) {
3637
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
3638
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_eq_eq(uniffiTypeClientIdObjectFactory.clonePointer(this), FfiConverterTypeClientId.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3639
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3640
+ }
3641
+ hashCode() {
3642
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
3643
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_hash(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
3644
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3645
+ }
3646
+ uniffiDestroy() {
3647
+ const ptr = this[destructorGuardSymbol];
3648
+ if (ptr !== undefined) {
3649
+ const pointer = uniffiTypeClientIdObjectFactory.pointer(this);
3650
+ uniffiTypeClientIdObjectFactory.freePointer(pointer);
3651
+ uniffiTypeClientIdObjectFactory.unbless(ptr);
3652
+ delete this[destructorGuardSymbol];
4084
3653
  }
4085
- allocationSize(value) {
4086
- switch (value.tag) {
4087
- case "Mls" /* Mls */: {
4088
- const inner = value.inner;
4089
- let size = ordinalConverter.allocationSize(1);
4090
- size += FfiConverterTypeMlsError.allocationSize(inner.mlsError);
4091
- return size;
4092
- }
4093
- case "Proteus" /* Proteus */: {
4094
- const inner = value.inner;
4095
- let size = ordinalConverter.allocationSize(2);
4096
- size += FfiConverterTypeProteusError.allocationSize(inner.exception);
4097
- return size;
4098
- }
4099
- case "E2ei" /* E2ei */: {
4100
- const inner = value.inner;
4101
- let size = ordinalConverter.allocationSize(3);
4102
- size += FfiConverterString.allocationSize(inner.e2eiError);
4103
- return size;
4104
- }
4105
- case "TransactionFailed" /* TransactionFailed */: {
4106
- const inner = value.inner;
4107
- let size = ordinalConverter.allocationSize(4);
4108
- size += FfiConverterString.allocationSize(inner.error);
4109
- return size;
4110
- }
4111
- case "Other" /* Other */: {
4112
- const inner = value.inner;
4113
- let size = ordinalConverter.allocationSize(5);
4114
- size += FfiConverterString.allocationSize(inner.msg);
4115
- return size;
3654
+ }
3655
+ static instanceOf(obj_) {
3656
+ return uniffiTypeClientIdObjectFactory.isConcreteType(obj_);
3657
+ }
3658
+ }
3659
+ var uniffiTypeClientIdObjectFactory = (() => {
3660
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
3661
+ uniffiTypeClientIdObjectFactory.freePointer(heldValue);
3662
+ }) : null;
3663
+ return {
3664
+ create(pointer) {
3665
+ const instance = Object.create(ClientId.prototype);
3666
+ instance[pointerLiteralSymbol] = pointer;
3667
+ instance[destructorGuardSymbol] = this.bless(pointer);
3668
+ instance[uniffiTypeNameSymbol] = "ClientId";
3669
+ return instance;
3670
+ },
3671
+ bless(p) {
3672
+ const ptr = {
3673
+ p,
3674
+ markDestroyed: () => {
3675
+ return;
4116
3676
  }
4117
- default:
4118
- throw new UniffiInternalError.UnexpectedEnumCase;
3677
+ };
3678
+ if (registry) {
3679
+ registry.register(ptr, p, ptr);
4119
3680
  }
3681
+ return ptr;
3682
+ },
3683
+ unbless(ptr_) {
3684
+ if (registry) {
3685
+ registry.unregister(ptr_);
3686
+ }
3687
+ },
3688
+ pointer(obj_) {
3689
+ if (obj_[destructorGuardSymbol] === undefined) {
3690
+ throw new UniffiInternalError.UnexpectedNullPointer;
3691
+ }
3692
+ return obj_[pointerLiteralSymbol];
3693
+ },
3694
+ clonePointer(obj_) {
3695
+ const pointer = this.pointer(obj_);
3696
+ return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_clientid(pointer, callStatus), FfiConverterString.lift);
3697
+ },
3698
+ freePointer(pointer) {
3699
+ uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_clientid(pointer, callStatus), FfiConverterString.lift);
3700
+ },
3701
+ isConcreteType(obj_) {
3702
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "ClientId";
4120
3703
  }
4121
- }
4122
- return new FFIConverter;
3704
+ };
4123
3705
  })();
3706
+ var FfiConverterTypeClientId = new FfiConverterObject(uniffiTypeClientIdObjectFactory);
4124
3707
 
4125
- class Welcome extends UniffiAbstractObject {
4126
- [uniffiTypeNameSymbol] = "Welcome";
3708
+ class Uuid extends UniffiAbstractObject {
3709
+ [uniffiTypeNameSymbol] = "Uuid";
4127
3710
  [destructorGuardSymbol];
4128
3711
  [pointerLiteralSymbol];
4129
- constructor(bytes) {
3712
+ constructor(uuid) {
4130
3713
  super();
4131
3714
  const pointer = uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
4132
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_welcome_new(FfiConverterUint8Array.lower(bytes, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3715
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_uuid_new(FfiConverterString.lower(uuid, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
4133
3716
  }, FfiConverterString.lift.bind(FfiConverterString));
4134
3717
  this[pointerLiteralSymbol] = pointer;
4135
- this[destructorGuardSymbol] = uniffiTypeWelcomeObjectFactory.bless(pointer);
3718
+ this[destructorGuardSymbol] = uniffiTypeUuidObjectFactory.bless(pointer);
4136
3719
  }
4137
- serialize() {
3720
+ toString() {
4138
3721
  return ((__rb) => {
4139
3722
  try {
4140
- return FfiConverterUint8Array.lift(__rb);
3723
+ return FfiConverterString.lift(__rb);
4141
3724
  } finally {
4142
3725
  core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
4143
3726
  }
4144
- })(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
4145
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_welcome_serialize(uniffiTypeWelcomeObjectFactory.clonePointer(this), callStatus);
3727
+ })(uniffiCaller.rustCall((callStatus) => {
3728
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_display(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
3729
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3730
+ }
3731
+ equals(other) {
3732
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
3733
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_eq_eq(uniffiTypeUuidObjectFactory.clonePointer(this), FfiConverterTypeUuid.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3734
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3735
+ }
3736
+ hashCode() {
3737
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
3738
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_hash(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
4146
3739
  }, FfiConverterString.lift.bind(FfiConverterString)));
4147
3740
  }
4148
3741
  uniffiDestroy() {
4149
3742
  const ptr = this[destructorGuardSymbol];
4150
3743
  if (ptr !== undefined) {
4151
- const pointer = uniffiTypeWelcomeObjectFactory.pointer(this);
4152
- uniffiTypeWelcomeObjectFactory.freePointer(pointer);
4153
- uniffiTypeWelcomeObjectFactory.unbless(ptr);
3744
+ const pointer = uniffiTypeUuidObjectFactory.pointer(this);
3745
+ uniffiTypeUuidObjectFactory.freePointer(pointer);
3746
+ uniffiTypeUuidObjectFactory.unbless(ptr);
4154
3747
  delete this[destructorGuardSymbol];
4155
3748
  }
4156
3749
  }
4157
3750
  static instanceOf(obj_) {
4158
- return uniffiTypeWelcomeObjectFactory.isConcreteType(obj_);
3751
+ return uniffiTypeUuidObjectFactory.isConcreteType(obj_);
4159
3752
  }
4160
3753
  }
4161
- var uniffiTypeWelcomeObjectFactory = (() => {
3754
+ var uniffiTypeUuidObjectFactory = (() => {
4162
3755
  const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
4163
- uniffiTypeWelcomeObjectFactory.freePointer(heldValue);
3756
+ uniffiTypeUuidObjectFactory.freePointer(heldValue);
4164
3757
  }) : null;
4165
3758
  return {
4166
3759
  create(pointer) {
4167
- const instance = Object.create(Welcome.prototype);
3760
+ const instance = Object.create(Uuid.prototype);
4168
3761
  instance[pointerLiteralSymbol] = pointer;
4169
3762
  instance[destructorGuardSymbol] = this.bless(pointer);
4170
- instance[uniffiTypeNameSymbol] = "Welcome";
3763
+ instance[uniffiTypeNameSymbol] = "Uuid";
4171
3764
  return instance;
4172
3765
  },
4173
3766
  bless(p) {
@@ -4195,89 +3788,168 @@ var uniffiTypeWelcomeObjectFactory = (() => {
4195
3788
  },
4196
3789
  clonePointer(obj_) {
4197
3790
  const pointer = this.pointer(obj_);
4198
- return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_welcome(pointer, callStatus), FfiConverterString.lift);
3791
+ return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_uuid(pointer, callStatus), FfiConverterString.lift);
4199
3792
  },
4200
3793
  freePointer(pointer) {
4201
- uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_welcome(pointer, callStatus), FfiConverterString.lift);
3794
+ uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_uuid(pointer, callStatus), FfiConverterString.lift);
4202
3795
  },
4203
3796
  isConcreteType(obj_) {
4204
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Welcome";
3797
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Uuid";
4205
3798
  }
4206
3799
  };
4207
3800
  })();
4208
- var FfiConverterTypeWelcome = new FfiConverterObject(uniffiTypeWelcomeObjectFactory);
4209
- var MlsGroupInfoEncryptionType;
4210
- ((MlsGroupInfoEncryptionType2) => {
4211
- MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["Plaintext"] = 1] = "Plaintext";
4212
- MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["JweEncrypted"] = 2] = "JweEncrypted";
4213
- })(MlsGroupInfoEncryptionType ||= {});
4214
- var FfiConverterTypeMlsGroupInfoEncryptionType = (() => {
4215
- const ordinalConverter = FfiConverterInt32;
3801
+ var FfiConverterTypeUuid = new FfiConverterObject(uniffiTypeUuidObjectFactory);
4216
3802
 
4217
- class FFIConverter extends AbstractFfiConverterByteArray {
4218
- read(from) {
4219
- switch (ordinalConverter.read(from)) {
4220
- case 1:
4221
- return 1 /* Plaintext */;
4222
- case 2:
4223
- return 2 /* JweEncrypted */;
4224
- default:
4225
- throw new UniffiInternalError.UnexpectedEnumCase;
3803
+ class DeviceId extends UniffiAbstractObject {
3804
+ [uniffiTypeNameSymbol] = "DeviceId";
3805
+ [destructorGuardSymbol];
3806
+ [pointerLiteralSymbol];
3807
+ constructor(id) {
3808
+ super();
3809
+ const pointer = uniffiCaller.rustCall((callStatus) => {
3810
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_deviceid_new(FfiConverterUInt64.lower(id, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3811
+ }, FfiConverterString.lift.bind(FfiConverterString));
3812
+ this[pointerLiteralSymbol] = pointer;
3813
+ this[destructorGuardSymbol] = uniffiTypeDeviceIdObjectFactory.bless(pointer);
3814
+ }
3815
+ static fromHexString(hexString) {
3816
+ return FfiConverterTypeDeviceId.lift(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
3817
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_deviceid_from_hex_string(FfiConverterString.lower(hexString, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3818
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3819
+ }
3820
+ toHexString() {
3821
+ return ((__rb) => {
3822
+ try {
3823
+ return FfiConverterString.lift(__rb);
3824
+ } finally {
3825
+ core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
4226
3826
  }
3827
+ })(uniffiCaller.rustCall((callStatus) => {
3828
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_to_hex_string(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
3829
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3830
+ }
3831
+ toU64() {
3832
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
3833
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_to_u64(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
3834
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3835
+ }
3836
+ equals(other) {
3837
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
3838
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_eq_eq(uniffiTypeDeviceIdObjectFactory.clonePointer(this), FfiConverterTypeDeviceId.lower(other, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3839
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3840
+ }
3841
+ hashCode() {
3842
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
3843
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_hash(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
3844
+ }, FfiConverterString.lift.bind(FfiConverterString)));
3845
+ }
3846
+ uniffiDestroy() {
3847
+ const ptr = this[destructorGuardSymbol];
3848
+ if (ptr !== undefined) {
3849
+ const pointer = uniffiTypeDeviceIdObjectFactory.pointer(this);
3850
+ uniffiTypeDeviceIdObjectFactory.freePointer(pointer);
3851
+ uniffiTypeDeviceIdObjectFactory.unbless(ptr);
3852
+ delete this[destructorGuardSymbol];
4227
3853
  }
4228
- write(value, into) {
4229
- switch (value) {
4230
- case 1 /* Plaintext */:
4231
- return ordinalConverter.write(1, into);
4232
- case 2 /* JweEncrypted */:
4233
- return ordinalConverter.write(2, into);
3854
+ }
3855
+ static instanceOf(obj_) {
3856
+ return uniffiTypeDeviceIdObjectFactory.isConcreteType(obj_);
3857
+ }
3858
+ }
3859
+ var uniffiTypeDeviceIdObjectFactory = (() => {
3860
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
3861
+ uniffiTypeDeviceIdObjectFactory.freePointer(heldValue);
3862
+ }) : null;
3863
+ return {
3864
+ create(pointer) {
3865
+ const instance = Object.create(DeviceId.prototype);
3866
+ instance[pointerLiteralSymbol] = pointer;
3867
+ instance[destructorGuardSymbol] = this.bless(pointer);
3868
+ instance[uniffiTypeNameSymbol] = "DeviceId";
3869
+ return instance;
3870
+ },
3871
+ bless(p) {
3872
+ const ptr = {
3873
+ p,
3874
+ markDestroyed: () => {
3875
+ return;
3876
+ }
3877
+ };
3878
+ if (registry) {
3879
+ registry.register(ptr, p, ptr);
3880
+ }
3881
+ return ptr;
3882
+ },
3883
+ unbless(ptr_) {
3884
+ if (registry) {
3885
+ registry.unregister(ptr_);
3886
+ }
3887
+ },
3888
+ pointer(obj_) {
3889
+ if (obj_[destructorGuardSymbol] === undefined) {
3890
+ throw new UniffiInternalError.UnexpectedNullPointer;
4234
3891
  }
3892
+ return obj_[pointerLiteralSymbol];
3893
+ },
3894
+ clonePointer(obj_) {
3895
+ const pointer = this.pointer(obj_);
3896
+ return uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_clone_deviceid(pointer, callStatus), FfiConverterString.lift);
3897
+ },
3898
+ freePointer(pointer) {
3899
+ uniffiCaller.rustCall((callStatus) => core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_free_deviceid(pointer, callStatus), FfiConverterString.lift);
3900
+ },
3901
+ isConcreteType(obj_) {
3902
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DeviceId";
4235
3903
  }
4236
- allocationSize(value) {
4237
- return ordinalConverter.allocationSize(0);
3904
+ };
3905
+ })();
3906
+ var FfiConverterTypeDeviceId = new FfiConverterObject(uniffiTypeDeviceIdObjectFactory);
3907
+ var DeserializedClientId = (() => {
3908
+ const defaults = () => ({});
3909
+ const create = (() => {
3910
+ return uniffiCreateRecord(defaults);
3911
+ })();
3912
+ return Object.freeze({
3913
+ create,
3914
+ new: create,
3915
+ defaults: () => Object.freeze(defaults()),
3916
+ toString(self_) {
3917
+ return ((__rb) => {
3918
+ try {
3919
+ return FfiConverterString.lift(__rb);
3920
+ } finally {
3921
+ core_crypto_ffi_ffi_default().rustbuffer_free(__rb);
3922
+ }
3923
+ })(uniffiCaller.rustCall((callStatus) => {
3924
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_deserializedclientid_uniffi_trait_display(FfiConverterTypeDeserializedClientId.lower(self_, core_crypto_ffi_ffi_default().rustbuffer_alloc), callStatus);
3925
+ }, FfiConverterString.lift.bind(FfiConverterString)));
4238
3926
  }
4239
- }
4240
- return new FFIConverter;
3927
+ });
4241
3928
  })();
4242
- var MlsRatchetTreeType;
4243
- ((MlsRatchetTreeType2) => {
4244
- MlsRatchetTreeType2[MlsRatchetTreeType2["Full"] = 1] = "Full";
4245
- MlsRatchetTreeType2[MlsRatchetTreeType2["Delta"] = 2] = "Delta";
4246
- MlsRatchetTreeType2[MlsRatchetTreeType2["ByRef"] = 3] = "ByRef";
4247
- })(MlsRatchetTreeType ||= {});
4248
- var FfiConverterTypeMlsRatchetTreeType = (() => {
4249
- const ordinalConverter = FfiConverterInt32;
3929
+ var FfiConverterTypeDeserializedClientId = (() => {
4250
3930
 
4251
3931
  class FFIConverter extends AbstractFfiConverterByteArray {
4252
3932
  read(from) {
4253
- switch (ordinalConverter.read(from)) {
4254
- case 1:
4255
- return 1 /* Full */;
4256
- case 2:
4257
- return 2 /* Delta */;
4258
- case 3:
4259
- return 3 /* ByRef */;
4260
- default:
4261
- throw new UniffiInternalError.UnexpectedEnumCase;
4262
- }
3933
+ return {
3934
+ clientId: FfiConverterTypeClientId.read(from),
3935
+ userId: FfiConverterTypeUuid.read(from),
3936
+ deviceId: FfiConverterTypeDeviceId.read(from),
3937
+ domain: FfiConverterString.read(from)
3938
+ };
4263
3939
  }
4264
3940
  write(value, into) {
4265
- switch (value) {
4266
- case 1 /* Full */:
4267
- return ordinalConverter.write(1, into);
4268
- case 2 /* Delta */:
4269
- return ordinalConverter.write(2, into);
4270
- case 3 /* ByRef */:
4271
- return ordinalConverter.write(3, into);
4272
- }
3941
+ FfiConverterTypeClientId.write(value.clientId, into);
3942
+ FfiConverterTypeUuid.write(value.userId, into);
3943
+ FfiConverterTypeDeviceId.write(value.deviceId, into);
3944
+ FfiConverterString.write(value.domain, into);
4273
3945
  }
4274
3946
  allocationSize(value) {
4275
- return ordinalConverter.allocationSize(0);
3947
+ return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterTypeUuid.allocationSize(value.userId) + FfiConverterTypeDeviceId.allocationSize(value.deviceId) + FfiConverterString.allocationSize(value.domain);
4276
3948
  }
4277
3949
  }
4278
3950
  return new FFIConverter;
4279
3951
  })();
4280
- var GroupInfoBundle = (() => {
3952
+ var HistorySecret = (() => {
4281
3953
  const defaults = () => ({});
4282
3954
  const create = (() => {
4283
3955
  return uniffiCreateRecord(defaults);
@@ -4288,28 +3960,26 @@ var GroupInfoBundle = (() => {
4288
3960
  defaults: () => Object.freeze(defaults())
4289
3961
  });
4290
3962
  })();
4291
- var FfiConverterTypeGroupInfoBundle = (() => {
3963
+ var FfiConverterTypeHistorySecret = (() => {
4292
3964
 
4293
3965
  class FFIConverter extends AbstractFfiConverterByteArray {
4294
3966
  read(from) {
4295
3967
  return {
4296
- encryptionType: FfiConverterTypeMlsGroupInfoEncryptionType.read(from),
4297
- ratchetTreeType: FfiConverterTypeMlsRatchetTreeType.read(from),
4298
- payload: FfiConverterUint8Array.read(from)
3968
+ clientId: FfiConverterTypeClientId.read(from),
3969
+ data: FfiConverterUint8Array.read(from)
4299
3970
  };
4300
3971
  }
4301
3972
  write(value, into) {
4302
- FfiConverterTypeMlsGroupInfoEncryptionType.write(value.encryptionType, into);
4303
- FfiConverterTypeMlsRatchetTreeType.write(value.ratchetTreeType, into);
4304
- FfiConverterUint8Array.write(value.payload, into);
3973
+ FfiConverterTypeClientId.write(value.clientId, into);
3974
+ FfiConverterUint8Array.write(value.data, into);
4305
3975
  }
4306
3976
  allocationSize(value) {
4307
- return FfiConverterTypeMlsGroupInfoEncryptionType.allocationSize(value.encryptionType) + FfiConverterTypeMlsRatchetTreeType.allocationSize(value.ratchetTreeType) + FfiConverterUint8Array.allocationSize(value.payload);
3977
+ return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterUint8Array.allocationSize(value.data);
4308
3978
  }
4309
3979
  }
4310
3980
  return new FFIConverter;
4311
3981
  })();
4312
- var CommitBundle = (() => {
3982
+ var HttpHeader = (() => {
4313
3983
  const defaults = () => ({});
4314
3984
  const create = (() => {
4315
3985
  return uniffiCreateRecord(defaults);
@@ -4320,30 +3990,26 @@ var CommitBundle = (() => {
4320
3990
  defaults: () => Object.freeze(defaults())
4321
3991
  });
4322
3992
  })();
4323
- var FfiConverterTypeCommitBundle = (() => {
3993
+ var FfiConverterTypeHttpHeader = (() => {
4324
3994
 
4325
3995
  class FFIConverter extends AbstractFfiConverterByteArray {
4326
3996
  read(from) {
4327
3997
  return {
4328
- welcome: FfiConverterOptionalTypeWelcome.read(from),
4329
- commit: FfiConverterUint8Array.read(from),
4330
- groupInfo: FfiConverterTypeGroupInfoBundle.read(from),
4331
- encryptedMessage: FfiConverterOptionalBytes.read(from)
3998
+ name: FfiConverterString.read(from),
3999
+ value: FfiConverterString.read(from)
4332
4000
  };
4333
4001
  }
4334
4002
  write(value, into) {
4335
- FfiConverterOptionalTypeWelcome.write(value.welcome, into);
4336
- FfiConverterUint8Array.write(value.commit, into);
4337
- FfiConverterTypeGroupInfoBundle.write(value.groupInfo, into);
4338
- FfiConverterOptionalBytes.write(value.encryptedMessage, into);
4003
+ FfiConverterString.write(value.name, into);
4004
+ FfiConverterString.write(value.value, into);
4339
4005
  }
4340
4006
  allocationSize(value) {
4341
- return FfiConverterOptionalTypeWelcome.allocationSize(value.welcome) + FfiConverterUint8Array.allocationSize(value.commit) + FfiConverterTypeGroupInfoBundle.allocationSize(value.groupInfo) + FfiConverterOptionalBytes.allocationSize(value.encryptedMessage);
4007
+ return FfiConverterString.allocationSize(value.name) + FfiConverterString.allocationSize(value.value);
4342
4008
  }
4343
4009
  }
4344
4010
  return new FFIConverter;
4345
4011
  })();
4346
- var DecryptedMessage = (() => {
4012
+ var HttpResponse = (() => {
4347
4013
  const defaults = () => ({});
4348
4014
  const create = (() => {
4349
4015
  return uniffiCreateRecord(defaults);
@@ -4354,34 +4020,28 @@ var DecryptedMessage = (() => {
4354
4020
  defaults: () => Object.freeze(defaults())
4355
4021
  });
4356
4022
  })();
4357
- var FfiConverterTypeDecryptedMessage = (() => {
4023
+ var FfiConverterTypeHttpResponse = (() => {
4358
4024
 
4359
4025
  class FFIConverter extends AbstractFfiConverterByteArray {
4360
4026
  read(from) {
4361
4027
  return {
4362
- message: FfiConverterOptionalBytes.read(from),
4363
- isActive: FfiConverterBool.read(from),
4364
- commitDelay: FfiConverterOptionalUInt64.read(from),
4365
- senderClientId: FfiConverterOptionalTypeClientId.read(from),
4366
- identity: FfiConverterTypeWireIdentity.read(from),
4367
- bufferedMessages: FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.read(from)
4028
+ status: FfiConverterUInt16.read(from),
4029
+ headers: FfiConverterSequenceTypeHttpHeader.read(from),
4030
+ body: FfiConverterUint8Array.read(from)
4368
4031
  };
4369
4032
  }
4370
4033
  write(value, into) {
4371
- FfiConverterOptionalBytes.write(value.message, into);
4372
- FfiConverterBool.write(value.isActive, into);
4373
- FfiConverterOptionalUInt64.write(value.commitDelay, into);
4374
- FfiConverterOptionalTypeClientId.write(value.senderClientId, into);
4375
- FfiConverterTypeWireIdentity.write(value.identity, into);
4376
- FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.write(value.bufferedMessages, into);
4034
+ FfiConverterUInt16.write(value.status, into);
4035
+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);
4036
+ FfiConverterUint8Array.write(value.body, into);
4377
4037
  }
4378
4038
  allocationSize(value) {
4379
- return FfiConverterOptionalBytes.allocationSize(value.message) + FfiConverterBool.allocationSize(value.isActive) + FfiConverterOptionalUInt64.allocationSize(value.commitDelay) + FfiConverterOptionalTypeClientId.allocationSize(value.senderClientId) + FfiConverterTypeWireIdentity.allocationSize(value.identity) + FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.allocationSize(value.bufferedMessages);
4039
+ return FfiConverterUInt16.allocationSize(value.status) + FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) + FfiConverterUint8Array.allocationSize(value.body);
4380
4040
  }
4381
4041
  }
4382
4042
  return new FFIConverter;
4383
4043
  })();
4384
- var HistorySecret = (() => {
4044
+ var ProteusAutoPrekeyBundle = (() => {
4385
4045
  const defaults = () => ({});
4386
4046
  const create = (() => {
4387
4047
  return uniffiCreateRecord(defaults);
@@ -4392,56 +4052,98 @@ var HistorySecret = (() => {
4392
4052
  defaults: () => Object.freeze(defaults())
4393
4053
  });
4394
4054
  })();
4395
- var FfiConverterTypeHistorySecret = (() => {
4055
+ var FfiConverterTypeProteusAutoPrekeyBundle = (() => {
4396
4056
 
4397
4057
  class FFIConverter extends AbstractFfiConverterByteArray {
4398
4058
  read(from) {
4399
4059
  return {
4400
- clientId: FfiConverterTypeClientId.read(from),
4401
- data: FfiConverterUint8Array.read(from)
4060
+ id: FfiConverterUInt16.read(from),
4061
+ pkb: FfiConverterUint8Array.read(from)
4402
4062
  };
4403
4063
  }
4404
4064
  write(value, into) {
4405
- FfiConverterTypeClientId.write(value.clientId, into);
4406
- FfiConverterUint8Array.write(value.data, into);
4065
+ FfiConverterUInt16.write(value.id, into);
4066
+ FfiConverterUint8Array.write(value.pkb, into);
4407
4067
  }
4408
4068
  allocationSize(value) {
4409
- return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterUint8Array.allocationSize(value.data);
4069
+ return FfiConverterUInt16.allocationSize(value.id) + FfiConverterUint8Array.allocationSize(value.pkb);
4410
4070
  }
4411
4071
  }
4412
4072
  return new FFIConverter;
4413
4073
  })();
4414
- var HttpHeader = (() => {
4415
- const defaults = () => ({});
4416
- const create = (() => {
4417
- return uniffiCreateRecord(defaults);
4418
- })();
4419
- return Object.freeze({
4420
- create,
4421
- new: create,
4422
- defaults: () => Object.freeze(defaults())
4423
- });
4074
+ var DeviceStatus;
4075
+ ((DeviceStatus2) => {
4076
+ DeviceStatus2[DeviceStatus2["Valid"] = 1] = "Valid";
4077
+ DeviceStatus2[DeviceStatus2["Expired"] = 2] = "Expired";
4078
+ DeviceStatus2[DeviceStatus2["Revoked"] = 3] = "Revoked";
4079
+ })(DeviceStatus ||= {});
4080
+ var FfiConverterTypeDeviceStatus = (() => {
4081
+ const ordinalConverter = FfiConverterInt32;
4082
+
4083
+ class FFIConverter extends AbstractFfiConverterByteArray {
4084
+ read(from) {
4085
+ switch (ordinalConverter.read(from)) {
4086
+ case 1:
4087
+ return 1 /* Valid */;
4088
+ case 2:
4089
+ return 2 /* Expired */;
4090
+ case 3:
4091
+ return 3 /* Revoked */;
4092
+ default:
4093
+ throw new UniffiInternalError.UnexpectedEnumCase;
4094
+ }
4095
+ }
4096
+ write(value, into) {
4097
+ switch (value) {
4098
+ case 1 /* Valid */:
4099
+ return ordinalConverter.write(1, into);
4100
+ case 2 /* Expired */:
4101
+ return ordinalConverter.write(2, into);
4102
+ case 3 /* Revoked */:
4103
+ return ordinalConverter.write(3, into);
4104
+ }
4105
+ }
4106
+ allocationSize(value) {
4107
+ return ordinalConverter.allocationSize(0);
4108
+ }
4109
+ }
4110
+ return new FFIConverter;
4424
4111
  })();
4425
- var FfiConverterTypeHttpHeader = (() => {
4112
+ var CredentialType;
4113
+ ((CredentialType2) => {
4114
+ CredentialType2[CredentialType2["Basic"] = 1] = "Basic";
4115
+ CredentialType2[CredentialType2["X509"] = 2] = "X509";
4116
+ })(CredentialType ||= {});
4117
+ var FfiConverterTypeCredentialType = (() => {
4118
+ const ordinalConverter = FfiConverterInt32;
4426
4119
 
4427
4120
  class FFIConverter extends AbstractFfiConverterByteArray {
4428
4121
  read(from) {
4429
- return {
4430
- name: FfiConverterString.read(from),
4431
- value: FfiConverterString.read(from)
4432
- };
4122
+ switch (ordinalConverter.read(from)) {
4123
+ case 1:
4124
+ return 1 /* Basic */;
4125
+ case 2:
4126
+ return 2 /* X509 */;
4127
+ default:
4128
+ throw new UniffiInternalError.UnexpectedEnumCase;
4129
+ }
4433
4130
  }
4434
4131
  write(value, into) {
4435
- FfiConverterString.write(value.name, into);
4436
- FfiConverterString.write(value.value, into);
4132
+ switch (value) {
4133
+ case 1 /* Basic */:
4134
+ return ordinalConverter.write(1, into);
4135
+ case 2 /* X509 */:
4136
+ return ordinalConverter.write(2, into);
4137
+ }
4437
4138
  }
4438
4139
  allocationSize(value) {
4439
- return FfiConverterString.allocationSize(value.name) + FfiConverterString.allocationSize(value.value);
4140
+ return ordinalConverter.allocationSize(0);
4440
4141
  }
4441
4142
  }
4442
4143
  return new FFIConverter;
4443
4144
  })();
4444
- var HttpResponse = (() => {
4145
+ var FfiConverterTypeTimestamp = FfiConverterTimestamp;
4146
+ var X509Identity = (() => {
4445
4147
  const defaults = () => ({});
4446
4148
  const create = (() => {
4447
4149
  return uniffiCreateRecord(defaults);
@@ -4452,28 +4154,36 @@ var HttpResponse = (() => {
4452
4154
  defaults: () => Object.freeze(defaults())
4453
4155
  });
4454
4156
  })();
4455
- var FfiConverterTypeHttpResponse = (() => {
4157
+ var FfiConverterTypeX509Identity = (() => {
4456
4158
 
4457
4159
  class FFIConverter extends AbstractFfiConverterByteArray {
4458
4160
  read(from) {
4459
4161
  return {
4460
- status: FfiConverterUInt16.read(from),
4461
- headers: FfiConverterSequenceTypeHttpHeader.read(from),
4462
- body: FfiConverterUint8Array.read(from)
4162
+ handle: FfiConverterString.read(from),
4163
+ displayName: FfiConverterString.read(from),
4164
+ domain: FfiConverterString.read(from),
4165
+ certificate: FfiConverterString.read(from),
4166
+ serialNumber: FfiConverterString.read(from),
4167
+ notBefore: FfiConverterTypeTimestamp.read(from),
4168
+ notAfter: FfiConverterTypeTimestamp.read(from)
4463
4169
  };
4464
4170
  }
4465
4171
  write(value, into) {
4466
- FfiConverterUInt16.write(value.status, into);
4467
- FfiConverterSequenceTypeHttpHeader.write(value.headers, into);
4468
- FfiConverterUint8Array.write(value.body, into);
4172
+ FfiConverterString.write(value.handle, into);
4173
+ FfiConverterString.write(value.displayName, into);
4174
+ FfiConverterString.write(value.domain, into);
4175
+ FfiConverterString.write(value.certificate, into);
4176
+ FfiConverterString.write(value.serialNumber, into);
4177
+ FfiConverterTypeTimestamp.write(value.notBefore, into);
4178
+ FfiConverterTypeTimestamp.write(value.notAfter, into);
4469
4179
  }
4470
4180
  allocationSize(value) {
4471
- return FfiConverterUInt16.allocationSize(value.status) + FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) + FfiConverterUint8Array.allocationSize(value.body);
4181
+ return FfiConverterString.allocationSize(value.handle) + FfiConverterString.allocationSize(value.displayName) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.certificate) + FfiConverterString.allocationSize(value.serialNumber) + FfiConverterTypeTimestamp.allocationSize(value.notBefore) + FfiConverterTypeTimestamp.allocationSize(value.notAfter);
4472
4182
  }
4473
4183
  }
4474
4184
  return new FFIConverter;
4475
4185
  })();
4476
- var ProteusAutoPrekeyBundle = (() => {
4186
+ var WireIdentity = (() => {
4477
4187
  const defaults = () => ({});
4478
4188
  const create = (() => {
4479
4189
  return uniffiCreateRecord(defaults);
@@ -4484,21 +4194,27 @@ var ProteusAutoPrekeyBundle = (() => {
4484
4194
  defaults: () => Object.freeze(defaults())
4485
4195
  });
4486
4196
  })();
4487
- var FfiConverterTypeProteusAutoPrekeyBundle = (() => {
4197
+ var FfiConverterTypeWireIdentity = (() => {
4488
4198
 
4489
4199
  class FFIConverter extends AbstractFfiConverterByteArray {
4490
4200
  read(from) {
4491
4201
  return {
4492
- id: FfiConverterUInt16.read(from),
4493
- pkb: FfiConverterUint8Array.read(from)
4202
+ clientId: FfiConverterOptionalTypeClientId.read(from),
4203
+ status: FfiConverterTypeDeviceStatus.read(from),
4204
+ thumbprint: FfiConverterString.read(from),
4205
+ credentialType: FfiConverterTypeCredentialType.read(from),
4206
+ x509Identity: FfiConverterOptionalTypeX509Identity.read(from)
4494
4207
  };
4495
4208
  }
4496
4209
  write(value, into) {
4497
- FfiConverterUInt16.write(value.id, into);
4498
- FfiConverterUint8Array.write(value.pkb, into);
4210
+ FfiConverterOptionalTypeClientId.write(value.clientId, into);
4211
+ FfiConverterTypeDeviceStatus.write(value.status, into);
4212
+ FfiConverterString.write(value.thumbprint, into);
4213
+ FfiConverterTypeCredentialType.write(value.credentialType, into);
4214
+ FfiConverterOptionalTypeX509Identity.write(value.x509Identity, into);
4499
4215
  }
4500
4216
  allocationSize(value) {
4501
- return FfiConverterUInt16.allocationSize(value.id) + FfiConverterUint8Array.allocationSize(value.pkb);
4217
+ return FfiConverterOptionalTypeClientId.allocationSize(value.clientId) + FfiConverterTypeDeviceStatus.allocationSize(value.status) + FfiConverterString.allocationSize(value.thumbprint) + FfiConverterTypeCredentialType.allocationSize(value.credentialType) + FfiConverterOptionalTypeX509Identity.allocationSize(value.x509Identity);
4502
4218
  }
4503
4219
  }
4504
4220
  return new FFIConverter;
@@ -4603,6 +4319,139 @@ var FfiConverterTypeX509CredentialAcquisitionConfiguration = (() => {
4603
4319
  }
4604
4320
  return new FFIConverter;
4605
4321
  })();
4322
+ var BufferedDecryptedMessage = (() => {
4323
+ class Text_ extends UniffiEnum {
4324
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
4325
+ tag = "Text" /* Text */;
4326
+ inner;
4327
+ constructor(inner) {
4328
+ super("BufferedDecryptedMessage", "Text");
4329
+ this.inner = Object.freeze(inner);
4330
+ }
4331
+ static new(inner) {
4332
+ return new Text_(inner);
4333
+ }
4334
+ static instanceOf(obj) {
4335
+ return obj.tag === "Text" /* Text */;
4336
+ }
4337
+ }
4338
+
4339
+ class Commit_ extends UniffiEnum {
4340
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
4341
+ tag = "Commit" /* Commit */;
4342
+ inner;
4343
+ constructor(inner) {
4344
+ super("BufferedDecryptedMessage", "Commit");
4345
+ this.inner = Object.freeze(inner);
4346
+ }
4347
+ static new(inner) {
4348
+ return new Commit_(inner);
4349
+ }
4350
+ static instanceOf(obj) {
4351
+ return obj.tag === "Commit" /* Commit */;
4352
+ }
4353
+ }
4354
+
4355
+ class Proposal_ extends UniffiEnum {
4356
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
4357
+ tag = "Proposal" /* Proposal */;
4358
+ inner;
4359
+ constructor(inner) {
4360
+ super("BufferedDecryptedMessage", "Proposal");
4361
+ this.inner = Object.freeze(inner);
4362
+ }
4363
+ static new(inner) {
4364
+ return new Proposal_(inner);
4365
+ }
4366
+ static instanceOf(obj) {
4367
+ return obj.tag === "Proposal" /* Proposal */;
4368
+ }
4369
+ }
4370
+ function instanceOf(obj) {
4371
+ return obj[uniffiTypeNameSymbol] === "BufferedDecryptedMessage";
4372
+ }
4373
+ return Object.freeze({
4374
+ instanceOf,
4375
+ Text: Text_,
4376
+ Commit: Commit_,
4377
+ Proposal: Proposal_
4378
+ });
4379
+ })();
4380
+ var FfiConverterTypeBufferedDecryptedMessage = (() => {
4381
+ const ordinalConverter = FfiConverterInt32;
4382
+
4383
+ class FFIConverter extends AbstractFfiConverterByteArray {
4384
+ read(from) {
4385
+ switch (ordinalConverter.read(from)) {
4386
+ case 1:
4387
+ return new BufferedDecryptedMessage.Text({ plaintext: FfiConverterUint8Array.read(from), senderClientId: FfiConverterTypeClientId.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4388
+ case 2:
4389
+ return new BufferedDecryptedMessage.Commit({ isActive: FfiConverterBool.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4390
+ case 3:
4391
+ return new BufferedDecryptedMessage.Proposal({ delay: FfiConverterOptionalUInt64.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4392
+ default:
4393
+ throw new UniffiInternalError.UnexpectedEnumCase;
4394
+ }
4395
+ }
4396
+ write(value, into) {
4397
+ switch (value.tag) {
4398
+ case "Text" /* Text */: {
4399
+ ordinalConverter.write(1, into);
4400
+ const inner = value.inner;
4401
+ FfiConverterUint8Array.write(inner.plaintext, into);
4402
+ FfiConverterTypeClientId.write(inner.senderClientId, into);
4403
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4404
+ return;
4405
+ }
4406
+ case "Commit" /* Commit */: {
4407
+ ordinalConverter.write(2, into);
4408
+ const inner = value.inner;
4409
+ FfiConverterBool.write(inner.isActive, into);
4410
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4411
+ return;
4412
+ }
4413
+ case "Proposal" /* Proposal */: {
4414
+ ordinalConverter.write(3, into);
4415
+ const inner = value.inner;
4416
+ FfiConverterOptionalUInt64.write(inner.delay, into);
4417
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4418
+ return;
4419
+ }
4420
+ default:
4421
+ throw new UniffiInternalError.UnexpectedEnumCase;
4422
+ }
4423
+ }
4424
+ allocationSize(value) {
4425
+ switch (value.tag) {
4426
+ case "Text" /* Text */: {
4427
+ const inner = value.inner;
4428
+ let size = ordinalConverter.allocationSize(1);
4429
+ size += FfiConverterUint8Array.allocationSize(inner.plaintext);
4430
+ size += FfiConverterTypeClientId.allocationSize(inner.senderClientId);
4431
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4432
+ return size;
4433
+ }
4434
+ case "Commit" /* Commit */: {
4435
+ const inner = value.inner;
4436
+ let size = ordinalConverter.allocationSize(2);
4437
+ size += FfiConverterBool.allocationSize(inner.isActive);
4438
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4439
+ return size;
4440
+ }
4441
+ case "Proposal" /* Proposal */: {
4442
+ const inner = value.inner;
4443
+ let size = ordinalConverter.allocationSize(3);
4444
+ size += FfiConverterOptionalUInt64.allocationSize(inner.delay);
4445
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4446
+ return size;
4447
+ }
4448
+ default:
4449
+ throw new UniffiInternalError.UnexpectedEnumCase;
4450
+ }
4451
+ }
4452
+ }
4453
+ return new FFIConverter;
4454
+ })();
4606
4455
  var CoreCryptoLogLevel;
4607
4456
  ((CoreCryptoLogLevel2) => {
4608
4457
  CoreCryptoLogLevel2[CoreCryptoLogLevel2["Off"] = 1] = "Off";
@@ -4656,6 +4505,141 @@ var FfiConverterTypeCoreCryptoLogLevel = (() => {
4656
4505
  }
4657
4506
  return new FFIConverter;
4658
4507
  })();
4508
+ var DecryptedMessage = (() => {
4509
+ class Text_ extends UniffiEnum {
4510
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
4511
+ tag = "Text" /* Text */;
4512
+ inner;
4513
+ constructor(inner) {
4514
+ super("DecryptedMessage", "Text");
4515
+ this.inner = Object.freeze(inner);
4516
+ }
4517
+ static new(inner) {
4518
+ return new Text_(inner);
4519
+ }
4520
+ static instanceOf(obj) {
4521
+ return obj.tag === "Text" /* Text */;
4522
+ }
4523
+ }
4524
+
4525
+ class Commit_ extends UniffiEnum {
4526
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
4527
+ tag = "Commit" /* Commit */;
4528
+ inner;
4529
+ constructor(inner) {
4530
+ super("DecryptedMessage", "Commit");
4531
+ this.inner = Object.freeze(inner);
4532
+ }
4533
+ static new(inner) {
4534
+ return new Commit_(inner);
4535
+ }
4536
+ static instanceOf(obj) {
4537
+ return obj.tag === "Commit" /* Commit */;
4538
+ }
4539
+ }
4540
+
4541
+ class Proposal_ extends UniffiEnum {
4542
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
4543
+ tag = "Proposal" /* Proposal */;
4544
+ inner;
4545
+ constructor(inner) {
4546
+ super("DecryptedMessage", "Proposal");
4547
+ this.inner = Object.freeze(inner);
4548
+ }
4549
+ static new(inner) {
4550
+ return new Proposal_(inner);
4551
+ }
4552
+ static instanceOf(obj) {
4553
+ return obj.tag === "Proposal" /* Proposal */;
4554
+ }
4555
+ }
4556
+ function instanceOf(obj) {
4557
+ return obj[uniffiTypeNameSymbol] === "DecryptedMessage";
4558
+ }
4559
+ return Object.freeze({
4560
+ instanceOf,
4561
+ Text: Text_,
4562
+ Commit: Commit_,
4563
+ Proposal: Proposal_
4564
+ });
4565
+ })();
4566
+ var FfiConverterTypeDecryptedMessage = (() => {
4567
+ const ordinalConverter = FfiConverterInt32;
4568
+
4569
+ class FFIConverter extends AbstractFfiConverterByteArray {
4570
+ read(from) {
4571
+ switch (ordinalConverter.read(from)) {
4572
+ case 1:
4573
+ return new DecryptedMessage.Text({ plaintext: FfiConverterUint8Array.read(from), senderClientId: FfiConverterTypeClientId.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4574
+ case 2:
4575
+ return new DecryptedMessage.Commit({ isActive: FfiConverterBool.read(from), bufferedMessages: FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4576
+ case 3:
4577
+ return new DecryptedMessage.Proposal({ delay: FfiConverterOptionalUInt64.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
4578
+ default:
4579
+ throw new UniffiInternalError.UnexpectedEnumCase;
4580
+ }
4581
+ }
4582
+ write(value, into) {
4583
+ switch (value.tag) {
4584
+ case "Text" /* Text */: {
4585
+ ordinalConverter.write(1, into);
4586
+ const inner = value.inner;
4587
+ FfiConverterUint8Array.write(inner.plaintext, into);
4588
+ FfiConverterTypeClientId.write(inner.senderClientId, into);
4589
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4590
+ return;
4591
+ }
4592
+ case "Commit" /* Commit */: {
4593
+ ordinalConverter.write(2, into);
4594
+ const inner = value.inner;
4595
+ FfiConverterBool.write(inner.isActive, into);
4596
+ FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.write(inner.bufferedMessages, into);
4597
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4598
+ return;
4599
+ }
4600
+ case "Proposal" /* Proposal */: {
4601
+ ordinalConverter.write(3, into);
4602
+ const inner = value.inner;
4603
+ FfiConverterOptionalUInt64.write(inner.delay, into);
4604
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
4605
+ return;
4606
+ }
4607
+ default:
4608
+ throw new UniffiInternalError.UnexpectedEnumCase;
4609
+ }
4610
+ }
4611
+ allocationSize(value) {
4612
+ switch (value.tag) {
4613
+ case "Text" /* Text */: {
4614
+ const inner = value.inner;
4615
+ let size = ordinalConverter.allocationSize(1);
4616
+ size += FfiConverterUint8Array.allocationSize(inner.plaintext);
4617
+ size += FfiConverterTypeClientId.allocationSize(inner.senderClientId);
4618
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4619
+ return size;
4620
+ }
4621
+ case "Commit" /* Commit */: {
4622
+ const inner = value.inner;
4623
+ let size = ordinalConverter.allocationSize(2);
4624
+ size += FfiConverterBool.allocationSize(inner.isActive);
4625
+ size += FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.allocationSize(inner.bufferedMessages);
4626
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4627
+ return size;
4628
+ }
4629
+ case "Proposal" /* Proposal */: {
4630
+ const inner = value.inner;
4631
+ let size = ordinalConverter.allocationSize(3);
4632
+ size += FfiConverterOptionalUInt64.allocationSize(inner.delay);
4633
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
4634
+ return size;
4635
+ }
4636
+ default:
4637
+ throw new UniffiInternalError.UnexpectedEnumCase;
4638
+ }
4639
+ }
4640
+ }
4641
+ return new FFIConverter;
4642
+ })();
4659
4643
  var E2eiConversationState;
4660
4644
  ((E2eiConversationState2) => {
4661
4645
  E2eiConversationState2[E2eiConversationState2["Verified"] = 1] = "Verified";
@@ -4880,9 +4864,7 @@ var FfiConverterTypeMlsTransportError = (() => {
4880
4864
  read(from) {
4881
4865
  switch (ordinalConverter.read(from)) {
4882
4866
  case 1:
4883
- return new MlsTransportError.MessageRejected({
4884
- reason: FfiConverterString.read(from)
4885
- });
4867
+ return new MlsTransportError.MessageRejected({ reason: FfiConverterString.read(from) });
4886
4868
  default:
4887
4869
  throw new UniffiInternalError.UnexpectedEnumCase;
4888
4870
  }
@@ -4994,9 +4976,7 @@ var FfiConverterTypePkiEnvironmentHooksError = (() => {
4994
4976
  read(from) {
4995
4977
  switch (ordinalConverter.read(from)) {
4996
4978
  case 1:
4997
- return new PkiEnvironmentHooksError.Error({
4998
- reason: FfiConverterString.read(from)
4999
- });
4979
+ return new PkiEnvironmentHooksError.Error({ reason: FfiConverterString.read(from) });
5000
4980
  default:
5001
4981
  throw new UniffiInternalError.UnexpectedEnumCase;
5002
4982
  }
@@ -5076,6 +5056,34 @@ var FfiConverterTypeSignatureScheme = (() => {
5076
5056
  }
5077
5057
  return new FFIConverter;
5078
5058
  })();
5059
+ var FfiConverterTypeTargetedMessagePolicy = (() => {
5060
+ const ordinalConverter = FfiConverterInt32;
5061
+
5062
+ class FFIConverter extends AbstractFfiConverterByteArray {
5063
+ read(from) {
5064
+ switch (ordinalConverter.read(from)) {
5065
+ case 1:
5066
+ return 0 /* Transient */;
5067
+ case 2:
5068
+ return 1 /* Persisted */;
5069
+ default:
5070
+ throw new UniffiInternalError.UnexpectedEnumCase;
5071
+ }
5072
+ }
5073
+ write(value, into) {
5074
+ switch (value) {
5075
+ case 0 /* Transient */:
5076
+ return ordinalConverter.write(1, into);
5077
+ case 1 /* Persisted */:
5078
+ return ordinalConverter.write(2, into);
5079
+ }
5080
+ }
5081
+ allocationSize(value) {
5082
+ return ordinalConverter.allocationSize(0);
5083
+ }
5084
+ }
5085
+ return new FFIConverter;
5086
+ })();
5079
5087
  var FfiConverterTypeMlsTransportData = FfiConverterUint8Array;
5080
5088
 
5081
5089
  class ConversationId extends UniffiAbstractObject {
@@ -6295,6 +6303,19 @@ class CoreCryptoContext extends UniffiAbstractObject {
6295
6303
  throw __error;
6296
6304
  }
6297
6305
  }
6306
+ async encryptTargetedMessage(conversationId, recipient, policy, message, asyncOpts_) {
6307
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
6308
+ try {
6309
+ return await uniffiRustCallAsync(uniffiCaller, () => {
6310
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_corecryptocontext_encrypt_targeted_message(uniffiTypeCoreCryptoContextObjectFactory.clonePointer(this), FfiConverterTypeConversationId.lower(conversationId, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterTypeClientId.lower(recipient, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterTypeTargetedMessagePolicy.lower(policy, core_crypto_ffi_ffi_default().rustbuffer_alloc), FfiConverterUint8Array.lower(message, core_crypto_ffi_ffi_default().rustbuffer_alloc));
6311
+ }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_rust_buffer, FfiConverterUint8Array.lift.bind(FfiConverterUint8Array), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError));
6312
+ } catch (__error) {
6313
+ if (uniffiIsDebug && __error instanceof Error) {
6314
+ __error.stack = __stack;
6315
+ }
6316
+ throw __error;
6317
+ }
6318
+ }
6298
6319
  async exportSecretKey(conversationId, keyLength, asyncOpts_) {
6299
6320
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
6300
6321
  try {
@@ -6988,6 +7009,32 @@ class PkiEnvironment extends UniffiAbstractObject {
6988
7009
  throw __error;
6989
7010
  }
6990
7011
  }
7012
+ async getTrustAnchors(asyncOpts_) {
7013
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
7014
+ try {
7015
+ return await uniffiRustCallAsync(uniffiCaller, () => {
7016
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_pkienvironment_get_trust_anchors(uniffiTypePkiEnvironmentObjectFactory.clonePointer(this));
7017
+ }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_rust_buffer, FfiConverterSequenceString.lift.bind(FfiConverterSequenceString), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError));
7018
+ } catch (__error) {
7019
+ if (uniffiIsDebug && __error instanceof Error) {
7020
+ __error.stack = __stack;
7021
+ }
7022
+ throw __error;
7023
+ }
7024
+ }
7025
+ async removeTrustAnchor(fingerprint, asyncOpts_) {
7026
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
7027
+ try {
7028
+ return await uniffiRustCallAsync(uniffiCaller, () => {
7029
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_pkienvironment_remove_trust_anchor(uniffiTypePkiEnvironmentObjectFactory.clonePointer(this), FfiConverterUint8Array.lower(fingerprint, core_crypto_ffi_ffi_default().rustbuffer_alloc));
7030
+ }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_void, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_void, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_void, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_void, (_v) => {}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError));
7031
+ } catch (__error) {
7032
+ if (uniffiIsDebug && __error instanceof Error) {
7033
+ __error.stack = __stack;
7034
+ }
7035
+ throw __error;
7036
+ }
7037
+ }
6991
7038
  uniffiDestroy() {
6992
7039
  const ptr = this[destructorGuardSymbol];
6993
7040
  if (ptr !== undefined) {
@@ -8317,15 +8364,15 @@ var uniffiTypeX509CredentialAcquisitionObjectFactory = (() => {
8317
8364
  };
8318
8365
  })();
8319
8366
  var FfiConverterTypeX509CredentialAcquisition = new FfiConverterObject(uniffiTypeX509CredentialAcquisitionObjectFactory);
8367
+ var FfiConverterOptionalTypeWelcome = new FfiConverterOptional(FfiConverterTypeWelcome);
8320
8368
  var FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterUint8Array);
8321
- var FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
8369
+ var FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);
8322
8370
  var FfiConverterOptionalTypeClientId = new FfiConverterOptional(FfiConverterTypeClientId);
8323
8371
  var FfiConverterOptionalTypeX509Identity = new FfiConverterOptional(FfiConverterTypeX509Identity);
8324
- var FfiConverterOptionalTypeWelcome = new FfiConverterOptional(FfiConverterTypeWelcome);
8372
+ var FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
8373
+ var FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
8325
8374
  var FfiConverterSequenceTypeBufferedDecryptedMessage = new FfiConverterArray(FfiConverterTypeBufferedDecryptedMessage);
8326
8375
  var FfiConverterOptionalSequenceTypeBufferedDecryptedMessage = new FfiConverterOptional(FfiConverterSequenceTypeBufferedDecryptedMessage);
8327
- var FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);
8328
- var FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
8329
8376
  var FfiConverterSequenceTypeKeyPackage = new FfiConverterArray(FfiConverterTypeKeyPackage);
8330
8377
  var FfiConverterOptionalTypeExternalSender = new FfiConverterOptional(FfiConverterTypeExternalSender);
8331
8378
  var FfiConverterOptionalDuration = new FfiConverterOptional(FfiConverterDuration);
@@ -8428,7 +8475,7 @@ function uniffiEnsureInitialized() {
8428
8475
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_create_conversation() !== 63673) {
8429
8476
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_create_conversation");
8430
8477
  }
8431
- if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message() !== 47475) {
8478
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message() !== 8493) {
8432
8479
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message");
8433
8480
  }
8434
8481
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_disable_history_sharing() !== 27456) {
@@ -8446,6 +8493,9 @@ function uniffiEnsureInitialized() {
8446
8493
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_encrypt_message() !== 23805) {
8447
8494
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_encrypt_message");
8448
8495
  }
8496
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_encrypt_targeted_message() !== 52733) {
8497
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_encrypt_targeted_message");
8498
+ }
8449
8499
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_export_secret_key() !== 35407) {
8450
8500
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_export_secret_key");
8451
8501
  }
@@ -8752,9 +8802,15 @@ function uniffiEnsureInitialized() {
8752
8802
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironment_add_intermediate_cert() !== 57664) {
8753
8803
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_pkienvironment_add_intermediate_cert");
8754
8804
  }
8755
- if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironment_add_trust_anchor() !== 9292) {
8805
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironment_add_trust_anchor() !== 14999) {
8756
8806
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_pkienvironment_add_trust_anchor");
8757
8807
  }
8808
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironment_get_trust_anchors() !== 11812) {
8809
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_pkienvironment_get_trust_anchors");
8810
+ }
8811
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironment_remove_trust_anchor() !== 41980) {
8812
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_pkienvironment_remove_trust_anchor");
8813
+ }
8758
8814
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_pkienvironmenthooks_http_request() !== 1349) {
8759
8815
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_pkienvironmenthooks_http_request");
8760
8816
  }
@@ -8853,6 +8909,7 @@ var core_crypto_ffi_default = Object.freeze({
8853
8909
  FfiConverterTypeProteusError,
8854
8910
  FfiConverterTypeSecretKey,
8855
8911
  FfiConverterTypeSignatureScheme,
8912
+ FfiConverterTypeTargetedMessagePolicy,
8856
8913
  FfiConverterTypeTimestamp,
8857
8914
  FfiConverterTypeUuid,
8858
8915
  FfiConverterTypeWelcome,
@@ -8984,6 +9041,7 @@ export {
8984
9041
  DeviceStatus,
8985
9042
  DeviceId,
8986
9043
  DeserializedClientId,
9044
+ DecryptedMessage,
8987
9045
  DatabaseKey,
8988
9046
  Database,
8989
9047
  CredentialType,