/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { BasicInformation } from "#clusters/basic-information";
import { BasicSet, Lifetime, MaybePromise } from "#general";
import type { MdnsClient } from "#mdns/MdnsClient.js";
import type { NodeSession } from "#session/NodeSession.js";
import type { SecureSession } from "#session/SecureSession.js";
import type { SessionManager } from "#session/SessionManager.js";
import { PeerDescriptor } from "./PeerDescriptor.js";
import type { NodeDiscoveryType } from "./PeerSet.js";
/**
 * A node on a fabric we are a member of.
 */
export declare class Peer {
    #private;
    activeDiscovery?: Peer.ActiveDiscovery;
    activeReconnection?: Peer.ActiveReconnection;
    constructor(descriptor: PeerDescriptor, context: Peer.Context);
    get fabric(): import("../index.js").Fabric;
    get limits(): BasicInformation.CapabilityMinima;
    set limits(limits: BasicInformation.CapabilityMinima);
    get address(): import("./PeerAddress.js").PeerAddress;
    get descriptor(): PeerDescriptor;
    get sessions(): BasicSet<NodeSession, NodeSession>;
    /**
     * Permanently forget the peer.
     */
    delete(): Promise<void>;
    /**
     * Close the peer without removing the persistent state.
     */
    close(): Promise<void>;
    toString(): string;
}
export declare namespace Peer {
    interface Context {
        lifetime: Lifetime.Owner;
        sessions: SessionManager;
        savePeer(peer: Peer): MaybePromise<void>;
        deletePeer(peer: Peer): MaybePromise<void>;
        closed(peer: Peer): void;
    }
    interface ActiveDiscovery {
        type: NodeDiscoveryType;
        promises?: (() => Promise<SecureSession>)[];
        stopTimerFunc?: (() => void) | undefined;
        mdnsClient?: MdnsClient;
    }
    interface ActiveReconnection {
        promise: Promise<SecureSession | undefined>;
        resolver: (session: SecureSession | undefined) => void;
        rejecter: (reason?: any) => void;
    }
}
//# sourceMappingURL=Peer.d.ts.map