/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { CommissioningClient } from "#behavior/system/commissioning/CommissioningClient.js"; import type { ClientNode } from "#node/ClientNode.js"; import type { ServerNode } from "#node/ServerNode.js"; import { VendorId } from "@matter/types"; import { Discovery } from "./Discovery.js"; import { ParallelPaseDiscovery } from "./ParallelPaseDiscovery.js"; /** * Discovers and commissions nodes. All discovered candidates are commissioned in parallel; the first to establish * PASE wins. Discovery is stopped at PASE time and the abort signal fires to cancel remaining in-flight PASE * attempts. Any candidate that establishes PASE after the winner cleans up its session without proceeding to * commissioning. {@link onComplete} awaits the winner's commissioning to finish before returning. */ export declare class CommissioningDiscovery extends ParallelPaseDiscovery { #private; constructor(owner: ServerNode, options: CommissioningDiscovery.Options); protected get cleanupLabel(): string; protected get failureMessage(): string; protected onDiscovered(node: ClientNode): void; } export declare namespace CommissioningDiscovery { type Options = Discovery.InstanceOptions & CommissioningClient.CommissioningOptions; /** What an onboarding payload and a commissionable advertisement each say about a device's identity. */ interface Identity { vendorId?: VendorId; productId?: number; } /** The one identifier on which an advertisement contradicts the payload. */ interface IdentityMismatch { facet: "vendor" | "product"; payload: number; advertised: number; } /** * Why `advertised` is not the device `payload` names, or `undefined` if it may be. * * Discovery browses one DNS-SD sub-service, so a discriminator is all it can narrow by; the vendor * and product a payload names are checked against what the device advertises (§ 4.3.1's `VP` * record) once it is found. Either side may say nothing — a manual pairing code carries no identity * in its 11-digit form and the record is optional — and absence never rejects, so this only ever * refuses a device that positively advertises something else. * * Mirrors CHIP's `SetUpCodePairer::NodeMatchesCurrentFilter`. Both codecs already report § 2.5.2 / * § 2.5.3's "unspecified" as an absent identifier, so nothing here has to know that it is 0 on the * wire. */ function identityMismatch(payload: Identity, advertised: Identity): IdentityMismatch | undefined; } //# sourceMappingURL=CommissioningDiscovery.d.ts.map