import { ESPRMNode, ESPTransportInterface } from "@espressif/rainmaker-base-sdk"; import { ESPRMMatterEndpointInterface } from "../types/node"; import { ESPRMMatterMetadataInterface } from "../types/node/api"; import { ESPRMMatterNodeType } from "./constants"; /** * Derives {@link ESPRMMatterNodeType} from RainMaker API node fields. * * A node is treated as pure Matter when `node_type` is `"pure_matter"` or when * `metadata.Matter.isRainmaker` is explicitly `false`. * * @param nodeType - Value of the API `node_type` field. * @param matterMeta - Parsed `metadata.Matter` payload. * @returns {@link ESPRMMatterNodeType.pureMatter} or {@link ESPRMMatterNodeType.rainmakerMatter}. */ declare function parseMatterNodeType(nodeType?: string, matterMeta?: ESPRMMatterMetadataInterface): ESPRMMatterNodeType; /** * Returns whether API node details represent a pure Matter node. * * @param nodeDetails - Raw node details from the RainMaker API. * @returns `true` when `is_matter` is set and `node_type` is `"pure_matter"`. * * @example * ```typescript * if (isMatterNode(nodeDetails)) { * const node = ESPRMMatterNode.fromMatterMetaData(nodeDetails); * } * ``` */ declare function isMatterNode(nodeDetails: Record): boolean; /** * Builds {@link ESPRMMatterEndpointInterface} summaries from `metadata.Matter`. * * Converts hex endpoint and cluster keys (e.g. `"0x1"`, `"0x6"`) into numeric IDs * and sorts endpoints by ID ascending. * * @param matterMeta - Parsed `metadata.Matter` payload. * @returns Sorted endpoint list, or an empty array when metadata has no endpoints. */ declare function buildMatterEndpoints(matterMeta?: ESPRMMatterMetadataInterface): ESPRMMatterEndpointInterface[]; declare function throwNodeUnreachable(): never; declare function getCustomTransport(node: ESPRMNode, transportMode: string): ESPTransportInterface | undefined; export { isMatterNode, buildMatterEndpoints, parseMatterNodeType, throwNodeUnreachable, getCustomTransport, };