mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 17:53:09 +00:00
* remove peer-exchange from @waku/core - also removes the manual test for peer-exchange (assumption is that the only way to initialise peer-exchange is through libp2p's peerDiscovery and not manually) (ref: https://github.com/waku-org/js-waku/pull/1158#discussion_r1108055234) # Please enter the commit message for your changes. Lines starting * fix: build * update interop test * decrease test duration for px auto discovery * rm: only for tests * address comment
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import type { Stream } from "@libp2p/interface-connection";
|
|
import type { Libp2p } from "@libp2p/interface-libp2p";
|
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
|
|
|
import type { IFilter } from "./filter.js";
|
|
import type { ILightPush } from "./light_push.js";
|
|
import { Protocols } from "./protocols.js";
|
|
import type { IRelay } from "./relay.js";
|
|
import type { IStore } from "./store.js";
|
|
|
|
export interface Waku {
|
|
libp2p: Libp2p;
|
|
relay?: IRelay;
|
|
store?: IStore;
|
|
filter?: IFilter;
|
|
lightPush?: ILightPush;
|
|
|
|
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
|
|
|
start(): Promise<void>;
|
|
|
|
stop(): Promise<void>;
|
|
|
|
isStarted(): boolean;
|
|
}
|
|
|
|
export interface LightNode extends Waku {
|
|
relay: undefined;
|
|
store: IStore;
|
|
filter: IFilter;
|
|
lightPush: ILightPush;
|
|
}
|
|
|
|
export interface RelayNode extends Waku {
|
|
relay: IRelay;
|
|
store: undefined;
|
|
filter: undefined;
|
|
lightPush: undefined;
|
|
}
|
|
|
|
export interface FullNode extends Waku {
|
|
relay: IRelay;
|
|
store: IStore;
|
|
filter: IFilter;
|
|
lightPush: ILightPush;
|
|
}
|