@minip2p/react-native 0.5.3 → 0.6.0
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/ios-arm64/libminip2p_ffi.a +2 -2
- package/build/Minip2pFfi.xcframework/ios-arm64-simulator/libminip2p_ffi.a +2 -2
- package/lib/module/adapter.js +1 -2
- package/lib/module/adapter.js.map +1 -1
- package/lib/module/generated/minip2p_ffi.js +23 -67
- 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.d.ts +38 -101
- package/lib/typescript/src/generated/minip2p_ffi.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/adapter.ts +0 -3
- package/src/generated/minip2p_ffi.ts +31 -76
- package/lib/typescript/tests/adapter-connection-ids.test.d.ts +0 -2
- package/lib/typescript/tests/adapter-connection-ids.test.d.ts.map +0 -1
- package/lib/typescript/tests/adapter-event-drain.test.d.ts +0 -2
- package/lib/typescript/tests/adapter-event-drain.test.d.ts.map +0 -1
- package/lib/typescript/tests/event-drain.test.d.ts +0 -2
- package/lib/typescript/tests/event-drain.test.d.ts.map +0 -1
- package/lib/typescript/tests/fake-native-endpoint.d.ts +0 -79
- package/lib/typescript/tests/fake-native-endpoint.d.ts.map +0 -1
- package/lib/typescript/vitest.built.config.d.ts +0 -3
- package/lib/typescript/vitest.built.config.d.ts.map +0 -1
|
@@ -244,43 +244,6 @@ const FfiConverterTypeTransportOptions = (() => {
|
|
|
244
244
|
return new FFIConverter();
|
|
245
245
|
})();
|
|
246
246
|
|
|
247
|
-
/**
|
|
248
|
-
* Pubsub routing engine selected at endpoint construction.
|
|
249
|
-
*/
|
|
250
|
-
export enum PubsubRouter {
|
|
251
|
-
/**
|
|
252
|
-
* Mesh-based gossipsub routing.
|
|
253
|
-
*/
|
|
254
|
-
Gossipsub,
|
|
255
|
-
/**
|
|
256
|
-
* Flood-to-all-subscribers floodsub routing.
|
|
257
|
-
*/
|
|
258
|
-
Floodsub
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const FfiConverterTypePubsubRouter = (() => {
|
|
262
|
-
type TypeName = PubsubRouter;
|
|
263
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
264
|
-
readFromCursor(c: Cursor): TypeName {
|
|
265
|
-
switch (c.readI32()) {
|
|
266
|
-
case 1: return PubsubRouter.Gossipsub;
|
|
267
|
-
case 2: return PubsubRouter.Floodsub;
|
|
268
|
-
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
writeIntoCursor(value: TypeName, c: Cursor): void {
|
|
272
|
-
switch (value) {
|
|
273
|
-
case PubsubRouter.Gossipsub: return c.writeI32(1);
|
|
274
|
-
case PubsubRouter.Floodsub: return c.writeI32(2);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
allocationSize(value: TypeName): number {
|
|
278
|
-
return 4;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return new FFIConverter();
|
|
282
|
-
})();
|
|
283
|
-
|
|
284
247
|
/**
|
|
285
248
|
* Local-link mDNS discovery configuration.
|
|
286
249
|
*/
|
|
@@ -407,10 +370,6 @@ export type EndpointConfig = {
|
|
|
407
370
|
* Whether unsigned pubsub messages are accepted.
|
|
408
371
|
*/
|
|
409
372
|
allowUnsigned: boolean,
|
|
410
|
-
/**
|
|
411
|
-
* Pubsub routing engine.
|
|
412
|
-
*/
|
|
413
|
-
pubsubRouter: PubsubRouter,
|
|
414
373
|
/**
|
|
415
374
|
* Application protocol ids registered before the endpoint starts.
|
|
416
375
|
*/
|
|
@@ -453,7 +412,6 @@ const FfiConverterTypeEndpointConfig = (() => {
|
|
|
453
412
|
tcp: FfiConverterOptionalTypeTransportOptions.readFromCursor(c),
|
|
454
413
|
forceRelay: FfiConverterBool.readFromCursor(c),
|
|
455
414
|
allowUnsigned: FfiConverterBool.readFromCursor(c),
|
|
456
|
-
pubsubRouter: FfiConverterTypePubsubRouter.readFromCursor(c),
|
|
457
415
|
protocols: FfiConverterSequenceString.readFromCursor(c),
|
|
458
416
|
discovery: FfiConverterOptionalTypeDiscoveryOptions.readFromCursor(c),
|
|
459
417
|
mdns: FfiConverterOptionalTypeMdnsOptions.readFromCursor(c)
|
|
@@ -467,7 +425,6 @@ const FfiConverterTypeEndpointConfig = (() => {
|
|
|
467
425
|
FfiConverterOptionalTypeTransportOptions.writeIntoCursor(value.tcp, c);
|
|
468
426
|
FfiConverterBool.writeIntoCursor(value.forceRelay, c);
|
|
469
427
|
FfiConverterBool.writeIntoCursor(value.allowUnsigned, c);
|
|
470
|
-
FfiConverterTypePubsubRouter.writeIntoCursor(value.pubsubRouter, c);
|
|
471
428
|
FfiConverterSequenceString.writeIntoCursor(value.protocols, c);
|
|
472
429
|
FfiConverterOptionalTypeDiscoveryOptions.writeIntoCursor(value.discovery, c);
|
|
473
430
|
FfiConverterOptionalTypeMdnsOptions.writeIntoCursor(value.mdns, c);
|
|
@@ -480,7 +437,6 @@ const FfiConverterTypeEndpointConfig = (() => {
|
|
|
480
437
|
FfiConverterOptionalTypeTransportOptions.allocationSize(value.tcp) +
|
|
481
438
|
FfiConverterBool.allocationSize(value.forceRelay) +
|
|
482
439
|
FfiConverterBool.allocationSize(value.allowUnsigned) +
|
|
483
|
-
FfiConverterTypePubsubRouter.allocationSize(value.pubsubRouter) +
|
|
484
440
|
FfiConverterSequenceString.allocationSize(value.protocols) +
|
|
485
441
|
FfiConverterOptionalTypeDiscoveryOptions.allocationSize(value.discovery) +
|
|
486
442
|
FfiConverterOptionalTypeMdnsOptions.allocationSize(value.mdns);
|
|
@@ -1944,8 +1900,8 @@ export enum P2pEvent_Tags {
|
|
|
1944
1900
|
Message = "Message",
|
|
1945
1901
|
PeerSubscribed = "PeerSubscribed",
|
|
1946
1902
|
PeerUnsubscribed = "PeerUnsubscribed",
|
|
1947
|
-
|
|
1948
|
-
|
|
1903
|
+
GossipsubOutboundFailure = "GossipsubOutboundFailure",
|
|
1904
|
+
GossipsubProtocolViolation = "GossipsubProtocolViolation",
|
|
1949
1905
|
PeerDiscovered = "PeerDiscovered",
|
|
1950
1906
|
PeerUpdated = "PeerUpdated",
|
|
1951
1907
|
PeerExpired = "PeerExpired",
|
|
@@ -2879,70 +2835,70 @@ inner: {peerId: string; topic: string }): PeerUnsubscribed_ {
|
|
|
2879
2835
|
|
|
2880
2836
|
}
|
|
2881
2837
|
|
|
2882
|
-
type
|
|
2883
|
-
tag: P2pEvent_Tags.
|
|
2838
|
+
type GossipsubOutboundFailure__interface = {
|
|
2839
|
+
tag: P2pEvent_Tags.GossipsubOutboundFailure;
|
|
2884
2840
|
inner:
|
|
2885
2841
|
Readonly<{peerId: string; reason: string}>
|
|
2886
2842
|
};
|
|
2887
2843
|
/**
|
|
2888
|
-
*
|
|
2844
|
+
* Gossipsub outbound work was discarded.
|
|
2889
2845
|
*/
|
|
2890
|
-
class
|
|
2846
|
+
class GossipsubOutboundFailure_ extends UniffiEnum implements GossipsubOutboundFailure__interface {
|
|
2891
2847
|
/**
|
|
2892
2848
|
* @private
|
|
2893
2849
|
* This field is private and should not be used, use `tag` instead.
|
|
2894
2850
|
*/
|
|
2895
2851
|
readonly [uniffiTypeNameSymbol] = "P2pEvent";
|
|
2896
|
-
readonly tag = P2pEvent_Tags.
|
|
2852
|
+
readonly tag = P2pEvent_Tags.GossipsubOutboundFailure;
|
|
2897
2853
|
readonly inner:
|
|
2898
2854
|
Readonly<{peerId: string; reason: string}>;
|
|
2899
2855
|
constructor(
|
|
2900
2856
|
inner: {peerId: string; reason: string }) {
|
|
2901
|
-
super("P2pEvent", "
|
|
2857
|
+
super("P2pEvent", "GossipsubOutboundFailure");
|
|
2902
2858
|
|
|
2903
2859
|
this.inner = Object.freeze(inner);
|
|
2904
2860
|
}
|
|
2905
2861
|
static new(
|
|
2906
|
-
inner: {peerId: string; reason: string }):
|
|
2907
|
-
return new
|
|
2862
|
+
inner: {peerId: string; reason: string }): GossipsubOutboundFailure_ {
|
|
2863
|
+
return new GossipsubOutboundFailure_(inner);
|
|
2908
2864
|
}
|
|
2909
2865
|
|
|
2910
|
-
static instanceOf(obj: any): obj is
|
|
2911
|
-
return obj.tag === P2pEvent_Tags.
|
|
2866
|
+
static instanceOf(obj: any): obj is GossipsubOutboundFailure_ {
|
|
2867
|
+
return obj.tag === P2pEvent_Tags.GossipsubOutboundFailure;
|
|
2912
2868
|
}
|
|
2913
2869
|
|
|
2914
2870
|
}
|
|
2915
2871
|
|
|
2916
|
-
type
|
|
2917
|
-
tag: P2pEvent_Tags.
|
|
2872
|
+
type GossipsubProtocolViolation__interface = {
|
|
2873
|
+
tag: P2pEvent_Tags.GossipsubProtocolViolation;
|
|
2918
2874
|
inner:
|
|
2919
2875
|
Readonly<{peerId: string; reason: string}>
|
|
2920
2876
|
};
|
|
2921
2877
|
/**
|
|
2922
|
-
* A peer violated the
|
|
2878
|
+
* A peer violated the gossipsub protocol.
|
|
2923
2879
|
*/
|
|
2924
|
-
class
|
|
2880
|
+
class GossipsubProtocolViolation_ extends UniffiEnum implements GossipsubProtocolViolation__interface {
|
|
2925
2881
|
/**
|
|
2926
2882
|
* @private
|
|
2927
2883
|
* This field is private and should not be used, use `tag` instead.
|
|
2928
2884
|
*/
|
|
2929
2885
|
readonly [uniffiTypeNameSymbol] = "P2pEvent";
|
|
2930
|
-
readonly tag = P2pEvent_Tags.
|
|
2886
|
+
readonly tag = P2pEvent_Tags.GossipsubProtocolViolation;
|
|
2931
2887
|
readonly inner:
|
|
2932
2888
|
Readonly<{peerId: string; reason: string}>;
|
|
2933
2889
|
constructor(
|
|
2934
2890
|
inner: {peerId: string; reason: string }) {
|
|
2935
|
-
super("P2pEvent", "
|
|
2891
|
+
super("P2pEvent", "GossipsubProtocolViolation");
|
|
2936
2892
|
|
|
2937
2893
|
this.inner = Object.freeze(inner);
|
|
2938
2894
|
}
|
|
2939
2895
|
static new(
|
|
2940
|
-
inner: {peerId: string; reason: string }):
|
|
2941
|
-
return new
|
|
2896
|
+
inner: {peerId: string; reason: string }): GossipsubProtocolViolation_ {
|
|
2897
|
+
return new GossipsubProtocolViolation_(inner);
|
|
2942
2898
|
}
|
|
2943
2899
|
|
|
2944
|
-
static instanceOf(obj: any): obj is
|
|
2945
|
-
return obj.tag === P2pEvent_Tags.
|
|
2900
|
+
static instanceOf(obj: any): obj is GossipsubProtocolViolation_ {
|
|
2901
|
+
return obj.tag === P2pEvent_Tags.GossipsubProtocolViolation;
|
|
2946
2902
|
}
|
|
2947
2903
|
|
|
2948
2904
|
}
|
|
@@ -3150,8 +3106,8 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
|
|
|
3150
3106
|
Message: Message_,
|
|
3151
3107
|
PeerSubscribed: PeerSubscribed_,
|
|
3152
3108
|
PeerUnsubscribed: PeerUnsubscribed_,
|
|
3153
|
-
|
|
3154
|
-
|
|
3109
|
+
GossipsubOutboundFailure: GossipsubOutboundFailure_,
|
|
3110
|
+
GossipsubProtocolViolation: GossipsubProtocolViolation_,
|
|
3155
3111
|
PeerDiscovered: PeerDiscovered_,
|
|
3156
3112
|
PeerUpdated: PeerUpdated_,
|
|
3157
3113
|
PeerExpired: PeerExpired_,
|
|
@@ -3164,7 +3120,7 @@ inner: {peerId?: string; source: DiscoverySource; reason: string; suppressed: nu
|
|
|
3164
3120
|
* Event delivered by the native endpoint driver.
|
|
3165
3121
|
*/
|
|
3166
3122
|
export type P2pEvent = InstanceType<
|
|
3167
|
-
typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'FellBackToRelay' | 'ConnectFailed' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | '
|
|
3123
|
+
typeof P2pEvent['EventsDropped' | 'DriverFailed' | 'ConnectionEstablished' | 'ConnectionClosed' | 'PeerReady' | 'IdentifyReceived' | 'PingRttMeasured' | 'PingTimeout' | 'StreamReady' | 'StreamData' | 'StreamRemoteWriteClosed' | 'StreamClosed' | 'EndpointError' | 'ReachabilityChanged' | 'PublicAddressesChanged' | 'RelayReserved' | 'RelayReservationLost' | 'PathEstablished' | 'InboundPathEstablished' | 'PathUpgraded' | 'HolePunchFailed' | 'FellBackToRelay' | 'ConnectFailed' | 'InboundDirectUpgrade' | 'Message' | 'PeerSubscribed' | 'PeerUnsubscribed' | 'GossipsubOutboundFailure' | 'GossipsubProtocolViolation' | 'PeerDiscovered' | 'PeerUpdated' | 'PeerExpired' | 'DiscoveryDialFailed' | 'DiscoveryProtocolViolation']
|
|
3168
3124
|
>;
|
|
3169
3125
|
|
|
3170
3126
|
// FfiConverter for enum P2pEvent
|
|
@@ -3200,8 +3156,8 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3200
3156
|
case 25: return new P2pEvent.Message({fromPeerId: FfiConverterString.readFromCursor(c), topics: FfiConverterSequenceString.readFromCursor(c), data: FfiConverterArrayBuffer.readFromCursor(c), seqno: FfiConverterArrayBuffer.readFromCursor(c), signed: FfiConverterBool.readFromCursor(c) });
|
|
3201
3157
|
case 26: return new P2pEvent.PeerSubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
|
|
3202
3158
|
case 27: return new P2pEvent.PeerUnsubscribed({peerId: FfiConverterString.readFromCursor(c), topic: FfiConverterString.readFromCursor(c) });
|
|
3203
|
-
case 28: return new P2pEvent.
|
|
3204
|
-
case 29: return new P2pEvent.
|
|
3159
|
+
case 28: return new P2pEvent.GossipsubOutboundFailure({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3160
|
+
case 29: return new P2pEvent.GossipsubProtocolViolation({peerId: FfiConverterString.readFromCursor(c), reason: FfiConverterString.readFromCursor(c) });
|
|
3205
3161
|
case 30: return new P2pEvent.PeerDiscovered({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
|
|
3206
3162
|
case 31: return new P2pEvent.PeerUpdated({peerId: FfiConverterString.readFromCursor(c), addrs: FfiConverterSequenceString.readFromCursor(c), source: FfiConverterTypeDiscoverySource.readFromCursor(c) });
|
|
3207
3163
|
case 32: return new P2pEvent.PeerExpired({peerId: FfiConverterString.readFromCursor(c) });
|
|
@@ -3417,14 +3373,14 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3417
3373
|
FfiConverterString.writeIntoCursor(inner.topic, c);
|
|
3418
3374
|
return;
|
|
3419
3375
|
}
|
|
3420
|
-
case P2pEvent_Tags.
|
|
3376
|
+
case P2pEvent_Tags.GossipsubOutboundFailure: {
|
|
3421
3377
|
c.writeI32(28);
|
|
3422
3378
|
const inner = value.inner;
|
|
3423
3379
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
3424
3380
|
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
3425
3381
|
return;
|
|
3426
3382
|
}
|
|
3427
|
-
case P2pEvent_Tags.
|
|
3383
|
+
case P2pEvent_Tags.GossipsubProtocolViolation: {
|
|
3428
3384
|
c.writeI32(29);
|
|
3429
3385
|
const inner = value.inner;
|
|
3430
3386
|
FfiConverterString.writeIntoCursor(inner.peerId, c);
|
|
@@ -3681,14 +3637,14 @@ const FfiConverterTypeP2pEvent = (() => {
|
|
|
3681
3637
|
size += FfiConverterString.allocationSize(inner.topic);
|
|
3682
3638
|
return size;
|
|
3683
3639
|
}
|
|
3684
|
-
case P2pEvent_Tags.
|
|
3640
|
+
case P2pEvent_Tags.GossipsubOutboundFailure: {
|
|
3685
3641
|
const inner = value.inner;
|
|
3686
3642
|
let size = 4;
|
|
3687
3643
|
size += FfiConverterString.allocationSize(inner.peerId);
|
|
3688
3644
|
size += FfiConverterString.allocationSize(inner.reason);
|
|
3689
3645
|
return size;
|
|
3690
3646
|
}
|
|
3691
|
-
case P2pEvent_Tags.
|
|
3647
|
+
case P2pEvent_Tags.GossipsubProtocolViolation: {
|
|
3692
3648
|
const inner = value.inner;
|
|
3693
3649
|
let size = 4;
|
|
3694
3650
|
size += FfiConverterString.allocationSize(inner.peerId);
|
|
@@ -4917,7 +4873,6 @@ export default Object.freeze({
|
|
|
4917
4873
|
FfiConverterTypeP2pEvent,
|
|
4918
4874
|
FfiConverterTypeP2pEventDoorbell,
|
|
4919
4875
|
FfiConverterTypePathKind,
|
|
4920
|
-
FfiConverterTypePubsubRouter,
|
|
4921
4876
|
FfiConverterTypeReachability,
|
|
4922
4877
|
FfiConverterTypeRelayReservationInfo,
|
|
4923
4878
|
FfiConverterTypeTransportOptions,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-connection-ids.test.d.ts","sourceRoot":"","sources":["../../../tests/adapter-connection-ids.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-event-drain.test.d.ts","sourceRoot":"","sources":["../../../tests/adapter-event-drain.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-drain.test.d.ts","sourceRoot":"","sources":["../../../tests/event-drain.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/** In-memory stand-in for the UniFFI `P2pEndpoint` used by adapter tests. */
|
|
2
|
-
import type { OpenStreamResult, P2pEndpointLike, P2pEvent, P2pEventDoorbell } from "../src/native.js";
|
|
3
|
-
/**
|
|
4
|
-
* Hand-written stand-in for a generated event class instance. The adapter
|
|
5
|
-
* only reads `tag` and `inner`, so tests enqueue plain literals.
|
|
6
|
-
*/
|
|
7
|
-
export interface FakeEvent {
|
|
8
|
-
readonly tag: string;
|
|
9
|
-
readonly inner: Readonly<Record<string, unknown>>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Implements the full generated endpoint surface so interface drift fails
|
|
13
|
-
* `typecheck`. Only the methods the adapter tests reach have behavior; the
|
|
14
|
-
* rest throw by name so an unexpected call is loud rather than "not a
|
|
15
|
-
* function".
|
|
16
|
-
*/
|
|
17
|
-
export declare class FakeNativeEndpoint implements P2pEndpointLike {
|
|
18
|
-
#private;
|
|
19
|
-
static latest: FakeNativeEndpoint | undefined;
|
|
20
|
-
readonly drainLimits: number[];
|
|
21
|
-
/** Native identities returned by the next `openStream` call. */
|
|
22
|
-
nextStream: {
|
|
23
|
-
connId: bigint;
|
|
24
|
-
streamId: bigint;
|
|
25
|
-
};
|
|
26
|
-
/** Native connection identities returned by the dial methods. */
|
|
27
|
-
dialResults: bigint[];
|
|
28
|
-
/** Native discovery clock returned by `discoveryNowMs`. */
|
|
29
|
-
discoveryNow: bigint | undefined;
|
|
30
|
-
constructor();
|
|
31
|
-
/** Returns the endpoint constructed by the most recent `Minip2p.create`. */
|
|
32
|
-
static current(): FakeNativeEndpoint;
|
|
33
|
-
enqueue(...batches: FakeEvent[][]): void;
|
|
34
|
-
ring(): void;
|
|
35
|
-
start(doorbell: P2pEventDoorbell): void;
|
|
36
|
-
drainEvents(limit: number): P2pEvent[];
|
|
37
|
-
openStream(): OpenStreamResult;
|
|
38
|
-
dial(): bigint[];
|
|
39
|
-
dialIp4(): bigint;
|
|
40
|
-
dialIp6(): bigint;
|
|
41
|
-
discoveryNowMs(): bigint | undefined;
|
|
42
|
-
stop(): void;
|
|
43
|
-
uniffiDestroy(): void;
|
|
44
|
-
abandonStream(): never;
|
|
45
|
-
activeReservation(): never;
|
|
46
|
-
addProtocol(): never;
|
|
47
|
-
cancelConnect(): never;
|
|
48
|
-
closeStreamWrite(): never;
|
|
49
|
-
connect(): never;
|
|
50
|
-
connectAddr(): never;
|
|
51
|
-
connectWithAddrs(): never;
|
|
52
|
-
connectedPeers(): never;
|
|
53
|
-
disconnect(): never;
|
|
54
|
-
isPeerReady(): never;
|
|
55
|
-
isRunning(): never;
|
|
56
|
-
knownPeers(): never;
|
|
57
|
-
listenAddrs(): never;
|
|
58
|
-
path(): never;
|
|
59
|
-
peerId(): never;
|
|
60
|
-
peerInfo(): never;
|
|
61
|
-
ping(): never;
|
|
62
|
-
publish(): never;
|
|
63
|
-
reachability(): never;
|
|
64
|
-
resetStream(): never;
|
|
65
|
-
sendStream(): never;
|
|
66
|
-
setActive(): never;
|
|
67
|
-
subscribe(): never;
|
|
68
|
-
unsubscribe(): never;
|
|
69
|
-
waitStopped(): never;
|
|
70
|
-
}
|
|
71
|
-
/** Factory for `vi.mock("../src/native", nativeModuleMock)`. */
|
|
72
|
-
export declare const nativeModuleMock: () => {
|
|
73
|
-
FfiError_Tags: {};
|
|
74
|
-
P2pEndpoint: typeof FakeNativeEndpoint;
|
|
75
|
-
circuitAddress: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
76
|
-
generateSecretKey: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
77
|
-
peerIdFromSecretKey: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=fake-native-endpoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fake-native-endpoint.d.ts","sourceRoot":"","sources":["../../../tests/fake-native-endpoint.ts"],"names":[],"mappings":"AACA,6EAA6E;AAI7E,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,gBAAgB,EACjB,MAAM,kBAAe,CAAC;AAEvB;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD;AAMD;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,eAAe;;IACxD,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAE9C,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IACpC,gEAAgE;IAChE,UAAU;QAAK,MAAM;QAAM,QAAQ;MAAO;IAC1C,iEAAiE;IACjE,WAAW,EAAE,MAAM,EAAE,CAAQ;IAC7B,2DAA2D;IAC3D,YAAY,EAAE,MAAM,GAAG,SAAS,CAAa;IAI7C,cAEC;IAED,4EAA4E;IAC5E,MAAM,CAAC,OAAO,IAAI,kBAAkB,CAKnC;IAED,OAAO,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,EAAE,GAAG,IAAI,CAEvC;IAED,IAAI,IAAI,IAAI,CAEX;IAED,KAAK,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAEtC;IAED,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CAGrC;IAED,UAAU,IAAI,gBAAgB,CAE7B;IAED,IAAI,IAAI,MAAM,EAAE,CAEf;IAED,OAAO,IAAI,MAAM,CAEhB;IAED,OAAO,IAAI,MAAM,CAEhB;IAED,cAAc,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED,IAAI,IAAI,IAAI,CAEX;IAED,aAAa,IAAI,IAAI,CAEpB;IAED,aAAa,IAAI,KAAK,CAErB;IAED,iBAAiB,IAAI,KAAK,CAEzB;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,aAAa,IAAI,KAAK,CAErB;IAED,gBAAgB,IAAI,KAAK,CAExB;IAED,OAAO,IAAI,KAAK,CAEf;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,gBAAgB,IAAI,KAAK,CAExB;IAED,cAAc,IAAI,KAAK,CAEtB;IAED,UAAU,IAAI,KAAK,CAElB;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,SAAS,IAAI,KAAK,CAEjB;IAED,UAAU,IAAI,KAAK,CAElB;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,IAAI,IAAI,KAAK,CAEZ;IAED,MAAM,IAAI,KAAK,CAEd;IAED,QAAQ,IAAI,KAAK,CAEhB;IAED,IAAI,IAAI,KAAK,CAEZ;IAED,OAAO,IAAI,KAAK,CAEf;IAED,YAAY,IAAI,KAAK,CAEpB;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,UAAU,IAAI,KAAK,CAElB;IAED,SAAS,IAAI,KAAK,CAEjB;IAED,SAAS,IAAI,KAAK,CAEjB;IAED,WAAW,IAAI,KAAK,CAEnB;IAED,WAAW,IAAI,KAAK,CAEnB;CACF;AAED,gEAAgE;AAChE,eAAO,MAAM,gBAAgB;IAC3B,aAAa;IACb,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,mBAAmB;CACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.built.config.d.ts","sourceRoot":"","sources":["../../vitest.built.config.ts"],"names":[],"mappings":""}
|