@minip2p/react-native 0.7.3 → 0.7.5
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.
- package/README.md +1 -1
- package/android/CMakeLists.txt +1 -0
- package/android/src/main/jniLibs/arm64-v8a/libminip2p_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libminip2p_ffi.so +0 -0
- package/build/Minip2pFfi.xcframework/Info.plist +4 -4
- package/build/Minip2pFfi.xcframework/ios-arm64/libminip2p_ffi.a +2 -2
- package/build/Minip2pFfi.xcframework/ios-arm64-simulator/libminip2p_ffi.a +2 -2
- package/cpp/generated/minip2p_ffi.cpp +45 -3
- package/cpp/generated/minip2p_ffi.hpp +2 -0
- package/cpp/generated/minip2p_ffi_core.cpp +1999 -0
- package/cpp/generated/minip2p_ffi_core.hpp +51 -0
- package/cpp/react-native-minip2p.cpp +2 -0
- package/lib/module/adapter.js +78 -64
- package/lib/module/adapter.js.map +1 -1
- package/lib/module/generated/minip2p_ffi-ffi.js.map +1 -1
- package/lib/module/generated/minip2p_ffi.js +68 -3287
- package/lib/module/generated/minip2p_ffi.js.map +1 -1
- package/lib/module/generated/minip2p_ffi_core-ffi.js +20 -0
- package/lib/module/generated/minip2p_ffi_core-ffi.js.map +1 -0
- package/lib/module/generated/minip2p_ffi_core.js +3441 -0
- package/lib/module/generated/minip2p_ffi_core.js.map +1 -0
- package/lib/module/low-level.js +1 -0
- package/lib/module/low-level.js.map +1 -1
- package/lib/module/native.js +5 -1
- package/lib/module/native.js.map +1 -1
- package/lib/typescript/src/adapter.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi-ffi.d.ts +3 -1
- package/lib/typescript/src/generated/minip2p_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi.d.ts +24 -3396
- package/lib/typescript/src/generated/minip2p_ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi_core-ffi.d.ts +67 -0
- package/lib/typescript/src/generated/minip2p_ffi_core-ffi.d.ts.map +1 -0
- package/lib/typescript/src/generated/minip2p_ffi_core.d.ts +3522 -0
- package/lib/typescript/src/generated/minip2p_ffi_core.d.ts.map +1 -0
- package/lib/typescript/src/low-level.d.ts +1 -0
- package/lib/typescript/src/low-level.d.ts.map +1 -1
- package/lib/typescript/src/native.d.ts +3 -0
- package/lib/typescript/src/native.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/adapter.ts +107 -71
- package/src/generated/minip2p_ffi-ffi.ts +3 -1
- package/src/generated/minip2p_ffi.ts +77 -3864
- package/src/generated/minip2p_ffi_core-ffi.ts +97 -0
- package/src/generated/minip2p_ffi_core.ts +4049 -0
- package/src/low-level.ts +1 -0
- package/src/native.tsx +4 -0
- package/lib/module/event-drain.js +0 -71
- package/lib/module/event-drain.js.map +0 -1
- package/lib/typescript/src/event-drain.d.ts +0 -10
- package/lib/typescript/src/event-drain.d.ts.map +0 -1
- package/src/event-drain.ts +0 -80
|
@@ -0,0 +1,3522 @@
|
|
|
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
|
+
StreamWriteAccepted = "StreamWriteAccepted",
|
|
1592
|
+
StreamWriteStopped = "StreamWriteStopped",
|
|
1593
|
+
StreamRemoteWriteClosed = "StreamRemoteWriteClosed",
|
|
1594
|
+
StreamClosed = "StreamClosed",
|
|
1595
|
+
EndpointError = "EndpointError",
|
|
1596
|
+
ReachabilityChanged = "ReachabilityChanged",
|
|
1597
|
+
PublicAddressesChanged = "PublicAddressesChanged",
|
|
1598
|
+
RelayReserved = "RelayReserved",
|
|
1599
|
+
RelayReservationLost = "RelayReservationLost",
|
|
1600
|
+
PathEstablished = "PathEstablished",
|
|
1601
|
+
InboundPathEstablished = "InboundPathEstablished",
|
|
1602
|
+
PathUpgraded = "PathUpgraded",
|
|
1603
|
+
HolePunchFailed = "HolePunchFailed",
|
|
1604
|
+
ConnectFailed = "ConnectFailed",
|
|
1605
|
+
ConnectCancelled = "ConnectCancelled",
|
|
1606
|
+
InboundDirectUpgrade = "InboundDirectUpgrade",
|
|
1607
|
+
Message = "Message",
|
|
1608
|
+
PeerSubscribed = "PeerSubscribed",
|
|
1609
|
+
PeerUnsubscribed = "PeerUnsubscribed",
|
|
1610
|
+
GossipsubOutboundFailure = "GossipsubOutboundFailure",
|
|
1611
|
+
GossipsubProtocolViolation = "GossipsubProtocolViolation",
|
|
1612
|
+
PeerDiscovered = "PeerDiscovered",
|
|
1613
|
+
PeerUpdated = "PeerUpdated",
|
|
1614
|
+
PeerExpired = "PeerExpired",
|
|
1615
|
+
DiscoveryDialFailed = "DiscoveryDialFailed",
|
|
1616
|
+
DiscoveryProtocolViolation = "DiscoveryProtocolViolation"
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* Event delivered by the native endpoint driver.
|
|
1620
|
+
*/
|
|
1621
|
+
export declare const P2pEvent: Readonly<{
|
|
1622
|
+
instanceOf: (obj: any) => obj is P2pEvent;
|
|
1623
|
+
EventsDropped: {
|
|
1624
|
+
new (inner: {
|
|
1625
|
+
dropped: bigint;
|
|
1626
|
+
totalDropped: bigint;
|
|
1627
|
+
terminalConnectIds: Array<bigint>;
|
|
1628
|
+
}): {
|
|
1629
|
+
/**
|
|
1630
|
+
* @private
|
|
1631
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1632
|
+
*/
|
|
1633
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1634
|
+
readonly tag: P2pEvent_Tags.EventsDropped;
|
|
1635
|
+
readonly inner: Readonly<{
|
|
1636
|
+
dropped: bigint;
|
|
1637
|
+
totalDropped: bigint;
|
|
1638
|
+
terminalConnectIds: Array<bigint>;
|
|
1639
|
+
}>;
|
|
1640
|
+
};
|
|
1641
|
+
"new"(inner: {
|
|
1642
|
+
dropped: bigint;
|
|
1643
|
+
totalDropped: bigint;
|
|
1644
|
+
terminalConnectIds: Array<bigint>;
|
|
1645
|
+
}): {
|
|
1646
|
+
/**
|
|
1647
|
+
* @private
|
|
1648
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1649
|
+
*/
|
|
1650
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1651
|
+
readonly tag: P2pEvent_Tags.EventsDropped;
|
|
1652
|
+
readonly inner: Readonly<{
|
|
1653
|
+
dropped: bigint;
|
|
1654
|
+
totalDropped: bigint;
|
|
1655
|
+
terminalConnectIds: Array<bigint>;
|
|
1656
|
+
}>;
|
|
1657
|
+
};
|
|
1658
|
+
instanceOf(obj: any): obj is {
|
|
1659
|
+
/**
|
|
1660
|
+
* @private
|
|
1661
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1662
|
+
*/
|
|
1663
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1664
|
+
readonly tag: P2pEvent_Tags.EventsDropped;
|
|
1665
|
+
readonly inner: Readonly<{
|
|
1666
|
+
dropped: bigint;
|
|
1667
|
+
totalDropped: bigint;
|
|
1668
|
+
terminalConnectIds: Array<bigint>;
|
|
1669
|
+
}>;
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
DriverFailed: {
|
|
1673
|
+
new (inner: {
|
|
1674
|
+
kind: DriverFailureKind;
|
|
1675
|
+
detail: string;
|
|
1676
|
+
}): {
|
|
1677
|
+
/**
|
|
1678
|
+
* @private
|
|
1679
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1680
|
+
*/
|
|
1681
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1682
|
+
readonly tag: P2pEvent_Tags.DriverFailed;
|
|
1683
|
+
readonly inner: Readonly<{
|
|
1684
|
+
kind: DriverFailureKind;
|
|
1685
|
+
detail: string;
|
|
1686
|
+
}>;
|
|
1687
|
+
};
|
|
1688
|
+
"new"(inner: {
|
|
1689
|
+
kind: DriverFailureKind;
|
|
1690
|
+
detail: string;
|
|
1691
|
+
}): {
|
|
1692
|
+
/**
|
|
1693
|
+
* @private
|
|
1694
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1695
|
+
*/
|
|
1696
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1697
|
+
readonly tag: P2pEvent_Tags.DriverFailed;
|
|
1698
|
+
readonly inner: Readonly<{
|
|
1699
|
+
kind: DriverFailureKind;
|
|
1700
|
+
detail: string;
|
|
1701
|
+
}>;
|
|
1702
|
+
};
|
|
1703
|
+
instanceOf(obj: any): obj is {
|
|
1704
|
+
/**
|
|
1705
|
+
* @private
|
|
1706
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1707
|
+
*/
|
|
1708
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1709
|
+
readonly tag: P2pEvent_Tags.DriverFailed;
|
|
1710
|
+
readonly inner: Readonly<{
|
|
1711
|
+
kind: DriverFailureKind;
|
|
1712
|
+
detail: string;
|
|
1713
|
+
}>;
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
ConnectionEstablished: {
|
|
1717
|
+
new (inner: {
|
|
1718
|
+
peerId: string;
|
|
1719
|
+
connId: bigint;
|
|
1720
|
+
}): {
|
|
1721
|
+
/**
|
|
1722
|
+
* @private
|
|
1723
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1724
|
+
*/
|
|
1725
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1726
|
+
readonly tag: P2pEvent_Tags.ConnectionEstablished;
|
|
1727
|
+
readonly inner: Readonly<{
|
|
1728
|
+
peerId: string;
|
|
1729
|
+
connId: bigint;
|
|
1730
|
+
}>;
|
|
1731
|
+
};
|
|
1732
|
+
"new"(inner: {
|
|
1733
|
+
peerId: string;
|
|
1734
|
+
connId: bigint;
|
|
1735
|
+
}): {
|
|
1736
|
+
/**
|
|
1737
|
+
* @private
|
|
1738
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1739
|
+
*/
|
|
1740
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1741
|
+
readonly tag: P2pEvent_Tags.ConnectionEstablished;
|
|
1742
|
+
readonly inner: Readonly<{
|
|
1743
|
+
peerId: string;
|
|
1744
|
+
connId: bigint;
|
|
1745
|
+
}>;
|
|
1746
|
+
};
|
|
1747
|
+
instanceOf(obj: any): obj is {
|
|
1748
|
+
/**
|
|
1749
|
+
* @private
|
|
1750
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1751
|
+
*/
|
|
1752
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1753
|
+
readonly tag: P2pEvent_Tags.ConnectionEstablished;
|
|
1754
|
+
readonly inner: Readonly<{
|
|
1755
|
+
peerId: string;
|
|
1756
|
+
connId: bigint;
|
|
1757
|
+
}>;
|
|
1758
|
+
};
|
|
1759
|
+
};
|
|
1760
|
+
ConnectionClosed: {
|
|
1761
|
+
new (inner: {
|
|
1762
|
+
peerId: string;
|
|
1763
|
+
connId: bigint;
|
|
1764
|
+
}): {
|
|
1765
|
+
/**
|
|
1766
|
+
* @private
|
|
1767
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1768
|
+
*/
|
|
1769
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1770
|
+
readonly tag: P2pEvent_Tags.ConnectionClosed;
|
|
1771
|
+
readonly inner: Readonly<{
|
|
1772
|
+
peerId: string;
|
|
1773
|
+
connId: bigint;
|
|
1774
|
+
}>;
|
|
1775
|
+
};
|
|
1776
|
+
"new"(inner: {
|
|
1777
|
+
peerId: string;
|
|
1778
|
+
connId: bigint;
|
|
1779
|
+
}): {
|
|
1780
|
+
/**
|
|
1781
|
+
* @private
|
|
1782
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1783
|
+
*/
|
|
1784
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1785
|
+
readonly tag: P2pEvent_Tags.ConnectionClosed;
|
|
1786
|
+
readonly inner: Readonly<{
|
|
1787
|
+
peerId: string;
|
|
1788
|
+
connId: bigint;
|
|
1789
|
+
}>;
|
|
1790
|
+
};
|
|
1791
|
+
instanceOf(obj: any): obj is {
|
|
1792
|
+
/**
|
|
1793
|
+
* @private
|
|
1794
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1795
|
+
*/
|
|
1796
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1797
|
+
readonly tag: P2pEvent_Tags.ConnectionClosed;
|
|
1798
|
+
readonly inner: Readonly<{
|
|
1799
|
+
peerId: string;
|
|
1800
|
+
connId: bigint;
|
|
1801
|
+
}>;
|
|
1802
|
+
};
|
|
1803
|
+
};
|
|
1804
|
+
ConnectionReplaced: {
|
|
1805
|
+
new (inner: {
|
|
1806
|
+
peerId: string;
|
|
1807
|
+
oldConnId: bigint;
|
|
1808
|
+
newConnId: bigint;
|
|
1809
|
+
}): {
|
|
1810
|
+
/**
|
|
1811
|
+
* @private
|
|
1812
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1813
|
+
*/
|
|
1814
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1815
|
+
readonly tag: P2pEvent_Tags.ConnectionReplaced;
|
|
1816
|
+
readonly inner: Readonly<{
|
|
1817
|
+
peerId: string;
|
|
1818
|
+
oldConnId: bigint;
|
|
1819
|
+
newConnId: bigint;
|
|
1820
|
+
}>;
|
|
1821
|
+
};
|
|
1822
|
+
"new"(inner: {
|
|
1823
|
+
peerId: string;
|
|
1824
|
+
oldConnId: bigint;
|
|
1825
|
+
newConnId: bigint;
|
|
1826
|
+
}): {
|
|
1827
|
+
/**
|
|
1828
|
+
* @private
|
|
1829
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1830
|
+
*/
|
|
1831
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1832
|
+
readonly tag: P2pEvent_Tags.ConnectionReplaced;
|
|
1833
|
+
readonly inner: Readonly<{
|
|
1834
|
+
peerId: string;
|
|
1835
|
+
oldConnId: bigint;
|
|
1836
|
+
newConnId: bigint;
|
|
1837
|
+
}>;
|
|
1838
|
+
};
|
|
1839
|
+
instanceOf(obj: any): obj is {
|
|
1840
|
+
/**
|
|
1841
|
+
* @private
|
|
1842
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1843
|
+
*/
|
|
1844
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1845
|
+
readonly tag: P2pEvent_Tags.ConnectionReplaced;
|
|
1846
|
+
readonly inner: Readonly<{
|
|
1847
|
+
peerId: string;
|
|
1848
|
+
oldConnId: bigint;
|
|
1849
|
+
newConnId: bigint;
|
|
1850
|
+
}>;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
PeerReady: {
|
|
1854
|
+
new (inner: {
|
|
1855
|
+
peerId: string;
|
|
1856
|
+
connId: bigint;
|
|
1857
|
+
protocols: Array<string>;
|
|
1858
|
+
}): {
|
|
1859
|
+
/**
|
|
1860
|
+
* @private
|
|
1861
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1862
|
+
*/
|
|
1863
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1864
|
+
readonly tag: P2pEvent_Tags.PeerReady;
|
|
1865
|
+
readonly inner: Readonly<{
|
|
1866
|
+
peerId: string;
|
|
1867
|
+
connId: bigint;
|
|
1868
|
+
protocols: Array<string>;
|
|
1869
|
+
}>;
|
|
1870
|
+
};
|
|
1871
|
+
"new"(inner: {
|
|
1872
|
+
peerId: string;
|
|
1873
|
+
connId: bigint;
|
|
1874
|
+
protocols: Array<string>;
|
|
1875
|
+
}): {
|
|
1876
|
+
/**
|
|
1877
|
+
* @private
|
|
1878
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1879
|
+
*/
|
|
1880
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1881
|
+
readonly tag: P2pEvent_Tags.PeerReady;
|
|
1882
|
+
readonly inner: Readonly<{
|
|
1883
|
+
peerId: string;
|
|
1884
|
+
connId: bigint;
|
|
1885
|
+
protocols: Array<string>;
|
|
1886
|
+
}>;
|
|
1887
|
+
};
|
|
1888
|
+
instanceOf(obj: any): obj is {
|
|
1889
|
+
/**
|
|
1890
|
+
* @private
|
|
1891
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1892
|
+
*/
|
|
1893
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1894
|
+
readonly tag: P2pEvent_Tags.PeerReady;
|
|
1895
|
+
readonly inner: Readonly<{
|
|
1896
|
+
peerId: string;
|
|
1897
|
+
connId: bigint;
|
|
1898
|
+
protocols: Array<string>;
|
|
1899
|
+
}>;
|
|
1900
|
+
};
|
|
1901
|
+
};
|
|
1902
|
+
IdentifyReceived: {
|
|
1903
|
+
new (inner: {
|
|
1904
|
+
peerId: string;
|
|
1905
|
+
info: IdentifyInfo;
|
|
1906
|
+
}): {
|
|
1907
|
+
/**
|
|
1908
|
+
* @private
|
|
1909
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1910
|
+
*/
|
|
1911
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1912
|
+
readonly tag: P2pEvent_Tags.IdentifyReceived;
|
|
1913
|
+
readonly inner: Readonly<{
|
|
1914
|
+
peerId: string;
|
|
1915
|
+
info: IdentifyInfo;
|
|
1916
|
+
}>;
|
|
1917
|
+
};
|
|
1918
|
+
"new"(inner: {
|
|
1919
|
+
peerId: string;
|
|
1920
|
+
info: IdentifyInfo;
|
|
1921
|
+
}): {
|
|
1922
|
+
/**
|
|
1923
|
+
* @private
|
|
1924
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1925
|
+
*/
|
|
1926
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1927
|
+
readonly tag: P2pEvent_Tags.IdentifyReceived;
|
|
1928
|
+
readonly inner: Readonly<{
|
|
1929
|
+
peerId: string;
|
|
1930
|
+
info: IdentifyInfo;
|
|
1931
|
+
}>;
|
|
1932
|
+
};
|
|
1933
|
+
instanceOf(obj: any): obj is {
|
|
1934
|
+
/**
|
|
1935
|
+
* @private
|
|
1936
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1937
|
+
*/
|
|
1938
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1939
|
+
readonly tag: P2pEvent_Tags.IdentifyReceived;
|
|
1940
|
+
readonly inner: Readonly<{
|
|
1941
|
+
peerId: string;
|
|
1942
|
+
info: IdentifyInfo;
|
|
1943
|
+
}>;
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
PingRttMeasured: {
|
|
1947
|
+
new (inner: {
|
|
1948
|
+
peerId: string;
|
|
1949
|
+
rttMs: bigint;
|
|
1950
|
+
}): {
|
|
1951
|
+
/**
|
|
1952
|
+
* @private
|
|
1953
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1954
|
+
*/
|
|
1955
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1956
|
+
readonly tag: P2pEvent_Tags.PingRttMeasured;
|
|
1957
|
+
readonly inner: Readonly<{
|
|
1958
|
+
peerId: string;
|
|
1959
|
+
rttMs: bigint;
|
|
1960
|
+
}>;
|
|
1961
|
+
};
|
|
1962
|
+
"new"(inner: {
|
|
1963
|
+
peerId: string;
|
|
1964
|
+
rttMs: bigint;
|
|
1965
|
+
}): {
|
|
1966
|
+
/**
|
|
1967
|
+
* @private
|
|
1968
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1969
|
+
*/
|
|
1970
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1971
|
+
readonly tag: P2pEvent_Tags.PingRttMeasured;
|
|
1972
|
+
readonly inner: Readonly<{
|
|
1973
|
+
peerId: string;
|
|
1974
|
+
rttMs: bigint;
|
|
1975
|
+
}>;
|
|
1976
|
+
};
|
|
1977
|
+
instanceOf(obj: any): obj is {
|
|
1978
|
+
/**
|
|
1979
|
+
* @private
|
|
1980
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1981
|
+
*/
|
|
1982
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1983
|
+
readonly tag: P2pEvent_Tags.PingRttMeasured;
|
|
1984
|
+
readonly inner: Readonly<{
|
|
1985
|
+
peerId: string;
|
|
1986
|
+
rttMs: bigint;
|
|
1987
|
+
}>;
|
|
1988
|
+
};
|
|
1989
|
+
};
|
|
1990
|
+
PingTimeout: {
|
|
1991
|
+
new (inner: {
|
|
1992
|
+
peerId: string;
|
|
1993
|
+
}): {
|
|
1994
|
+
/**
|
|
1995
|
+
* @private
|
|
1996
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1997
|
+
*/
|
|
1998
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
1999
|
+
readonly tag: P2pEvent_Tags.PingTimeout;
|
|
2000
|
+
readonly inner: Readonly<{
|
|
2001
|
+
peerId: string;
|
|
2002
|
+
}>;
|
|
2003
|
+
};
|
|
2004
|
+
"new"(inner: {
|
|
2005
|
+
peerId: string;
|
|
2006
|
+
}): {
|
|
2007
|
+
/**
|
|
2008
|
+
* @private
|
|
2009
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2010
|
+
*/
|
|
2011
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2012
|
+
readonly tag: P2pEvent_Tags.PingTimeout;
|
|
2013
|
+
readonly inner: Readonly<{
|
|
2014
|
+
peerId: string;
|
|
2015
|
+
}>;
|
|
2016
|
+
};
|
|
2017
|
+
instanceOf(obj: any): obj is {
|
|
2018
|
+
/**
|
|
2019
|
+
* @private
|
|
2020
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2021
|
+
*/
|
|
2022
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2023
|
+
readonly tag: P2pEvent_Tags.PingTimeout;
|
|
2024
|
+
readonly inner: Readonly<{
|
|
2025
|
+
peerId: string;
|
|
2026
|
+
}>;
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
2029
|
+
StreamReady: {
|
|
2030
|
+
new (inner: {
|
|
2031
|
+
peerId: string;
|
|
2032
|
+
connId: bigint;
|
|
2033
|
+
streamId: bigint;
|
|
2034
|
+
protocolId: string;
|
|
2035
|
+
initiatedLocally: boolean;
|
|
2036
|
+
}): {
|
|
2037
|
+
/**
|
|
2038
|
+
* @private
|
|
2039
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2040
|
+
*/
|
|
2041
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2042
|
+
readonly tag: P2pEvent_Tags.StreamReady;
|
|
2043
|
+
readonly inner: Readonly<{
|
|
2044
|
+
peerId: string;
|
|
2045
|
+
connId: bigint;
|
|
2046
|
+
streamId: bigint;
|
|
2047
|
+
protocolId: string;
|
|
2048
|
+
initiatedLocally: boolean;
|
|
2049
|
+
}>;
|
|
2050
|
+
};
|
|
2051
|
+
"new"(inner: {
|
|
2052
|
+
peerId: string;
|
|
2053
|
+
connId: bigint;
|
|
2054
|
+
streamId: bigint;
|
|
2055
|
+
protocolId: string;
|
|
2056
|
+
initiatedLocally: boolean;
|
|
2057
|
+
}): {
|
|
2058
|
+
/**
|
|
2059
|
+
* @private
|
|
2060
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2061
|
+
*/
|
|
2062
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2063
|
+
readonly tag: P2pEvent_Tags.StreamReady;
|
|
2064
|
+
readonly inner: Readonly<{
|
|
2065
|
+
peerId: string;
|
|
2066
|
+
connId: bigint;
|
|
2067
|
+
streamId: bigint;
|
|
2068
|
+
protocolId: string;
|
|
2069
|
+
initiatedLocally: boolean;
|
|
2070
|
+
}>;
|
|
2071
|
+
};
|
|
2072
|
+
instanceOf(obj: any): obj is {
|
|
2073
|
+
/**
|
|
2074
|
+
* @private
|
|
2075
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2076
|
+
*/
|
|
2077
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2078
|
+
readonly tag: P2pEvent_Tags.StreamReady;
|
|
2079
|
+
readonly inner: Readonly<{
|
|
2080
|
+
peerId: string;
|
|
2081
|
+
connId: bigint;
|
|
2082
|
+
streamId: bigint;
|
|
2083
|
+
protocolId: string;
|
|
2084
|
+
initiatedLocally: boolean;
|
|
2085
|
+
}>;
|
|
2086
|
+
};
|
|
2087
|
+
};
|
|
2088
|
+
StreamData: {
|
|
2089
|
+
new (inner: {
|
|
2090
|
+
peerId: string;
|
|
2091
|
+
connId: bigint;
|
|
2092
|
+
streamId: bigint;
|
|
2093
|
+
data: ArrayBuffer;
|
|
2094
|
+
}): {
|
|
2095
|
+
/**
|
|
2096
|
+
* @private
|
|
2097
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2098
|
+
*/
|
|
2099
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2100
|
+
readonly tag: P2pEvent_Tags.StreamData;
|
|
2101
|
+
readonly inner: Readonly<{
|
|
2102
|
+
peerId: string;
|
|
2103
|
+
connId: bigint;
|
|
2104
|
+
streamId: bigint;
|
|
2105
|
+
data: ArrayBuffer;
|
|
2106
|
+
}>;
|
|
2107
|
+
};
|
|
2108
|
+
"new"(inner: {
|
|
2109
|
+
peerId: string;
|
|
2110
|
+
connId: bigint;
|
|
2111
|
+
streamId: bigint;
|
|
2112
|
+
data: ArrayBuffer;
|
|
2113
|
+
}): {
|
|
2114
|
+
/**
|
|
2115
|
+
* @private
|
|
2116
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2117
|
+
*/
|
|
2118
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2119
|
+
readonly tag: P2pEvent_Tags.StreamData;
|
|
2120
|
+
readonly inner: Readonly<{
|
|
2121
|
+
peerId: string;
|
|
2122
|
+
connId: bigint;
|
|
2123
|
+
streamId: bigint;
|
|
2124
|
+
data: ArrayBuffer;
|
|
2125
|
+
}>;
|
|
2126
|
+
};
|
|
2127
|
+
instanceOf(obj: any): obj is {
|
|
2128
|
+
/**
|
|
2129
|
+
* @private
|
|
2130
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2131
|
+
*/
|
|
2132
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2133
|
+
readonly tag: P2pEvent_Tags.StreamData;
|
|
2134
|
+
readonly inner: Readonly<{
|
|
2135
|
+
peerId: string;
|
|
2136
|
+
connId: bigint;
|
|
2137
|
+
streamId: bigint;
|
|
2138
|
+
data: ArrayBuffer;
|
|
2139
|
+
}>;
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
StreamWriteAccepted: {
|
|
2143
|
+
new (inner: {
|
|
2144
|
+
peerId: string;
|
|
2145
|
+
connId: bigint;
|
|
2146
|
+
streamId: bigint;
|
|
2147
|
+
}): {
|
|
2148
|
+
/**
|
|
2149
|
+
* @private
|
|
2150
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2151
|
+
*/
|
|
2152
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2153
|
+
readonly tag: P2pEvent_Tags.StreamWriteAccepted;
|
|
2154
|
+
readonly inner: Readonly<{
|
|
2155
|
+
peerId: string;
|
|
2156
|
+
connId: bigint;
|
|
2157
|
+
streamId: bigint;
|
|
2158
|
+
}>;
|
|
2159
|
+
};
|
|
2160
|
+
"new"(inner: {
|
|
2161
|
+
peerId: string;
|
|
2162
|
+
connId: bigint;
|
|
2163
|
+
streamId: bigint;
|
|
2164
|
+
}): {
|
|
2165
|
+
/**
|
|
2166
|
+
* @private
|
|
2167
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2168
|
+
*/
|
|
2169
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2170
|
+
readonly tag: P2pEvent_Tags.StreamWriteAccepted;
|
|
2171
|
+
readonly inner: Readonly<{
|
|
2172
|
+
peerId: string;
|
|
2173
|
+
connId: bigint;
|
|
2174
|
+
streamId: bigint;
|
|
2175
|
+
}>;
|
|
2176
|
+
};
|
|
2177
|
+
instanceOf(obj: any): obj is {
|
|
2178
|
+
/**
|
|
2179
|
+
* @private
|
|
2180
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2181
|
+
*/
|
|
2182
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2183
|
+
readonly tag: P2pEvent_Tags.StreamWriteAccepted;
|
|
2184
|
+
readonly inner: Readonly<{
|
|
2185
|
+
peerId: string;
|
|
2186
|
+
connId: bigint;
|
|
2187
|
+
streamId: bigint;
|
|
2188
|
+
}>;
|
|
2189
|
+
};
|
|
2190
|
+
};
|
|
2191
|
+
StreamWriteStopped: {
|
|
2192
|
+
new (inner: {
|
|
2193
|
+
peerId: string;
|
|
2194
|
+
connId: bigint;
|
|
2195
|
+
streamId: bigint;
|
|
2196
|
+
errorCode: bigint;
|
|
2197
|
+
}): {
|
|
2198
|
+
/**
|
|
2199
|
+
* @private
|
|
2200
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2201
|
+
*/
|
|
2202
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2203
|
+
readonly tag: P2pEvent_Tags.StreamWriteStopped;
|
|
2204
|
+
readonly inner: Readonly<{
|
|
2205
|
+
peerId: string;
|
|
2206
|
+
connId: bigint;
|
|
2207
|
+
streamId: bigint;
|
|
2208
|
+
errorCode: bigint;
|
|
2209
|
+
}>;
|
|
2210
|
+
};
|
|
2211
|
+
"new"(inner: {
|
|
2212
|
+
peerId: string;
|
|
2213
|
+
connId: bigint;
|
|
2214
|
+
streamId: bigint;
|
|
2215
|
+
errorCode: bigint;
|
|
2216
|
+
}): {
|
|
2217
|
+
/**
|
|
2218
|
+
* @private
|
|
2219
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2220
|
+
*/
|
|
2221
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2222
|
+
readonly tag: P2pEvent_Tags.StreamWriteStopped;
|
|
2223
|
+
readonly inner: Readonly<{
|
|
2224
|
+
peerId: string;
|
|
2225
|
+
connId: bigint;
|
|
2226
|
+
streamId: bigint;
|
|
2227
|
+
errorCode: bigint;
|
|
2228
|
+
}>;
|
|
2229
|
+
};
|
|
2230
|
+
instanceOf(obj: any): obj is {
|
|
2231
|
+
/**
|
|
2232
|
+
* @private
|
|
2233
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2234
|
+
*/
|
|
2235
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2236
|
+
readonly tag: P2pEvent_Tags.StreamWriteStopped;
|
|
2237
|
+
readonly inner: Readonly<{
|
|
2238
|
+
peerId: string;
|
|
2239
|
+
connId: bigint;
|
|
2240
|
+
streamId: bigint;
|
|
2241
|
+
errorCode: bigint;
|
|
2242
|
+
}>;
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
StreamRemoteWriteClosed: {
|
|
2246
|
+
new (inner: {
|
|
2247
|
+
peerId: string;
|
|
2248
|
+
connId: bigint;
|
|
2249
|
+
streamId: bigint;
|
|
2250
|
+
}): {
|
|
2251
|
+
/**
|
|
2252
|
+
* @private
|
|
2253
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2254
|
+
*/
|
|
2255
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2256
|
+
readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
|
|
2257
|
+
readonly inner: Readonly<{
|
|
2258
|
+
peerId: string;
|
|
2259
|
+
connId: bigint;
|
|
2260
|
+
streamId: bigint;
|
|
2261
|
+
}>;
|
|
2262
|
+
};
|
|
2263
|
+
"new"(inner: {
|
|
2264
|
+
peerId: string;
|
|
2265
|
+
connId: bigint;
|
|
2266
|
+
streamId: bigint;
|
|
2267
|
+
}): {
|
|
2268
|
+
/**
|
|
2269
|
+
* @private
|
|
2270
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2271
|
+
*/
|
|
2272
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2273
|
+
readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
|
|
2274
|
+
readonly inner: Readonly<{
|
|
2275
|
+
peerId: string;
|
|
2276
|
+
connId: bigint;
|
|
2277
|
+
streamId: bigint;
|
|
2278
|
+
}>;
|
|
2279
|
+
};
|
|
2280
|
+
instanceOf(obj: any): obj is {
|
|
2281
|
+
/**
|
|
2282
|
+
* @private
|
|
2283
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2284
|
+
*/
|
|
2285
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2286
|
+
readonly tag: P2pEvent_Tags.StreamRemoteWriteClosed;
|
|
2287
|
+
readonly inner: Readonly<{
|
|
2288
|
+
peerId: string;
|
|
2289
|
+
connId: bigint;
|
|
2290
|
+
streamId: bigint;
|
|
2291
|
+
}>;
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
StreamClosed: {
|
|
2295
|
+
new (inner: {
|
|
2296
|
+
peerId: string;
|
|
2297
|
+
connId: bigint;
|
|
2298
|
+
streamId: bigint;
|
|
2299
|
+
}): {
|
|
2300
|
+
/**
|
|
2301
|
+
* @private
|
|
2302
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2303
|
+
*/
|
|
2304
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2305
|
+
readonly tag: P2pEvent_Tags.StreamClosed;
|
|
2306
|
+
readonly inner: Readonly<{
|
|
2307
|
+
peerId: string;
|
|
2308
|
+
connId: bigint;
|
|
2309
|
+
streamId: bigint;
|
|
2310
|
+
}>;
|
|
2311
|
+
};
|
|
2312
|
+
"new"(inner: {
|
|
2313
|
+
peerId: string;
|
|
2314
|
+
connId: bigint;
|
|
2315
|
+
streamId: bigint;
|
|
2316
|
+
}): {
|
|
2317
|
+
/**
|
|
2318
|
+
* @private
|
|
2319
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2320
|
+
*/
|
|
2321
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2322
|
+
readonly tag: P2pEvent_Tags.StreamClosed;
|
|
2323
|
+
readonly inner: Readonly<{
|
|
2324
|
+
peerId: string;
|
|
2325
|
+
connId: bigint;
|
|
2326
|
+
streamId: bigint;
|
|
2327
|
+
}>;
|
|
2328
|
+
};
|
|
2329
|
+
instanceOf(obj: any): obj is {
|
|
2330
|
+
/**
|
|
2331
|
+
* @private
|
|
2332
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2333
|
+
*/
|
|
2334
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2335
|
+
readonly tag: P2pEvent_Tags.StreamClosed;
|
|
2336
|
+
readonly inner: Readonly<{
|
|
2337
|
+
peerId: string;
|
|
2338
|
+
connId: bigint;
|
|
2339
|
+
streamId: bigint;
|
|
2340
|
+
}>;
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
EndpointError: {
|
|
2344
|
+
new (inner: {
|
|
2345
|
+
kind: EndpointErrorKind;
|
|
2346
|
+
peerId?: string;
|
|
2347
|
+
connId?: bigint;
|
|
2348
|
+
streamId?: bigint;
|
|
2349
|
+
detail: string;
|
|
2350
|
+
}): {
|
|
2351
|
+
/**
|
|
2352
|
+
* @private
|
|
2353
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2354
|
+
*/
|
|
2355
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2356
|
+
readonly tag: P2pEvent_Tags.EndpointError;
|
|
2357
|
+
readonly inner: Readonly<{
|
|
2358
|
+
kind: EndpointErrorKind;
|
|
2359
|
+
peerId?: string;
|
|
2360
|
+
connId?: bigint;
|
|
2361
|
+
streamId?: bigint;
|
|
2362
|
+
detail: string;
|
|
2363
|
+
}>;
|
|
2364
|
+
};
|
|
2365
|
+
"new"(inner: {
|
|
2366
|
+
kind: EndpointErrorKind;
|
|
2367
|
+
peerId?: string;
|
|
2368
|
+
connId?: bigint;
|
|
2369
|
+
streamId?: bigint;
|
|
2370
|
+
detail: string;
|
|
2371
|
+
}): {
|
|
2372
|
+
/**
|
|
2373
|
+
* @private
|
|
2374
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2375
|
+
*/
|
|
2376
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2377
|
+
readonly tag: P2pEvent_Tags.EndpointError;
|
|
2378
|
+
readonly inner: Readonly<{
|
|
2379
|
+
kind: EndpointErrorKind;
|
|
2380
|
+
peerId?: string;
|
|
2381
|
+
connId?: bigint;
|
|
2382
|
+
streamId?: bigint;
|
|
2383
|
+
detail: string;
|
|
2384
|
+
}>;
|
|
2385
|
+
};
|
|
2386
|
+
instanceOf(obj: any): obj is {
|
|
2387
|
+
/**
|
|
2388
|
+
* @private
|
|
2389
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2390
|
+
*/
|
|
2391
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2392
|
+
readonly tag: P2pEvent_Tags.EndpointError;
|
|
2393
|
+
readonly inner: Readonly<{
|
|
2394
|
+
kind: EndpointErrorKind;
|
|
2395
|
+
peerId?: string;
|
|
2396
|
+
connId?: bigint;
|
|
2397
|
+
streamId?: bigint;
|
|
2398
|
+
detail: string;
|
|
2399
|
+
}>;
|
|
2400
|
+
};
|
|
2401
|
+
};
|
|
2402
|
+
ReachabilityChanged: {
|
|
2403
|
+
new (inner: {
|
|
2404
|
+
previous: Reachability;
|
|
2405
|
+
current: Reachability;
|
|
2406
|
+
confirmedAddrs: Array<string>;
|
|
2407
|
+
}): {
|
|
2408
|
+
/**
|
|
2409
|
+
* @private
|
|
2410
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2411
|
+
*/
|
|
2412
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2413
|
+
readonly tag: P2pEvent_Tags.ReachabilityChanged;
|
|
2414
|
+
readonly inner: Readonly<{
|
|
2415
|
+
previous: Reachability;
|
|
2416
|
+
current: Reachability;
|
|
2417
|
+
confirmedAddrs: Array<string>;
|
|
2418
|
+
}>;
|
|
2419
|
+
};
|
|
2420
|
+
"new"(inner: {
|
|
2421
|
+
previous: Reachability;
|
|
2422
|
+
current: Reachability;
|
|
2423
|
+
confirmedAddrs: Array<string>;
|
|
2424
|
+
}): {
|
|
2425
|
+
/**
|
|
2426
|
+
* @private
|
|
2427
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2428
|
+
*/
|
|
2429
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2430
|
+
readonly tag: P2pEvent_Tags.ReachabilityChanged;
|
|
2431
|
+
readonly inner: Readonly<{
|
|
2432
|
+
previous: Reachability;
|
|
2433
|
+
current: Reachability;
|
|
2434
|
+
confirmedAddrs: Array<string>;
|
|
2435
|
+
}>;
|
|
2436
|
+
};
|
|
2437
|
+
instanceOf(obj: any): obj is {
|
|
2438
|
+
/**
|
|
2439
|
+
* @private
|
|
2440
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2441
|
+
*/
|
|
2442
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2443
|
+
readonly tag: P2pEvent_Tags.ReachabilityChanged;
|
|
2444
|
+
readonly inner: Readonly<{
|
|
2445
|
+
previous: Reachability;
|
|
2446
|
+
current: Reachability;
|
|
2447
|
+
confirmedAddrs: Array<string>;
|
|
2448
|
+
}>;
|
|
2449
|
+
};
|
|
2450
|
+
};
|
|
2451
|
+
PublicAddressesChanged: {
|
|
2452
|
+
new (inner: {
|
|
2453
|
+
addrs: Array<string>;
|
|
2454
|
+
}): {
|
|
2455
|
+
/**
|
|
2456
|
+
* @private
|
|
2457
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2458
|
+
*/
|
|
2459
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2460
|
+
readonly tag: P2pEvent_Tags.PublicAddressesChanged;
|
|
2461
|
+
readonly inner: Readonly<{
|
|
2462
|
+
addrs: Array<string>;
|
|
2463
|
+
}>;
|
|
2464
|
+
};
|
|
2465
|
+
"new"(inner: {
|
|
2466
|
+
addrs: Array<string>;
|
|
2467
|
+
}): {
|
|
2468
|
+
/**
|
|
2469
|
+
* @private
|
|
2470
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2471
|
+
*/
|
|
2472
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2473
|
+
readonly tag: P2pEvent_Tags.PublicAddressesChanged;
|
|
2474
|
+
readonly inner: Readonly<{
|
|
2475
|
+
addrs: Array<string>;
|
|
2476
|
+
}>;
|
|
2477
|
+
};
|
|
2478
|
+
instanceOf(obj: any): obj is {
|
|
2479
|
+
/**
|
|
2480
|
+
* @private
|
|
2481
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2482
|
+
*/
|
|
2483
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2484
|
+
readonly tag: P2pEvent_Tags.PublicAddressesChanged;
|
|
2485
|
+
readonly inner: Readonly<{
|
|
2486
|
+
addrs: Array<string>;
|
|
2487
|
+
}>;
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
RelayReserved: {
|
|
2491
|
+
new (inner: {
|
|
2492
|
+
relayPeerId: string;
|
|
2493
|
+
expiresUnixSecs?: bigint;
|
|
2494
|
+
}): {
|
|
2495
|
+
/**
|
|
2496
|
+
* @private
|
|
2497
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2498
|
+
*/
|
|
2499
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2500
|
+
readonly tag: P2pEvent_Tags.RelayReserved;
|
|
2501
|
+
readonly inner: Readonly<{
|
|
2502
|
+
relayPeerId: string;
|
|
2503
|
+
expiresUnixSecs?: bigint;
|
|
2504
|
+
}>;
|
|
2505
|
+
};
|
|
2506
|
+
"new"(inner: {
|
|
2507
|
+
relayPeerId: string;
|
|
2508
|
+
expiresUnixSecs?: bigint;
|
|
2509
|
+
}): {
|
|
2510
|
+
/**
|
|
2511
|
+
* @private
|
|
2512
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2513
|
+
*/
|
|
2514
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2515
|
+
readonly tag: P2pEvent_Tags.RelayReserved;
|
|
2516
|
+
readonly inner: Readonly<{
|
|
2517
|
+
relayPeerId: string;
|
|
2518
|
+
expiresUnixSecs?: bigint;
|
|
2519
|
+
}>;
|
|
2520
|
+
};
|
|
2521
|
+
instanceOf(obj: any): obj is {
|
|
2522
|
+
/**
|
|
2523
|
+
* @private
|
|
2524
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2525
|
+
*/
|
|
2526
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2527
|
+
readonly tag: P2pEvent_Tags.RelayReserved;
|
|
2528
|
+
readonly inner: Readonly<{
|
|
2529
|
+
relayPeerId: string;
|
|
2530
|
+
expiresUnixSecs?: bigint;
|
|
2531
|
+
}>;
|
|
2532
|
+
};
|
|
2533
|
+
};
|
|
2534
|
+
RelayReservationLost: {
|
|
2535
|
+
new (inner: {
|
|
2536
|
+
relayPeerId: string;
|
|
2537
|
+
}): {
|
|
2538
|
+
/**
|
|
2539
|
+
* @private
|
|
2540
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2541
|
+
*/
|
|
2542
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2543
|
+
readonly tag: P2pEvent_Tags.RelayReservationLost;
|
|
2544
|
+
readonly inner: Readonly<{
|
|
2545
|
+
relayPeerId: string;
|
|
2546
|
+
}>;
|
|
2547
|
+
};
|
|
2548
|
+
"new"(inner: {
|
|
2549
|
+
relayPeerId: string;
|
|
2550
|
+
}): {
|
|
2551
|
+
/**
|
|
2552
|
+
* @private
|
|
2553
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2554
|
+
*/
|
|
2555
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2556
|
+
readonly tag: P2pEvent_Tags.RelayReservationLost;
|
|
2557
|
+
readonly inner: Readonly<{
|
|
2558
|
+
relayPeerId: string;
|
|
2559
|
+
}>;
|
|
2560
|
+
};
|
|
2561
|
+
instanceOf(obj: any): obj is {
|
|
2562
|
+
/**
|
|
2563
|
+
* @private
|
|
2564
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2565
|
+
*/
|
|
2566
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2567
|
+
readonly tag: P2pEvent_Tags.RelayReservationLost;
|
|
2568
|
+
readonly inner: Readonly<{
|
|
2569
|
+
relayPeerId: string;
|
|
2570
|
+
}>;
|
|
2571
|
+
};
|
|
2572
|
+
};
|
|
2573
|
+
PathEstablished: {
|
|
2574
|
+
new (inner: {
|
|
2575
|
+
connectId: bigint;
|
|
2576
|
+
peerId: string;
|
|
2577
|
+
connId: bigint;
|
|
2578
|
+
path: PathKind;
|
|
2579
|
+
}): {
|
|
2580
|
+
/**
|
|
2581
|
+
* @private
|
|
2582
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2583
|
+
*/
|
|
2584
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2585
|
+
readonly tag: P2pEvent_Tags.PathEstablished;
|
|
2586
|
+
readonly inner: Readonly<{
|
|
2587
|
+
connectId: bigint;
|
|
2588
|
+
peerId: string;
|
|
2589
|
+
connId: bigint;
|
|
2590
|
+
path: PathKind;
|
|
2591
|
+
}>;
|
|
2592
|
+
};
|
|
2593
|
+
"new"(inner: {
|
|
2594
|
+
connectId: bigint;
|
|
2595
|
+
peerId: string;
|
|
2596
|
+
connId: bigint;
|
|
2597
|
+
path: PathKind;
|
|
2598
|
+
}): {
|
|
2599
|
+
/**
|
|
2600
|
+
* @private
|
|
2601
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2602
|
+
*/
|
|
2603
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2604
|
+
readonly tag: P2pEvent_Tags.PathEstablished;
|
|
2605
|
+
readonly inner: Readonly<{
|
|
2606
|
+
connectId: bigint;
|
|
2607
|
+
peerId: string;
|
|
2608
|
+
connId: bigint;
|
|
2609
|
+
path: PathKind;
|
|
2610
|
+
}>;
|
|
2611
|
+
};
|
|
2612
|
+
instanceOf(obj: any): obj is {
|
|
2613
|
+
/**
|
|
2614
|
+
* @private
|
|
2615
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2616
|
+
*/
|
|
2617
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2618
|
+
readonly tag: P2pEvent_Tags.PathEstablished;
|
|
2619
|
+
readonly inner: Readonly<{
|
|
2620
|
+
connectId: bigint;
|
|
2621
|
+
peerId: string;
|
|
2622
|
+
connId: bigint;
|
|
2623
|
+
path: PathKind;
|
|
2624
|
+
}>;
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
InboundPathEstablished: {
|
|
2628
|
+
new (inner: {
|
|
2629
|
+
peerId: string;
|
|
2630
|
+
path: PathKind;
|
|
2631
|
+
}): {
|
|
2632
|
+
/**
|
|
2633
|
+
* @private
|
|
2634
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2635
|
+
*/
|
|
2636
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2637
|
+
readonly tag: P2pEvent_Tags.InboundPathEstablished;
|
|
2638
|
+
readonly inner: Readonly<{
|
|
2639
|
+
peerId: string;
|
|
2640
|
+
path: PathKind;
|
|
2641
|
+
}>;
|
|
2642
|
+
};
|
|
2643
|
+
"new"(inner: {
|
|
2644
|
+
peerId: string;
|
|
2645
|
+
path: PathKind;
|
|
2646
|
+
}): {
|
|
2647
|
+
/**
|
|
2648
|
+
* @private
|
|
2649
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2650
|
+
*/
|
|
2651
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2652
|
+
readonly tag: P2pEvent_Tags.InboundPathEstablished;
|
|
2653
|
+
readonly inner: Readonly<{
|
|
2654
|
+
peerId: string;
|
|
2655
|
+
path: PathKind;
|
|
2656
|
+
}>;
|
|
2657
|
+
};
|
|
2658
|
+
instanceOf(obj: any): obj is {
|
|
2659
|
+
/**
|
|
2660
|
+
* @private
|
|
2661
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2662
|
+
*/
|
|
2663
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2664
|
+
readonly tag: P2pEvent_Tags.InboundPathEstablished;
|
|
2665
|
+
readonly inner: Readonly<{
|
|
2666
|
+
peerId: string;
|
|
2667
|
+
path: PathKind;
|
|
2668
|
+
}>;
|
|
2669
|
+
};
|
|
2670
|
+
};
|
|
2671
|
+
PathUpgraded: {
|
|
2672
|
+
new (inner: {
|
|
2673
|
+
connectId: bigint;
|
|
2674
|
+
peerId: string;
|
|
2675
|
+
from: PathKind;
|
|
2676
|
+
to: PathKind;
|
|
2677
|
+
}): {
|
|
2678
|
+
/**
|
|
2679
|
+
* @private
|
|
2680
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2681
|
+
*/
|
|
2682
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2683
|
+
readonly tag: P2pEvent_Tags.PathUpgraded;
|
|
2684
|
+
readonly inner: Readonly<{
|
|
2685
|
+
connectId: bigint;
|
|
2686
|
+
peerId: string;
|
|
2687
|
+
from: PathKind;
|
|
2688
|
+
to: PathKind;
|
|
2689
|
+
}>;
|
|
2690
|
+
};
|
|
2691
|
+
"new"(inner: {
|
|
2692
|
+
connectId: bigint;
|
|
2693
|
+
peerId: string;
|
|
2694
|
+
from: PathKind;
|
|
2695
|
+
to: PathKind;
|
|
2696
|
+
}): {
|
|
2697
|
+
/**
|
|
2698
|
+
* @private
|
|
2699
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2700
|
+
*/
|
|
2701
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2702
|
+
readonly tag: P2pEvent_Tags.PathUpgraded;
|
|
2703
|
+
readonly inner: Readonly<{
|
|
2704
|
+
connectId: bigint;
|
|
2705
|
+
peerId: string;
|
|
2706
|
+
from: PathKind;
|
|
2707
|
+
to: PathKind;
|
|
2708
|
+
}>;
|
|
2709
|
+
};
|
|
2710
|
+
instanceOf(obj: any): obj is {
|
|
2711
|
+
/**
|
|
2712
|
+
* @private
|
|
2713
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2714
|
+
*/
|
|
2715
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2716
|
+
readonly tag: P2pEvent_Tags.PathUpgraded;
|
|
2717
|
+
readonly inner: Readonly<{
|
|
2718
|
+
connectId: bigint;
|
|
2719
|
+
peerId: string;
|
|
2720
|
+
from: PathKind;
|
|
2721
|
+
to: PathKind;
|
|
2722
|
+
}>;
|
|
2723
|
+
};
|
|
2724
|
+
};
|
|
2725
|
+
HolePunchFailed: {
|
|
2726
|
+
new (inner: {
|
|
2727
|
+
connectId: bigint;
|
|
2728
|
+
attempt: number;
|
|
2729
|
+
reason: string;
|
|
2730
|
+
}): {
|
|
2731
|
+
/**
|
|
2732
|
+
* @private
|
|
2733
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2734
|
+
*/
|
|
2735
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2736
|
+
readonly tag: P2pEvent_Tags.HolePunchFailed;
|
|
2737
|
+
readonly inner: Readonly<{
|
|
2738
|
+
connectId: bigint;
|
|
2739
|
+
attempt: number;
|
|
2740
|
+
reason: string;
|
|
2741
|
+
}>;
|
|
2742
|
+
};
|
|
2743
|
+
"new"(inner: {
|
|
2744
|
+
connectId: bigint;
|
|
2745
|
+
attempt: number;
|
|
2746
|
+
reason: string;
|
|
2747
|
+
}): {
|
|
2748
|
+
/**
|
|
2749
|
+
* @private
|
|
2750
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2751
|
+
*/
|
|
2752
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2753
|
+
readonly tag: P2pEvent_Tags.HolePunchFailed;
|
|
2754
|
+
readonly inner: Readonly<{
|
|
2755
|
+
connectId: bigint;
|
|
2756
|
+
attempt: number;
|
|
2757
|
+
reason: string;
|
|
2758
|
+
}>;
|
|
2759
|
+
};
|
|
2760
|
+
instanceOf(obj: any): obj is {
|
|
2761
|
+
/**
|
|
2762
|
+
* @private
|
|
2763
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2764
|
+
*/
|
|
2765
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2766
|
+
readonly tag: P2pEvent_Tags.HolePunchFailed;
|
|
2767
|
+
readonly inner: Readonly<{
|
|
2768
|
+
connectId: bigint;
|
|
2769
|
+
attempt: number;
|
|
2770
|
+
reason: string;
|
|
2771
|
+
}>;
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
ConnectFailed: {
|
|
2775
|
+
new (inner: {
|
|
2776
|
+
connectId: bigint;
|
|
2777
|
+
peerId: string;
|
|
2778
|
+
kind: NatErrorKind;
|
|
2779
|
+
detail: string;
|
|
2780
|
+
}): {
|
|
2781
|
+
/**
|
|
2782
|
+
* @private
|
|
2783
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2784
|
+
*/
|
|
2785
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2786
|
+
readonly tag: P2pEvent_Tags.ConnectFailed;
|
|
2787
|
+
readonly inner: Readonly<{
|
|
2788
|
+
connectId: bigint;
|
|
2789
|
+
peerId: string;
|
|
2790
|
+
kind: NatErrorKind;
|
|
2791
|
+
detail: string;
|
|
2792
|
+
}>;
|
|
2793
|
+
};
|
|
2794
|
+
"new"(inner: {
|
|
2795
|
+
connectId: bigint;
|
|
2796
|
+
peerId: string;
|
|
2797
|
+
kind: NatErrorKind;
|
|
2798
|
+
detail: string;
|
|
2799
|
+
}): {
|
|
2800
|
+
/**
|
|
2801
|
+
* @private
|
|
2802
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2803
|
+
*/
|
|
2804
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2805
|
+
readonly tag: P2pEvent_Tags.ConnectFailed;
|
|
2806
|
+
readonly inner: Readonly<{
|
|
2807
|
+
connectId: bigint;
|
|
2808
|
+
peerId: string;
|
|
2809
|
+
kind: NatErrorKind;
|
|
2810
|
+
detail: string;
|
|
2811
|
+
}>;
|
|
2812
|
+
};
|
|
2813
|
+
instanceOf(obj: any): obj is {
|
|
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.ConnectFailed;
|
|
2820
|
+
readonly inner: Readonly<{
|
|
2821
|
+
connectId: bigint;
|
|
2822
|
+
peerId: string;
|
|
2823
|
+
kind: NatErrorKind;
|
|
2824
|
+
detail: string;
|
|
2825
|
+
}>;
|
|
2826
|
+
};
|
|
2827
|
+
};
|
|
2828
|
+
ConnectCancelled: {
|
|
2829
|
+
new (inner: {
|
|
2830
|
+
connectId: bigint;
|
|
2831
|
+
peerId: string;
|
|
2832
|
+
}): {
|
|
2833
|
+
/**
|
|
2834
|
+
* @private
|
|
2835
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2836
|
+
*/
|
|
2837
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2838
|
+
readonly tag: P2pEvent_Tags.ConnectCancelled;
|
|
2839
|
+
readonly inner: Readonly<{
|
|
2840
|
+
connectId: bigint;
|
|
2841
|
+
peerId: string;
|
|
2842
|
+
}>;
|
|
2843
|
+
};
|
|
2844
|
+
"new"(inner: {
|
|
2845
|
+
connectId: bigint;
|
|
2846
|
+
peerId: string;
|
|
2847
|
+
}): {
|
|
2848
|
+
/**
|
|
2849
|
+
* @private
|
|
2850
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2851
|
+
*/
|
|
2852
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2853
|
+
readonly tag: P2pEvent_Tags.ConnectCancelled;
|
|
2854
|
+
readonly inner: Readonly<{
|
|
2855
|
+
connectId: bigint;
|
|
2856
|
+
peerId: string;
|
|
2857
|
+
}>;
|
|
2858
|
+
};
|
|
2859
|
+
instanceOf(obj: any): obj is {
|
|
2860
|
+
/**
|
|
2861
|
+
* @private
|
|
2862
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2863
|
+
*/
|
|
2864
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2865
|
+
readonly tag: P2pEvent_Tags.ConnectCancelled;
|
|
2866
|
+
readonly inner: Readonly<{
|
|
2867
|
+
connectId: bigint;
|
|
2868
|
+
peerId: string;
|
|
2869
|
+
}>;
|
|
2870
|
+
};
|
|
2871
|
+
};
|
|
2872
|
+
InboundDirectUpgrade: {
|
|
2873
|
+
new (inner: {
|
|
2874
|
+
peerId: string;
|
|
2875
|
+
}): {
|
|
2876
|
+
/**
|
|
2877
|
+
* @private
|
|
2878
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2879
|
+
*/
|
|
2880
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2881
|
+
readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
|
|
2882
|
+
readonly inner: Readonly<{
|
|
2883
|
+
peerId: string;
|
|
2884
|
+
}>;
|
|
2885
|
+
};
|
|
2886
|
+
"new"(inner: {
|
|
2887
|
+
peerId: string;
|
|
2888
|
+
}): {
|
|
2889
|
+
/**
|
|
2890
|
+
* @private
|
|
2891
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2892
|
+
*/
|
|
2893
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2894
|
+
readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
|
|
2895
|
+
readonly inner: Readonly<{
|
|
2896
|
+
peerId: string;
|
|
2897
|
+
}>;
|
|
2898
|
+
};
|
|
2899
|
+
instanceOf(obj: any): obj is {
|
|
2900
|
+
/**
|
|
2901
|
+
* @private
|
|
2902
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2903
|
+
*/
|
|
2904
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2905
|
+
readonly tag: P2pEvent_Tags.InboundDirectUpgrade;
|
|
2906
|
+
readonly inner: Readonly<{
|
|
2907
|
+
peerId: string;
|
|
2908
|
+
}>;
|
|
2909
|
+
};
|
|
2910
|
+
};
|
|
2911
|
+
Message: {
|
|
2912
|
+
new (inner: {
|
|
2913
|
+
fromPeerId: string;
|
|
2914
|
+
topics: Array<string>;
|
|
2915
|
+
data: ArrayBuffer;
|
|
2916
|
+
seqno: ArrayBuffer;
|
|
2917
|
+
signed: boolean;
|
|
2918
|
+
}): {
|
|
2919
|
+
/**
|
|
2920
|
+
* @private
|
|
2921
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2922
|
+
*/
|
|
2923
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2924
|
+
readonly tag: P2pEvent_Tags.Message;
|
|
2925
|
+
readonly inner: Readonly<{
|
|
2926
|
+
fromPeerId: string;
|
|
2927
|
+
topics: Array<string>;
|
|
2928
|
+
data: ArrayBuffer;
|
|
2929
|
+
seqno: ArrayBuffer;
|
|
2930
|
+
signed: boolean;
|
|
2931
|
+
}>;
|
|
2932
|
+
};
|
|
2933
|
+
"new"(inner: {
|
|
2934
|
+
fromPeerId: string;
|
|
2935
|
+
topics: Array<string>;
|
|
2936
|
+
data: ArrayBuffer;
|
|
2937
|
+
seqno: ArrayBuffer;
|
|
2938
|
+
signed: boolean;
|
|
2939
|
+
}): {
|
|
2940
|
+
/**
|
|
2941
|
+
* @private
|
|
2942
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2943
|
+
*/
|
|
2944
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2945
|
+
readonly tag: P2pEvent_Tags.Message;
|
|
2946
|
+
readonly inner: Readonly<{
|
|
2947
|
+
fromPeerId: string;
|
|
2948
|
+
topics: Array<string>;
|
|
2949
|
+
data: ArrayBuffer;
|
|
2950
|
+
seqno: ArrayBuffer;
|
|
2951
|
+
signed: boolean;
|
|
2952
|
+
}>;
|
|
2953
|
+
};
|
|
2954
|
+
instanceOf(obj: any): obj is {
|
|
2955
|
+
/**
|
|
2956
|
+
* @private
|
|
2957
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2958
|
+
*/
|
|
2959
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2960
|
+
readonly tag: P2pEvent_Tags.Message;
|
|
2961
|
+
readonly inner: Readonly<{
|
|
2962
|
+
fromPeerId: string;
|
|
2963
|
+
topics: Array<string>;
|
|
2964
|
+
data: ArrayBuffer;
|
|
2965
|
+
seqno: ArrayBuffer;
|
|
2966
|
+
signed: boolean;
|
|
2967
|
+
}>;
|
|
2968
|
+
};
|
|
2969
|
+
};
|
|
2970
|
+
PeerSubscribed: {
|
|
2971
|
+
new (inner: {
|
|
2972
|
+
peerId: string;
|
|
2973
|
+
topic: string;
|
|
2974
|
+
}): {
|
|
2975
|
+
/**
|
|
2976
|
+
* @private
|
|
2977
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2978
|
+
*/
|
|
2979
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2980
|
+
readonly tag: P2pEvent_Tags.PeerSubscribed;
|
|
2981
|
+
readonly inner: Readonly<{
|
|
2982
|
+
peerId: string;
|
|
2983
|
+
topic: string;
|
|
2984
|
+
}>;
|
|
2985
|
+
};
|
|
2986
|
+
"new"(inner: {
|
|
2987
|
+
peerId: string;
|
|
2988
|
+
topic: string;
|
|
2989
|
+
}): {
|
|
2990
|
+
/**
|
|
2991
|
+
* @private
|
|
2992
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2993
|
+
*/
|
|
2994
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
2995
|
+
readonly tag: P2pEvent_Tags.PeerSubscribed;
|
|
2996
|
+
readonly inner: Readonly<{
|
|
2997
|
+
peerId: string;
|
|
2998
|
+
topic: string;
|
|
2999
|
+
}>;
|
|
3000
|
+
};
|
|
3001
|
+
instanceOf(obj: any): obj is {
|
|
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.PeerSubscribed;
|
|
3008
|
+
readonly inner: Readonly<{
|
|
3009
|
+
peerId: string;
|
|
3010
|
+
topic: string;
|
|
3011
|
+
}>;
|
|
3012
|
+
};
|
|
3013
|
+
};
|
|
3014
|
+
PeerUnsubscribed: {
|
|
3015
|
+
new (inner: {
|
|
3016
|
+
peerId: string;
|
|
3017
|
+
topic: string;
|
|
3018
|
+
}): {
|
|
3019
|
+
/**
|
|
3020
|
+
* @private
|
|
3021
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3022
|
+
*/
|
|
3023
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3024
|
+
readonly tag: P2pEvent_Tags.PeerUnsubscribed;
|
|
3025
|
+
readonly inner: Readonly<{
|
|
3026
|
+
peerId: string;
|
|
3027
|
+
topic: string;
|
|
3028
|
+
}>;
|
|
3029
|
+
};
|
|
3030
|
+
"new"(inner: {
|
|
3031
|
+
peerId: string;
|
|
3032
|
+
topic: string;
|
|
3033
|
+
}): {
|
|
3034
|
+
/**
|
|
3035
|
+
* @private
|
|
3036
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3037
|
+
*/
|
|
3038
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3039
|
+
readonly tag: P2pEvent_Tags.PeerUnsubscribed;
|
|
3040
|
+
readonly inner: Readonly<{
|
|
3041
|
+
peerId: string;
|
|
3042
|
+
topic: string;
|
|
3043
|
+
}>;
|
|
3044
|
+
};
|
|
3045
|
+
instanceOf(obj: any): obj is {
|
|
3046
|
+
/**
|
|
3047
|
+
* @private
|
|
3048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3049
|
+
*/
|
|
3050
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3051
|
+
readonly tag: P2pEvent_Tags.PeerUnsubscribed;
|
|
3052
|
+
readonly inner: Readonly<{
|
|
3053
|
+
peerId: string;
|
|
3054
|
+
topic: string;
|
|
3055
|
+
}>;
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
GossipsubOutboundFailure: {
|
|
3059
|
+
new (inner: {
|
|
3060
|
+
peerId: string;
|
|
3061
|
+
reason: string;
|
|
3062
|
+
}): {
|
|
3063
|
+
/**
|
|
3064
|
+
* @private
|
|
3065
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3066
|
+
*/
|
|
3067
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3068
|
+
readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
|
|
3069
|
+
readonly inner: Readonly<{
|
|
3070
|
+
peerId: string;
|
|
3071
|
+
reason: string;
|
|
3072
|
+
}>;
|
|
3073
|
+
};
|
|
3074
|
+
"new"(inner: {
|
|
3075
|
+
peerId: string;
|
|
3076
|
+
reason: string;
|
|
3077
|
+
}): {
|
|
3078
|
+
/**
|
|
3079
|
+
* @private
|
|
3080
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3081
|
+
*/
|
|
3082
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3083
|
+
readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
|
|
3084
|
+
readonly inner: Readonly<{
|
|
3085
|
+
peerId: string;
|
|
3086
|
+
reason: string;
|
|
3087
|
+
}>;
|
|
3088
|
+
};
|
|
3089
|
+
instanceOf(obj: any): obj is {
|
|
3090
|
+
/**
|
|
3091
|
+
* @private
|
|
3092
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3093
|
+
*/
|
|
3094
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3095
|
+
readonly tag: P2pEvent_Tags.GossipsubOutboundFailure;
|
|
3096
|
+
readonly inner: Readonly<{
|
|
3097
|
+
peerId: string;
|
|
3098
|
+
reason: string;
|
|
3099
|
+
}>;
|
|
3100
|
+
};
|
|
3101
|
+
};
|
|
3102
|
+
GossipsubProtocolViolation: {
|
|
3103
|
+
new (inner: {
|
|
3104
|
+
peerId: string;
|
|
3105
|
+
reason: string;
|
|
3106
|
+
}): {
|
|
3107
|
+
/**
|
|
3108
|
+
* @private
|
|
3109
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3110
|
+
*/
|
|
3111
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3112
|
+
readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
|
|
3113
|
+
readonly inner: Readonly<{
|
|
3114
|
+
peerId: string;
|
|
3115
|
+
reason: string;
|
|
3116
|
+
}>;
|
|
3117
|
+
};
|
|
3118
|
+
"new"(inner: {
|
|
3119
|
+
peerId: string;
|
|
3120
|
+
reason: string;
|
|
3121
|
+
}): {
|
|
3122
|
+
/**
|
|
3123
|
+
* @private
|
|
3124
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3125
|
+
*/
|
|
3126
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3127
|
+
readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
|
|
3128
|
+
readonly inner: Readonly<{
|
|
3129
|
+
peerId: string;
|
|
3130
|
+
reason: string;
|
|
3131
|
+
}>;
|
|
3132
|
+
};
|
|
3133
|
+
instanceOf(obj: any): obj is {
|
|
3134
|
+
/**
|
|
3135
|
+
* @private
|
|
3136
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3137
|
+
*/
|
|
3138
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3139
|
+
readonly tag: P2pEvent_Tags.GossipsubProtocolViolation;
|
|
3140
|
+
readonly inner: Readonly<{
|
|
3141
|
+
peerId: string;
|
|
3142
|
+
reason: string;
|
|
3143
|
+
}>;
|
|
3144
|
+
};
|
|
3145
|
+
};
|
|
3146
|
+
PeerDiscovered: {
|
|
3147
|
+
new (inner: {
|
|
3148
|
+
peerId: string;
|
|
3149
|
+
addrs: Array<string>;
|
|
3150
|
+
source: DiscoverySource;
|
|
3151
|
+
}): {
|
|
3152
|
+
/**
|
|
3153
|
+
* @private
|
|
3154
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3155
|
+
*/
|
|
3156
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3157
|
+
readonly tag: P2pEvent_Tags.PeerDiscovered;
|
|
3158
|
+
readonly inner: Readonly<{
|
|
3159
|
+
peerId: string;
|
|
3160
|
+
addrs: Array<string>;
|
|
3161
|
+
source: DiscoverySource;
|
|
3162
|
+
}>;
|
|
3163
|
+
};
|
|
3164
|
+
"new"(inner: {
|
|
3165
|
+
peerId: string;
|
|
3166
|
+
addrs: Array<string>;
|
|
3167
|
+
source: DiscoverySource;
|
|
3168
|
+
}): {
|
|
3169
|
+
/**
|
|
3170
|
+
* @private
|
|
3171
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3172
|
+
*/
|
|
3173
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3174
|
+
readonly tag: P2pEvent_Tags.PeerDiscovered;
|
|
3175
|
+
readonly inner: Readonly<{
|
|
3176
|
+
peerId: string;
|
|
3177
|
+
addrs: Array<string>;
|
|
3178
|
+
source: DiscoverySource;
|
|
3179
|
+
}>;
|
|
3180
|
+
};
|
|
3181
|
+
instanceOf(obj: any): obj is {
|
|
3182
|
+
/**
|
|
3183
|
+
* @private
|
|
3184
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3185
|
+
*/
|
|
3186
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3187
|
+
readonly tag: P2pEvent_Tags.PeerDiscovered;
|
|
3188
|
+
readonly inner: Readonly<{
|
|
3189
|
+
peerId: string;
|
|
3190
|
+
addrs: Array<string>;
|
|
3191
|
+
source: DiscoverySource;
|
|
3192
|
+
}>;
|
|
3193
|
+
};
|
|
3194
|
+
};
|
|
3195
|
+
PeerUpdated: {
|
|
3196
|
+
new (inner: {
|
|
3197
|
+
peerId: string;
|
|
3198
|
+
addrs: Array<string>;
|
|
3199
|
+
source: DiscoverySource;
|
|
3200
|
+
}): {
|
|
3201
|
+
/**
|
|
3202
|
+
* @private
|
|
3203
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3204
|
+
*/
|
|
3205
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3206
|
+
readonly tag: P2pEvent_Tags.PeerUpdated;
|
|
3207
|
+
readonly inner: Readonly<{
|
|
3208
|
+
peerId: string;
|
|
3209
|
+
addrs: Array<string>;
|
|
3210
|
+
source: DiscoverySource;
|
|
3211
|
+
}>;
|
|
3212
|
+
};
|
|
3213
|
+
"new"(inner: {
|
|
3214
|
+
peerId: string;
|
|
3215
|
+
addrs: Array<string>;
|
|
3216
|
+
source: DiscoverySource;
|
|
3217
|
+
}): {
|
|
3218
|
+
/**
|
|
3219
|
+
* @private
|
|
3220
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3221
|
+
*/
|
|
3222
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3223
|
+
readonly tag: P2pEvent_Tags.PeerUpdated;
|
|
3224
|
+
readonly inner: Readonly<{
|
|
3225
|
+
peerId: string;
|
|
3226
|
+
addrs: Array<string>;
|
|
3227
|
+
source: DiscoverySource;
|
|
3228
|
+
}>;
|
|
3229
|
+
};
|
|
3230
|
+
instanceOf(obj: any): obj is {
|
|
3231
|
+
/**
|
|
3232
|
+
* @private
|
|
3233
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3234
|
+
*/
|
|
3235
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3236
|
+
readonly tag: P2pEvent_Tags.PeerUpdated;
|
|
3237
|
+
readonly inner: Readonly<{
|
|
3238
|
+
peerId: string;
|
|
3239
|
+
addrs: Array<string>;
|
|
3240
|
+
source: DiscoverySource;
|
|
3241
|
+
}>;
|
|
3242
|
+
};
|
|
3243
|
+
};
|
|
3244
|
+
PeerExpired: {
|
|
3245
|
+
new (inner: {
|
|
3246
|
+
peerId: string;
|
|
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.PeerExpired;
|
|
3254
|
+
readonly inner: Readonly<{
|
|
3255
|
+
peerId: string;
|
|
3256
|
+
}>;
|
|
3257
|
+
};
|
|
3258
|
+
"new"(inner: {
|
|
3259
|
+
peerId: string;
|
|
3260
|
+
}): {
|
|
3261
|
+
/**
|
|
3262
|
+
* @private
|
|
3263
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3264
|
+
*/
|
|
3265
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3266
|
+
readonly tag: P2pEvent_Tags.PeerExpired;
|
|
3267
|
+
readonly inner: Readonly<{
|
|
3268
|
+
peerId: string;
|
|
3269
|
+
}>;
|
|
3270
|
+
};
|
|
3271
|
+
instanceOf(obj: any): obj is {
|
|
3272
|
+
/**
|
|
3273
|
+
* @private
|
|
3274
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3275
|
+
*/
|
|
3276
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3277
|
+
readonly tag: P2pEvent_Tags.PeerExpired;
|
|
3278
|
+
readonly inner: Readonly<{
|
|
3279
|
+
peerId: string;
|
|
3280
|
+
}>;
|
|
3281
|
+
};
|
|
3282
|
+
};
|
|
3283
|
+
DiscoveryDialFailed: {
|
|
3284
|
+
new (inner: {
|
|
3285
|
+
peerId: string;
|
|
3286
|
+
reason: string;
|
|
3287
|
+
}): {
|
|
3288
|
+
/**
|
|
3289
|
+
* @private
|
|
3290
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3291
|
+
*/
|
|
3292
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3293
|
+
readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
|
|
3294
|
+
readonly inner: Readonly<{
|
|
3295
|
+
peerId: string;
|
|
3296
|
+
reason: string;
|
|
3297
|
+
}>;
|
|
3298
|
+
};
|
|
3299
|
+
"new"(inner: {
|
|
3300
|
+
peerId: string;
|
|
3301
|
+
reason: string;
|
|
3302
|
+
}): {
|
|
3303
|
+
/**
|
|
3304
|
+
* @private
|
|
3305
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3306
|
+
*/
|
|
3307
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3308
|
+
readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
|
|
3309
|
+
readonly inner: Readonly<{
|
|
3310
|
+
peerId: string;
|
|
3311
|
+
reason: string;
|
|
3312
|
+
}>;
|
|
3313
|
+
};
|
|
3314
|
+
instanceOf(obj: any): obj is {
|
|
3315
|
+
/**
|
|
3316
|
+
* @private
|
|
3317
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3318
|
+
*/
|
|
3319
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3320
|
+
readonly tag: P2pEvent_Tags.DiscoveryDialFailed;
|
|
3321
|
+
readonly inner: Readonly<{
|
|
3322
|
+
peerId: string;
|
|
3323
|
+
reason: string;
|
|
3324
|
+
}>;
|
|
3325
|
+
};
|
|
3326
|
+
};
|
|
3327
|
+
DiscoveryProtocolViolation: {
|
|
3328
|
+
new (inner: {
|
|
3329
|
+
peerId?: string;
|
|
3330
|
+
source: DiscoverySource;
|
|
3331
|
+
reason: string;
|
|
3332
|
+
suppressed: number;
|
|
3333
|
+
}): {
|
|
3334
|
+
/**
|
|
3335
|
+
* @private
|
|
3336
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3337
|
+
*/
|
|
3338
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3339
|
+
readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
|
|
3340
|
+
readonly inner: Readonly<{
|
|
3341
|
+
peerId?: string;
|
|
3342
|
+
source: DiscoverySource;
|
|
3343
|
+
reason: string;
|
|
3344
|
+
suppressed: number;
|
|
3345
|
+
}>;
|
|
3346
|
+
};
|
|
3347
|
+
"new"(inner: {
|
|
3348
|
+
peerId?: string;
|
|
3349
|
+
source: DiscoverySource;
|
|
3350
|
+
reason: string;
|
|
3351
|
+
suppressed: number;
|
|
3352
|
+
}): {
|
|
3353
|
+
/**
|
|
3354
|
+
* @private
|
|
3355
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3356
|
+
*/
|
|
3357
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3358
|
+
readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
|
|
3359
|
+
readonly inner: Readonly<{
|
|
3360
|
+
peerId?: string;
|
|
3361
|
+
source: DiscoverySource;
|
|
3362
|
+
reason: string;
|
|
3363
|
+
suppressed: number;
|
|
3364
|
+
}>;
|
|
3365
|
+
};
|
|
3366
|
+
instanceOf(obj: any): obj is {
|
|
3367
|
+
/**
|
|
3368
|
+
* @private
|
|
3369
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3370
|
+
*/
|
|
3371
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3372
|
+
readonly tag: P2pEvent_Tags.DiscoveryProtocolViolation;
|
|
3373
|
+
readonly inner: Readonly<{
|
|
3374
|
+
peerId?: string;
|
|
3375
|
+
source: DiscoverySource;
|
|
3376
|
+
reason: string;
|
|
3377
|
+
suppressed: number;
|
|
3378
|
+
}>;
|
|
3379
|
+
};
|
|
3380
|
+
};
|
|
3381
|
+
}>;
|
|
3382
|
+
/**
|
|
3383
|
+
* Event delivered by the native endpoint driver.
|
|
3384
|
+
*/
|
|
3385
|
+
export type P2pEvent = InstanceType<typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'ConnectionReplaced' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamWriteAccepted' | 'StreamWriteStopped' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'DiscoveryProtocolViolation']>;
|
|
3386
|
+
/**
|
|
3387
|
+
* This should be called before anything else.
|
|
3388
|
+
*
|
|
3389
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
3390
|
+
*
|
|
3391
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
3392
|
+
* and when the bindings were generated.
|
|
3393
|
+
*
|
|
3394
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
3395
|
+
*/
|
|
3396
|
+
declare function uniffiEnsureInitialized(): void;
|
|
3397
|
+
declare const _default: Readonly<{
|
|
3398
|
+
initialize: typeof uniffiEnsureInitialized;
|
|
3399
|
+
converters: {
|
|
3400
|
+
FfiConverterTypeConnectTarget: {
|
|
3401
|
+
readFromCursor(c: Cursor): ConnectTarget;
|
|
3402
|
+
writeIntoCursor(value: ConnectTarget, c: Cursor): void;
|
|
3403
|
+
allocationSize(value: ConnectTarget): number;
|
|
3404
|
+
lift(value: UniffiByteArray): ConnectTarget;
|
|
3405
|
+
lower(value: ConnectTarget, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3406
|
+
};
|
|
3407
|
+
FfiConverterTypeConnectionInfo: {
|
|
3408
|
+
readFromCursor(c: Cursor): ConnectionInfo;
|
|
3409
|
+
writeIntoCursor(value: ConnectionInfo, c: Cursor): void;
|
|
3410
|
+
allocationSize(value: ConnectionInfo): number;
|
|
3411
|
+
lift(value: UniffiByteArray): ConnectionInfo;
|
|
3412
|
+
lower(value: ConnectionInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3413
|
+
};
|
|
3414
|
+
FfiConverterTypeDiscoveryOptions: {
|
|
3415
|
+
readFromCursor(c: Cursor): DiscoveryOptions;
|
|
3416
|
+
writeIntoCursor(value: DiscoveryOptions, c: Cursor): void;
|
|
3417
|
+
allocationSize(value: DiscoveryOptions): number;
|
|
3418
|
+
lift(value: UniffiByteArray): DiscoveryOptions;
|
|
3419
|
+
lower(value: DiscoveryOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3420
|
+
};
|
|
3421
|
+
FfiConverterTypeDiscoverySource: {
|
|
3422
|
+
readFromCursor(c: Cursor): DiscoverySource;
|
|
3423
|
+
writeIntoCursor(value: DiscoverySource, c: Cursor): void;
|
|
3424
|
+
allocationSize(value: DiscoverySource): number;
|
|
3425
|
+
lift(value: UniffiByteArray): DiscoverySource;
|
|
3426
|
+
lower(value: DiscoverySource, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3427
|
+
};
|
|
3428
|
+
FfiConverterTypeDriverFailureKind: {
|
|
3429
|
+
readFromCursor(c: Cursor): DriverFailureKind;
|
|
3430
|
+
writeIntoCursor(value: DriverFailureKind, c: Cursor): void;
|
|
3431
|
+
allocationSize(value: DriverFailureKind): number;
|
|
3432
|
+
lift(value: UniffiByteArray): DriverFailureKind;
|
|
3433
|
+
lower(value: DriverFailureKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3434
|
+
};
|
|
3435
|
+
FfiConverterTypeEndpointConfig: {
|
|
3436
|
+
readFromCursor(c: Cursor): EndpointConfig;
|
|
3437
|
+
writeIntoCursor(value: EndpointConfig, c: Cursor): void;
|
|
3438
|
+
allocationSize(value: EndpointConfig): number;
|
|
3439
|
+
lift(value: UniffiByteArray): EndpointConfig;
|
|
3440
|
+
lower(value: EndpointConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3441
|
+
};
|
|
3442
|
+
FfiConverterTypeEndpointErrorKind: {
|
|
3443
|
+
readFromCursor(c: Cursor): EndpointErrorKind;
|
|
3444
|
+
writeIntoCursor(value: EndpointErrorKind, c: Cursor): void;
|
|
3445
|
+
allocationSize(value: EndpointErrorKind): number;
|
|
3446
|
+
lift(value: UniffiByteArray): EndpointErrorKind;
|
|
3447
|
+
lower(value: EndpointErrorKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3448
|
+
};
|
|
3449
|
+
FfiConverterTypeFfiError: {
|
|
3450
|
+
readFromCursor(c: Cursor): FfiError;
|
|
3451
|
+
writeIntoCursor(value: FfiError, c: Cursor): void;
|
|
3452
|
+
allocationSize(value: FfiError): number;
|
|
3453
|
+
lift(value: UniffiByteArray): FfiError;
|
|
3454
|
+
lower(value: FfiError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3455
|
+
};
|
|
3456
|
+
FfiConverterTypeIdentifyInfo: {
|
|
3457
|
+
readFromCursor(c: Cursor): IdentifyInfo;
|
|
3458
|
+
writeIntoCursor(value: IdentifyInfo, c: Cursor): void;
|
|
3459
|
+
allocationSize(value: IdentifyInfo): number;
|
|
3460
|
+
lift(value: UniffiByteArray): IdentifyInfo;
|
|
3461
|
+
lower(value: IdentifyInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3462
|
+
};
|
|
3463
|
+
FfiConverterTypeKnownPeerInfo: {
|
|
3464
|
+
readFromCursor(c: Cursor): KnownPeerInfo;
|
|
3465
|
+
writeIntoCursor(value: KnownPeerInfo, c: Cursor): void;
|
|
3466
|
+
allocationSize(value: KnownPeerInfo): number;
|
|
3467
|
+
lift(value: UniffiByteArray): KnownPeerInfo;
|
|
3468
|
+
lower(value: KnownPeerInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3469
|
+
};
|
|
3470
|
+
FfiConverterTypeMdnsOptions: {
|
|
3471
|
+
readFromCursor(c: Cursor): MdnsOptions;
|
|
3472
|
+
writeIntoCursor(value: MdnsOptions, c: Cursor): void;
|
|
3473
|
+
allocationSize(value: MdnsOptions): number;
|
|
3474
|
+
lift(value: UniffiByteArray): MdnsOptions;
|
|
3475
|
+
lower(value: MdnsOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3476
|
+
};
|
|
3477
|
+
FfiConverterTypeNatErrorKind: {
|
|
3478
|
+
readFromCursor(c: Cursor): NatErrorKind;
|
|
3479
|
+
writeIntoCursor(value: NatErrorKind, c: Cursor): void;
|
|
3480
|
+
allocationSize(value: NatErrorKind): number;
|
|
3481
|
+
lift(value: UniffiByteArray): NatErrorKind;
|
|
3482
|
+
lower(value: NatErrorKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3483
|
+
};
|
|
3484
|
+
FfiConverterTypeOpenStreamResult: {
|
|
3485
|
+
readFromCursor(c: Cursor): OpenStreamResult;
|
|
3486
|
+
writeIntoCursor(value: OpenStreamResult, c: Cursor): void;
|
|
3487
|
+
allocationSize(value: OpenStreamResult): number;
|
|
3488
|
+
lift(value: UniffiByteArray): OpenStreamResult;
|
|
3489
|
+
lower(value: OpenStreamResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3490
|
+
};
|
|
3491
|
+
FfiConverterTypeP2pEvent: {
|
|
3492
|
+
readFromCursor(c: Cursor): P2pEvent;
|
|
3493
|
+
writeIntoCursor(value: P2pEvent, c: Cursor): void;
|
|
3494
|
+
allocationSize(value: P2pEvent): number;
|
|
3495
|
+
lift(value: UniffiByteArray): P2pEvent;
|
|
3496
|
+
lower(value: P2pEvent, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3497
|
+
};
|
|
3498
|
+
FfiConverterTypePathKind: {
|
|
3499
|
+
readFromCursor(c: Cursor): PathKind;
|
|
3500
|
+
writeIntoCursor(value: PathKind, c: Cursor): void;
|
|
3501
|
+
allocationSize(value: PathKind): number;
|
|
3502
|
+
lift(value: UniffiByteArray): PathKind;
|
|
3503
|
+
lower(value: PathKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3504
|
+
};
|
|
3505
|
+
FfiConverterTypeReachability: {
|
|
3506
|
+
readFromCursor(c: Cursor): Reachability;
|
|
3507
|
+
writeIntoCursor(value: Reachability, c: Cursor): void;
|
|
3508
|
+
allocationSize(value: Reachability): number;
|
|
3509
|
+
lift(value: UniffiByteArray): Reachability;
|
|
3510
|
+
lower(value: Reachability, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3511
|
+
};
|
|
3512
|
+
FfiConverterTypeRelayReservationInfo: {
|
|
3513
|
+
readFromCursor(c: Cursor): RelayReservationInfo;
|
|
3514
|
+
writeIntoCursor(value: RelayReservationInfo, c: Cursor): void;
|
|
3515
|
+
allocationSize(value: RelayReservationInfo): number;
|
|
3516
|
+
lift(value: UniffiByteArray): RelayReservationInfo;
|
|
3517
|
+
lower(value: RelayReservationInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3518
|
+
};
|
|
3519
|
+
};
|
|
3520
|
+
}>;
|
|
3521
|
+
export default _default;
|
|
3522
|
+
//# sourceMappingURL=minip2p_ffi_core.d.ts.map
|