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