export type PeerId = import('peer-id'); export type MuxedStream = import('libp2p-interfaces/src/stream-muxer/types').MuxedStream; /** * @typedef {import('peer-id')} PeerId * @typedef {import('libp2p-interfaces/src/stream-muxer/types').MuxedStream} MuxedStream */ /** * @param {import('../types').DHT} dht */ export class RPC { /** * @param {object} params * @param {import('../routing-table').RoutingTable} params.routingTable * @param {import('peer-id')} params.peerId * @param {import('../providers').Providers} params.providers * @param {import('libp2p/src/peer-store/types').PeerStore} params.peerStore * @param {import('../types').Addressable} params.addressable * @param {import('../peer-routing').PeerRouting} params.peerRouting * @param {import('interface-datastore').Datastore} params.records * @param {import('libp2p-interfaces/src/types').DhtValidators} params.validators * @param {boolean} [params.lan] */ constructor(params: { routingTable: import('../routing-table').RoutingTable; peerId: import('peer-id'); providers: import('../providers').Providers; peerStore: import('libp2p/src/peer-store/types').PeerStore; addressable: import('../types').Addressable; peerRouting: import('../peer-routing').PeerRouting; records: import('interface-datastore').Datastore; validators: import('libp2p-interfaces/src/types').DhtValidators; lan?: boolean | undefined; }); _messageHandler: (type: number) => import("./types").DHTMessageHandler; _routingTable: import("../routing-table").RoutingTable; /** * Process incoming DHT messages. * * @param {PeerId} peerId * @param {Message} msg */ handleMessage(peerId: PeerId, msg: Message): Promise; /** * Handle incoming streams on the dht protocol * * @param {object} props * @param {MuxedStream} props.stream * @param {import('libp2p-interfaces/src/connection').Connection} props.connection */ onIncomingStream({ stream, connection }: { stream: MuxedStream; connection: import("libp2p-interfaces/src/connection/connection"); }): Promise; } import { Message } from "../message"; //# sourceMappingURL=index.d.ts.map