/** * @license * Copyright 2025-2026 Open Home Foundation * SPDX-License-Identifier: Apache-2.0 */ /** * Server ID resolution for multi-fabric storage support. * * Handles determining the appropriate server ID for storage based on: * - Explicitly provided server ID * - Existing storage directories * - Fabric configuration matching * - Migration from legacy "server" naming to new format */ import { Environment } from "@matter/main"; import { ConfigStorage } from "../server/ConfigStorage.js"; /** Default server ID for backward compatibility */ export declare const DEFAULT_SERVER_ID = "server"; /** * Compute the server ID for a given fabric configuration. * Format: "server--" (lowercase) */ export declare function computeServerId(fabricId: number | bigint, vendorId: number): string; /** * Check if a storage directory exists. */ export declare function storageExists(storagePath: string | undefined, serverId: string): Promise; /** Options for resolving server ID */ export interface ResolveServerIdOptions { /** Explicitly provided server ID (overrides resolution) */ serverId?: string; } /** * Resolve the server ID to use based on options, legacy data, and existing storage. * * Resolution logic: * 1. If serverId is provided and not "server" -> use directly * 2. If serverId is "server" (default) and we have fabricId/vendorId: * a. Check if "server--" directory exists -> use it * b. Check if "server" directory exists: * - Open and verify fabric matches -> rename to new format * - If rename fails -> use "server" as fallback * - If no match -> use "server--" * c. New installation -> use "server--" */ export declare function resolveServerId(env: Environment, config: ConfigStorage, options: ResolveServerIdOptions, vendorId?: number, fabricId?: number | bigint): Promise; //# sourceMappingURL=ServerIdResolver.d.ts.map