@minip2p/react-native 0.8.2 → 0.8.3

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.
@@ -298,7 +298,7 @@ export interface P2pEndpointLike {
298
298
  /**
299
299
  * Forgets a stream.
300
300
  */
301
- abandonStream(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
301
+ abandonStream(connId: bigint, streamId: bigint) /*throws*/: void;
302
302
  /**
303
303
  * Returns the active relay reservation.
304
304
  */
@@ -314,7 +314,7 @@ export interface P2pEndpointLike {
314
314
  /**
315
315
  * Half-closes a stream's write side.
316
316
  */
317
- closeStreamWrite(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
317
+ closeStreamWrite(connId: bigint, streamId: bigint) /*throws*/: void;
318
318
  /**
319
319
  * Starts one Connection attempt and returns its Connect ID.
320
320
  */
@@ -386,7 +386,7 @@ export interface P2pEndpointLike {
386
386
  /**
387
387
  * Resets a stream.
388
388
  */
389
- resetStream(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
389
+ resetStream(connId: bigint, streamId: bigint) /*throws*/: void;
390
390
  /**
391
391
  * Sends bytes on a stream, named by its connection and stream ids.
392
392
  *
@@ -395,7 +395,7 @@ export interface P2pEndpointLike {
395
395
  * write side ends first (`StreamWriteStopped`, `StreamClosed`, a reset,
396
396
  * or the connection closing or being replaced), which drops the tail.
397
397
  */
398
- sendStream(peerId: string, connId: bigint, streamId: bigint, data: ArrayBuffer) /*throws*/: boolean;
398
+ sendStream(connId: bigint, streamId: bigint, data: ArrayBuffer) /*throws*/: boolean;
399
399
  /**
400
400
  * Accepted for compatibility; has no effect, since the driver sleeps until the endpoint's next deadline.
401
401
  */
@@ -466,11 +466,10 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
466
466
  /**
467
467
  * Forgets a stream.
468
468
  */
469
- abandonStream(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
469
+ abandonStream(connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
470
470
  /*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
471
471
  /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_abandon_stream(
472
472
  uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
473
- FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
474
473
  FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
475
474
  FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
476
475
  callStatus);
@@ -530,11 +529,10 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
530
529
  /**
531
530
  * Half-closes a stream's write side.
532
531
  */
533
- closeStreamWrite(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
532
+ closeStreamWrite(connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
534
533
  /*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
535
534
  /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_close_stream_write(
536
535
  uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
537
- FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
538
536
  FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
539
537
  FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
540
538
  callStatus);
@@ -858,11 +856,10 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
858
856
  /**
859
857
  * Resets a stream.
860
858
  */
861
- resetStream(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
859
+ resetStream(connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
862
860
  /*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
863
861
  /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_reset_stream(
864
862
  uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
865
- FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
866
863
  FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
867
864
  FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
868
865
  callStatus);
@@ -879,13 +876,12 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
879
876
  * write side ends first (`StreamWriteStopped`, `StreamClosed`, a reset,
880
877
  * or the connection closing or being replaced), which drops the tail.
881
878
  */
882
- sendStream(peerId: string, connId: bigint, streamId: bigint, data: ArrayBuffer): boolean /*throws*/ {
879
+ sendStream(connId: bigint, streamId: bigint, data: ArrayBuffer): boolean /*throws*/ {
883
880
  return FfiConverterBool.lift(uniffiCaller.rustCallWithError(
884
881
  /*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
885
882
  /*caller:*/ (callStatus) => {
886
883
  return nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_send_stream(
887
884
  uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
888
- FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
889
885
  FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
890
886
  FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
891
887
  FfiConverterArrayBuffer.lower(data, nativeModule().rustbuffer_alloc),
@@ -1123,7 +1119,7 @@ function uniffiEnsureInitialized() {
1123
1119
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_constructor_p2pendpoint_new() !== 40346) {
1124
1120
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_constructor_p2pendpoint_new");
1125
1121
  }
1126
- if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream() !== 39078) {
1122
+ if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream() !== 3134) {
1127
1123
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream");
1128
1124
  }
1129
1125
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_active_reservation() !== 7490) {
@@ -1135,7 +1131,7 @@ function uniffiEnsureInitialized() {
1135
1131
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_cancel_connect() !== 21146) {
1136
1132
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_cancel_connect");
1137
1133
  }
1138
- if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write() !== 32688) {
1134
+ if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write() !== 63517) {
1139
1135
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write");
1140
1136
  }
1141
1137
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_connect() !== 21790) {
@@ -1189,10 +1185,10 @@ function uniffiEnsureInitialized() {
1189
1185
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reachability() !== 4853) {
1190
1186
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_reachability");
1191
1187
  }
1192
- if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream() !== 50205) {
1188
+ if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream() !== 8949) {
1193
1189
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream");
1194
1190
  }
1195
- if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream() !== 41451) {
1191
+ if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream() !== 31876) {
1196
1192
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream");
1197
1193
  }
1198
1194
  if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_set_active() !== 10522) {
@@ -2229,7 +2229,7 @@ inner: {peerId: string; connId: bigint; protocols: Array<string> }): PeerReady_
2229
2229
  type IdentifyReceived__interface = {
2230
2230
  tag: P2pEvent_Tags.IdentifyReceived;
2231
2231
  inner:
2232
- Readonly<{peerId: string; info: IdentifyInfo}>
2232
+ Readonly<{peerId: string; connId: bigint; info: IdentifyInfo}>
2233
2233
  };
2234
2234
  /**
2235
2235
  * A peer supplied a new Identify snapshot.
@@ -2242,15 +2242,15 @@ Readonly<{peerId: string; info: IdentifyInfo}>
2242
2242
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2243
2243
  readonly tag = P2pEvent_Tags.IdentifyReceived;
2244
2244
  readonly inner:
2245
- Readonly<{peerId: string; info: IdentifyInfo}>;
2245
+ Readonly<{peerId: string; connId: bigint; info: IdentifyInfo}>;
2246
2246
  constructor(
2247
- inner: {peerId: string; info: IdentifyInfo }) {
2247
+ inner: {peerId: string; connId: bigint; info: IdentifyInfo }) {
2248
2248
  super("P2pEvent", "IdentifyReceived");
2249
2249
 
2250
2250
  this.inner = Object.freeze(inner);
2251
2251
  }
2252
2252
  static new(
2253
- inner: {peerId: string; info: IdentifyInfo }): IdentifyReceived_ {
2253
+ inner: {peerId: string; connId: bigint; info: IdentifyInfo }): IdentifyReceived_ {
2254
2254
  return new IdentifyReceived_(inner);
2255
2255
  }
2256
2256
 
@@ -2263,7 +2263,7 @@ inner: {peerId: string; info: IdentifyInfo }): IdentifyReceived_ {
2263
2263
  type PingRttMeasured__interface = {
2264
2264
  tag: P2pEvent_Tags.PingRttMeasured;
2265
2265
  inner:
2266
- Readonly<{peerId: string; rttMs: bigint}>
2266
+ Readonly<{peerId: string; connId: bigint; rttMs: bigint}>
2267
2267
  };
2268
2268
  /**
2269
2269
  * A ping round-trip measurement completed.
@@ -2276,15 +2276,15 @@ Readonly<{peerId: string; rttMs: bigint}>
2276
2276
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2277
2277
  readonly tag = P2pEvent_Tags.PingRttMeasured;
2278
2278
  readonly inner:
2279
- Readonly<{peerId: string; rttMs: bigint}>;
2279
+ Readonly<{peerId: string; connId: bigint; rttMs: bigint}>;
2280
2280
  constructor(
2281
- inner: {peerId: string; rttMs: bigint }) {
2281
+ inner: {peerId: string; connId: bigint; rttMs: bigint }) {
2282
2282
  super("P2pEvent", "PingRttMeasured");
2283
2283
 
2284
2284
  this.inner = Object.freeze(inner);
2285
2285
  }
2286
2286
  static new(
2287
- inner: {peerId: string; rttMs: bigint }): PingRttMeasured_ {
2287
+ inner: {peerId: string; connId: bigint; rttMs: bigint }): PingRttMeasured_ {
2288
2288
  return new PingRttMeasured_(inner);
2289
2289
  }
2290
2290
 
@@ -2297,7 +2297,7 @@ inner: {peerId: string; rttMs: bigint }): PingRttMeasured_ {
2297
2297
  type PingTimeout__interface = {
2298
2298
  tag: P2pEvent_Tags.PingTimeout;
2299
2299
  inner:
2300
- Readonly<{peerId: string}>
2300
+ Readonly<{peerId: string; connId: bigint}>
2301
2301
  };
2302
2302
  /**
2303
2303
  * A ping timed out.
@@ -2310,15 +2310,15 @@ Readonly<{peerId: string}>
2310
2310
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2311
2311
  readonly tag = P2pEvent_Tags.PingTimeout;
2312
2312
  readonly inner:
2313
- Readonly<{peerId: string}>;
2313
+ Readonly<{peerId: string; connId: bigint}>;
2314
2314
  constructor(
2315
- inner: {peerId: string }) {
2315
+ inner: {peerId: string; connId: bigint }) {
2316
2316
  super("P2pEvent", "PingTimeout");
2317
2317
 
2318
2318
  this.inner = Object.freeze(inner);
2319
2319
  }
2320
2320
  static new(
2321
- inner: {peerId: string }): PingTimeout_ {
2321
+ inner: {peerId: string; connId: bigint }): PingTimeout_ {
2322
2322
  return new PingTimeout_(inner);
2323
2323
  }
2324
2324
 
@@ -2741,7 +2741,7 @@ inner: {connectId: bigint; peerId: string; connId: bigint; path: PathKind }): Pa
2741
2741
  type InboundPathEstablished__interface = {
2742
2742
  tag: P2pEvent_Tags.InboundPathEstablished;
2743
2743
  inner:
2744
- Readonly<{peerId: string; path: PathKind}>
2744
+ Readonly<{peerId: string; path: PathKind; connId: bigint}>
2745
2745
  };
2746
2746
  /**
2747
2747
  * An inbound relay circuit became a usable path.
@@ -2754,15 +2754,15 @@ Readonly<{peerId: string; path: PathKind}>
2754
2754
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2755
2755
  readonly tag = P2pEvent_Tags.InboundPathEstablished;
2756
2756
  readonly inner:
2757
- Readonly<{peerId: string; path: PathKind}>;
2757
+ Readonly<{peerId: string; path: PathKind; connId: bigint}>;
2758
2758
  constructor(
2759
- inner: {peerId: string; path: PathKind }) {
2759
+ inner: {peerId: string; path: PathKind; connId: bigint }) {
2760
2760
  super("P2pEvent", "InboundPathEstablished");
2761
2761
 
2762
2762
  this.inner = Object.freeze(inner);
2763
2763
  }
2764
2764
  static new(
2765
- inner: {peerId: string; path: PathKind }): InboundPathEstablished_ {
2765
+ inner: {peerId: string; path: PathKind; connId: bigint }): InboundPathEstablished_ {
2766
2766
  return new InboundPathEstablished_(inner);
2767
2767
  }
2768
2768
 
@@ -2775,7 +2775,7 @@ inner: {peerId: string; path: PathKind }): InboundPathEstablished_ {
2775
2775
  type PathUpgraded__interface = {
2776
2776
  tag: P2pEvent_Tags.PathUpgraded;
2777
2777
  inner:
2778
- Readonly<{connectId: bigint; peerId: string; from: PathKind; to: PathKind}>
2778
+ Readonly<{connectId: bigint; peerId: string; from: PathKind; to: PathKind; oldConnId: bigint; newConnId: bigint}>
2779
2779
  };
2780
2780
  /**
2781
2781
  * A better path replaced an earlier path.
@@ -2788,15 +2788,15 @@ Readonly<{connectId: bigint; peerId: string; from: PathKind; to: PathKind}>
2788
2788
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2789
2789
  readonly tag = P2pEvent_Tags.PathUpgraded;
2790
2790
  readonly inner:
2791
- Readonly<{connectId: bigint; peerId: string; from: PathKind; to: PathKind}>;
2791
+ Readonly<{connectId: bigint; peerId: string; from: PathKind; to: PathKind; oldConnId: bigint; newConnId: bigint}>;
2792
2792
  constructor(
2793
- inner: {connectId: bigint; peerId: string; from: PathKind; to: PathKind }) {
2793
+ inner: {connectId: bigint; peerId: string; from: PathKind; to: PathKind; oldConnId: bigint; newConnId: bigint }) {
2794
2794
  super("P2pEvent", "PathUpgraded");
2795
2795
 
2796
2796
  this.inner = Object.freeze(inner);
2797
2797
  }
2798
2798
  static new(
2799
- inner: {connectId: bigint; peerId: string; from: PathKind; to: PathKind }): PathUpgraded_ {
2799
+ inner: {connectId: bigint; peerId: string; from: PathKind; to: PathKind; oldConnId: bigint; newConnId: bigint }): PathUpgraded_ {
2800
2800
  return new PathUpgraded_(inner);
2801
2801
  }
2802
2802
 
@@ -2812,7 +2812,8 @@ inner: {connectId: bigint; peerId: string; from: PathKind; to: PathKind }): Path
2812
2812
  Readonly<{connectId: bigint; attempt: number; reason: string}>
2813
2813
  };
2814
2814
  /**
2815
- * One hole-punch window failed.
2815
+ * One DCUtR hole-punch round failed; the relay holder may start the
2816
+ * next one.
2816
2817
  */
2817
2818
  class HolePunchFailed_ extends UniffiEnum implements HolePunchFailed__interface {
2818
2819
  /**
@@ -2912,7 +2913,7 @@ inner: {connectId: bigint; peerId: string }): ConnectCancelled_ {
2912
2913
  type InboundDirectUpgrade__interface = {
2913
2914
  tag: P2pEvent_Tags.InboundDirectUpgrade;
2914
2915
  inner:
2915
- Readonly<{peerId: string}>
2916
+ Readonly<{peerId: string; oldConnId: bigint; newConnId: bigint}>
2916
2917
  };
2917
2918
  /**
2918
2919
  * An inbound circuit upgraded to a direct connection.
@@ -2925,15 +2926,15 @@ Readonly<{peerId: string}>
2925
2926
  readonly [uniffiTypeNameSymbol] = "P2pEvent";
2926
2927
  readonly tag = P2pEvent_Tags.InboundDirectUpgrade;
2927
2928
  readonly inner:
2928
- Readonly<{peerId: string}>;
2929
+ Readonly<{peerId: string; oldConnId: bigint; newConnId: bigint}>;
2929
2930
  constructor(
2930
- inner: {peerId: string }) {
2931
+ inner: {peerId: string; oldConnId: bigint; newConnId: bigint }) {
2931
2932
  super("P2pEvent", "InboundDirectUpgrade");
2932
2933
 
2933
2934
  this.inner = Object.freeze(inner);
2934
2935
  }
2935
2936
  static new(
2936
- inner: {peerId: string }): InboundDirectUpgrade_ {
2937
+ inner: {peerId: string; oldConnId: bigint; newConnId: bigint }): InboundDirectUpgrade_ {
2937
2938
  return new InboundDirectUpgrade_(inner);
2938
2939
  }
2939
2940
 
@@ -3352,9 +3353,9 @@ const FfiConverterTypeP2pEvent = (() => {
3352
3353
  case 4: return new P2pEvent.ConnectionClosed({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
3353
3354
  case 5: return new P2pEvent.ConnectionReplaced({peerId: FfiConverterString.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
3354
3355
  case 6: return new P2pEvent.PeerReady({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), protocols: FfiConverterSequenceString.readFromCursor(c) });
3355
- case 7: return new P2pEvent.IdentifyReceived({peerId: FfiConverterString.readFromCursor(c), info: FfiConverterTypeIdentifyInfo.readFromCursor(c) });
3356
- case 8: return new P2pEvent.PingRttMeasured({peerId: FfiConverterString.readFromCursor(c), rttMs: FfiConverterUInt64.readFromCursor(c) });
3357
- case 9: return new P2pEvent.PingTimeout({peerId: FfiConverterString.readFromCursor(c) });
3356
+ case 7: return new P2pEvent.IdentifyReceived({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), info: FfiConverterTypeIdentifyInfo.readFromCursor(c) });
3357
+ case 8: return new P2pEvent.PingRttMeasured({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), rttMs: FfiConverterUInt64.readFromCursor(c) });
3358
+ case 9: return new P2pEvent.PingTimeout({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
3358
3359
  case 10: return new P2pEvent.StreamReady({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c), protocolId: FfiConverterString.readFromCursor(c), initiatedLocally: FfiConverterBool.readFromCursor(c) });
3359
3360
  case 11: return new P2pEvent.StreamData({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c) });
3360
3361
  case 12: return new P2pEvent.StreamWriteAccepted({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c) });
@@ -3367,12 +3368,12 @@ const FfiConverterTypeP2pEvent = (() => {
3367
3368
  case 19: return new P2pEvent.RelayReserved({relayPeerId: FfiConverterString.readFromCursor(c), expiresUnixSecs: FfiConverterOptionalUInt64.readFromCursor(c) });
3368
3369
  case 20: return new P2pEvent.RelayReservationLost({relayPeerId: FfiConverterString.readFromCursor(c) });
3369
3370
  case 21: return new P2pEvent.PathEstablished({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
3370
- case 22: return new P2pEvent.InboundPathEstablished({peerId: FfiConverterString.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
3371
- case 23: return new P2pEvent.PathUpgraded({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), from: FfiConverterTypePathKind.readFromCursor(c), to: FfiConverterTypePathKind.readFromCursor(c) });
3371
+ case 22: return new P2pEvent.InboundPathEstablished({peerId: FfiConverterString.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
3372
+ case 23: 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) });
3372
3373
  case 24: return new P2pEvent.HolePunchFailed({connectId: FfiConverterUInt64.readFromCursor(c), attempt: FfiConverterUInt32.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
3373
3374
  case 25: return new P2pEvent.ConnectFailed({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), kind: FfiConverterTypeNatErrorKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
3374
3375
  case 26: return new P2pEvent.ConnectCancelled({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c) });
3375
- case 27: return new P2pEvent.InboundDirectUpgrade({peerId: FfiConverterString.readFromCursor(c) });
3376
+ case 27: return new P2pEvent.InboundDirectUpgrade({peerId: FfiConverterString.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
3376
3377
  case 28: return new P2pEvent.Message({fromPeerId: FfiConverterString.readFromCursor(c), topics: FfiConverterSequenceString.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c), seqno: FfiConverterArrayBuffer.readFromCursor(c), signed: FfiConverterBool.readFromCursor(c) });
3377
3378
  case 29: return new P2pEvent.PeerSubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
3378
3379
  case 30: return new P2pEvent.PeerUnsubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
@@ -3437,6 +3438,7 @@ const FfiConverterTypeP2pEvent = (() => {
3437
3438
  c.writeI32(7);
3438
3439
  const inner = value.inner;
3439
3440
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3441
+ FfiConverterUInt64.writeIntoCursor(inner.connId, c);
3440
3442
  FfiConverterTypeIdentifyInfo.writeIntoCursor(inner.info, c);
3441
3443
  return;
3442
3444
  }
@@ -3444,6 +3446,7 @@ const FfiConverterTypeP2pEvent = (() => {
3444
3446
  c.writeI32(8);
3445
3447
  const inner = value.inner;
3446
3448
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3449
+ FfiConverterUInt64.writeIntoCursor(inner.connId, c);
3447
3450
  FfiConverterUInt64.writeIntoCursor(inner.rttMs, c);
3448
3451
  return;
3449
3452
  }
@@ -3451,6 +3454,7 @@ const FfiConverterTypeP2pEvent = (() => {
3451
3454
  c.writeI32(9);
3452
3455
  const inner = value.inner;
3453
3456
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3457
+ FfiConverterUInt64.writeIntoCursor(inner.connId, c);
3454
3458
  return;
3455
3459
  }
3456
3460
  case P2pEvent_Tags.StreamReady: {
@@ -3556,6 +3560,7 @@ const FfiConverterTypeP2pEvent = (() => {
3556
3560
  const inner = value.inner;
3557
3561
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3558
3562
  FfiConverterTypePathKind.writeIntoCursor(inner.path, c);
3563
+ FfiConverterUInt64.writeIntoCursor(inner.connId, c);
3559
3564
  return;
3560
3565
  }
3561
3566
  case P2pEvent_Tags.PathUpgraded: {
@@ -3565,6 +3570,8 @@ const FfiConverterTypeP2pEvent = (() => {
3565
3570
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3566
3571
  FfiConverterTypePathKind.writeIntoCursor(inner.from, c);
3567
3572
  FfiConverterTypePathKind.writeIntoCursor(inner.to, c);
3573
+ FfiConverterUInt64.writeIntoCursor(inner.oldConnId, c);
3574
+ FfiConverterUInt64.writeIntoCursor(inner.newConnId, c);
3568
3575
  return;
3569
3576
  }
3570
3577
  case P2pEvent_Tags.HolePunchFailed: {
@@ -3595,6 +3602,8 @@ const FfiConverterTypeP2pEvent = (() => {
3595
3602
  c.writeI32(27);
3596
3603
  const inner = value.inner;
3597
3604
  FfiConverterString.writeIntoCursor(inner.peerId, c);
3605
+ FfiConverterUInt64.writeIntoCursor(inner.oldConnId, c);
3606
+ FfiConverterUInt64.writeIntoCursor(inner.newConnId, c);
3598
3607
  return;
3599
3608
  }
3600
3609
  case P2pEvent_Tags.Message: {
@@ -3729,6 +3738,7 @@ const FfiConverterTypeP2pEvent = (() => {
3729
3738
  const inner = value.inner;
3730
3739
  let size = 4;
3731
3740
  size += FfiConverterString.allocationSize(inner.peerId);
3741
+ size += FfiConverterUInt64.allocationSize(inner.connId);
3732
3742
  size += FfiConverterTypeIdentifyInfo.allocationSize(inner.info);
3733
3743
  return size;
3734
3744
  }
@@ -3736,6 +3746,7 @@ const FfiConverterTypeP2pEvent = (() => {
3736
3746
  const inner = value.inner;
3737
3747
  let size = 4;
3738
3748
  size += FfiConverterString.allocationSize(inner.peerId);
3749
+ size += FfiConverterUInt64.allocationSize(inner.connId);
3739
3750
  size += FfiConverterUInt64.allocationSize(inner.rttMs);
3740
3751
  return size;
3741
3752
  }
@@ -3743,6 +3754,7 @@ const FfiConverterTypeP2pEvent = (() => {
3743
3754
  const inner = value.inner;
3744
3755
  let size = 4;
3745
3756
  size += FfiConverterString.allocationSize(inner.peerId);
3757
+ size += FfiConverterUInt64.allocationSize(inner.connId);
3746
3758
  return size;
3747
3759
  }
3748
3760
  case P2pEvent_Tags.StreamReady: {
@@ -3848,6 +3860,7 @@ const FfiConverterTypeP2pEvent = (() => {
3848
3860
  let size = 4;
3849
3861
  size += FfiConverterString.allocationSize(inner.peerId);
3850
3862
  size += FfiConverterTypePathKind.allocationSize(inner.path);
3863
+ size += FfiConverterUInt64.allocationSize(inner.connId);
3851
3864
  return size;
3852
3865
  }
3853
3866
  case P2pEvent_Tags.PathUpgraded: {
@@ -3857,6 +3870,8 @@ const FfiConverterTypeP2pEvent = (() => {
3857
3870
  size += FfiConverterString.allocationSize(inner.peerId);
3858
3871
  size += FfiConverterTypePathKind.allocationSize(inner.from);
3859
3872
  size += FfiConverterTypePathKind.allocationSize(inner.to);
3873
+ size += FfiConverterUInt64.allocationSize(inner.oldConnId);
3874
+ size += FfiConverterUInt64.allocationSize(inner.newConnId);
3860
3875
  return size;
3861
3876
  }
3862
3877
  case P2pEvent_Tags.HolePunchFailed: {
@@ -3887,6 +3902,8 @@ const FfiConverterTypeP2pEvent = (() => {
3887
3902
  const inner = value.inner;
3888
3903
  let size = 4;
3889
3904
  size += FfiConverterString.allocationSize(inner.peerId);
3905
+ size += FfiConverterUInt64.allocationSize(inner.oldConnId);
3906
+ size += FfiConverterUInt64.allocationSize(inner.newConnId);
3890
3907
  return size;
3891
3908
  }
3892
3909
  case P2pEvent_Tags.Message: {