/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { ActionContext } from "#behavior/context/ActionContext.js"; import { IndexBehavior } from "#behavior/system/index/IndexBehavior.js"; import { NetworkRuntime } from "#behavior/system/network/NetworkRuntime.js"; import { PartsBehavior } from "#behavior/system/parts/PartsBehavior.js"; import { Endpoint } from "#endpoint/Endpoint.js"; import { Endpoints } from "#endpoint/properties/Endpoints.js"; import { EndpointType } from "#endpoint/type/EndpointType.js"; import { MutableEndpoint } from "#endpoint/type/MutableEndpoint.js"; import { Construction, Diagnostic, DiagnosticPresentation, Environment, Identity } from "@matter/general"; import { MatterModel } from "@matter/model"; import { Interactable } from "@matter/protocol"; import { RootEndpoint } from "../endpoints/root.js"; import { NodeLifecycle } from "./NodeLifecycle.js"; /** * A Matter Node. * * In Matter, a "node" is an individually addressable top-level network resource. */ export declare abstract class Node extends Endpoint { #private; [Diagnostic.value]: unknown; constructor(config: Node.Configuration); get env(): Environment; /** * Model of Matter semantics understood by this node. Defaults to the standard model; client nodes may narrow or * extend it so remote clusters resolve to real element names. */ get matter(): MatterModel; /** * The optimized view that supports local Matter protocol implementation. */ get protocol(): import("@matter/protocol").NodeProtocol; get lifecycle(): NodeLifecycle; /** * Bring the node online. */ start(): Promise; protected startWithMutex(): Promise; /** * @deprecated use {@link start} */ bringOnline(): Promise; /** * Run the node in standalone mode. Returns when the node is closed. */ run(): Promise; /** * Take the node offline but leave state and structure intact. Happens automatically on close. * * Once the node is offline you may use {@link start} to bring the node online again. */ stop(): Promise; /** * @deprecated use {@link stop} */ cancel(): Promise; /** * All endpoints owned by the node. * * Normally you access endpoints via {@link parts} but you can use this property access endpoints directly by * {@link EndpointNumber}. */ get endpoints(): Endpoints; protected cancelWithMutex(): Promise; close(): Promise; protected closeWithMutex(): Promise; reset(): Promise; protected resetWithMutex(): Promise; /** * Create the network runtime. */ protected abstract createRuntime(): NetworkRuntime; /** * An {@link Interactable} that allows for execution of Matter interactions against this node. */ abstract interaction: Interactable; abstract readonly nodeType: "server" | "client" | "group"; protected abstract prepareRuntimeShutdown(): Promise; /** * Whether the node registers with the environment's runtime when it starts, so that shutting down the runtime * closes it. */ protected get isRuntimeWorker(): boolean; /** * Sections this node adds to its diagnostics, each a heading followed by its content. */ protected get diagnosticSections(): unknown[]; get [DiagnosticPresentation.name](): Diagnostic[]; protected createLifecycle(): NodeLifecycle; protected statusUpdate(message: string): void; [Construction.destruct](): Promise; } export declare namespace Node { interface NodeOptions extends Endpoint.EndpointOptions { environment?: Environment; } type Options = Endpoint.Options; type Configuration = Endpoint.Configuration; function nodeConfigFor(defaultType: T, configuration: undefined | T | Configuration, options: Options): Node.Configuration; function forEndpoint(endpoint: Endpoint): Node; /** * Common root endpoint definition for all nodes. */ const CommonRootEndpoint: MutableEndpoint.With, { readonly parts: typeof PartsBehavior; readonly index: typeof IndexBehavior; }, {}>; interface CommonRootEndpoint extends Identity { } } //# sourceMappingURL=Node.d.ts.map