export declare function loadCliConfig(dataDir?: string): Promise<{ apiKey: string; port: number; }>; export declare function loadApiKey(): Promise; export declare function parsePeerAddress(peer: string): { address: string; port: number; }; export interface PeerLike { nodeId?: string; address?: string; port?: number; hostname?: string; status?: string; } /** * Pick the registry peer that best matches `query` — a hostname, full nodeId, * nodeId prefix (as printed by `loopsy peers`), or address. Case-insensitive. * Prefers an `online` peer and more specific matches (exact hostname/nodeId) * over a nodeId prefix. Returns undefined when nothing matches. */ export declare function selectPeer(peers: PeerLike[], query: string): PeerLike | undefined; /** * Resolve a `peer` argument to a routable address. A literal IPv4 (optionally * `:port`) is used as-is. Otherwise the arg is treated as a peer NAME * (hostname / nodeId / nodeId prefix) and resolved against the daemon's peer * registry — the same list `loopsy peers` shows — so `loopsy exec ` * works without it being DNS-resolvable. Falls back to the literal host (DNS) * when the daemon is unreachable or nothing matches. */ export declare function resolvePeerAddress(peer: string): Promise<{ address: string; port: number; }>; export declare function daemonRequest(path: string, opts?: RequestInit, dataDir?: string): Promise; //# sourceMappingURL=utils.d.ts.map