@agntcy/slim-bindings-linux-arm64-gnu 1.4.0-rc.1

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.
@@ -0,0 +1,3965 @@
1
+ import { type UniffiByteArray, RustBuffer, UniffiAbstractObject, UniffiRustArcPtr, UnsafeMutableRawPointer, uniffiTypeNameSymbol, destructorGuardSymbol, pointerLiteralSymbol } from 'uniffi-bindgen-react-native';
2
+ /**
3
+ * Result of creating a session, containing the session context and a completion handle
4
+ *
5
+ * The completion handle should be awaited to ensure the session is fully established.
6
+ */
7
+ export type SessionWithCompletion = {
8
+ /**
9
+ * The session context for performing operations
10
+ */ session: Session;
11
+ /**
12
+ * Completion handle to wait for session establishment
13
+ */ completion: CompletionHandle;
14
+ };
15
+ export declare const SessionWithCompletion: Readonly<{
16
+ /**
17
+ * Create a frozen instance of {@link SessionWithCompletion}, with defaults specified
18
+ * in Rust, in the {@link slim_bindings} crate.
19
+ */
20
+ create: (partial: Partial<SessionWithCompletion> & Required<Omit<SessionWithCompletion, never>>) => SessionWithCompletion;
21
+ /**
22
+ * Create a frozen instance of {@link SessionWithCompletion}, with defaults specified
23
+ * in Rust, in the {@link slim_bindings} crate.
24
+ */
25
+ new: (partial: Partial<SessionWithCompletion> & Required<Omit<SessionWithCompletion, never>>) => SessionWithCompletion;
26
+ /**
27
+ * Defaults specified in the {@link slim_bindings} crate.
28
+ */
29
+ defaults: () => Partial<SessionWithCompletion>;
30
+ }>;
31
+ /**
32
+ * Build information for the SLIM bindings
33
+ */
34
+ export type BuildInfo = {
35
+ /**
36
+ * Semantic version (e.g., "0.7.0")
37
+ */ version: string;
38
+ /**
39
+ * Git commit hash (short)
40
+ */ gitSha: string;
41
+ /**
42
+ * Build date in ISO 8601 UTC format
43
+ */ buildDate: string;
44
+ /**
45
+ * Build profile (debug/release)
46
+ */ profile: string;
47
+ };
48
+ export declare const BuildInfo: Readonly<{
49
+ /**
50
+ * Create a frozen instance of {@link BuildInfo}, with defaults specified
51
+ * in Rust, in the {@link slim_bindings} crate.
52
+ */
53
+ create: (partial: Partial<BuildInfo> & Required<Omit<BuildInfo, never>>) => BuildInfo;
54
+ /**
55
+ * Create a frozen instance of {@link BuildInfo}, with defaults specified
56
+ * in Rust, in the {@link slim_bindings} crate.
57
+ */
58
+ new: (partial: Partial<BuildInfo> & Required<Omit<BuildInfo, never>>) => BuildInfo;
59
+ /**
60
+ * Defaults specified in the {@link slim_bindings} crate.
61
+ */
62
+ defaults: () => Partial<BuildInfo>;
63
+ }>;
64
+ /**
65
+ * Client configuration for connecting to a SLIM server
66
+ */
67
+ export type ClientConfig = {
68
+ /**
69
+ * The target endpoint the client will connect to
70
+ */ endpoint: string;
71
+ /**
72
+ * Transport protocol to use (defaults to gRPC in core config when omitted)
73
+ */ transport?: TransportProtocol;
74
+ /**
75
+ * Optional websocket authentication query parameter key
76
+ */ websocketAuthQueryParam?: string;
77
+ /**
78
+ * TLS client configuration
79
+ */ tls: TlsClientConfig;
80
+ /**
81
+ * Origin (HTTP Host authority override) for the client
82
+ */ origin?: string;
83
+ /**
84
+ * Optional TLS SNI server name override
85
+ */ serverName?: string;
86
+ /**
87
+ * Compression type
88
+ */ compression?: CompressionType;
89
+ /**
90
+ * Rate limit string (e.g., "100/s" for 100 requests per second)
91
+ */ rateLimit?: string;
92
+ /**
93
+ * Keepalive parameters
94
+ */ keepalive?: KeepaliveConfig;
95
+ /**
96
+ * HTTP Proxy configuration
97
+ */ proxy?: ProxyConfig;
98
+ /**
99
+ * Connection timeout
100
+ */ connectTimeout?: number;
101
+ /**
102
+ * Request timeout
103
+ */ requestTimeout?: number;
104
+ /**
105
+ * Read buffer size in bytes
106
+ */ bufferSize?: bigint;
107
+ /**
108
+ * Headers associated with gRPC requests
109
+ */ headers?: Map<string, string>;
110
+ /**
111
+ * Authentication configuration for outgoing RPCs
112
+ */ auth?: ClientAuthenticationConfig;
113
+ /**
114
+ * Backoff retry configuration
115
+ */ backoff?: BackoffConfig;
116
+ /**
117
+ * Arbitrary user-provided metadata as JSON string
118
+ */ metadata?: string;
119
+ };
120
+ export declare const ClientConfig: Readonly<{
121
+ /**
122
+ * Create a frozen instance of {@link ClientConfig}, with defaults specified
123
+ * in Rust, in the {@link slim_bindings} crate.
124
+ */
125
+ create: (partial: Partial<ClientConfig> & Required<Omit<ClientConfig, never>>) => ClientConfig;
126
+ /**
127
+ * Create a frozen instance of {@link ClientConfig}, with defaults specified
128
+ * in Rust, in the {@link slim_bindings} crate.
129
+ */
130
+ new: (partial: Partial<ClientConfig> & Required<Omit<ClientConfig, never>>) => ClientConfig;
131
+ /**
132
+ * Defaults specified in the {@link slim_bindings} crate.
133
+ */
134
+ defaults: () => Partial<ClientConfig>;
135
+ }>;
136
+ /**
137
+ * Exponential backoff configuration
138
+ */
139
+ export type ExponentialBackoff = {
140
+ /**
141
+ * Base delay
142
+ */ base: number;
143
+ /**
144
+ * Multiplication factor for each retry
145
+ */ factor: bigint;
146
+ /**
147
+ * Maximum delay
148
+ */ maxDelay: number;
149
+ /**
150
+ * Maximum number of retry attempts
151
+ */ maxAttempts: bigint;
152
+ /**
153
+ * Whether to add random jitter to delays
154
+ */ jitter: boolean;
155
+ };
156
+ export declare const ExponentialBackoff: Readonly<{
157
+ /**
158
+ * Create a frozen instance of {@link ExponentialBackoff}, with defaults specified
159
+ * in Rust, in the {@link slim_bindings} crate.
160
+ */
161
+ create: (partial: Partial<ExponentialBackoff> & Required<Omit<ExponentialBackoff, never>>) => ExponentialBackoff;
162
+ /**
163
+ * Create a frozen instance of {@link ExponentialBackoff}, with defaults specified
164
+ * in Rust, in the {@link slim_bindings} crate.
165
+ */
166
+ new: (partial: Partial<ExponentialBackoff> & Required<Omit<ExponentialBackoff, never>>) => ExponentialBackoff;
167
+ /**
168
+ * Defaults specified in the {@link slim_bindings} crate.
169
+ */
170
+ defaults: () => Partial<ExponentialBackoff>;
171
+ }>;
172
+ /**
173
+ * Fixed interval backoff configuration
174
+ */
175
+ export type FixedIntervalBackoff = {
176
+ /**
177
+ * Fixed interval between retries
178
+ */ interval: number;
179
+ /**
180
+ * Maximum number of retry attempts
181
+ */ maxAttempts: bigint;
182
+ };
183
+ export declare const FixedIntervalBackoff: Readonly<{
184
+ /**
185
+ * Create a frozen instance of {@link FixedIntervalBackoff}, with defaults specified
186
+ * in Rust, in the {@link slim_bindings} crate.
187
+ */
188
+ create: (partial: Partial<FixedIntervalBackoff> & Required<Omit<FixedIntervalBackoff, never>>) => FixedIntervalBackoff;
189
+ /**
190
+ * Create a frozen instance of {@link FixedIntervalBackoff}, with defaults specified
191
+ * in Rust, in the {@link slim_bindings} crate.
192
+ */
193
+ new: (partial: Partial<FixedIntervalBackoff> & Required<Omit<FixedIntervalBackoff, never>>) => FixedIntervalBackoff;
194
+ /**
195
+ * Defaults specified in the {@link slim_bindings} crate.
196
+ */
197
+ defaults: () => Partial<FixedIntervalBackoff>;
198
+ }>;
199
+ /**
200
+ * Keepalive configuration for the client
201
+ */
202
+ export type KeepaliveConfig = {
203
+ /**
204
+ * TCP keepalive duration
205
+ */ tcpKeepalive: number;
206
+ /**
207
+ * HTTP2 keepalive duration
208
+ */ http2Keepalive: number;
209
+ /**
210
+ * Keepalive timeout
211
+ */ timeout: number;
212
+ /**
213
+ * Whether to permit keepalive without an active stream
214
+ */ keepAliveWhileIdle: boolean;
215
+ };
216
+ export declare const KeepaliveConfig: Readonly<{
217
+ /**
218
+ * Create a frozen instance of {@link KeepaliveConfig}, with defaults specified
219
+ * in Rust, in the {@link slim_bindings} crate.
220
+ */
221
+ create: (partial: Partial<KeepaliveConfig> & Required<Omit<KeepaliveConfig, never>>) => KeepaliveConfig;
222
+ /**
223
+ * Create a frozen instance of {@link KeepaliveConfig}, with defaults specified
224
+ * in Rust, in the {@link slim_bindings} crate.
225
+ */
226
+ new: (partial: Partial<KeepaliveConfig> & Required<Omit<KeepaliveConfig, never>>) => KeepaliveConfig;
227
+ /**
228
+ * Defaults specified in the {@link slim_bindings} crate.
229
+ */
230
+ defaults: () => Partial<KeepaliveConfig>;
231
+ }>;
232
+ /**
233
+ * HTTP Proxy configuration
234
+ */
235
+ export type ProxyConfig = {
236
+ /**
237
+ * The HTTP proxy URL (e.g., "http://proxy.example.com:8080")
238
+ */ url?: string;
239
+ /**
240
+ * TLS configuration for proxy connection
241
+ */ tls: TlsClientConfig;
242
+ /**
243
+ * Optional username for proxy authentication
244
+ */ username?: string;
245
+ /**
246
+ * Optional password for proxy authentication
247
+ */ password?: string;
248
+ /**
249
+ * Headers to send with proxy requests
250
+ */ headers: Map<string, string>;
251
+ };
252
+ export declare const ProxyConfig: Readonly<{
253
+ /**
254
+ * Create a frozen instance of {@link ProxyConfig}, with defaults specified
255
+ * in Rust, in the {@link slim_bindings} crate.
256
+ */
257
+ create: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, never>>) => ProxyConfig;
258
+ /**
259
+ * Create a frozen instance of {@link ProxyConfig}, with defaults specified
260
+ * in Rust, in the {@link slim_bindings} crate.
261
+ */
262
+ new: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, never>>) => ProxyConfig;
263
+ /**
264
+ * Defaults specified in the {@link slim_bindings} crate.
265
+ */
266
+ defaults: () => Partial<ProxyConfig>;
267
+ }>;
268
+ /**
269
+ * Basic authentication configuration
270
+ */
271
+ export type BasicAuth = {
272
+ username: string;
273
+ password: string;
274
+ };
275
+ export declare const BasicAuth: Readonly<{
276
+ /**
277
+ * Create a frozen instance of {@link BasicAuth}, with defaults specified
278
+ * in Rust, in the {@link slim_bindings} crate.
279
+ */
280
+ create: (partial: Partial<BasicAuth> & Required<Omit<BasicAuth, never>>) => BasicAuth;
281
+ /**
282
+ * Create a frozen instance of {@link BasicAuth}, with defaults specified
283
+ * in Rust, in the {@link slim_bindings} crate.
284
+ */
285
+ new: (partial: Partial<BasicAuth> & Required<Omit<BasicAuth, never>>) => BasicAuth;
286
+ /**
287
+ * Defaults specified in the {@link slim_bindings} crate.
288
+ */
289
+ defaults: () => Partial<BasicAuth>;
290
+ }>;
291
+ /**
292
+ * SPIRE configuration for SPIFFE Workload API integration
293
+ */
294
+ export type SpireConfig = {
295
+ /**
296
+ * Path to the SPIFFE Workload API socket (None => use SPIFFE_ENDPOINT_SOCKET env var)
297
+ */ socketPath?: string;
298
+ /**
299
+ * Optional target SPIFFE ID when requesting JWT SVIDs
300
+ */ targetSpiffeId?: string;
301
+ /**
302
+ * Audiences to request/verify for JWT SVIDs
303
+ */ jwtAudiences: Array<string>;
304
+ /**
305
+ * Optional trust domains override for X.509 bundle retrieval
306
+ */ trustDomains: Array<string>;
307
+ };
308
+ export declare const SpireConfig: Readonly<{
309
+ /**
310
+ * Create a frozen instance of {@link SpireConfig}, with defaults specified
311
+ * in Rust, in the {@link slim_bindings} crate.
312
+ */
313
+ create: (partial: Partial<SpireConfig> & Required<Omit<SpireConfig, never>>) => SpireConfig;
314
+ /**
315
+ * Create a frozen instance of {@link SpireConfig}, with defaults specified
316
+ * in Rust, in the {@link slim_bindings} crate.
317
+ */
318
+ new: (partial: Partial<SpireConfig> & Required<Omit<SpireConfig, never>>) => SpireConfig;
319
+ /**
320
+ * Defaults specified in the {@link slim_bindings} crate.
321
+ */
322
+ defaults: () => Partial<SpireConfig>;
323
+ }>;
324
+ /**
325
+ * TLS configuration for client connections
326
+ */
327
+ export type TlsClientConfig = {
328
+ /**
329
+ * Disable TLS entirely (plain text connection)
330
+ */ insecure: boolean;
331
+ /**
332
+ * Skip server certificate verification (enables TLS but doesn't verify certs)
333
+ * WARNING: Only use for testing - insecure in production!
334
+ */ insecureSkipVerify: boolean;
335
+ /**
336
+ * Certificate and key source for client authentication
337
+ */ source: TlsSource;
338
+ /**
339
+ * CA certificate source for verifying server certificates
340
+ */ caSource: CaSource;
341
+ /**
342
+ * Include system CA certificates pool (default: true)
343
+ */ includeSystemCaCertsPool: boolean;
344
+ /**
345
+ * TLS version to use: "tls1.2" or "tls1.3" (default: "tls1.3")
346
+ */ tlsVersion: string;
347
+ };
348
+ export declare const TlsClientConfig: Readonly<{
349
+ /**
350
+ * Create a frozen instance of {@link TlsClientConfig}, with defaults specified
351
+ * in Rust, in the {@link slim_bindings} crate.
352
+ */
353
+ create: (partial: Partial<TlsClientConfig> & Required<Omit<TlsClientConfig, never>>) => TlsClientConfig;
354
+ /**
355
+ * Create a frozen instance of {@link TlsClientConfig}, with defaults specified
356
+ * in Rust, in the {@link slim_bindings} crate.
357
+ */
358
+ new: (partial: Partial<TlsClientConfig> & Required<Omit<TlsClientConfig, never>>) => TlsClientConfig;
359
+ /**
360
+ * Defaults specified in the {@link slim_bindings} crate.
361
+ */
362
+ defaults: () => Partial<TlsClientConfig>;
363
+ }>;
364
+ /**
365
+ * TLS configuration for server connections
366
+ */
367
+ export type TlsServerConfig = {
368
+ /**
369
+ * Disable TLS entirely (plain text connection)
370
+ */ insecure: boolean;
371
+ /**
372
+ * Certificate and key source for server authentication
373
+ */ source: TlsSource;
374
+ /**
375
+ * CA certificate source for verifying client certificates
376
+ */ clientCa: CaSource;
377
+ /**
378
+ * Include system CA certificates pool (default: true)
379
+ */ includeSystemCaCertsPool?: boolean;
380
+ /**
381
+ * TLS version to use: "tls1.2" or "tls1.3" (default: "tls1.3")
382
+ */ tlsVersion?: string;
383
+ /**
384
+ * Reload client CA file when modified
385
+ */ reloadClientCaFile?: boolean;
386
+ };
387
+ export declare const TlsServerConfig: Readonly<{
388
+ /**
389
+ * Create a frozen instance of {@link TlsServerConfig}, with defaults specified
390
+ * in Rust, in the {@link slim_bindings} crate.
391
+ */
392
+ create: (partial: Partial<TlsServerConfig> & Required<Omit<TlsServerConfig, never>>) => TlsServerConfig;
393
+ /**
394
+ * Create a frozen instance of {@link TlsServerConfig}, with defaults specified
395
+ * in Rust, in the {@link slim_bindings} crate.
396
+ */
397
+ new: (partial: Partial<TlsServerConfig> & Required<Omit<TlsServerConfig, never>>) => TlsServerConfig;
398
+ /**
399
+ * Defaults specified in the {@link slim_bindings} crate.
400
+ */
401
+ defaults: () => Partial<TlsServerConfig>;
402
+ }>;
403
+ /**
404
+ * JWT authentication configuration for client-side signing
405
+ */
406
+ export type ClientJwtAuth = {
407
+ /**
408
+ * JWT key configuration (encoding key for signing)
409
+ */ key: JwtKeyType;
410
+ /**
411
+ * JWT audience claims to include
412
+ */ audience?: Array<string>;
413
+ /**
414
+ * JWT issuer to include
415
+ */ issuer?: string;
416
+ /**
417
+ * JWT subject to include
418
+ */ subject?: string;
419
+ /**
420
+ * Token validity duration (default: 3600 seconds)
421
+ */ duration: number;
422
+ };
423
+ export declare const ClientJwtAuth: Readonly<{
424
+ /**
425
+ * Create a frozen instance of {@link ClientJwtAuth}, with defaults specified
426
+ * in Rust, in the {@link slim_bindings} crate.
427
+ */
428
+ create: (partial: Partial<ClientJwtAuth> & Required<Omit<ClientJwtAuth, never>>) => ClientJwtAuth;
429
+ /**
430
+ * Create a frozen instance of {@link ClientJwtAuth}, with defaults specified
431
+ * in Rust, in the {@link slim_bindings} crate.
432
+ */
433
+ new: (partial: Partial<ClientJwtAuth> & Required<Omit<ClientJwtAuth, never>>) => ClientJwtAuth;
434
+ /**
435
+ * Defaults specified in the {@link slim_bindings} crate.
436
+ */
437
+ defaults: () => Partial<ClientJwtAuth>;
438
+ }>;
439
+ /**
440
+ * JWT authentication configuration for server-side verification
441
+ */
442
+ export type JwtAuth = {
443
+ /**
444
+ * JWT key configuration (decoding key for verification)
445
+ */ key: JwtKeyType;
446
+ /**
447
+ * JWT audience claims to verify
448
+ */ audience?: Array<string>;
449
+ /**
450
+ * JWT issuer to verify
451
+ */ issuer?: string;
452
+ /**
453
+ * JWT subject to verify
454
+ */ subject?: string;
455
+ /**
456
+ * Token validity duration (default: 3600 seconds)
457
+ */ duration: number;
458
+ };
459
+ export declare const JwtAuth: Readonly<{
460
+ /**
461
+ * Create a frozen instance of {@link JwtAuth}, with defaults specified
462
+ * in Rust, in the {@link slim_bindings} crate.
463
+ */
464
+ create: (partial: Partial<JwtAuth> & Required<Omit<JwtAuth, never>>) => JwtAuth;
465
+ /**
466
+ * Create a frozen instance of {@link JwtAuth}, with defaults specified
467
+ * in Rust, in the {@link slim_bindings} crate.
468
+ */
469
+ new: (partial: Partial<JwtAuth> & Required<Omit<JwtAuth, never>>) => JwtAuth;
470
+ /**
471
+ * Defaults specified in the {@link slim_bindings} crate.
472
+ */
473
+ defaults: () => Partial<JwtAuth>;
474
+ }>;
475
+ /**
476
+ * JWT key configuration
477
+ */
478
+ export type JwtKeyConfig = {
479
+ /**
480
+ * Algorithm used for signing/verifying the JWT
481
+ */ algorithm: JwtAlgorithm;
482
+ /**
483
+ * Key format - PEM, JWK or JWKS
484
+ */ format: JwtKeyFormat;
485
+ /**
486
+ * Encoded key or file path
487
+ */ key: JwtKeyData;
488
+ };
489
+ export declare const JwtKeyConfig: Readonly<{
490
+ /**
491
+ * Create a frozen instance of {@link JwtKeyConfig}, with defaults specified
492
+ * in Rust, in the {@link slim_bindings} crate.
493
+ */
494
+ create: (partial: Partial<JwtKeyConfig> & Required<Omit<JwtKeyConfig, never>>) => JwtKeyConfig;
495
+ /**
496
+ * Create a frozen instance of {@link JwtKeyConfig}, with defaults specified
497
+ * in Rust, in the {@link slim_bindings} crate.
498
+ */
499
+ new: (partial: Partial<JwtKeyConfig> & Required<Omit<JwtKeyConfig, never>>) => JwtKeyConfig;
500
+ /**
501
+ * Defaults specified in the {@link slim_bindings} crate.
502
+ */
503
+ defaults: () => Partial<JwtKeyConfig>;
504
+ }>;
505
+ /**
506
+ * Static JWT (Bearer token) authentication configuration
507
+ * The token is loaded from a file and automatically reloaded when changed
508
+ */
509
+ export type StaticJwtAuth = {
510
+ /**
511
+ * Path to file containing the JWT token
512
+ */ tokenFile: string;
513
+ /**
514
+ * Duration for caching the token before re-reading from file (default: 3600 seconds)
515
+ */ duration: number;
516
+ };
517
+ export declare const StaticJwtAuth: Readonly<{
518
+ /**
519
+ * Create a frozen instance of {@link StaticJwtAuth}, with defaults specified
520
+ * in Rust, in the {@link slim_bindings} crate.
521
+ */
522
+ create: (partial: Partial<StaticJwtAuth> & Required<Omit<StaticJwtAuth, never>>) => StaticJwtAuth;
523
+ /**
524
+ * Create a frozen instance of {@link StaticJwtAuth}, with defaults specified
525
+ * in Rust, in the {@link slim_bindings} crate.
526
+ */
527
+ new: (partial: Partial<StaticJwtAuth> & Required<Omit<StaticJwtAuth, never>>) => StaticJwtAuth;
528
+ /**
529
+ * Defaults specified in the {@link slim_bindings} crate.
530
+ */
531
+ defaults: () => Partial<StaticJwtAuth>;
532
+ }>;
533
+ /**
534
+ * Runtime configuration for the SLIM bindings
535
+ *
536
+ * Controls the Tokio runtime behavior including thread count, naming, and shutdown timeout.
537
+ */
538
+ export type RuntimeConfig = {
539
+ /**
540
+ * Number of cores to use for the runtime (0 = use all available cores)
541
+ */ nCores: bigint;
542
+ /**
543
+ * Thread name prefix for the runtime
544
+ */ threadName: string;
545
+ /**
546
+ * Timeout duration for draining services during shutdown
547
+ */ drainTimeout: number;
548
+ };
549
+ export declare const RuntimeConfig: Readonly<{
550
+ /**
551
+ * Create a frozen instance of {@link RuntimeConfig}, with defaults specified
552
+ * in Rust, in the {@link slim_bindings} crate.
553
+ */
554
+ create: (partial: Partial<RuntimeConfig> & Required<Omit<RuntimeConfig, never>>) => RuntimeConfig;
555
+ /**
556
+ * Create a frozen instance of {@link RuntimeConfig}, with defaults specified
557
+ * in Rust, in the {@link slim_bindings} crate.
558
+ */
559
+ new: (partial: Partial<RuntimeConfig> & Required<Omit<RuntimeConfig, never>>) => RuntimeConfig;
560
+ /**
561
+ * Defaults specified in the {@link slim_bindings} crate.
562
+ */
563
+ defaults: () => Partial<RuntimeConfig>;
564
+ }>;
565
+ /**
566
+ * Tracing/logging configuration for the SLIM bindings
567
+ *
568
+ * Controls logging behavior including log level, thread name/ID display, and filters.
569
+ */
570
+ export type TracingConfig = {
571
+ /**
572
+ * Log level (e.g., "debug", "info", "warn", "error")
573
+ */ logLevel: string;
574
+ /**
575
+ * Whether to display thread names in logs
576
+ */ displayThreadNames: boolean;
577
+ /**
578
+ * Whether to display thread IDs in logs
579
+ */ displayThreadIds: boolean;
580
+ /**
581
+ * List of tracing filter directives (e.g., ["slim=debug", "tokio=info"])
582
+ */ filters: Array<string>;
583
+ };
584
+ export declare const TracingConfig: Readonly<{
585
+ /**
586
+ * Create a frozen instance of {@link TracingConfig}, with defaults specified
587
+ * in Rust, in the {@link slim_bindings} crate.
588
+ */
589
+ create: (partial: Partial<TracingConfig> & Required<Omit<TracingConfig, never>>) => TracingConfig;
590
+ /**
591
+ * Create a frozen instance of {@link TracingConfig}, with defaults specified
592
+ * in Rust, in the {@link slim_bindings} crate.
593
+ */
594
+ new: (partial: Partial<TracingConfig> & Required<Omit<TracingConfig, never>>) => TracingConfig;
595
+ /**
596
+ * Defaults specified in the {@link slim_bindings} crate.
597
+ */
598
+ defaults: () => Partial<TracingConfig>;
599
+ }>;
600
+ /**
601
+ * Generic message context for language bindings (UniFFI-compatible)
602
+ *
603
+ * Provides routing and descriptive metadata needed for replying,
604
+ * auditing, and instrumentation across different language bindings.
605
+ * This type is exported to foreign languages via UniFFI.
606
+ */
607
+ export type MessageContext = {
608
+ /**
609
+ * Fully-qualified sender identity
610
+ */ sourceName: Name;
611
+ /**
612
+ * Fully-qualified destination identity (may be empty for broadcast/group scenarios)
613
+ */ destinationName?: Name;
614
+ /**
615
+ * Logical/semantic type (defaults to "msg" if unspecified)
616
+ */ payloadType: string;
617
+ /**
618
+ * Arbitrary key/value pairs supplied by the sender (e.g. tracing IDs)
619
+ */ metadata: Map<string, string>;
620
+ /**
621
+ * Numeric identifier of the inbound connection carrying the message
622
+ */ inputConnection: bigint;
623
+ /**
624
+ * Identity contained in the message
625
+ */ identity: string;
626
+ };
627
+ export declare const MessageContext: Readonly<{
628
+ /**
629
+ * Create a frozen instance of {@link MessageContext}, with defaults specified
630
+ * in Rust, in the {@link slim_bindings} crate.
631
+ */
632
+ create: (partial: Partial<MessageContext> & Required<Omit<MessageContext, never>>) => MessageContext;
633
+ /**
634
+ * Create a frozen instance of {@link MessageContext}, with defaults specified
635
+ * in Rust, in the {@link slim_bindings} crate.
636
+ */
637
+ new: (partial: Partial<MessageContext> & Required<Omit<MessageContext, never>>) => MessageContext;
638
+ /**
639
+ * Defaults specified in the {@link slim_bindings} crate.
640
+ */
641
+ defaults: () => Partial<MessageContext>;
642
+ }>;
643
+ /**
644
+ * Received message containing context and payload
645
+ */
646
+ export type ReceivedMessage = {
647
+ context: MessageContext;
648
+ payload: ArrayBuffer;
649
+ };
650
+ export declare const ReceivedMessage: Readonly<{
651
+ /**
652
+ * Create a frozen instance of {@link ReceivedMessage}, with defaults specified
653
+ * in Rust, in the {@link slim_bindings} crate.
654
+ */
655
+ create: (partial: Partial<ReceivedMessage> & Required<Omit<ReceivedMessage, never>>) => ReceivedMessage;
656
+ /**
657
+ * Create a frozen instance of {@link ReceivedMessage}, with defaults specified
658
+ * in Rust, in the {@link slim_bindings} crate.
659
+ */
660
+ new: (partial: Partial<ReceivedMessage> & Required<Omit<ReceivedMessage, never>>) => ReceivedMessage;
661
+ /**
662
+ * Defaults specified in the {@link slim_bindings} crate.
663
+ */
664
+ defaults: () => Partial<ReceivedMessage>;
665
+ }>;
666
+ /**
667
+ * Keepalive configuration for the server
668
+ */
669
+ export type KeepaliveServerParameters = {
670
+ /**
671
+ * Max connection idle time (time after which an idle connection is closed)
672
+ */ maxConnectionIdle: number;
673
+ /**
674
+ * Max connection age (maximum time a connection may exist before being closed)
675
+ */ maxConnectionAge: number;
676
+ /**
677
+ * Max connection age grace (additional time after max_connection_age before closing)
678
+ */ maxConnectionAgeGrace: number;
679
+ /**
680
+ * Keepalive ping frequency
681
+ */ time: number;
682
+ /**
683
+ * Keepalive ping timeout (time to wait for ack)
684
+ */ timeout: number;
685
+ };
686
+ export declare const KeepaliveServerParameters: Readonly<{
687
+ /**
688
+ * Create a frozen instance of {@link KeepaliveServerParameters}, with defaults specified
689
+ * in Rust, in the {@link slim_bindings} crate.
690
+ */
691
+ create: (partial: Partial<KeepaliveServerParameters> & Required<Omit<KeepaliveServerParameters, never>>) => KeepaliveServerParameters;
692
+ /**
693
+ * Create a frozen instance of {@link KeepaliveServerParameters}, with defaults specified
694
+ * in Rust, in the {@link slim_bindings} crate.
695
+ */
696
+ new: (partial: Partial<KeepaliveServerParameters> & Required<Omit<KeepaliveServerParameters, never>>) => KeepaliveServerParameters;
697
+ /**
698
+ * Defaults specified in the {@link slim_bindings} crate.
699
+ */
700
+ defaults: () => Partial<KeepaliveServerParameters>;
701
+ }>;
702
+ /**
703
+ * Server configuration for running a SLIM server
704
+ */
705
+ export type ServerConfig = {
706
+ /**
707
+ * Endpoint address to listen on (e.g., "0.0.0.0:50051" or "[::]:50051")
708
+ */ endpoint: string;
709
+ /**
710
+ * Transport protocol to use (defaults to gRPC in core config when omitted)
711
+ */ transport?: TransportProtocol;
712
+ /**
713
+ * TLS server configuration
714
+ */ tls: TlsServerConfig;
715
+ /**
716
+ * Use HTTP/2 only (default: true)
717
+ */ http2Only?: boolean;
718
+ /**
719
+ * Maximum size (in MiB) of messages accepted by the server
720
+ */ maxFrameSize?: number;
721
+ /**
722
+ * Maximum number of concurrent streams per connection
723
+ */ maxConcurrentStreams?: number;
724
+ /**
725
+ * Maximum header list size in bytes
726
+ */ maxHeaderListSize?: number;
727
+ /**
728
+ * Read buffer size in bytes
729
+ */ readBufferSize?: bigint;
730
+ /**
731
+ * Write buffer size in bytes
732
+ */ writeBufferSize?: bigint;
733
+ /**
734
+ * Keepalive parameters
735
+ */ keepalive?: KeepaliveServerParameters;
736
+ /**
737
+ * Authentication configuration for incoming requests
738
+ */ auth?: ServerAuthenticationConfig;
739
+ /**
740
+ * Arbitrary user-provided metadata as JSON string
741
+ */ metadata?: string;
742
+ };
743
+ export declare const ServerConfig: Readonly<{
744
+ /**
745
+ * Create a frozen instance of {@link ServerConfig}, with defaults specified
746
+ * in Rust, in the {@link slim_bindings} crate.
747
+ */
748
+ create: (partial: Partial<ServerConfig> & Required<Omit<ServerConfig, never>>) => ServerConfig;
749
+ /**
750
+ * Create a frozen instance of {@link ServerConfig}, with defaults specified
751
+ * in Rust, in the {@link slim_bindings} crate.
752
+ */
753
+ new: (partial: Partial<ServerConfig> & Required<Omit<ServerConfig, never>>) => ServerConfig;
754
+ /**
755
+ * Defaults specified in the {@link slim_bindings} crate.
756
+ */
757
+ defaults: () => Partial<ServerConfig>;
758
+ }>;
759
+ /**
760
+ * DataPlane configuration wrapper for uniffi bindings
761
+ */
762
+ export type DataplaneConfig = {
763
+ /**
764
+ * DataPlane GRPC server settings
765
+ */ servers: Array<ServerConfig>;
766
+ /**
767
+ * DataPlane client configs
768
+ */ clients: Array<ClientConfig>;
769
+ };
770
+ export declare const DataplaneConfig: Readonly<{
771
+ /**
772
+ * Create a frozen instance of {@link DataplaneConfig}, with defaults specified
773
+ * in Rust, in the {@link slim_bindings} crate.
774
+ */
775
+ create: (partial: Partial<DataplaneConfig> & Required<Omit<DataplaneConfig, never>>) => DataplaneConfig;
776
+ /**
777
+ * Create a frozen instance of {@link DataplaneConfig}, with defaults specified
778
+ * in Rust, in the {@link slim_bindings} crate.
779
+ */
780
+ new: (partial: Partial<DataplaneConfig> & Required<Omit<DataplaneConfig, never>>) => DataplaneConfig;
781
+ /**
782
+ * Defaults specified in the {@link slim_bindings} crate.
783
+ */
784
+ defaults: () => Partial<DataplaneConfig>;
785
+ }>;
786
+ /**
787
+ * Service configuration wrapper for uniffi bindings
788
+ */
789
+ export type ServiceConfig = {
790
+ /**
791
+ * Optional node ID for the service
792
+ */ nodeId?: string;
793
+ /**
794
+ * Optional group name for the service
795
+ */ groupName?: string;
796
+ /**
797
+ * DataPlane configuration (servers and clients)
798
+ */ dataplane: DataplaneConfig;
799
+ };
800
+ export declare const ServiceConfig: Readonly<{
801
+ /**
802
+ * Create a frozen instance of {@link ServiceConfig}, with defaults specified
803
+ * in Rust, in the {@link slim_bindings} crate.
804
+ */
805
+ create: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, never>>) => ServiceConfig;
806
+ /**
807
+ * Create a frozen instance of {@link ServiceConfig}, with defaults specified
808
+ * in Rust, in the {@link slim_bindings} crate.
809
+ */
810
+ new: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, never>>) => ServiceConfig;
811
+ /**
812
+ * Defaults specified in the {@link slim_bindings} crate.
813
+ */
814
+ defaults: () => Partial<ServiceConfig>;
815
+ }>;
816
+ /**
817
+ * Session configuration
818
+ */
819
+ export type SessionConfig = {
820
+ /**
821
+ * Session type (PointToPoint or Group)
822
+ */ sessionType: SessionType;
823
+ /**
824
+ * Enable MLS encryption for this session
825
+ */ enableMls: boolean;
826
+ /**
827
+ * Maximum number of retries for message transmission (None = use default)
828
+ */ maxRetries?: number;
829
+ /**
830
+ * Interval between retries in milliseconds (None = use default)
831
+ */ interval?: number;
832
+ /**
833
+ * Custom metadata key-value pairs for the session
834
+ */ metadata: Map<string, string>;
835
+ };
836
+ export declare const SessionConfig: Readonly<{
837
+ /**
838
+ * Create a frozen instance of {@link SessionConfig}, with defaults specified
839
+ * in Rust, in the {@link slim_bindings} crate.
840
+ */
841
+ create: (partial: Partial<SessionConfig> & Required<Omit<SessionConfig, never>>) => SessionConfig;
842
+ /**
843
+ * Create a frozen instance of {@link SessionConfig}, with defaults specified
844
+ * in Rust, in the {@link slim_bindings} crate.
845
+ */
846
+ new: (partial: Partial<SessionConfig> & Required<Omit<SessionConfig, never>>) => SessionConfig;
847
+ /**
848
+ * Defaults specified in the {@link slim_bindings} crate.
849
+ */
850
+ defaults: () => Partial<SessionConfig>;
851
+ }>;
852
+ /**
853
+ * Per-message context for a multicast RPC response — identifies which group
854
+ * member sent the response.
855
+ */
856
+ export type RpcMessageContext = {
857
+ /**
858
+ * The SLIM name of the group member that sent this response.
859
+ */ source: Name;
860
+ };
861
+ export declare const RpcMessageContext: Readonly<{
862
+ /**
863
+ * Create a frozen instance of {@link RpcMessageContext}, with defaults specified
864
+ * in Rust, in the {@link slim_bindings} crate.
865
+ */
866
+ create: (partial: Partial<RpcMessageContext> & Required<Omit<RpcMessageContext, never>>) => RpcMessageContext;
867
+ /**
868
+ * Create a frozen instance of {@link RpcMessageContext}, with defaults specified
869
+ * in Rust, in the {@link slim_bindings} crate.
870
+ */
871
+ new: (partial: Partial<RpcMessageContext> & Required<Omit<RpcMessageContext, never>>) => RpcMessageContext;
872
+ /**
873
+ * Defaults specified in the {@link slim_bindings} crate.
874
+ */
875
+ defaults: () => Partial<RpcMessageContext>;
876
+ }>;
877
+ /**
878
+ * A single item in a multicast response stream, pairing the response payload
879
+ * with the identity of the member that produced it.
880
+ */
881
+ export type RpcMulticastItem = {
882
+ /**
883
+ * Context identifying the source member.
884
+ */ context: RpcMessageContext;
885
+ /**
886
+ * The encoded response payload (raw bytes).
887
+ */ message: ArrayBuffer;
888
+ };
889
+ export declare const RpcMulticastItem: Readonly<{
890
+ /**
891
+ * Create a frozen instance of {@link RpcMulticastItem}, with defaults specified
892
+ * in Rust, in the {@link slim_bindings} crate.
893
+ */
894
+ create: (partial: Partial<RpcMulticastItem> & Required<Omit<RpcMulticastItem, never>>) => RpcMulticastItem;
895
+ /**
896
+ * Create a frozen instance of {@link RpcMulticastItem}, with defaults specified
897
+ * in Rust, in the {@link slim_bindings} crate.
898
+ */
899
+ new: (partial: Partial<RpcMulticastItem> & Required<Omit<RpcMulticastItem, never>>) => RpcMulticastItem;
900
+ /**
901
+ * Defaults specified in the {@link slim_bindings} crate.
902
+ */
903
+ defaults: () => Partial<RpcMulticastItem>;
904
+ }>;
905
+ /**
906
+ * Direction enum
907
+ * Indicates whether the App can send, receive, both, or neither.
908
+ */
909
+ export type Direction = "send" | "recv" | "bidirectional" | "none";
910
+ export declare const FfiConverterTypeDirection: {
911
+ read(from: RustBuffer): Direction;
912
+ write(value: Direction, into: RustBuffer): void;
913
+ allocationSize(value: Direction): number;
914
+ lift(value: UniffiByteArray): Direction;
915
+ lower(value: Direction): UniffiByteArray;
916
+ };
917
+ /**
918
+ * Backoff retry configuration
919
+ */
920
+ export type BackoffConfig = {
921
+ tag: "exponential";
922
+ inner: Readonly<{
923
+ config: ExponentialBackoff;
924
+ }>;
925
+ } | {
926
+ tag: "fixedInterval";
927
+ inner: Readonly<{
928
+ config: FixedIntervalBackoff;
929
+ }>;
930
+ };
931
+ export declare const FfiConverterTypeBackoffConfig: {
932
+ read(from: RustBuffer): BackoffConfig;
933
+ write(value: BackoffConfig, into: RustBuffer): void;
934
+ allocationSize(value: BackoffConfig): number;
935
+ lift(value: UniffiByteArray): BackoffConfig;
936
+ lower(value: BackoffConfig): UniffiByteArray;
937
+ };
938
+ /**
939
+ * Compression type for gRPC messages
940
+ */
941
+ export type CompressionType = "gzip" | "zlib" | "deflate" | "snappy" | "zstd" | "lz4" | "none" | "empty";
942
+ export declare const FfiConverterTypeCompressionType: {
943
+ read(from: RustBuffer): CompressionType;
944
+ write(value: CompressionType, into: RustBuffer): void;
945
+ allocationSize(value: CompressionType): number;
946
+ lift(value: UniffiByteArray): CompressionType;
947
+ lower(value: CompressionType): UniffiByteArray;
948
+ };
949
+ /**
950
+ * CA certificate source configuration
951
+ */
952
+ export type CaSource =
953
+ /**
954
+ * Load CA from file
955
+ */
956
+ {
957
+ tag: "file";
958
+ inner: Readonly<{
959
+ path: string;
960
+ }>;
961
+ }
962
+ /**
963
+ * Load CA from PEM string
964
+ */
965
+ | {
966
+ tag: "pem";
967
+ inner: Readonly<{
968
+ data: string;
969
+ }>;
970
+ }
971
+ /**
972
+ * Load CA from SPIRE Workload API
973
+ */
974
+ | {
975
+ tag: "spire";
976
+ inner: Readonly<{
977
+ config: SpireConfig;
978
+ }>;
979
+ }
980
+ /**
981
+ * No CA configured
982
+ */
983
+ | {
984
+ tag: "none";
985
+ };
986
+ export declare const FfiConverterTypeCaSource: {
987
+ read(from: RustBuffer): CaSource;
988
+ write(value: CaSource, into: RustBuffer): void;
989
+ allocationSize(value: CaSource): number;
990
+ lift(value: UniffiByteArray): CaSource;
991
+ lower(value: CaSource): UniffiByteArray;
992
+ };
993
+ /**
994
+ * Authentication configuration enum for client
995
+ */
996
+ export type ClientAuthenticationConfig = {
997
+ tag: "basic";
998
+ inner: Readonly<{
999
+ config: BasicAuth;
1000
+ }>;
1001
+ } | {
1002
+ tag: "staticJwt";
1003
+ inner: Readonly<{
1004
+ config: StaticJwtAuth;
1005
+ }>;
1006
+ } | {
1007
+ tag: "jwt";
1008
+ inner: Readonly<{
1009
+ config: ClientJwtAuth;
1010
+ }>;
1011
+ }
1012
+ /**
1013
+ * SPIRE/SPIFFE authentication (non-Windows only)
1014
+ */
1015
+ | {
1016
+ tag: "spire";
1017
+ inner: Readonly<{
1018
+ config: SpireConfig;
1019
+ }>;
1020
+ } | {
1021
+ tag: "none";
1022
+ };
1023
+ export declare const FfiConverterTypeClientAuthenticationConfig: {
1024
+ read(from: RustBuffer): ClientAuthenticationConfig;
1025
+ write(value: ClientAuthenticationConfig, into: RustBuffer): void;
1026
+ allocationSize(value: ClientAuthenticationConfig): number;
1027
+ lift(value: UniffiByteArray): ClientAuthenticationConfig;
1028
+ lower(value: ClientAuthenticationConfig): UniffiByteArray;
1029
+ };
1030
+ /**
1031
+ * Authentication configuration enum for server
1032
+ */
1033
+ export type ServerAuthenticationConfig = {
1034
+ tag: "basic";
1035
+ inner: Readonly<{
1036
+ config: BasicAuth;
1037
+ }>;
1038
+ } | {
1039
+ tag: "jwt";
1040
+ inner: Readonly<{
1041
+ config: JwtAuth;
1042
+ }>;
1043
+ }
1044
+ /**
1045
+ * SPIRE/SPIFFE authentication (non-Windows only)
1046
+ */
1047
+ | {
1048
+ tag: "spire";
1049
+ inner: Readonly<{
1050
+ config: SpireConfig;
1051
+ }>;
1052
+ } | {
1053
+ tag: "none";
1054
+ };
1055
+ export declare const FfiConverterTypeServerAuthenticationConfig: {
1056
+ read(from: RustBuffer): ServerAuthenticationConfig;
1057
+ write(value: ServerAuthenticationConfig, into: RustBuffer): void;
1058
+ allocationSize(value: ServerAuthenticationConfig): number;
1059
+ lift(value: UniffiByteArray): ServerAuthenticationConfig;
1060
+ lower(value: ServerAuthenticationConfig): UniffiByteArray;
1061
+ };
1062
+ /**
1063
+ * TLS certificate and key source configuration
1064
+ */
1065
+ export type TlsSource =
1066
+ /**
1067
+ * Load certificate and key from PEM strings
1068
+ */
1069
+ {
1070
+ tag: "pem";
1071
+ inner: Readonly<{
1072
+ cert: string;
1073
+ key: string;
1074
+ }>;
1075
+ }
1076
+ /**
1077
+ * Load certificate and key from files (with auto-reload support)
1078
+ */
1079
+ | {
1080
+ tag: "file";
1081
+ inner: Readonly<{
1082
+ cert: string;
1083
+ key: string;
1084
+ }>;
1085
+ }
1086
+ /**
1087
+ * Load certificate and key from SPIRE Workload API
1088
+ */
1089
+ | {
1090
+ tag: "spire";
1091
+ inner: Readonly<{
1092
+ config: SpireConfig;
1093
+ }>;
1094
+ }
1095
+ /**
1096
+ * No certificate/key configured
1097
+ */
1098
+ | {
1099
+ tag: "none";
1100
+ };
1101
+ export declare const FfiConverterTypeTlsSource: {
1102
+ read(from: RustBuffer): TlsSource;
1103
+ write(value: TlsSource, into: RustBuffer): void;
1104
+ allocationSize(value: TlsSource): number;
1105
+ lift(value: UniffiByteArray): TlsSource;
1106
+ lower(value: TlsSource): UniffiByteArray;
1107
+ };
1108
+ /**
1109
+ * Error types for SLIM operations
1110
+ */
1111
+ export type SlimError = {
1112
+ tag: "serviceError";
1113
+ inner: Readonly<{
1114
+ message: string;
1115
+ }>;
1116
+ } | {
1117
+ tag: "sessionError";
1118
+ inner: Readonly<{
1119
+ message: string;
1120
+ }>;
1121
+ } | {
1122
+ tag: "receiveError";
1123
+ inner: Readonly<{
1124
+ message: string;
1125
+ }>;
1126
+ } | {
1127
+ tag: "sendError";
1128
+ inner: Readonly<{
1129
+ message: string;
1130
+ }>;
1131
+ } | {
1132
+ tag: "authError";
1133
+ inner: Readonly<{
1134
+ message: string;
1135
+ }>;
1136
+ } | {
1137
+ tag: "configError";
1138
+ inner: Readonly<{
1139
+ message: string;
1140
+ }>;
1141
+ } | {
1142
+ tag: "rpcError";
1143
+ inner: Readonly<{
1144
+ message: string;
1145
+ }>;
1146
+ } | {
1147
+ tag: "timeout";
1148
+ } | {
1149
+ tag: "invalidArgument";
1150
+ inner: Readonly<{
1151
+ message: string;
1152
+ }>;
1153
+ } | {
1154
+ tag: "internalError";
1155
+ inner: Readonly<{
1156
+ message: string;
1157
+ }>;
1158
+ };
1159
+ export declare const FfiConverterTypeSlimError: {
1160
+ read(from: RustBuffer): SlimError;
1161
+ write(value: SlimError, into: RustBuffer): void;
1162
+ allocationSize(value: SlimError): number;
1163
+ lift(value: UniffiByteArray): SlimError;
1164
+ lower(value: SlimError): UniffiByteArray;
1165
+ };
1166
+ /**
1167
+ * Identity provider configuration - used to prove identity to others
1168
+ */
1169
+ export type IdentityProviderConfig =
1170
+ /**
1171
+ * Shared secret authentication (symmetric key)
1172
+ */
1173
+ {
1174
+ tag: "sharedSecret";
1175
+ inner: Readonly<{
1176
+ id: string;
1177
+ data: string;
1178
+ }>;
1179
+ }
1180
+ /**
1181
+ * Static JWT loaded from file with auto-reload
1182
+ */
1183
+ | {
1184
+ tag: "staticJwt";
1185
+ inner: Readonly<{
1186
+ config: StaticJwtAuth;
1187
+ }>;
1188
+ }
1189
+ /**
1190
+ * Dynamic JWT generation with signing key
1191
+ */
1192
+ | {
1193
+ tag: "jwt";
1194
+ inner: Readonly<{
1195
+ config: ClientJwtAuth;
1196
+ }>;
1197
+ }
1198
+ /**
1199
+ * SPIRE-based identity provider (non-Windows only)
1200
+ */
1201
+ | {
1202
+ tag: "spire";
1203
+ inner: Readonly<{
1204
+ config: SpireConfig;
1205
+ }>;
1206
+ }
1207
+ /**
1208
+ * No identity provider configured
1209
+ */
1210
+ | {
1211
+ tag: "none";
1212
+ };
1213
+ export declare const FfiConverterTypeIdentityProviderConfig: {
1214
+ read(from: RustBuffer): IdentityProviderConfig;
1215
+ write(value: IdentityProviderConfig, into: RustBuffer): void;
1216
+ allocationSize(value: IdentityProviderConfig): number;
1217
+ lift(value: UniffiByteArray): IdentityProviderConfig;
1218
+ lower(value: IdentityProviderConfig): UniffiByteArray;
1219
+ };
1220
+ /**
1221
+ * Identity verifier configuration - used to verify identity of others
1222
+ */
1223
+ export type IdentityVerifierConfig =
1224
+ /**
1225
+ * Shared secret verification (symmetric key)
1226
+ */
1227
+ {
1228
+ tag: "sharedSecret";
1229
+ inner: Readonly<{
1230
+ id: string;
1231
+ data: string;
1232
+ }>;
1233
+ }
1234
+ /**
1235
+ * JWT verification with decoding key
1236
+ */
1237
+ | {
1238
+ tag: "jwt";
1239
+ inner: Readonly<{
1240
+ config: JwtAuth;
1241
+ }>;
1242
+ }
1243
+ /**
1244
+ * SPIRE-based identity verifier (non-Windows only)
1245
+ */
1246
+ | {
1247
+ tag: "spire";
1248
+ inner: Readonly<{
1249
+ config: SpireConfig;
1250
+ }>;
1251
+ }
1252
+ /**
1253
+ * No identity verifier configured
1254
+ */
1255
+ | {
1256
+ tag: "none";
1257
+ };
1258
+ export declare const FfiConverterTypeIdentityVerifierConfig: {
1259
+ read(from: RustBuffer): IdentityVerifierConfig;
1260
+ write(value: IdentityVerifierConfig, into: RustBuffer): void;
1261
+ allocationSize(value: IdentityVerifierConfig): number;
1262
+ lift(value: UniffiByteArray): IdentityVerifierConfig;
1263
+ lower(value: IdentityVerifierConfig): UniffiByteArray;
1264
+ };
1265
+ /**
1266
+ * JWT signing/verification algorithm
1267
+ */
1268
+ export type JwtAlgorithm = "hs256" | "hs384" | "hs512" | "es256" | "es384" | "rs256" | "rs384" | "rs512" | "ps256" | "ps384" | "ps512" | "edDsa";
1269
+ export declare const FfiConverterTypeJwtAlgorithm: {
1270
+ read(from: RustBuffer): JwtAlgorithm;
1271
+ write(value: JwtAlgorithm, into: RustBuffer): void;
1272
+ allocationSize(value: JwtAlgorithm): number;
1273
+ lift(value: UniffiByteArray): JwtAlgorithm;
1274
+ lower(value: JwtAlgorithm): UniffiByteArray;
1275
+ };
1276
+ /**
1277
+ * JWT key data source
1278
+ */
1279
+ export type JwtKeyData =
1280
+ /**
1281
+ * String with encoded key(s)
1282
+ */
1283
+ {
1284
+ tag: "data";
1285
+ inner: Readonly<{
1286
+ value: string;
1287
+ }>;
1288
+ }
1289
+ /**
1290
+ * File path to the key(s)
1291
+ */
1292
+ | {
1293
+ tag: "file";
1294
+ inner: Readonly<{
1295
+ path: string;
1296
+ }>;
1297
+ };
1298
+ export declare const FfiConverterTypeJwtKeyData: {
1299
+ read(from: RustBuffer): JwtKeyData;
1300
+ write(value: JwtKeyData, into: RustBuffer): void;
1301
+ allocationSize(value: JwtKeyData): number;
1302
+ lift(value: UniffiByteArray): JwtKeyData;
1303
+ lower(value: JwtKeyData): UniffiByteArray;
1304
+ };
1305
+ /**
1306
+ * JWT key format
1307
+ */
1308
+ export type JwtKeyFormat = "pem" | "jwk" | "jwks";
1309
+ export declare const FfiConverterTypeJwtKeyFormat: {
1310
+ read(from: RustBuffer): JwtKeyFormat;
1311
+ write(value: JwtKeyFormat, into: RustBuffer): void;
1312
+ allocationSize(value: JwtKeyFormat): number;
1313
+ lift(value: UniffiByteArray): JwtKeyFormat;
1314
+ lower(value: JwtKeyFormat): UniffiByteArray;
1315
+ };
1316
+ /**
1317
+ * JWT key type (encoding, decoding, or autoresolve)
1318
+ */
1319
+ export type JwtKeyType =
1320
+ /**
1321
+ * Encoding key for signing JWTs (client-side)
1322
+ */
1323
+ {
1324
+ tag: "encoding";
1325
+ inner: Readonly<{
1326
+ key: JwtKeyConfig;
1327
+ }>;
1328
+ }
1329
+ /**
1330
+ * Decoding key for verifying JWTs (server-side)
1331
+ */
1332
+ | {
1333
+ tag: "decoding";
1334
+ inner: Readonly<{
1335
+ key: JwtKeyConfig;
1336
+ }>;
1337
+ }
1338
+ /**
1339
+ * Automatically resolve keys based on claims
1340
+ */
1341
+ | {
1342
+ tag: "autoresolve";
1343
+ };
1344
+ export declare const FfiConverterTypeJwtKeyType: {
1345
+ read(from: RustBuffer): JwtKeyType;
1346
+ write(value: JwtKeyType, into: RustBuffer): void;
1347
+ allocationSize(value: JwtKeyType): number;
1348
+ lift(value: UniffiByteArray): JwtKeyType;
1349
+ lower(value: JwtKeyType): UniffiByteArray;
1350
+ };
1351
+ /**
1352
+ * Session type enum
1353
+ */
1354
+ export type SessionType = "pointToPoint" | "group";
1355
+ export declare const FfiConverterTypeSessionType: {
1356
+ read(from: RustBuffer): SessionType;
1357
+ write(value: SessionType, into: RustBuffer): void;
1358
+ allocationSize(value: SessionType): number;
1359
+ lift(value: UniffiByteArray): SessionType;
1360
+ lower(value: SessionType): UniffiByteArray;
1361
+ };
1362
+ /**
1363
+ * gRPC status codes
1364
+ */
1365
+ export type RpcCode =
1366
+ /**
1367
+ * Success
1368
+ */
1369
+ "ok"
1370
+ /**
1371
+ * The operation was cancelled
1372
+ */
1373
+ | "cancelled"
1374
+ /**
1375
+ * Unknown error
1376
+ */
1377
+ | "unknown"
1378
+ /**
1379
+ * Client specified an invalid argument
1380
+ */
1381
+ | "invalidArgument"
1382
+ /**
1383
+ * Deadline exceeded before operation could complete
1384
+ */
1385
+ | "deadlineExceeded"
1386
+ /**
1387
+ * Some requested entity was not found
1388
+ */
1389
+ | "notFound"
1390
+ /**
1391
+ * Some entity that we attempted to create already exists
1392
+ */
1393
+ | "alreadyExists"
1394
+ /**
1395
+ * The caller does not have permission to execute the specified operation
1396
+ */
1397
+ | "permissionDenied"
1398
+ /**
1399
+ * Some resource has been exhausted
1400
+ */
1401
+ | "resourceExhausted"
1402
+ /**
1403
+ * The system is not in a state required for the operation's execution
1404
+ */
1405
+ | "failedPrecondition"
1406
+ /**
1407
+ * The operation was aborted
1408
+ */
1409
+ | "aborted"
1410
+ /**
1411
+ * Operation was attempted past the valid range
1412
+ */
1413
+ | "outOfRange"
1414
+ /**
1415
+ * Operation is not implemented or not supported
1416
+ */
1417
+ | "unimplemented"
1418
+ /**
1419
+ * Internal errors
1420
+ */
1421
+ | "internal"
1422
+ /**
1423
+ * The service is currently unavailable
1424
+ */
1425
+ | "unavailable"
1426
+ /**
1427
+ * Unrecoverable data loss or corruption
1428
+ */
1429
+ | "dataLoss"
1430
+ /**
1431
+ * The request does not have valid authentication credentials
1432
+ */
1433
+ | "unauthenticated";
1434
+ export declare const FfiConverterTypeRpcCode: {
1435
+ read(from: RustBuffer): RpcCode;
1436
+ write(value: RpcCode, into: RustBuffer): void;
1437
+ allocationSize(value: RpcCode): number;
1438
+ lift(value: UniffiByteArray): RpcCode;
1439
+ lower(value: RpcCode): UniffiByteArray;
1440
+ };
1441
+ /**
1442
+ * UniFFI-compatible RPC error
1443
+ *
1444
+ * This represents RPC errors with gRPC-compatible status codes.
1445
+ */
1446
+ export type RpcError = {
1447
+ tag: "rpc";
1448
+ inner: Readonly<{
1449
+ code: RpcCode;
1450
+ message: string;
1451
+ details: ArrayBuffer | undefined;
1452
+ }>;
1453
+ } | {
1454
+ tag: "multicastRpc";
1455
+ inner: Readonly<{
1456
+ origin: string;
1457
+ code: RpcCode;
1458
+ message: string;
1459
+ details: ArrayBuffer | undefined;
1460
+ }>;
1461
+ } | {
1462
+ tag: "multicastSessionClosed";
1463
+ inner: Readonly<{
1464
+ completed: bigint;
1465
+ total: bigint;
1466
+ received: Array<string>;
1467
+ missing: Array<string>;
1468
+ }>;
1469
+ };
1470
+ export declare const FfiConverterTypeRpcError: {
1471
+ read(from: RustBuffer): RpcError;
1472
+ write(value: RpcError, into: RustBuffer): void;
1473
+ allocationSize(value: RpcError): number;
1474
+ lift(value: UniffiByteArray): RpcError;
1475
+ lower(value: RpcError): UniffiByteArray;
1476
+ };
1477
+ /**
1478
+ * Message from a multicast response stream.
1479
+ */
1480
+ export type MulticastStreamMessage =
1481
+ /**
1482
+ * Successfully received response item with source context.
1483
+ */
1484
+ {
1485
+ tag: "data";
1486
+ inner: Readonly<{
1487
+ item: RpcMulticastItem;
1488
+ }>;
1489
+ }
1490
+ /**
1491
+ * Error from one member — other members may still be active.
1492
+ */
1493
+ | {
1494
+ tag: "error";
1495
+ inner: Readonly<{
1496
+ error: RpcError;
1497
+ }>;
1498
+ }
1499
+ /**
1500
+ * All members have finished — the stream has ended.
1501
+ */
1502
+ | {
1503
+ tag: "end";
1504
+ };
1505
+ export declare const FfiConverterTypeMulticastStreamMessage: {
1506
+ read(from: RustBuffer): MulticastStreamMessage;
1507
+ write(value: MulticastStreamMessage, into: RustBuffer): void;
1508
+ allocationSize(value: MulticastStreamMessage): number;
1509
+ lift(value: UniffiByteArray): MulticastStreamMessage;
1510
+ lower(value: MulticastStreamMessage): UniffiByteArray;
1511
+ };
1512
+ /**
1513
+ * Message from a stream
1514
+ */
1515
+ export type StreamMessage =
1516
+ /**
1517
+ * Successfully received data
1518
+ */
1519
+ {
1520
+ tag: "data";
1521
+ inner: Readonly<[ArrayBuffer]>;
1522
+ }
1523
+ /**
1524
+ * Stream error occurred
1525
+ */
1526
+ | {
1527
+ tag: "error";
1528
+ inner: Readonly<[RpcError]>;
1529
+ }
1530
+ /**
1531
+ * Stream has ended
1532
+ */
1533
+ | {
1534
+ tag: "end";
1535
+ };
1536
+ export declare const FfiConverterTypeStreamMessage: {
1537
+ read(from: RustBuffer): StreamMessage;
1538
+ write(value: StreamMessage, into: RustBuffer): void;
1539
+ allocationSize(value: StreamMessage): number;
1540
+ lift(value: UniffiByteArray): StreamMessage;
1541
+ lower(value: StreamMessage): UniffiByteArray;
1542
+ };
1543
+ /**
1544
+ * Transport protocol for dataplane communication.
1545
+ */
1546
+ export type TransportProtocol = "grpc" | "websocket";
1547
+ export declare const FfiConverterTypeTransportProtocol: {
1548
+ read(from: RustBuffer): TransportProtocol;
1549
+ write(value: TransportProtocol, into: RustBuffer): void;
1550
+ allocationSize(value: TransportProtocol): number;
1551
+ lift(value: UniffiByteArray): TransportProtocol;
1552
+ lower(value: TransportProtocol): UniffiByteArray;
1553
+ };
1554
+ export type AppInterface = {
1555
+ /**
1556
+ * Create a new session (blocking version for FFI)
1557
+ *
1558
+ * Returns a SessionWithCompletion containing the session context and a completion handle.
1559
+ * Call `.wait()` on the completion handle to wait for session establishment.
1560
+ */ createSession(config: SessionConfig, destination: Name): SessionWithCompletion;
1561
+ /**
1562
+ * Create a new session and wait for completion (blocking version)
1563
+ *
1564
+ * This method creates a session and blocks until the session establishment completes.
1565
+ * Returns only the session context, as the completion has already been awaited.
1566
+ */ createSessionAndWait(config: SessionConfig, destination: Name): Session;
1567
+ /**
1568
+ * Create a new session and wait for completion (async version)
1569
+ *
1570
+ * This method creates a session and waits until the session establishment completes.
1571
+ * Returns only the session context, as the completion has already been awaited.
1572
+ */ createSessionAndWaitAsync(config: SessionConfig, destination: Name, asyncOpts_?: {
1573
+ signal: AbortSignal;
1574
+ }): Promise<Session>;
1575
+ /**
1576
+ * Create a new session (async version)
1577
+ *
1578
+ * Returns a SessionWithCompletion containing the session context and a completion handle.
1579
+ * Await the completion handle to wait for session establishment.
1580
+ * For point-to-point sessions, this ensures the remote peer has acknowledged the session.
1581
+ * For multicast sessions, this ensures the initial setup is complete.
1582
+ */ createSessionAsync(config: SessionConfig, destination: Name, asyncOpts_?: {
1583
+ signal: AbortSignal;
1584
+ }): Promise<SessionWithCompletion>;
1585
+ /**
1586
+ * Delete a session (blocking version for FFI)
1587
+ *
1588
+ * Returns a completion handle that can be awaited to ensure the deletion completes.
1589
+ */ deleteSession(session: Session): CompletionHandle;
1590
+ /**
1591
+ * Delete a session and wait for completion (blocking version)
1592
+ *
1593
+ * This method deletes a session and blocks until the deletion completes.
1594
+ */ deleteSessionAndWait(session: Session): void;
1595
+ /**
1596
+ * Delete a session and wait for completion (async version)
1597
+ *
1598
+ * This method deletes a session and waits until the deletion completes.
1599
+ */ deleteSessionAndWaitAsync(session: Session, asyncOpts_?: {
1600
+ signal: AbortSignal;
1601
+ }): void;
1602
+ /**
1603
+ * Delete a session (async version)
1604
+ *
1605
+ * Returns a completion handle that can be awaited to ensure the deletion completes.
1606
+ */ deleteSessionAsync(session: Session, asyncOpts_?: {
1607
+ signal: AbortSignal;
1608
+ }): Promise<CompletionHandle>;
1609
+ /**
1610
+ * Get the app ID (derived from name)
1611
+ */ id(): bigint;
1612
+ /**
1613
+ * Listen for incoming sessions (blocking version for FFI)
1614
+ */ listenForSession(timeout: number | undefined): Session;
1615
+ /**
1616
+ * Listen for incoming sessions (async version)
1617
+ */ listenForSessionAsync(timeout: number | undefined, asyncOpts_?: {
1618
+ signal: AbortSignal;
1619
+ }): Promise<Session>;
1620
+ /**
1621
+ * Get the app name
1622
+ */ name(): Name;
1623
+ /**
1624
+ * Remove a route (blocking version for FFI)
1625
+ */ removeRoute(name: Name, connectionId: bigint): void;
1626
+ /**
1627
+ * Remove a route (async version)
1628
+ */ removeRouteAsync(name: Name, connectionId: bigint, asyncOpts_?: {
1629
+ signal: AbortSignal;
1630
+ }): void;
1631
+ /**
1632
+ * Set a route to a name for a specific connection (blocking version for FFI)
1633
+ */ setRoute(name: Name, connectionId: bigint): void;
1634
+ /**
1635
+ * Set a route to a name for a specific connection (async version)
1636
+ */ setRouteAsync(name: Name, connectionId: bigint, asyncOpts_?: {
1637
+ signal: AbortSignal;
1638
+ }): void;
1639
+ /**
1640
+ * Subscribe to a session name (blocking version for FFI)
1641
+ */ subscribe(name: Name, connectionId: /*u64*/ bigint | undefined): void;
1642
+ /**
1643
+ * Subscribe to a name (async version)
1644
+ */ subscribeAsync(name: Name, connectionId: /*u64*/ bigint | undefined, asyncOpts_?: {
1645
+ signal: AbortSignal;
1646
+ }): void;
1647
+ /**
1648
+ * Unsubscribe from a name (blocking version for FFI)
1649
+ */ unsubscribe(name: Name, connectionId: /*u64*/ bigint | undefined): void;
1650
+ /**
1651
+ * Unsubscribe from a name (async version)
1652
+ */ unsubscribeAsync(name: Name, connectionId: /*u64*/ bigint | undefined, asyncOpts_?: {
1653
+ signal: AbortSignal;
1654
+ }): void;
1655
+ };
1656
+ /**
1657
+ * Adapter that bridges the App API with language-bindings interface
1658
+ *
1659
+ * This adapter uses enum-based auth types (`AuthProvider`/`AuthVerifier`) instead of generics
1660
+ * to be compatible with UniFFI, supporting multiple authentication mechanisms (SharedSecret,
1661
+ * JWT, SPIRE, StaticToken). It provides both synchronous (blocking) and asynchronous methods
1662
+ * for flexibility.
1663
+ */
1664
+ export declare class App extends UniffiAbstractObject implements AppInterface {
1665
+ readonly [uniffiTypeNameSymbol] = "App";
1666
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
1667
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
1668
+ /**
1669
+ * Create a new App with identity provider and verifier configurations
1670
+ *
1671
+ * This is the main entry point for creating a SLIM application from language bindings.
1672
+ *
1673
+ * # Arguments
1674
+ * * `base_name` - The base name for the app (without ID)
1675
+ * * `identity_provider_config` - Configuration for proving identity to others
1676
+ * * `identity_verifier_config` - Configuration for verifying identity of others
1677
+ *
1678
+ * # Returns
1679
+ * * `Ok(Arc<App>)` - Successfully created adapter
1680
+ * * `Err(SlimError)` - If adapter creation fails
1681
+ *
1682
+ * # Supported Identity Types
1683
+ * - SharedSecret: Symmetric key authentication
1684
+ * - JWT: Dynamic JWT generation/verification with signing/decoding keys
1685
+ * - StaticJWT: Static JWT loaded from file with auto-reload
1686
+ */
1687
+ constructor(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig);
1688
+ /**
1689
+ * Create a new App with traffic direction (blocking version)
1690
+ *
1691
+ * This is a convenience function for creating a SLIM application with configurable
1692
+ * traffic direction (send-only, receive-only, bidirectional, or none).
1693
+ *
1694
+ * # Arguments
1695
+ * * `name` - The base name for the app (without ID)
1696
+ * * `identity_provider_config` - Configuration for proving identity to others
1697
+ * * `identity_verifier_config` - Configuration for verifying identity of others
1698
+ * * `direction` - Traffic direction for sessions (Send, Recv, Bidirectional, or None)
1699
+ *
1700
+ * # Returns
1701
+ * * `Ok(Arc<App>)` - Successfully created app
1702
+ * * `Err(SlimError)` - If app creation fails
1703
+ */
1704
+ static newWithDirection(name: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): App;
1705
+ /**
1706
+ * Create a new App with SharedSecret authentication (blocking version)
1707
+ *
1708
+ * This is a convenience function for creating a SLIM application using SharedSecret authentication.
1709
+ *
1710
+ * # Arguments
1711
+ * * `name` - The base name for the app (without ID)
1712
+ * * `secret` - The shared secret string for authentication
1713
+ *
1714
+ * # Returns
1715
+ * * `Ok(Arc<App>)` - Successfully created adapter
1716
+ * * `Err(SlimError)` - If adapter creation fails
1717
+ */
1718
+ static newWithSecret(name: Name, secret: string): App;
1719
+ /**
1720
+ * Create a new session (blocking version for FFI)
1721
+ *
1722
+ * Returns a SessionWithCompletion containing the session context and a completion handle.
1723
+ * Call `.wait()` on the completion handle to wait for session establishment.
1724
+ */ createSession(config: SessionConfig, destination: Name): SessionWithCompletion;
1725
+ /**
1726
+ * Create a new session and wait for completion (blocking version)
1727
+ *
1728
+ * This method creates a session and blocks until the session establishment completes.
1729
+ * Returns only the session context, as the completion has already been awaited.
1730
+ */ createSessionAndWait(config: SessionConfig, destination: Name): Session;
1731
+ /**
1732
+ * Create a new session and wait for completion (async version)
1733
+ *
1734
+ * This method creates a session and waits until the session establishment completes.
1735
+ * Returns only the session context, as the completion has already been awaited.
1736
+ */ createSessionAndWaitAsync(config: SessionConfig, destination: Name, asyncOpts_?: {
1737
+ signal: AbortSignal;
1738
+ }): Promise<Session>;
1739
+ /**
1740
+ * Create a new session (async version)
1741
+ *
1742
+ * Returns a SessionWithCompletion containing the session context and a completion handle.
1743
+ * Await the completion handle to wait for session establishment.
1744
+ * For point-to-point sessions, this ensures the remote peer has acknowledged the session.
1745
+ * For multicast sessions, this ensures the initial setup is complete.
1746
+ */ createSessionAsync(config: SessionConfig, destination: Name, asyncOpts_?: {
1747
+ signal: AbortSignal;
1748
+ }): Promise<SessionWithCompletion>;
1749
+ /**
1750
+ * Delete a session (blocking version for FFI)
1751
+ *
1752
+ * Returns a completion handle that can be awaited to ensure the deletion completes.
1753
+ */ deleteSession(session: Session): CompletionHandle;
1754
+ /**
1755
+ * Delete a session and wait for completion (blocking version)
1756
+ *
1757
+ * This method deletes a session and blocks until the deletion completes.
1758
+ */ deleteSessionAndWait(session: Session): void;
1759
+ /**
1760
+ * Delete a session and wait for completion (async version)
1761
+ *
1762
+ * This method deletes a session and waits until the deletion completes.
1763
+ */ deleteSessionAndWaitAsync(session: Session, asyncOpts_?: {
1764
+ signal: AbortSignal;
1765
+ }): void;
1766
+ /**
1767
+ * Delete a session (async version)
1768
+ *
1769
+ * Returns a completion handle that can be awaited to ensure the deletion completes.
1770
+ */ deleteSessionAsync(session: Session, asyncOpts_?: {
1771
+ signal: AbortSignal;
1772
+ }): Promise<CompletionHandle>;
1773
+ /**
1774
+ * Get the app ID (derived from name)
1775
+ */ id(): bigint;
1776
+ /**
1777
+ * Listen for incoming sessions (blocking version for FFI)
1778
+ */ listenForSession(timeout: number | undefined): Session;
1779
+ /**
1780
+ * Listen for incoming sessions (async version)
1781
+ */ listenForSessionAsync(timeout: number | undefined, asyncOpts_?: {
1782
+ signal: AbortSignal;
1783
+ }): Promise<Session>;
1784
+ /**
1785
+ * Get the app name
1786
+ */ name(): Name;
1787
+ /**
1788
+ * Remove a route (blocking version for FFI)
1789
+ */ removeRoute(name: Name, connectionId: bigint): void;
1790
+ /**
1791
+ * Remove a route (async version)
1792
+ */ removeRouteAsync(name: Name, connectionId: bigint, asyncOpts_?: {
1793
+ signal: AbortSignal;
1794
+ }): void;
1795
+ /**
1796
+ * Set a route to a name for a specific connection (blocking version for FFI)
1797
+ */ setRoute(name: Name, connectionId: bigint): void;
1798
+ /**
1799
+ * Set a route to a name for a specific connection (async version)
1800
+ */ setRouteAsync(name: Name, connectionId: bigint, asyncOpts_?: {
1801
+ signal: AbortSignal;
1802
+ }): void;
1803
+ /**
1804
+ * Subscribe to a session name (blocking version for FFI)
1805
+ */ subscribe(name: Name, connectionId: /*u64*/ bigint | undefined): void;
1806
+ /**
1807
+ * Subscribe to a name (async version)
1808
+ */ subscribeAsync(name: Name, connectionId: /*u64*/ bigint | undefined, asyncOpts_?: {
1809
+ signal: AbortSignal;
1810
+ }): void;
1811
+ /**
1812
+ * Unsubscribe from a name (blocking version for FFI)
1813
+ */ unsubscribe(name: Name, connectionId: /*u64*/ bigint | undefined): void;
1814
+ /**
1815
+ * Unsubscribe from a name (async version)
1816
+ */ unsubscribeAsync(name: Name, connectionId: /*u64*/ bigint | undefined, asyncOpts_?: {
1817
+ signal: AbortSignal;
1818
+ }): void;
1819
+ /**
1820
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
1821
+ */
1822
+ uniffiDestroy(): void;
1823
+ [Symbol.dispose]: () => void;
1824
+ static instanceOf(obj: any): obj is App;
1825
+ }
1826
+ export type CompletionHandleInterface = {
1827
+ /**
1828
+ * Wait for the operation to complete indefinitely (blocking version)
1829
+ *
1830
+ * This blocks the calling thread until the operation completes.
1831
+ * Use this from Go or other languages when you need to ensure
1832
+ * an operation has finished before proceeding.
1833
+ *
1834
+ * **Note:** This can only be called once per handle. Subsequent calls
1835
+ * will return an error.
1836
+ *
1837
+ * # Returns
1838
+ * * `Ok(())` - Operation completed successfully
1839
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1840
+ */ wait(): void;
1841
+ /**
1842
+ * Wait for the operation to complete indefinitely (async version)
1843
+ *
1844
+ * This is the async version that integrates with UniFFI's polling mechanism.
1845
+ * The operation will yield control while waiting.
1846
+ *
1847
+ * **Note:** This can only be called once per handle. Subsequent calls
1848
+ * will return an error.
1849
+ *
1850
+ * # Returns
1851
+ * * `Ok(())` - Operation completed successfully
1852
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1853
+ */ waitAsync(asyncOpts_?: {
1854
+ signal: AbortSignal;
1855
+ }): void;
1856
+ /**
1857
+ * Wait for the operation to complete with a timeout (blocking version)
1858
+ *
1859
+ * This blocks the calling thread until the operation completes or the timeout expires.
1860
+ * Use this from Go or other languages when you need to ensure
1861
+ * an operation has finished before proceeding with a time limit.
1862
+ *
1863
+ * **Note:** This can only be called once per handle. Subsequent calls
1864
+ * will return an error.
1865
+ *
1866
+ * # Arguments
1867
+ * * `timeout` - Maximum time to wait for completion
1868
+ *
1869
+ * # Returns
1870
+ * * `Ok(())` - Operation completed successfully
1871
+ * * `Err(SlimError::Timeout)` - If the operation timed out
1872
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1873
+ */ waitFor(timeout: number): void;
1874
+ /**
1875
+ * Wait for the operation to complete with a timeout (async version)
1876
+ *
1877
+ * This is the async version that integrates with UniFFI's polling mechanism.
1878
+ * The operation will yield control while waiting until completion or timeout.
1879
+ *
1880
+ * **Note:** This can only be called once per handle. Subsequent calls
1881
+ * will return an error.
1882
+ *
1883
+ * # Arguments
1884
+ * * `timeout` - Maximum time to wait for completion
1885
+ *
1886
+ * # Returns
1887
+ * * `Ok(())` - Operation completed successfully
1888
+ * * `Err(SlimError::Timeout)` - If the operation timed out
1889
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1890
+ */ waitForAsync(timeout: number, asyncOpts_?: {
1891
+ signal: AbortSignal;
1892
+ }): void;
1893
+ };
1894
+ /**
1895
+ * FFI-compatible completion handle for async operations
1896
+ *
1897
+ * Represents a pending operation that can be awaited to ensure completion.
1898
+ * Used for operations that need delivery confirmation or handshake acknowledgment.
1899
+ *
1900
+ * # Examples
1901
+ *
1902
+ * Basic usage:
1903
+ * ```ignore
1904
+ * let completion = session.publish(data, None, None)?;
1905
+ * completion.wait()?; // Wait for delivery confirmation
1906
+ * ```
1907
+ */
1908
+ export declare class CompletionHandle extends UniffiAbstractObject implements CompletionHandleInterface {
1909
+ readonly [uniffiTypeNameSymbol] = "CompletionHandle";
1910
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
1911
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
1912
+ /**
1913
+ * Wait for the operation to complete indefinitely (blocking version)
1914
+ *
1915
+ * This blocks the calling thread until the operation completes.
1916
+ * Use this from Go or other languages when you need to ensure
1917
+ * an operation has finished before proceeding.
1918
+ *
1919
+ * **Note:** This can only be called once per handle. Subsequent calls
1920
+ * will return an error.
1921
+ *
1922
+ * # Returns
1923
+ * * `Ok(())` - Operation completed successfully
1924
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1925
+ */ wait(): void;
1926
+ /**
1927
+ * Wait for the operation to complete indefinitely (async version)
1928
+ *
1929
+ * This is the async version that integrates with UniFFI's polling mechanism.
1930
+ * The operation will yield control while waiting.
1931
+ *
1932
+ * **Note:** This can only be called once per handle. Subsequent calls
1933
+ * will return an error.
1934
+ *
1935
+ * # Returns
1936
+ * * `Ok(())` - Operation completed successfully
1937
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1938
+ */ waitAsync(asyncOpts_?: {
1939
+ signal: AbortSignal;
1940
+ }): void;
1941
+ /**
1942
+ * Wait for the operation to complete with a timeout (blocking version)
1943
+ *
1944
+ * This blocks the calling thread until the operation completes or the timeout expires.
1945
+ * Use this from Go or other languages when you need to ensure
1946
+ * an operation has finished before proceeding with a time limit.
1947
+ *
1948
+ * **Note:** This can only be called once per handle. Subsequent calls
1949
+ * will return an error.
1950
+ *
1951
+ * # Arguments
1952
+ * * `timeout` - Maximum time to wait for completion
1953
+ *
1954
+ * # Returns
1955
+ * * `Ok(())` - Operation completed successfully
1956
+ * * `Err(SlimError::Timeout)` - If the operation timed out
1957
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1958
+ */ waitFor(timeout: number): void;
1959
+ /**
1960
+ * Wait for the operation to complete with a timeout (async version)
1961
+ *
1962
+ * This is the async version that integrates with UniFFI's polling mechanism.
1963
+ * The operation will yield control while waiting until completion or timeout.
1964
+ *
1965
+ * **Note:** This can only be called once per handle. Subsequent calls
1966
+ * will return an error.
1967
+ *
1968
+ * # Arguments
1969
+ * * `timeout` - Maximum time to wait for completion
1970
+ *
1971
+ * # Returns
1972
+ * * `Ok(())` - Operation completed successfully
1973
+ * * `Err(SlimError::Timeout)` - If the operation timed out
1974
+ * * `Err(SlimError)` - Operation failed or handle already consumed
1975
+ */ waitForAsync(timeout: number, asyncOpts_?: {
1976
+ signal: AbortSignal;
1977
+ }): void;
1978
+ /**
1979
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
1980
+ */
1981
+ uniffiDestroy(): void;
1982
+ [Symbol.dispose]: () => void;
1983
+ static instanceOf(obj: any): obj is CompletionHandle;
1984
+ }
1985
+ export type NameInterface = {
1986
+ /**
1987
+ * Get the name components as a vector of strings
1988
+ */ components(): Array<string>;
1989
+ /**
1990
+ * Get the name ID
1991
+ */ id(): bigint;
1992
+ };
1993
+ /**
1994
+ * Name type for SLIM (Secure Low-Latency Interactive Messaging)
1995
+ */
1996
+ export declare class Name extends UniffiAbstractObject implements NameInterface {
1997
+ readonly [uniffiTypeNameSymbol] = "Name";
1998
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
1999
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2000
+ /**
2001
+ * Parse a Name from a `"org/namespace/agent"` string
2002
+ *
2003
+ * The string must contain exactly three `/`-separated components.
2004
+ * Returns an error if the format is invalid.
2005
+ */
2006
+ static fromString(s: string): Name;
2007
+ /**
2008
+ * Create a new Name from components without an ID
2009
+ */
2010
+ constructor(component0: string, component1: string, component2: string);
2011
+ /**
2012
+ * Create a new Name from components with an ID
2013
+ */
2014
+ static newWithId(component0: string, component1: string, component2: string, id: bigint): Name;
2015
+ /**
2016
+ * Get the name components as a vector of strings
2017
+ */ components(): Array<string>;
2018
+ /**
2019
+ * Get the name ID
2020
+ */ id(): bigint;
2021
+ /**
2022
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2023
+ */
2024
+ uniffiDestroy(): void;
2025
+ [Symbol.dispose]: () => void;
2026
+ static instanceOf(obj: any): obj is Name;
2027
+ }
2028
+ export type ServiceInterface = {
2029
+ /**
2030
+ * Get the service configuration
2031
+ */ config(): ServiceConfig;
2032
+ /**
2033
+ * Connect to a remote endpoint as a client - blocking version
2034
+ */ connect(config: ClientConfig): bigint;
2035
+ /**
2036
+ * Connect to a remote endpoint as a client
2037
+ */ connectAsync(config: ClientConfig, asyncOpts_?: {
2038
+ signal: AbortSignal;
2039
+ }): Promise</*u64*/ bigint>;
2040
+ /**
2041
+ * Create a new App with authentication configuration (blocking version)
2042
+ *
2043
+ * This method initializes authentication providers/verifiers and creates a App
2044
+ * on this service instance. This is a blocking wrapper around create_app_async.
2045
+ *
2046
+ * # Arguments
2047
+ * * `base_name` - The base name for the app (without ID)
2048
+ * * `identity_provider_config` - Configuration for proving identity to others
2049
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2050
+ *
2051
+ * # Returns
2052
+ * * `Ok(Arc<App>)` - Successfully created adapter
2053
+ * * `Err(SlimError)` - If adapter creation fails
2054
+ */ createApp(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig): App;
2055
+ /**
2056
+ * Create a new App with authentication configuration (async version)
2057
+ *
2058
+ * This method initializes authentication providers/verifiers and creates a App
2059
+ * on this service instance.
2060
+ *
2061
+ * # Arguments
2062
+ * * `base_name` - The base name for the app (without ID)
2063
+ * * `identity_provider_config` - Configuration for proving identity to others
2064
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2065
+ *
2066
+ * # Returns
2067
+ * * `Ok(Arc<App>)` - Successfully created adapter
2068
+ * * `Err(SlimError)` - If adapter creation fails
2069
+ */ createAppAsync(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, asyncOpts_?: {
2070
+ signal: AbortSignal;
2071
+ }): Promise<App>;
2072
+ /**
2073
+ * Create a new App with authentication configuration and traffic direction (blocking version)
2074
+ *
2075
+ * This method initializes authentication providers/verifiers and creates an App
2076
+ * on this service instance. The direction parameter controls whether the app
2077
+ * can send messages, receive messages, both, or neither.
2078
+ *
2079
+ * # Arguments
2080
+ * * `base_name` - The base name for the app (without ID)
2081
+ * * `identity_provider_config` - Configuration for proving identity to others
2082
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2083
+ * * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
2084
+ *
2085
+ * # Returns
2086
+ * * `Ok(Arc<App>)` - Successfully created adapter
2087
+ * * `Err(SlimError)` - If adapter creation fails
2088
+ */ createAppWithDirection(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): App;
2089
+ /**
2090
+ * Create a new App with authentication configuration and traffic direction (async version)
2091
+ *
2092
+ * This method initializes authentication providers/verifiers and creates an App
2093
+ * on this service instance. The direction parameter controls whether the app
2094
+ * can send messages, receive messages, both, or neither.
2095
+ *
2096
+ * # Arguments
2097
+ * * `base_name` - The base name for the app (without ID)
2098
+ * * `identity_provider_config` - Configuration for proving identity to others
2099
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2100
+ * * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
2101
+ *
2102
+ * # Returns
2103
+ * * `Ok(Arc<App>)` - Successfully created adapter
2104
+ * * `Err(SlimError)` - If adapter creation fails
2105
+ */ createAppWithDirectionAsync(name: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
2106
+ signal: AbortSignal;
2107
+ }): Promise<App>;
2108
+ /**
2109
+ * Create a new App with SharedSecret authentication (helper function)
2110
+ *
2111
+ * This is a convenience function for creating a SLIM application using SharedSecret authentication
2112
+ * on this service instance.
2113
+ *
2114
+ * # Arguments
2115
+ * * `name` - The base name for the app (without ID)
2116
+ * * `secret` - The shared secret string for authentication
2117
+ *
2118
+ * # Returns
2119
+ * * `Ok(Arc<App>)` - Successfully created app
2120
+ * * `Err(SlimError)` - If app creation fails
2121
+ */ createAppWithSecret(name: Name, secret: string): App;
2122
+ /**
2123
+ * Create a new App with SharedSecret authentication (async version)
2124
+ *
2125
+ * This is a convenience function for creating a SLIM application using SharedSecret authentication
2126
+ * on this service instance. This is the async version.
2127
+ *
2128
+ * # Arguments
2129
+ * * `name` - The base name for the app (without ID)
2130
+ * * `secret` - The shared secret string for authentication
2131
+ *
2132
+ * # Returns
2133
+ * * `Ok(Arc<App>)` - Successfully created app
2134
+ * * `Err(SlimError)` - If app creation fails
2135
+ */ createAppWithSecretAsync(name: Name, secret: string, asyncOpts_?: {
2136
+ signal: AbortSignal;
2137
+ }): Promise<App>;
2138
+ /**
2139
+ * Disconnect a client connection by connection ID - blocking version
2140
+ */ disconnect(connId: bigint): void;
2141
+ /**
2142
+ * Get the connection ID for a given endpoint
2143
+ */ getConnectionId(endpoint: string): /*u64*/ bigint | undefined;
2144
+ /**
2145
+ * Get the service identifier/name
2146
+ */ getName(): string;
2147
+ /**
2148
+ * Run the service (starts all configured servers and clients) - blocking version
2149
+ */ run(): void;
2150
+ /**
2151
+ * Run the service (starts all configured servers and clients)
2152
+ */ runAsync(asyncOpts_?: {
2153
+ signal: AbortSignal;
2154
+ }): void;
2155
+ /**
2156
+ * Start a server with the given configuration - blocking version
2157
+ */ runServer(config: ServerConfig): void;
2158
+ /**
2159
+ * Start a server with the given configuration
2160
+ */ runServerAsync(config: ServerConfig, asyncOpts_?: {
2161
+ signal: AbortSignal;
2162
+ }): void;
2163
+ /**
2164
+ * Shutdown the service gracefully - blocking version
2165
+ */ shutdown(): void;
2166
+ /**
2167
+ * Shutdown the service gracefully
2168
+ */ shutdownAsync(asyncOpts_?: {
2169
+ signal: AbortSignal;
2170
+ }): void;
2171
+ /**
2172
+ * Stop a server by endpoint - blocking version
2173
+ */ stopServer(endpoint: string): void;
2174
+ };
2175
+ /**
2176
+ * Service wrapper for uniffi bindings
2177
+ */
2178
+ export declare class Service extends UniffiAbstractObject implements ServiceInterface {
2179
+ readonly [uniffiTypeNameSymbol] = "Service";
2180
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
2181
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2182
+ /**
2183
+ * Create a new Service with the given name
2184
+ */
2185
+ constructor(name: string);
2186
+ /**
2187
+ * Create a new Service with configuration
2188
+ */
2189
+ static newWithConfig(name: string, config: ServiceConfig): Service;
2190
+ /**
2191
+ * Get the service configuration
2192
+ */ config(): ServiceConfig;
2193
+ /**
2194
+ * Connect to a remote endpoint as a client - blocking version
2195
+ */ connect(config: ClientConfig): bigint;
2196
+ /**
2197
+ * Connect to a remote endpoint as a client
2198
+ */ connectAsync(config: ClientConfig, asyncOpts_?: {
2199
+ signal: AbortSignal;
2200
+ }): Promise</*u64*/ bigint>;
2201
+ /**
2202
+ * Create a new App with authentication configuration (blocking version)
2203
+ *
2204
+ * This method initializes authentication providers/verifiers and creates a App
2205
+ * on this service instance. This is a blocking wrapper around create_app_async.
2206
+ *
2207
+ * # Arguments
2208
+ * * `base_name` - The base name for the app (without ID)
2209
+ * * `identity_provider_config` - Configuration for proving identity to others
2210
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2211
+ *
2212
+ * # Returns
2213
+ * * `Ok(Arc<App>)` - Successfully created adapter
2214
+ * * `Err(SlimError)` - If adapter creation fails
2215
+ */ createApp(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig): App;
2216
+ /**
2217
+ * Create a new App with authentication configuration (async version)
2218
+ *
2219
+ * This method initializes authentication providers/verifiers and creates a App
2220
+ * on this service instance.
2221
+ *
2222
+ * # Arguments
2223
+ * * `base_name` - The base name for the app (without ID)
2224
+ * * `identity_provider_config` - Configuration for proving identity to others
2225
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2226
+ *
2227
+ * # Returns
2228
+ * * `Ok(Arc<App>)` - Successfully created adapter
2229
+ * * `Err(SlimError)` - If adapter creation fails
2230
+ */ createAppAsync(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, asyncOpts_?: {
2231
+ signal: AbortSignal;
2232
+ }): Promise<App>;
2233
+ /**
2234
+ * Create a new App with authentication configuration and traffic direction (blocking version)
2235
+ *
2236
+ * This method initializes authentication providers/verifiers and creates an App
2237
+ * on this service instance. The direction parameter controls whether the app
2238
+ * can send messages, receive messages, both, or neither.
2239
+ *
2240
+ * # Arguments
2241
+ * * `base_name` - The base name for the app (without ID)
2242
+ * * `identity_provider_config` - Configuration for proving identity to others
2243
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2244
+ * * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
2245
+ *
2246
+ * # Returns
2247
+ * * `Ok(Arc<App>)` - Successfully created adapter
2248
+ * * `Err(SlimError)` - If adapter creation fails
2249
+ */ createAppWithDirection(baseName: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): App;
2250
+ /**
2251
+ * Create a new App with authentication configuration and traffic direction (async version)
2252
+ *
2253
+ * This method initializes authentication providers/verifiers and creates an App
2254
+ * on this service instance. The direction parameter controls whether the app
2255
+ * can send messages, receive messages, both, or neither.
2256
+ *
2257
+ * # Arguments
2258
+ * * `base_name` - The base name for the app (without ID)
2259
+ * * `identity_provider_config` - Configuration for proving identity to others
2260
+ * * `identity_verifier_config` - Configuration for verifying identity of others
2261
+ * * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
2262
+ *
2263
+ * # Returns
2264
+ * * `Ok(Arc<App>)` - Successfully created adapter
2265
+ * * `Err(SlimError)` - If adapter creation fails
2266
+ */ createAppWithDirectionAsync(name: Name, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
2267
+ signal: AbortSignal;
2268
+ }): Promise<App>;
2269
+ /**
2270
+ * Create a new App with SharedSecret authentication (helper function)
2271
+ *
2272
+ * This is a convenience function for creating a SLIM application using SharedSecret authentication
2273
+ * on this service instance.
2274
+ *
2275
+ * # Arguments
2276
+ * * `name` - The base name for the app (without ID)
2277
+ * * `secret` - The shared secret string for authentication
2278
+ *
2279
+ * # Returns
2280
+ * * `Ok(Arc<App>)` - Successfully created app
2281
+ * * `Err(SlimError)` - If app creation fails
2282
+ */ createAppWithSecret(name: Name, secret: string): App;
2283
+ /**
2284
+ * Create a new App with SharedSecret authentication (async version)
2285
+ *
2286
+ * This is a convenience function for creating a SLIM application using SharedSecret authentication
2287
+ * on this service instance. This is the async version.
2288
+ *
2289
+ * # Arguments
2290
+ * * `name` - The base name for the app (without ID)
2291
+ * * `secret` - The shared secret string for authentication
2292
+ *
2293
+ * # Returns
2294
+ * * `Ok(Arc<App>)` - Successfully created app
2295
+ * * `Err(SlimError)` - If app creation fails
2296
+ */ createAppWithSecretAsync(name: Name, secret: string, asyncOpts_?: {
2297
+ signal: AbortSignal;
2298
+ }): Promise<App>;
2299
+ /**
2300
+ * Disconnect a client connection by connection ID - blocking version
2301
+ */ disconnect(connId: bigint): void;
2302
+ /**
2303
+ * Get the connection ID for a given endpoint
2304
+ */ getConnectionId(endpoint: string): /*u64*/ bigint | undefined;
2305
+ /**
2306
+ * Get the service identifier/name
2307
+ */ getName(): string;
2308
+ /**
2309
+ * Run the service (starts all configured servers and clients) - blocking version
2310
+ */ run(): void;
2311
+ /**
2312
+ * Run the service (starts all configured servers and clients)
2313
+ */ runAsync(asyncOpts_?: {
2314
+ signal: AbortSignal;
2315
+ }): void;
2316
+ /**
2317
+ * Start a server with the given configuration - blocking version
2318
+ */ runServer(config: ServerConfig): void;
2319
+ /**
2320
+ * Start a server with the given configuration
2321
+ */ runServerAsync(config: ServerConfig, asyncOpts_?: {
2322
+ signal: AbortSignal;
2323
+ }): void;
2324
+ /**
2325
+ * Shutdown the service gracefully - blocking version
2326
+ */ shutdown(): void;
2327
+ /**
2328
+ * Shutdown the service gracefully
2329
+ */ shutdownAsync(asyncOpts_?: {
2330
+ signal: AbortSignal;
2331
+ }): void;
2332
+ /**
2333
+ * Stop a server by endpoint - blocking version
2334
+ */ stopServer(endpoint: string): void;
2335
+ /**
2336
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2337
+ */
2338
+ uniffiDestroy(): void;
2339
+ [Symbol.dispose]: () => void;
2340
+ static instanceOf(obj: any): obj is Service;
2341
+ }
2342
+ export type SessionInterface = {
2343
+ /**
2344
+ * Get the session configuration
2345
+ */ config(): SessionConfig;
2346
+ /**
2347
+ * Get the destination name for this session
2348
+ */ destination(): Name;
2349
+ /**
2350
+ * Receive a message from the session (blocking version for FFI)
2351
+ *
2352
+ * # Arguments
2353
+ * * `timeout` - Optional timeout duration
2354
+ *
2355
+ * # Returns
2356
+ * * `Ok(ReceivedMessage)` - Message with context and payload bytes
2357
+ * * `Err(SlimError)` - If the receive fails or times out
2358
+ */ getMessage(timeout: number | undefined): ReceivedMessage;
2359
+ /**
2360
+ * Receive a message from the session (async version)
2361
+ */ getMessageAsync(timeout: number | undefined, asyncOpts_?: {
2362
+ signal: AbortSignal;
2363
+ }): Promise<ReceivedMessage>;
2364
+ /**
2365
+ * Invite a participant to the session (blocking version)
2366
+ *
2367
+ * Returns a completion handle that can be awaited to ensure the invitation completes.
2368
+ */ invite(participant: Name): CompletionHandle;
2369
+ /**
2370
+ * Invite a participant and wait for completion (blocking version)
2371
+ *
2372
+ * This method invites a participant and blocks until the invitation completes.
2373
+ */ inviteAndWait(participant: Name): void;
2374
+ /**
2375
+ * Invite a participant and wait for completion (async version)
2376
+ *
2377
+ * This method invites a participant and waits until the invitation completes.
2378
+ */ inviteAndWaitAsync(participant: Name, asyncOpts_?: {
2379
+ signal: AbortSignal;
2380
+ }): void;
2381
+ /**
2382
+ * Invite a participant to the session (async version)
2383
+ *
2384
+ * Returns a completion handle that can be awaited to ensure the invitation completes.
2385
+ */ inviteAsync(participant: Name, asyncOpts_?: {
2386
+ signal: AbortSignal;
2387
+ }): Promise<CompletionHandle>;
2388
+ /**
2389
+ * Check if this session is the initiator
2390
+ */ isInitiator(): boolean;
2391
+ /**
2392
+ * Get the session metadata
2393
+ */ metadata(): Map<string, string>;
2394
+ /**
2395
+ * Get list of participants in the session (blocking version for FFI)
2396
+ */ participantsList(): Array<Name>;
2397
+ /**
2398
+ * Get list of participants in the session
2399
+ */ participantsListAsync(asyncOpts_?: {
2400
+ signal: AbortSignal;
2401
+ }): Promise<Array<Name>>;
2402
+ /**
2403
+ * Publish a message to the session's destination (blocking version)
2404
+ *
2405
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2406
+ *
2407
+ * # Arguments
2408
+ * * `data` - The message payload bytes
2409
+ * * `payload_type` - Optional content type identifier
2410
+ * * `metadata` - Optional key-value metadata pairs
2411
+ *
2412
+ * # Returns
2413
+ * * `Ok(CompletionHandle)` - Handle to await delivery confirmation
2414
+ * * `Err(SlimError)` - If publishing fails
2415
+ *
2416
+ * # Example
2417
+ * ```ignore
2418
+ * let completion = session.publish(data, None, None)?;
2419
+ * completion.wait()?; // Blocks until message is delivered
2420
+ * ```
2421
+ */ publish(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandle;
2422
+ /**
2423
+ * Publish a message and wait for completion (blocking version)
2424
+ *
2425
+ * This method publishes a message and blocks until the delivery completes.
2426
+ */ publishAndWait(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2427
+ /**
2428
+ * Publish a message and wait for completion (async version)
2429
+ *
2430
+ * This method publishes a message and waits until the delivery completes.
2431
+ */ publishAndWaitAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2432
+ signal: AbortSignal;
2433
+ }): void;
2434
+ /**
2435
+ * Publish a message to the session's destination (async version)
2436
+ *
2437
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2438
+ */ publishAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2439
+ signal: AbortSignal;
2440
+ }): Promise<CompletionHandle>;
2441
+ /**
2442
+ * Publish a reply message to the originator of a received message (blocking version for FFI)
2443
+ *
2444
+ * This method uses the routing information from a previously received message
2445
+ * to send a reply back to the sender. This is the preferred way to implement
2446
+ * request/reply patterns.
2447
+ *
2448
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2449
+ *
2450
+ * # Arguments
2451
+ * * `message_context` - Context from a message received via `get_message()`
2452
+ * * `data` - The reply payload bytes
2453
+ * * `payload_type` - Optional content type identifier
2454
+ * * `metadata` - Optional key-value metadata pairs
2455
+ *
2456
+ * # Returns
2457
+ * * `Ok(CompletionHandle)` - Handle to await delivery confirmation
2458
+ * * `Err(SlimError)` - If publishing fails
2459
+ */ publishTo(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandle;
2460
+ /**
2461
+ * Publish a reply message and wait for completion (blocking version)
2462
+ *
2463
+ * This method publishes a reply to a received message and blocks until the delivery completes.
2464
+ */ publishToAndWait(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2465
+ /**
2466
+ * Publish a reply message and wait for completion (async version)
2467
+ *
2468
+ * This method publishes a reply to a received message and waits until the delivery completes.
2469
+ */ publishToAndWaitAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2470
+ signal: AbortSignal;
2471
+ }): void;
2472
+ /**
2473
+ * Publish a reply message (async version)
2474
+ *
2475
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2476
+ */ publishToAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2477
+ signal: AbortSignal;
2478
+ }): Promise<CompletionHandle>;
2479
+ /**
2480
+ * Low-level publish with full control over all parameters (blocking version for FFI)
2481
+ *
2482
+ * This is an advanced method that provides complete control over routing and delivery.
2483
+ * Most users should use `publish()` or `publish_to()` instead.
2484
+ *
2485
+ * # Arguments
2486
+ * * `destination` - Target name to send to
2487
+ * * `fanout` - Number of copies to send (for multicast)
2488
+ * * `data` - The message payload bytes
2489
+ * * `connection_out` - Optional specific connection ID to use
2490
+ * * `payload_type` - Optional content type identifier
2491
+ * * `metadata` - Optional key-value metadata pairs
2492
+ */ publishWithParams(destination: Name, fanout: number, data: ArrayBuffer, connectionOut: /*u64*/ bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2493
+ /**
2494
+ * Low-level publish with full control (async version)
2495
+ */ publishWithParamsAsync(destination: Name, fanout: number, data: ArrayBuffer, connectionOut: /*u64*/ bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2496
+ signal: AbortSignal;
2497
+ }): void;
2498
+ /**
2499
+ * Remove a participant from the session (blocking version)
2500
+ *
2501
+ * Returns a completion handle that can be awaited to ensure the removal completes.
2502
+ */ remove(participant: Name): CompletionHandle;
2503
+ /**
2504
+ * Remove a participant and wait for completion (blocking version)
2505
+ *
2506
+ * This method removes a participant and blocks until the removal completes.
2507
+ */ removeAndWait(participant: Name): void;
2508
+ /**
2509
+ * Remove a participant and wait for completion (async version)
2510
+ *
2511
+ * This method removes a participant and waits until the removal completes.
2512
+ */ removeAndWaitAsync(participant: Name, asyncOpts_?: {
2513
+ signal: AbortSignal;
2514
+ }): void;
2515
+ /**
2516
+ * Remove a participant from the session (async version)
2517
+ *
2518
+ * Returns a completion handle that can be awaited to ensure the removal completes.
2519
+ */ removeAsync(participant: Name, asyncOpts_?: {
2520
+ signal: AbortSignal;
2521
+ }): Promise<CompletionHandle>;
2522
+ /**
2523
+ * Get the session ID
2524
+ */ sessionId(): number;
2525
+ /**
2526
+ * Get the session type (PointToPoint or Group)
2527
+ */ sessionType(): SessionType;
2528
+ /**
2529
+ * Get the source name for this session
2530
+ */ source(): Name;
2531
+ };
2532
+ /**
2533
+ * Session context for language bindings (UniFFI-compatible)
2534
+ *
2535
+ * Wraps the session context with proper async access patterns for message reception.
2536
+ * Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
2537
+ */
2538
+ export declare class Session extends UniffiAbstractObject implements SessionInterface {
2539
+ readonly [uniffiTypeNameSymbol] = "Session";
2540
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
2541
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2542
+ /**
2543
+ * Get the session configuration
2544
+ */ config(): SessionConfig;
2545
+ /**
2546
+ * Get the destination name for this session
2547
+ */ destination(): Name;
2548
+ /**
2549
+ * Receive a message from the session (blocking version for FFI)
2550
+ *
2551
+ * # Arguments
2552
+ * * `timeout` - Optional timeout duration
2553
+ *
2554
+ * # Returns
2555
+ * * `Ok(ReceivedMessage)` - Message with context and payload bytes
2556
+ * * `Err(SlimError)` - If the receive fails or times out
2557
+ */ getMessage(timeout: number | undefined): ReceivedMessage;
2558
+ /**
2559
+ * Receive a message from the session (async version)
2560
+ */ getMessageAsync(timeout: number | undefined, asyncOpts_?: {
2561
+ signal: AbortSignal;
2562
+ }): Promise<ReceivedMessage>;
2563
+ /**
2564
+ * Invite a participant to the session (blocking version)
2565
+ *
2566
+ * Returns a completion handle that can be awaited to ensure the invitation completes.
2567
+ */ invite(participant: Name): CompletionHandle;
2568
+ /**
2569
+ * Invite a participant and wait for completion (blocking version)
2570
+ *
2571
+ * This method invites a participant and blocks until the invitation completes.
2572
+ */ inviteAndWait(participant: Name): void;
2573
+ /**
2574
+ * Invite a participant and wait for completion (async version)
2575
+ *
2576
+ * This method invites a participant and waits until the invitation completes.
2577
+ */ inviteAndWaitAsync(participant: Name, asyncOpts_?: {
2578
+ signal: AbortSignal;
2579
+ }): void;
2580
+ /**
2581
+ * Invite a participant to the session (async version)
2582
+ *
2583
+ * Returns a completion handle that can be awaited to ensure the invitation completes.
2584
+ */ inviteAsync(participant: Name, asyncOpts_?: {
2585
+ signal: AbortSignal;
2586
+ }): Promise<CompletionHandle>;
2587
+ /**
2588
+ * Check if this session is the initiator
2589
+ */ isInitiator(): boolean;
2590
+ /**
2591
+ * Get the session metadata
2592
+ */ metadata(): Map<string, string>;
2593
+ /**
2594
+ * Get list of participants in the session (blocking version for FFI)
2595
+ */ participantsList(): Array<Name>;
2596
+ /**
2597
+ * Get list of participants in the session
2598
+ */ participantsListAsync(asyncOpts_?: {
2599
+ signal: AbortSignal;
2600
+ }): Promise<Array<Name>>;
2601
+ /**
2602
+ * Publish a message to the session's destination (blocking version)
2603
+ *
2604
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2605
+ *
2606
+ * # Arguments
2607
+ * * `data` - The message payload bytes
2608
+ * * `payload_type` - Optional content type identifier
2609
+ * * `metadata` - Optional key-value metadata pairs
2610
+ *
2611
+ * # Returns
2612
+ * * `Ok(CompletionHandle)` - Handle to await delivery confirmation
2613
+ * * `Err(SlimError)` - If publishing fails
2614
+ *
2615
+ * # Example
2616
+ * ```ignore
2617
+ * let completion = session.publish(data, None, None)?;
2618
+ * completion.wait()?; // Blocks until message is delivered
2619
+ * ```
2620
+ */ publish(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandle;
2621
+ /**
2622
+ * Publish a message and wait for completion (blocking version)
2623
+ *
2624
+ * This method publishes a message and blocks until the delivery completes.
2625
+ */ publishAndWait(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2626
+ /**
2627
+ * Publish a message and wait for completion (async version)
2628
+ *
2629
+ * This method publishes a message and waits until the delivery completes.
2630
+ */ publishAndWaitAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2631
+ signal: AbortSignal;
2632
+ }): void;
2633
+ /**
2634
+ * Publish a message to the session's destination (async version)
2635
+ *
2636
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2637
+ */ publishAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2638
+ signal: AbortSignal;
2639
+ }): Promise<CompletionHandle>;
2640
+ /**
2641
+ * Publish a reply message to the originator of a received message (blocking version for FFI)
2642
+ *
2643
+ * This method uses the routing information from a previously received message
2644
+ * to send a reply back to the sender. This is the preferred way to implement
2645
+ * request/reply patterns.
2646
+ *
2647
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2648
+ *
2649
+ * # Arguments
2650
+ * * `message_context` - Context from a message received via `get_message()`
2651
+ * * `data` - The reply payload bytes
2652
+ * * `payload_type` - Optional content type identifier
2653
+ * * `metadata` - Optional key-value metadata pairs
2654
+ *
2655
+ * # Returns
2656
+ * * `Ok(CompletionHandle)` - Handle to await delivery confirmation
2657
+ * * `Err(SlimError)` - If publishing fails
2658
+ */ publishTo(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandle;
2659
+ /**
2660
+ * Publish a reply message and wait for completion (blocking version)
2661
+ *
2662
+ * This method publishes a reply to a received message and blocks until the delivery completes.
2663
+ */ publishToAndWait(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2664
+ /**
2665
+ * Publish a reply message and wait for completion (async version)
2666
+ *
2667
+ * This method publishes a reply to a received message and waits until the delivery completes.
2668
+ */ publishToAndWaitAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2669
+ signal: AbortSignal;
2670
+ }): void;
2671
+ /**
2672
+ * Publish a reply message (async version)
2673
+ *
2674
+ * Returns a completion handle that can be awaited to ensure the message was delivered.
2675
+ */ publishToAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2676
+ signal: AbortSignal;
2677
+ }): Promise<CompletionHandle>;
2678
+ /**
2679
+ * Low-level publish with full control over all parameters (blocking version for FFI)
2680
+ *
2681
+ * This is an advanced method that provides complete control over routing and delivery.
2682
+ * Most users should use `publish()` or `publish_to()` instead.
2683
+ *
2684
+ * # Arguments
2685
+ * * `destination` - Target name to send to
2686
+ * * `fanout` - Number of copies to send (for multicast)
2687
+ * * `data` - The message payload bytes
2688
+ * * `connection_out` - Optional specific connection ID to use
2689
+ * * `payload_type` - Optional content type identifier
2690
+ * * `metadata` - Optional key-value metadata pairs
2691
+ */ publishWithParams(destination: Name, fanout: number, data: ArrayBuffer, connectionOut: /*u64*/ bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
2692
+ /**
2693
+ * Low-level publish with full control (async version)
2694
+ */ publishWithParamsAsync(destination: Name, fanout: number, data: ArrayBuffer, connectionOut: /*u64*/ bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2695
+ signal: AbortSignal;
2696
+ }): void;
2697
+ /**
2698
+ * Remove a participant from the session (blocking version)
2699
+ *
2700
+ * Returns a completion handle that can be awaited to ensure the removal completes.
2701
+ */ remove(participant: Name): CompletionHandle;
2702
+ /**
2703
+ * Remove a participant and wait for completion (blocking version)
2704
+ *
2705
+ * This method removes a participant and blocks until the removal completes.
2706
+ */ removeAndWait(participant: Name): void;
2707
+ /**
2708
+ * Remove a participant and wait for completion (async version)
2709
+ *
2710
+ * This method removes a participant and waits until the removal completes.
2711
+ */ removeAndWaitAsync(participant: Name, asyncOpts_?: {
2712
+ signal: AbortSignal;
2713
+ }): void;
2714
+ /**
2715
+ * Remove a participant from the session (async version)
2716
+ *
2717
+ * Returns a completion handle that can be awaited to ensure the removal completes.
2718
+ */ removeAsync(participant: Name, asyncOpts_?: {
2719
+ signal: AbortSignal;
2720
+ }): Promise<CompletionHandle>;
2721
+ /**
2722
+ * Get the session ID
2723
+ */ sessionId(): number;
2724
+ /**
2725
+ * Get the session type (PointToPoint or Group)
2726
+ */ sessionType(): SessionType;
2727
+ /**
2728
+ * Get the source name for this session
2729
+ */ source(): Name;
2730
+ /**
2731
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2732
+ */
2733
+ uniffiDestroy(): void;
2734
+ [Symbol.dispose]: () => void;
2735
+ static instanceOf(obj: any): obj is Session;
2736
+ }
2737
+ export type ChannelInterface = {
2738
+ /**
2739
+ * Broadcast a request stream to all GROUP members and stream their
2740
+ * responses.
2741
+ *
2742
+ * Semantically equivalent to `call_multicast_stream_unary` at the
2743
+ * transport level; the difference (one vs many responses per member) is
2744
+ * determined by the server handler.
2745
+ */ callMulticastStreamStream(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastBidiStreamHandler;
2746
+ /**
2747
+ * Broadcast a request stream to all GROUP members and collect their
2748
+ * responses.
2749
+ *
2750
+ * Returns a handler that lets you send requests and receive responses
2751
+ * concurrently. Use `send` / `send_async` to push request messages,
2752
+ * `close_send` / `close_send_async` to signal end-of-requests, and
2753
+ * `recv` / `recv_async` to pull response items.
2754
+ */ callMulticastStreamUnary(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastBidiStreamHandler;
2755
+ /**
2756
+ * Broadcast one request to all GROUP members and collect their responses.
2757
+ *
2758
+ * Returns a reader from which each member's response (wrapped in
2759
+ * `MulticastStreamMessage`) can be pulled one at a time (blocking).
2760
+ */ callMulticastUnary(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastResponseReader;
2761
+ /**
2762
+ * Broadcast one request to all GROUP members and collect their responses
2763
+ * (async).
2764
+ */ callMulticastUnaryAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2765
+ signal: AbortSignal;
2766
+ }): Promise<MulticastResponseReader>;
2767
+ /**
2768
+ * Broadcast one request to all GROUP members and stream their responses
2769
+ * (blocking).
2770
+ *
2771
+ * Semantically identical to `call_multicast_unary` at the transport level;
2772
+ * the difference is that each member may send multiple responses before its
2773
+ * EOS, which the server handler determines.
2774
+ */ callMulticastUnaryStream(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastResponseReader;
2775
+ /**
2776
+ * Broadcast one request to all GROUP members and stream their responses
2777
+ * (async).
2778
+ */ callMulticastUnaryStreamAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2779
+ signal: AbortSignal;
2780
+ }): Promise<MulticastResponseReader>;
2781
+ callStreamStream(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): BidiStreamHandler;
2782
+ callStreamUnary(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): RequestStreamWriter;
2783
+ callUnary(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): ArrayBuffer;
2784
+ callUnaryAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2785
+ signal: AbortSignal;
2786
+ }): Promise<ArrayBuffer>;
2787
+ callUnaryStream(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): ResponseStreamReader;
2788
+ callUnaryStreamAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2789
+ signal: AbortSignal;
2790
+ }): Promise<ResponseStreamReader>;
2791
+ /**
2792
+ * Close the persistent SLIM session held by this channel, if any.
2793
+ *
2794
+ * `timeout` optionally bounds how long to wait for the session layer to
2795
+ * confirm the close before giving up and proceeding with cleanup anyway.
2796
+ * Pass `None` to wait indefinitely.
2797
+ *
2798
+ * After this call the channel can still be used; a new session will be
2799
+ * created automatically on the next RPC call.
2800
+ */ close(timeout: number | undefined): void;
2801
+ /**
2802
+ * Async version of [`close`](Self::close).
2803
+ */ closeAsync(timeout: number | undefined, asyncOpts_?: {
2804
+ signal: AbortSignal;
2805
+ }): void;
2806
+ };
2807
+ /**
2808
+ * Client-side channel for making RPC calls.
2809
+ *
2810
+ * Manages a single persistent SLIM session: either a `PointToPoint` session
2811
+ * to a single remote server, or a `Multicast` (GROUP) session shared across
2812
+ * multiple remote servers. The session is lazily initialised and recreated
2813
+ * when dead.
2814
+ *
2815
+ * ## Constructor
2816
+ *
2817
+ * - `new_with_members_internal(app, members)` — Smart constructor:
2818
+ * - **1 member**: creates a P2P channel.
2819
+ * - **Many members**: creates a GROUP channel with a generated session name
2820
+ * and auto-invites all members on the first multicast call.
2821
+ */
2822
+ export declare class Channel extends UniffiAbstractObject implements ChannelInterface {
2823
+ readonly [uniffiTypeNameSymbol] = "Channel";
2824
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
2825
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2826
+ constructor(app: App, remote: Name);
2827
+ static newGroup(app: App, members: Array<Name>): Channel;
2828
+ static newGroupWithConnection(app: App, members: Array<Name>, connectionId: /*u64*/ bigint | undefined): Channel;
2829
+ static newWithConnection(app: App, remote: Name, connectionId: /*u64*/ bigint | undefined): Channel;
2830
+ /**
2831
+ * Broadcast a request stream to all GROUP members and stream their
2832
+ * responses.
2833
+ *
2834
+ * Semantically equivalent to `call_multicast_stream_unary` at the
2835
+ * transport level; the difference (one vs many responses per member) is
2836
+ * determined by the server handler.
2837
+ */ callMulticastStreamStream(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastBidiStreamHandler;
2838
+ /**
2839
+ * Broadcast a request stream to all GROUP members and collect their
2840
+ * responses.
2841
+ *
2842
+ * Returns a handler that lets you send requests and receive responses
2843
+ * concurrently. Use `send` / `send_async` to push request messages,
2844
+ * `close_send` / `close_send_async` to signal end-of-requests, and
2845
+ * `recv` / `recv_async` to pull response items.
2846
+ */ callMulticastStreamUnary(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastBidiStreamHandler;
2847
+ /**
2848
+ * Broadcast one request to all GROUP members and collect their responses.
2849
+ *
2850
+ * Returns a reader from which each member's response (wrapped in
2851
+ * `MulticastStreamMessage`) can be pulled one at a time (blocking).
2852
+ */ callMulticastUnary(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastResponseReader;
2853
+ /**
2854
+ * Broadcast one request to all GROUP members and collect their responses
2855
+ * (async).
2856
+ */ callMulticastUnaryAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2857
+ signal: AbortSignal;
2858
+ }): Promise<MulticastResponseReader>;
2859
+ /**
2860
+ * Broadcast one request to all GROUP members and stream their responses
2861
+ * (blocking).
2862
+ *
2863
+ * Semantically identical to `call_multicast_unary` at the transport level;
2864
+ * the difference is that each member may send multiple responses before its
2865
+ * EOS, which the server handler determines.
2866
+ */ callMulticastUnaryStream(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): MulticastResponseReader;
2867
+ /**
2868
+ * Broadcast one request to all GROUP members and stream their responses
2869
+ * (async).
2870
+ */ callMulticastUnaryStreamAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2871
+ signal: AbortSignal;
2872
+ }): Promise<MulticastResponseReader>;
2873
+ callStreamStream(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): BidiStreamHandler;
2874
+ callStreamUnary(serviceName: string, methodName: string, timeout: number | undefined, metadata: Map<string, string> | undefined): RequestStreamWriter;
2875
+ callUnary(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): ArrayBuffer;
2876
+ callUnaryAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2877
+ signal: AbortSignal;
2878
+ }): Promise<ArrayBuffer>;
2879
+ callUnaryStream(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined): ResponseStreamReader;
2880
+ callUnaryStreamAsync(serviceName: string, methodName: string, request: ArrayBuffer, timeout: number | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
2881
+ signal: AbortSignal;
2882
+ }): Promise<ResponseStreamReader>;
2883
+ /**
2884
+ * Close the persistent SLIM session held by this channel, if any.
2885
+ *
2886
+ * `timeout` optionally bounds how long to wait for the session layer to
2887
+ * confirm the close before giving up and proceeding with cleanup anyway.
2888
+ * Pass `None` to wait indefinitely.
2889
+ *
2890
+ * After this call the channel can still be used; a new session will be
2891
+ * created automatically on the next RPC call.
2892
+ */ close(timeout: number | undefined): void;
2893
+ /**
2894
+ * Async version of [`close`](Self::close).
2895
+ */ closeAsync(timeout: number | undefined, asyncOpts_?: {
2896
+ signal: AbortSignal;
2897
+ }): void;
2898
+ /**
2899
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2900
+ */
2901
+ uniffiDestroy(): void;
2902
+ [Symbol.dispose]: () => void;
2903
+ static instanceOf(obj: any): obj is Channel;
2904
+ }
2905
+ export type ContextInterface = {
2906
+ /**
2907
+ * Get the deadline for this RPC call
2908
+ */ deadline(): Date;
2909
+ /**
2910
+ * Check if the deadline has been exceeded
2911
+ */ isDeadlineExceeded(): boolean;
2912
+ /**
2913
+ * Get the rpc session metadata
2914
+ */ metadata(): Map<string, string>;
2915
+ /**
2916
+ * Get the remaining time until deadline
2917
+ *
2918
+ * Returns Duration::ZERO if the deadline has already passed
2919
+ */ remainingTime(): number;
2920
+ /**
2921
+ * Get the session ID
2922
+ */ sessionId(): string;
2923
+ };
2924
+ /**
2925
+ * Context passed to RPC handlers
2926
+ *
2927
+ * Contains all contextual information about an RPC call including:
2928
+ * - Session information (source, destination, session ID)
2929
+ * - Metadata (key-value pairs)
2930
+ * - Deadline/timeout information
2931
+ * - Message routing details
2932
+ */
2933
+ export declare class Context extends UniffiAbstractObject implements ContextInterface {
2934
+ readonly [uniffiTypeNameSymbol] = "Context";
2935
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
2936
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2937
+ /**
2938
+ * Get the deadline for this RPC call
2939
+ */ deadline(): Date;
2940
+ /**
2941
+ * Check if the deadline has been exceeded
2942
+ */ isDeadlineExceeded(): boolean;
2943
+ /**
2944
+ * Get the rpc session metadata
2945
+ */ metadata(): Map<string, string>;
2946
+ /**
2947
+ * Get the remaining time until deadline
2948
+ *
2949
+ * Returns Duration::ZERO if the deadline has already passed
2950
+ */ remainingTime(): number;
2951
+ /**
2952
+ * Get the session ID
2953
+ */ sessionId(): string;
2954
+ /**
2955
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2956
+ */
2957
+ uniffiDestroy(): void;
2958
+ [Symbol.dispose]: () => void;
2959
+ static instanceOf(obj: any): obj is Context;
2960
+ }
2961
+ export type StreamStreamHandlerInterface = {
2962
+ /**
2963
+ * Handle a stream-to-stream RPC call
2964
+ *
2965
+ * # Arguments
2966
+ * * `stream` - Request stream to pull messages from
2967
+ * * `context` - RPC context with metadata and session information
2968
+ * * `sink` - Response sink to send streaming responses
2969
+ *
2970
+ * # Returns
2971
+ * Ok(()) if handling succeeded, or an error
2972
+ *
2973
+ * # Note
2974
+ * You must call `sink.close()` or `sink.send_error()` when done.
2975
+ */ handle(stream: RequestStream, context: Context, sink: ResponseSink, asyncOpts_?: {
2976
+ signal: AbortSignal;
2977
+ }): void;
2978
+ };
2979
+ /**
2980
+ * Stream-to-Stream RPC handler trait
2981
+ *
2982
+ * Implement this trait to handle stream-to-stream RPC calls.
2983
+ * The handler receives multiple requests via the stream and sends multiple responses via the sink.
2984
+ */
2985
+ export declare class StreamStreamHandler extends UniffiAbstractObject implements StreamStreamHandlerInterface {
2986
+ readonly [uniffiTypeNameSymbol] = "StreamStreamHandler";
2987
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
2988
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
2989
+ /**
2990
+ * Handle a stream-to-stream RPC call
2991
+ *
2992
+ * # Arguments
2993
+ * * `stream` - Request stream to pull messages from
2994
+ * * `context` - RPC context with metadata and session information
2995
+ * * `sink` - Response sink to send streaming responses
2996
+ *
2997
+ * # Returns
2998
+ * Ok(()) if handling succeeded, or an error
2999
+ *
3000
+ * # Note
3001
+ * You must call `sink.close()` or `sink.send_error()` when done.
3002
+ */ handle(stream: RequestStream, context: Context, sink: ResponseSink, asyncOpts_?: {
3003
+ signal: AbortSignal;
3004
+ }): void;
3005
+ /**
3006
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3007
+ */
3008
+ uniffiDestroy(): void;
3009
+ [Symbol.dispose]: () => void;
3010
+ static instanceOf(obj: any): obj is StreamStreamHandler;
3011
+ }
3012
+ export type StreamUnaryHandlerInterface = {
3013
+ /**
3014
+ * Handle a stream-to-unary RPC call
3015
+ *
3016
+ * # Arguments
3017
+ * * `stream` - Request stream to pull messages from
3018
+ * * `context` - RPC context with metadata and session information
3019
+ *
3020
+ * # Returns
3021
+ * The response message bytes or an error
3022
+ */ handle(stream: RequestStream, context: Context, asyncOpts_?: {
3023
+ signal: AbortSignal;
3024
+ }): Promise<ArrayBuffer>;
3025
+ };
3026
+ /**
3027
+ * Stream-to-Unary RPC handler trait
3028
+ *
3029
+ * Implement this trait to handle stream-to-unary RPC calls.
3030
+ * The handler receives multiple requests via the stream and returns a single response.
3031
+ */
3032
+ export declare class StreamUnaryHandler extends UniffiAbstractObject implements StreamUnaryHandlerInterface {
3033
+ readonly [uniffiTypeNameSymbol] = "StreamUnaryHandler";
3034
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3035
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3036
+ /**
3037
+ * Handle a stream-to-unary RPC call
3038
+ *
3039
+ * # Arguments
3040
+ * * `stream` - Request stream to pull messages from
3041
+ * * `context` - RPC context with metadata and session information
3042
+ *
3043
+ * # Returns
3044
+ * The response message bytes or an error
3045
+ */ handle(stream: RequestStream, context: Context, asyncOpts_?: {
3046
+ signal: AbortSignal;
3047
+ }): Promise<ArrayBuffer>;
3048
+ /**
3049
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3050
+ */
3051
+ uniffiDestroy(): void;
3052
+ [Symbol.dispose]: () => void;
3053
+ static instanceOf(obj: any): obj is StreamUnaryHandler;
3054
+ }
3055
+ export type UnaryStreamHandlerInterface = {
3056
+ /**
3057
+ * Handle a unary-to-stream RPC call
3058
+ *
3059
+ * # Arguments
3060
+ * * `request` - The request message bytes
3061
+ * * `context` - RPC context with metadata and session information
3062
+ * * `sink` - Response sink to send streaming responses
3063
+ *
3064
+ * # Returns
3065
+ * Ok(()) if handling succeeded, or an error
3066
+ *
3067
+ * # Note
3068
+ * You must call `sink.close()` or `sink.send_error()` when done.
3069
+ */ handle(request: ArrayBuffer, context: Context, sink: ResponseSink, asyncOpts_?: {
3070
+ signal: AbortSignal;
3071
+ }): void;
3072
+ };
3073
+ /**
3074
+ * Unary-to-Stream RPC handler trait
3075
+ *
3076
+ * Implement this trait to handle unary-to-stream RPC calls.
3077
+ * The handler receives a single request and sends multiple responses via the sink.
3078
+ */
3079
+ export declare class UnaryStreamHandler extends UniffiAbstractObject implements UnaryStreamHandlerInterface {
3080
+ readonly [uniffiTypeNameSymbol] = "UnaryStreamHandler";
3081
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3082
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3083
+ /**
3084
+ * Handle a unary-to-stream RPC call
3085
+ *
3086
+ * # Arguments
3087
+ * * `request` - The request message bytes
3088
+ * * `context` - RPC context with metadata and session information
3089
+ * * `sink` - Response sink to send streaming responses
3090
+ *
3091
+ * # Returns
3092
+ * Ok(()) if handling succeeded, or an error
3093
+ *
3094
+ * # Note
3095
+ * You must call `sink.close()` or `sink.send_error()` when done.
3096
+ */ handle(request: ArrayBuffer, context: Context, sink: ResponseSink, asyncOpts_?: {
3097
+ signal: AbortSignal;
3098
+ }): void;
3099
+ /**
3100
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3101
+ */
3102
+ uniffiDestroy(): void;
3103
+ [Symbol.dispose]: () => void;
3104
+ static instanceOf(obj: any): obj is UnaryStreamHandler;
3105
+ }
3106
+ export type UnaryUnaryHandlerInterface = {
3107
+ /**
3108
+ * Handle a unary-to-unary RPC call
3109
+ *
3110
+ * # Arguments
3111
+ * * `request` - The request message bytes
3112
+ * * `context` - RPC context with metadata and session information
3113
+ *
3114
+ * # Returns
3115
+ * The response message bytes or an error
3116
+ */ handle(request: ArrayBuffer, context: Context, asyncOpts_?: {
3117
+ signal: AbortSignal;
3118
+ }): Promise<ArrayBuffer>;
3119
+ };
3120
+ /**
3121
+ * Unary-to-Unary RPC handler trait
3122
+ *
3123
+ * Implement this trait to handle unary-to-unary RPC calls.
3124
+ * The handler receives a single request and returns a single response.
3125
+ */
3126
+ export declare class UnaryUnaryHandler extends UniffiAbstractObject implements UnaryUnaryHandlerInterface {
3127
+ readonly [uniffiTypeNameSymbol] = "UnaryUnaryHandler";
3128
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3129
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3130
+ /**
3131
+ * Handle a unary-to-unary RPC call
3132
+ *
3133
+ * # Arguments
3134
+ * * `request` - The request message bytes
3135
+ * * `context` - RPC context with metadata and session information
3136
+ *
3137
+ * # Returns
3138
+ * The response message bytes or an error
3139
+ */ handle(request: ArrayBuffer, context: Context, asyncOpts_?: {
3140
+ signal: AbortSignal;
3141
+ }): Promise<ArrayBuffer>;
3142
+ /**
3143
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3144
+ */
3145
+ uniffiDestroy(): void;
3146
+ [Symbol.dispose]: () => void;
3147
+ static instanceOf(obj: any): obj is UnaryUnaryHandler;
3148
+ }
3149
+ export type ServerInterface = {
3150
+ /**
3151
+ * Register a stream-to-stream RPC handler
3152
+ *
3153
+ * # Arguments
3154
+ * * `service_name` - The service name
3155
+ * * `method_name` - The method name
3156
+ * * `handler` - Implementation of the StreamStreamHandler trait
3157
+ */ registerStreamStream(serviceName: string, methodName: string, handler: StreamStreamHandler): void;
3158
+ /**
3159
+ * Register a stream-to-unary RPC handler
3160
+ *
3161
+ * # Arguments
3162
+ * * `service_name` - The service name
3163
+ * * `method_name` - The method name
3164
+ * * `handler` - Implementation of the StreamUnaryHandler trait
3165
+ */ registerStreamUnary(serviceName: string, methodName: string, handler: StreamUnaryHandler): void;
3166
+ /**
3167
+ * Register a unary-to-stream RPC handler
3168
+ *
3169
+ * # Arguments
3170
+ * * `service_name` - The service name
3171
+ * * `method_name` - The method name
3172
+ * * `handler` - Implementation of the UnaryStreamHandler trait
3173
+ */ registerUnaryStream(serviceName: string, methodName: string, handler: UnaryStreamHandler): void;
3174
+ /**
3175
+ * Register a unary-to-unary RPC handler
3176
+ *
3177
+ * # Arguments
3178
+ * * `service_name` - The service name (e.g., "MyService")
3179
+ * * `method_name` - The method name (e.g., "GetUser")
3180
+ * * `handler` - Implementation of the UnaryUnaryHandler trait
3181
+ */ registerUnaryUnary(serviceName: string, methodName: string, handler: UnaryUnaryHandler): void;
3182
+ /**
3183
+ * Start serving RPC requests (blocking version)
3184
+ *
3185
+ * This is a blocking method that runs until the server is shut down.
3186
+ * It listens for incoming RPC calls and dispatches them to registered handlers.
3187
+ */ serve(): void;
3188
+ /**
3189
+ * Start serving RPC requests (async version)
3190
+ *
3191
+ * This is an async method that runs until the server is shut down.
3192
+ * It listens for incoming RPC calls and dispatches them to registered handlers.
3193
+ */ serveAsync(asyncOpts_?: {
3194
+ signal: AbortSignal;
3195
+ }): void;
3196
+ /**
3197
+ * Shutdown the server gracefully (blocking version)
3198
+ *
3199
+ * This signals the server to stop accepting new requests and wait for
3200
+ * in-flight requests to complete.
3201
+ */ shutdown(): void;
3202
+ /**
3203
+ * Shutdown the server gracefully (async version)
3204
+ *
3205
+ * This signals the server to stop accepting new requests and wait for
3206
+ * in-flight requests to complete.
3207
+ */ shutdownAsync(asyncOpts_?: {
3208
+ signal: AbortSignal;
3209
+ }): void;
3210
+ };
3211
+ /**
3212
+ * RPC Server
3213
+ *
3214
+ * Handles incoming RPC requests by creating sessions and dispatching
3215
+ * to registered service handlers.
3216
+ *
3217
+ * # Example
3218
+ *
3219
+ * ```no_run
3220
+ * # use slim_bindings::{Server, Context, RpcError, Decoder, Encoder, App, Name};
3221
+ * # use std::sync::Arc;
3222
+ * # fn main() -> Result<(), Box<dyn std::error::Error>> {
3223
+ * # use slim_bindings::{IdentityProviderConfig, IdentityVerifierConfig};
3224
+ * # let app_name = Arc::new(Name::new("test".to_string(), "app".to_string(), "v1".to_string()));
3225
+ * # let provider = IdentityProviderConfig::SharedSecret { id: "test".to_string(), data: "secret".to_string() };
3226
+ * # let verifier = IdentityVerifierConfig::SharedSecret { id: "test".to_string(), data: "secret".to_string() };
3227
+ * # let app = App::new(app_name, provider, verifier)?;
3228
+ * # let core_app = app.inner();
3229
+ * # let notification_rx = app.notification_receiver();
3230
+ * # #[derive(Default)]
3231
+ * # struct Request {}
3232
+ * # impl Decoder for Request {
3233
+ * # fn decode(_buf: impl Into<Vec<u8>>) -> Result<Self, RpcError> { Ok(Request::default()) }
3234
+ * # }
3235
+ * # #[derive(Default)]
3236
+ * # struct Response {}
3237
+ * # impl Encoder for Response {
3238
+ * # fn encode(self) -> Result<Vec<u8>, RpcError> { Ok(vec![]) }
3239
+ * # }
3240
+ * let base_name = Name::new("org".to_string(), "namespace".to_string(), "service".to_string());
3241
+ * let server = Server::new_with_shared_rx_and_connection(core_app, base_name.as_slim_name(), None, notification_rx, None);
3242
+ *
3243
+ * // Register handlers
3244
+ * server.register_unary_unary_internal(
3245
+ * "MyService",
3246
+ * "MyMethod",
3247
+ * |request: Request, _ctx: Context| async move {
3248
+ * Ok(Response::default())
3249
+ * }
3250
+ * );
3251
+ * # Ok(())
3252
+ * # }
3253
+ * ```
3254
+ */
3255
+ export declare class Server extends UniffiAbstractObject implements ServerInterface {
3256
+ readonly [uniffiTypeNameSymbol] = "Server";
3257
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3258
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3259
+ /**
3260
+ * Create a new RPC server
3261
+ *
3262
+ * This is the primary constructor for creating an RPC server instance
3263
+ * that can handle incoming RPC requests over SLIM.
3264
+ *
3265
+ * # Arguments
3266
+ * * `app` - The SLIM application instance that provides the underlying
3267
+ * network transport and session management
3268
+ * * `base_name` - The base name for this service (e.g., org.namespace.service).
3269
+ * This name is used to construct subscription names for RPC methods.
3270
+ *
3271
+ * # Returns
3272
+ * A new RPC server instance wrapped in an Arc for shared ownership
3273
+ */
3274
+ constructor(app: App, baseName: Name);
3275
+ /**
3276
+ * Create a new RPC server with optional connection ID
3277
+ *
3278
+ * The connection ID is used to set up routing before serving RPC requests,
3279
+ * enabling multi-hop RPC calls through specific connections.
3280
+ *
3281
+ * # Arguments
3282
+ * * `app` - The SLIM application instance that provides the underlying
3283
+ * network transport and session management
3284
+ * * `base_name` - The base name for this service (e.g., org.namespace.service).
3285
+ * This name is used to construct subscription names for RPC methods.
3286
+ * * `connection_id` - Optional connection ID for routing setup
3287
+ *
3288
+ * # Returns
3289
+ * A new RPC server instance wrapped in an Arc for shared ownership
3290
+ */
3291
+ static newWithConnection(app: App, baseName: Name, connectionId: /*u64*/ bigint | undefined): Server;
3292
+ /**
3293
+ * Register a stream-to-stream RPC handler
3294
+ *
3295
+ * # Arguments
3296
+ * * `service_name` - The service name
3297
+ * * `method_name` - The method name
3298
+ * * `handler` - Implementation of the StreamStreamHandler trait
3299
+ */ registerStreamStream(serviceName: string, methodName: string, handler: StreamStreamHandler): void;
3300
+ /**
3301
+ * Register a stream-to-unary RPC handler
3302
+ *
3303
+ * # Arguments
3304
+ * * `service_name` - The service name
3305
+ * * `method_name` - The method name
3306
+ * * `handler` - Implementation of the StreamUnaryHandler trait
3307
+ */ registerStreamUnary(serviceName: string, methodName: string, handler: StreamUnaryHandler): void;
3308
+ /**
3309
+ * Register a unary-to-stream RPC handler
3310
+ *
3311
+ * # Arguments
3312
+ * * `service_name` - The service name
3313
+ * * `method_name` - The method name
3314
+ * * `handler` - Implementation of the UnaryStreamHandler trait
3315
+ */ registerUnaryStream(serviceName: string, methodName: string, handler: UnaryStreamHandler): void;
3316
+ /**
3317
+ * Register a unary-to-unary RPC handler
3318
+ *
3319
+ * # Arguments
3320
+ * * `service_name` - The service name (e.g., "MyService")
3321
+ * * `method_name` - The method name (e.g., "GetUser")
3322
+ * * `handler` - Implementation of the UnaryUnaryHandler trait
3323
+ */ registerUnaryUnary(serviceName: string, methodName: string, handler: UnaryUnaryHandler): void;
3324
+ /**
3325
+ * Start serving RPC requests (blocking version)
3326
+ *
3327
+ * This is a blocking method that runs until the server is shut down.
3328
+ * It listens for incoming RPC calls and dispatches them to registered handlers.
3329
+ */ serve(): void;
3330
+ /**
3331
+ * Start serving RPC requests (async version)
3332
+ *
3333
+ * This is an async method that runs until the server is shut down.
3334
+ * It listens for incoming RPC calls and dispatches them to registered handlers.
3335
+ */ serveAsync(asyncOpts_?: {
3336
+ signal: AbortSignal;
3337
+ }): void;
3338
+ /**
3339
+ * Shutdown the server gracefully (blocking version)
3340
+ *
3341
+ * This signals the server to stop accepting new requests and wait for
3342
+ * in-flight requests to complete.
3343
+ */ shutdown(): void;
3344
+ /**
3345
+ * Shutdown the server gracefully (async version)
3346
+ *
3347
+ * This signals the server to stop accepting new requests and wait for
3348
+ * in-flight requests to complete.
3349
+ */ shutdownAsync(asyncOpts_?: {
3350
+ signal: AbortSignal;
3351
+ }): void;
3352
+ /**
3353
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3354
+ */
3355
+ uniffiDestroy(): void;
3356
+ [Symbol.dispose]: () => void;
3357
+ static instanceOf(obj: any): obj is Server;
3358
+ }
3359
+ export type BidiStreamHandlerInterface = {
3360
+ /**
3361
+ * Close the request stream (no more messages will be sent)
3362
+ */ closeSend(): void;
3363
+ /**
3364
+ * Close the request stream (async version)
3365
+ */ closeSendAsync(asyncOpts_?: {
3366
+ signal: AbortSignal;
3367
+ }): void;
3368
+ /**
3369
+ * Receive the next response message (blocking version)
3370
+ */ recv(): StreamMessage;
3371
+ /**
3372
+ * Receive the next response message (async version)
3373
+ */ recvAsync(asyncOpts_?: {
3374
+ signal: AbortSignal;
3375
+ }): Promise<StreamMessage>;
3376
+ /**
3377
+ * Send a request message to the stream (blocking version)
3378
+ */ send(data: ArrayBuffer): void;
3379
+ /**
3380
+ * Send a request message to the stream (async version)
3381
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3382
+ signal: AbortSignal;
3383
+ }): void;
3384
+ };
3385
+ /**
3386
+ * Bidirectional stream handler for stream-to-stream RPC calls
3387
+ *
3388
+ * Allows sending and receiving messages concurrently.
3389
+ */
3390
+ export declare class BidiStreamHandler extends UniffiAbstractObject implements BidiStreamHandlerInterface {
3391
+ readonly [uniffiTypeNameSymbol] = "BidiStreamHandler";
3392
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3393
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3394
+ /**
3395
+ * Close the request stream (no more messages will be sent)
3396
+ */ closeSend(): void;
3397
+ /**
3398
+ * Close the request stream (async version)
3399
+ */ closeSendAsync(asyncOpts_?: {
3400
+ signal: AbortSignal;
3401
+ }): void;
3402
+ /**
3403
+ * Receive the next response message (blocking version)
3404
+ */ recv(): StreamMessage;
3405
+ /**
3406
+ * Receive the next response message (async version)
3407
+ */ recvAsync(asyncOpts_?: {
3408
+ signal: AbortSignal;
3409
+ }): Promise<StreamMessage>;
3410
+ /**
3411
+ * Send a request message to the stream (blocking version)
3412
+ */ send(data: ArrayBuffer): void;
3413
+ /**
3414
+ * Send a request message to the stream (async version)
3415
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3416
+ signal: AbortSignal;
3417
+ }): void;
3418
+ /**
3419
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3420
+ */
3421
+ uniffiDestroy(): void;
3422
+ [Symbol.dispose]: () => void;
3423
+ static instanceOf(obj: any): obj is BidiStreamHandler;
3424
+ }
3425
+ export type MulticastBidiStreamHandlerInterface = {
3426
+ /**
3427
+ * Close the request stream — signals that no more messages will be sent
3428
+ * (blocking).
3429
+ */ closeSend(): void;
3430
+ /**
3431
+ * Close the request stream (async).
3432
+ */ closeSendAsync(asyncOpts_?: {
3433
+ signal: AbortSignal;
3434
+ }): void;
3435
+ /**
3436
+ * Receive the next response item (blocking).
3437
+ */ recv(): MulticastStreamMessage;
3438
+ /**
3439
+ * Receive the next response item (async).
3440
+ */ recvAsync(asyncOpts_?: {
3441
+ signal: AbortSignal;
3442
+ }): Promise<MulticastStreamMessage>;
3443
+ /**
3444
+ * Send a request message to the stream (blocking).
3445
+ */ send(data: ArrayBuffer): void;
3446
+ /**
3447
+ * Send a request message to the stream (async).
3448
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3449
+ signal: AbortSignal;
3450
+ }): void;
3451
+ };
3452
+ /**
3453
+ * Bidirectional stream handler for multicast stream-to-unary and
3454
+ * stream-to-stream RPC calls.
3455
+ *
3456
+ * Send request messages via [`send`](Self::send) / [`send_async`](Self::send_async),
3457
+ * close the request stream via [`close_send`](Self::close_send), and receive
3458
+ * responses via [`recv`](Self::recv) / [`recv_async`](Self::recv_async). Each
3459
+ * response item carries the source member's identity.
3460
+ */
3461
+ export declare class MulticastBidiStreamHandler extends UniffiAbstractObject implements MulticastBidiStreamHandlerInterface {
3462
+ readonly [uniffiTypeNameSymbol] = "MulticastBidiStreamHandler";
3463
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3464
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3465
+ /**
3466
+ * Close the request stream — signals that no more messages will be sent
3467
+ * (blocking).
3468
+ */ closeSend(): void;
3469
+ /**
3470
+ * Close the request stream (async).
3471
+ */ closeSendAsync(asyncOpts_?: {
3472
+ signal: AbortSignal;
3473
+ }): void;
3474
+ /**
3475
+ * Receive the next response item (blocking).
3476
+ */ recv(): MulticastStreamMessage;
3477
+ /**
3478
+ * Receive the next response item (async).
3479
+ */ recvAsync(asyncOpts_?: {
3480
+ signal: AbortSignal;
3481
+ }): Promise<MulticastStreamMessage>;
3482
+ /**
3483
+ * Send a request message to the stream (blocking).
3484
+ */ send(data: ArrayBuffer): void;
3485
+ /**
3486
+ * Send a request message to the stream (async).
3487
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3488
+ signal: AbortSignal;
3489
+ }): void;
3490
+ /**
3491
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3492
+ */
3493
+ uniffiDestroy(): void;
3494
+ [Symbol.dispose]: () => void;
3495
+ static instanceOf(obj: any): obj is MulticastBidiStreamHandler;
3496
+ }
3497
+ export type MulticastResponseReaderInterface = {
3498
+ /**
3499
+ * Pull the next item from the multicast response stream (blocking).
3500
+ */ next(): MulticastStreamMessage;
3501
+ /**
3502
+ * Pull the next item from the multicast response stream (async).
3503
+ */ nextAsync(asyncOpts_?: {
3504
+ signal: AbortSignal;
3505
+ }): Promise<MulticastStreamMessage>;
3506
+ };
3507
+ /**
3508
+ * Response stream reader for multicast RPC calls.
3509
+ *
3510
+ * Allows pulling `RpcMulticastItem`s from a GROUP response stream one at a
3511
+ * time. Each item carries the source member's identity alongside the payload.
3512
+ */
3513
+ export declare class MulticastResponseReader extends UniffiAbstractObject implements MulticastResponseReaderInterface {
3514
+ readonly [uniffiTypeNameSymbol] = "MulticastResponseReader";
3515
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3516
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3517
+ /**
3518
+ * Pull the next item from the multicast response stream (blocking).
3519
+ */ next(): MulticastStreamMessage;
3520
+ /**
3521
+ * Pull the next item from the multicast response stream (async).
3522
+ */ nextAsync(asyncOpts_?: {
3523
+ signal: AbortSignal;
3524
+ }): Promise<MulticastStreamMessage>;
3525
+ /**
3526
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3527
+ */
3528
+ uniffiDestroy(): void;
3529
+ [Symbol.dispose]: () => void;
3530
+ static instanceOf(obj: any): obj is MulticastResponseReader;
3531
+ }
3532
+ export type RequestStreamInterface = {
3533
+ /**
3534
+ * Pull the next message from the stream (blocking version)
3535
+ *
3536
+ * Returns a StreamMessage indicating the result
3537
+ */ next(): StreamMessage;
3538
+ /**
3539
+ * Pull the next message from the stream (async version)
3540
+ *
3541
+ * Returns a StreamMessage indicating the result
3542
+ */ nextAsync(asyncOpts_?: {
3543
+ signal: AbortSignal;
3544
+ }): Promise<StreamMessage>;
3545
+ };
3546
+ /**
3547
+ * Request stream reader
3548
+ *
3549
+ * Allows pulling messages from a client request stream.
3550
+ * This wraps the underlying async stream and provides a blocking interface
3551
+ * suitable for UniFFI callback traits.
3552
+ */
3553
+ export declare class RequestStream extends UniffiAbstractObject implements RequestStreamInterface {
3554
+ readonly [uniffiTypeNameSymbol] = "RequestStream";
3555
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3556
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3557
+ /**
3558
+ * Pull the next message from the stream (blocking version)
3559
+ *
3560
+ * Returns a StreamMessage indicating the result
3561
+ */ next(): StreamMessage;
3562
+ /**
3563
+ * Pull the next message from the stream (async version)
3564
+ *
3565
+ * Returns a StreamMessage indicating the result
3566
+ */ nextAsync(asyncOpts_?: {
3567
+ signal: AbortSignal;
3568
+ }): Promise<StreamMessage>;
3569
+ /**
3570
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3571
+ */
3572
+ uniffiDestroy(): void;
3573
+ [Symbol.dispose]: () => void;
3574
+ static instanceOf(obj: any): obj is RequestStream;
3575
+ }
3576
+ export type RequestStreamWriterInterface = {
3577
+ /**
3578
+ * Finalize the stream and get the response (async version)
3579
+ *
3580
+ * **Deprecated**: Use [`finalize_stream_async`](Self::finalize_stream_async) instead.
3581
+ */ finalizeAsync(asyncOpts_?: {
3582
+ signal: AbortSignal;
3583
+ }): Promise<ArrayBuffer>;
3584
+ /**
3585
+ * Finalize the stream and get the response (blocking version)
3586
+ */ finalizeStream(): ArrayBuffer;
3587
+ /**
3588
+ * Finalize the stream and get the response (async version)
3589
+ */ finalizeStreamAsync(asyncOpts_?: {
3590
+ signal: AbortSignal;
3591
+ }): Promise<ArrayBuffer>;
3592
+ /**
3593
+ * Send a request message to the stream (blocking version)
3594
+ */ send(data: ArrayBuffer): void;
3595
+ /**
3596
+ * Send a request message to the stream (async version)
3597
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3598
+ signal: AbortSignal;
3599
+ }): void;
3600
+ };
3601
+ /**
3602
+ * Request stream writer for stream-to-unary RPC calls
3603
+ *
3604
+ * Allows sending multiple request messages and getting a final response.
3605
+ */
3606
+ export declare class RequestStreamWriter extends UniffiAbstractObject implements RequestStreamWriterInterface {
3607
+ readonly [uniffiTypeNameSymbol] = "RequestStreamWriter";
3608
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3609
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3610
+ /**
3611
+ * Finalize the stream and get the response (async version)
3612
+ *
3613
+ * **Deprecated**: Use [`finalize_stream_async`](Self::finalize_stream_async) instead.
3614
+ */ finalizeAsync(asyncOpts_?: {
3615
+ signal: AbortSignal;
3616
+ }): Promise<ArrayBuffer>;
3617
+ /**
3618
+ * Finalize the stream and get the response (blocking version)
3619
+ */ finalizeStream(): ArrayBuffer;
3620
+ /**
3621
+ * Finalize the stream and get the response (async version)
3622
+ */ finalizeStreamAsync(asyncOpts_?: {
3623
+ signal: AbortSignal;
3624
+ }): Promise<ArrayBuffer>;
3625
+ /**
3626
+ * Send a request message to the stream (blocking version)
3627
+ */ send(data: ArrayBuffer): void;
3628
+ /**
3629
+ * Send a request message to the stream (async version)
3630
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3631
+ signal: AbortSignal;
3632
+ }): void;
3633
+ /**
3634
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3635
+ */
3636
+ uniffiDestroy(): void;
3637
+ [Symbol.dispose]: () => void;
3638
+ static instanceOf(obj: any): obj is RequestStreamWriter;
3639
+ }
3640
+ export type ResponseSinkInterface = {
3641
+ /**
3642
+ * Close the response stream (blocking version)
3643
+ *
3644
+ * Signals that no more messages will be sent.
3645
+ * The stream will end gracefully.
3646
+ */ close(): void;
3647
+ /**
3648
+ * Close the response stream (async version)
3649
+ *
3650
+ * Signals that no more messages will be sent.
3651
+ * The stream will end gracefully.
3652
+ */ closeAsync(asyncOpts_?: {
3653
+ signal: AbortSignal;
3654
+ }): void;
3655
+ /**
3656
+ * Check if the sink has been closed (blocking version)
3657
+ */ isClosed(): boolean;
3658
+ /**
3659
+ * Check if the sink has been closed (async version)
3660
+ */ isClosedAsync(asyncOpts_?: {
3661
+ signal: AbortSignal;
3662
+ }): Promise<boolean>;
3663
+ /**
3664
+ * Send a message to the response stream (blocking version)
3665
+ *
3666
+ * Returns an error if the stream has been closed or if sending fails.
3667
+ */ send(data: ArrayBuffer): void;
3668
+ /**
3669
+ * Send a message to the response stream (async version)
3670
+ *
3671
+ * Returns an error if the stream has been closed or if sending fails.
3672
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3673
+ signal: AbortSignal;
3674
+ }): void;
3675
+ /**
3676
+ * Send an error to the response stream and close it (blocking version)
3677
+ *
3678
+ * This terminates the stream with an error status.
3679
+ */ sendError(error: RpcError): void;
3680
+ /**
3681
+ * Send an error to the response stream and close it (async version)
3682
+ *
3683
+ * This terminates the stream with an error status.
3684
+ */ sendErrorAsync(error: RpcError, asyncOpts_?: {
3685
+ signal: AbortSignal;
3686
+ }): void;
3687
+ };
3688
+ /**
3689
+ * Response stream writer
3690
+ *
3691
+ * Allows pushing messages to a client response stream.
3692
+ * This wraps an async channel sender and provides a blocking interface
3693
+ * suitable for UniFFI callback traits.
3694
+ */
3695
+ export declare class ResponseSink extends UniffiAbstractObject implements ResponseSinkInterface {
3696
+ readonly [uniffiTypeNameSymbol] = "ResponseSink";
3697
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3698
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3699
+ /**
3700
+ * Close the response stream (blocking version)
3701
+ *
3702
+ * Signals that no more messages will be sent.
3703
+ * The stream will end gracefully.
3704
+ */ close(): void;
3705
+ /**
3706
+ * Close the response stream (async version)
3707
+ *
3708
+ * Signals that no more messages will be sent.
3709
+ * The stream will end gracefully.
3710
+ */ closeAsync(asyncOpts_?: {
3711
+ signal: AbortSignal;
3712
+ }): void;
3713
+ /**
3714
+ * Check if the sink has been closed (blocking version)
3715
+ */ isClosed(): boolean;
3716
+ /**
3717
+ * Check if the sink has been closed (async version)
3718
+ */ isClosedAsync(asyncOpts_?: {
3719
+ signal: AbortSignal;
3720
+ }): Promise<boolean>;
3721
+ /**
3722
+ * Send a message to the response stream (blocking version)
3723
+ *
3724
+ * Returns an error if the stream has been closed or if sending fails.
3725
+ */ send(data: ArrayBuffer): void;
3726
+ /**
3727
+ * Send a message to the response stream (async version)
3728
+ *
3729
+ * Returns an error if the stream has been closed or if sending fails.
3730
+ */ sendAsync(data: ArrayBuffer, asyncOpts_?: {
3731
+ signal: AbortSignal;
3732
+ }): void;
3733
+ /**
3734
+ * Send an error to the response stream and close it (blocking version)
3735
+ *
3736
+ * This terminates the stream with an error status.
3737
+ */ sendError(error: RpcError): void;
3738
+ /**
3739
+ * Send an error to the response stream and close it (async version)
3740
+ *
3741
+ * This terminates the stream with an error status.
3742
+ */ sendErrorAsync(error: RpcError, asyncOpts_?: {
3743
+ signal: AbortSignal;
3744
+ }): void;
3745
+ /**
3746
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3747
+ */
3748
+ uniffiDestroy(): void;
3749
+ [Symbol.dispose]: () => void;
3750
+ static instanceOf(obj: any): obj is ResponseSink;
3751
+ }
3752
+ export type ResponseStreamReaderInterface = {
3753
+ /**
3754
+ * Pull the next message from the response stream (blocking version)
3755
+ *
3756
+ * Returns a StreamMessage indicating the result
3757
+ */ next(): StreamMessage;
3758
+ /**
3759
+ * Pull the next message from the response stream (async version)
3760
+ *
3761
+ * Returns a StreamMessage indicating the result
3762
+ */ nextAsync(asyncOpts_?: {
3763
+ signal: AbortSignal;
3764
+ }): Promise<StreamMessage>;
3765
+ };
3766
+ /**
3767
+ * Response stream reader for unary-to-stream RPC calls
3768
+ *
3769
+ * Allows pulling messages from a server response stream one at a time.
3770
+ */
3771
+ export declare class ResponseStreamReader extends UniffiAbstractObject implements ResponseStreamReaderInterface {
3772
+ readonly [uniffiTypeNameSymbol] = "ResponseStreamReader";
3773
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
3774
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
3775
+ /**
3776
+ * Pull the next message from the response stream (blocking version)
3777
+ *
3778
+ * Returns a StreamMessage indicating the result
3779
+ */ next(): StreamMessage;
3780
+ /**
3781
+ * Pull the next message from the response stream (async version)
3782
+ *
3783
+ * Returns a StreamMessage indicating the result
3784
+ */ nextAsync(asyncOpts_?: {
3785
+ signal: AbortSignal;
3786
+ }): Promise<StreamMessage>;
3787
+ /**
3788
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3789
+ */
3790
+ uniffiDestroy(): void;
3791
+ [Symbol.dispose]: () => void;
3792
+ static instanceOf(obj: any): obj is ResponseStreamReader;
3793
+ }
3794
+ /**
3795
+ * Get detailed build information
3796
+ */
3797
+ export declare function getBuildInfo(): BuildInfo;
3798
+ /**
3799
+ * Get the version of the SLIM bindings (simple string)
3800
+ */
3801
+ export declare function getVersion(): string;
3802
+ /**
3803
+ * Parse and validate a SLIM gRPC client configuration from JSON.
3804
+ *
3805
+ * The JSON must match [`CoreClientConfig`] (same as
3806
+ * `data-plane/core/config/src/grpc/schema/client-config.schema.json`).
3807
+ */
3808
+ export declare function newConfigFromJson(json: string): ClientConfig;
3809
+ /**
3810
+ * Create a new insecure client config (no TLS)
3811
+ */
3812
+ export declare function newInsecureClientConfig(endpoint: string): ClientConfig;
3813
+ /**
3814
+ * Create a new secure client config (TLS enabled with default settings)
3815
+ */
3816
+ export declare function newSecureClientConfig(endpoint: string): ClientConfig;
3817
+ /**
3818
+ * Get the global service instance (creates it if it doesn't exist)
3819
+ *
3820
+ * This returns a reference to the shared global service that can be used
3821
+ * across the application. All calls to this function return the same service instance.
3822
+ */
3823
+ export declare function getGlobalService(): Service;
3824
+ /**
3825
+ * Returns references to all global services.
3826
+ * If not initialized, initializes with defaults first.
3827
+ */
3828
+ export declare function getServices(): Array<Service>;
3829
+ /**
3830
+ * Initialize SLIM bindings from a configuration file
3831
+ *
3832
+ * This function:
3833
+ * 1. Loads the configuration file
3834
+ * 2. Initializes the crypto provider
3835
+ * 3. Sets up tracing/logging exactly as the main SLIM application does
3836
+ * 4. Initializes the global runtime with configuration from the file
3837
+ * 5. Initializes and starts the global service with servers/clients from config
3838
+ *
3839
+ * This must be called before using any SLIM bindings functionality.
3840
+ * It's safe to call multiple times - subsequent calls will be ignored.
3841
+ *
3842
+ * # Arguments
3843
+ * * `config_path` - Path to the YAML configuration file
3844
+ *
3845
+ * # Returns
3846
+ * * `Ok(())` - Successfully initialized
3847
+ * * `Err(SlimError)` - If initialization fails
3848
+ *
3849
+ * # Example
3850
+ * ```ignore
3851
+ * initialize_from_config("/path/to/config.yaml")?;
3852
+ * ```
3853
+ */
3854
+ export declare function initializeFromConfig(configPath: string): void;
3855
+ /**
3856
+ * Initialize SLIM bindings from a configuration file and return errors
3857
+ * instead of panicking.
3858
+ */
3859
+ export declare function initializeFromConfigWithError(configPath: string): void;
3860
+ /**
3861
+ * Initialize SLIM bindings with custom configuration structs
3862
+ *
3863
+ * This function allows you to programmatically configure SLIM bindings by passing
3864
+ * configuration structs directly, without needing a config file.
3865
+ *
3866
+ * # Arguments
3867
+ * * `runtime_config` - Runtime configuration (thread count, naming, etc.)
3868
+ * * `tracing_config` - Tracing/logging configuration
3869
+ * * `service_config` - Service configuration (node ID, group name, etc.)
3870
+ *
3871
+ * # Returns
3872
+ * * `Ok(())` - Successfully initialized
3873
+ * * `Err(SlimError)` - If initialization fails
3874
+ *
3875
+ * # Example
3876
+ * ```ignore
3877
+ * let runtime_config = new_runtime_config();
3878
+ * let tracing_config = new_tracing_config();
3879
+ * let mut service_config = new_service_config();
3880
+ * service_config.node_id = Some("my-node".to_string());
3881
+ *
3882
+ * initialize_with_configs(runtime_config, tracing_config, service_config)?;
3883
+ * ```
3884
+ */
3885
+ export declare function initializeWithConfigs(runtimeConfig: RuntimeConfig, tracingConfig: TracingConfig, serviceConfig: Array<ServiceConfig>): void;
3886
+ /**
3887
+ * Initialize SLIM bindings with default configuration
3888
+ *
3889
+ * This is a convenience function that initializes the bindings with:
3890
+ * - Default runtime configuration
3891
+ * - Default tracing/logging configuration
3892
+ * - Initialized crypto provider
3893
+ * - Default global service (no servers/clients)
3894
+ *
3895
+ * Use `initialize_from_config` for file-based configuration or
3896
+ * `initialize_with_configs` for programmatic configuration.
3897
+ */
3898
+ export declare function initializeWithDefaults(): void;
3899
+ /**
3900
+ * Check if SLIM bindings have been initialized
3901
+ */
3902
+ export declare function isInitialized(): boolean;
3903
+ /**
3904
+ * Perform graceful shutdown operations (blocking version)
3905
+ *
3906
+ * This is a blocking wrapper around the async `shutdown()` function for use from
3907
+ * synchronous contexts or language bindings that don't support async.
3908
+ *
3909
+ * # Returns
3910
+ * * `Ok(())` - Successfully shut down
3911
+ * * `Err(SlimError)` - If shutdown fails
3912
+ */
3913
+ export declare function shutdownBlocking(): void;
3914
+ /**
3915
+ * Create a new BindingsRuntimeConfig with default values
3916
+ */
3917
+ export declare function newRuntimeConfig(): RuntimeConfig;
3918
+ /**
3919
+ * Create a new BindingsRuntimeConfig with custom values
3920
+ */
3921
+ export declare function newRuntimeConfigWith(nCores: bigint, threadName: string, drainTimeout: number): RuntimeConfig;
3922
+ /**
3923
+ * Create a new BindingsServiceConfig with default values
3924
+ */
3925
+ export declare function newServiceConfig(): ServiceConfig;
3926
+ /**
3927
+ * Create a new BindingsServiceConfig with custom values
3928
+ */
3929
+ export declare function newServiceConfigWith(nodeId: string | undefined, groupName: string | undefined, dataplane: DataplaneConfig): ServiceConfig;
3930
+ /**
3931
+ * Create a new BindingsTracingConfig with default values
3932
+ */
3933
+ export declare function newTracingConfig(): TracingConfig;
3934
+ /**
3935
+ * Create a new BindingsTracingConfig with custom values
3936
+ */
3937
+ export declare function newTracingConfigWith(logLevel: string, displayThreadNames: boolean, displayThreadIds: boolean, filters: Array<string>): TracingConfig;
3938
+ /**
3939
+ * Create a new insecure server config (no TLS)
3940
+ */
3941
+ export declare function newInsecureServerConfig(endpoint: string): ServerConfig;
3942
+ /**
3943
+ * Create a new secure server config (TLS enabled with the given certificate source)
3944
+ */
3945
+ export declare function newSecureServerConfig(endpoint: string, tlsSource: TlsSource): ServerConfig;
3946
+ /**
3947
+ * Create a new server config with the given endpoint and default values
3948
+ */
3949
+ export declare function newServerConfig(endpoint: string): ServerConfig;
3950
+ /**
3951
+ * Create a new Service with builder pattern
3952
+ */
3953
+ export declare function createService(name: string): Service;
3954
+ /**
3955
+ * Create a new Service with configuration
3956
+ */
3957
+ export declare function createServiceWithConfig(name: string, config: ServiceConfig): Service;
3958
+ /**
3959
+ * Create a new DataplaneConfig
3960
+ */
3961
+ export declare function newDataplaneConfig(): DataplaneConfig;
3962
+ /**
3963
+ * Create a new ServiceConfiguration
3964
+ */
3965
+ export declare function newServiceConfiguration(): ServiceConfig;