@minip2p/react-native 0.7.1 → 0.7.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/README.md +1 -0
- package/android/src/main/jniLibs/arm64-v8a/libminip2p_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libminip2p_ffi.so +0 -0
- package/build/Minip2pFfi.xcframework/Info.plist +4 -4
- package/build/Minip2pFfi.xcframework/ios-arm64/libminip2p_ffi.a +2 -2
- package/build/Minip2pFfi.xcframework/ios-arm64-simulator/libminip2p_ffi.a +2 -2
- package/cpp/generated/minip2p_ffi.cpp +12 -8
- package/lib/module/adapter.js +51 -47
- package/lib/module/adapter.js.map +1 -1
- package/lib/module/generated/minip2p_ffi.js +135 -78
- package/lib/module/generated/minip2p_ffi.js.map +1 -1
- package/lib/typescript/src/adapter.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi-ffi.d.ts +4 -4
- package/lib/typescript/src/generated/minip2p_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/minip2p_ffi.d.ts +105 -43
- package/lib/typescript/src/generated/minip2p_ffi.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/adapter.ts +77 -46
- package/src/generated/minip2p_ffi-ffi.ts +4 -4
- package/src/generated/minip2p_ffi.ts +160 -86
|
@@ -141,7 +141,14 @@ export type ConnectionInfo = {
|
|
|
141
141
|
/**
|
|
142
142
|
* Remote transport address, when recorded.
|
|
143
143
|
*/
|
|
144
|
-
remoteAddr?: string
|
|
144
|
+
remoteAddr?: string,
|
|
145
|
+
/**
|
|
146
|
+
* Protocols this connection advertised through Identify, once it is
|
|
147
|
+
* ready (`PeerReady` for this `conn_id`); `None` until then. Readiness,
|
|
148
|
+
* connection and protocols come from one snapshot, so a ready wait can
|
|
149
|
+
* trust them together.
|
|
150
|
+
*/
|
|
151
|
+
readyProtocols?: Array<string>
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
/**
|
|
@@ -166,16 +173,19 @@ const FfiConverterTypeConnectionInfo = (() => {
|
|
|
166
173
|
readFromCursor(c: Cursor): TypeName {
|
|
167
174
|
return {
|
|
168
175
|
connId: FfiConverterUInt64.readFromCursor(c),
|
|
169
|
-
remoteAddr: FfiConverterOptionalString.readFromCursor(c)
|
|
176
|
+
remoteAddr: FfiConverterOptionalString.readFromCursor(c),
|
|
177
|
+
readyProtocols: FfiConverterOptionalSequenceString.readFromCursor(c)
|
|
170
178
|
};
|
|
171
179
|
}
|
|
172
180
|
writeIntoCursor(value: TypeName, c: Cursor): void {
|
|
173
181
|
FfiConverterUInt64.writeIntoCursor(value.connId, c);
|
|
174
182
|
FfiConverterOptionalString.writeIntoCursor(value.remoteAddr, c);
|
|
183
|
+
FfiConverterOptionalSequenceString.writeIntoCursor(value.readyProtocols, c);
|
|
175
184
|
}
|
|
176
185
|
allocationSize(value: TypeName): number {
|
|
177
186
|
return FfiConverterUInt64.allocationSize(value.connId) +
|
|
178
|
-
FfiConverterOptionalString.allocationSize(value.remoteAddr)
|
|
187
|
+
FfiConverterOptionalString.allocationSize(value.remoteAddr) +
|
|
188
|
+
FfiConverterOptionalSequenceString.allocationSize(value.readyProtocols);
|
|
179
189
|
|
|
180
190
|
}
|
|
181
191
|
};
|
|
@@ -2029,6 +2039,7 @@ export enum P2pEvent_Tags {
|
|
|
2029
2039
|
DriverFailed = "DriverFailed",
|
|
2030
2040
|
ConnectionEstablished = "ConnectionEstablished",
|
|
2031
2041
|
ConnectionClosed = "ConnectionClosed",
|
|
2042
|
+
ConnectionReplaced = "ConnectionReplaced",
|
|
2032
2043
|
PeerReady = "PeerReady",
|
|
2033
2044
|
IdentifyReceived = "IdentifyReceived",
|
|
2034
2045
|
PingRttMeasured = "PingRttMeasured",
|
|
@@ -2139,7 +2150,7 @@ inner: {kind: DriverFailureKind; detail: string }): DriverFailed_ {
|
|
|
2139
2150
|
Readonly<{peerId: string; connId: bigint}>
|
|
2140
2151
|
};
|
|
2141
2152
|
/**
|
|
2142
|
-
* A verified connection
|
|
2153
|
+
* A peer went from disconnected to connected over a verified connection.
|
|
2143
2154
|
*/
|
|
2144
2155
|
class ConnectionEstablished_ extends UniffiEnum implements ConnectionEstablished__interface {
|
|
2145
2156
|
/**
|
|
@@ -2173,7 +2184,7 @@ inner: {peerId: string; connId: bigint }): ConnectionEstablished_ {
|
|
|
2173
2184
|
Readonly<{peerId: string; connId: bigint}>
|
|
2174
2185
|
};
|
|
2175
2186
|
/**
|
|
2176
|
-
*
|
|
2187
|
+
* The peer's last connection closed; the peer is now disconnected.
|
|
2177
2188
|
*/
|
|
2178
2189
|
class ConnectionClosed_ extends UniffiEnum implements ConnectionClosed__interface {
|
|
2179
2190
|
/**
|
|
@@ -2201,13 +2212,52 @@ inner: {peerId: string; connId: bigint }): ConnectionClosed_ {
|
|
|
2201
2212
|
|
|
2202
2213
|
}
|
|
2203
2214
|
|
|
2215
|
+
type ConnectionReplaced__interface = {
|
|
2216
|
+
tag: P2pEvent_Tags.ConnectionReplaced;
|
|
2217
|
+
inner:
|
|
2218
|
+
Readonly<{peerId: string; oldConnId: bigint; newConnId: bigint}>
|
|
2219
|
+
};
|
|
2220
|
+
/**
|
|
2221
|
+
* A newer connection took the peer's single connection slot from
|
|
2222
|
+
* `old_conn_id`.
|
|
2223
|
+
* The peer stays connected; every stream on `old_conn_id` ended with
|
|
2224
|
+
* it, and a fresh `PeerReady` follows for `new_conn_id`.
|
|
2225
|
+
*/
|
|
2226
|
+
class ConnectionReplaced_ extends UniffiEnum implements ConnectionReplaced__interface {
|
|
2227
|
+
/**
|
|
2228
|
+
* @private
|
|
2229
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2230
|
+
*/
|
|
2231
|
+
readonly [uniffiTypeNameSymbol] = "P2pEvent";
|
|
2232
|
+
readonly tag = P2pEvent_Tags.ConnectionReplaced;
|
|
2233
|
+
readonly inner:
|
|
2234
|
+
Readonly<{peerId: string; oldConnId: bigint; newConnId: bigint}>;
|
|
2235
|
+
constructor(
|
|
2236
|
+
inner: {peerId: string; oldConnId: bigint; newConnId: bigint }) {
|
|
2237
|
+
super("P2pEvent", "ConnectionReplaced");
|
|
2238
|
+
|
|
2239
|
+
this.inner = Object.freeze(inner);
|
|
2240
|
+
}
|
|
2241
|
+
static new(
|
|
2242
|
+
inner: {peerId: string; oldConnId: bigint; newConnId: bigint }): ConnectionReplaced_ {
|
|
2243
|
+
return new ConnectionReplaced_(inner);
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
static instanceOf(obj: any): obj is ConnectionReplaced_ {
|
|
2247
|
+
return obj.tag === P2pEvent_Tags.ConnectionReplaced;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2204
2252
|
type PeerReady__interface = {
|
|
2205
2253
|
tag: P2pEvent_Tags.PeerReady;
|
|
2206
2254
|
inner:
|
|
2207
|
-
Readonly<{peerId: string; protocols: Array<string>}>
|
|
2255
|
+
Readonly<{peerId: string; connId: bigint; protocols: Array<string>}>
|
|
2208
2256
|
};
|
|
2209
2257
|
/**
|
|
2210
|
-
* A peer completed Identify and is ready for application
|
|
2258
|
+
* A peer's connection completed Identify and is ready for application
|
|
2259
|
+
* protocols. Fires once per connection; one whose `conn_id` is no longer
|
|
2260
|
+
* the peer's current connection is stale.
|
|
2211
2261
|
*/
|
|
2212
2262
|
class PeerReady_ extends UniffiEnum implements PeerReady__interface {
|
|
2213
2263
|
/**
|
|
@@ -2217,15 +2267,15 @@ Readonly<{peerId: string; protocols: Array<string>}>
|
|
|
2217
2267
|
readonly [uniffiTypeNameSymbol] = "P2pEvent";
|
|
2218
2268
|
readonly tag = P2pEvent_Tags.PeerReady;
|
|
2219
2269
|
readonly inner:
|
|
2220
|
-
Readonly<{peerId: string; protocols: Array<string>}>;
|
|
2270
|
+
Readonly<{peerId: string; connId: bigint; protocols: Array<string>}>;
|
|
2221
2271
|
constructor(
|
|
2222
|
-
inner: {peerId: string; protocols: Array<string> }) {
|
|
2272
|
+
inner: {peerId: string; connId: bigint; protocols: Array<string> }) {
|
|
2223
2273
|
super("P2pEvent", "PeerReady");
|
|
2224
2274
|
|
|
2225
2275
|
this.inner = Object.freeze(inner);
|
|
2226
2276
|
}
|
|
2227
2277
|
static new(
|
|
2228
|
-
inner: {peerId: string; protocols: Array<string> }): PeerReady_ {
|
|
2278
|
+
inner: {peerId: string; connId: bigint; protocols: Array<string> }): PeerReady_ {
|
|
2229
2279
|
return new PeerReady_(inner);
|
|
2230
2280
|
}
|
|
2231
2281
|
|
|
@@ -2960,7 +3010,7 @@ inner: {peerId: string; topic: string }): PeerSubscribed_ {
|
|
|
2960
3010
|
Readonly<{peerId: string; topic: string}>
|
|
2961
3011
|
};
|
|
2962
3012
|
/**
|
|
2963
|
-
* A peer
|
|
3013
|
+
* A peer's subscription ended: withdrawn, or its connection closed or was replaced.
|
|
2964
3014
|
*/
|
|
2965
3015
|
class PeerUnsubscribed_ extends UniffiEnum implements PeerUnsubscribed__interface {
|
|
2966
3016
|
/**
|
|
@@ -3236,6 +3286,7 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
|
|
|
3236
3286
|
DriverFailed: DriverFailed_,
|
|
3237
3287
|
ConnectionEstablished: ConnectionEstablished_,
|
|
3238
3288
|
ConnectionClosed: ConnectionClosed_,
|
|
3289
|
+
ConnectionReplaced: ConnectionReplaced_,
|
|
3239
3290
|
PeerReady: PeerReady_,
|
|
3240
3291
|
IdentifyReceived: IdentifyReceived_,
|
|
3241
3292
|
PingRttMeasured: PingRttMeasured_,
|
|
@@ -3273,7 +3324,7 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
|
|
|
3273
3324
|
* Event delivered by the native endpoint driver.
|
|
3274
3325
|
*/
|
|
3275
3326
|
export type P2pEvent = InstanceType<
|
|
3276
|
-
typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'DiscoveryProtocolViolation']
|
|
3327
|
+
typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'ConnectionReplaced' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'ConnectFailed' | 'ConnectCancelled' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'DiscoveryProtocolViolation']
|
|
3277
3328
|
>;
|
|
3278
3329
|
|
|
3279
3330
|
// FfiConverter for enum P2pEvent
|
|
@@ -3286,36 +3337,37 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3286
3337
|
case 2: return new P2pEvent.DriverFailed({kind: FfiConverterTypeDriverFailureKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
|
|
3287
3338
|
case 3: return new P2pEvent.ConnectionEstablished({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
|
|
3288
3339
|
case 4: return new P2pEvent.ConnectionClosed({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c) });
|
|
3289
|
-
case 5: return new P2pEvent.
|
|
3290
|
-
case 6: return new P2pEvent.
|
|
3291
|
-
case 7: return new P2pEvent.
|
|
3292
|
-
case 8: return new P2pEvent.
|
|
3293
|
-
case 9: return new P2pEvent.
|
|
3294
|
-
case 10: return new P2pEvent.
|
|
3295
|
-
case 11: return new P2pEvent.
|
|
3296
|
-
case 12: return new P2pEvent.
|
|
3297
|
-
case 13: return new P2pEvent.
|
|
3298
|
-
case 14: return new P2pEvent.
|
|
3299
|
-
case 15: return new P2pEvent.
|
|
3300
|
-
case 16: return new P2pEvent.
|
|
3301
|
-
case 17: return new P2pEvent.
|
|
3302
|
-
case 18: return new P2pEvent.
|
|
3303
|
-
case 19: return new P2pEvent.
|
|
3304
|
-
case 20: return new P2pEvent.
|
|
3305
|
-
case 21: return new P2pEvent.
|
|
3306
|
-
case 22: return new P2pEvent.
|
|
3307
|
-
case 23: return new P2pEvent.
|
|
3308
|
-
case 24: return new P2pEvent.
|
|
3309
|
-
case 25: return new P2pEvent.
|
|
3310
|
-
case 26: return new P2pEvent.
|
|
3311
|
-
case 27: return new P2pEvent.
|
|
3312
|
-
case 28: return new P2pEvent.
|
|
3313
|
-
case 29: return new P2pEvent.
|
|
3314
|
-
case 30: return new P2pEvent.
|
|
3315
|
-
case 31: return new P2pEvent.
|
|
3316
|
-
case 32: return new P2pEvent.
|
|
3317
|
-
case 33: return new P2pEvent.
|
|
3318
|
-
case 34: return new P2pEvent.
|
|
3340
|
+
case 5: return new P2pEvent.ConnectionReplaced({peerId: FfiConverterString.readFromCursor(c), oldConnId: FfiConverterUInt64.readFromCursor(c), newConnId: FfiConverterUInt64.readFromCursor(c) });
|
|
3341
|
+
case 6: return new P2pEvent.PeerReady({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), protocols: FfiConverterSequenceString.readFromCursor(c) });
|
|
3342
|
+
case 7: return new P2pEvent.IdentifyReceived({peerId: FfiConverterString.readFromCursor(c), info: FfiConverterTypeIdentifyInfo.readFromCursor(c) });
|
|
3343
|
+
case 8: return new P2pEvent.PingRttMeasured({peerId: FfiConverterString.readFromCursor(c), rttMs: FfiConverterUInt64.readFromCursor(c) });
|
|
3344
|
+
case 9: return new P2pEvent.PingTimeout({peerId: FfiConverterString.readFromCursor(c) });
|
|
3345
|
+
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) });
|
|
3346
|
+
case 11: return new P2pEvent.StreamData({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c) });
|
|
3347
|
+
case 12: return new P2pEvent.StreamRemoteWriteClosed({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c) });
|
|
3348
|
+
case 13: return new P2pEvent.StreamClosed({peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), streamId: FfiConverterUInt64.readFromCursor(c) });
|
|
3349
|
+
case 14: return new P2pEvent.EndpointError({kind: FfiConverterTypeEndpointErrorKind.readFromCursor(c), peerId: FfiConverterOptionalString.readFromCursor(c), connId: FfiConverterOptionalUInt64.readFromCursor(c), streamId: FfiConverterOptionalUInt64.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
|
|
3350
|
+
case 15: return new P2pEvent.ReachabilityChanged({previous: FfiConverterTypeReachability.readFromCursor(c), current: FfiConverterTypeReachability.readFromCursor(c), confirmedAddrs: FfiConverterSequenceString.readFromCursor(c) });
|
|
3351
|
+
case 16: return new P2pEvent.PublicAddressesChanged({addrs: FfiConverterSequenceString.readFromCursor(c) });
|
|
3352
|
+
case 17: return new P2pEvent.RelayReserved({relayPeerId: FfiConverterString.readFromCursor(c), expiresUnixSecs: FfiConverterOptionalUInt64.readFromCursor(c) });
|
|
3353
|
+
case 18: return new P2pEvent.RelayReservationLost({relayPeerId: FfiConverterString.readFromCursor(c) });
|
|
3354
|
+
case 19: return new P2pEvent.PathEstablished({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), connId: FfiConverterUInt64.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
|
|
3355
|
+
case 20: return new P2pEvent.InboundPathEstablished({peerId: FfiConverterString.readFromCursor(c), path: FfiConverterTypePathKind.readFromCursor(c) });
|
|
3356
|
+
case 21: return new P2pEvent.PathUpgraded({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), from: FfiConverterTypePathKind.readFromCursor(c), to: FfiConverterTypePathKind.readFromCursor(c) });
|
|
3357
|
+
case 22: return new P2pEvent.HolePunchFailed({connectId: FfiConverterUInt64.readFromCursor(c), attempt: FfiConverterUInt32.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3358
|
+
case 23: return new P2pEvent.ConnectFailed({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c), kind: FfiConverterTypeNatErrorKind.readFromCursor(c), detail: FfiConverterString.readFromCursor(c) });
|
|
3359
|
+
case 24: return new P2pEvent.ConnectCancelled({connectId: FfiConverterUInt64.readFromCursor(c), peerId: FfiConverterString.readFromCursor(c) });
|
|
3360
|
+
case 25: return new P2pEvent.InboundDirectUpgrade({peerId: FfiConverterString.readFromCursor(c) });
|
|
3361
|
+
case 26: return new P2pEvent.Message({fromPeerId: FfiConverterString.readFromCursor(c), topics: FfiConverterSequenceString.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c), seqno: FfiConverterArrayBuffer.readFromCursor(c), signed: FfiConverterBool.readFromCursor(c) });
|
|
3362
|
+
case 27: return new P2pEvent.PeerSubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
|
|
3363
|
+
case 28: return new P2pEvent.PeerUnsubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
|
|
3364
|
+
case 29: return new P2pEvent.GossipsubOutboundFailure({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3365
|
+
case 30: return new P2pEvent.GossipsubProtocolViolation({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3366
|
+
case 31: return new P2pEvent.PeerDiscovered({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
|
|
3367
|
+
case 32: return new P2pEvent.PeerUpdated({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
|
|
3368
|
+
case 33: return new P2pEvent.PeerExpired({peerId: FfiConverterString.readFromCursor(c) });
|
|
3369
|
+
case 34: return new P2pEvent.DiscoveryDialFailed({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3370
|
+
case 35: return new P2pEvent.DiscoveryProtocolViolation({peerId: FfiConverterOptionalString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c), reason: FfiConverterString.readFromCursor(c), suppressed: FfiConverterUInt32.readFromCursor(c) });
|
|
3319
3371
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3320
3372
|
}
|
|
3321
3373
|
}
|
|
@@ -3350,35 +3402,44 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3350
3402
|
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
3351
3403
|
return;
|
|
3352
3404
|
}
|
|
3353
|
-
case P2pEvent_Tags.
|
|
3405
|
+
case P2pEvent_Tags.ConnectionReplaced: {
|
|
3354
3406
|
c.writeI32(5);
|
|
3355
3407
|
const inner = value.inner;
|
|
3356
3408
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3409
|
+
FfiConverterUInt64.writeIntoCursor(inner.oldConnId, c);
|
|
3410
|
+
FfiConverterUInt64.writeIntoCursor(inner.newConnId, c);
|
|
3411
|
+
return;
|
|
3412
|
+
}
|
|
3413
|
+
case P2pEvent_Tags.PeerReady: {
|
|
3414
|
+
c.writeI32(6);
|
|
3415
|
+
const inner = value.inner;
|
|
3416
|
+
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3417
|
+
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
3357
3418
|
FfiConverterSequenceString.writeIntoCursor(inner.protocols, c);
|
|
3358
3419
|
return;
|
|
3359
3420
|
}
|
|
3360
3421
|
case P2pEvent_Tags.IdentifyReceived: {
|
|
3361
|
-
c.writeI32(
|
|
3422
|
+
c.writeI32(7);
|
|
3362
3423
|
const inner = value.inner;
|
|
3363
3424
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3364
3425
|
FfiConverterTypeIdentifyInfo.writeIntoCursor(inner.info, c);
|
|
3365
3426
|
return;
|
|
3366
3427
|
}
|
|
3367
3428
|
case P2pEvent_Tags.PingRttMeasured: {
|
|
3368
|
-
c.writeI32(
|
|
3429
|
+
c.writeI32(8);
|
|
3369
3430
|
const inner = value.inner;
|
|
3370
3431
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3371
3432
|
FfiConverterUInt64.writeIntoCursor(inner.rttMs, c);
|
|
3372
3433
|
return;
|
|
3373
3434
|
}
|
|
3374
3435
|
case P2pEvent_Tags.PingTimeout: {
|
|
3375
|
-
c.writeI32(
|
|
3436
|
+
c.writeI32(9);
|
|
3376
3437
|
const inner = value.inner;
|
|
3377
3438
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3378
3439
|
return;
|
|
3379
3440
|
}
|
|
3380
3441
|
case P2pEvent_Tags.StreamReady: {
|
|
3381
|
-
c.writeI32(
|
|
3442
|
+
c.writeI32(10);
|
|
3382
3443
|
const inner = value.inner;
|
|
3383
3444
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3384
3445
|
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
@@ -3388,7 +3449,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3388
3449
|
return;
|
|
3389
3450
|
}
|
|
3390
3451
|
case P2pEvent_Tags.StreamData: {
|
|
3391
|
-
c.writeI32(
|
|
3452
|
+
c.writeI32(11);
|
|
3392
3453
|
const inner = value.inner;
|
|
3393
3454
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3394
3455
|
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
@@ -3397,7 +3458,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3397
3458
|
return;
|
|
3398
3459
|
}
|
|
3399
3460
|
case P2pEvent_Tags.StreamRemoteWriteClosed: {
|
|
3400
|
-
c.writeI32(
|
|
3461
|
+
c.writeI32(12);
|
|
3401
3462
|
const inner = value.inner;
|
|
3402
3463
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3403
3464
|
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
@@ -3405,7 +3466,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3405
3466
|
return;
|
|
3406
3467
|
}
|
|
3407
3468
|
case P2pEvent_Tags.StreamClosed: {
|
|
3408
|
-
c.writeI32(
|
|
3469
|
+
c.writeI32(13);
|
|
3409
3470
|
const inner = value.inner;
|
|
3410
3471
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3411
3472
|
FfiConverterUInt64.writeIntoCursor(inner.connId, c);
|
|
@@ -3413,7 +3474,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3413
3474
|
return;
|
|
3414
3475
|
}
|
|
3415
3476
|
case P2pEvent_Tags.EndpointError: {
|
|
3416
|
-
c.writeI32(
|
|
3477
|
+
c.writeI32(14);
|
|
3417
3478
|
const inner = value.inner;
|
|
3418
3479
|
FfiConverterTypeEndpointErrorKind.writeIntoCursor(inner.kind, c);
|
|
3419
3480
|
FfiConverterOptionalString.writeIntoCursor(inner.peerId, c);
|
|
@@ -3423,7 +3484,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3423
3484
|
return;
|
|
3424
3485
|
}
|
|
3425
3486
|
case P2pEvent_Tags.ReachabilityChanged: {
|
|
3426
|
-
c.writeI32(
|
|
3487
|
+
c.writeI32(15);
|
|
3427
3488
|
const inner = value.inner;
|
|
3428
3489
|
FfiConverterTypeReachability.writeIntoCursor(inner.previous, c);
|
|
3429
3490
|
FfiConverterTypeReachability.writeIntoCursor(inner.current, c);
|
|
@@ -3431,26 +3492,26 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3431
3492
|
return;
|
|
3432
3493
|
}
|
|
3433
3494
|
case P2pEvent_Tags.PublicAddressesChanged: {
|
|
3434
|
-
c.writeI32(
|
|
3495
|
+
c.writeI32(16);
|
|
3435
3496
|
const inner = value.inner;
|
|
3436
3497
|
FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
|
|
3437
3498
|
return;
|
|
3438
3499
|
}
|
|
3439
3500
|
case P2pEvent_Tags.RelayReserved: {
|
|
3440
|
-
c.writeI32(
|
|
3501
|
+
c.writeI32(17);
|
|
3441
3502
|
const inner = value.inner;
|
|
3442
3503
|
FfiConverterString.writeIntoCursor(inner.relayPeerId, c);
|
|
3443
3504
|
FfiConverterOptionalUInt64.writeIntoCursor(inner.expiresUnixSecs, c);
|
|
3444
3505
|
return;
|
|
3445
3506
|
}
|
|
3446
3507
|
case P2pEvent_Tags.RelayReservationLost: {
|
|
3447
|
-
c.writeI32(
|
|
3508
|
+
c.writeI32(18);
|
|
3448
3509
|
const inner = value.inner;
|
|
3449
3510
|
FfiConverterString.writeIntoCursor(inner.relayPeerId, c);
|
|
3450
3511
|
return;
|
|
3451
3512
|
}
|
|
3452
3513
|
case P2pEvent_Tags.PathEstablished: {
|
|
3453
|
-
c.writeI32(
|
|
3514
|
+
c.writeI32(19);
|
|
3454
3515
|
const inner = value.inner;
|
|
3455
3516
|
FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
|
|
3456
3517
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
@@ -3459,14 +3520,14 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3459
3520
|
return;
|
|
3460
3521
|
}
|
|
3461
3522
|
case P2pEvent_Tags.InboundPathEstablished: {
|
|
3462
|
-
c.writeI32(
|
|
3523
|
+
c.writeI32(20);
|
|
3463
3524
|
const inner = value.inner;
|
|
3464
3525
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3465
3526
|
FfiConverterTypePathKind.writeIntoCursor(inner.path, c);
|
|
3466
3527
|
return;
|
|
3467
3528
|
}
|
|
3468
3529
|
case P2pEvent_Tags.PathUpgraded: {
|
|
3469
|
-
c.writeI32(
|
|
3530
|
+
c.writeI32(21);
|
|
3470
3531
|
const inner = value.inner;
|
|
3471
3532
|
FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
|
|
3472
3533
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
@@ -3475,7 +3536,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3475
3536
|
return;
|
|
3476
3537
|
}
|
|
3477
3538
|
case P2pEvent_Tags.HolePunchFailed: {
|
|
3478
|
-
c.writeI32(
|
|
3539
|
+
c.writeI32(22);
|
|
3479
3540
|
const inner = value.inner;
|
|
3480
3541
|
FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
|
|
3481
3542
|
FfiConverterUInt32.writeIntoCursor(inner.attempt, c);
|
|
@@ -3483,7 +3544,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3483
3544
|
return;
|
|
3484
3545
|
}
|
|
3485
3546
|
case P2pEvent_Tags.ConnectFailed: {
|
|
3486
|
-
c.writeI32(
|
|
3547
|
+
c.writeI32(23);
|
|
3487
3548
|
const inner = value.inner;
|
|
3488
3549
|
FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
|
|
3489
3550
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
@@ -3492,20 +3553,20 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3492
3553
|
return;
|
|
3493
3554
|
}
|
|
3494
3555
|
case P2pEvent_Tags.ConnectCancelled: {
|
|
3495
|
-
c.writeI32(
|
|
3556
|
+
c.writeI32(24);
|
|
3496
3557
|
const inner = value.inner;
|
|
3497
3558
|
FfiConverterUInt64.writeIntoCursor(inner.connectId, c);
|
|
3498
3559
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3499
3560
|
return;
|
|
3500
3561
|
}
|
|
3501
3562
|
case P2pEvent_Tags.InboundDirectUpgrade: {
|
|
3502
|
-
c.writeI32(
|
|
3563
|
+
c.writeI32(25);
|
|
3503
3564
|
const inner = value.inner;
|
|
3504
3565
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3505
3566
|
return;
|
|
3506
3567
|
}
|
|
3507
3568
|
case P2pEvent_Tags.Message: {
|
|
3508
|
-
c.writeI32(
|
|
3569
|
+
c.writeI32(26);
|
|
3509
3570
|
const inner = value.inner;
|
|
3510
3571
|
FfiConverterString.writeIntoCursor(inner.fromPeerId, c);
|
|
3511
3572
|
FfiConverterSequenceString.writeIntoCursor(inner.topics, c);
|
|
@@ -3515,35 +3576,35 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3515
3576
|
return;
|
|
3516
3577
|
}
|
|
3517
3578
|
case P2pEvent_Tags.PeerSubscribed: {
|
|
3518
|
-
c.writeI32(
|
|
3579
|
+
c.writeI32(27);
|
|
3519
3580
|
const inner = value.inner;
|
|
3520
3581
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3521
3582
|
FfiConverterString.writeIntoCursor(inner.topic, c);
|
|
3522
3583
|
return;
|
|
3523
3584
|
}
|
|
3524
3585
|
case P2pEvent_Tags.PeerUnsubscribed: {
|
|
3525
|
-
c.writeI32(
|
|
3586
|
+
c.writeI32(28);
|
|
3526
3587
|
const inner = value.inner;
|
|
3527
3588
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3528
3589
|
FfiConverterString.writeIntoCursor(inner.topic, c);
|
|
3529
3590
|
return;
|
|
3530
3591
|
}
|
|
3531
3592
|
case P2pEvent_Tags.GossipsubOutboundFailure: {
|
|
3532
|
-
c.writeI32(
|
|
3593
|
+
c.writeI32(29);
|
|
3533
3594
|
const inner = value.inner;
|
|
3534
3595
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3535
3596
|
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
3536
3597
|
return;
|
|
3537
3598
|
}
|
|
3538
3599
|
case P2pEvent_Tags.GossipsubProtocolViolation: {
|
|
3539
|
-
c.writeI32(
|
|
3600
|
+
c.writeI32(30);
|
|
3540
3601
|
const inner = value.inner;
|
|
3541
3602
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3542
3603
|
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
3543
3604
|
return;
|
|
3544
3605
|
}
|
|
3545
3606
|
case P2pEvent_Tags.PeerDiscovered: {
|
|
3546
|
-
c.writeI32(
|
|
3607
|
+
c.writeI32(31);
|
|
3547
3608
|
const inner = value.inner;
|
|
3548
3609
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3549
3610
|
FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
|
|
@@ -3551,7 +3612,7 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3551
3612
|
return;
|
|
3552
3613
|
}
|
|
3553
3614
|
case P2pEvent_Tags.PeerUpdated: {
|
|
3554
|
-
c.writeI32(
|
|
3615
|
+
c.writeI32(32);
|
|
3555
3616
|
const inner = value.inner;
|
|
3556
3617
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3557
3618
|
FfiConverterSequenceString.writeIntoCursor(inner.addrs, c);
|
|
@@ -3559,20 +3620,20 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3559
3620
|
return;
|
|
3560
3621
|
}
|
|
3561
3622
|
case P2pEvent_Tags.PeerExpired: {
|
|
3562
|
-
c.writeI32(
|
|
3623
|
+
c.writeI32(33);
|
|
3563
3624
|
const inner = value.inner;
|
|
3564
3625
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3565
3626
|
return;
|
|
3566
3627
|
}
|
|
3567
3628
|
case P2pEvent_Tags.DiscoveryDialFailed: {
|
|
3568
|
-
c.writeI32(
|
|
3629
|
+
c.writeI32(34);
|
|
3569
3630
|
const inner = value.inner;
|
|
3570
3631
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3571
3632
|
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
3572
3633
|
return;
|
|
3573
3634
|
}
|
|
3574
3635
|
case P2pEvent_Tags.DiscoveryProtocolViolation: {
|
|
3575
|
-
c.writeI32(
|
|
3636
|
+
c.writeI32(35);
|
|
3576
3637
|
const inner = value.inner;
|
|
3577
3638
|
FfiConverterOptionalString.writeIntoCursor(inner.peerId, c);
|
|
3578
3639
|
FfiConverterTypeDiscoverySource.writeIntoCursor(inner.source, c);
|
|
@@ -3616,10 +3677,19 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3616
3677
|
size += FfiConverterUInt64.allocationSize(inner.connId);
|
|
3617
3678
|
return size;
|
|
3618
3679
|
}
|
|
3680
|
+
case P2pEvent_Tags.ConnectionReplaced: {
|
|
3681
|
+
const inner = value.inner;
|
|
3682
|
+
let size = 4;
|
|
3683
|
+
size += FfiConverterString.allocationSize(inner.peerId);
|
|
3684
|
+
size += FfiConverterUInt64.allocationSize(inner.oldConnId);
|
|
3685
|
+
size += FfiConverterUInt64.allocationSize(inner.newConnId);
|
|
3686
|
+
return size;
|
|
3687
|
+
}
|
|
3619
3688
|
case P2pEvent_Tags.PeerReady: {
|
|
3620
3689
|
const inner = value.inner;
|
|
3621
3690
|
let size = 4;
|
|
3622
3691
|
size += FfiConverterString.allocationSize(inner.peerId);
|
|
3692
|
+
size += FfiConverterUInt64.allocationSize(inner.connId);
|
|
3623
3693
|
size += FfiConverterSequenceString.allocationSize(inner.protocols);
|
|
3624
3694
|
return size;
|
|
3625
3695
|
}
|
|
@@ -4017,7 +4087,7 @@ export interface P2pEndpointLike {
|
|
|
4017
4087
|
/**
|
|
4018
4088
|
* Forgets a stream.
|
|
4019
4089
|
*/
|
|
4020
|
-
abandonStream(peerId: string, streamId: bigint) /*throws*/: void;
|
|
4090
|
+
abandonStream(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
|
|
4021
4091
|
/**
|
|
4022
4092
|
* Returns the active relay reservation.
|
|
4023
4093
|
*/
|
|
@@ -4033,7 +4103,7 @@ export interface P2pEndpointLike {
|
|
|
4033
4103
|
/**
|
|
4034
4104
|
* Half-closes a stream's write side.
|
|
4035
4105
|
*/
|
|
4036
|
-
closeStreamWrite(peerId: string, streamId: bigint) /*throws*/: void;
|
|
4106
|
+
closeStreamWrite(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
|
|
4037
4107
|
/**
|
|
4038
4108
|
* Starts one Connection attempt and returns its Connect ID.
|
|
4039
4109
|
*/
|
|
@@ -4105,11 +4175,11 @@ export interface P2pEndpointLike {
|
|
|
4105
4175
|
/**
|
|
4106
4176
|
* Resets a stream.
|
|
4107
4177
|
*/
|
|
4108
|
-
resetStream(peerId: string, streamId: bigint) /*throws*/: void;
|
|
4178
|
+
resetStream(peerId: string, connId: bigint, streamId: bigint) /*throws*/: void;
|
|
4109
4179
|
/**
|
|
4110
|
-
* Sends bytes on a stream.
|
|
4180
|
+
* Sends bytes on a stream, named by its connection and stream ids.
|
|
4111
4181
|
*/
|
|
4112
|
-
sendStream(peerId: string, streamId: bigint, data: ArrayBuffer) /*throws*/: void;
|
|
4182
|
+
sendStream(peerId: string, connId: bigint, streamId: bigint, data: ArrayBuffer) /*throws*/: void;
|
|
4113
4183
|
/**
|
|
4114
4184
|
* Accepted for compatibility; has no effect, since the driver sleeps until the endpoint's next deadline.
|
|
4115
4185
|
*/
|
|
@@ -4175,11 +4245,12 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
|
|
|
4175
4245
|
/**
|
|
4176
4246
|
* Forgets a stream.
|
|
4177
4247
|
*/
|
|
4178
|
-
abandonStream(peerId: string, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4248
|
+
abandonStream(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4179
4249
|
/*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
|
|
4180
4250
|
/*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_abandon_stream(
|
|
4181
4251
|
uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
|
|
4182
4252
|
FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
|
|
4253
|
+
FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
|
|
4183
4254
|
FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
|
|
4184
4255
|
callStatus);
|
|
4185
4256
|
},
|
|
@@ -4238,11 +4309,12 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
|
|
|
4238
4309
|
/**
|
|
4239
4310
|
* Half-closes a stream's write side.
|
|
4240
4311
|
*/
|
|
4241
|
-
closeStreamWrite(peerId: string, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4312
|
+
closeStreamWrite(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4242
4313
|
/*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
|
|
4243
4314
|
/*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_close_stream_write(
|
|
4244
4315
|
uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
|
|
4245
4316
|
FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
|
|
4317
|
+
FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
|
|
4246
4318
|
FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
|
|
4247
4319
|
callStatus);
|
|
4248
4320
|
},
|
|
@@ -4565,11 +4637,12 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
|
|
|
4565
4637
|
/**
|
|
4566
4638
|
* Resets a stream.
|
|
4567
4639
|
*/
|
|
4568
|
-
resetStream(peerId: string, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4640
|
+
resetStream(peerId: string, connId: bigint, streamId: bigint): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4569
4641
|
/*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
|
|
4570
4642
|
/*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_reset_stream(
|
|
4571
4643
|
uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
|
|
4572
4644
|
FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
|
|
4645
|
+
FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
|
|
4573
4646
|
FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
|
|
4574
4647
|
callStatus);
|
|
4575
4648
|
},
|
|
@@ -4578,13 +4651,14 @@ export class P2pEndpoint extends UniffiAbstractObject implements P2pEndpointLike
|
|
|
4578
4651
|
}
|
|
4579
4652
|
|
|
4580
4653
|
/**
|
|
4581
|
-
* Sends bytes on a stream.
|
|
4654
|
+
* Sends bytes on a stream, named by its connection and stream ids.
|
|
4582
4655
|
*/
|
|
4583
|
-
sendStream(peerId: string, streamId: bigint, data: ArrayBuffer): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4656
|
+
sendStream(peerId: string, connId: bigint, streamId: bigint, data: ArrayBuffer): void /*throws*/ {uniffiCaller.rustCallWithError(
|
|
4584
4657
|
/*liftError:*/ FfiConverterTypeFfiError.lift.bind(FfiConverterTypeFfiError),
|
|
4585
4658
|
/*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_minip2p_ffi_fn_method_p2pendpoint_send_stream(
|
|
4586
4659
|
uniffiTypeP2pEndpointObjectFactory.clonePointer(this),
|
|
4587
4660
|
FfiConverterString.lower(peerId, nativeModule().rustbuffer_alloc),
|
|
4661
|
+
FfiConverterUInt64.lower(connId, nativeModule().rustbuffer_alloc),
|
|
4588
4662
|
FfiConverterUInt64.lower(streamId, nativeModule().rustbuffer_alloc),
|
|
4589
4663
|
FfiConverterArrayBuffer.lower(data, nativeModule().rustbuffer_alloc),
|
|
4590
4664
|
callStatus);
|
|
@@ -4822,7 +4896,7 @@ function uniffiEnsureInitialized() {
|
|
|
4822
4896
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_constructor_p2pendpoint_new() !== 8152) {
|
|
4823
4897
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_constructor_p2pendpoint_new");
|
|
4824
4898
|
}
|
|
4825
|
-
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream() !==
|
|
4899
|
+
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream() !== 17669) {
|
|
4826
4900
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_abandon_stream");
|
|
4827
4901
|
}
|
|
4828
4902
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_active_reservation() !== 6405) {
|
|
@@ -4834,7 +4908,7 @@ function uniffiEnsureInitialized() {
|
|
|
4834
4908
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_cancel_connect() !== 24195) {
|
|
4835
4909
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_cancel_connect");
|
|
4836
4910
|
}
|
|
4837
|
-
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write() !==
|
|
4911
|
+
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write() !== 58591) {
|
|
4838
4912
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_close_stream_write");
|
|
4839
4913
|
}
|
|
4840
4914
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_connect() !== 53603) {
|
|
@@ -4888,10 +4962,10 @@ function uniffiEnsureInitialized() {
|
|
|
4888
4962
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reachability() !== 22554) {
|
|
4889
4963
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_reachability");
|
|
4890
4964
|
}
|
|
4891
|
-
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream() !==
|
|
4965
|
+
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream() !== 24179) {
|
|
4892
4966
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_reset_stream");
|
|
4893
4967
|
}
|
|
4894
|
-
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream() !==
|
|
4968
|
+
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream() !== 40818) {
|
|
4895
4969
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_minip2p_ffi_checksum_method_p2pendpoint_send_stream");
|
|
4896
4970
|
}
|
|
4897
4971
|
if (nativeModule().ubrn_uniffi_minip2p_ffi_checksum_method_p2pendpoint_set_active() !== 10522) {
|