mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 09:43:10 +00:00
29 lines
691 B
TypeScript
29 lines
691 B
TypeScript
import type { PeerId } from "@libp2p/interface";
|
|
import type { PeerStore } from "@libp2p/interface";
|
|
import type { ConnectionManager } from "@libp2p/interface-internal";
|
|
|
|
import { IEnr } from "./enr.js";
|
|
import { IBaseProtocol } from "./protocols.js";
|
|
|
|
export interface IPeerExchange extends IBaseProtocol {
|
|
query(params: PeerExchangeQueryParams): Promise<PeerInfo[] | undefined>;
|
|
}
|
|
|
|
export interface PeerExchangeQueryParams {
|
|
numPeers: number;
|
|
peerId: PeerId;
|
|
}
|
|
|
|
export interface PeerExchangeResponse {
|
|
peerInfos: PeerInfo[];
|
|
}
|
|
|
|
export interface PeerInfo {
|
|
ENR?: IEnr;
|
|
}
|
|
|
|
export interface PeerExchangeComponents {
|
|
connectionManager: ConnectionManager;
|
|
peerStore: PeerStore;
|
|
}
|