domainlooker
Version:
A fast CLI and MCP server for inspecting domains: WHOIS/RDAP, DNS, SSL, ports, subdomains, with CSV/JSON export.
29 lines • 1.39 kB
TypeScript
import { WhoisData } from '../types/index.js';
export interface WhoisLookupOptions {
/** Socket timeout (ms) for the legacy port-43 fallback. */
timeout?: number;
/** HTTP timeout (ms) for the RDAP request. */
rdapTimeout?: number;
}
/** RDAP that lacks these carries too little to prefer over a port-43 record. */
export declare function hasKeyRegistrationFields(whois: WhoisData): boolean;
/**
* Registration lookups. RDAP (HTTP/JSON) is tried first because it is fast and
* already structured; the legacy port-43 WHOIS protocol is used as a fallback
* for registries whose RDAP is missing, sparse, or redacted.
*/
export declare class WhoisService {
lookup(domain: string, options?: WhoisLookupOptions): Promise<WhoisData>;
private rdapLookup;
private legacyLookup;
}
/** Parse an RDAP domain object into our WhoisData shape. Defensive against partial/redacted records. */
export declare function parseRdapDomain(data: any): WhoisData;
/**
* Parse raw port-43 WHOIS text. Matches the field label against the KEY (the
* text before the first colon) rather than the whole line, so disclaimer prose
* like "NOTICE: The expiration date displayed ..." is not mistaken for a value,
* and "Registrar WHOIS Server:" is not mistaken for the registrar.
*/
export declare function parseWhoisText(data: string): WhoisData;
//# sourceMappingURL=whois.d.ts.map