UNPKG

@lock-dev/geo-block

Version:

Geographic blocking module for lock.dev security framework

24 lines (23 loc) 624 B
import { GeoLookupProvider, GeoInfo, GeoBlockConfig } from '../types'; /** * MaxMind geo lookup provider */ export declare class MaxMindProvider implements GeoLookupProvider { private reader; private dbPath; private initialized; /** * Create a new MaxMind provider * @param config Configuration options */ constructor(config: GeoBlockConfig); /** * Initialize the MaxMind database reader */ init(): Promise<void>; /** * Look up geographic information for an IP address * @param ip IP address to look up */ lookup(ip: string): Promise<GeoInfo>; }