/** * @file URL type-guard predicates — `isUrl` answers whether a value parses as a * valid URL via `parseUrl`. `isLoopbackHost` / `isPrivateHost` classify a * hostname for SSRF guards: a server that fetches an operator- or * issuer-supplied URL uses these to refuse hosts that resolve to the local * machine or an internal network such as cloud metadata, redis, or * link-local addresses. */ /** * Check whether a hostname is a loopback address — `localhost`, `127.0.0.1`, or * IPv6 `::1`. Compares case-insensitively; pass a bare hostname, not a URL. * * @example * ;```typescript * isLoopbackHost('localhost') // true * isLoopbackHost('127.0.0.1') // true * isLoopbackHost('example.com') // false * ``` */ export declare function isLoopbackHost(hostname: string): boolean; /** * Check whether a hostname resolves to a private / loopback / link-local * address an SSRF probe would target (the local machine, RFC 1918 ranges, IPv6 * loopback / ULA / link-local). Loopback hosts count as private. Compares * case-insensitively; pass a bare hostname, not a URL. * * @example * ;```typescript * isPrivateHost('127.0.0.1') // true * isPrivateHost('10.0.0.5') // true * isPrivateHost('169.254.169.254') // true * isPrivateHost('example.com') // false * ``` */ export declare function isPrivateHost(hostname: string): boolean; /** * Check if a value is a valid URL. * * @example * ;```typescript * isUrl('https://example.com') // true * isUrl('not a url') // false * isUrl(null) // false * ``` */ export declare function isUrl(value: string | URL | null | undefined): boolean;