import type { PeerId } from "@libp2p/interface-peer-id"; import type { Peer, PeerStore } from "@libp2p/interface-peer-store"; /** * Returns a pseudo-random peer that supports the given protocol. * Useful for protocols such as store and light push */ export declare function selectRandomPeer(peers: Peer[]): Peer | undefined; /** * Returns the list of peers that supports the given protocol. */ export declare function getPeersForProtocol(peerStore: PeerStore, protocols: string[]): Promise; export declare function selectPeerForProtocol(peerStore: PeerStore, protocols: string[], peerId?: PeerId): Promise<{ peer: Peer; protocol: string; } | undefined>;