mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-30 22:03:27 +00:00
* merge: master * fix: tests * update: interfafces * rm: comments * metadata: store peerIdStr instead of peerId * chore(utils): move fast-utils to dev deps * fix: allow autosharding nodes to get peers (#1785) * fix: merge * fix: build * fix: failing tests from master merge --------- Co-authored-by: Arseniy Klempner <arseniyk@status.im>
54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
import type { PeerId, Stream } from "@libp2p/interface";
|
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
|
|
|
import { IConnectionManager } from "./connection_manager.js";
|
|
import type { IFilter } from "./filter.js";
|
|
import type { Libp2p } from "./libp2p.js";
|
|
import type { ILightPush } from "./light_push.js";
|
|
import { Protocols, ShardingParams } 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;
|
|
|
|
shardInfo?: ShardingParams;
|
|
|
|
connectionManager: IConnectionManager;
|
|
|
|
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
|
|
|
start(): Promise<void>;
|
|
|
|
stop(): Promise<void>;
|
|
|
|
isStarted(): boolean;
|
|
|
|
isConnected(): 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;
|
|
}
|