mirror of
https://github.com/logos-messaging/logos-delivery-js.git
synced 2026-05-17 21:09:32 +00:00
* remove: unnecessary function * remove: test * update doc * add: tests * revert unintended change * fix: ping return * fix(tests): stub connections * log warning instead of throwing an error
29 lines
729 B
TypeScript
29 lines
729 B
TypeScript
import type { PeerId } from "@libp2p/interface/peer-id";
|
|
import type { PeerStore } from "@libp2p/interface/peer-store";
|
|
import type { ConnectionManager } from "@libp2p/interface-internal/connection-manager";
|
|
|
|
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;
|
|
}
|