@minip2p/react-native 0.10.0 → 0.10.2
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/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/lib/module/adapter.js +44 -2
- package/lib/module/adapter.js.map +1 -1
- package/lib/module/generated/minip2p_ffi_core.js +594 -49
- package/lib/module/generated/minip2p_ffi_core.js.map +1 -1
- package/lib/typescript/src/adapter.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi_core.d.ts +423 -3
- package/lib/typescript/src/generated/minip2p_ffi_core.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/adapter.ts +55 -1
- package/src/generated/minip2p_ffi_core.ts +800 -51
|
@@ -213,6 +213,340 @@ export declare const MdnsOptions: Readonly<{
|
|
|
213
213
|
new: (partial: Partial<MdnsOptions> & Required<Omit<MdnsOptions, never>>) => MdnsOptions;
|
|
214
214
|
defaults: () => Partial<MdnsOptions>;
|
|
215
215
|
}>;
|
|
216
|
+
export declare enum WindowLimit_Tags {
|
|
217
|
+
Bounded = "Bounded",
|
|
218
|
+
Unlimited = "Unlimited"
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A receive window that may be unbounded.
|
|
222
|
+
*/
|
|
223
|
+
export declare const WindowLimit: Readonly<{
|
|
224
|
+
instanceOf: (obj: any) => obj is WindowLimit;
|
|
225
|
+
Bounded: {
|
|
226
|
+
new (inner: {
|
|
227
|
+
bytes: bigint;
|
|
228
|
+
}): {
|
|
229
|
+
/**
|
|
230
|
+
* @private
|
|
231
|
+
* This field is private and should not be used, use `tag` instead.
|
|
232
|
+
*/
|
|
233
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
234
|
+
readonly tag: WindowLimit_Tags.Bounded;
|
|
235
|
+
readonly inner: Readonly<{
|
|
236
|
+
bytes: bigint;
|
|
237
|
+
}>;
|
|
238
|
+
};
|
|
239
|
+
"new"(inner: {
|
|
240
|
+
bytes: bigint;
|
|
241
|
+
}): {
|
|
242
|
+
/**
|
|
243
|
+
* @private
|
|
244
|
+
* This field is private and should not be used, use `tag` instead.
|
|
245
|
+
*/
|
|
246
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
247
|
+
readonly tag: WindowLimit_Tags.Bounded;
|
|
248
|
+
readonly inner: Readonly<{
|
|
249
|
+
bytes: bigint;
|
|
250
|
+
}>;
|
|
251
|
+
};
|
|
252
|
+
instanceOf(obj: any): obj is {
|
|
253
|
+
/**
|
|
254
|
+
* @private
|
|
255
|
+
* This field is private and should not be used, use `tag` instead.
|
|
256
|
+
*/
|
|
257
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
258
|
+
readonly tag: WindowLimit_Tags.Bounded;
|
|
259
|
+
readonly inner: Readonly<{
|
|
260
|
+
bytes: bigint;
|
|
261
|
+
}>;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
Unlimited: {
|
|
265
|
+
new (): {
|
|
266
|
+
/**
|
|
267
|
+
* @private
|
|
268
|
+
* This field is private and should not be used, use `tag` instead.
|
|
269
|
+
*/
|
|
270
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
271
|
+
readonly tag: WindowLimit_Tags.Unlimited;
|
|
272
|
+
};
|
|
273
|
+
"new"(): {
|
|
274
|
+
/**
|
|
275
|
+
* @private
|
|
276
|
+
* This field is private and should not be used, use `tag` instead.
|
|
277
|
+
*/
|
|
278
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
279
|
+
readonly tag: WindowLimit_Tags.Unlimited;
|
|
280
|
+
};
|
|
281
|
+
instanceOf(obj: any): obj is {
|
|
282
|
+
/**
|
|
283
|
+
* @private
|
|
284
|
+
* This field is private and should not be used, use `tag` instead.
|
|
285
|
+
*/
|
|
286
|
+
readonly [uniffiTypeNameSymbol]: "WindowLimit";
|
|
287
|
+
readonly tag: WindowLimit_Tags.Unlimited;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
}>;
|
|
291
|
+
/**
|
|
292
|
+
* A receive window that may be unbounded.
|
|
293
|
+
*/
|
|
294
|
+
export type WindowLimit = InstanceType<typeof WindowLimit['Bounded' | 'Unlimited']>;
|
|
295
|
+
/**
|
|
296
|
+
* QUIC overrides; each field mirrors `minip2p::QuicLimits`.
|
|
297
|
+
*/
|
|
298
|
+
export type QuicLimitsOptions = {
|
|
299
|
+
/**
|
|
300
|
+
* Simultaneous connections, inbound and outbound.
|
|
301
|
+
*/
|
|
302
|
+
maxConnections?: bigint;
|
|
303
|
+
/**
|
|
304
|
+
* Locally initiated bidirectional streams per connection.
|
|
305
|
+
*/
|
|
306
|
+
maxStreamsPerConnection?: bigint;
|
|
307
|
+
/**
|
|
308
|
+
* Bytes queued per stream beyond what the engine accepts; non-zero.
|
|
309
|
+
*/
|
|
310
|
+
maxPendingBytesPerStream?: bigint;
|
|
311
|
+
/**
|
|
312
|
+
* Bytes queued per connection beyond what the engine accepts; greater
|
|
313
|
+
* than `control_stream_reserve_bytes`.
|
|
314
|
+
*/
|
|
315
|
+
maxPendingConnectionBytes?: bigint;
|
|
316
|
+
/**
|
|
317
|
+
* Part of the connection queue only control streams may fill.
|
|
318
|
+
*/
|
|
319
|
+
controlStreamReserveBytes?: bigint;
|
|
320
|
+
/**
|
|
321
|
+
* UDP datagrams retained while the socket would block; non-zero.
|
|
322
|
+
*/
|
|
323
|
+
maxPendingDatagrams?: bigint;
|
|
324
|
+
/**
|
|
325
|
+
* Idle timeout advertised to peers, in milliseconds; non-zero.
|
|
326
|
+
*/
|
|
327
|
+
idleTimeoutMs?: bigint;
|
|
328
|
+
/**
|
|
329
|
+
* Whether inbound connections need a stateless Retry first.
|
|
330
|
+
*/
|
|
331
|
+
requireAddressValidation?: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* Per-stream receive window in bytes; non-zero.
|
|
334
|
+
*/
|
|
335
|
+
streamReceiveWindow?: bigint;
|
|
336
|
+
/**
|
|
337
|
+
* Per-connection receive window (unlimited by default).
|
|
338
|
+
*/
|
|
339
|
+
connectionReceiveWindow?: WindowLimit;
|
|
340
|
+
/**
|
|
341
|
+
* Bytes buffered per connection for sending; non-zero.
|
|
342
|
+
*/
|
|
343
|
+
sendWindow?: bigint;
|
|
344
|
+
/**
|
|
345
|
+
* Time an `h3` connection has to complete Noise, in milliseconds;
|
|
346
|
+
* non-zero.
|
|
347
|
+
*/
|
|
348
|
+
webtransportHandshakeTimeoutMs?: bigint;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Generated factory for {@link QuicLimitsOptions} record objects.
|
|
352
|
+
*/
|
|
353
|
+
export declare const QuicLimitsOptions: Readonly<{
|
|
354
|
+
create: (partial: Partial<QuicLimitsOptions> & Required<Omit<QuicLimitsOptions, "connectionReceiveWindow" | "controlStreamReserveBytes" | "idleTimeoutMs" | "maxConnections" | "maxPendingBytesPerStream" | "maxPendingConnectionBytes" | "maxPendingDatagrams" | "maxStreamsPerConnection" | "requireAddressValidation" | "sendWindow" | "streamReceiveWindow" | "webtransportHandshakeTimeoutMs">>) => QuicLimitsOptions;
|
|
355
|
+
new: (partial: Partial<QuicLimitsOptions> & Required<Omit<QuicLimitsOptions, "connectionReceiveWindow" | "controlStreamReserveBytes" | "idleTimeoutMs" | "maxConnections" | "maxPendingBytesPerStream" | "maxPendingConnectionBytes" | "maxPendingDatagrams" | "maxStreamsPerConnection" | "requireAddressValidation" | "sendWindow" | "streamReceiveWindow" | "webtransportHandshakeTimeoutMs">>) => QuicLimitsOptions;
|
|
356
|
+
defaults: () => Partial<QuicLimitsOptions>;
|
|
357
|
+
}>;
|
|
358
|
+
export declare enum TimeoutLimit_Tags {
|
|
359
|
+
AfterMs = "AfterMs",
|
|
360
|
+
Never = "Never"
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* A timeout that may be disabled.
|
|
364
|
+
*/
|
|
365
|
+
export declare const TimeoutLimit: Readonly<{
|
|
366
|
+
instanceOf: (obj: any) => obj is TimeoutLimit;
|
|
367
|
+
AfterMs: {
|
|
368
|
+
new (inner: {
|
|
369
|
+
ms: bigint;
|
|
370
|
+
}): {
|
|
371
|
+
/**
|
|
372
|
+
* @private
|
|
373
|
+
* This field is private and should not be used, use `tag` instead.
|
|
374
|
+
*/
|
|
375
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
376
|
+
readonly tag: TimeoutLimit_Tags.AfterMs;
|
|
377
|
+
readonly inner: Readonly<{
|
|
378
|
+
ms: bigint;
|
|
379
|
+
}>;
|
|
380
|
+
};
|
|
381
|
+
"new"(inner: {
|
|
382
|
+
ms: bigint;
|
|
383
|
+
}): {
|
|
384
|
+
/**
|
|
385
|
+
* @private
|
|
386
|
+
* This field is private and should not be used, use `tag` instead.
|
|
387
|
+
*/
|
|
388
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
389
|
+
readonly tag: TimeoutLimit_Tags.AfterMs;
|
|
390
|
+
readonly inner: Readonly<{
|
|
391
|
+
ms: bigint;
|
|
392
|
+
}>;
|
|
393
|
+
};
|
|
394
|
+
instanceOf(obj: any): obj is {
|
|
395
|
+
/**
|
|
396
|
+
* @private
|
|
397
|
+
* This field is private and should not be used, use `tag` instead.
|
|
398
|
+
*/
|
|
399
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
400
|
+
readonly tag: TimeoutLimit_Tags.AfterMs;
|
|
401
|
+
readonly inner: Readonly<{
|
|
402
|
+
ms: bigint;
|
|
403
|
+
}>;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
Never: {
|
|
407
|
+
new (): {
|
|
408
|
+
/**
|
|
409
|
+
* @private
|
|
410
|
+
* This field is private and should not be used, use `tag` instead.
|
|
411
|
+
*/
|
|
412
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
413
|
+
readonly tag: TimeoutLimit_Tags.Never;
|
|
414
|
+
};
|
|
415
|
+
"new"(): {
|
|
416
|
+
/**
|
|
417
|
+
* @private
|
|
418
|
+
* This field is private and should not be used, use `tag` instead.
|
|
419
|
+
*/
|
|
420
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
421
|
+
readonly tag: TimeoutLimit_Tags.Never;
|
|
422
|
+
};
|
|
423
|
+
instanceOf(obj: any): obj is {
|
|
424
|
+
/**
|
|
425
|
+
* @private
|
|
426
|
+
* This field is private and should not be used, use `tag` instead.
|
|
427
|
+
*/
|
|
428
|
+
readonly [uniffiTypeNameSymbol]: "TimeoutLimit";
|
|
429
|
+
readonly tag: TimeoutLimit_Tags.Never;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
}>;
|
|
433
|
+
/**
|
|
434
|
+
* A timeout that may be disabled.
|
|
435
|
+
*/
|
|
436
|
+
export type TimeoutLimit = InstanceType<typeof TimeoutLimit['AfterMs' | 'Never']>;
|
|
437
|
+
/**
|
|
438
|
+
* Yamux overrides; each field mirrors `minip2p::YamuxConfig`.
|
|
439
|
+
*/
|
|
440
|
+
export type YamuxOptions = {
|
|
441
|
+
/**
|
|
442
|
+
* Per-stream receive window in bytes; at least 256 KiB.
|
|
443
|
+
*/
|
|
444
|
+
receiveWindow?: number;
|
|
445
|
+
/**
|
|
446
|
+
* Largest data-frame payload sent; non-zero.
|
|
447
|
+
*/
|
|
448
|
+
maxFrameLen?: number;
|
|
449
|
+
/**
|
|
450
|
+
* Streams tracked at once, counting unsettled closed ones.
|
|
451
|
+
*/
|
|
452
|
+
maxStreams?: bigint;
|
|
453
|
+
/**
|
|
454
|
+
* Per-stream cap on accepted, unpulled send bytes; non-zero.
|
|
455
|
+
*/
|
|
456
|
+
maxBufferedSend?: bigint;
|
|
457
|
+
/**
|
|
458
|
+
* Session-wide cap on accepted, unpulled send bytes; greater than
|
|
459
|
+
* `control_stream_reserve`.
|
|
460
|
+
*/
|
|
461
|
+
maxTotalBufferedSend?: bigint;
|
|
462
|
+
/**
|
|
463
|
+
* Part of the session-wide cap only control streams may fill.
|
|
464
|
+
*/
|
|
465
|
+
controlStreamReserve?: bigint;
|
|
466
|
+
/**
|
|
467
|
+
* Control frames that may wait to be pulled.
|
|
468
|
+
*/
|
|
469
|
+
maxPendingControl?: bigint;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Generated factory for {@link YamuxOptions} record objects.
|
|
473
|
+
*/
|
|
474
|
+
export declare const YamuxOptions: Readonly<{
|
|
475
|
+
create: (partial: Partial<YamuxOptions> & Required<Omit<YamuxOptions, "controlStreamReserve" | "maxBufferedSend" | "maxFrameLen" | "maxPendingControl" | "maxStreams" | "maxTotalBufferedSend" | "receiveWindow">>) => YamuxOptions;
|
|
476
|
+
new: (partial: Partial<YamuxOptions> & Required<Omit<YamuxOptions, "controlStreamReserve" | "maxBufferedSend" | "maxFrameLen" | "maxPendingControl" | "maxStreams" | "maxTotalBufferedSend" | "receiveWindow">>) => YamuxOptions;
|
|
477
|
+
defaults: () => Partial<YamuxOptions>;
|
|
478
|
+
}>;
|
|
479
|
+
/**
|
|
480
|
+
* TCP overrides; each field mirrors `minip2p::TcpConfig` (its connection-id
|
|
481
|
+
* namespace stays internal).
|
|
482
|
+
*/
|
|
483
|
+
export type TcpLimitsOptions = {
|
|
484
|
+
/**
|
|
485
|
+
* Connections held at once, dialed and accepted alike.
|
|
486
|
+
*/
|
|
487
|
+
maxConnections?: bigint;
|
|
488
|
+
/**
|
|
489
|
+
* How long a connection may take to authenticate.
|
|
490
|
+
*/
|
|
491
|
+
handshakeTimeoutMs?: TimeoutLimit;
|
|
492
|
+
/**
|
|
493
|
+
* Encrypted bytes one connection holds for its socket.
|
|
494
|
+
*/
|
|
495
|
+
maxBufferedSend?: bigint;
|
|
496
|
+
/**
|
|
497
|
+
* How long a connection may hold bytes its socket refuses.
|
|
498
|
+
*/
|
|
499
|
+
sendStallTimeoutMs?: TimeoutLimit;
|
|
500
|
+
/**
|
|
501
|
+
* Each TCP connection's Yamux limits; independent of
|
|
502
|
+
* [`LimitsOptions::circuit`].
|
|
503
|
+
*/
|
|
504
|
+
yamux?: YamuxOptions;
|
|
505
|
+
};
|
|
506
|
+
/**
|
|
507
|
+
* Generated factory for {@link TcpLimitsOptions} record objects.
|
|
508
|
+
*/
|
|
509
|
+
export declare const TcpLimitsOptions: Readonly<{
|
|
510
|
+
create: (partial: Partial<TcpLimitsOptions> & Required<Omit<TcpLimitsOptions, "handshakeTimeoutMs" | "maxBufferedSend" | "maxConnections" | "sendStallTimeoutMs" | "yamux">>) => TcpLimitsOptions;
|
|
511
|
+
new: (partial: Partial<TcpLimitsOptions> & Required<Omit<TcpLimitsOptions, "handshakeTimeoutMs" | "maxBufferedSend" | "maxConnections" | "sendStallTimeoutMs" | "yamux">>) => TcpLimitsOptions;
|
|
512
|
+
defaults: () => Partial<TcpLimitsOptions>;
|
|
513
|
+
}>;
|
|
514
|
+
/**
|
|
515
|
+
* Transport limit overrides.
|
|
516
|
+
*
|
|
517
|
+
* Every field is optional: an absent record or field keeps the native
|
|
518
|
+
* default, so an omitted record and an empty one behave identically. Limits
|
|
519
|
+
* for a transport the endpoint does not bind (TCP without a `/tcp` listen
|
|
520
|
+
* address, say) are ignored, not validated. An invalid limit fails
|
|
521
|
+
* construction with `InvalidConfig { capability: Transport }`.
|
|
522
|
+
*/
|
|
523
|
+
export type LimitsOptions = {
|
|
524
|
+
/**
|
|
525
|
+
* QUIC (and WebTransport) transport limits.
|
|
526
|
+
*/
|
|
527
|
+
quic?: QuicLimitsOptions;
|
|
528
|
+
/**
|
|
529
|
+
* TCP transport limits, including its connections' Yamux limits.
|
|
530
|
+
*/
|
|
531
|
+
tcp?: TcpLimitsOptions;
|
|
532
|
+
/**
|
|
533
|
+
* Relay circuits' Yamux limits; independent of [`TcpLimitsOptions::yamux`].
|
|
534
|
+
*/
|
|
535
|
+
circuit?: YamuxOptions;
|
|
536
|
+
/**
|
|
537
|
+
* Most relayed circuits held at once (`NatConfig::max_circuits`): past
|
|
538
|
+
* it inbound circuits are refused and relay legs fail.
|
|
539
|
+
*/
|
|
540
|
+
maxCircuits?: bigint;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Generated factory for {@link LimitsOptions} record objects.
|
|
544
|
+
*/
|
|
545
|
+
export declare const LimitsOptions: Readonly<{
|
|
546
|
+
create: (partial: Partial<LimitsOptions> & Required<Omit<LimitsOptions, "circuit" | "maxCircuits" | "quic" | "tcp">>) => LimitsOptions;
|
|
547
|
+
new: (partial: Partial<LimitsOptions> & Required<Omit<LimitsOptions, "circuit" | "maxCircuits" | "quic" | "tcp">>) => LimitsOptions;
|
|
548
|
+
defaults: () => Partial<LimitsOptions>;
|
|
549
|
+
}>;
|
|
216
550
|
/**
|
|
217
551
|
* Configuration used to construct an FFI endpoint.
|
|
218
552
|
*/
|
|
@@ -257,13 +591,17 @@ export type EndpointConfig = {
|
|
|
257
591
|
* Local-link mDNS settings, or no mDNS discovery when absent.
|
|
258
592
|
*/
|
|
259
593
|
mdns?: MdnsOptions;
|
|
594
|
+
/**
|
|
595
|
+
* Transport limit overrides, or every native default when absent.
|
|
596
|
+
*/
|
|
597
|
+
limits?: LimitsOptions;
|
|
260
598
|
};
|
|
261
599
|
/**
|
|
262
600
|
* Generated factory for {@link EndpointConfig} record objects.
|
|
263
601
|
*/
|
|
264
602
|
export declare const EndpointConfig: Readonly<{
|
|
265
|
-
create: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "listen" | "mdns">>) => EndpointConfig;
|
|
266
|
-
new: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "listen" | "mdns">>) => EndpointConfig;
|
|
603
|
+
create: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "limits" | "listen" | "mdns">>) => EndpointConfig;
|
|
604
|
+
new: (partial: Partial<EndpointConfig> & Required<Omit<EndpointConfig, "agentVersion" | "discovery" | "limits" | "listen" | "mdns">>) => EndpointConfig;
|
|
267
605
|
defaults: () => Partial<EndpointConfig>;
|
|
268
606
|
}>;
|
|
269
607
|
/**
|
|
@@ -1887,6 +2225,7 @@ export declare enum P2pEvent_Tags {
|
|
|
1887
2225
|
StreamClosed = "StreamClosed",
|
|
1888
2226
|
EndpointError = "EndpointError",
|
|
1889
2227
|
ReachabilityChanged = "ReachabilityChanged",
|
|
2228
|
+
ListenAddressesChanged = "ListenAddressesChanged",
|
|
1890
2229
|
PublicAddressesChanged = "PublicAddressesChanged",
|
|
1891
2230
|
RelayReserved = "RelayReserved",
|
|
1892
2231
|
RelayReservationLost = "RelayReservationLost",
|
|
@@ -2807,6 +3146,45 @@ export declare const P2pEvent: Readonly<{
|
|
|
2807
3146
|
}>;
|
|
2808
3147
|
};
|
|
2809
3148
|
};
|
|
3149
|
+
ListenAddressesChanged: {
|
|
3150
|
+
new (inner: {
|
|
3151
|
+
addrs: Array<string>;
|
|
3152
|
+
}): {
|
|
3153
|
+
/**
|
|
3154
|
+
* @private
|
|
3155
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3156
|
+
*/
|
|
3157
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3158
|
+
readonly tag: P2pEvent_Tags.ListenAddressesChanged;
|
|
3159
|
+
readonly inner: Readonly<{
|
|
3160
|
+
addrs: Array<string>;
|
|
3161
|
+
}>;
|
|
3162
|
+
};
|
|
3163
|
+
"new"(inner: {
|
|
3164
|
+
addrs: Array<string>;
|
|
3165
|
+
}): {
|
|
3166
|
+
/**
|
|
3167
|
+
* @private
|
|
3168
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3169
|
+
*/
|
|
3170
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3171
|
+
readonly tag: P2pEvent_Tags.ListenAddressesChanged;
|
|
3172
|
+
readonly inner: Readonly<{
|
|
3173
|
+
addrs: Array<string>;
|
|
3174
|
+
}>;
|
|
3175
|
+
};
|
|
3176
|
+
instanceOf(obj: any): obj is {
|
|
3177
|
+
/**
|
|
3178
|
+
* @private
|
|
3179
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3180
|
+
*/
|
|
3181
|
+
readonly [uniffiTypeNameSymbol]: "P2pEvent";
|
|
3182
|
+
readonly tag: P2pEvent_Tags.ListenAddressesChanged;
|
|
3183
|
+
readonly inner: Readonly<{
|
|
3184
|
+
addrs: Array<string>;
|
|
3185
|
+
}>;
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
2810
3188
|
PublicAddressesChanged: {
|
|
2811
3189
|
new (inner: {
|
|
2812
3190
|
addrs: Array<string>;
|
|
@@ -3836,7 +4214,7 @@ export declare const P2pEvent: Readonly<{
|
|
|
3836
4214
|
/**
|
|
3837
4215
|
* Event delivered by the native endpoint driver.
|
|
3838
4216
|
*/
|
|
3839
|
-
export type P2pEvent = InstanceType<typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'EndpointClosed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'ConnectionReplaced' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamWriteAccepted' | 'StreamWriteStopped' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'MdnsFailed' | 'MdnsRecovered' | 'DiscoveryProtocolViolation']>;
|
|
4217
|
+
export type P2pEvent = InstanceType<typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'EndpointClosed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'ConnectionReplaced' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamWriteAccepted' | 'StreamWriteStopped' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'ListenAddressesChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'MdnsFailed' | 'MdnsRecovered' | 'DiscoveryProtocolViolation']>;
|
|
3840
4218
|
/**
|
|
3841
4219
|
* This should be called before anything else.
|
|
3842
4220
|
*
|
|
@@ -3942,6 +4320,13 @@ declare const _default: Readonly<{
|
|
|
3942
4320
|
lift(value: UniffiByteArray): KnownPeerInfo;
|
|
3943
4321
|
lower(value: KnownPeerInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3944
4322
|
};
|
|
4323
|
+
FfiConverterTypeLimitsOptions: {
|
|
4324
|
+
readFromCursor(c: Cursor): LimitsOptions;
|
|
4325
|
+
writeIntoCursor(value: LimitsOptions, c: Cursor): void;
|
|
4326
|
+
allocationSize(value: LimitsOptions): number;
|
|
4327
|
+
lift(value: UniffiByteArray): LimitsOptions;
|
|
4328
|
+
lower(value: LimitsOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4329
|
+
};
|
|
3945
4330
|
FfiConverterTypeMdnsFailureKind: {
|
|
3946
4331
|
readFromCursor(c: Cursor): MdnsFailureKind;
|
|
3947
4332
|
writeIntoCursor(value: MdnsFailureKind, c: Cursor): void;
|
|
@@ -3984,6 +4369,13 @@ declare const _default: Readonly<{
|
|
|
3984
4369
|
lift(value: UniffiByteArray): PathKind;
|
|
3985
4370
|
lower(value: PathKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
3986
4371
|
};
|
|
4372
|
+
FfiConverterTypeQuicLimitsOptions: {
|
|
4373
|
+
readFromCursor(c: Cursor): QuicLimitsOptions;
|
|
4374
|
+
writeIntoCursor(value: QuicLimitsOptions, c: Cursor): void;
|
|
4375
|
+
allocationSize(value: QuicLimitsOptions): number;
|
|
4376
|
+
lift(value: UniffiByteArray): QuicLimitsOptions;
|
|
4377
|
+
lower(value: QuicLimitsOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4378
|
+
};
|
|
3987
4379
|
FfiConverterTypeReachability: {
|
|
3988
4380
|
readFromCursor(c: Cursor): Reachability;
|
|
3989
4381
|
writeIntoCursor(value: Reachability, c: Cursor): void;
|
|
@@ -3998,6 +4390,20 @@ declare const _default: Readonly<{
|
|
|
3998
4390
|
lift(value: UniffiByteArray): RelayReservationInfo;
|
|
3999
4391
|
lower(value: RelayReservationInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4000
4392
|
};
|
|
4393
|
+
FfiConverterTypeTcpLimitsOptions: {
|
|
4394
|
+
readFromCursor(c: Cursor): TcpLimitsOptions;
|
|
4395
|
+
writeIntoCursor(value: TcpLimitsOptions, c: Cursor): void;
|
|
4396
|
+
allocationSize(value: TcpLimitsOptions): number;
|
|
4397
|
+
lift(value: UniffiByteArray): TcpLimitsOptions;
|
|
4398
|
+
lower(value: TcpLimitsOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4399
|
+
};
|
|
4400
|
+
FfiConverterTypeTimeoutLimit: {
|
|
4401
|
+
readFromCursor(c: Cursor): TimeoutLimit;
|
|
4402
|
+
writeIntoCursor(value: TimeoutLimit, c: Cursor): void;
|
|
4403
|
+
allocationSize(value: TimeoutLimit): number;
|
|
4404
|
+
lift(value: UniffiByteArray): TimeoutLimit;
|
|
4405
|
+
lower(value: TimeoutLimit, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4406
|
+
};
|
|
4001
4407
|
FfiConverterTypeUnfinishedConnection: {
|
|
4002
4408
|
readFromCursor(c: Cursor): UnfinishedConnection;
|
|
4003
4409
|
writeIntoCursor(value: UnfinishedConnection, c: Cursor): void;
|
|
@@ -4005,6 +4411,20 @@ declare const _default: Readonly<{
|
|
|
4005
4411
|
lift(value: UniffiByteArray): UnfinishedConnection;
|
|
4006
4412
|
lower(value: UnfinishedConnection, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4007
4413
|
};
|
|
4414
|
+
FfiConverterTypeWindowLimit: {
|
|
4415
|
+
readFromCursor(c: Cursor): WindowLimit;
|
|
4416
|
+
writeIntoCursor(value: WindowLimit, c: Cursor): void;
|
|
4417
|
+
allocationSize(value: WindowLimit): number;
|
|
4418
|
+
lift(value: UniffiByteArray): WindowLimit;
|
|
4419
|
+
lower(value: WindowLimit, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4420
|
+
};
|
|
4421
|
+
FfiConverterTypeYamuxOptions: {
|
|
4422
|
+
readFromCursor(c: Cursor): YamuxOptions;
|
|
4423
|
+
writeIntoCursor(value: YamuxOptions, c: Cursor): void;
|
|
4424
|
+
allocationSize(value: YamuxOptions): number;
|
|
4425
|
+
lift(value: UniffiByteArray): YamuxOptions;
|
|
4426
|
+
lower(value: YamuxOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4427
|
+
};
|
|
4008
4428
|
};
|
|
4009
4429
|
}>;
|
|
4010
4430
|
export default _default;
|