/**
 * Unified result from all IP intelligence layers
 */
export interface IIpIntelligenceResult {
    asn: number | null;
    asnOrg: string | null;
    registrantOrg: string | null;
    registrantCountry: string | null;
    networkRange: string | null;
    abuseContact: string | null;
    country: string | null;
    countryCode: string | null;
    city: string | null;
    latitude: number | null;
    longitude: number | null;
    accuracyRadius: number | null;
    timezone: string | null;
}
/**
 * Options for IpIntelligence
 */
export interface IIpIntelligenceOptions {
    /** Max age (ms) before triggering background MMDB refresh. Default: 7 days */
    dbMaxAge?: number;
    /** Timeout (ms) for RDAP/DNS/CDN requests. Default: 5000 */
    timeout?: number;
}
/**
 * IpIntelligence provides IP address intelligence by combining three data sources:
 * - RDAP (direct to RIRs) for registration/org data
 * - Team Cymru DNS for ASN
 * - MaxMind GeoLite2 (in-memory MMDB) for geolocation
 */
export declare class IpIntelligence {
    private readonly logger;
    private readonly dbMaxAge;
    private readonly timeout;
    private cityReader;
    private asnReader;
    private lastFetchTime;
    private refreshPromise;
    private bootstrapEntries;
    private bootstrapPromise;
    constructor(options?: IIpIntelligenceOptions);
    /**
     * Get comprehensive IP intelligence for the given IP address.
     * Runs RDAP, Team Cymru DNS, and MaxMind lookups in parallel.
     */
    getIntelligence(ip: string): Promise<IIpIntelligenceResult>;
    /**
     * Load and cache the IANA RDAP bootstrap file
     */
    private ensureBootstrap;
    /**
     * Find the RDAP base URL for a given IP via longest-prefix match
     */
    private matchRir;
    /**
     * Query RDAP for registration data
     */
    private queryRdap;
    /**
     * Extract the 'fn' (formatted name) from an entity's vcardArray
     */
    private extractVcardFn;
    /**
     * Extract email from an entity's vcardArray
     */
    private extractVcardEmail;
    /**
     * Extract country from an entity's vcardArray address field
     */
    private extractVcardCountry;
    /**
     * Query Team Cymru DNS for ASN information.
     * Query format: reversed.ip.origin.asn.cymru.com TXT
     * Response: "ASN | prefix | CC | rir | date"
     */
    private queryTeamCymru;
    /**
     * Ensure MMDB readers are initialized. Downloads on first call,
     * triggers background refresh if stale.
     */
    private ensureReaders;
    /**
     * Download MMDB files from CDN and create Reader instances
     */
    private downloadAndInitReaders;
    /**
     * Fetch a URL and return the response as a Buffer
     */
    private fetchBuffer;
    /**
     * Query MaxMind for geo + ASN data
     */
    private queryMaxMind;
    /**
     * Convert an IPv4 address string to a 32-bit unsigned number
     */
    private ipToNumber;
}
