/** Same path decentlan uses: `/daemon.pid`. */ export declare function identityLockPath(dataDir: string): string; /** The live pid holding this identity, or null when it is free. */ export declare function identityLockHolder(dataDir: string): number | null; export declare class IdentityLockedError extends Error { readonly holderPid: number; constructor(holderPid: number); } /** * Take the lock for this process. Throws {@link IdentityLockedError} when a * live holder exists — refusing to start is always better than starting a * second peer, because the damage from the latter shows up later, as * unexplained message loss, rather than here as a clear error. * * A stale file (holder gone) is taken over silently: that is a crash we already * survived, not a conflict. */ /** Where a holder publishes the port its local HTTP API is on. */ export declare function uiPortHintPath(dataDir: string): string; /** Called by the server once it knows which port it actually bound. */ export declare function setUiPortHint(port: number, dataDir?: string): void; export declare function acquireIdentityLock(dataDir: string): () => void;