import PeerId from 'peer-id'; import CID from 'cids'; import { Peer } from '../core'; export interface Options { timeout: number; maxNumProviders: number; } export declare class Dht { private parent; constructor(parent: Peer); /** * Query the DHT for all multiaddresses associated with a `PeerId`. * * @param peer - The id of the peer to search for. */ findPeer(id: PeerId | string, options?: { maxTimeout?: number; }): Promise; /** * Find peers in the DHT that can provide a specific value, given a key. * * @param cid - They cid to find providers for. */ findProvs(cid: CID | string, options?: { maxTimeout?: number; maxNumProviders?: number; }): Promise; /** * Announce to the network that we are providing given values. * * @param cids - The CIDs that should be announced. * @param options - If recirsive is true, provide not only the given object but also all objects linked from it. */ provide(cids: CID | CID[], options?: { recursive?: boolean; }): Promise; }