export interface HostPortParts {
    host: string;
    port: number;
    isIpv6: boolean;
}
export interface ConnectionUriParts extends HostPortParts {
    useTls: boolean;
}
export interface ParsedConnectionUri extends ConnectionUriParts {
    password?: string;
}
export type RelayRole = "server" | "client";
export type RelayProtocolVersion = "1" | "2";
export declare const CURRENT_RELAY_PROTOCOL_VERSION: RelayProtocolVersion;
export declare const DEFAULT_RELAY_ENDPOINT = "relay.paseo.sh:443";
export declare function normalizeRelayProtocolVersion(value: unknown, fallback?: RelayProtocolVersion): RelayProtocolVersion;
export declare function parseHostPort(input: string): HostPortParts;
export declare function normalizeHostPort(input: string): string;
export declare function parseConnectionUri(input: string): ParsedConnectionUri;
export declare function serializeConnectionUri(parts: ConnectionUriParts): string;
export declare function serializeConnectionUriForStorage(parts: ParsedConnectionUri): string;
export declare function normalizeLoopbackToLocalhost(endpoint: string): string;
export declare function deriveLabelFromEndpoint(endpoint: string): string;
export interface WebSocketUrlOptions {
    useTls: boolean;
}
export declare function buildDaemonWebSocketUrl(endpoint: string, opts: WebSocketUrlOptions): string;
export declare function buildRelayWebSocketUrl(params: {
    endpoint: string;
    useTls: boolean;
    serverId: string;
    role: RelayRole;
    /**
     * Per-connection routing identifier used by the daemon to open server data sockets.
     * Clients should NOT provide this — the relay assigns a routing ID on connect.
     */
    connectionId?: string;
    version?: RelayProtocolVersion | 1 | 2;
}): string;
/**
 * @deprecated Migration fallback for stored relay connections/offers that predate
 * explicit relay useTls. Delete after two release cycles.
 */
export declare function shouldUseTlsForDefaultHostedRelay(endpoint: string): boolean;
export declare function extractHostPortFromWebSocketUrl(wsUrl: string): string;
export declare function isRelayClientWebSocketUrl(url: string): boolean;
//# sourceMappingURL=daemon-endpoints.d.ts.map