/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { DiscoveryData } from "#common/Scanner.js"; import { SessionParameters } from "#session/SessionParameters.js"; import { ServerAddress, ServerAddressIp, ServerAddressTcp, ServerAddressUdp } from "@matter/general"; import { CaseAuthenticatedTag } from "@matter/types"; import { PeerAddress } from "./PeerAddress.js"; /** Address persisted alongside a peer; transport type is required so storage stays schema-conformant. */ export type OperationalAddress = ServerAddressUdp | ServerAddressTcp; export declare namespace OperationalAddress { /** * Narrow an arbitrary {@link ServerAddress} (or persisted shape lacking transport tag) to * {@link OperationalAddress}. Returns `undefined` for non-IP addresses; defaults missing * `type` to `"udp"` so storage written before transport tagging existed still loads. */ function from(address: ServerAddress | ServerAddressIp | undefined): OperationalAddress | undefined; } /** * Operational information for a single peer. * * For our purposes a "peer" is another node commissioned to a fabric to which we have access. */ export interface PeerDescriptor { /** * The logical address of the peer. */ address: PeerAddress; /** * A physical address the peer may be accessed at, if known. */ operationalAddress?: OperationalAddress; /** * Additional information collected while locating the peer. */ discoveryData?: DiscoveryData; /** * Session parameters the peer reported in its most recent session that reported any. A session's report replaces * the previous one as a whole; values it does not contain are absent, and {@link Peer.sessionParameters} supplies * them from other sources and fallbacks. */ reportedSessionParameters?: Partial; /** * Set when a TCP session to the peer reported no TCP server support while DNS-SD did not advertise it either. A * later session reporting TCP server support clears it. */ tcpUnsupported?: boolean; /** * Case Authenticated Tags (CATs) to use for operational CASE sessions with this node. * * CATs provide additional authentication context for Matter operational sessions. They are only used for * operational CASE connections after commissioning is complete, not during the initial PASE commissioning * process. */ caseAuthenticatedTags?: readonly CaseAuthenticatedTag[]; } export declare class ObservablePeerDescriptor implements PeerDescriptor { #private; constructor({ address, operationalAddress, discoveryData, caseAuthenticatedTags, reportedSessionParameters, tcpUnsupported, }: PeerDescriptor, onChange: () => void); get address(): PeerAddress; get operationalAddress(): OperationalAddress | undefined; set operationalAddress(value: OperationalAddress | undefined); get discoveryData(): DiscoveryData | undefined; set discoveryData(value: DiscoveryData | undefined); get reportedSessionParameters(): Partial | undefined; set reportedSessionParameters(value: Partial | undefined); get tcpUnsupported(): boolean | undefined; set tcpUnsupported(value: boolean | undefined); get caseAuthenticatedTags(): undefined | readonly CaseAuthenticatedTag[]; set caseAuthenticatedTags(cats: undefined | readonly CaseAuthenticatedTag[]); } //# sourceMappingURL=PeerDescriptor.d.ts.map