import type { NapiNode } from '@vibecook/truffle'; export type AuthStatus = 'unknown' | 'required' | 'authenticated'; export interface UseAuthResult { /** Current auth status. */ status: AuthStatus; /** The Tailscale auth URL, if auth is required. */ authUrl: string | null; /** Whether auth is currently required. */ isAuthRequired: boolean; /** Whether the node is fully authenticated. */ isAuthenticated: boolean; } /** * React hook for tracking Tailscale auth state. * * Listens for `auth_required` peer events from the Node API. * Once peers start arriving, auth is considered complete. * * @example * ```tsx * const { isAuthRequired, authUrl } = useAuth(node); * * if (isAuthRequired && authUrl) { * return Authenticate with Tailscale; * } * ``` */ export declare function useAuth(node: NapiNode | null): UseAuthResult; //# sourceMappingURL=use-auth.d.ts.map