export = MulticodecTopology; declare class MulticodecTopology extends Topology { /** * Checks if the given value is a `MulticodecTopology` instance. * * @param {any} other * @returns {other is MulticodecTopology} */ static isMulticodecTopology(other: any): other is MulticodecTopology; /** * @param {TopologyOptions & MulticodecOptions} props */ constructor({ min, max, multicodecs, handlers }: TopologyOptions & MulticodecOptions); multicodecs: string[]; /** * Check if a new peer support the multicodecs for this topology. * * @param {Object} props * @param {PeerId} props.peerId * @param {Array} props.protocols */ _onProtocolChange({ peerId, protocols }: { peerId: PeerId; protocols: Array; }): Promise; /** * Verify if a new connected peer has a topology multicodec and call _onConnect. * * @param {Connection} connection */ _onPeerConnect(connection: Connection): Promise; /** * Update topology. * * @param {AsyncIterable | Iterable} peerDataIterable */ _updatePeers(peerDataIterable: AsyncIterable | Iterable): Promise; } declare namespace MulticodecTopology { export { PeerId, Multiaddr, Connection, TopologyOptions, MulticodecOptions, Handlers }; } import Topology = require("./index"); type PeerId = import('peer-id'); type Connection = import('../connection/connection'); type TopologyOptions = import('.').Options; type MulticodecOptions = { /** * - protocol multicodecs */ multicodecs: string[]; handlers: Required; }; type Multiaddr = typeof import("multiaddr"); type Handlers = import('.').Handlers; //# sourceMappingURL=multicodec-topology.d.ts.map