ip-devicer
    Preparing search index...

    Class IpManager

    Implements

    • DeviceManagerPlugin
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Enrich an IP address for a given deviceId. Saves a snapshot and returns the enrichment + risk delta.

      Free-tier callers are limited to FREE_TIER_MAX_DEVICES unique devices. When the cap is reached, snapshots for new device IDs are silently dropped and a console warning is emitted.

      Parameters

      • ip: string
      • deviceId: string

      Returns Promise<{ enrichment: IpEnrichment; riskDelta: number }>

    • Returns the full IP history for a deviceId.

      Parameters

      • deviceId: string
      • Optionallimit: number

      Returns Promise<IpSnapshot[]>

    • Explicitly initialise enrichers (opens mmdb files, fetches Tor list) and validates the Polar license key if one was supplied.

      Call this once at application startup before processing requests. Safe to await multiple times — subsequent calls return the cached promise.

      Returns Promise<void>

    • Registers this IpManager with a DeviceManager instance by wrapping its identify method. Any call to deviceManager.identify(data, { ip, headers, ... }) will automatically enrich the result with IP signals.

      Parameters

      • deviceManager: DeviceManagerLike

      Returns void | (() => void)