import type { IdentifyComponents, IdentifyInit } from './index.js';
import type { Identify as IdentifyMessage } from './pb/message.js';
import type { Libp2pEvents, IdentifyResult, Logger, Connection, PeerStore, NodeInfo, Startable, PeerId, IncomingStreamData, PrivateKey } from '@libp2p/interface';
import type { AddressManager, Registrar } from '@libp2p/interface-internal';
import type { Multiaddr } from '@multiformats/multiaddr';
import type { TypedEventTarget } from 'main-event';
export declare const defaultValues: {
    protocolPrefix: string;
    timeout: number;
    maxInboundStreams: number;
    maxOutboundStreams: number;
    maxObservedAddresses: number;
    maxMessageSize: number;
    runOnConnectionOpen: boolean;
    runOnSelfUpdate: boolean;
    runOnLimitedConnection: boolean;
    concurrency: number;
};
/**
 * Takes the `addr` and converts it to a Multiaddr if possible
 */
export declare function getCleanMultiaddr(addr: Uint8Array | string | null | undefined): Multiaddr | undefined;
export declare function getAgentVersion(nodeInfo: NodeInfo, agentVersion?: string): string;
export declare function consumeIdentifyMessage(peerStore: PeerStore, events: TypedEventTarget<Libp2pEvents>, log: Logger, connection: Connection, message: IdentifyMessage): Promise<IdentifyResult>;
export interface AbstractIdentifyInit extends IdentifyInit {
    protocol: string;
    log: Logger;
}
export declare abstract class AbstractIdentify implements Startable {
    readonly host: {
        protocolVersion: string;
        agentVersion: string;
    };
    protected protocol: string;
    protected started: boolean;
    protected readonly timeout: number;
    protected readonly peerId: PeerId;
    protected readonly privateKey: PrivateKey;
    protected readonly peerStore: PeerStore;
    protected readonly registrar: Registrar;
    protected readonly addressManager: AddressManager;
    private readonly maxInboundStreams;
    private readonly maxOutboundStreams;
    protected readonly maxMessageSize: number;
    protected readonly maxObservedAddresses: number;
    protected readonly events: TypedEventTarget<Libp2pEvents>;
    protected readonly runOnLimitedConnection: boolean;
    protected readonly log: Logger;
    constructor(components: IdentifyComponents, init: AbstractIdentifyInit);
    isStarted(): boolean;
    start(): Promise<void>;
    stop(): Promise<void>;
    protected abstract handleProtocol(data: IncomingStreamData): Promise<void>;
}
//# sourceMappingURL=utils.d.ts.map