/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { type ClusterBehavior } from "#behavior/cluster/ClusterBehavior.js";
import { CommissioningDiscovery } from "#behavior/system/controller/discovery/CommissioningDiscovery.js";
import { ContinuousDiscovery } from "#behavior/system/controller/discovery/ContinuousDiscovery.js";
import { Discovery } from "#behavior/system/controller/discovery/Discovery.js";
import { InstanceDiscovery } from "#behavior/system/controller/discovery/InstanceDiscovery.js";
import { Endpoint } from "#endpoint/Endpoint.js";
import { EndpointContainer } from "#endpoint/properties/EndpointContainer.js";
import { EndpointType } from "#endpoint/type/EndpointType.js";
import { Observable } from "#general";
import { PeerAddress } from "#protocol";
import { ClientNode } from "../ClientNode.js";
import type { ServerNode } from "../ServerNode.js";
/**
 * Manages the set of known remote nodes.
 *
 * Remote nodes are either peers (commissioned into a fabric we share) or commissionable.
 */
export declare class Peers extends EndpointContainer<ClientNode> {
    #private;
    constructor(owner: ServerNode);
    /**
     * Load nodes.  Invoked automatically by owner.
     */
    initialize(): void;
    /**
     * Find a specific commissionable node, or, if no discovery options are provided, returns the first discovered node.
     * TODO: Allow to provide an array of options for multiple discoveries (e.g. from a Multi QR code).
     */
    locate(options?: Discovery.Options): InstanceDiscovery;
    /**
     * Employ discovery to find a set of commissionable nodes, the options can be used to limit the discovered devices
     * (e.g. just a specific vendor).
     * TODO: Allow to provide multiple identifiers for multiple discoveries (e.g. from a Multi QR code).
     *
     * If you do not provide a timeout value, will search until canceled, and you need to add a listener to
     * {@link Discovery#discovered} or {@link added} to receive discovered nodes.
     */
    discover(options?: Discovery.Options): ContinuousDiscovery;
    /**
     * Find a specific commissionable node and commission.
     */
    commission(options: CommissioningDiscovery.Options): CommissioningDiscovery;
    /**
     * Obtain an {@link Observable} that emits when a specific type of endpoint initializes for a peer.
     *
     * This is useful for initializing general behavior on any peer endpoint of the specified type.
     */
    endpointInstalled<T extends EndpointType>(type: T): Observable<[endpoint: Endpoint<T>]>;
    /**
     * Obtain a {@link Observable} that emits when a specific type of cluster initializes for a peer.
     *
     * This is useful for initializing general behavior on any peer endpoint with the specified cluster.
     */
    clusterInstalled<T extends ClusterBehavior.Type>(type: T): Observable<[endpoint: Endpoint<EndpointType.Empty>, type: T], void>;
    /**
     * Emits when fixed attributes
     */
    get(id: number | string | PeerAddress): ClientNode | undefined;
    get owner(): ServerNode;
    add(node: ClientNode): void;
    /**
     * Get or create a client node for the given peer address.
     *
     * This is mainly used to communicate to other known nodes on the fabric without having a formal commissioning
     * process.
     */
    forAddress(peerAddress: PeerAddress, options?: Omit<ClientNode.Options, "owner">): Promise<ClientNode>;
    close(): Promise<void>;
}
//# sourceMappingURL=Peers.d.ts.map