import type { FunLogger } from '../utils/funLogger'; /** ISO 3166-1 alpha-2 country + region code for the current user's IP. */ export interface FunkitUserIpInfo { alpha2: string; state: string; } export interface UseUserIpInfoParams { logger: FunLogger; /** * Funkit customer key, forwarded so the first-party endpoint can tag its logs. * Without it the Fun provider is skipped and only Moonpay → ipapi run. */ apiKey?: string; /** * Whether to run the lookup. Web gates on wallet login (`isUserLoggedIn`); * React Native is login-agnostic and passes `true`. Defaults to `true`. */ enabled?: boolean; /** * react-query `staleTime`. RN passes `Infinity` (session-stable, login- * agnostic). Web omits it to keep its prior default, so a logged-out → * network/VPN-change → login sequence re-resolves the country instead of * reusing a cached one. */ staleTime?: number; /** * Keep asking providers until one names a subdivision. RN's fiat rail needs * it — pricing is per-state licensing. Web reads only the country and omits * it, so the first answer wins and no second lookup is spent on a field with * no consumer. Defaults to `false`. */ requireState?: boolean; } export interface UseUserIpInfoResult { userIpInfo: FunkitUserIpInfo | undefined; isLoadingGeoCheck: boolean; } /** * Platform-agnostic resolver for the user's country (ISO alpha-2) + region from * their IP. Shared by `@funkit/connect` (web) and `@funkit/connect-rn`, which * each wrap it to inject their platform `logger`, `apiKey`, and `enabled` source * (web: `isUserLoggedIn`; RN: always on). * * The provider order is selected by the {@link GEO_PRIMARY_GATE} gate — see * {@link GeoProviderMode}. Moonpay and ipapi.co are plain `fetch` (no native * modules, Expo-Go-safe); the Fun endpoint goes through @funkit/api-base. * * The resolved country feeds country-conditional Statsig configs (see * `useDynamicConfig`) and the Swapped default-currency lookup — it is not only a * blocking signal. A recovered fallback logs at WARN; only exhausting every * provider is an ERROR, since that fails the user closed on a compliance gate. */ export declare function useUserIpInfo({ logger, apiKey, enabled, staleTime, requireState, }: UseUserIpInfoParams): UseUserIpInfoResult; //# sourceMappingURL=useUserIpInfo.d.ts.map