@minip2p/react-native 0.7.2 → 0.7.4

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.
Files changed (44) hide show
  1. package/android/CMakeLists.txt +1 -0
  2. package/android/src/main/jniLibs/arm64-v8a/libminip2p_ffi.so +0 -0
  3. package/android/src/main/jniLibs/x86_64/libminip2p_ffi.so +0 -0
  4. package/build/Minip2pFfi.xcframework/Info.plist +4 -4
  5. package/build/Minip2pFfi.xcframework/ios-arm64/libminip2p_ffi.a +2 -2
  6. package/build/Minip2pFfi.xcframework/ios-arm64-simulator/libminip2p_ffi.a +2 -2
  7. package/cpp/generated/minip2p_ffi_core.cpp +1999 -0
  8. package/cpp/generated/minip2p_ffi_core.hpp +51 -0
  9. package/cpp/react-native-minip2p.cpp +2 -0
  10. package/lib/module/adapter.js +64 -61
  11. package/lib/module/adapter.js.map +1 -1
  12. package/lib/module/generated/minip2p_ffi.js +47 -3284
  13. package/lib/module/generated/minip2p_ffi.js.map +1 -1
  14. package/lib/module/generated/minip2p_ffi_core-ffi.js +20 -0
  15. package/lib/module/generated/minip2p_ffi_core-ffi.js.map +1 -0
  16. package/lib/module/generated/minip2p_ffi_core.js +3342 -0
  17. package/lib/module/generated/minip2p_ffi_core.js.map +1 -0
  18. package/lib/module/low-level.js +1 -0
  19. package/lib/module/low-level.js.map +1 -1
  20. package/lib/module/native.js +5 -1
  21. package/lib/module/native.js.map +1 -1
  22. package/lib/typescript/src/adapter.d.ts.map +1 -1
  23. package/lib/typescript/src/generated/minip2p_ffi.d.ts +2 -3394
  24. package/lib/typescript/src/generated/minip2p_ffi.d.ts.map +1 -1
  25. package/lib/typescript/src/generated/minip2p_ffi_core-ffi.d.ts +67 -0
  26. package/lib/typescript/src/generated/minip2p_ffi_core-ffi.d.ts.map +1 -0
  27. package/lib/typescript/src/generated/minip2p_ffi_core.d.ts +3417 -0
  28. package/lib/typescript/src/generated/minip2p_ffi_core.d.ts.map +1 -0
  29. package/lib/typescript/src/low-level.d.ts +1 -0
  30. package/lib/typescript/src/low-level.d.ts.map +1 -1
  31. package/lib/typescript/src/native.d.ts +3 -0
  32. package/lib/typescript/src/native.d.ts.map +1 -1
  33. package/package.json +4 -4
  34. package/src/adapter.ts +85 -67
  35. package/src/generated/minip2p_ffi.ts +36 -3860
  36. package/src/generated/minip2p_ffi_core-ffi.ts +97 -0
  37. package/src/generated/minip2p_ffi_core.ts +3939 -0
  38. package/src/low-level.ts +1 -0
  39. package/src/native.tsx +4 -0
  40. package/lib/module/event-drain.js +0 -71
  41. package/lib/module/event-drain.js.map +0 -1
  42. package/lib/typescript/src/event-drain.d.ts +0 -10
  43. package/lib/typescript/src/event-drain.d.ts.map +0 -1
  44. package/src/event-drain.ts +0 -80
@@ -0,0 +1,3417 @@
1
+ import { type UniffiByteArray, Cursor, uniffiTypeNameSymbol } from "@ubjs/core";
2
+ /**
3
+ * State snapshot of the transport connection selected for a peer.
4
+ */
5
+ export type ConnectionInfo = {
6
+ /**
7
+ * Endpoint-local transport connection id.
8
+ */
9
+ connId: bigint;
10
+ /**
11
+ * Remote transport address, when recorded.
12
+ */
13
+ remoteAddr?: string;
14
+ /**
15
+ * Protocols this connection advertised through Identify, once it is
16
+ * ready (`PeerReady` for this `conn_id`); `None` until then. Readiness,
17
+ * connection and protocols come from one snapshot, so a ready wait can
18
+ * trust them together.
19
+ */
20
+ readyProtocols?: Array<string>;
21
+ };
22
+ /**
23
+ * Generated factory for {@link ConnectionInfo} record objects.
24
+ */
25
+ export declare const ConnectionInfo: Readonly<{
26
+ create: (partial: Partial<ConnectionInfo> & Required<Omit<ConnectionInfo, "readyProtocols" | "remoteAddr">>) => ConnectionInfo;
27
+ new: (partial: Partial<ConnectionInfo> & Required<Omit<ConnectionInfo, "readyProtocols" | "remoteAddr">>) => ConnectionInfo;
28
+ defaults: () => Partial<ConnectionInfo>;
29
+ }>;
30
+ /**
31
+ * Signed-discovery configuration.
32
+ */
33
+ export type DiscoveryOptions = {
34
+ /**
35
+ * Pubsub topic carrying signed discovery beacons.
36
+ */
37
+ topic: string;
38
+ /**
39
+ * Milliseconds between local beacon announcements.
40
+ */
41
+ beaconIntervalMs: bigint;
42
+ /**
43
+ * Milliseconds before a signed peer observation expires.
44
+ */
45
+ peerTtlMs: bigint;
46
+ /**
47
+ * Whether accepted observations may trigger automatic dials.
48
+ */
49
+ autoDial: boolean;
50
+ };
51
+ /**
52
+ * Generated factory for {@link DiscoveryOptions} record objects.
53
+ */
54
+ export declare const DiscoveryOptions: Readonly<{
55
+ create: (partial: Partial<DiscoveryOptions> & Required<Omit<DiscoveryOptions, never>>) => DiscoveryOptions;
56
+ new: (partial: Partial<DiscoveryOptions> & Required<Omit<DiscoveryOptions, never>>) => DiscoveryOptions;
57
+ defaults: () => Partial<DiscoveryOptions>;
58
+ }>;
59
+ /**
60
+ * Local-link mDNS discovery configuration.
61
+ */
62
+ export type MdnsOptions = {
63
+ /**
64
+ * Whether IPv6 interfaces and advertisements are enabled.
65
+ */
66
+ enableIpv6: boolean;
67
+ /**
68
+ * Positive record lifetime advertised on the wire, in milliseconds.
69
+ */
70
+ ttlMs: bigint;
71
+ /**
72
+ * Steady-state query interval, in milliseconds.
73
+ */
74
+ queryIntervalMs: bigint;
75
+ /**
76
+ * Maximum DNS/UDP payload emitted by the encoder.
77
+ */
78
+ maxPacketBytes: number;
79
+ /**
80
+ * Maximum local addresses announced in one response burst.
81
+ */
82
+ maxAnnouncedAddrs: number;
83
+ /**
84
+ * Interface re-enumeration interval, in milliseconds.
85
+ */
86
+ interfaceRefreshMs: bigint;
87
+ /**
88
+ * Maximum blocking wait before polling mDNS sockets again.
89
+ */
90
+ socketPollIntervalMs: bigint;
91
+ /**
92
+ * Whether accepted mDNS observations may trigger automatic dials.
93
+ */
94
+ autoDial: boolean;
95
+ };
96
+ /**
97
+ * Generated factory for {@link MdnsOptions} record objects.
98
+ */
99
+ export declare const MdnsOptions: Readonly<{
100
+ create: (partial: Partial<MdnsOptions> & Required<Omit<MdnsOptions, never>>) => MdnsOptions;
101
+ new: (partial: Partial<MdnsOptions> & Required<Omit<MdnsOptions, never>>) => MdnsOptions;
102
+ defaults: () => Partial<MdnsOptions>;
103
+ }>;
104
+ /**
105
+ * Configuration used to construct an FFI endpoint.
106
+ */
107
+ export type EndpointConfig = {
108
+ /**
109
+ * Identify agent version, or the crate-derived default when absent.
110
+ */
111
+ agentVersion?: string;
112
+ /**
113
+ * Relay peer addresses.
114
+ */
115
+ relays: Array<string>;
116
+ /**
117
+ * AutoNAT server peer addresses.
118
+ */
119
+ autonatServers: Array<string>;
120
+ /**
121
+ * Listen multiaddresses; each address's shape selects its transport
122
+ * (`/udp/<port>/quic-v1` or `/tcp/<port>`).
123
+ *
124
+ * Absent binds the QUIC dual-stack defaults (`/ip4/0.0.0.0/udp/0/quic-v1`
125
+ * and `/ip6/::/udp/0/quic-v1`). An explicit empty list is rejected.
126
+ */
127
+ listen?: Array<string>;
128
+ /**
129
+ * Whether connection attempts must remain relayed.
130
+ */
131
+ forceRelay: boolean;
132
+ /**
133
+ * Whether unsigned pubsub messages are accepted.
134
+ */
135
+ allowUnsigned: boolean;
136
+ /**
137
+ * Application protocol ids registered before the endpoint starts.
138
+ */
139
+ protocols: Array<string>;
140
+ /**
141
+ * Signed-discovery settings, or no discovery when absent.
142
+ */
143
+ discovery?: DiscoveryOptions;
144
+ /**
145
+ * Local-link mDNS settings, or no mDNS discovery when absent.
146
+ */
147
+ mdns?: MdnsOptions;
148
+ };
149
+ /**
150
+ * Generated factory for {@link EndpointConfig} record objects.
151
+ */
152
+ export declare const EndpointConfig: Readonly<{
153
+ create: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "listen" | "mdns">>) => EndpointConfig;
154
+ new: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "listen" | "mdns">>) => EndpointConfig;
155
+ defaults: () => Partial<EndpointConfig>;
156
+ }>;
157
+ /**
158
+ * Foreign-friendly snapshot of a peer's Identify message.
159
+ */
160
+ export type IdentifyInfo = {
161
+ /**
162
+ * Protobuf-encoded libp2p public key, when supplied.
163
+ */
164
+ publicKey?: ArrayBuffer;
165
+ /**
166
+ * Listen addresses advertised by the peer.
167
+ */
168
+ listenAddrs: Array<string>;
169
+ /**
170
+ * Protocol ids advertised by the peer.
171
+ */
172
+ protocols: Array<string>;
173
+ /**
174
+ * Address the peer observed for this endpoint, when supplied.
175
+ */
176
+ observedAddr?: string;
177
+ /**
178
+ * Remote libp2p protocol version, when supplied.
179
+ */
180
+ protocolVersion?: string;
181
+ /**
182
+ * Remote agent version, when supplied.
183
+ */
184
+ agentVersion?: string;
185
+ };
186
+ /**
187
+ * Generated factory for {@link IdentifyInfo} record objects.
188
+ */
189
+ export declare const IdentifyInfo: Readonly<{
190
+ create: (partial: Partial<IdentifyInfo> & Required<Omit<IdentifyInfo, "agentVersion" | "observedAddr" | "protocolVersion" | "publicKey">>) => IdentifyInfo;
191
+ new: (partial: Partial<IdentifyInfo> & Required<Omit<IdentifyInfo, "agentVersion" | "observedAddr" | "protocolVersion" | "publicKey">>) => IdentifyInfo;
192
+ defaults: () => Partial<IdentifyInfo>;
193
+ }>;
194
+ /**
195
+ * One peer in the shared discovery address book.
196
+ */
197
+ export type KnownPeerInfo = {
198
+ /**
199
+ * Discovered peer.
200
+ */
201
+ peerId: string;
202
+ /**
203
+ * Merged dial-order addresses.
204
+ */
205
+ addrs: Array<string>;
206
+ /**
207
+ * Addresses authenticated by signed beacons.
208
+ */
209
+ beaconAddrs: Array<string>;
210
+ /**
211
+ * Addresses learned from unauthenticated mDNS.
212
+ */
213
+ mdnsAddrs: Array<string>;
214
+ /**
215
+ * Age of the most recent signed beacon.
216
+ */
217
+ beaconLastSeenAgeMs?: bigint;
218
+ /**
219
+ * Age of the most recent mDNS observation.
220
+ */
221
+ mdnsLastSeenAgeMs?: bigint;
222
+ /**
223
+ * Whether the endpoint currently has a connection to this peer.
224
+ */
225
+ connected: boolean;
226
+ };
227
+ /**
228
+ * Generated factory for {@link KnownPeerInfo} record objects.
229
+ */
230
+ export declare const KnownPeerInfo: Readonly<{
231
+ create: (partial: Partial<KnownPeerInfo> & Required<Omit<KnownPeerInfo, "beaconLastSeenAgeMs" | "mdnsLastSeenAgeMs">>) => KnownPeerInfo;
232
+ new: (partial: Partial<KnownPeerInfo> & Required<Omit<KnownPeerInfo, "beaconLastSeenAgeMs" | "mdnsLastSeenAgeMs">>) => KnownPeerInfo;
233
+ defaults: () => Partial<KnownPeerInfo>;
234
+ }>;
235
+ /**
236
+ * Full identity allocated for an outbound application stream.
237
+ */
238
+ export type OpenStreamResult = {
239
+ /**
240
+ * Transport connection carrying the stream.
241
+ */
242
+ connId: bigint;
243
+ /**
244
+ * Opaque stream id.
245
+ */
246
+ streamId: bigint;
247
+ };
248
+ /**
249
+ * Generated factory for {@link OpenStreamResult} record objects.
250
+ */
251
+ export declare const OpenStreamResult: Readonly<{
252
+ create: (partial: Partial<OpenStreamResult> & Required<Omit<OpenStreamResult, never>>) => OpenStreamResult;
253
+ new: (partial: Partial<OpenStreamResult> & Required<Omit<OpenStreamResult, never>>) => OpenStreamResult;
254
+ defaults: () => Partial<OpenStreamResult>;
255
+ }>;
256
+ /**
257
+ * Snapshot of the active inbound relay reservation.
258
+ */
259
+ export type RelayReservationInfo = {
260
+ /**
261
+ * Relay holding the reservation.
262
+ */
263
+ relayPeerId: string;
264
+ /**
265
+ * Absolute relay-reported expiry, when present.
266
+ */
267
+ expiresUnixSecs?: bigint;
268
+ };
269
+ /**
270
+ * Generated factory for {@link RelayReservationInfo} record objects.
271
+ */
272
+ export declare const RelayReservationInfo: Readonly<{
273
+ create: (partial: Partial<RelayReservationInfo> & Required<Omit<RelayReservationInfo, "expiresUnixSecs">>) => RelayReservationInfo;
274
+ new: (partial: Partial<RelayReservationInfo> & Required<Omit<RelayReservationInfo, "expiresUnixSecs">>) => RelayReservationInfo;
275
+ defaults: () => Partial<RelayReservationInfo>;
276
+ }>;
277
+ export declare enum ConnectTarget_Tags {
278
+ Peer = "Peer",
279
+ Addresses = "Addresses"
280
+ }
281
+ /**
282
+ * What a foreign runtime supplies to start one Connection attempt.
283
+ *
284
+ * Validation for every form lives in this module, once; binding shells only
285
+ * adapt the shape to their toolchain.
286
+ */
287
+ export declare const ConnectTarget: Readonly<{
288
+ instanceOf: (obj: any) => obj is ConnectTarget;
289
+ Peer: {
290
+ new (inner: {
291
+ peerId: string;
292
+ }): {
293
+ /**
294
+ * @private
295
+ * This field is private and should not be used, use `tag` instead.
296
+ */
297
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
298
+ readonly tag: ConnectTarget_Tags.Peer;
299
+ readonly inner: Readonly<{
300
+ peerId: string;
301
+ }>;
302
+ };
303
+ "new"(inner: {
304
+ peerId: string;
305
+ }): {
306
+ /**
307
+ * @private
308
+ * This field is private and should not be used, use `tag` instead.
309
+ */
310
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
311
+ readonly tag: ConnectTarget_Tags.Peer;
312
+ readonly inner: Readonly<{
313
+ peerId: string;
314
+ }>;
315
+ };
316
+ instanceOf(obj: any): obj is {
317
+ /**
318
+ * @private
319
+ * This field is private and should not be used, use `tag` instead.
320
+ */
321
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
322
+ readonly tag: ConnectTarget_Tags.Peer;
323
+ readonly inner: Readonly<{
324
+ peerId: string;
325
+ }>;
326
+ };
327
+ };
328
+ Addresses: {
329
+ new (inner: {
330
+ addresses: Array<string>;
331
+ }): {
332
+ /**
333
+ * @private
334
+ * This field is private and should not be used, use `tag` instead.
335
+ */
336
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
337
+ readonly tag: ConnectTarget_Tags.Addresses;
338
+ readonly inner: Readonly<{
339
+ addresses: Array<string>;
340
+ }>;
341
+ };
342
+ "new"(inner: {
343
+ addresses: Array<string>;
344
+ }): {
345
+ /**
346
+ * @private
347
+ * This field is private and should not be used, use `tag` instead.
348
+ */
349
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
350
+ readonly tag: ConnectTarget_Tags.Addresses;
351
+ readonly inner: Readonly<{
352
+ addresses: Array<string>;
353
+ }>;
354
+ };
355
+ instanceOf(obj: any): obj is {
356
+ /**
357
+ * @private
358
+ * This field is private and should not be used, use `tag` instead.
359
+ */
360
+ readonly [uniffiTypeNameSymbol]: "ConnectTarget";
361
+ readonly tag: ConnectTarget_Tags.Addresses;
362
+ readonly inner: Readonly<{
363
+ addresses: Array<string>;
364
+ }>;
365
+ };
366
+ };
367
+ }>;
368
+ /**
369
+ * What a foreign runtime supplies to start one Connection attempt.
370
+ *
371
+ * Validation for every form lives in this module, once; binding shells only
372
+ * adapt the shape to their toolchain.
373
+ */
374
+ export type ConnectTarget = InstanceType<typeof ConnectTarget['Peer' | 'Addresses']>;
375
+ /**
376
+ * Source that contributed a discovery observation.
377
+ */
378
+ export declare enum DiscoverySource {
379
+ /**
380
+ * Public-key-authenticated signed beacon.
381
+ */
382
+ SignedBeacon = 0,
383
+ /**
384
+ * Unauthenticated local-link mDNS observation.
385
+ */
386
+ Mdns = 1
387
+ }
388
+ /**
389
+ * Category of a fatal background-driver failure.
390
+ */
391
+ export declare enum DriverFailureKind {
392
+ /**
393
+ * The transport driver failed.
394
+ */
395
+ Transport = 0,
396
+ /**
397
+ * The swarm driver failed.
398
+ */
399
+ Swarm = 1,
400
+ /**
401
+ * An internal driver invariant failed.
402
+ */
403
+ Invariant = 2,
404
+ /**
405
+ * The background pump panicked.
406
+ */
407
+ Panic = 3
408
+ }
409
+ /**
410
+ * Category of a non-fatal endpoint runtime error.
411
+ */
412
+ export declare enum EndpointErrorKind {
413
+ /**
414
+ * Underlying transport operation failed.
415
+ */
416
+ Transport = 0,
417
+ /**
418
+ * Multistream negotiation failed.
419
+ */
420
+ Multistream = 1,
421
+ /**
422
+ * Identify protocol failed.
423
+ */
424
+ Identify = 2,
425
+ /**
426
+ * Ping protocol failed.
427
+ */
428
+ Ping = 3,
429
+ /**
430
+ * Identify stream setup was rejected.
431
+ */
432
+ IdentifyStreamRejected = 4,
433
+ /**
434
+ * Outbound stream opening failed.
435
+ */
436
+ OpenStreamFailed = 5,
437
+ /**
438
+ * The remote does not support a requested protocol.
439
+ */
440
+ UnsupportedProtocol = 6,
441
+ /**
442
+ * The swarm driver contract failed.
443
+ */
444
+ Driver = 7
445
+ }
446
+ export declare enum FfiError_Tags {
447
+ AlreadyStarted = "AlreadyStarted",
448
+ Stopped = "Stopped",
449
+ InvalidConfig = "InvalidConfig",
450
+ InvalidKey = "InvalidKey",
451
+ InvalidPeerId = "InvalidPeerId",
452
+ InvalidAddress = "InvalidAddress",
453
+ InvalidTopic = "InvalidTopic",
454
+ NotPermitted = "NotPermitted",
455
+ Backpressure = "Backpressure",
456
+ MessageTooLarge = "MessageTooLarge",
457
+ Transport = "Transport",
458
+ InvalidState = "InvalidState",
459
+ Internal = "Internal"
460
+ }
461
+ /**
462
+ * An error returned by a synchronous FFI operation.
463
+ */
464
+ export declare const FfiError: Readonly<{
465
+ instanceOf: (obj: any) => obj is FfiError;
466
+ AlreadyStarted: {
467
+ new (): {
468
+ /**
469
+ * @private
470
+ * This field is private and should not be used, use `tag` instead.
471
+ */
472
+ readonly [uniffiTypeNameSymbol]: "FfiError";
473
+ readonly tag: FfiError_Tags.AlreadyStarted;
474
+ name: string;
475
+ message: string;
476
+ stack?: string;
477
+ cause?: unknown;
478
+ };
479
+ "new"(): {
480
+ /**
481
+ * @private
482
+ * This field is private and should not be used, use `tag` instead.
483
+ */
484
+ readonly [uniffiTypeNameSymbol]: "FfiError";
485
+ readonly tag: FfiError_Tags.AlreadyStarted;
486
+ name: string;
487
+ message: string;
488
+ stack?: string;
489
+ cause?: unknown;
490
+ };
491
+ instanceOf(obj: any): obj is {
492
+ /**
493
+ * @private
494
+ * This field is private and should not be used, use `tag` instead.
495
+ */
496
+ readonly [uniffiTypeNameSymbol]: "FfiError";
497
+ readonly tag: FfiError_Tags.AlreadyStarted;
498
+ name: string;
499
+ message: string;
500
+ stack?: string;
501
+ cause?: unknown;
502
+ };
503
+ hasInner(obj: any): obj is {
504
+ /**
505
+ * @private
506
+ * This field is private and should not be used, use `tag` instead.
507
+ */
508
+ readonly [uniffiTypeNameSymbol]: "FfiError";
509
+ readonly tag: FfiError_Tags.AlreadyStarted;
510
+ name: string;
511
+ message: string;
512
+ stack?: string;
513
+ cause?: unknown;
514
+ };
515
+ isError(error: unknown): error is Error;
516
+ };
517
+ Stopped: {
518
+ new (): {
519
+ /**
520
+ * @private
521
+ * This field is private and should not be used, use `tag` instead.
522
+ */
523
+ readonly [uniffiTypeNameSymbol]: "FfiError";
524
+ readonly tag: FfiError_Tags.Stopped;
525
+ name: string;
526
+ message: string;
527
+ stack?: string;
528
+ cause?: unknown;
529
+ };
530
+ "new"(): {
531
+ /**
532
+ * @private
533
+ * This field is private and should not be used, use `tag` instead.
534
+ */
535
+ readonly [uniffiTypeNameSymbol]: "FfiError";
536
+ readonly tag: FfiError_Tags.Stopped;
537
+ name: string;
538
+ message: string;
539
+ stack?: string;
540
+ cause?: unknown;
541
+ };
542
+ instanceOf(obj: any): obj is {
543
+ /**
544
+ * @private
545
+ * This field is private and should not be used, use `tag` instead.
546
+ */
547
+ readonly [uniffiTypeNameSymbol]: "FfiError";
548
+ readonly tag: FfiError_Tags.Stopped;
549
+ name: string;
550
+ message: string;
551
+ stack?: string;
552
+ cause?: unknown;
553
+ };
554
+ hasInner(obj: any): obj is {
555
+ /**
556
+ * @private
557
+ * This field is private and should not be used, use `tag` instead.
558
+ */
559
+ readonly [uniffiTypeNameSymbol]: "FfiError";
560
+ readonly tag: FfiError_Tags.Stopped;
561
+ name: string;
562
+ message: string;
563
+ stack?: string;
564
+ cause?: unknown;
565
+ };
566
+ isError(error: unknown): error is Error;
567
+ };
568
+ InvalidConfig: {
569
+ new (inner: {
570
+ detail: string;
571
+ }): {
572
+ /**
573
+ * @private
574
+ * This field is private and should not be used, use `tag` instead.
575
+ */
576
+ readonly [uniffiTypeNameSymbol]: "FfiError";
577
+ readonly tag: FfiError_Tags.InvalidConfig;
578
+ readonly inner: Readonly<{
579
+ detail: string;
580
+ }>;
581
+ name: string;
582
+ message: string;
583
+ stack?: string;
584
+ cause?: unknown;
585
+ };
586
+ "new"(inner: {
587
+ detail: string;
588
+ }): {
589
+ /**
590
+ * @private
591
+ * This field is private and should not be used, use `tag` instead.
592
+ */
593
+ readonly [uniffiTypeNameSymbol]: "FfiError";
594
+ readonly tag: FfiError_Tags.InvalidConfig;
595
+ readonly inner: Readonly<{
596
+ detail: string;
597
+ }>;
598
+ name: string;
599
+ message: string;
600
+ stack?: string;
601
+ cause?: unknown;
602
+ };
603
+ instanceOf(obj: any): obj is {
604
+ /**
605
+ * @private
606
+ * This field is private and should not be used, use `tag` instead.
607
+ */
608
+ readonly [uniffiTypeNameSymbol]: "FfiError";
609
+ readonly tag: FfiError_Tags.InvalidConfig;
610
+ readonly inner: Readonly<{
611
+ detail: string;
612
+ }>;
613
+ name: string;
614
+ message: string;
615
+ stack?: string;
616
+ cause?: unknown;
617
+ };
618
+ hasInner(obj: any): obj is {
619
+ /**
620
+ * @private
621
+ * This field is private and should not be used, use `tag` instead.
622
+ */
623
+ readonly [uniffiTypeNameSymbol]: "FfiError";
624
+ readonly tag: FfiError_Tags.InvalidConfig;
625
+ readonly inner: Readonly<{
626
+ detail: string;
627
+ }>;
628
+ name: string;
629
+ message: string;
630
+ stack?: string;
631
+ cause?: unknown;
632
+ };
633
+ getInner(obj: {
634
+ /**
635
+ * @private
636
+ * This field is private and should not be used, use `tag` instead.
637
+ */
638
+ readonly [uniffiTypeNameSymbol]: "FfiError";
639
+ readonly tag: FfiError_Tags.InvalidConfig;
640
+ readonly inner: Readonly<{
641
+ detail: string;
642
+ }>;
643
+ name: string;
644
+ message: string;
645
+ stack?: string;
646
+ cause?: unknown;
647
+ }): Readonly<{
648
+ detail: string;
649
+ }>;
650
+ isError(error: unknown): error is Error;
651
+ };
652
+ InvalidKey: {
653
+ new (inner: {
654
+ detail: string;
655
+ }): {
656
+ /**
657
+ * @private
658
+ * This field is private and should not be used, use `tag` instead.
659
+ */
660
+ readonly [uniffiTypeNameSymbol]: "FfiError";
661
+ readonly tag: FfiError_Tags.InvalidKey;
662
+ readonly inner: Readonly<{
663
+ detail: string;
664
+ }>;
665
+ name: string;
666
+ message: string;
667
+ stack?: string;
668
+ cause?: unknown;
669
+ };
670
+ "new"(inner: {
671
+ detail: string;
672
+ }): {
673
+ /**
674
+ * @private
675
+ * This field is private and should not be used, use `tag` instead.
676
+ */
677
+ readonly [uniffiTypeNameSymbol]: "FfiError";
678
+ readonly tag: FfiError_Tags.InvalidKey;
679
+ readonly inner: Readonly<{
680
+ detail: string;
681
+ }>;
682
+ name: string;
683
+ message: string;
684
+ stack?: string;
685
+ cause?: unknown;
686
+ };
687
+ instanceOf(obj: any): obj is {
688
+ /**
689
+ * @private
690
+ * This field is private and should not be used, use `tag` instead.
691
+ */
692
+ readonly [uniffiTypeNameSymbol]: "FfiError";
693
+ readonly tag: FfiError_Tags.InvalidKey;
694
+ readonly inner: Readonly<{
695
+ detail: string;
696
+ }>;
697
+ name: string;
698
+ message: string;
699
+ stack?: string;
700
+ cause?: unknown;
701
+ };
702
+ hasInner(obj: any): obj is {
703
+ /**
704
+ * @private
705
+ * This field is private and should not be used, use `tag` instead.
706
+ */
707
+ readonly [uniffiTypeNameSymbol]: "FfiError";
708
+ readonly tag: FfiError_Tags.InvalidKey;
709
+ readonly inner: Readonly<{
710
+ detail: string;
711
+ }>;
712
+ name: string;
713
+ message: string;
714
+ stack?: string;
715
+ cause?: unknown;
716
+ };
717
+ getInner(obj: {
718
+ /**
719
+ * @private
720
+ * This field is private and should not be used, use `tag` instead.
721
+ */
722
+ readonly [uniffiTypeNameSymbol]: "FfiError";
723
+ readonly tag: FfiError_Tags.InvalidKey;
724
+ readonly inner: Readonly<{
725
+ detail: string;
726
+ }>;
727
+ name: string;
728
+ message: string;
729
+ stack?: string;
730
+ cause?: unknown;
731
+ }): Readonly<{
732
+ detail: string;
733
+ }>;
734
+ isError(error: unknown): error is Error;
735
+ };
736
+ InvalidPeerId: {
737
+ new (inner: {
738
+ detail: string;
739
+ }): {
740
+ /**
741
+ * @private
742
+ * This field is private and should not be used, use `tag` instead.
743
+ */
744
+ readonly [uniffiTypeNameSymbol]: "FfiError";
745
+ readonly tag: FfiError_Tags.InvalidPeerId;
746
+ readonly inner: Readonly<{
747
+ detail: string;
748
+ }>;
749
+ name: string;
750
+ message: string;
751
+ stack?: string;
752
+ cause?: unknown;
753
+ };
754
+ "new"(inner: {
755
+ detail: string;
756
+ }): {
757
+ /**
758
+ * @private
759
+ * This field is private and should not be used, use `tag` instead.
760
+ */
761
+ readonly [uniffiTypeNameSymbol]: "FfiError";
762
+ readonly tag: FfiError_Tags.InvalidPeerId;
763
+ readonly inner: Readonly<{
764
+ detail: string;
765
+ }>;
766
+ name: string;
767
+ message: string;
768
+ stack?: string;
769
+ cause?: unknown;
770
+ };
771
+ instanceOf(obj: any): obj is {
772
+ /**
773
+ * @private
774
+ * This field is private and should not be used, use `tag` instead.
775
+ */
776
+ readonly [uniffiTypeNameSymbol]: "FfiError";
777
+ readonly tag: FfiError_Tags.InvalidPeerId;
778
+ readonly inner: Readonly<{
779
+ detail: string;
780
+ }>;
781
+ name: string;
782
+ message: string;
783
+ stack?: string;
784
+ cause?: unknown;
785
+ };
786
+ hasInner(obj: any): obj is {
787
+ /**
788
+ * @private
789
+ * This field is private and should not be used, use `tag` instead.
790
+ */
791
+ readonly [uniffiTypeNameSymbol]: "FfiError";
792
+ readonly tag: FfiError_Tags.InvalidPeerId;
793
+ readonly inner: Readonly<{
794
+ detail: string;
795
+ }>;
796
+ name: string;
797
+ message: string;
798
+ stack?: string;
799
+ cause?: unknown;
800
+ };
801
+ getInner(obj: {
802
+ /**
803
+ * @private
804
+ * This field is private and should not be used, use `tag` instead.
805
+ */
806
+ readonly [uniffiTypeNameSymbol]: "FfiError";
807
+ readonly tag: FfiError_Tags.InvalidPeerId;
808
+ readonly inner: Readonly<{
809
+ detail: string;
810
+ }>;
811
+ name: string;
812
+ message: string;
813
+ stack?: string;
814
+ cause?: unknown;
815
+ }): Readonly<{
816
+ detail: string;
817
+ }>;
818
+ isError(error: unknown): error is Error;
819
+ };
820
+ InvalidAddress: {
821
+ new (inner: {
822
+ detail: string;
823
+ }): {
824
+ /**
825
+ * @private
826
+ * This field is private and should not be used, use `tag` instead.
827
+ */
828
+ readonly [uniffiTypeNameSymbol]: "FfiError";
829
+ readonly tag: FfiError_Tags.InvalidAddress;
830
+ readonly inner: Readonly<{
831
+ detail: string;
832
+ }>;
833
+ name: string;
834
+ message: string;
835
+ stack?: string;
836
+ cause?: unknown;
837
+ };
838
+ "new"(inner: {
839
+ detail: string;
840
+ }): {
841
+ /**
842
+ * @private
843
+ * This field is private and should not be used, use `tag` instead.
844
+ */
845
+ readonly [uniffiTypeNameSymbol]: "FfiError";
846
+ readonly tag: FfiError_Tags.InvalidAddress;
847
+ readonly inner: Readonly<{
848
+ detail: string;
849
+ }>;
850
+ name: string;
851
+ message: string;
852
+ stack?: string;
853
+ cause?: unknown;
854
+ };
855
+ instanceOf(obj: any): obj is {
856
+ /**
857
+ * @private
858
+ * This field is private and should not be used, use `tag` instead.
859
+ */
860
+ readonly [uniffiTypeNameSymbol]: "FfiError";
861
+ readonly tag: FfiError_Tags.InvalidAddress;
862
+ readonly inner: Readonly<{
863
+ detail: string;
864
+ }>;
865
+ name: string;
866
+ message: string;
867
+ stack?: string;
868
+ cause?: unknown;
869
+ };
870
+ hasInner(obj: any): obj is {
871
+ /**
872
+ * @private
873
+ * This field is private and should not be used, use `tag` instead.
874
+ */
875
+ readonly [uniffiTypeNameSymbol]: "FfiError";
876
+ readonly tag: FfiError_Tags.InvalidAddress;
877
+ readonly inner: Readonly<{
878
+ detail: string;
879
+ }>;
880
+ name: string;
881
+ message: string;
882
+ stack?: string;
883
+ cause?: unknown;
884
+ };
885
+ getInner(obj: {
886
+ /**
887
+ * @private
888
+ * This field is private and should not be used, use `tag` instead.
889
+ */
890
+ readonly [uniffiTypeNameSymbol]: "FfiError";
891
+ readonly tag: FfiError_Tags.InvalidAddress;
892
+ readonly inner: Readonly<{
893
+ detail: string;
894
+ }>;
895
+ name: string;
896
+ message: string;
897
+ stack?: string;
898
+ cause?: unknown;
899
+ }): Readonly<{
900
+ detail: string;
901
+ }>;
902
+ isError(error: unknown): error is Error;
903
+ };
904
+ InvalidTopic: {
905
+ new (inner: {
906
+ detail: string;
907
+ }): {
908
+ /**
909
+ * @private
910
+ * This field is private and should not be used, use `tag` instead.
911
+ */
912
+ readonly [uniffiTypeNameSymbol]: "FfiError";
913
+ readonly tag: FfiError_Tags.InvalidTopic;
914
+ readonly inner: Readonly<{
915
+ detail: string;
916
+ }>;
917
+ name: string;
918
+ message: string;
919
+ stack?: string;
920
+ cause?: unknown;
921
+ };
922
+ "new"(inner: {
923
+ detail: string;
924
+ }): {
925
+ /**
926
+ * @private
927
+ * This field is private and should not be used, use `tag` instead.
928
+ */
929
+ readonly [uniffiTypeNameSymbol]: "FfiError";
930
+ readonly tag: FfiError_Tags.InvalidTopic;
931
+ readonly inner: Readonly<{
932
+ detail: string;
933
+ }>;
934
+ name: string;
935
+ message: string;
936
+ stack?: string;
937
+ cause?: unknown;
938
+ };
939
+ instanceOf(obj: any): obj is {
940
+ /**
941
+ * @private
942
+ * This field is private and should not be used, use `tag` instead.
943
+ */
944
+ readonly [uniffiTypeNameSymbol]: "FfiError";
945
+ readonly tag: FfiError_Tags.InvalidTopic;
946
+ readonly inner: Readonly<{
947
+ detail: string;
948
+ }>;
949
+ name: string;
950
+ message: string;
951
+ stack?: string;
952
+ cause?: unknown;
953
+ };
954
+ hasInner(obj: any): obj is {
955
+ /**
956
+ * @private
957
+ * This field is private and should not be used, use `tag` instead.
958
+ */
959
+ readonly [uniffiTypeNameSymbol]: "FfiError";
960
+ readonly tag: FfiError_Tags.InvalidTopic;
961
+ readonly inner: Readonly<{
962
+ detail: string;
963
+ }>;
964
+ name: string;
965
+ message: string;
966
+ stack?: string;
967
+ cause?: unknown;
968
+ };
969
+ getInner(obj: {
970
+ /**
971
+ * @private
972
+ * This field is private and should not be used, use `tag` instead.
973
+ */
974
+ readonly [uniffiTypeNameSymbol]: "FfiError";
975
+ readonly tag: FfiError_Tags.InvalidTopic;
976
+ readonly inner: Readonly<{
977
+ detail: string;
978
+ }>;
979
+ name: string;
980
+ message: string;
981
+ stack?: string;
982
+ cause?: unknown;
983
+ }): Readonly<{
984
+ detail: string;
985
+ }>;
986
+ isError(error: unknown): error is Error;
987
+ };
988
+ NotPermitted: {
989
+ new (inner: {
990
+ detail: string;
991
+ }): {
992
+ name: string;
993
+ message: string;
994
+ stack?: string;
995
+ /**
996
+ * @private
997
+ * This field is private and should not be used, use `tag` instead.
998
+ */
999
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1000
+ readonly tag: FfiError_Tags.NotPermitted;
1001
+ readonly inner: Readonly<{
1002
+ detail: string;
1003
+ }>;
1004
+ cause?: unknown;
1005
+ };
1006
+ "new"(inner: {
1007
+ detail: string;
1008
+ }): {
1009
+ name: string;
1010
+ message: string;
1011
+ stack?: string;
1012
+ /**
1013
+ * @private
1014
+ * This field is private and should not be used, use `tag` instead.
1015
+ */
1016
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1017
+ readonly tag: FfiError_Tags.NotPermitted;
1018
+ readonly inner: Readonly<{
1019
+ detail: string;
1020
+ }>;
1021
+ cause?: unknown;
1022
+ };
1023
+ instanceOf(obj: any): obj is {
1024
+ name: string;
1025
+ message: string;
1026
+ stack?: string;
1027
+ /**
1028
+ * @private
1029
+ * This field is private and should not be used, use `tag` instead.
1030
+ */
1031
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1032
+ readonly tag: FfiError_Tags.NotPermitted;
1033
+ readonly inner: Readonly<{
1034
+ detail: string;
1035
+ }>;
1036
+ cause?: unknown;
1037
+ };
1038
+ hasInner(obj: any): obj is {
1039
+ name: string;
1040
+ message: string;
1041
+ stack?: string;
1042
+ /**
1043
+ * @private
1044
+ * This field is private and should not be used, use `tag` instead.
1045
+ */
1046
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1047
+ readonly tag: FfiError_Tags.NotPermitted;
1048
+ readonly inner: Readonly<{
1049
+ detail: string;
1050
+ }>;
1051
+ cause?: unknown;
1052
+ };
1053
+ getInner(obj: {
1054
+ name: string;
1055
+ message: string;
1056
+ stack?: string;
1057
+ /**
1058
+ * @private
1059
+ * This field is private and should not be used, use `tag` instead.
1060
+ */
1061
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1062
+ readonly tag: FfiError_Tags.NotPermitted;
1063
+ readonly inner: Readonly<{
1064
+ detail: string;
1065
+ }>;
1066
+ cause?: unknown;
1067
+ }): Readonly<{
1068
+ detail: string;
1069
+ }>;
1070
+ isError(error: unknown): error is Error;
1071
+ };
1072
+ Backpressure: {
1073
+ new (): {
1074
+ /**
1075
+ * @private
1076
+ * This field is private and should not be used, use `tag` instead.
1077
+ */
1078
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1079
+ readonly tag: FfiError_Tags.Backpressure;
1080
+ name: string;
1081
+ message: string;
1082
+ stack?: string;
1083
+ cause?: unknown;
1084
+ };
1085
+ "new"(): {
1086
+ /**
1087
+ * @private
1088
+ * This field is private and should not be used, use `tag` instead.
1089
+ */
1090
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1091
+ readonly tag: FfiError_Tags.Backpressure;
1092
+ name: string;
1093
+ message: string;
1094
+ stack?: string;
1095
+ cause?: unknown;
1096
+ };
1097
+ instanceOf(obj: any): obj is {
1098
+ /**
1099
+ * @private
1100
+ * This field is private and should not be used, use `tag` instead.
1101
+ */
1102
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1103
+ readonly tag: FfiError_Tags.Backpressure;
1104
+ name: string;
1105
+ message: string;
1106
+ stack?: string;
1107
+ cause?: unknown;
1108
+ };
1109
+ hasInner(obj: any): obj is {
1110
+ /**
1111
+ * @private
1112
+ * This field is private and should not be used, use `tag` instead.
1113
+ */
1114
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1115
+ readonly tag: FfiError_Tags.Backpressure;
1116
+ name: string;
1117
+ message: string;
1118
+ stack?: string;
1119
+ cause?: unknown;
1120
+ };
1121
+ isError(error: unknown): error is Error;
1122
+ };
1123
+ MessageTooLarge: {
1124
+ new (): {
1125
+ /**
1126
+ * @private
1127
+ * This field is private and should not be used, use `tag` instead.
1128
+ */
1129
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1130
+ readonly tag: FfiError_Tags.MessageTooLarge;
1131
+ name: string;
1132
+ message: string;
1133
+ stack?: string;
1134
+ cause?: unknown;
1135
+ };
1136
+ "new"(): {
1137
+ /**
1138
+ * @private
1139
+ * This field is private and should not be used, use `tag` instead.
1140
+ */
1141
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1142
+ readonly tag: FfiError_Tags.MessageTooLarge;
1143
+ name: string;
1144
+ message: string;
1145
+ stack?: string;
1146
+ cause?: unknown;
1147
+ };
1148
+ instanceOf(obj: any): obj is {
1149
+ /**
1150
+ * @private
1151
+ * This field is private and should not be used, use `tag` instead.
1152
+ */
1153
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1154
+ readonly tag: FfiError_Tags.MessageTooLarge;
1155
+ name: string;
1156
+ message: string;
1157
+ stack?: string;
1158
+ cause?: unknown;
1159
+ };
1160
+ hasInner(obj: any): obj is {
1161
+ /**
1162
+ * @private
1163
+ * This field is private and should not be used, use `tag` instead.
1164
+ */
1165
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1166
+ readonly tag: FfiError_Tags.MessageTooLarge;
1167
+ name: string;
1168
+ message: string;
1169
+ stack?: string;
1170
+ cause?: unknown;
1171
+ };
1172
+ isError(error: unknown): error is Error;
1173
+ };
1174
+ Transport: {
1175
+ new (inner: {
1176
+ detail: string;
1177
+ }): {
1178
+ /**
1179
+ * @private
1180
+ * This field is private and should not be used, use `tag` instead.
1181
+ */
1182
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1183
+ readonly tag: FfiError_Tags.Transport;
1184
+ readonly inner: Readonly<{
1185
+ detail: string;
1186
+ }>;
1187
+ name: string;
1188
+ message: string;
1189
+ stack?: string;
1190
+ cause?: unknown;
1191
+ };
1192
+ "new"(inner: {
1193
+ detail: string;
1194
+ }): {
1195
+ /**
1196
+ * @private
1197
+ * This field is private and should not be used, use `tag` instead.
1198
+ */
1199
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1200
+ readonly tag: FfiError_Tags.Transport;
1201
+ readonly inner: Readonly<{
1202
+ detail: string;
1203
+ }>;
1204
+ name: string;
1205
+ message: string;
1206
+ stack?: string;
1207
+ cause?: unknown;
1208
+ };
1209
+ instanceOf(obj: any): obj is {
1210
+ /**
1211
+ * @private
1212
+ * This field is private and should not be used, use `tag` instead.
1213
+ */
1214
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1215
+ readonly tag: FfiError_Tags.Transport;
1216
+ readonly inner: Readonly<{
1217
+ detail: string;
1218
+ }>;
1219
+ name: string;
1220
+ message: string;
1221
+ stack?: string;
1222
+ cause?: unknown;
1223
+ };
1224
+ hasInner(obj: any): obj is {
1225
+ /**
1226
+ * @private
1227
+ * This field is private and should not be used, use `tag` instead.
1228
+ */
1229
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1230
+ readonly tag: FfiError_Tags.Transport;
1231
+ readonly inner: Readonly<{
1232
+ detail: string;
1233
+ }>;
1234
+ name: string;
1235
+ message: string;
1236
+ stack?: string;
1237
+ cause?: unknown;
1238
+ };
1239
+ getInner(obj: {
1240
+ /**
1241
+ * @private
1242
+ * This field is private and should not be used, use `tag` instead.
1243
+ */
1244
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1245
+ readonly tag: FfiError_Tags.Transport;
1246
+ readonly inner: Readonly<{
1247
+ detail: string;
1248
+ }>;
1249
+ name: string;
1250
+ message: string;
1251
+ stack?: string;
1252
+ cause?: unknown;
1253
+ }): Readonly<{
1254
+ detail: string;
1255
+ }>;
1256
+ isError(error: unknown): error is Error;
1257
+ };
1258
+ InvalidState: {
1259
+ new (inner: {
1260
+ detail: string;
1261
+ }): {
1262
+ /**
1263
+ * @private
1264
+ * This field is private and should not be used, use `tag` instead.
1265
+ */
1266
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1267
+ readonly tag: FfiError_Tags.InvalidState;
1268
+ readonly inner: Readonly<{
1269
+ detail: string;
1270
+ }>;
1271
+ name: string;
1272
+ message: string;
1273
+ stack?: string;
1274
+ cause?: unknown;
1275
+ };
1276
+ "new"(inner: {
1277
+ detail: string;
1278
+ }): {
1279
+ /**
1280
+ * @private
1281
+ * This field is private and should not be used, use `tag` instead.
1282
+ */
1283
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1284
+ readonly tag: FfiError_Tags.InvalidState;
1285
+ readonly inner: Readonly<{
1286
+ detail: string;
1287
+ }>;
1288
+ name: string;
1289
+ message: string;
1290
+ stack?: string;
1291
+ cause?: unknown;
1292
+ };
1293
+ instanceOf(obj: any): obj is {
1294
+ /**
1295
+ * @private
1296
+ * This field is private and should not be used, use `tag` instead.
1297
+ */
1298
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1299
+ readonly tag: FfiError_Tags.InvalidState;
1300
+ readonly inner: Readonly<{
1301
+ detail: string;
1302
+ }>;
1303
+ name: string;
1304
+ message: string;
1305
+ stack?: string;
1306
+ cause?: unknown;
1307
+ };
1308
+ hasInner(obj: any): obj is {
1309
+ /**
1310
+ * @private
1311
+ * This field is private and should not be used, use `tag` instead.
1312
+ */
1313
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1314
+ readonly tag: FfiError_Tags.InvalidState;
1315
+ readonly inner: Readonly<{
1316
+ detail: string;
1317
+ }>;
1318
+ name: string;
1319
+ message: string;
1320
+ stack?: string;
1321
+ cause?: unknown;
1322
+ };
1323
+ getInner(obj: {
1324
+ /**
1325
+ * @private
1326
+ * This field is private and should not be used, use `tag` instead.
1327
+ */
1328
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1329
+ readonly tag: FfiError_Tags.InvalidState;
1330
+ readonly inner: Readonly<{
1331
+ detail: string;
1332
+ }>;
1333
+ name: string;
1334
+ message: string;
1335
+ stack?: string;
1336
+ cause?: unknown;
1337
+ }): Readonly<{
1338
+ detail: string;
1339
+ }>;
1340
+ isError(error: unknown): error is Error;
1341
+ };
1342
+ Internal: {
1343
+ new (inner: {
1344
+ detail: string;
1345
+ }): {
1346
+ /**
1347
+ * @private
1348
+ * This field is private and should not be used, use `tag` instead.
1349
+ */
1350
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1351
+ readonly tag: FfiError_Tags.Internal;
1352
+ readonly inner: Readonly<{
1353
+ detail: string;
1354
+ }>;
1355
+ name: string;
1356
+ message: string;
1357
+ stack?: string;
1358
+ cause?: unknown;
1359
+ };
1360
+ "new"(inner: {
1361
+ detail: string;
1362
+ }): {
1363
+ /**
1364
+ * @private
1365
+ * This field is private and should not be used, use `tag` instead.
1366
+ */
1367
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1368
+ readonly tag: FfiError_Tags.Internal;
1369
+ readonly inner: Readonly<{
1370
+ detail: string;
1371
+ }>;
1372
+ name: string;
1373
+ message: string;
1374
+ stack?: string;
1375
+ cause?: unknown;
1376
+ };
1377
+ instanceOf(obj: any): obj is {
1378
+ /**
1379
+ * @private
1380
+ * This field is private and should not be used, use `tag` instead.
1381
+ */
1382
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1383
+ readonly tag: FfiError_Tags.Internal;
1384
+ readonly inner: Readonly<{
1385
+ detail: string;
1386
+ }>;
1387
+ name: string;
1388
+ message: string;
1389
+ stack?: string;
1390
+ cause?: unknown;
1391
+ };
1392
+ hasInner(obj: any): obj is {
1393
+ /**
1394
+ * @private
1395
+ * This field is private and should not be used, use `tag` instead.
1396
+ */
1397
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1398
+ readonly tag: FfiError_Tags.Internal;
1399
+ readonly inner: Readonly<{
1400
+ detail: string;
1401
+ }>;
1402
+ name: string;
1403
+ message: string;
1404
+ stack?: string;
1405
+ cause?: unknown;
1406
+ };
1407
+ getInner(obj: {
1408
+ /**
1409
+ * @private
1410
+ * This field is private and should not be used, use `tag` instead.
1411
+ */
1412
+ readonly [uniffiTypeNameSymbol]: "FfiError";
1413
+ readonly tag: FfiError_Tags.Internal;
1414
+ readonly inner: Readonly<{
1415
+ detail: string;
1416
+ }>;
1417
+ name: string;
1418
+ message: string;
1419
+ stack?: string;
1420
+ cause?: unknown;
1421
+ }): Readonly<{
1422
+ detail: string;
1423
+ }>;
1424
+ isError(error: unknown): error is Error;
1425
+ };
1426
+ }>;
1427
+ /**
1428
+ * An error returned by a synchronous FFI operation.
1429
+ */
1430
+ export type FfiError = InstanceType<typeof FfiError['AlreadyStarted' | 'Stopped' | 'InvalidConfig' | 'InvalidKey' | 'InvalidPeerId' | 'InvalidAddress' | 'InvalidTopic' | 'NotPermitted' | 'Backpressure' | 'MessageTooLarge' | 'Transport' | 'InvalidState' | 'Internal']>;
1431
+ /**
1432
+ * Category of a failed NAT connection attempt.
1433
+ */
1434
+ export declare enum NatErrorKind {
1435
+ /**
1436
+ * No usable direct or relayed path exists.
1437
+ */
1438
+ NoPathAvailable = 0,
1439
+ /**
1440
+ * The connection attempt timed out.
1441
+ */
1442
+ Timeout = 1,
1443
+ /**
1444
+ * A transport dial failed.
1445
+ */
1446
+ DialFailed = 2,
1447
+ /**
1448
+ * A traversal protocol exchange failed.
1449
+ */
1450
+ Protocol = 3,
1451
+ /**
1452
+ * A relay refused the circuit.
1453
+ */
1454
+ RelayRefused = 4
1455
+ }
1456
+ /**
1457
+ * Coarse local reachability state.
1458
+ */
1459
+ export declare enum Reachability {
1460
+ /**
1461
+ * Not enough evidence is available.
1462
+ */
1463
+ Unknown = 0,
1464
+ /**
1465
+ * The endpoint is directly reachable.
1466
+ */
1467
+ Public = 1,
1468
+ /**
1469
+ * The endpoint needs traversal or relay assistance.
1470
+ */
1471
+ Private = 2
1472
+ }
1473
+ export declare enum PathKind_Tags {
1474
+ DirectDialed = "DirectDialed",
1475
+ DirectPunched = "DirectPunched",
1476
+ Relayed = "Relayed"
1477
+ }
1478
+ /**
1479
+ * Kind of usable connection path.
1480
+ */
1481
+ export declare const PathKind: Readonly<{
1482
+ instanceOf: (obj: any) => obj is PathKind;
1483
+ DirectDialed: {
1484
+ new (): {
1485
+ /**
1486
+ * @private
1487
+ * This field is private and should not be used, use `tag` instead.
1488
+ */
1489
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1490
+ readonly tag: PathKind_Tags.DirectDialed;
1491
+ };
1492
+ "new"(): {
1493
+ /**
1494
+ * @private
1495
+ * This field is private and should not be used, use `tag` instead.
1496
+ */
1497
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1498
+ readonly tag: PathKind_Tags.DirectDialed;
1499
+ };
1500
+ instanceOf(obj: any): obj is {
1501
+ /**
1502
+ * @private
1503
+ * This field is private and should not be used, use `tag` instead.
1504
+ */
1505
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1506
+ readonly tag: PathKind_Tags.DirectDialed;
1507
+ };
1508
+ };
1509
+ DirectPunched: {
1510
+ new (): {
1511
+ /**
1512
+ * @private
1513
+ * This field is private and should not be used, use `tag` instead.
1514
+ */
1515
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1516
+ readonly tag: PathKind_Tags.DirectPunched;
1517
+ };
1518
+ "new"(): {
1519
+ /**
1520
+ * @private
1521
+ * This field is private and should not be used, use `tag` instead.
1522
+ */
1523
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1524
+ readonly tag: PathKind_Tags.DirectPunched;
1525
+ };
1526
+ instanceOf(obj: any): obj is {
1527
+ /**
1528
+ * @private
1529
+ * This field is private and should not be used, use `tag` instead.
1530
+ */
1531
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1532
+ readonly tag: PathKind_Tags.DirectPunched;
1533
+ };
1534
+ };
1535
+ Relayed: {
1536
+ new (inner: {
1537
+ relayPeerId: string;
1538
+ }): {
1539
+ /**
1540
+ * @private
1541
+ * This field is private and should not be used, use `tag` instead.
1542
+ */
1543
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1544
+ readonly tag: PathKind_Tags.Relayed;
1545
+ readonly inner: Readonly<{
1546
+ relayPeerId: string;
1547
+ }>;
1548
+ };
1549
+ "new"(inner: {
1550
+ relayPeerId: string;
1551
+ }): {
1552
+ /**
1553
+ * @private
1554
+ * This field is private and should not be used, use `tag` instead.
1555
+ */
1556
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1557
+ readonly tag: PathKind_Tags.Relayed;
1558
+ readonly inner: Readonly<{
1559
+ relayPeerId: string;
1560
+ }>;
1561
+ };
1562
+ instanceOf(obj: any): obj is {
1563
+ /**
1564
+ * @private
1565
+ * This field is private and should not be used, use `tag` instead.
1566
+ */
1567
+ readonly [uniffiTypeNameSymbol]: "PathKind";
1568
+ readonly tag: PathKind_Tags.Relayed;
1569
+ readonly inner: Readonly<{
1570
+ relayPeerId: string;
1571
+ }>;
1572
+ };
1573
+ };
1574
+ }>;
1575
+ /**
1576
+ * Kind of usable connection path.
1577
+ */
1578
+ export type PathKind = InstanceType<typeof PathKind['DirectDialed' | 'DirectPunched' | 'Relayed']>;
1579
+ export declare enum P2pEvent_Tags {
1580
+ EventsDropped = "EventsDropped",
1581
+ DriverFailed = "DriverFailed",
1582
+ ConnectionEstablished = "ConnectionEstablished",
1583
+ ConnectionClosed = "ConnectionClosed",
1584
+ ConnectionReplaced = "ConnectionReplaced",
1585
+ PeerReady = "PeerReady",
1586
+ IdentifyReceived = "IdentifyReceived",
1587
+ PingRttMeasured = "PingRttMeasured",
1588
+ PingTimeout = "PingTimeout",
1589
+ StreamReady = "StreamReady",
1590
+ StreamData = "StreamData",
1591
+ StreamRemoteWriteClosed = "StreamRemoteWriteClosed",
1592
+ StreamClosed = "StreamClosed",
1593
+ EndpointError = "EndpointError",
1594
+ ReachabilityChanged = "ReachabilityChanged",
1595
+ PublicAddressesChanged = "PublicAddressesChanged",
1596
+ RelayReserved = "RelayReserved",
1597
+ RelayReservationLost = "RelayReservationLost",
1598
+ PathEstablished = "PathEstablished",
1599
+ InboundPathEstablished = "InboundPathEstablished",
1600
+ PathUpgraded = "PathUpgraded",
1601
+ HolePunchFailed = "HolePunchFailed",
1602
+ ConnectFailed = "ConnectFailed",
1603
+ ConnectCancelled = "ConnectCancelled",
1604
+ InboundDirectUpgrade = "InboundDirectUpgrade",
1605
+ Message = "Message",
1606
+ PeerSubscribed = "PeerSubscribed",
1607
+ PeerUnsubscribed = "PeerUnsubscribed",
1608
+ GossipsubOutboundFailure = "GossipsubOutboundFailure",
1609
+ GossipsubProtocolViolation = "GossipsubProtocolViolation",
1610
+ PeerDiscovered = "PeerDiscovered",
1611
+ PeerUpdated = "PeerUpdated",
1612
+ PeerExpired = "PeerExpired",
1613
+ DiscoveryDialFailed = "DiscoveryDialFailed",
1614
+ DiscoveryProtocolViolation = "DiscoveryProtocolViolation"
1615
+ }
1616
+ /**
1617
+ * Event delivered by the native endpoint driver.
1618
+ */
1619
+ export declare const P2pEvent: Readonly<{
1620
+ instanceOf: (obj: any) => obj is P2pEvent;
1621
+ EventsDropped: {
1622
+ new (inner: {
1623
+ dropped: bigint;
1624
+ totalDropped: bigint;
1625
+ terminalConnectIds: Array<bigint>;
1626
+ }): {
1627
+ /**
1628
+ * @private
1629
+ * This field is private and should not be used, use `tag` instead.
1630
+ */
1631
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1632
+ readonly tag: P2pEvent_Tags.EventsDropped;
1633
+ readonly inner: Readonly<{
1634
+ dropped: bigint;
1635
+ totalDropped: bigint;
1636
+ terminalConnectIds: Array<bigint>;
1637
+ }>;
1638
+ };
1639
+ "new"(inner: {
1640
+ dropped: bigint;
1641
+ totalDropped: bigint;
1642
+ terminalConnectIds: Array<bigint>;
1643
+ }): {
1644
+ /**
1645
+ * @private
1646
+ * This field is private and should not be used, use `tag` instead.
1647
+ */
1648
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1649
+ readonly tag: P2pEvent_Tags.EventsDropped;
1650
+ readonly inner: Readonly<{
1651
+ dropped: bigint;
1652
+ totalDropped: bigint;
1653
+ terminalConnectIds: Array<bigint>;
1654
+ }>;
1655
+ };
1656
+ instanceOf(obj: any): obj is {
1657
+ /**
1658
+ * @private
1659
+ * This field is private and should not be used, use `tag` instead.
1660
+ */
1661
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1662
+ readonly tag: P2pEvent_Tags.EventsDropped;
1663
+ readonly inner: Readonly<{
1664
+ dropped: bigint;
1665
+ totalDropped: bigint;
1666
+ terminalConnectIds: Array<bigint>;
1667
+ }>;
1668
+ };
1669
+ };
1670
+ DriverFailed: {
1671
+ new (inner: {
1672
+ kind: DriverFailureKind;
1673
+ detail: string;
1674
+ }): {
1675
+ /**
1676
+ * @private
1677
+ * This field is private and should not be used, use `tag` instead.
1678
+ */
1679
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1680
+ readonly tag: P2pEvent_Tags.DriverFailed;
1681
+ readonly inner: Readonly<{
1682
+ kind: DriverFailureKind;
1683
+ detail: string;
1684
+ }>;
1685
+ };
1686
+ "new"(inner: {
1687
+ kind: DriverFailureKind;
1688
+ detail: string;
1689
+ }): {
1690
+ /**
1691
+ * @private
1692
+ * This field is private and should not be used, use `tag` instead.
1693
+ */
1694
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1695
+ readonly tag: P2pEvent_Tags.DriverFailed;
1696
+ readonly inner: Readonly<{
1697
+ kind: DriverFailureKind;
1698
+ detail: string;
1699
+ }>;
1700
+ };
1701
+ instanceOf(obj: any): obj is {
1702
+ /**
1703
+ * @private
1704
+ * This field is private and should not be used, use `tag` instead.
1705
+ */
1706
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1707
+ readonly tag: P2pEvent_Tags.DriverFailed;
1708
+ readonly inner: Readonly<{
1709
+ kind: DriverFailureKind;
1710
+ detail: string;
1711
+ }>;
1712
+ };
1713
+ };
1714
+ ConnectionEstablished: {
1715
+ new (inner: {
1716
+ peerId: string;
1717
+ connId: bigint;
1718
+ }): {
1719
+ /**
1720
+ * @private
1721
+ * This field is private and should not be used, use `tag` instead.
1722
+ */
1723
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1724
+ readonly tag: P2pEvent_Tags.ConnectionEstablished;
1725
+ readonly inner: Readonly<{
1726
+ peerId: string;
1727
+ connId: bigint;
1728
+ }>;
1729
+ };
1730
+ "new"(inner: {
1731
+ peerId: string;
1732
+ connId: bigint;
1733
+ }): {
1734
+ /**
1735
+ * @private
1736
+ * This field is private and should not be used, use `tag` instead.
1737
+ */
1738
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1739
+ readonly tag: P2pEvent_Tags.ConnectionEstablished;
1740
+ readonly inner: Readonly<{
1741
+ peerId: string;
1742
+ connId: bigint;
1743
+ }>;
1744
+ };
1745
+ instanceOf(obj: any): obj is {
1746
+ /**
1747
+ * @private
1748
+ * This field is private and should not be used, use `tag` instead.
1749
+ */
1750
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1751
+ readonly tag: P2pEvent_Tags.ConnectionEstablished;
1752
+ readonly inner: Readonly<{
1753
+ peerId: string;
1754
+ connId: bigint;
1755
+ }>;
1756
+ };
1757
+ };
1758
+ ConnectionClosed: {
1759
+ new (inner: {
1760
+ peerId: string;
1761
+ connId: bigint;
1762
+ }): {
1763
+ /**
1764
+ * @private
1765
+ * This field is private and should not be used, use `tag` instead.
1766
+ */
1767
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1768
+ readonly tag: P2pEvent_Tags.ConnectionClosed;
1769
+ readonly inner: Readonly<{
1770
+ peerId: string;
1771
+ connId: bigint;
1772
+ }>;
1773
+ };
1774
+ "new"(inner: {
1775
+ peerId: string;
1776
+ connId: bigint;
1777
+ }): {
1778
+ /**
1779
+ * @private
1780
+ * This field is private and should not be used, use `tag` instead.
1781
+ */
1782
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1783
+ readonly tag: P2pEvent_Tags.ConnectionClosed;
1784
+ readonly inner: Readonly<{
1785
+ peerId: string;
1786
+ connId: bigint;
1787
+ }>;
1788
+ };
1789
+ instanceOf(obj: any): obj is {
1790
+ /**
1791
+ * @private
1792
+ * This field is private and should not be used, use `tag` instead.
1793
+ */
1794
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1795
+ readonly tag: P2pEvent_Tags.ConnectionClosed;
1796
+ readonly inner: Readonly<{
1797
+ peerId: string;
1798
+ connId: bigint;
1799
+ }>;
1800
+ };
1801
+ };
1802
+ ConnectionReplaced: {
1803
+ new (inner: {
1804
+ peerId: string;
1805
+ oldConnId: bigint;
1806
+ newConnId: bigint;
1807
+ }): {
1808
+ /**
1809
+ * @private
1810
+ * This field is private and should not be used, use `tag` instead.
1811
+ */
1812
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1813
+ readonly tag: P2pEvent_Tags.ConnectionReplaced;
1814
+ readonly inner: Readonly<{
1815
+ peerId: string;
1816
+ oldConnId: bigint;
1817
+ newConnId: bigint;
1818
+ }>;
1819
+ };
1820
+ "new"(inner: {
1821
+ peerId: string;
1822
+ oldConnId: bigint;
1823
+ newConnId: bigint;
1824
+ }): {
1825
+ /**
1826
+ * @private
1827
+ * This field is private and should not be used, use `tag` instead.
1828
+ */
1829
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1830
+ readonly tag: P2pEvent_Tags.ConnectionReplaced;
1831
+ readonly inner: Readonly<{
1832
+ peerId: string;
1833
+ oldConnId: bigint;
1834
+ newConnId: bigint;
1835
+ }>;
1836
+ };
1837
+ instanceOf(obj: any): obj is {
1838
+ /**
1839
+ * @private
1840
+ * This field is private and should not be used, use `tag` instead.
1841
+ */
1842
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1843
+ readonly tag: P2pEvent_Tags.ConnectionReplaced;
1844
+ readonly inner: Readonly<{
1845
+ peerId: string;
1846
+ oldConnId: bigint;
1847
+ newConnId: bigint;
1848
+ }>;
1849
+ };
1850
+ };
1851
+ PeerReady: {
1852
+ new (inner: {
1853
+ peerId: string;
1854
+ connId: bigint;
1855
+ protocols: Array<string>;
1856
+ }): {
1857
+ /**
1858
+ * @private
1859
+ * This field is private and should not be used, use `tag` instead.
1860
+ */
1861
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1862
+ readonly tag: P2pEvent_Tags.PeerReady;
1863
+ readonly inner: Readonly<{
1864
+ peerId: string;
1865
+ connId: bigint;
1866
+ protocols: Array<string>;
1867
+ }>;
1868
+ };
1869
+ "new"(inner: {
1870
+ peerId: string;
1871
+ connId: bigint;
1872
+ protocols: Array<string>;
1873
+ }): {
1874
+ /**
1875
+ * @private
1876
+ * This field is private and should not be used, use `tag` instead.
1877
+ */
1878
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1879
+ readonly tag: P2pEvent_Tags.PeerReady;
1880
+ readonly inner: Readonly<{
1881
+ peerId: string;
1882
+ connId: bigint;
1883
+ protocols: Array<string>;
1884
+ }>;
1885
+ };
1886
+ instanceOf(obj: any): obj is {
1887
+ /**
1888
+ * @private
1889
+ * This field is private and should not be used, use `tag` instead.
1890
+ */
1891
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1892
+ readonly tag: P2pEvent_Tags.PeerReady;
1893
+ readonly inner: Readonly<{
1894
+ peerId: string;
1895
+ connId: bigint;
1896
+ protocols: Array<string>;
1897
+ }>;
1898
+ };
1899
+ };
1900
+ IdentifyReceived: {
1901
+ new (inner: {
1902
+ peerId: string;
1903
+ info: IdentifyInfo;
1904
+ }): {
1905
+ /**
1906
+ * @private
1907
+ * This field is private and should not be used, use `tag` instead.
1908
+ */
1909
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1910
+ readonly tag: P2pEvent_Tags.IdentifyReceived;
1911
+ readonly inner: Readonly<{
1912
+ peerId: string;
1913
+ info: IdentifyInfo;
1914
+ }>;
1915
+ };
1916
+ "new"(inner: {
1917
+ peerId: string;
1918
+ info: IdentifyInfo;
1919
+ }): {
1920
+ /**
1921
+ * @private
1922
+ * This field is private and should not be used, use `tag` instead.
1923
+ */
1924
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1925
+ readonly tag: P2pEvent_Tags.IdentifyReceived;
1926
+ readonly inner: Readonly<{
1927
+ peerId: string;
1928
+ info: IdentifyInfo;
1929
+ }>;
1930
+ };
1931
+ instanceOf(obj: any): obj is {
1932
+ /**
1933
+ * @private
1934
+ * This field is private and should not be used, use `tag` instead.
1935
+ */
1936
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1937
+ readonly tag: P2pEvent_Tags.IdentifyReceived;
1938
+ readonly inner: Readonly<{
1939
+ peerId: string;
1940
+ info: IdentifyInfo;
1941
+ }>;
1942
+ };
1943
+ };
1944
+ PingRttMeasured: {
1945
+ new (inner: {
1946
+ peerId: string;
1947
+ rttMs: bigint;
1948
+ }): {
1949
+ /**
1950
+ * @private
1951
+ * This field is private and should not be used, use `tag` instead.
1952
+ */
1953
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1954
+ readonly tag: P2pEvent_Tags.PingRttMeasured;
1955
+ readonly inner: Readonly<{
1956
+ peerId: string;
1957
+ rttMs: bigint;
1958
+ }>;
1959
+ };
1960
+ "new"(inner: {
1961
+ peerId: string;
1962
+ rttMs: bigint;
1963
+ }): {
1964
+ /**
1965
+ * @private
1966
+ * This field is private and should not be used, use `tag` instead.
1967
+ */
1968
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1969
+ readonly tag: P2pEvent_Tags.PingRttMeasured;
1970
+ readonly inner: Readonly<{
1971
+ peerId: string;
1972
+ rttMs: bigint;
1973
+ }>;
1974
+ };
1975
+ instanceOf(obj: any): obj is {
1976
+ /**
1977
+ * @private
1978
+ * This field is private and should not be used, use `tag` instead.
1979
+ */
1980
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1981
+ readonly tag: P2pEvent_Tags.PingRttMeasured;
1982
+ readonly inner: Readonly<{
1983
+ peerId: string;
1984
+ rttMs: bigint;
1985
+ }>;
1986
+ };
1987
+ };
1988
+ PingTimeout: {
1989
+ new (inner: {
1990
+ peerId: string;
1991
+ }): {
1992
+ /**
1993
+ * @private
1994
+ * This field is private and should not be used, use `tag` instead.
1995
+ */
1996
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
1997
+ readonly tag: P2pEvent_Tags.PingTimeout;
1998
+ readonly inner: Readonly<{
1999
+ peerId: string;
2000
+ }>;
2001
+ };
2002
+ "new"(inner: {
2003
+ peerId: string;
2004
+ }): {
2005
+ /**
2006
+ * @private
2007
+ * This field is private and should not be used, use `tag` instead.
2008
+ */
2009
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2010
+ readonly tag: P2pEvent_Tags.PingTimeout;
2011
+ readonly inner: Readonly<{
2012
+ peerId: string;
2013
+ }>;
2014
+ };
2015
+ instanceOf(obj: any): obj is {
2016
+ /**
2017
+ * @private
2018
+ * This field is private and should not be used, use `tag` instead.
2019
+ */
2020
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2021
+ readonly tag: P2pEvent_Tags.PingTimeout;
2022
+ readonly inner: Readonly<{
2023
+ peerId: string;
2024
+ }>;
2025
+ };
2026
+ };
2027
+ StreamReady: {
2028
+ new (inner: {
2029
+ peerId: string;
2030
+ connId: bigint;
2031
+ streamId: bigint;
2032
+ protocolId: string;
2033
+ initiatedLocally: boolean;
2034
+ }): {
2035
+ /**
2036
+ * @private
2037
+ * This field is private and should not be used, use `tag` instead.
2038
+ */
2039
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2040
+ readonly tag: P2pEvent_Tags.StreamReady;
2041
+ readonly inner: Readonly<{
2042
+ peerId: string;
2043
+ connId: bigint;
2044
+ streamId: bigint;
2045
+ protocolId: string;
2046
+ initiatedLocally: boolean;
2047
+ }>;
2048
+ };
2049
+ "new"(inner: {
2050
+ peerId: string;
2051
+ connId: bigint;
2052
+ streamId: bigint;
2053
+ protocolId: string;
2054
+ initiatedLocally: boolean;
2055
+ }): {
2056
+ /**
2057
+ * @private
2058
+ * This field is private and should not be used, use `tag` instead.
2059
+ */
2060
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2061
+ readonly tag: P2pEvent_Tags.StreamReady;
2062
+ readonly inner: Readonly<{
2063
+ peerId: string;
2064
+ connId: bigint;
2065
+ streamId: bigint;
2066
+ protocolId: string;
2067
+ initiatedLocally: boolean;
2068
+ }>;
2069
+ };
2070
+ instanceOf(obj: any): obj is {
2071
+ /**
2072
+ * @private
2073
+ * This field is private and should not be used, use `tag` instead.
2074
+ */
2075
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2076
+ readonly tag: P2pEvent_Tags.StreamReady;
2077
+ readonly inner: Readonly<{
2078
+ peerId: string;
2079
+ connId: bigint;
2080
+ streamId: bigint;
2081
+ protocolId: string;
2082
+ initiatedLocally: boolean;
2083
+ }>;
2084
+ };
2085
+ };
2086
+ StreamData: {
2087
+ new (inner: {
2088
+ peerId: string;
2089
+ connId: bigint;
2090
+ streamId: bigint;
2091
+ data: ArrayBuffer;
2092
+ }): {
2093
+ /**
2094
+ * @private
2095
+ * This field is private and should not be used, use `tag` instead.
2096
+ */
2097
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2098
+ readonly tag: P2pEvent_Tags.StreamData;
2099
+ readonly inner: Readonly<{
2100
+ peerId: string;
2101
+ connId: bigint;
2102
+ streamId: bigint;
2103
+ data: ArrayBuffer;
2104
+ }>;
2105
+ };
2106
+ "new"(inner: {
2107
+ peerId: string;
2108
+ connId: bigint;
2109
+ streamId: bigint;
2110
+ data: ArrayBuffer;
2111
+ }): {
2112
+ /**
2113
+ * @private
2114
+ * This field is private and should not be used, use `tag` instead.
2115
+ */
2116
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2117
+ readonly tag: P2pEvent_Tags.StreamData;
2118
+ readonly inner: Readonly<{
2119
+ peerId: string;
2120
+ connId: bigint;
2121
+ streamId: bigint;
2122
+ data: ArrayBuffer;
2123
+ }>;
2124
+ };
2125
+ instanceOf(obj: any): obj is {
2126
+ /**
2127
+ * @private
2128
+ * This field is private and should not be used, use `tag` instead.
2129
+ */
2130
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2131
+ readonly tag: P2pEvent_Tags.StreamData;
2132
+ readonly inner: Readonly<{
2133
+ peerId: string;
2134
+ connId: bigint;
2135
+ streamId: bigint;
2136
+ data: ArrayBuffer;
2137
+ }>;
2138
+ };
2139
+ };
2140
+ StreamRemoteWriteClosed: {
2141
+ new (inner: {
2142
+ peerId: string;
2143
+ connId: bigint;
2144
+ streamId: bigint;
2145
+ }): {
2146
+ /**
2147
+ * @private
2148
+ * This field is private and should not be used, use `tag` instead.
2149
+ */
2150
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2151
+ readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
2152
+ readonly inner: Readonly<{
2153
+ peerId: string;
2154
+ connId: bigint;
2155
+ streamId: bigint;
2156
+ }>;
2157
+ };
2158
+ "new"(inner: {
2159
+ peerId: string;
2160
+ connId: bigint;
2161
+ streamId: bigint;
2162
+ }): {
2163
+ /**
2164
+ * @private
2165
+ * This field is private and should not be used, use `tag` instead.
2166
+ */
2167
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2168
+ readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
2169
+ readonly inner: Readonly<{
2170
+ peerId: string;
2171
+ connId: bigint;
2172
+ streamId: bigint;
2173
+ }>;
2174
+ };
2175
+ instanceOf(obj: any): obj is {
2176
+ /**
2177
+ * @private
2178
+ * This field is private and should not be used, use `tag` instead.
2179
+ */
2180
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2181
+ readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
2182
+ readonly inner: Readonly<{
2183
+ peerId: string;
2184
+ connId: bigint;
2185
+ streamId: bigint;
2186
+ }>;
2187
+ };
2188
+ };
2189
+ StreamClosed: {
2190
+ new (inner: {
2191
+ peerId: string;
2192
+ connId: bigint;
2193
+ streamId: bigint;
2194
+ }): {
2195
+ /**
2196
+ * @private
2197
+ * This field is private and should not be used, use `tag` instead.
2198
+ */
2199
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2200
+ readonly tag: P2pEvent_Tags.StreamClosed;
2201
+ readonly inner: Readonly<{
2202
+ peerId: string;
2203
+ connId: bigint;
2204
+ streamId: bigint;
2205
+ }>;
2206
+ };
2207
+ "new"(inner: {
2208
+ peerId: string;
2209
+ connId: bigint;
2210
+ streamId: bigint;
2211
+ }): {
2212
+ /**
2213
+ * @private
2214
+ * This field is private and should not be used, use `tag` instead.
2215
+ */
2216
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2217
+ readonly tag: P2pEvent_Tags.StreamClosed;
2218
+ readonly inner: Readonly<{
2219
+ peerId: string;
2220
+ connId: bigint;
2221
+ streamId: bigint;
2222
+ }>;
2223
+ };
2224
+ instanceOf(obj: any): obj is {
2225
+ /**
2226
+ * @private
2227
+ * This field is private and should not be used, use `tag` instead.
2228
+ */
2229
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2230
+ readonly tag: P2pEvent_Tags.StreamClosed;
2231
+ readonly inner: Readonly<{
2232
+ peerId: string;
2233
+ connId: bigint;
2234
+ streamId: bigint;
2235
+ }>;
2236
+ };
2237
+ };
2238
+ EndpointError: {
2239
+ new (inner: {
2240
+ kind: EndpointErrorKind;
2241
+ peerId?: string;
2242
+ connId?: bigint;
2243
+ streamId?: bigint;
2244
+ detail: string;
2245
+ }): {
2246
+ /**
2247
+ * @private
2248
+ * This field is private and should not be used, use `tag` instead.
2249
+ */
2250
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2251
+ readonly tag: P2pEvent_Tags.EndpointError;
2252
+ readonly inner: Readonly<{
2253
+ kind: EndpointErrorKind;
2254
+ peerId?: string;
2255
+ connId?: bigint;
2256
+ streamId?: bigint;
2257
+ detail: string;
2258
+ }>;
2259
+ };
2260
+ "new"(inner: {
2261
+ kind: EndpointErrorKind;
2262
+ peerId?: string;
2263
+ connId?: bigint;
2264
+ streamId?: bigint;
2265
+ detail: string;
2266
+ }): {
2267
+ /**
2268
+ * @private
2269
+ * This field is private and should not be used, use `tag` instead.
2270
+ */
2271
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2272
+ readonly tag: P2pEvent_Tags.EndpointError;
2273
+ readonly inner: Readonly<{
2274
+ kind: EndpointErrorKind;
2275
+ peerId?: string;
2276
+ connId?: bigint;
2277
+ streamId?: bigint;
2278
+ detail: string;
2279
+ }>;
2280
+ };
2281
+ instanceOf(obj: any): obj is {
2282
+ /**
2283
+ * @private
2284
+ * This field is private and should not be used, use `tag` instead.
2285
+ */
2286
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2287
+ readonly tag: P2pEvent_Tags.EndpointError;
2288
+ readonly inner: Readonly<{
2289
+ kind: EndpointErrorKind;
2290
+ peerId?: string;
2291
+ connId?: bigint;
2292
+ streamId?: bigint;
2293
+ detail: string;
2294
+ }>;
2295
+ };
2296
+ };
2297
+ ReachabilityChanged: {
2298
+ new (inner: {
2299
+ previous: Reachability;
2300
+ current: Reachability;
2301
+ confirmedAddrs: Array<string>;
2302
+ }): {
2303
+ /**
2304
+ * @private
2305
+ * This field is private and should not be used, use `tag` instead.
2306
+ */
2307
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2308
+ readonly tag: P2pEvent_Tags.ReachabilityChanged;
2309
+ readonly inner: Readonly<{
2310
+ previous: Reachability;
2311
+ current: Reachability;
2312
+ confirmedAddrs: Array<string>;
2313
+ }>;
2314
+ };
2315
+ "new"(inner: {
2316
+ previous: Reachability;
2317
+ current: Reachability;
2318
+ confirmedAddrs: Array<string>;
2319
+ }): {
2320
+ /**
2321
+ * @private
2322
+ * This field is private and should not be used, use `tag` instead.
2323
+ */
2324
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2325
+ readonly tag: P2pEvent_Tags.ReachabilityChanged;
2326
+ readonly inner: Readonly<{
2327
+ previous: Reachability;
2328
+ current: Reachability;
2329
+ confirmedAddrs: Array<string>;
2330
+ }>;
2331
+ };
2332
+ instanceOf(obj: any): obj is {
2333
+ /**
2334
+ * @private
2335
+ * This field is private and should not be used, use `tag` instead.
2336
+ */
2337
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2338
+ readonly tag: P2pEvent_Tags.ReachabilityChanged;
2339
+ readonly inner: Readonly<{
2340
+ previous: Reachability;
2341
+ current: Reachability;
2342
+ confirmedAddrs: Array<string>;
2343
+ }>;
2344
+ };
2345
+ };
2346
+ PublicAddressesChanged: {
2347
+ new (inner: {
2348
+ addrs: Array<string>;
2349
+ }): {
2350
+ /**
2351
+ * @private
2352
+ * This field is private and should not be used, use `tag` instead.
2353
+ */
2354
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2355
+ readonly tag: P2pEvent_Tags.PublicAddressesChanged;
2356
+ readonly inner: Readonly<{
2357
+ addrs: Array<string>;
2358
+ }>;
2359
+ };
2360
+ "new"(inner: {
2361
+ addrs: Array<string>;
2362
+ }): {
2363
+ /**
2364
+ * @private
2365
+ * This field is private and should not be used, use `tag` instead.
2366
+ */
2367
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2368
+ readonly tag: P2pEvent_Tags.PublicAddressesChanged;
2369
+ readonly inner: Readonly<{
2370
+ addrs: Array<string>;
2371
+ }>;
2372
+ };
2373
+ instanceOf(obj: any): obj is {
2374
+ /**
2375
+ * @private
2376
+ * This field is private and should not be used, use `tag` instead.
2377
+ */
2378
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2379
+ readonly tag: P2pEvent_Tags.PublicAddressesChanged;
2380
+ readonly inner: Readonly<{
2381
+ addrs: Array<string>;
2382
+ }>;
2383
+ };
2384
+ };
2385
+ RelayReserved: {
2386
+ new (inner: {
2387
+ relayPeerId: string;
2388
+ expiresUnixSecs?: bigint;
2389
+ }): {
2390
+ /**
2391
+ * @private
2392
+ * This field is private and should not be used, use `tag` instead.
2393
+ */
2394
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2395
+ readonly tag: P2pEvent_Tags.RelayReserved;
2396
+ readonly inner: Readonly<{
2397
+ relayPeerId: string;
2398
+ expiresUnixSecs?: bigint;
2399
+ }>;
2400
+ };
2401
+ "new"(inner: {
2402
+ relayPeerId: string;
2403
+ expiresUnixSecs?: bigint;
2404
+ }): {
2405
+ /**
2406
+ * @private
2407
+ * This field is private and should not be used, use `tag` instead.
2408
+ */
2409
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2410
+ readonly tag: P2pEvent_Tags.RelayReserved;
2411
+ readonly inner: Readonly<{
2412
+ relayPeerId: string;
2413
+ expiresUnixSecs?: bigint;
2414
+ }>;
2415
+ };
2416
+ instanceOf(obj: any): obj is {
2417
+ /**
2418
+ * @private
2419
+ * This field is private and should not be used, use `tag` instead.
2420
+ */
2421
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2422
+ readonly tag: P2pEvent_Tags.RelayReserved;
2423
+ readonly inner: Readonly<{
2424
+ relayPeerId: string;
2425
+ expiresUnixSecs?: bigint;
2426
+ }>;
2427
+ };
2428
+ };
2429
+ RelayReservationLost: {
2430
+ new (inner: {
2431
+ relayPeerId: string;
2432
+ }): {
2433
+ /**
2434
+ * @private
2435
+ * This field is private and should not be used, use `tag` instead.
2436
+ */
2437
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2438
+ readonly tag: P2pEvent_Tags.RelayReservationLost;
2439
+ readonly inner: Readonly<{
2440
+ relayPeerId: string;
2441
+ }>;
2442
+ };
2443
+ "new"(inner: {
2444
+ relayPeerId: string;
2445
+ }): {
2446
+ /**
2447
+ * @private
2448
+ * This field is private and should not be used, use `tag` instead.
2449
+ */
2450
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2451
+ readonly tag: P2pEvent_Tags.RelayReservationLost;
2452
+ readonly inner: Readonly<{
2453
+ relayPeerId: string;
2454
+ }>;
2455
+ };
2456
+ instanceOf(obj: any): obj is {
2457
+ /**
2458
+ * @private
2459
+ * This field is private and should not be used, use `tag` instead.
2460
+ */
2461
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2462
+ readonly tag: P2pEvent_Tags.RelayReservationLost;
2463
+ readonly inner: Readonly<{
2464
+ relayPeerId: string;
2465
+ }>;
2466
+ };
2467
+ };
2468
+ PathEstablished: {
2469
+ new (inner: {
2470
+ connectId: bigint;
2471
+ peerId: string;
2472
+ connId: bigint;
2473
+ path: PathKind;
2474
+ }): {
2475
+ /**
2476
+ * @private
2477
+ * This field is private and should not be used, use `tag` instead.
2478
+ */
2479
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2480
+ readonly tag: P2pEvent_Tags.PathEstablished;
2481
+ readonly inner: Readonly<{
2482
+ connectId: bigint;
2483
+ peerId: string;
2484
+ connId: bigint;
2485
+ path: PathKind;
2486
+ }>;
2487
+ };
2488
+ "new"(inner: {
2489
+ connectId: bigint;
2490
+ peerId: string;
2491
+ connId: bigint;
2492
+ path: PathKind;
2493
+ }): {
2494
+ /**
2495
+ * @private
2496
+ * This field is private and should not be used, use `tag` instead.
2497
+ */
2498
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2499
+ readonly tag: P2pEvent_Tags.PathEstablished;
2500
+ readonly inner: Readonly<{
2501
+ connectId: bigint;
2502
+ peerId: string;
2503
+ connId: bigint;
2504
+ path: PathKind;
2505
+ }>;
2506
+ };
2507
+ instanceOf(obj: any): obj is {
2508
+ /**
2509
+ * @private
2510
+ * This field is private and should not be used, use `tag` instead.
2511
+ */
2512
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2513
+ readonly tag: P2pEvent_Tags.PathEstablished;
2514
+ readonly inner: Readonly<{
2515
+ connectId: bigint;
2516
+ peerId: string;
2517
+ connId: bigint;
2518
+ path: PathKind;
2519
+ }>;
2520
+ };
2521
+ };
2522
+ InboundPathEstablished: {
2523
+ new (inner: {
2524
+ peerId: string;
2525
+ path: PathKind;
2526
+ }): {
2527
+ /**
2528
+ * @private
2529
+ * This field is private and should not be used, use `tag` instead.
2530
+ */
2531
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2532
+ readonly tag: P2pEvent_Tags.InboundPathEstablished;
2533
+ readonly inner: Readonly<{
2534
+ peerId: string;
2535
+ path: PathKind;
2536
+ }>;
2537
+ };
2538
+ "new"(inner: {
2539
+ peerId: string;
2540
+ path: PathKind;
2541
+ }): {
2542
+ /**
2543
+ * @private
2544
+ * This field is private and should not be used, use `tag` instead.
2545
+ */
2546
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2547
+ readonly tag: P2pEvent_Tags.InboundPathEstablished;
2548
+ readonly inner: Readonly<{
2549
+ peerId: string;
2550
+ path: PathKind;
2551
+ }>;
2552
+ };
2553
+ instanceOf(obj: any): obj is {
2554
+ /**
2555
+ * @private
2556
+ * This field is private and should not be used, use `tag` instead.
2557
+ */
2558
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2559
+ readonly tag: P2pEvent_Tags.InboundPathEstablished;
2560
+ readonly inner: Readonly<{
2561
+ peerId: string;
2562
+ path: PathKind;
2563
+ }>;
2564
+ };
2565
+ };
2566
+ PathUpgraded: {
2567
+ new (inner: {
2568
+ connectId: bigint;
2569
+ peerId: string;
2570
+ from: PathKind;
2571
+ to: PathKind;
2572
+ }): {
2573
+ /**
2574
+ * @private
2575
+ * This field is private and should not be used, use `tag` instead.
2576
+ */
2577
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2578
+ readonly tag: P2pEvent_Tags.PathUpgraded;
2579
+ readonly inner: Readonly<{
2580
+ connectId: bigint;
2581
+ peerId: string;
2582
+ from: PathKind;
2583
+ to: PathKind;
2584
+ }>;
2585
+ };
2586
+ "new"(inner: {
2587
+ connectId: bigint;
2588
+ peerId: string;
2589
+ from: PathKind;
2590
+ to: PathKind;
2591
+ }): {
2592
+ /**
2593
+ * @private
2594
+ * This field is private and should not be used, use `tag` instead.
2595
+ */
2596
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2597
+ readonly tag: P2pEvent_Tags.PathUpgraded;
2598
+ readonly inner: Readonly<{
2599
+ connectId: bigint;
2600
+ peerId: string;
2601
+ from: PathKind;
2602
+ to: PathKind;
2603
+ }>;
2604
+ };
2605
+ instanceOf(obj: any): obj is {
2606
+ /**
2607
+ * @private
2608
+ * This field is private and should not be used, use `tag` instead.
2609
+ */
2610
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2611
+ readonly tag: P2pEvent_Tags.PathUpgraded;
2612
+ readonly inner: Readonly<{
2613
+ connectId: bigint;
2614
+ peerId: string;
2615
+ from: PathKind;
2616
+ to: PathKind;
2617
+ }>;
2618
+ };
2619
+ };
2620
+ HolePunchFailed: {
2621
+ new (inner: {
2622
+ connectId: bigint;
2623
+ attempt: number;
2624
+ reason: string;
2625
+ }): {
2626
+ /**
2627
+ * @private
2628
+ * This field is private and should not be used, use `tag` instead.
2629
+ */
2630
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2631
+ readonly tag: P2pEvent_Tags.HolePunchFailed;
2632
+ readonly inner: Readonly<{
2633
+ connectId: bigint;
2634
+ attempt: number;
2635
+ reason: string;
2636
+ }>;
2637
+ };
2638
+ "new"(inner: {
2639
+ connectId: bigint;
2640
+ attempt: number;
2641
+ reason: string;
2642
+ }): {
2643
+ /**
2644
+ * @private
2645
+ * This field is private and should not be used, use `tag` instead.
2646
+ */
2647
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2648
+ readonly tag: P2pEvent_Tags.HolePunchFailed;
2649
+ readonly inner: Readonly<{
2650
+ connectId: bigint;
2651
+ attempt: number;
2652
+ reason: string;
2653
+ }>;
2654
+ };
2655
+ instanceOf(obj: any): obj is {
2656
+ /**
2657
+ * @private
2658
+ * This field is private and should not be used, use `tag` instead.
2659
+ */
2660
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2661
+ readonly tag: P2pEvent_Tags.HolePunchFailed;
2662
+ readonly inner: Readonly<{
2663
+ connectId: bigint;
2664
+ attempt: number;
2665
+ reason: string;
2666
+ }>;
2667
+ };
2668
+ };
2669
+ ConnectFailed: {
2670
+ new (inner: {
2671
+ connectId: bigint;
2672
+ peerId: string;
2673
+ kind: NatErrorKind;
2674
+ detail: string;
2675
+ }): {
2676
+ /**
2677
+ * @private
2678
+ * This field is private and should not be used, use `tag` instead.
2679
+ */
2680
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2681
+ readonly tag: P2pEvent_Tags.ConnectFailed;
2682
+ readonly inner: Readonly<{
2683
+ connectId: bigint;
2684
+ peerId: string;
2685
+ kind: NatErrorKind;
2686
+ detail: string;
2687
+ }>;
2688
+ };
2689
+ "new"(inner: {
2690
+ connectId: bigint;
2691
+ peerId: string;
2692
+ kind: NatErrorKind;
2693
+ detail: string;
2694
+ }): {
2695
+ /**
2696
+ * @private
2697
+ * This field is private and should not be used, use `tag` instead.
2698
+ */
2699
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2700
+ readonly tag: P2pEvent_Tags.ConnectFailed;
2701
+ readonly inner: Readonly<{
2702
+ connectId: bigint;
2703
+ peerId: string;
2704
+ kind: NatErrorKind;
2705
+ detail: string;
2706
+ }>;
2707
+ };
2708
+ instanceOf(obj: any): obj is {
2709
+ /**
2710
+ * @private
2711
+ * This field is private and should not be used, use `tag` instead.
2712
+ */
2713
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2714
+ readonly tag: P2pEvent_Tags.ConnectFailed;
2715
+ readonly inner: Readonly<{
2716
+ connectId: bigint;
2717
+ peerId: string;
2718
+ kind: NatErrorKind;
2719
+ detail: string;
2720
+ }>;
2721
+ };
2722
+ };
2723
+ ConnectCancelled: {
2724
+ new (inner: {
2725
+ connectId: bigint;
2726
+ peerId: string;
2727
+ }): {
2728
+ /**
2729
+ * @private
2730
+ * This field is private and should not be used, use `tag` instead.
2731
+ */
2732
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2733
+ readonly tag: P2pEvent_Tags.ConnectCancelled;
2734
+ readonly inner: Readonly<{
2735
+ connectId: bigint;
2736
+ peerId: string;
2737
+ }>;
2738
+ };
2739
+ "new"(inner: {
2740
+ connectId: bigint;
2741
+ peerId: string;
2742
+ }): {
2743
+ /**
2744
+ * @private
2745
+ * This field is private and should not be used, use `tag` instead.
2746
+ */
2747
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2748
+ readonly tag: P2pEvent_Tags.ConnectCancelled;
2749
+ readonly inner: Readonly<{
2750
+ connectId: bigint;
2751
+ peerId: string;
2752
+ }>;
2753
+ };
2754
+ instanceOf(obj: any): obj is {
2755
+ /**
2756
+ * @private
2757
+ * This field is private and should not be used, use `tag` instead.
2758
+ */
2759
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2760
+ readonly tag: P2pEvent_Tags.ConnectCancelled;
2761
+ readonly inner: Readonly<{
2762
+ connectId: bigint;
2763
+ peerId: string;
2764
+ }>;
2765
+ };
2766
+ };
2767
+ InboundDirectUpgrade: {
2768
+ new (inner: {
2769
+ peerId: string;
2770
+ }): {
2771
+ /**
2772
+ * @private
2773
+ * This field is private and should not be used, use `tag` instead.
2774
+ */
2775
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2776
+ readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
2777
+ readonly inner: Readonly<{
2778
+ peerId: string;
2779
+ }>;
2780
+ };
2781
+ "new"(inner: {
2782
+ peerId: string;
2783
+ }): {
2784
+ /**
2785
+ * @private
2786
+ * This field is private and should not be used, use `tag` instead.
2787
+ */
2788
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2789
+ readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
2790
+ readonly inner: Readonly<{
2791
+ peerId: string;
2792
+ }>;
2793
+ };
2794
+ instanceOf(obj: any): obj is {
2795
+ /**
2796
+ * @private
2797
+ * This field is private and should not be used, use `tag` instead.
2798
+ */
2799
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2800
+ readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
2801
+ readonly inner: Readonly<{
2802
+ peerId: string;
2803
+ }>;
2804
+ };
2805
+ };
2806
+ Message: {
2807
+ new (inner: {
2808
+ fromPeerId: string;
2809
+ topics: Array<string>;
2810
+ data: ArrayBuffer;
2811
+ seqno: ArrayBuffer;
2812
+ signed: boolean;
2813
+ }): {
2814
+ /**
2815
+ * @private
2816
+ * This field is private and should not be used, use `tag` instead.
2817
+ */
2818
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2819
+ readonly tag: P2pEvent_Tags.Message;
2820
+ readonly inner: Readonly<{
2821
+ fromPeerId: string;
2822
+ topics: Array<string>;
2823
+ data: ArrayBuffer;
2824
+ seqno: ArrayBuffer;
2825
+ signed: boolean;
2826
+ }>;
2827
+ };
2828
+ "new"(inner: {
2829
+ fromPeerId: string;
2830
+ topics: Array<string>;
2831
+ data: ArrayBuffer;
2832
+ seqno: ArrayBuffer;
2833
+ signed: boolean;
2834
+ }): {
2835
+ /**
2836
+ * @private
2837
+ * This field is private and should not be used, use `tag` instead.
2838
+ */
2839
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2840
+ readonly tag: P2pEvent_Tags.Message;
2841
+ readonly inner: Readonly<{
2842
+ fromPeerId: string;
2843
+ topics: Array<string>;
2844
+ data: ArrayBuffer;
2845
+ seqno: ArrayBuffer;
2846
+ signed: boolean;
2847
+ }>;
2848
+ };
2849
+ instanceOf(obj: any): obj is {
2850
+ /**
2851
+ * @private
2852
+ * This field is private and should not be used, use `tag` instead.
2853
+ */
2854
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2855
+ readonly tag: P2pEvent_Tags.Message;
2856
+ readonly inner: Readonly<{
2857
+ fromPeerId: string;
2858
+ topics: Array<string>;
2859
+ data: ArrayBuffer;
2860
+ seqno: ArrayBuffer;
2861
+ signed: boolean;
2862
+ }>;
2863
+ };
2864
+ };
2865
+ PeerSubscribed: {
2866
+ new (inner: {
2867
+ peerId: string;
2868
+ topic: string;
2869
+ }): {
2870
+ /**
2871
+ * @private
2872
+ * This field is private and should not be used, use `tag` instead.
2873
+ */
2874
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2875
+ readonly tag: P2pEvent_Tags.PeerSubscribed;
2876
+ readonly inner: Readonly<{
2877
+ peerId: string;
2878
+ topic: string;
2879
+ }>;
2880
+ };
2881
+ "new"(inner: {
2882
+ peerId: string;
2883
+ topic: string;
2884
+ }): {
2885
+ /**
2886
+ * @private
2887
+ * This field is private and should not be used, use `tag` instead.
2888
+ */
2889
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2890
+ readonly tag: P2pEvent_Tags.PeerSubscribed;
2891
+ readonly inner: Readonly<{
2892
+ peerId: string;
2893
+ topic: string;
2894
+ }>;
2895
+ };
2896
+ instanceOf(obj: any): obj is {
2897
+ /**
2898
+ * @private
2899
+ * This field is private and should not be used, use `tag` instead.
2900
+ */
2901
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2902
+ readonly tag: P2pEvent_Tags.PeerSubscribed;
2903
+ readonly inner: Readonly<{
2904
+ peerId: string;
2905
+ topic: string;
2906
+ }>;
2907
+ };
2908
+ };
2909
+ PeerUnsubscribed: {
2910
+ new (inner: {
2911
+ peerId: string;
2912
+ topic: string;
2913
+ }): {
2914
+ /**
2915
+ * @private
2916
+ * This field is private and should not be used, use `tag` instead.
2917
+ */
2918
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2919
+ readonly tag: P2pEvent_Tags.PeerUnsubscribed;
2920
+ readonly inner: Readonly<{
2921
+ peerId: string;
2922
+ topic: string;
2923
+ }>;
2924
+ };
2925
+ "new"(inner: {
2926
+ peerId: string;
2927
+ topic: string;
2928
+ }): {
2929
+ /**
2930
+ * @private
2931
+ * This field is private and should not be used, use `tag` instead.
2932
+ */
2933
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2934
+ readonly tag: P2pEvent_Tags.PeerUnsubscribed;
2935
+ readonly inner: Readonly<{
2936
+ peerId: string;
2937
+ topic: string;
2938
+ }>;
2939
+ };
2940
+ instanceOf(obj: any): obj is {
2941
+ /**
2942
+ * @private
2943
+ * This field is private and should not be used, use `tag` instead.
2944
+ */
2945
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2946
+ readonly tag: P2pEvent_Tags.PeerUnsubscribed;
2947
+ readonly inner: Readonly<{
2948
+ peerId: string;
2949
+ topic: string;
2950
+ }>;
2951
+ };
2952
+ };
2953
+ GossipsubOutboundFailure: {
2954
+ new (inner: {
2955
+ peerId: string;
2956
+ reason: string;
2957
+ }): {
2958
+ /**
2959
+ * @private
2960
+ * This field is private and should not be used, use `tag` instead.
2961
+ */
2962
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2963
+ readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
2964
+ readonly inner: Readonly<{
2965
+ peerId: string;
2966
+ reason: string;
2967
+ }>;
2968
+ };
2969
+ "new"(inner: {
2970
+ peerId: string;
2971
+ reason: string;
2972
+ }): {
2973
+ /**
2974
+ * @private
2975
+ * This field is private and should not be used, use `tag` instead.
2976
+ */
2977
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2978
+ readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
2979
+ readonly inner: Readonly<{
2980
+ peerId: string;
2981
+ reason: string;
2982
+ }>;
2983
+ };
2984
+ instanceOf(obj: any): obj is {
2985
+ /**
2986
+ * @private
2987
+ * This field is private and should not be used, use `tag` instead.
2988
+ */
2989
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
2990
+ readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
2991
+ readonly inner: Readonly<{
2992
+ peerId: string;
2993
+ reason: string;
2994
+ }>;
2995
+ };
2996
+ };
2997
+ GossipsubProtocolViolation: {
2998
+ new (inner: {
2999
+ peerId: string;
3000
+ reason: string;
3001
+ }): {
3002
+ /**
3003
+ * @private
3004
+ * This field is private and should not be used, use `tag` instead.
3005
+ */
3006
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3007
+ readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
3008
+ readonly inner: Readonly<{
3009
+ peerId: string;
3010
+ reason: string;
3011
+ }>;
3012
+ };
3013
+ "new"(inner: {
3014
+ peerId: string;
3015
+ reason: string;
3016
+ }): {
3017
+ /**
3018
+ * @private
3019
+ * This field is private and should not be used, use `tag` instead.
3020
+ */
3021
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3022
+ readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
3023
+ readonly inner: Readonly<{
3024
+ peerId: string;
3025
+ reason: string;
3026
+ }>;
3027
+ };
3028
+ instanceOf(obj: any): obj is {
3029
+ /**
3030
+ * @private
3031
+ * This field is private and should not be used, use `tag` instead.
3032
+ */
3033
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3034
+ readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
3035
+ readonly inner: Readonly<{
3036
+ peerId: string;
3037
+ reason: string;
3038
+ }>;
3039
+ };
3040
+ };
3041
+ PeerDiscovered: {
3042
+ new (inner: {
3043
+ peerId: string;
3044
+ addrs: Array<string>;
3045
+ source: DiscoverySource;
3046
+ }): {
3047
+ /**
3048
+ * @private
3049
+ * This field is private and should not be used, use `tag` instead.
3050
+ */
3051
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3052
+ readonly tag: P2pEvent_Tags.PeerDiscovered;
3053
+ readonly inner: Readonly<{
3054
+ peerId: string;
3055
+ addrs: Array<string>;
3056
+ source: DiscoverySource;
3057
+ }>;
3058
+ };
3059
+ "new"(inner: {
3060
+ peerId: string;
3061
+ addrs: Array<string>;
3062
+ source: DiscoverySource;
3063
+ }): {
3064
+ /**
3065
+ * @private
3066
+ * This field is private and should not be used, use `tag` instead.
3067
+ */
3068
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3069
+ readonly tag: P2pEvent_Tags.PeerDiscovered;
3070
+ readonly inner: Readonly<{
3071
+ peerId: string;
3072
+ addrs: Array<string>;
3073
+ source: DiscoverySource;
3074
+ }>;
3075
+ };
3076
+ instanceOf(obj: any): obj is {
3077
+ /**
3078
+ * @private
3079
+ * This field is private and should not be used, use `tag` instead.
3080
+ */
3081
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3082
+ readonly tag: P2pEvent_Tags.PeerDiscovered;
3083
+ readonly inner: Readonly<{
3084
+ peerId: string;
3085
+ addrs: Array<string>;
3086
+ source: DiscoverySource;
3087
+ }>;
3088
+ };
3089
+ };
3090
+ PeerUpdated: {
3091
+ new (inner: {
3092
+ peerId: string;
3093
+ addrs: Array<string>;
3094
+ source: DiscoverySource;
3095
+ }): {
3096
+ /**
3097
+ * @private
3098
+ * This field is private and should not be used, use `tag` instead.
3099
+ */
3100
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3101
+ readonly tag: P2pEvent_Tags.PeerUpdated;
3102
+ readonly inner: Readonly<{
3103
+ peerId: string;
3104
+ addrs: Array<string>;
3105
+ source: DiscoverySource;
3106
+ }>;
3107
+ };
3108
+ "new"(inner: {
3109
+ peerId: string;
3110
+ addrs: Array<string>;
3111
+ source: DiscoverySource;
3112
+ }): {
3113
+ /**
3114
+ * @private
3115
+ * This field is private and should not be used, use `tag` instead.
3116
+ */
3117
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3118
+ readonly tag: P2pEvent_Tags.PeerUpdated;
3119
+ readonly inner: Readonly<{
3120
+ peerId: string;
3121
+ addrs: Array<string>;
3122
+ source: DiscoverySource;
3123
+ }>;
3124
+ };
3125
+ instanceOf(obj: any): obj is {
3126
+ /**
3127
+ * @private
3128
+ * This field is private and should not be used, use `tag` instead.
3129
+ */
3130
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3131
+ readonly tag: P2pEvent_Tags.PeerUpdated;
3132
+ readonly inner: Readonly<{
3133
+ peerId: string;
3134
+ addrs: Array<string>;
3135
+ source: DiscoverySource;
3136
+ }>;
3137
+ };
3138
+ };
3139
+ PeerExpired: {
3140
+ new (inner: {
3141
+ peerId: string;
3142
+ }): {
3143
+ /**
3144
+ * @private
3145
+ * This field is private and should not be used, use `tag` instead.
3146
+ */
3147
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3148
+ readonly tag: P2pEvent_Tags.PeerExpired;
3149
+ readonly inner: Readonly<{
3150
+ peerId: string;
3151
+ }>;
3152
+ };
3153
+ "new"(inner: {
3154
+ peerId: string;
3155
+ }): {
3156
+ /**
3157
+ * @private
3158
+ * This field is private and should not be used, use `tag` instead.
3159
+ */
3160
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3161
+ readonly tag: P2pEvent_Tags.PeerExpired;
3162
+ readonly inner: Readonly<{
3163
+ peerId: string;
3164
+ }>;
3165
+ };
3166
+ instanceOf(obj: any): obj is {
3167
+ /**
3168
+ * @private
3169
+ * This field is private and should not be used, use `tag` instead.
3170
+ */
3171
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3172
+ readonly tag: P2pEvent_Tags.PeerExpired;
3173
+ readonly inner: Readonly<{
3174
+ peerId: string;
3175
+ }>;
3176
+ };
3177
+ };
3178
+ DiscoveryDialFailed: {
3179
+ new (inner: {
3180
+ peerId: string;
3181
+ reason: string;
3182
+ }): {
3183
+ /**
3184
+ * @private
3185
+ * This field is private and should not be used, use `tag` instead.
3186
+ */
3187
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3188
+ readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
3189
+ readonly inner: Readonly<{
3190
+ peerId: string;
3191
+ reason: string;
3192
+ }>;
3193
+ };
3194
+ "new"(inner: {
3195
+ peerId: string;
3196
+ reason: string;
3197
+ }): {
3198
+ /**
3199
+ * @private
3200
+ * This field is private and should not be used, use `tag` instead.
3201
+ */
3202
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3203
+ readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
3204
+ readonly inner: Readonly<{
3205
+ peerId: string;
3206
+ reason: string;
3207
+ }>;
3208
+ };
3209
+ instanceOf(obj: any): obj is {
3210
+ /**
3211
+ * @private
3212
+ * This field is private and should not be used, use `tag` instead.
3213
+ */
3214
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3215
+ readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
3216
+ readonly inner: Readonly<{
3217
+ peerId: string;
3218
+ reason: string;
3219
+ }>;
3220
+ };
3221
+ };
3222
+ DiscoveryProtocolViolation: {
3223
+ new (inner: {
3224
+ peerId?: string;
3225
+ source: DiscoverySource;
3226
+ reason: string;
3227
+ suppressed: number;
3228
+ }): {
3229
+ /**
3230
+ * @private
3231
+ * This field is private and should not be used, use `tag` instead.
3232
+ */
3233
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3234
+ readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
3235
+ readonly inner: Readonly<{
3236
+ peerId?: string;
3237
+ source: DiscoverySource;
3238
+ reason: string;
3239
+ suppressed: number;
3240
+ }>;
3241
+ };
3242
+ "new"(inner: {
3243
+ peerId?: string;
3244
+ source: DiscoverySource;
3245
+ reason: string;
3246
+ suppressed: number;
3247
+ }): {
3248
+ /**
3249
+ * @private
3250
+ * This field is private and should not be used, use `tag` instead.
3251
+ */
3252
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3253
+ readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
3254
+ readonly inner: Readonly<{
3255
+ peerId?: string;
3256
+ source: DiscoverySource;
3257
+ reason: string;
3258
+ suppressed: number;
3259
+ }>;
3260
+ };
3261
+ instanceOf(obj: any): obj is {
3262
+ /**
3263
+ * @private
3264
+ * This field is private and should not be used, use `tag` instead.
3265
+ */
3266
+ readonly [uniffiTypeNameSymbol]: "P2pEvent";
3267
+ readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
3268
+ readonly inner: Readonly<{
3269
+ peerId?: string;
3270
+ source: DiscoverySource;
3271
+ reason: string;
3272
+ suppressed: number;
3273
+ }>;
3274
+ };
3275
+ };
3276
+ }>;
3277
+ /**
3278
+ * Event delivered by the native endpoint driver.
3279
+ */
3280
+ export type P2pEvent = InstanceType<typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'ConnectionReplaced' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'DiscoveryProtocolViolation']>;
3281
+ /**
3282
+ * This should be called before anything else.
3283
+ *
3284
+ * It is likely that this is being done for you by the library's `index.ts`.
3285
+ *
3286
+ * It checks versions of uniffi between when the Rust scaffolding was generated
3287
+ * and when the bindings were generated.
3288
+ *
3289
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
3290
+ */
3291
+ declare function uniffiEnsureInitialized(): void;
3292
+ declare const _default: Readonly<{
3293
+ initialize: typeof uniffiEnsureInitialized;
3294
+ converters: {
3295
+ FfiConverterTypeConnectTarget: {
3296
+ readFromCursor(c: Cursor): ConnectTarget;
3297
+ writeIntoCursor(value: ConnectTarget, c: Cursor): void;
3298
+ allocationSize(value: ConnectTarget): number;
3299
+ lift(value: UniffiByteArray): ConnectTarget;
3300
+ lower(value: ConnectTarget, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3301
+ };
3302
+ FfiConverterTypeConnectionInfo: {
3303
+ readFromCursor(c: Cursor): ConnectionInfo;
3304
+ writeIntoCursor(value: ConnectionInfo, c: Cursor): void;
3305
+ allocationSize(value: ConnectionInfo): number;
3306
+ lift(value: UniffiByteArray): ConnectionInfo;
3307
+ lower(value: ConnectionInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3308
+ };
3309
+ FfiConverterTypeDiscoveryOptions: {
3310
+ readFromCursor(c: Cursor): DiscoveryOptions;
3311
+ writeIntoCursor(value: DiscoveryOptions, c: Cursor): void;
3312
+ allocationSize(value: DiscoveryOptions): number;
3313
+ lift(value: UniffiByteArray): DiscoveryOptions;
3314
+ lower(value: DiscoveryOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3315
+ };
3316
+ FfiConverterTypeDiscoverySource: {
3317
+ readFromCursor(c: Cursor): DiscoverySource;
3318
+ writeIntoCursor(value: DiscoverySource, c: Cursor): void;
3319
+ allocationSize(value: DiscoverySource): number;
3320
+ lift(value: UniffiByteArray): DiscoverySource;
3321
+ lower(value: DiscoverySource, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3322
+ };
3323
+ FfiConverterTypeDriverFailureKind: {
3324
+ readFromCursor(c: Cursor): DriverFailureKind;
3325
+ writeIntoCursor(value: DriverFailureKind, c: Cursor): void;
3326
+ allocationSize(value: DriverFailureKind): number;
3327
+ lift(value: UniffiByteArray): DriverFailureKind;
3328
+ lower(value: DriverFailureKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3329
+ };
3330
+ FfiConverterTypeEndpointConfig: {
3331
+ readFromCursor(c: Cursor): EndpointConfig;
3332
+ writeIntoCursor(value: EndpointConfig, c: Cursor): void;
3333
+ allocationSize(value: EndpointConfig): number;
3334
+ lift(value: UniffiByteArray): EndpointConfig;
3335
+ lower(value: EndpointConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3336
+ };
3337
+ FfiConverterTypeEndpointErrorKind: {
3338
+ readFromCursor(c: Cursor): EndpointErrorKind;
3339
+ writeIntoCursor(value: EndpointErrorKind, c: Cursor): void;
3340
+ allocationSize(value: EndpointErrorKind): number;
3341
+ lift(value: UniffiByteArray): EndpointErrorKind;
3342
+ lower(value: EndpointErrorKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3343
+ };
3344
+ FfiConverterTypeFfiError: {
3345
+ readFromCursor(c: Cursor): FfiError;
3346
+ writeIntoCursor(value: FfiError, c: Cursor): void;
3347
+ allocationSize(value: FfiError): number;
3348
+ lift(value: UniffiByteArray): FfiError;
3349
+ lower(value: FfiError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3350
+ };
3351
+ FfiConverterTypeIdentifyInfo: {
3352
+ readFromCursor(c: Cursor): IdentifyInfo;
3353
+ writeIntoCursor(value: IdentifyInfo, c: Cursor): void;
3354
+ allocationSize(value: IdentifyInfo): number;
3355
+ lift(value: UniffiByteArray): IdentifyInfo;
3356
+ lower(value: IdentifyInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3357
+ };
3358
+ FfiConverterTypeKnownPeerInfo: {
3359
+ readFromCursor(c: Cursor): KnownPeerInfo;
3360
+ writeIntoCursor(value: KnownPeerInfo, c: Cursor): void;
3361
+ allocationSize(value: KnownPeerInfo): number;
3362
+ lift(value: UniffiByteArray): KnownPeerInfo;
3363
+ lower(value: KnownPeerInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3364
+ };
3365
+ FfiConverterTypeMdnsOptions: {
3366
+ readFromCursor(c: Cursor): MdnsOptions;
3367
+ writeIntoCursor(value: MdnsOptions, c: Cursor): void;
3368
+ allocationSize(value: MdnsOptions): number;
3369
+ lift(value: UniffiByteArray): MdnsOptions;
3370
+ lower(value: MdnsOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3371
+ };
3372
+ FfiConverterTypeNatErrorKind: {
3373
+ readFromCursor(c: Cursor): NatErrorKind;
3374
+ writeIntoCursor(value: NatErrorKind, c: Cursor): void;
3375
+ allocationSize(value: NatErrorKind): number;
3376
+ lift(value: UniffiByteArray): NatErrorKind;
3377
+ lower(value: NatErrorKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3378
+ };
3379
+ FfiConverterTypeOpenStreamResult: {
3380
+ readFromCursor(c: Cursor): OpenStreamResult;
3381
+ writeIntoCursor(value: OpenStreamResult, c: Cursor): void;
3382
+ allocationSize(value: OpenStreamResult): number;
3383
+ lift(value: UniffiByteArray): OpenStreamResult;
3384
+ lower(value: OpenStreamResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3385
+ };
3386
+ FfiConverterTypeP2pEvent: {
3387
+ readFromCursor(c: Cursor): P2pEvent;
3388
+ writeIntoCursor(value: P2pEvent, c: Cursor): void;
3389
+ allocationSize(value: P2pEvent): number;
3390
+ lift(value: UniffiByteArray): P2pEvent;
3391
+ lower(value: P2pEvent, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3392
+ };
3393
+ FfiConverterTypePathKind: {
3394
+ readFromCursor(c: Cursor): PathKind;
3395
+ writeIntoCursor(value: PathKind, c: Cursor): void;
3396
+ allocationSize(value: PathKind): number;
3397
+ lift(value: UniffiByteArray): PathKind;
3398
+ lower(value: PathKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3399
+ };
3400
+ FfiConverterTypeReachability: {
3401
+ readFromCursor(c: Cursor): Reachability;
3402
+ writeIntoCursor(value: Reachability, c: Cursor): void;
3403
+ allocationSize(value: Reachability): number;
3404
+ lift(value: UniffiByteArray): Reachability;
3405
+ lower(value: Reachability, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3406
+ };
3407
+ FfiConverterTypeRelayReservationInfo: {
3408
+ readFromCursor(c: Cursor): RelayReservationInfo;
3409
+ writeIntoCursor(value: RelayReservationInfo, c: Cursor): void;
3410
+ allocationSize(value: RelayReservationInfo): number;
3411
+ lift(value: UniffiByteArray): RelayReservationInfo;
3412
+ lower(value: RelayReservationInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3413
+ };
3414
+ };
3415
+ }>;
3416
+ export default _default;
3417
+ //# sourceMappingURL=minip2p_ffi_core.d.ts.map