import { serviceCapabilities } from '@libp2p/interface';
import type { PingComponents, PingInit, Ping as PingInterface } from './index.ts';
import type { Stream, Startable, Connection, DialTarget, DialProtocolOptions } from '@libp2p/interface';
export declare class Ping implements Startable, PingInterface {
    readonly protocol: string;
    private readonly components;
    private started;
    private readonly timeout;
    private readonly maxInboundStreams;
    private readonly maxOutboundStreams;
    private readonly runOnLimitedConnection;
    constructor(components: PingComponents, init?: PingInit);
    readonly [Symbol.toStringTag] = "@libp2p/ping";
    readonly [serviceCapabilities]: string[];
    start(): Promise<void>;
    stop(): Promise<void>;
    isStarted(): boolean;
    /**
     * A handler to register with Libp2p to process ping messages
     */
    handlePing(stream: Stream, connection: Connection): Promise<void>;
    /**
     * Ping a given peer and wait for its response, getting the operation latency.
     */
    ping(peer: DialTarget, options?: DialProtocolOptions): Promise<number>;
}
//# sourceMappingURL=ping.d.ts.map