@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.
@@ -475,6 +475,666 @@ const FfiConverterTypeMdnsOptions = (() => {
475
475
  return new FFIConverter();
476
476
  })();
477
477
 
478
+
479
+ // Enum: WindowLimit
480
+ export enum WindowLimit_Tags {
481
+ Bounded = "Bounded",
482
+ Unlimited = "Unlimited"
483
+ }
484
+ /**
485
+ * A receive window that may be unbounded.
486
+ */
487
+ export const WindowLimit = (() => {
488
+
489
+ type Bounded__interface = {
490
+ tag: WindowLimit_Tags.Bounded;
491
+ inner:
492
+ Readonly<{bytes: bigint}>
493
+ };
494
+ /**
495
+ * At most `bytes`.
496
+ */
497
+ class Bounded_ extends UniffiEnum implements Bounded__interface {
498
+ /**
499
+ * @private
500
+ * This field is private and should not be used, use `tag` instead.
501
+ */
502
+ readonly [uniffiTypeNameSymbol] = "WindowLimit";
503
+ readonly tag = WindowLimit_Tags.Bounded;
504
+ readonly inner:
505
+ Readonly<{bytes: bigint}>;
506
+ constructor(
507
+ inner: {bytes: bigint }) {
508
+ super("WindowLimit", "Bounded");
509
+
510
+ this.inner = Object.freeze(inner);
511
+ }
512
+ static new(
513
+ inner: {bytes: bigint }): Bounded_ {
514
+ return new Bounded_(inner);
515
+ }
516
+
517
+ static instanceOf(obj: any): obj is Bounded_ {
518
+ return obj.tag === WindowLimit_Tags.Bounded;
519
+ }
520
+
521
+ }
522
+
523
+ type Unlimited__interface = {
524
+ tag: WindowLimit_Tags.Unlimited
525
+ };
526
+ /**
527
+ * No window.
528
+ */
529
+ class Unlimited_ extends UniffiEnum implements Unlimited__interface {
530
+ /**
531
+ * @private
532
+ * This field is private and should not be used, use `tag` instead.
533
+ */
534
+ readonly [uniffiTypeNameSymbol] = "WindowLimit";
535
+ readonly tag = WindowLimit_Tags.Unlimited;
536
+ constructor() {
537
+ super("WindowLimit", "Unlimited");
538
+ }
539
+
540
+ static new(): Unlimited_ {
541
+ return new Unlimited_();
542
+ }
543
+
544
+ static instanceOf(obj: any): obj is Unlimited_ {
545
+ return obj.tag === WindowLimit_Tags.Unlimited;
546
+ }
547
+
548
+ }
549
+
550
+ function instanceOf(obj: any): obj is WindowLimit {
551
+ return obj[uniffiTypeNameSymbol] === "WindowLimit";
552
+ }
553
+
554
+ return Object.freeze({
555
+ instanceOf,
556
+ Bounded: Bounded_,
557
+ Unlimited: Unlimited_
558
+ });
559
+
560
+ })();
561
+ /**
562
+ * A receive window that may be unbounded.
563
+ */
564
+ export type WindowLimit = InstanceType<
565
+ typeof WindowLimit['Bounded' | 'Unlimited']
566
+ >;
567
+
568
+ // FfiConverter for enum WindowLimit
569
+ const FfiConverterTypeWindowLimit = (() => {
570
+ type TypeName = WindowLimit;
571
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
572
+ readFromCursor(c: Cursor): TypeName {
573
+ switch (c.readI32()) {
574
+ case 1: return new WindowLimit.Bounded({bytes: FfiConverterUInt64.readFromCursor(c) });
575
+ case 2: return new WindowLimit.Unlimited();
576
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
577
+ }
578
+ }
579
+ writeIntoCursor(value: TypeName, c: Cursor): void {
580
+ switch (value.tag) {
581
+ case WindowLimit_Tags.Bounded: {
582
+ c.writeI32(1);
583
+ const inner = value.inner;
584
+ FfiConverterUInt64.writeIntoCursor(inner.bytes, c);
585
+ return;
586
+ }
587
+ case WindowLimit_Tags.Unlimited: {
588
+ c.writeI32(2);
589
+ return;
590
+ }
591
+ default:
592
+ // Throwing from here means that WindowLimit_Tags hasn't matched an ordinal.
593
+ throw new UniffiInternalError.UnexpectedEnumCase();
594
+ }
595
+ }
596
+ allocationSize(value: TypeName): number {
597
+ switch (value.tag) {
598
+ case WindowLimit_Tags.Bounded: {
599
+ const inner = value.inner;
600
+ let size = 4;
601
+ size += FfiConverterUInt64.allocationSize(inner.bytes);
602
+ return size;
603
+ }
604
+ case WindowLimit_Tags.Unlimited: {
605
+ return 4;
606
+ }
607
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
608
+ }
609
+ }
610
+ }
611
+ return new FFIConverter();
612
+ })();
613
+
614
+ /**
615
+ * QUIC overrides; each field mirrors `minip2p::QuicLimits`.
616
+ */
617
+ export type QuicLimitsOptions = {
618
+ /**
619
+ * Simultaneous connections, inbound and outbound.
620
+ */
621
+ maxConnections?: bigint,
622
+ /**
623
+ * Locally initiated bidirectional streams per connection.
624
+ */
625
+ maxStreamsPerConnection?: bigint,
626
+ /**
627
+ * Bytes queued per stream beyond what the engine accepts; non-zero.
628
+ */
629
+ maxPendingBytesPerStream?: bigint,
630
+ /**
631
+ * Bytes queued per connection beyond what the engine accepts; greater
632
+ * than `control_stream_reserve_bytes`.
633
+ */
634
+ maxPendingConnectionBytes?: bigint,
635
+ /**
636
+ * Part of the connection queue only control streams may fill.
637
+ */
638
+ controlStreamReserveBytes?: bigint,
639
+ /**
640
+ * UDP datagrams retained while the socket would block; non-zero.
641
+ */
642
+ maxPendingDatagrams?: bigint,
643
+ /**
644
+ * Idle timeout advertised to peers, in milliseconds; non-zero.
645
+ */
646
+ idleTimeoutMs?: bigint,
647
+ /**
648
+ * Whether inbound connections need a stateless Retry first.
649
+ */
650
+ requireAddressValidation?: boolean,
651
+ /**
652
+ * Per-stream receive window in bytes; non-zero.
653
+ */
654
+ streamReceiveWindow?: bigint,
655
+ /**
656
+ * Per-connection receive window (unlimited by default).
657
+ */
658
+ connectionReceiveWindow?: WindowLimit,
659
+ /**
660
+ * Bytes buffered per connection for sending; non-zero.
661
+ */
662
+ sendWindow?: bigint,
663
+ /**
664
+ * Time an `h3` connection has to complete Noise, in milliseconds;
665
+ * non-zero.
666
+ */
667
+ webtransportHandshakeTimeoutMs?: bigint
668
+ }
669
+
670
+ /**
671
+ * Generated factory for {@link QuicLimitsOptions} record objects.
672
+ */
673
+ export const QuicLimitsOptions = (() => {
674
+ const defaults = () => ({
675
+ maxConnections: undefined,
676
+ maxStreamsPerConnection: undefined,
677
+ maxPendingBytesPerStream: undefined,
678
+ maxPendingConnectionBytes: undefined,
679
+ controlStreamReserveBytes: undefined,
680
+ maxPendingDatagrams: undefined,
681
+ idleTimeoutMs: undefined,
682
+ requireAddressValidation: undefined,
683
+ streamReceiveWindow: undefined,
684
+ connectionReceiveWindow: undefined,
685
+ sendWindow: undefined,
686
+ webtransportHandshakeTimeoutMs: undefined
687
+ });
688
+ const create = (() => {
689
+ return uniffiCreateRecord<QuicLimitsOptions, ReturnType<typeof defaults>>(defaults);
690
+ })();
691
+ return Object.freeze({
692
+ create,
693
+ new: create,
694
+ defaults: () => Object.freeze(defaults()) as Partial<QuicLimitsOptions>,
695
+ });
696
+ })();
697
+
698
+ const FfiConverterTypeQuicLimitsOptions = (() => {
699
+ type TypeName = QuicLimitsOptions;
700
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
701
+ readFromCursor(c: Cursor): TypeName {
702
+ return {
703
+ maxConnections: FfiConverterOptionalUInt64.readFromCursor(c),
704
+ maxStreamsPerConnection: FfiConverterOptionalUInt64.readFromCursor(c),
705
+ maxPendingBytesPerStream: FfiConverterOptionalUInt64.readFromCursor(c),
706
+ maxPendingConnectionBytes: FfiConverterOptionalUInt64.readFromCursor(c),
707
+ controlStreamReserveBytes: FfiConverterOptionalUInt64.readFromCursor(c),
708
+ maxPendingDatagrams: FfiConverterOptionalUInt64.readFromCursor(c),
709
+ idleTimeoutMs: FfiConverterOptionalUInt64.readFromCursor(c),
710
+ requireAddressValidation: FfiConverterOptionalBoolean.readFromCursor(c),
711
+ streamReceiveWindow: FfiConverterOptionalUInt64.readFromCursor(c),
712
+ connectionReceiveWindow: FfiConverterOptionalTypeWindowLimit.readFromCursor(c),
713
+ sendWindow: FfiConverterOptionalUInt64.readFromCursor(c),
714
+ webtransportHandshakeTimeoutMs: FfiConverterOptionalUInt64.readFromCursor(c)
715
+ };
716
+ }
717
+ writeIntoCursor(value: TypeName, c: Cursor): void {
718
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxConnections, c);
719
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxStreamsPerConnection, c);
720
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxPendingBytesPerStream, c);
721
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxPendingConnectionBytes, c);
722
+ FfiConverterOptionalUInt64.writeIntoCursor(value.controlStreamReserveBytes, c);
723
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxPendingDatagrams, c);
724
+ FfiConverterOptionalUInt64.writeIntoCursor(value.idleTimeoutMs, c);
725
+ FfiConverterOptionalBoolean.writeIntoCursor(value.requireAddressValidation, c);
726
+ FfiConverterOptionalUInt64.writeIntoCursor(value.streamReceiveWindow, c);
727
+ FfiConverterOptionalTypeWindowLimit.writeIntoCursor(value.connectionReceiveWindow, c);
728
+ FfiConverterOptionalUInt64.writeIntoCursor(value.sendWindow, c);
729
+ FfiConverterOptionalUInt64.writeIntoCursor(value.webtransportHandshakeTimeoutMs, c);
730
+ }
731
+ allocationSize(value: TypeName): number {
732
+ return FfiConverterOptionalUInt64.allocationSize(value.maxConnections) +
733
+ FfiConverterOptionalUInt64.allocationSize(value.maxStreamsPerConnection) +
734
+ FfiConverterOptionalUInt64.allocationSize(value.maxPendingBytesPerStream) +
735
+ FfiConverterOptionalUInt64.allocationSize(value.maxPendingConnectionBytes) +
736
+ FfiConverterOptionalUInt64.allocationSize(value.controlStreamReserveBytes) +
737
+ FfiConverterOptionalUInt64.allocationSize(value.maxPendingDatagrams) +
738
+ FfiConverterOptionalUInt64.allocationSize(value.idleTimeoutMs) +
739
+ FfiConverterOptionalBoolean.allocationSize(value.requireAddressValidation) +
740
+ FfiConverterOptionalUInt64.allocationSize(value.streamReceiveWindow) +
741
+ FfiConverterOptionalTypeWindowLimit.allocationSize(value.connectionReceiveWindow) +
742
+ FfiConverterOptionalUInt64.allocationSize(value.sendWindow) +
743
+ FfiConverterOptionalUInt64.allocationSize(value.webtransportHandshakeTimeoutMs);
744
+
745
+ }
746
+ };
747
+ return new FFIConverter();
748
+ })();
749
+
750
+
751
+ // Enum: TimeoutLimit
752
+ export enum TimeoutLimit_Tags {
753
+ AfterMs = "AfterMs",
754
+ Never = "Never"
755
+ }
756
+ /**
757
+ * A timeout that may be disabled.
758
+ */
759
+ export const TimeoutLimit = (() => {
760
+
761
+ type AfterMs__interface = {
762
+ tag: TimeoutLimit_Tags.AfterMs;
763
+ inner:
764
+ Readonly<{ms: bigint}>
765
+ };
766
+ /**
767
+ * Fires after `ms` milliseconds.
768
+ */
769
+ class AfterMs_ extends UniffiEnum implements AfterMs__interface {
770
+ /**
771
+ * @private
772
+ * This field is private and should not be used, use `tag` instead.
773
+ */
774
+ readonly [uniffiTypeNameSymbol] = "TimeoutLimit";
775
+ readonly tag = TimeoutLimit_Tags.AfterMs;
776
+ readonly inner:
777
+ Readonly<{ms: bigint}>;
778
+ constructor(
779
+ inner: {ms: bigint }) {
780
+ super("TimeoutLimit", "AfterMs");
781
+
782
+ this.inner = Object.freeze(inner);
783
+ }
784
+ static new(
785
+ inner: {ms: bigint }): AfterMs_ {
786
+ return new AfterMs_(inner);
787
+ }
788
+
789
+ static instanceOf(obj: any): obj is AfterMs_ {
790
+ return obj.tag === TimeoutLimit_Tags.AfterMs;
791
+ }
792
+
793
+ }
794
+
795
+ type Never__interface = {
796
+ tag: TimeoutLimit_Tags.Never
797
+ };
798
+ /**
799
+ * Waits indefinitely.
800
+ */
801
+ class Never_ extends UniffiEnum implements Never__interface {
802
+ /**
803
+ * @private
804
+ * This field is private and should not be used, use `tag` instead.
805
+ */
806
+ readonly [uniffiTypeNameSymbol] = "TimeoutLimit";
807
+ readonly tag = TimeoutLimit_Tags.Never;
808
+ constructor() {
809
+ super("TimeoutLimit", "Never");
810
+ }
811
+
812
+ static new(): Never_ {
813
+ return new Never_();
814
+ }
815
+
816
+ static instanceOf(obj: any): obj is Never_ {
817
+ return obj.tag === TimeoutLimit_Tags.Never;
818
+ }
819
+
820
+ }
821
+
822
+ function instanceOf(obj: any): obj is TimeoutLimit {
823
+ return obj[uniffiTypeNameSymbol] === "TimeoutLimit";
824
+ }
825
+
826
+ return Object.freeze({
827
+ instanceOf,
828
+ AfterMs: AfterMs_,
829
+ Never: Never_
830
+ });
831
+
832
+ })();
833
+ /**
834
+ * A timeout that may be disabled.
835
+ */
836
+ export type TimeoutLimit = InstanceType<
837
+ typeof TimeoutLimit['AfterMs' | 'Never']
838
+ >;
839
+
840
+ // FfiConverter for enum TimeoutLimit
841
+ const FfiConverterTypeTimeoutLimit = (() => {
842
+ type TypeName = TimeoutLimit;
843
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
844
+ readFromCursor(c: Cursor): TypeName {
845
+ switch (c.readI32()) {
846
+ case 1: return new TimeoutLimit.AfterMs({ms: FfiConverterUInt64.readFromCursor(c) });
847
+ case 2: return new TimeoutLimit.Never();
848
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
849
+ }
850
+ }
851
+ writeIntoCursor(value: TypeName, c: Cursor): void {
852
+ switch (value.tag) {
853
+ case TimeoutLimit_Tags.AfterMs: {
854
+ c.writeI32(1);
855
+ const inner = value.inner;
856
+ FfiConverterUInt64.writeIntoCursor(inner.ms, c);
857
+ return;
858
+ }
859
+ case TimeoutLimit_Tags.Never: {
860
+ c.writeI32(2);
861
+ return;
862
+ }
863
+ default:
864
+ // Throwing from here means that TimeoutLimit_Tags hasn't matched an ordinal.
865
+ throw new UniffiInternalError.UnexpectedEnumCase();
866
+ }
867
+ }
868
+ allocationSize(value: TypeName): number {
869
+ switch (value.tag) {
870
+ case TimeoutLimit_Tags.AfterMs: {
871
+ const inner = value.inner;
872
+ let size = 4;
873
+ size += FfiConverterUInt64.allocationSize(inner.ms);
874
+ return size;
875
+ }
876
+ case TimeoutLimit_Tags.Never: {
877
+ return 4;
878
+ }
879
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
880
+ }
881
+ }
882
+ }
883
+ return new FFIConverter();
884
+ })();
885
+
886
+ /**
887
+ * Yamux overrides; each field mirrors `minip2p::YamuxConfig`.
888
+ */
889
+ export type YamuxOptions = {
890
+ /**
891
+ * Per-stream receive window in bytes; at least 256 KiB.
892
+ */
893
+ receiveWindow?: number,
894
+ /**
895
+ * Largest data-frame payload sent; non-zero.
896
+ */
897
+ maxFrameLen?: number,
898
+ /**
899
+ * Streams tracked at once, counting unsettled closed ones.
900
+ */
901
+ maxStreams?: bigint,
902
+ /**
903
+ * Per-stream cap on accepted, unpulled send bytes; non-zero.
904
+ */
905
+ maxBufferedSend?: bigint,
906
+ /**
907
+ * Session-wide cap on accepted, unpulled send bytes; greater than
908
+ * `control_stream_reserve`.
909
+ */
910
+ maxTotalBufferedSend?: bigint,
911
+ /**
912
+ * Part of the session-wide cap only control streams may fill.
913
+ */
914
+ controlStreamReserve?: bigint,
915
+ /**
916
+ * Control frames that may wait to be pulled.
917
+ */
918
+ maxPendingControl?: bigint
919
+ }
920
+
921
+ /**
922
+ * Generated factory for {@link YamuxOptions} record objects.
923
+ */
924
+ export const YamuxOptions = (() => {
925
+ const defaults = () => ({
926
+ receiveWindow: undefined,
927
+ maxFrameLen: undefined,
928
+ maxStreams: undefined,
929
+ maxBufferedSend: undefined,
930
+ maxTotalBufferedSend: undefined,
931
+ controlStreamReserve: undefined,
932
+ maxPendingControl: undefined
933
+ });
934
+ const create = (() => {
935
+ return uniffiCreateRecord<YamuxOptions, ReturnType<typeof defaults>>(defaults);
936
+ })();
937
+ return Object.freeze({
938
+ create,
939
+ new: create,
940
+ defaults: () => Object.freeze(defaults()) as Partial<YamuxOptions>,
941
+ });
942
+ })();
943
+
944
+ const FfiConverterTypeYamuxOptions = (() => {
945
+ type TypeName = YamuxOptions;
946
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
947
+ readFromCursor(c: Cursor): TypeName {
948
+ return {
949
+ receiveWindow: FfiConverterOptionalUInt32.readFromCursor(c),
950
+ maxFrameLen: FfiConverterOptionalUInt32.readFromCursor(c),
951
+ maxStreams: FfiConverterOptionalUInt64.readFromCursor(c),
952
+ maxBufferedSend: FfiConverterOptionalUInt64.readFromCursor(c),
953
+ maxTotalBufferedSend: FfiConverterOptionalUInt64.readFromCursor(c),
954
+ controlStreamReserve: FfiConverterOptionalUInt64.readFromCursor(c),
955
+ maxPendingControl: FfiConverterOptionalUInt64.readFromCursor(c)
956
+ };
957
+ }
958
+ writeIntoCursor(value: TypeName, c: Cursor): void {
959
+ FfiConverterOptionalUInt32.writeIntoCursor(value.receiveWindow, c);
960
+ FfiConverterOptionalUInt32.writeIntoCursor(value.maxFrameLen, c);
961
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxStreams, c);
962
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxBufferedSend, c);
963
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxTotalBufferedSend, c);
964
+ FfiConverterOptionalUInt64.writeIntoCursor(value.controlStreamReserve, c);
965
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxPendingControl, c);
966
+ }
967
+ allocationSize(value: TypeName): number {
968
+ return FfiConverterOptionalUInt32.allocationSize(value.receiveWindow) +
969
+ FfiConverterOptionalUInt32.allocationSize(value.maxFrameLen) +
970
+ FfiConverterOptionalUInt64.allocationSize(value.maxStreams) +
971
+ FfiConverterOptionalUInt64.allocationSize(value.maxBufferedSend) +
972
+ FfiConverterOptionalUInt64.allocationSize(value.maxTotalBufferedSend) +
973
+ FfiConverterOptionalUInt64.allocationSize(value.controlStreamReserve) +
974
+ FfiConverterOptionalUInt64.allocationSize(value.maxPendingControl);
975
+
976
+ }
977
+ };
978
+ return new FFIConverter();
979
+ })();
980
+
981
+ /**
982
+ * TCP overrides; each field mirrors `minip2p::TcpConfig` (its connection-id
983
+ * namespace stays internal).
984
+ */
985
+ export type TcpLimitsOptions = {
986
+ /**
987
+ * Connections held at once, dialed and accepted alike.
988
+ */
989
+ maxConnections?: bigint,
990
+ /**
991
+ * How long a connection may take to authenticate.
992
+ */
993
+ handshakeTimeoutMs?: TimeoutLimit,
994
+ /**
995
+ * Encrypted bytes one connection holds for its socket.
996
+ */
997
+ maxBufferedSend?: bigint,
998
+ /**
999
+ * How long a connection may hold bytes its socket refuses.
1000
+ */
1001
+ sendStallTimeoutMs?: TimeoutLimit,
1002
+ /**
1003
+ * Each TCP connection's Yamux limits; independent of
1004
+ * [`LimitsOptions::circuit`].
1005
+ */
1006
+ yamux?: YamuxOptions
1007
+ }
1008
+
1009
+ /**
1010
+ * Generated factory for {@link TcpLimitsOptions} record objects.
1011
+ */
1012
+ export const TcpLimitsOptions = (() => {
1013
+ const defaults = () => ({
1014
+ maxConnections: undefined,
1015
+ handshakeTimeoutMs: undefined,
1016
+ maxBufferedSend: undefined,
1017
+ sendStallTimeoutMs: undefined,
1018
+ yamux: undefined
1019
+ });
1020
+ const create = (() => {
1021
+ return uniffiCreateRecord<TcpLimitsOptions, ReturnType<typeof defaults>>(defaults);
1022
+ })();
1023
+ return Object.freeze({
1024
+ create,
1025
+ new: create,
1026
+ defaults: () => Object.freeze(defaults()) as Partial<TcpLimitsOptions>,
1027
+ });
1028
+ })();
1029
+
1030
+ const FfiConverterTypeTcpLimitsOptions = (() => {
1031
+ type TypeName = TcpLimitsOptions;
1032
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1033
+ readFromCursor(c: Cursor): TypeName {
1034
+ return {
1035
+ maxConnections: FfiConverterOptionalUInt64.readFromCursor(c),
1036
+ handshakeTimeoutMs: FfiConverterOptionalTypeTimeoutLimit.readFromCursor(c),
1037
+ maxBufferedSend: FfiConverterOptionalUInt64.readFromCursor(c),
1038
+ sendStallTimeoutMs: FfiConverterOptionalTypeTimeoutLimit.readFromCursor(c),
1039
+ yamux: FfiConverterOptionalTypeYamuxOptions.readFromCursor(c)
1040
+ };
1041
+ }
1042
+ writeIntoCursor(value: TypeName, c: Cursor): void {
1043
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxConnections, c);
1044
+ FfiConverterOptionalTypeTimeoutLimit.writeIntoCursor(value.handshakeTimeoutMs, c);
1045
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxBufferedSend, c);
1046
+ FfiConverterOptionalTypeTimeoutLimit.writeIntoCursor(value.sendStallTimeoutMs, c);
1047
+ FfiConverterOptionalTypeYamuxOptions.writeIntoCursor(value.yamux, c);
1048
+ }
1049
+ allocationSize(value: TypeName): number {
1050
+ return FfiConverterOptionalUInt64.allocationSize(value.maxConnections) +
1051
+ FfiConverterOptionalTypeTimeoutLimit.allocationSize(value.handshakeTimeoutMs) +
1052
+ FfiConverterOptionalUInt64.allocationSize(value.maxBufferedSend) +
1053
+ FfiConverterOptionalTypeTimeoutLimit.allocationSize(value.sendStallTimeoutMs) +
1054
+ FfiConverterOptionalTypeYamuxOptions.allocationSize(value.yamux);
1055
+
1056
+ }
1057
+ };
1058
+ return new FFIConverter();
1059
+ })();
1060
+
1061
+ /**
1062
+ * Transport limit overrides.
1063
+ *
1064
+ * Every field is optional: an absent record or field keeps the native
1065
+ * default, so an omitted record and an empty one behave identically. Limits
1066
+ * for a transport the endpoint does not bind (TCP without a `/tcp` listen
1067
+ * address, say) are ignored, not validated. An invalid limit fails
1068
+ * construction with `InvalidConfig { capability: Transport }`.
1069
+ */
1070
+ export type LimitsOptions = {
1071
+ /**
1072
+ * QUIC (and WebTransport) transport limits.
1073
+ */
1074
+ quic?: QuicLimitsOptions,
1075
+ /**
1076
+ * TCP transport limits, including its connections' Yamux limits.
1077
+ */
1078
+ tcp?: TcpLimitsOptions,
1079
+ /**
1080
+ * Relay circuits' Yamux limits; independent of [`TcpLimitsOptions::yamux`].
1081
+ */
1082
+ circuit?: YamuxOptions,
1083
+ /**
1084
+ * Most relayed circuits held at once (`NatConfig::max_circuits`): past
1085
+ * it inbound circuits are refused and relay legs fail.
1086
+ */
1087
+ maxCircuits?: bigint
1088
+ }
1089
+
1090
+ /**
1091
+ * Generated factory for {@link LimitsOptions} record objects.
1092
+ */
1093
+ export const LimitsOptions = (() => {
1094
+ const defaults = () => ({
1095
+ quic: undefined,
1096
+ tcp: undefined,
1097
+ circuit: undefined,
1098
+ maxCircuits: undefined
1099
+ });
1100
+ const create = (() => {
1101
+ return uniffiCreateRecord<LimitsOptions, ReturnType<typeof defaults>>(defaults);
1102
+ })();
1103
+ return Object.freeze({
1104
+ create,
1105
+ new: create,
1106
+ defaults: () => Object.freeze(defaults()) as Partial<LimitsOptions>,
1107
+ });
1108
+ })();
1109
+
1110
+ const FfiConverterTypeLimitsOptions = (() => {
1111
+ type TypeName = LimitsOptions;
1112
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1113
+ readFromCursor(c: Cursor): TypeName {
1114
+ return {
1115
+ quic: FfiConverterOptionalTypeQuicLimitsOptions.readFromCursor(c),
1116
+ tcp: FfiConverterOptionalTypeTcpLimitsOptions.readFromCursor(c),
1117
+ circuit: FfiConverterOptionalTypeYamuxOptions.readFromCursor(c),
1118
+ maxCircuits: FfiConverterOptionalUInt64.readFromCursor(c)
1119
+ };
1120
+ }
1121
+ writeIntoCursor(value: TypeName, c: Cursor): void {
1122
+ FfiConverterOptionalTypeQuicLimitsOptions.writeIntoCursor(value.quic, c);
1123
+ FfiConverterOptionalTypeTcpLimitsOptions.writeIntoCursor(value.tcp, c);
1124
+ FfiConverterOptionalTypeYamuxOptions.writeIntoCursor(value.circuit, c);
1125
+ FfiConverterOptionalUInt64.writeIntoCursor(value.maxCircuits, c);
1126
+ }
1127
+ allocationSize(value: TypeName): number {
1128
+ return FfiConverterOptionalTypeQuicLimitsOptions.allocationSize(value.quic) +
1129
+ FfiConverterOptionalTypeTcpLimitsOptions.allocationSize(value.tcp) +
1130
+ FfiConverterOptionalTypeYamuxOptions.allocationSize(value.circuit) +
1131
+ FfiConverterOptionalUInt64.allocationSize(value.maxCircuits);
1132
+
1133
+ }
1134
+ };
1135
+ return new FFIConverter();
1136
+ })();
1137
+
478
1138
  /**
479
1139
  * Configuration used to construct an FFI endpoint.
480
1140
  */
@@ -518,7 +1178,11 @@ export type EndpointConfig = {
518
1178
  /**
519
1179
  * Local-link mDNS settings, or no mDNS discovery when absent.
520
1180
  */
521
- mdns?: MdnsOptions
1181
+ mdns?: MdnsOptions,
1182
+ /**
1183
+ * Transport limit overrides, or every native default when absent.
1184
+ */
1185
+ limits?: LimitsOptions
522
1186
  }
523
1187
 
524
1188
  /**
@@ -550,7 +1214,8 @@ const FfiConverterTypeEndpointConfig = (() => {
550
1214
  allowUnsigned: FfiConverterBool.readFromCursor(c),
551
1215
  protocols: FfiConverterSequenceString.readFromCursor(c),
552
1216
  discovery: FfiConverterOptionalTypeDiscoveryOptions.readFromCursor(c),
553
- mdns: FfiConverterOptionalTypeMdnsOptions.readFromCursor(c)
1217
+ mdns: FfiConverterOptionalTypeMdnsOptions.readFromCursor(c),
1218
+ limits: FfiConverterOptionalTypeLimitsOptions.readFromCursor(c)
554
1219
  };
555
1220
  }
556
1221
  writeIntoCursor(value: TypeName, c: Cursor): void {
@@ -563,6 +1228,7 @@ const FfiConverterTypeEndpointConfig = (() => {
563
1228
  FfiConverterSequenceString.writeIntoCursor(value.protocols, c);
564
1229
  FfiConverterOptionalTypeDiscoveryOptions.writeIntoCursor(value.discovery, c);
565
1230
  FfiConverterOptionalTypeMdnsOptions.writeIntoCursor(value.mdns, c);
1231
+ FfiConverterOptionalTypeLimitsOptions.writeIntoCursor(value.limits, c);
566
1232
  }
567
1233
  allocationSize(value: TypeName): number {
568
1234
  return FfiConverterOptionalString.allocationSize(value.agentVersion) +
@@ -573,7 +1239,8 @@ const FfiConverterTypeEndpointConfig = (() => {
573
1239
  FfiConverterBool.allocationSize(value.allowUnsigned) +
574
1240
  FfiConverterSequenceString.allocationSize(value.protocols) +
575
1241
  FfiConverterOptionalTypeDiscoveryOptions.allocationSize(value.discovery) +
576
- FfiConverterOptionalTypeMdnsOptions.allocationSize(value.mdns);
1242
+ FfiConverterOptionalTypeMdnsOptions.allocationSize(value.mdns) +
1243
+ FfiConverterOptionalTypeLimitsOptions.allocationSize(value.limits);
577
1244
 
578
1245
  }
579
1246
  };
@@ -2498,6 +3165,7 @@ export enum P2pEvent_Tags {
2498
3165
  StreamClosed = "StreamClosed",
2499
3166
  EndpointError = "EndpointError",
2500
3167
  ReachabilityChanged = "ReachabilityChanged",
3168
+ ListenAddressesChanged = "ListenAddressesChanged",
2501
3169
  PublicAddressesChanged = "PublicAddressesChanged",
2502
3170
  RelayReserved = "RelayReserved",
2503
3171
  RelayReservationLost = "RelayReservationLost",
@@ -3147,6 +3815,43 @@ inner: {previous: Reachability; current: Reachability; confirmedAddrs: Array<str
3147
3815
 
3148
3816
  }
3149
3817
 
3818
+ type ListenAddressesChanged__interface = {
3819
+ tag: P2pEvent_Tags.ListenAddressesChanged;
3820
+ inner:
3821
+ Readonly<{addrs: Array<string>}>
3822
+ };
3823
+ /**
3824
+ * The listen set changed without a `listen` call, as when a
3825
+ * WebTransport listener's certificate rotates: `addrs` is the whole new
3826
+ * set, with `/p2p/<local>`, for the app to republish. External and
3827
+ * public address changes never fire it.
3828
+ */
3829
+ class ListenAddressesChanged_ extends UniffiEnum implements ListenAddressesChanged__interface {
3830
+ /**
3831
+ * @private
3832
+ * This field is private and should not be used, use `tag` instead.
3833
+ */
3834
+ readonly [uniffiTypeNameSymbol] = "P2pEvent";
3835
+ readonly tag = P2pEvent_Tags.ListenAddressesChanged;
3836
+ readonly inner:
3837
+ Readonly<{addrs: Array<string>}>;
3838
+ constructor(
3839
+ inner: {addrs: Array<string> }) {
3840
+ super("P2pEvent", "ListenAddressesChanged");
3841
+
3842
+ this.inner = Object.freeze(inner);
3843
+ }
3844
+ static new(
3845
+ inner: {addrs: Array<string> }): ListenAddressesChanged_ {
3846
+ return new ListenAddressesChanged_(inner);
3847
+ }
3848
+
3849
+ static instanceOf(obj: any): obj is ListenAddressesChanged_ {
3850
+ return obj.tag === P2pEvent_Tags.ListenAddressesChanged;
3851
+ }
3852
+
3853
+ }
3854
+
3150
3855
  type PublicAddressesChanged__interface = {
3151
3856
  tag: P2pEvent_Tags.PublicAddressesChanged;
3152
3857
  inner:
@@ -3921,6 +4626,7 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
3921
4626
  StreamClosed: StreamClosed_,
3922
4627
  EndpointError: EndpointError_,
3923
4628
  ReachabilityChanged: ReachabilityChanged_,
4629
+ ListenAddressesChanged: ListenAddressesChanged_,
3924
4630
  PublicAddressesChanged: PublicAddressesChanged_,
3925
4631
  RelayReserved: RelayReserved_,
3926
4632
  RelayReservationLost: RelayReservationLost_,
@@ -3950,7 +4656,7 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
3950
4656
  * Event delivered by the native endpoint driver.
3951
4657
  */
3952
4658
  export type P2pEvent = InstanceType<
3953
- 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']
4659
+ 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']
3954
4660
  >;
3955
4661
 
3956
4662
  // FfiConverter for enum P2pEvent
@@ -3977,28 +4683,29 @@ const FfiConverterTypeP2pEvent = (() => {
3977
4683
  case 16: return new P2pEvent.StreamClosed({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c) });
3978
4684
  case 17: return new P2pEvent.EndpointError({kind: FfiConverterTypeEndpointErrorKind.readFromCursor(c), peerId: FfiConverterOptionalString.readFromCursor(c), connId: FfiConverterOptionalUInt64.readFromCursor(c), streamId: FfiConverterOptionalUInt64.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
3979
4685
  case 18: return new P2pEvent.ReachabilityChanged({previous: FfiConverterTypeReachability.readFromCursor(c), current: FfiConverterTypeReachability.readFromCursor(c), confirmedAddrs: FfiConverterSequenceString.readFromCursor(c) });
3980
- case 19: return new P2pEvent.PublicAddressesChanged({addrs: FfiConverterSequenceString.readFromCursor(c) });
3981
- case 20: return new P2pEvent.RelayReserved({relayPeerId: FfiConverterString.readFromCursor(c), expiresUnixSecs: FfiConverterOptionalUInt64.readFromCursor(c) });
3982
- case 21: return new P2pEvent.RelayReservationLost({relayPeerId: FfiConverterString.readFromCursor(c) });
3983
- case 22: return new P2pEvent.PathEstablished({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
3984
- case 23: return new P2pEvent.InboundPathEstablished({peerId: FfiConverterString.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
3985
- case 24: return new P2pEvent.PathUpgraded({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), from: FfiConverterTypePathKind.readFromCursor(c), to: FfiConverterTypePathKind.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
3986
- case 25: return new P2pEvent.HolePunchFailed({connectId: FfiConverterUInt64.readFromCursor(c), attempt: FfiConverterUInt32.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
3987
- case 26: return new P2pEvent.ConnectFailed({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), kind: FfiConverterTypeNatErrorKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
3988
- case 27: return new P2pEvent.ConnectCancelled({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c) });
3989
- case 28: return new P2pEvent.InboundDirectUpgrade({peerId: FfiConverterString.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
3990
- case 29: return new P2pEvent.Message({fromPeerId: FfiConverterString.readFromCursor(c), topics: FfiConverterSequenceString.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c), seqno: FfiConverterArrayBuffer.readFromCursor(c), signed: FfiConverterBool.readFromCursor(c) });
3991
- case 30: return new P2pEvent.PeerSubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
3992
- case 31: return new P2pEvent.PeerUnsubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
3993
- case 32: return new P2pEvent.GossipsubOutboundFailure({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
3994
- case 33: return new P2pEvent.GossipsubProtocolViolation({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
3995
- case 34: return new P2pEvent.PeerDiscovered({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
3996
- case 35: return new P2pEvent.PeerUpdated({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
3997
- case 36: return new P2pEvent.PeerExpired({peerId: FfiConverterString.readFromCursor(c) });
3998
- case 37: return new P2pEvent.DiscoveryDialFailed({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
3999
- case 38: return new P2pEvent.MdnsFailed({kind: FfiConverterTypeMdnsFailureKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
4000
- case 39: return new P2pEvent.MdnsRecovered();
4001
- case 40: return new P2pEvent.DiscoveryProtocolViolation({peerId: FfiConverterOptionalString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c), reason: FfiConverterString.readFromCursor(c), suppressed: FfiConverterUInt32.readFromCursor(c) });
4686
+ case 19: return new P2pEvent.ListenAddressesChanged({addrs: FfiConverterSequenceString.readFromCursor(c) });
4687
+ case 20: return new P2pEvent.PublicAddressesChanged({addrs: FfiConverterSequenceString.readFromCursor(c) });
4688
+ case 21: return new P2pEvent.RelayReserved({relayPeerId: FfiConverterString.readFromCursor(c), expiresUnixSecs: FfiConverterOptionalUInt64.readFromCursor(c) });
4689
+ case 22: return new P2pEvent.RelayReservationLost({relayPeerId: FfiConverterString.readFromCursor(c) });
4690
+ case 23: return new P2pEvent.PathEstablished({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
4691
+ case 24: return new P2pEvent.InboundPathEstablished({peerId: FfiConverterString.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
4692
+ case 25: return new P2pEvent.PathUpgraded({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), from: FfiConverterTypePathKind.readFromCursor(c), to: FfiConverterTypePathKind.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
4693
+ case 26: return new P2pEvent.HolePunchFailed({connectId: FfiConverterUInt64.readFromCursor(c), attempt: FfiConverterUInt32.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
4694
+ case 27: return new P2pEvent.ConnectFailed({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), kind: FfiConverterTypeNatErrorKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
4695
+ case 28: return new P2pEvent.ConnectCancelled({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c) });
4696
+ case 29: return new P2pEvent.InboundDirectUpgrade({peerId: FfiConverterString.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
4697
+ case 30: return new P2pEvent.Message({fromPeerId: FfiConverterString.readFromCursor(c), topics: FfiConverterSequenceString.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c), seqno: FfiConverterArrayBuffer.readFromCursor(c), signed: FfiConverterBool.readFromCursor(c) });
4698
+ case 31: return new P2pEvent.PeerSubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
4699
+ case 32: return new P2pEvent.PeerUnsubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
4700
+ case 33: return new P2pEvent.GossipsubOutboundFailure({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
4701
+ case 34: return new P2pEvent.GossipsubProtocolViolation({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
4702
+ case 35: return new P2pEvent.PeerDiscovered({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
4703
+ case 36: return new P2pEvent.PeerUpdated({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
4704
+ case 37: return new P2pEvent.PeerExpired({peerId: FfiConverterString.readFromCursor(c) });
4705
+ case 38: return new P2pEvent.DiscoveryDialFailed({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
4706
+ case 39: return new P2pEvent.MdnsFailed({kind: FfiConverterTypeMdnsFailureKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
4707
+ case 40: return new P2pEvent.MdnsRecovered();
4708
+ case 41: return new P2pEvent.DiscoveryProtocolViolation({peerId: FfiConverterOptionalString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c), reason: FfiConverterString.readFromCursor(c), suppressed: FfiConverterUInt32.readFromCursor(c) });
4002
4709
  default: throw new UniffiInternalError.UnexpectedEnumCase();
4003
4710
  }
4004
4711
  }
@@ -4150,27 +4857,33 @@ const FfiConverterTypeP2pEvent = (() => {
4150
4857
  FfiConverterSequenceString.writeIntoCursor(inner.confirmedAddrs, c);
4151
4858
  return;
4152
4859
  }
4153
- case P2pEvent_Tags.PublicAddressesChanged: {
4860
+ case P2pEvent_Tags.ListenAddressesChanged: {
4154
4861
  c.writeI32(19);
4155
4862
  const inner = value.inner;
4156
4863
  FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
4157
4864
  return;
4158
4865
  }
4159
- case P2pEvent_Tags.RelayReserved: {
4866
+ case P2pEvent_Tags.PublicAddressesChanged: {
4160
4867
  c.writeI32(20);
4161
4868
  const inner = value.inner;
4869
+ FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
4870
+ return;
4871
+ }
4872
+ case P2pEvent_Tags.RelayReserved: {
4873
+ c.writeI32(21);
4874
+ const inner = value.inner;
4162
4875
  FfiConverterString.writeIntoCursor(inner.relayPeerId, c);
4163
4876
  FfiConverterOptionalUInt64.writeIntoCursor(inner.expiresUnixSecs, c);
4164
4877
  return;
4165
4878
  }
4166
4879
  case P2pEvent_Tags.RelayReservationLost: {
4167
- c.writeI32(21);
4880
+ c.writeI32(22);
4168
4881
  const inner = value.inner;
4169
4882
  FfiConverterString.writeIntoCursor(inner.relayPeerId, c);
4170
4883
  return;
4171
4884
  }
4172
4885
  case P2pEvent_Tags.PathEstablished: {
4173
- c.writeI32(22);
4886
+ c.writeI32(23);
4174
4887
  const inner = value.inner;
4175
4888
  FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
4176
4889
  FfiConverterString.writeIntoCursor(inner.peerId, c);
@@ -4179,7 +4892,7 @@ const FfiConverterTypeP2pEvent = (() => {
4179
4892
  return;
4180
4893
  }
4181
4894
  case P2pEvent_Tags.InboundPathEstablished: {
4182
- c.writeI32(23);
4895
+ c.writeI32(24);
4183
4896
  const inner = value.inner;
4184
4897
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4185
4898
  FfiConverterTypePathKind.writeIntoCursor(inner.path, c);
@@ -4187,7 +4900,7 @@ const FfiConverterTypeP2pEvent = (() => {
4187
4900
  return;
4188
4901
  }
4189
4902
  case P2pEvent_Tags.PathUpgraded: {
4190
- c.writeI32(24);
4903
+ c.writeI32(25);
4191
4904
  const inner = value.inner;
4192
4905
  FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
4193
4906
  FfiConverterString.writeIntoCursor(inner.peerId, c);
@@ -4198,7 +4911,7 @@ const FfiConverterTypeP2pEvent = (() => {
4198
4911
  return;
4199
4912
  }
4200
4913
  case P2pEvent_Tags.HolePunchFailed: {
4201
- c.writeI32(25);
4914
+ c.writeI32(26);
4202
4915
  const inner = value.inner;
4203
4916
  FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
4204
4917
  FfiConverterUInt32.writeIntoCursor(inner.attempt, c);
@@ -4206,7 +4919,7 @@ const FfiConverterTypeP2pEvent = (() => {
4206
4919
  return;
4207
4920
  }
4208
4921
  case P2pEvent_Tags.ConnectFailed: {
4209
- c.writeI32(26);
4922
+ c.writeI32(27);
4210
4923
  const inner = value.inner;
4211
4924
  FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
4212
4925
  FfiConverterString.writeIntoCursor(inner.peerId, c);
@@ -4215,14 +4928,14 @@ const FfiConverterTypeP2pEvent = (() => {
4215
4928
  return;
4216
4929
  }
4217
4930
  case P2pEvent_Tags.ConnectCancelled: {
4218
- c.writeI32(27);
4931
+ c.writeI32(28);
4219
4932
  const inner = value.inner;
4220
4933
  FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
4221
4934
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4222
4935
  return;
4223
4936
  }
4224
4937
  case P2pEvent_Tags.InboundDirectUpgrade: {
4225
- c.writeI32(28);
4938
+ c.writeI32(29);
4226
4939
  const inner = value.inner;
4227
4940
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4228
4941
  FfiConverterUInt64.writeIntoCursor(inner.oldConnId, c);
@@ -4230,7 +4943,7 @@ const FfiConverterTypeP2pEvent = (() => {
4230
4943
  return;
4231
4944
  }
4232
4945
  case P2pEvent_Tags.Message: {
4233
- c.writeI32(29);
4946
+ c.writeI32(30);
4234
4947
  const inner = value.inner;
4235
4948
  FfiConverterString.writeIntoCursor(inner.fromPeerId, c);
4236
4949
  FfiConverterSequenceString.writeIntoCursor(inner.topics, c);
@@ -4240,35 +4953,35 @@ const FfiConverterTypeP2pEvent = (() => {
4240
4953
  return;
4241
4954
  }
4242
4955
  case P2pEvent_Tags.PeerSubscribed: {
4243
- c.writeI32(30);
4956
+ c.writeI32(31);
4244
4957
  const inner = value.inner;
4245
4958
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4246
4959
  FfiConverterString.writeIntoCursor(inner.topic, c);
4247
4960
  return;
4248
4961
  }
4249
4962
  case P2pEvent_Tags.PeerUnsubscribed: {
4250
- c.writeI32(31);
4963
+ c.writeI32(32);
4251
4964
  const inner = value.inner;
4252
4965
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4253
4966
  FfiConverterString.writeIntoCursor(inner.topic, c);
4254
4967
  return;
4255
4968
  }
4256
4969
  case P2pEvent_Tags.GossipsubOutboundFailure: {
4257
- c.writeI32(32);
4970
+ c.writeI32(33);
4258
4971
  const inner = value.inner;
4259
4972
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4260
4973
  FfiConverterString.writeIntoCursor(inner.reason, c);
4261
4974
  return;
4262
4975
  }
4263
4976
  case P2pEvent_Tags.GossipsubProtocolViolation: {
4264
- c.writeI32(33);
4977
+ c.writeI32(34);
4265
4978
  const inner = value.inner;
4266
4979
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4267
4980
  FfiConverterString.writeIntoCursor(inner.reason, c);
4268
4981
  return;
4269
4982
  }
4270
4983
  case P2pEvent_Tags.PeerDiscovered: {
4271
- c.writeI32(34);
4984
+ c.writeI32(35);
4272
4985
  const inner = value.inner;
4273
4986
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4274
4987
  FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
@@ -4276,7 +4989,7 @@ const FfiConverterTypeP2pEvent = (() => {
4276
4989
  return;
4277
4990
  }
4278
4991
  case P2pEvent_Tags.PeerUpdated: {
4279
- c.writeI32(35);
4992
+ c.writeI32(36);
4280
4993
  const inner = value.inner;
4281
4994
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4282
4995
  FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
@@ -4284,31 +4997,31 @@ const FfiConverterTypeP2pEvent = (() => {
4284
4997
  return;
4285
4998
  }
4286
4999
  case P2pEvent_Tags.PeerExpired: {
4287
- c.writeI32(36);
5000
+ c.writeI32(37);
4288
5001
  const inner = value.inner;
4289
5002
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4290
5003
  return;
4291
5004
  }
4292
5005
  case P2pEvent_Tags.DiscoveryDialFailed: {
4293
- c.writeI32(37);
5006
+ c.writeI32(38);
4294
5007
  const inner = value.inner;
4295
5008
  FfiConverterString.writeIntoCursor(inner.peerId, c);
4296
5009
  FfiConverterString.writeIntoCursor(inner.reason, c);
4297
5010
  return;
4298
5011
  }
4299
5012
  case P2pEvent_Tags.MdnsFailed: {
4300
- c.writeI32(38);
5013
+ c.writeI32(39);
4301
5014
  const inner = value.inner;
4302
5015
  FfiConverterTypeMdnsFailureKind.writeIntoCursor(inner.kind, c);
4303
5016
  FfiConverterString.writeIntoCursor(inner.detail, c);
4304
5017
  return;
4305
5018
  }
4306
5019
  case P2pEvent_Tags.MdnsRecovered: {
4307
- c.writeI32(39);
5020
+ c.writeI32(40);
4308
5021
  return;
4309
5022
  }
4310
5023
  case P2pEvent_Tags.DiscoveryProtocolViolation: {
4311
- c.writeI32(40);
5024
+ c.writeI32(41);
4312
5025
  const inner = value.inner;
4313
5026
  FfiConverterOptionalString.writeIntoCursor(inner.peerId, c);
4314
5027
  FfiConverterTypeDiscoverySource.writeIntoCursor(inner.source, c);
@@ -4469,6 +5182,12 @@ const FfiConverterTypeP2pEvent = (() => {
4469
5182
  size += FfiConverterSequenceString.allocationSize(inner.confirmedAddrs);
4470
5183
  return size;
4471
5184
  }
5185
+ case P2pEvent_Tags.ListenAddressesChanged: {
5186
+ const inner = value.inner;
5187
+ let size = 4;
5188
+ size += FfiConverterSequenceString.allocationSize(inner.addrs);
5189
+ return size;
5190
+ }
4472
5191
  case P2pEvent_Tags.PublicAddressesChanged: {
4473
5192
  const inner = value.inner;
4474
5193
  let size = 4;
@@ -4656,12 +5375,36 @@ const FfiConverterOptionalTypeDiscoveryOptions = new FfiConverterOptional(FfiCon
4656
5375
  // FfiConverter for MdnsOptions | undefined
4657
5376
  const FfiConverterOptionalTypeMdnsOptions = new FfiConverterOptional(FfiConverterTypeMdnsOptions);
4658
5377
 
4659
- // FfiConverter for ArrayBuffer | undefined
4660
- const FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterArrayBuffer);
4661
-
4662
5378
  // FfiConverter for bigint | undefined
4663
5379
  const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
4664
5380
 
5381
+ // FfiConverter for boolean | undefined
5382
+ const FfiConverterOptionalBoolean = new FfiConverterOptional(FfiConverterBool);
5383
+
5384
+ // FfiConverter for WindowLimit | undefined
5385
+ const FfiConverterOptionalTypeWindowLimit = new FfiConverterOptional(FfiConverterTypeWindowLimit);
5386
+
5387
+ // FfiConverter for QuicLimitsOptions | undefined
5388
+ const FfiConverterOptionalTypeQuicLimitsOptions = new FfiConverterOptional(FfiConverterTypeQuicLimitsOptions);
5389
+
5390
+ // FfiConverter for TimeoutLimit | undefined
5391
+ const FfiConverterOptionalTypeTimeoutLimit = new FfiConverterOptional(FfiConverterTypeTimeoutLimit);
5392
+
5393
+ // FfiConverter for number | undefined
5394
+ const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);
5395
+
5396
+ // FfiConverter for YamuxOptions | undefined
5397
+ const FfiConverterOptionalTypeYamuxOptions = new FfiConverterOptional(FfiConverterTypeYamuxOptions);
5398
+
5399
+ // FfiConverter for TcpLimitsOptions | undefined
5400
+ const FfiConverterOptionalTypeTcpLimitsOptions = new FfiConverterOptional(FfiConverterTypeTcpLimitsOptions);
5401
+
5402
+ // FfiConverter for LimitsOptions | undefined
5403
+ const FfiConverterOptionalTypeLimitsOptions = new FfiConverterOptional(FfiConverterTypeLimitsOptions);
5404
+
5405
+ // FfiConverter for ArrayBuffer | undefined
5406
+ const FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterArrayBuffer);
5407
+
4665
5408
  // FfiConverter for Array<bigint>
4666
5409
  const FfiConverterSequenceUInt64 = new FfiConverterArray(FfiConverterUInt64);
4667
5410
 
@@ -4706,14 +5449,20 @@ export default Object.freeze({
4706
5449
  FfiConverterTypeFfiError,
4707
5450
  FfiConverterTypeIdentifyInfo,
4708
5451
  FfiConverterTypeKnownPeerInfo,
5452
+ FfiConverterTypeLimitsOptions,
4709
5453
  FfiConverterTypeMdnsFailureKind,
4710
5454
  FfiConverterTypeMdnsOptions,
4711
5455
  FfiConverterTypeNatErrorKind,
4712
5456
  FfiConverterTypeOpenStreamResult,
4713
5457
  FfiConverterTypeP2pEvent,
4714
5458
  FfiConverterTypePathKind,
5459
+ FfiConverterTypeQuicLimitsOptions,
4715
5460
  FfiConverterTypeReachability,
4716
5461
  FfiConverterTypeRelayReservationInfo,
5462
+ FfiConverterTypeTcpLimitsOptions,
5463
+ FfiConverterTypeTimeoutLimit,
4717
5464
  FfiConverterTypeUnfinishedConnection,
5465
+ FfiConverterTypeWindowLimit,
5466
+ FfiConverterTypeYamuxOptions,
4718
5467
  }
4719
5468
  });