device-passport 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +69 -2
  3. package/dist/adapters/index.cjs +19 -0
  4. package/dist/adapters/index.d.cts +156 -0
  5. package/dist/adapters/index.d.mts +156 -0
  6. package/dist/adapters/index.d.ts +156 -0
  7. package/dist/adapters/index.mjs +3 -0
  8. package/dist/evaluator/index.cjs +702 -0
  9. package/dist/evaluator/index.d.cts +204 -0
  10. package/dist/evaluator/index.d.mts +204 -0
  11. package/dist/evaluator/index.d.ts +204 -0
  12. package/dist/evaluator/index.mjs +680 -0
  13. package/dist/geo/index.cjs +50 -0
  14. package/dist/geo/index.d.cts +209 -0
  15. package/dist/geo/index.d.mts +209 -0
  16. package/dist/geo/index.d.ts +209 -0
  17. package/dist/geo/index.mjs +18 -0
  18. package/dist/index.cjs +113 -3543
  19. package/dist/index.d.cts +45 -903
  20. package/dist/index.d.mts +45 -903
  21. package/dist/index.d.ts +45 -903
  22. package/dist/index.mjs +11 -3438
  23. package/dist/shared/device-passport.BBf9OKap.mjs +1237 -0
  24. package/dist/shared/device-passport.BPd2-w8e.cjs +1265 -0
  25. package/dist/shared/device-passport.CLaBZWUV.cjs +1569 -0
  26. package/dist/shared/device-passport.C_F1vBE8.d.cts +79 -0
  27. package/dist/shared/device-passport.C_F1vBE8.d.mts +79 -0
  28. package/dist/shared/device-passport.C_F1vBE8.d.ts +79 -0
  29. package/dist/shared/device-passport.Cjxlv8xI.cjs +245 -0
  30. package/dist/shared/device-passport.CyQtcZeD.mjs +237 -0
  31. package/dist/shared/device-passport.NHw_f6HT.mjs +1535 -0
  32. package/dist/storage/index.cjs +10 -0
  33. package/dist/storage/index.d.cts +128 -0
  34. package/dist/storage/index.d.mts +128 -0
  35. package/dist/storage/index.d.ts +128 -0
  36. package/dist/storage/index.mjs +3 -0
  37. package/dist/types/index.cjs +2 -0
  38. package/dist/types/index.d.cts +215 -0
  39. package/dist/types/index.d.mts +215 -0
  40. package/dist/types/index.d.ts +215 -0
  41. package/dist/types/index.mjs +1 -0
  42. package/package.json +27 -2
package/dist/index.d.cts CHANGED
@@ -1,388 +1,13 @@
1
- /**
2
- * Geographic, Locale and Timezone definitions for Device Passport.
3
- */
4
- interface LanguageWeight {
5
- code: string;
6
- weight?: number;
7
- }
8
- interface LocaleProfile {
9
- /** Primary locale identifier, e.g. 'en-US', 'zh-CN', 'ja-JP' */
10
- language: string;
11
- /** Fallback languages ordered by preference, e.g. ['en-US', 'en'] */
12
- languages: string[];
13
- /** IANA Time Zone identifier, e.g. 'America/New_York', 'Asia/Shanghai' */
14
- timezone: string;
15
- /** Timezone offset in minutes relative to UTC (e.g. -240 for EDT, +480 for CST) */
16
- timezoneOffset: number;
17
- /** ISO 3166-1 alpha-2 country code, e.g. 'US', 'GB', 'CN', 'JP' */
18
- country: string;
19
- /** ISO 4217 currency code, e.g. 'USD', 'EUR', 'CNY', 'JPY' */
20
- currency?: string;
21
- /** Formatted Accept-Language header string e.g. 'en-US,en;q=0.9' */
22
- acceptLanguage?: string;
23
- }
24
- interface GeoCoordinates {
25
- latitude: number;
26
- longitude: number;
27
- accuracy?: number;
28
- }
29
- interface GeoLocation extends GeoCoordinates {
30
- country: string;
31
- countryCode?: string;
32
- region?: string;
33
- city?: string;
34
- timezone: string;
35
- locale: string;
36
- languages: string[];
37
- }
38
- interface CountryGeoDefinition {
39
- country: string;
40
- countryName: string;
41
- defaultLocale: string;
42
- supportedLocales: string[];
43
- defaultTimezone: string;
44
- timezones: string[];
45
- coordinates: GeoCoordinates;
46
- currency?: string;
47
- }
48
- interface GeoOptions {
49
- /** Explicit ISO country code, country name, or connection string */
50
- country?: string;
51
- /** Residential proxy URL or IP to detect geographic location from */
52
- proxyUrl?: string;
53
- ip?: string;
54
- /** Explicit IANA timezone override (e.g. 'America/Los_Angeles') */
55
- timezone?: string;
56
- /** Explicit primary locale override (e.g. 'en-US') */
57
- locale?: string;
58
- /** Explicit language array override (e.g. ['en-US', 'en']) */
59
- languages?: string[];
60
- /** Explicit Accept-Language weighted header string override */
61
- acceptLanguage?: string;
62
- /** Fallback country code if detection fails (defaults to 'US') */
63
- fallbackCountry?: string;
64
- /** Explicit geographical coordinates override */
65
- coordinates?: GeoCoordinates;
66
- }
67
- interface GeoContext {
68
- country: string;
69
- timezone: string;
70
- locale: string;
71
- language: string;
72
- acceptLanguage: string;
73
- languages: string[];
74
- timezoneOffset: number;
75
- currency?: string;
76
- coordinates?: GeoCoordinates;
77
- }
78
-
79
- /**
80
- * Metrics, Consistency Evaluation, and Benchmark types for Device Passport.
81
- */
82
- type ConsistencyCategory = 'os_ua_alignment' | 'client_hints_entropy' | 'hardware_plausibility' | 'geo_locale_coherence' | 'webgl_hardware_coupling' | 'screen_viewport_consistency';
83
- interface ConsistencyCheck {
84
- id: string;
85
- name: string;
86
- category: ConsistencyCategory;
87
- passed: boolean;
88
- score: number;
89
- weight: number;
90
- message: string;
91
- details?: Record<string, unknown>;
92
- }
93
- interface EntropyAnalysis {
94
- estimatedBits: number;
95
- collisionRisk: 'very_low' | 'low' | 'moderate' | 'high';
96
- fingerprintUniqueness?: number;
97
- }
98
- type EvaluationStatus = 'PASS' | 'WARN' | 'FAIL';
99
- type EvaluationGrade = 'A+' | 'A' | 'B' | 'C' | 'F';
100
- interface PassportEvaluation {
101
- /** Overall consistency score (0 - 100) */
102
- overallScore: number;
103
- /** Pass / Warn / Fail status based on strict thresholds */
104
- status: EvaluationStatus;
105
- /** Academic grade assessment */
106
- grade: EvaluationGrade;
107
- /** Individual check breakdowns */
108
- checks: ConsistencyCheck[];
109
- /** Entropy and collision analysis */
110
- entropyAnalysis?: EntropyAnalysis;
111
- /** ISO timestamp when evaluated */
112
- evaluatedAt: string;
113
- }
114
- interface BenchmarkMetrics {
115
- passportId: string;
116
- determinismScore: number;
117
- contradictionRate: number;
118
- overallConsistencyScore: number;
119
- generationLatencyMs: number;
120
- entropyBits: number;
121
- timestamp: string;
122
- }
123
-
124
- /**
125
- * Core type definitions for Device Passport.
126
- * Compliant with RFC 8942, W3C User-Agent Client Hints, and WebGL specs.
127
- */
128
-
129
- type SupportedBrowserName = 'Chrome' | 'Edge' | 'Safari' | 'Firefox';
130
- type SupportedPlatform = 'macOS' | 'Windows';
131
- type SupportedArchitecture = 'arm' | 'x86';
132
- interface BrowserProfile {
133
- name: SupportedBrowserName;
134
- version: string;
135
- majorVersion: number;
136
- userAgent: string;
137
- }
138
- interface OperatingSystemProfile {
139
- name: SupportedPlatform;
140
- platform: SupportedPlatform;
141
- version: string;
142
- release: string;
143
- architecture: SupportedArchitecture;
144
- }
145
- interface ScreenProfile {
146
- width: number;
147
- height: number;
148
- availWidth: number;
149
- availHeight: number;
150
- dpr: number;
151
- colorDepth: number;
152
- pixelDepth: number;
153
- }
154
- interface CpuProfile {
155
- architecture: SupportedArchitecture;
156
- concurrency: number;
157
- }
158
- interface MemoryProfile {
159
- deviceMemory: number;
160
- physicalMemoryGB?: number;
161
- }
162
- interface GpuProfile {
163
- vendor: string;
164
- renderer: string;
165
- webglVendor?: string;
166
- webglRenderer?: string;
167
- }
168
- interface HardwareProfile {
169
- screen: ScreenProfile;
170
- cpu: CpuProfile;
171
- memory: MemoryProfile;
172
- gpu: GpuProfile;
173
- }
174
- interface BrandVersion {
175
- brand: string;
176
- version: string;
177
- }
178
- /**
179
- * Raw RFC 8942 / RFC 8941 structured client hints headers.
180
- */
181
- interface ClientHintsHeaders {
182
- /** Low-entropy brand and major version, e.g. `"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"` */
183
- 'sec-ch-ua': string;
184
- /** Low-entropy mobile indicator, `"?0"` or `"?1"` */
185
- 'sec-ch-ua-mobile': string;
186
- /** Low-entropy platform, e.g. `"macOS"` or `"Windows"` */
187
- 'sec-ch-ua-platform': string;
188
- /** High-entropy OS version, e.g. `"14.6.1"` or `"15.0.0"` */
189
- 'sec-ch-ua-platform-version': string;
190
- /** High-entropy architecture, e.g. `"arm"` or `"x86"` */
191
- 'sec-ch-ua-arch': string;
192
- /** High-entropy bitness, e.g. `"64"` */
193
- 'sec-ch-ua-bitness': string;
194
- /** High-entropy device model, `""` for desktop */
195
- 'sec-ch-ua-model': string;
196
- /** High-entropy full version list, e.g. `"Chromium";v="124.0.6367.208", "Google Chrome";v="124.0.6367.208"` */
197
- 'sec-ch-ua-full-version-list': string;
198
- /** High-entropy 32-bit on 64-bit Windows flag, `"?0"` */
199
- 'sec-ch-ua-wow64'?: string;
200
- }
201
- /**
202
- * Structured User-Agent Client Hints object representing navigator.userAgentData.
203
- */
204
- interface UserAgentClientHints {
205
- brands: BrandVersion[];
206
- mobile: boolean;
207
- platform: string;
208
- platformVersion: string;
209
- architecture: string;
210
- bitness: string;
211
- model: string;
212
- fullVersionList: BrandVersion[];
213
- wow64?: boolean;
214
- /** Serialized RFC 8942 compliant headers */
215
- headers: ClientHintsHeaders;
216
- }
217
- interface DevicePassportContext {
218
- viewport: {
219
- width: number;
220
- height: number;
221
- };
222
- userAgent: string;
223
- locale: string;
224
- timezoneId: string;
225
- geolocation?: {
226
- latitude: number;
227
- longitude: number;
228
- accuracy?: number;
229
- };
230
- permissions?: string[];
231
- extraHTTPHeaders: Record<string, string>;
232
- deviceScaleFactor: number;
233
- hasTouch: boolean;
234
- isMobile: boolean;
235
- colorScheme?: 'light' | 'dark' | 'no-preference';
236
- }
237
- interface DevicePassport {
238
- /** Unique deterministic or UUID identifier */
239
- id: string;
240
- /** Seed used to generate this passport */
241
- seed: string;
242
- /** ISO 8601 creation timestamp */
243
- createdAt: string;
244
- /** Browser profile */
245
- browser: BrowserProfile;
246
- /** Operating system profile */
247
- os: OperatingSystemProfile;
248
- /** Hardware profile (screen, cpu, memory, gpu) */
249
- hardware: HardwareProfile;
250
- /** Locale, language, timezone */
251
- locale: LocaleProfile;
252
- /** All HTTP headers (User-Agent, Sec-CH-UA*, Accept*, etc.) */
253
- headers: Record<string, string>;
254
- /** High-entropy and low-entropy Client Hints */
255
- clientHints: UserAgentClientHints;
256
- /** Ready-to-use context options for Playwright / Puppeteer / Browser */
257
- context: DevicePassportContext;
258
- /** Consistency and anti-detection score evaluation */
259
- evaluation?: PassportEvaluation;
260
- /** Optional helper method to get merged headers */
261
- getHeaders?: (overrides?: Record<string, string>) => Record<string, string>;
262
- }
263
- /** Alias for backward compatibility */
264
- type DeviceProfile = DevicePassport;
265
- interface PassportGeneratorOptions {
266
- /** Deterministic seed (username, account ID, proxy IP, etc.) */
267
- seed?: string | number;
268
- /** Geographic country code ('US', 'JP', etc.) or residential proxy URL */
269
- geo?: string;
270
- /** Residential proxy URL to detect geographical location from */
271
- proxy?: string;
272
- proxyUrl?: string;
273
- /** Preferred Operating System */
274
- os?: SupportedPlatform;
275
- /** Preferred Browser */
276
- browser?: SupportedBrowserName;
277
- /** Preferred primary locale (e.g. 'en-US', 'zh-CN') */
278
- locale?: string;
279
- /** Preferred country code (e.g. 'US', 'GB', 'DE', 'JP') */
280
- country?: string;
281
- /** Preferred timezone (e.g. 'America/New_York') */
282
- timezone?: string;
283
- /** Whether to integrate with header-generator when available */
284
- useHeaderGenerator?: boolean;
285
- /** Hardware tier preference */
286
- hardwareTier?: 'standard' | 'high-performance';
287
- }
288
-
289
- interface PlaywrightContextOptions {
290
- userAgent: string;
291
- viewport: {
292
- width: number;
293
- height: number;
294
- };
295
- deviceScaleFactor: number;
296
- locale: string;
297
- timezoneId: string;
298
- geolocation?: {
299
- latitude: number;
300
- longitude: number;
301
- accuracy?: number;
302
- };
303
- permissions?: string[];
304
- extraHTTPHeaders: Record<string, string>;
305
- hasTouch: boolean;
306
- isMobile: boolean;
307
- colorScheme?: 'light' | 'dark' | 'no-preference';
308
- }
309
- /**
310
- * Builds Playwright BrowserContext options directly from a DevicePassport.
311
- * Ready for `browser.newContext(getPlaywrightContext(passport))`.
312
- */
313
- declare function getPlaywrightContext(passport: DevicePassport): PlaywrightContextOptions;
314
- /**
315
- * Generates an in-page stealth script to patch runtime JavaScript APIs
316
- * (navigator.webdriver, hardwareConcurrency, deviceMemory, WebGL unmasked vendor/renderer,
317
- * navigator.userAgentData Client Hints, and Screen dimensions).
318
- */
319
- declare function getStealthScript(passport: DevicePassport): string;
320
- /**
321
- * Applies stealth injections and extra headers to a Playwright BrowserContext.
322
- *
323
- * @param context Playwright BrowserContext instance
324
- * @param passport DevicePassport instance
325
- */
326
- declare function applyToPlaywrightContext(context: any, passport: DevicePassport): Promise<void>;
327
-
328
- interface PuppeteerEmulationOptions {
329
- launchArgs: string[];
330
- defaultViewport: {
331
- width: number;
332
- height: number;
333
- deviceScaleFactor: number;
334
- isMobile: boolean;
335
- hasTouch: boolean;
336
- };
337
- userAgent: string;
338
- locale: string;
339
- timezoneId: string;
340
- extraHTTPHeaders: Record<string, string>;
341
- }
342
- /**
343
- * Returns Puppeteer launch args and page emulation parameters matching the DevicePassport.
344
- */
345
- declare function getPuppeteerArgs(passport: DevicePassport): PuppeteerEmulationOptions;
346
- /**
347
- * Applies stealth injections, headers, viewport, and timezone emulation to a Puppeteer Page.
348
- *
349
- * @param page Puppeteer Page instance
350
- * @param passport DevicePassport instance
351
- */
352
- declare function applyToPuppeteerPage(page: any, passport: DevicePassport): Promise<void>;
353
-
354
- /**
355
- * StorageAdapter interface for DevicePassport persistence.
356
- * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
357
- */
358
- interface StorageAdapter<T = any> {
359
- /**
360
- * Retrieve an item by key.
361
- * Returns null if key does not exist.
362
- */
363
- get(key: string): Promise<T | null>;
364
- /**
365
- * Store an item with the given key.
366
- */
367
- set(key: string, value: T): Promise<void>;
368
- /**
369
- * Check if a key exists in storage.
370
- */
371
- has(key: string): Promise<boolean>;
372
- /**
373
- * Delete an item by key.
374
- * Returns true if item existed and was deleted, false otherwise.
375
- */
376
- delete(key: string): Promise<boolean>;
377
- /**
378
- * Return all keys currently stored.
379
- */
380
- keys(): Promise<string[]>;
381
- /**
382
- * Clear all items in this storage.
383
- */
384
- clear(): Promise<void>;
385
- }
1
+ import { PassportGeneratorOptions, DevicePassport, BrowserProfile, OperatingSystemProfile, HardwareProfile, UserAgentClientHints, DevicePassportContext, PassportEvaluation, SupportedPlatform, SupportedBrowserName, SupportedArchitecture, BrandVersion } from './types/index.cjs';
2
+ export { BenchmarkMetrics, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DeviceProfile, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, MemoryProfile, ScreenProfile } from './types/index.cjs';
3
+ import { PlaywrightContextOptions, PuppeteerEmulationOptions } from './adapters/index.cjs';
4
+ export { CANONICAL_HEADER_ORDER, CdpCommand, CdpPassportPlan, PassportLike, applyCdpPassport, applyToPlaywrightContext, applyToPuppeteerPage, formatCanonicalHeaders, getCdpPlan, getPlaywrightContext, getPuppeteerArgs, getStealthScript, toCurl, withPassport } from './adapters/index.cjs';
5
+ import { StorageAdapter } from './storage/index.cjs';
6
+ export { JSONFileStorage, JSONFileStorageOptions, MemoryStorage, MemoryStorageOptions } from './storage/index.cjs';
7
+ import { L as LocaleProfile } from './shared/device-passport.C_F1vBE8.cjs';
8
+ export { C as CountryGeoDefinition, G as GeoContext, a as GeoCoordinates, b as GeoLocation, c as GeoOptions, d as LanguageWeight } from './shared/device-passport.C_F1vBE8.cjs';
9
+ export { ALPHA3_TO_ALPHA2, COUNTRY_LOCALES, COUNTRY_NAME_TO_CODE, CountryLocaleConfig, DEFAULT_ACCEPT_LANGUAGE, DEFAULT_COUNTRY, DEFAULT_LOCALE, DEFAULT_TIMEZONE, GEO_LOCALES, GeoDetectOptions, TIMEZONE_MATRIX, TIMEZONE_TO_COUNTRY, alignGeoContext, detectCountry, detectGeoFromUrl, extractCountryFromProxyUrl, formatAcceptLanguage, getAllSupportedCountries, getCountryConfig, getCountryForTimezone, getDefaultTimezoneForCountry, getLocaleProfile, getTimezoneOffsetMinutes, getTimezonesForCountry, hasCountryConfig, isGeoAligned, isTimezoneAlignedWithCountry, isValidCountryCode, isValidTimezone, listAllTimezones, normalizeCountryCode, parseAcceptLanguage, toGeoLocation, toLocaleProfile } from './geo/index.cjs';
10
+ export { BASELINE_OPTIMAL_ENTROPY, BROWSER_BASELINE_FREQUENCIES, COUNTRY_PRIMARY_LANGUAGES, COUNTRY_TIMEZONE_MAP, CoherenceEvaluationResult, Contradiction, ContradictionCategory, ContradictionSeverity, EntropyAnalysisResult, HeaderEntropyProfile, MIN_STRUCTURAL_ENTROPY, MathematicalModelFormalism, OPTIMAL_CHAR_ENTROPY_MAX, OPTIMAL_CHAR_ENTROPY_MIN, OPTIMAL_ENTROPY_MAX, OPTIMAL_ENTROPY_MIN, SubspaceEvaluation, analyzeHeaderEntropy, calculateKLDivergence, calculateShannonEntropy, calculateStructuralEntropy, detectAllContradictions, detectClientHintsContradictions, detectGeoChronoContradictions, detectHardwareContradictions, detectOSBrowserContradictions, evaluateCoherence, evaluateGeoAlignment, evaluatePassport } from './evaluator/index.cjs';
386
11
 
387
12
  /**
388
13
  * DevicePassportInstance encapsulates a single concrete, zero-contradiction digital identity persona.
@@ -707,533 +332,50 @@ declare function generatePassport(options?: PassportGeneratorOptions): DevicePas
707
332
  declare const generateDevicePassport: typeof generatePassport;
708
333
 
709
334
  /**
710
- * Comprehensive Geographic-Locale Mapping Database.
711
- * Zero-dependency, pure TypeScript.
712
- */
713
-
714
- interface CountryLocaleConfig {
715
- /** ISO 3166-1 alpha-2 uppercase country code */
716
- country: string;
717
- /** Full English country name */
718
- countryName: string;
719
- /** Primary locale identifier, e.g. 'en-US', 'ja-JP' */
720
- primaryLocale: string;
721
- /** Primary and fallback languages ordered by preference */
722
- languages: string[];
723
- /** Strictly formatted RFC 9110 Accept-Language weighted header string */
724
- acceptLanguage: string;
725
- /** Supported IANA timezones within this country */
726
- timezones: string[];
727
- /** Default primary IANA timezone */
728
- defaultTimezone: string;
729
- /** ISO 4217 currency code */
730
- currency: string;
731
- /** Representative geographical center/capital coordinates */
732
- coordinates: GeoCoordinates;
733
- }
734
- /**
735
- * Global fallback defaults
736
- */
737
- declare const DEFAULT_COUNTRY = "US";
738
- declare const DEFAULT_LOCALE = "en-US";
739
- declare const DEFAULT_TIMEZONE = "America/New_York";
740
- declare const DEFAULT_ACCEPT_LANGUAGE = "en-US,en;q=0.9";
741
- /**
742
- * Comprehensive Country Locale & Geographic Database.
743
- */
744
- declare const COUNTRY_LOCALES: Record<string, CountryLocaleConfig>;
745
- /**
746
- * Get country locale configuration with fallback.
747
- */
748
- declare function getCountryConfig(countryCode?: string | null): CountryLocaleConfig;
749
- /**
750
- * Check if a country code is supported in the database.
751
- */
752
- declare function hasCountryConfig(countryCode?: string | null): boolean;
753
- /**
754
- * Get all supported ISO country codes.
755
- */
756
- declare function getAllSupportedCountries(): string[];
757
- /**
758
- * Strictly format an Accept-Language weighted header string from an array of languages.
759
- * Example: ['en-US', 'en'] -> 'en-US,en;q=0.9'
760
- * Example: ['de-DE', 'de', 'en-US', 'en'] -> 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7'
761
- */
762
- declare function formatAcceptLanguage(languages: string[]): string;
763
- /**
764
- * Parse an Accept-Language header string into an array of { locale, q } items ordered by weight descending.
765
- */
766
- declare function parseAcceptLanguage(header: string): Array<{
767
- locale: string;
768
- q: number;
769
- }>;
770
-
771
- /**
772
- * Timezone Matrix and Chrono-Alignment Engine.
773
- * Pure TypeScript, zero external dependencies.
774
- */
775
- /**
776
- * Direct mapping from IANA Timezone ID to ISO 3166-1 alpha-2 country code.
777
- */
778
- declare const TIMEZONE_TO_COUNTRY: Record<string, string>;
779
- /**
780
- * Validate if a timezone string is a valid IANA timezone identifier.
781
- */
782
- declare function isValidTimezone(timezone: string): boolean;
783
- /**
784
- * Get all supported timezones for a specific country code.
785
- */
786
- declare function getTimezonesForCountry(countryCode: string): string[];
787
- /**
788
- * Look up the ISO country code associated with an IANA timezone identifier.
789
- */
790
- declare function getCountryForTimezone(timezone: string): string | undefined;
791
- /**
792
- * Get the primary/default timezone for a country code.
793
- */
794
- declare function getDefaultTimezoneForCountry(countryCode: string): string;
795
- /**
796
- * Check if a timezone is chronologically aligned with a given country.
797
- */
798
- declare function isTimezoneAlignedWithCountry(timezone: string, countryCode: string): boolean;
799
- /**
800
- * Calculate timezone offset in minutes relative to UTC.
801
- * Note: Following the standard convention matching LocaleProfile.timezoneOffset:
802
- * - Negative for zones west of UTC (e.g. -240 for EDT, -300 for EST)
803
- * - Positive for zones east of UTC (e.g. +480 for CST / Asia/Shanghai, +540 for JST)
804
- * - 0 for UTC
805
- */
806
- declare function getTimezoneOffsetMinutes(timezone: string, date?: Date): number;
807
- /**
808
- * List all unique timezones known to the system.
809
- */
810
- declare function listAllTimezones(): string[];
811
-
812
- /**
813
- * Proxy and Geo-Context Detector.
814
- * Extracts country and geo information from residential proxy URLs, IP hints, or explicit ISO codes.
815
- * Pure TypeScript, zero external dependencies.
816
- */
817
- interface GeoDetectOptions {
818
- /** Country code to fall back to if detection fails. Defaults to 'US'. */
819
- fallbackCountry?: string;
820
- }
821
- /**
822
- * ISO 3166-1 alpha-3 to alpha-2 code mapping.
823
- */
824
- declare const ALPHA3_TO_ALPHA2: Record<string, string>;
825
- /**
826
- * Common English country name aliases to ISO 3166-1 alpha-2 code.
827
- */
828
- declare const COUNTRY_NAME_TO_CODE: Record<string, string>;
829
- /**
830
- * Normalize any country input (2-letter, 3-letter, alias, name) to an ISO 3166-1 alpha-2 uppercase code.
831
- */
832
- declare function normalizeCountryCode(code?: string | null): string | null;
833
- /**
834
- * Extract an ISO country code from a residential proxy URL or connection string.
835
- * Supports:
836
- * - Username authentication tokens (e.g. user-country-us, customer-zone-cc-DE, lum-customer-*-country-fr)
837
- * - Query parameters (e.g. ?country=JP, &country_code=KR, ?cc=SG, &geo=DE)
838
- * - Subdomain patterns (e.g. us.smartproxy.com, jp.proxy-seller.com)
839
- */
840
- declare function extractCountryFromProxyUrl(url: string): string | null;
841
- /**
842
- * Universal country detector.
843
- * Accepts:
844
- * - Explicit ISO 3166-1 alpha-2 / alpha-3 codes ('US', 'GB', 'jp', 'JPN')
845
- * - Country names ('Japan', 'United States', 'Germany')
846
- * - Residential proxy URLs (http://user-country-us:pass@proxy...)
847
- * - IANA Timezone strings ('America/New_York' -> 'US', 'Asia/Tokyo' -> 'JP')
848
- * - Falls back to DEFAULT_COUNTRY ('US') when unknown.
849
- */
850
- declare function detectCountry(input?: string | null, options?: GeoDetectOptions): string;
851
-
852
- /**
853
- * Geo-Chrono Aligner.
854
- * Aligns browser persona parameters (country, timezone, locale, accept-language header)
855
- * with zero contradictions for stealth crawlers and automation.
856
- * Pure TypeScript, zero external dependencies.
857
- */
858
-
859
- /**
860
- * Align geographic and chronological parameters into a cohesive, contradiction-free GeoContext.
861
- *
862
- * @param geoInput Proxy URL, ISO country code, IANA timezone string, or GeoOptions object
863
- * @returns Fully correlated GeoContext
864
- */
865
- declare function alignGeoContext(geoInput?: string | GeoOptions): GeoContext;
866
- /**
867
- * Verify whether a partial or full GeoContext is free of geographic or chronological contradictions.
868
- */
869
- declare function isGeoAligned(context: Partial<GeoContext>): boolean;
870
- /**
871
- * Format GeoContext into a LocaleProfile for runtime device-passport consumers.
872
- */
873
- declare function toLocaleProfile(geo: GeoContext): {
874
- language: string;
875
- languages: string[];
876
- timezone: string;
877
- timezoneOffset: number;
878
- country: string;
879
- currency: string | undefined;
880
- };
881
- /**
882
- * Format GeoContext into a GeoLocation object for browser geolocation emulation.
883
- */
884
- declare function toGeoLocation(geo: GeoContext): {
885
- latitude: number;
886
- longitude: number;
887
- accuracy: number;
888
- country: string;
889
- countryCode: string;
890
- timezone: string;
891
- locale: string;
892
- languages: string[];
893
- };
894
-
895
- /**
896
- * Geo and Chrono Aligner module for Device Passport.
897
- * Provides geographic-locale mapping database, proxy/IP geo detector,
898
- * and zero-contradiction geo-chrono alignment.
899
- */
900
-
901
- declare const GEO_LOCALES: Record<string, CountryLocaleConfig>;
902
- declare const TIMEZONE_MATRIX: Record<string, string>;
903
- declare const isValidCountryCode: typeof hasCountryConfig;
904
- /**
905
- * Detect country code from residential proxy URL.
906
- */
907
- declare function detectGeoFromUrl(url: string): string | null;
908
- /**
909
- * Get a complete LocaleProfile for a country code and optional timezone.
910
- */
911
- declare function getLocaleProfile(countryCode?: string | null, timezone?: string): LocaleProfile;
912
-
913
- /**
914
- * Standard Chromium browser header ordering.
915
- * Anti-bot systems (Cloudflare, Akamai, DataDome, Kasada) strictly inspect
916
- * the sequence of HTTP request headers. A mismatch in header order triggers
917
- * immediate bot heuristics.
918
- */
919
- declare const CANONICAL_HEADER_ORDER: readonly string[];
920
- /**
921
- * Sorts and formats HTTP headers according to canonical browser ordering.
922
- * Merges base headers with optional overrides.
923
- */
924
- declare function formatCanonicalHeaders(baseHeaders: Record<string, string>, overrides?: Record<string, string>): Record<string, string>;
925
- interface PassportLike {
926
- headers: Record<string, string>;
927
- getHeaders?: (overrides?: Record<string, string>) => Record<string, string>;
928
- }
929
- /**
930
- * Higher-order fetch function wrapping standard fetch with canonical DevicePassport headers.
931
- * Ensures consistent TLS/HTTP persona across API calls, scraping requests, and webhooks.
932
- *
933
- * @param passport DevicePassport instance or object
934
- * @param customFetch Optional fetch implementation (e.g. node-fetch, undici, or global fetch)
935
- */
936
- declare function withPassport(passport: PassportLike | DevicePassport, customFetch?: typeof fetch): typeof fetch;
937
- /**
938
- * Generates an executable cURL command with correct browser headers.
939
- */
940
- declare function toCurl(passport: PassportLike | DevicePassport, url: string, options?: {
941
- method?: string;
942
- data?: any;
943
- headers?: Record<string, string>;
944
- }): string;
945
-
946
- interface MemoryStorageOptions {
947
- /**
948
- * Whether to deep-clone stored and retrieved objects to prevent external mutations.
949
- * Defaults to true.
950
- */
951
- clone?: boolean;
952
- }
953
- /**
954
- * In-memory storage adapter.
955
- * Useful for ephemeral scraping runs, tests, and caching.
956
- */
957
- declare class MemoryStorage<T = any> implements StorageAdapter<T> {
958
- private readonly store;
959
- private readonly clone;
960
- constructor(options?: MemoryStorageOptions);
961
- private deepClone;
962
- get(key: string): Promise<T | null>;
963
- getSync(key: string): T | null;
964
- set(key: string, value: T): Promise<void>;
965
- setSync(key: string, value: T): void;
966
- has(key: string): Promise<boolean>;
967
- hasSync(key: string): boolean;
968
- delete(key: string): Promise<boolean>;
969
- deleteSync(key: string): boolean;
970
- keys(): Promise<string[]>;
971
- keysSync(): string[];
972
- clear(): Promise<void>;
973
- clearSync(): void;
974
- get size(): number;
975
- }
976
-
977
- interface JSONFileStorageOptions {
978
- /**
979
- * Path to the JSON file on disk.
980
- */
981
- filePath: string;
982
- /**
983
- * Format JSON with indentation for readability.
984
- * Defaults to true.
985
- */
986
- pretty?: boolean;
987
- /**
988
- * Auto-save to disk immediately when values change.
989
- * Defaults to true.
990
- */
991
- autoSave?: boolean;
992
- }
993
- /**
994
- * File-backed JSON storage adapter.
995
- * Uses atomic writes via temp-file + renameSync to ensure zero corruption
996
- * even if the process is killed mid-write. Automatically creates directories.
997
- */
998
- declare class JSONFileStorage<T = any> implements StorageAdapter<T> {
999
- readonly filePath: string;
1000
- private readonly pretty;
1001
- private readonly autoSave;
1002
- private readonly cache;
1003
- private isLoaded;
1004
- private writeQueue;
1005
- constructor(filePathOrOptions: string | JSONFileStorageOptions);
1006
- /**
1007
- * Ensure data is loaded from disk into the in-memory cache.
1008
- */
1009
- private ensureLoaded;
1010
- /**
1011
- * Atomic flush to disk. Writes to a unique temp file in the same directory,
1012
- * then atomically renames it to target file.
1013
- */
1014
- private flushAtomic;
1015
- /**
1016
- * Queue a disk write to prevent race conditions during rapid concurrent mutations.
1017
- */
1018
- private queueSave;
1019
- get(key: string): Promise<T | null>;
1020
- getSync(key: string): T | null;
1021
- set(key: string, value: T): Promise<void>;
1022
- setSync(key: string, value: T): void;
1023
- has(key: string): Promise<boolean>;
1024
- hasSync(key: string): boolean;
1025
- delete(key: string): Promise<boolean>;
1026
- deleteSync(key: string): boolean;
1027
- keys(): Promise<string[]>;
1028
- keysSync(): string[];
1029
- clear(): Promise<void>;
1030
- clearSync(): void;
1031
- /**
1032
- * Explicitly force a flush to disk (useful if autoSave is set to false).
1033
- */
1034
- flush(): Promise<void>;
1035
- flushSync(): void;
1036
- get size(): number;
1037
- }
1038
-
1039
- /**
1040
- * Contradiction Detection Engine for Device Passport.
1041
- *
1042
- * Evaluates cross-layer integrity across the 4-tuple formal model:
1043
- * P = ⟨H, S, G, C⟩ (Hardware, System, Geo, Client-Hints).
1044
- *
1045
- * Implements deterministic anomaly and anti-fingerprinting rules based on
1046
- * empirical browser telemetry, W3C Client Hints RFCs, and anti-bot heuristic vectors.
1047
- */
1048
-
1049
- type ContradictionSeverity = 'fatal' | 'high' | 'medium' | 'low';
1050
- type ContradictionCategory = 'hardware_system' | 'os_browser' | 'geo_chrono' | 'client_hints' | 'entropy';
1051
- interface Contradiction {
1052
- id: string;
1053
- category: ContradictionCategory;
1054
- severity: ContradictionSeverity;
1055
- description: string;
1056
- fields: string[];
1057
- actual: unknown;
1058
- expected: unknown;
1059
- impactPenalty: number;
1060
- }
1061
- declare const COUNTRY_TIMEZONE_MAP: Record<string, string[]>;
1062
- declare const COUNTRY_PRIMARY_LANGUAGES: Record<string, string[]>;
1063
- /**
1064
- * Detect OS vs Browser compatibility contradictions.
1065
- */
1066
- declare function detectOSBrowserContradictions(passport: DevicePassport): Contradiction[];
1067
- /**
1068
- * Detect Hardware vs System cross-layer contradictions.
1069
- */
1070
- declare function detectHardwareContradictions(passport: DevicePassport): Contradiction[];
1071
- /**
1072
- * Detect Geographic, Locale, and Chronological (Geo-Chrono) Contradictions.
1073
- */
1074
- declare function detectGeoChronoContradictions(passport: DevicePassport): Contradiction[];
1075
- /**
1076
- * Detect W3C Client Hints Internal Consistency Contradictions.
1077
- */
1078
- declare function detectClientHintsContradictions(passport: DevicePassport): Contradiction[];
1079
- /**
1080
- * Master contradiction detection runner across all 4 sub-spaces:
1081
- * P = ⟨H, S, G, C⟩.
1082
- */
1083
- declare function detectAllContradictions(passport: DevicePassport): Contradiction[];
1084
-
1085
- /**
1086
- * Shannon Entropy Analyzer for Device Passport HTTP Headers.
1087
- *
1088
- * Grounded in Information Theory (Shannon, 1948: "A Mathematical Theory of Communication"):
1089
- * H(X) = - \sum_{i=1}^{n} P(x_i) \log_2 P(x_i)
1090
- *
1091
- * Evaluates generated header distributions against empirical modern browser baselines
1092
- * to detect:
1093
- * 1. Under-parameterized / Low-entropy signatures (naive scrapers, curl, missing sec-ch headers)
1094
- * 2. Over-parameterized / High-entropy anomalies (random noise injection, spoofing artifacts)
1095
- * 3. Relative Entropy (Kullback-Leibler Divergence) against empirical Chrome/Edge/Safari profiles
1096
- */
1097
- interface HeaderEntropyProfile {
1098
- characterEntropy: number;
1099
- structuralEntropy: number;
1100
- klDivergence: number;
1101
- totalHeaderBytes: number;
1102
- headerCount: number;
1103
- }
1104
- interface EntropyAnalysisResult {
1105
- entropyScore: number;
1106
- estimatedBits: number;
1107
- klDivergence: number;
1108
- anomaly: 'too_low' | 'too_high' | 'optimal';
1109
- collisionRisk: 'very_low' | 'low' | 'moderate' | 'high';
1110
- verdict: string;
1111
- details: {
1112
- characterEntropy: number;
1113
- structuralEntropy: number;
1114
- baselineEntropy: number;
1115
- deltaFromOptimal: number;
1116
- };
1117
- }
1118
- /**
1119
- * Empirical baseline frequency distribution of headers in real modern desktop browsers (Chromium 120+).
1120
- * Baseline average entropy is calibrated at 4.45 bits/char.
1121
- */
1122
- declare const BROWSER_BASELINE_FREQUENCIES: Record<string, number>;
1123
- declare const OPTIMAL_CHAR_ENTROPY_MIN = 4.6;
1124
- declare const OPTIMAL_CHAR_ENTROPY_MAX = 5.6;
1125
- declare const OPTIMAL_ENTROPY_MIN = 4.6;
1126
- declare const OPTIMAL_ENTROPY_MAX = 5.6;
1127
- declare const BASELINE_OPTIMAL_ENTROPY = 5.25;
1128
- declare const MIN_STRUCTURAL_ENTROPY = 3.5;
1129
- /**
1130
- * Calculates fundamental Shannon Information Entropy (in bits) of any string input.
1131
- * H(X) = -\sum_{i=1}^n P(x_i) \log_2 P(x_i)
1132
- */
1133
- declare function calculateShannonEntropy(data: string): number;
1134
- /**
1135
- * Calculates structural header presence entropy across expected browser header space.
1136
- */
1137
- declare function calculateStructuralEntropy(headers: Record<string, string>): number;
1138
- /**
1139
- * Calculates Kullback-Leibler (KL) Divergence:
1140
- * D_KL(P || Q) = \sum P(x) * log2(P(x) / Q(x))
1141
- * Measures informational distance between current header distribution and natural browser baseline.
1142
- */
1143
- declare function calculateKLDivergence(headers: Record<string, string>): number;
1144
- /**
1145
- * Analyzes the entropy of an HTTP header dictionary.
1146
- * Evaluates whether entropy is in the realistic "sweet spot" of real browser traffic.
1147
- */
1148
- declare function analyzeHeaderEntropy(headers: Record<string, string>): EntropyAnalysisResult;
1149
-
1150
- /**
1151
- * Academic Coherence Evaluator for Device Passport.
335
+ * Pixel-Level Protection — canvas / WebGL noise that survives read-back.
1152
336
  *
1153
- * Implements the Formal Mathematical Model:
1154
- * P = ⟨H, S, G, C⟩
337
+ * 🔴 Why this module exists (real gap found 2026-11-04):
338
+ * `getStealthScript()` only rewrites **API return values**. `canvas.toDataURL()` and
339
+ * `gl.readPixels()` still hand back the **real** framebuffer, so a headless Chromium
340
+ * exposes `ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device ...))` while its UA claims
341
+ * a discrete NVIDIA card. Worse, every persona rendered on the same machine produces a
342
+ * **byte-identical** canvas hash — a fleet of accounts with different identities but one
343
+ * identical pixel fingerprint is trivially clustered.
1155
344
  *
1156
- * Where:
1157
- * - H ∈ Ω_H: Hardware Sub-space ⟨Screen, CPU, Memory, GPU⟩
1158
- * - S ∈ Ω_S: System Sub-space ⟨OS, Browser, UserAgent⟩
1159
- * - G ∈ Ω_G: Geo-Chrono Sub-space ⟨Country, Timezone, Locale, Languages, Coordinates⟩
1160
- * - C ∈ Ω_C: Client-Hints Sub-space ⟨Sec-CH-UA*, Low & High Entropy Hints⟩
345
+ * ⚠️ Determinism is the whole point:
346
+ * The noise MUST be derived from the passport seed, never from `Math.random()`.
347
+ * The same account has to read back identical pixels on every visit, otherwise a
348
+ * changing canvas hash is itself an automation signal (and breaks "sticky hardware").
1161
349
  *
1162
- * The coherence evaluation function Φ(P) maps P into [0, 100%], quantifying
1163
- * cross-subspace plausibility and absence of anti-bot contradiction signatures.
350
+ * The noise is a **seeded permutation of a few discrete levels**, not random dithering:
351
+ * real devices quantize canvas output; a smooth ±1 RGB jitter on every pixel is its own
352
+ * fingerprint because no GPU produces it.
1164
353
  */
1165
-
1166
- interface SubspaceEvaluation {
1167
- valid: boolean;
1168
- score: number;
1169
- notes: string[];
1170
- }
1171
- interface MathematicalModelFormalism {
1172
- formalism: string;
1173
- definition: {
1174
- H: string;
1175
- S: string;
1176
- G: string;
1177
- C: string;
1178
- };
1179
- subspaces: {
1180
- H: SubspaceEvaluation;
1181
- S: SubspaceEvaluation;
1182
- G: SubspaceEvaluation;
1183
- C: SubspaceEvaluation;
1184
- };
1185
- }
1186
- interface CoherenceEvaluationResult {
1187
- /** Overall cross-layer coherence score (0 - 100%) */
1188
- coherenceScore: number;
1189
- /** Specific geo-temporal-linguistic alignment score (0 - 100%) */
1190
- geoAlignmentScore: number;
1191
- /** Shannon entropy realistic score (0 - 100%) */
1192
- entropyScore: number;
1193
- /** List of detected contradictions and anomalies */
1194
- contradictions: Contradiction[];
1195
- /** Mathematical formalization of the evaluation state */
1196
- mathematicalModel: MathematicalModelFormalism;
1197
- /** Entropy analysis breakdown */
1198
- entropyAnalysis: EntropyAnalysisResult;
1199
- /** Evaluation summary and grade */
1200
- summary: {
1201
- passed: boolean;
1202
- fatalCount: number;
1203
- warningCount: number;
1204
- grade: 'A+' | 'A' | 'B' | 'C' | 'F';
1205
- verdict: string;
1206
- };
354
+ /** Canvas read-back surface exposed to the page. */
355
+ interface CanvasNoiseConfig {
356
+ /** Deterministic seed; identical seeds must produce identical pixels. */
357
+ seed: string;
358
+ /** Maximum per-channel deviation applied to read-back pixels. */
359
+ amplitude?: number;
360
+ /** Noise applied to 2D canvas read-back. */
361
+ enabled2d?: boolean;
362
+ /** Noise applied to WebGL read-back. */
363
+ enabledWebgl?: boolean;
1207
364
  }
1208
365
  /**
1209
- * Calculates Geo-Alignment score between Geographic Country, Timezone, and Accept-Language.
1210
- */
1211
- declare function evaluateGeoAlignment(passport: DevicePassport): number;
1212
- /**
1213
- * Evaluates the complete internal consistency and coherence of a Device Passport.
366
+ * Produces the JavaScript source that patches canvas and WebGL read-back.
1214
367
  *
1215
- * Implements:
1216
- * Φ: Ω_H × Ω_S × Ω_G × Ω_C → [0, 100%]
368
+ * The patch is intentionally dependency-free and IIFE-scoped so it can be injected through
369
+ * Playwright `addInitScript`, Puppeteer `evaluateOnNewDocument`, or a raw CDP
370
+ * `Page.addScriptToEvaluateOnNewDocument` call.
1217
371
  */
1218
- declare function evaluateCoherence(passport: DevicePassport): CoherenceEvaluationResult;
1219
-
372
+ declare function getPixelProtectionScript(config: CanvasNoiseConfig): string;
1220
373
  /**
1221
- * Academic Evaluation Engine for Device Passport.
374
+ * Builds the noise configuration for a passport.
1222
375
  *
1223
- * Implements verification algorithms for the formal model:
1224
- * P = ⟨H, S, G, C⟩
1225
- *
1226
- * Evaluates:
1227
- * 1. Internal Coherence Score (0 - 100%)
1228
- * 2. Geo-Chrono-Linguistic Alignment Score (0 - 100%)
1229
- * 3. Shannon Entropy Analyzer for HTTP Header Distributions
1230
- * 4. Cross-layer Contradiction and Detection Anomaly Detection
1231
- */
1232
-
1233
- /**
1234
- * High-level evaluation entry point for any DevicePassport instance.
376
+ * The seed is the passport seed, so a persona keeps identical pixels across sessions.
1235
377
  */
1236
- declare function evaluatePassport(passport: DevicePassport): CoherenceEvaluationResult;
378
+ declare function getPixelProtectionConfig(seed: string, overrides?: Partial<Omit<CanvasNoiseConfig, 'seed'>>): CanvasNoiseConfig;
1237
379
 
1238
380
  /**
1239
381
  * Academic Comparative Benchmark Matrix for Anti-Detection and Device Personas.
@@ -1330,5 +472,5 @@ declare function formatComparativeMatrixJSON(): string;
1330
472
  */
1331
473
  declare const VERSION = "1.0.0";
1332
474
 
1333
- export { ALL_PRESETS, ALPHA3_TO_ALPHA2, BASELINE_OPTIMAL_ENTROPY, BENCHMARK_METRICS_METADATA, BROWSER_BASELINE_FREQUENCIES, CANONICAL_HEADER_ORDER, CHROME_VERSIONS, COMPARATIVE_DATASET, COUNTRY_LOCALES, COUNTRY_NAME_TO_CODE, COUNTRY_PRIMARY_LANGUAGES, COUNTRY_TIMEZONE_MAP, DEFAULT_ACCEPT_LANGUAGE, DEFAULT_COUNTRY, DEFAULT_LOCALE, DEFAULT_TIMEZONE, DevicePassportInstance, EDGE_VERSIONS, GEO_LOCALES, JSONFileStorage, MACOS_PRESETS, MIN_STRUCTURAL_ENTROPY, MemoryStorage, OPTIMAL_CHAR_ENTROPY_MAX, OPTIMAL_CHAR_ENTROPY_MIN, OPTIMAL_ENTROPY_MAX, OPTIMAL_ENTROPY_MIN, PassportManager, TIMEZONE_MATRIX, TIMEZONE_TO_COUNTRY, VERSION, WINDOWS_PRESETS, alignGeoContext, analyzeHeaderEntropy, applyToPlaywrightContext, applyToPuppeteerPage, buildUserAgent, calculateKLDivergence, calculateShannonEntropy, calculateStructuralEntropy, createDeterministicPRNG, createMulberry32, createPassport, detectAllContradictions, detectClientHintsContradictions, detectCountry, detectGeoChronoContradictions, detectGeoFromUrl, detectHardwareContradictions, detectOSBrowserContradictions, evaluateCoherence, evaluateGeoAlignment, evaluatePassport, extractCountryFromProxyUrl, fnv1a, formatAcceptLanguage, formatCanonicalHeaders, formatComparativeMatrixJSON, formatComparativeMatrixLaTeX, formatComparativeMatrixMarkdown, formatStructuredBrandList, generateBrandVersions, generateDevicePassport, generatePassport, generateUserAgentClientHints, getAllSupportedCountries, getApifyHeadersIfAvailable, getCountryConfig, getCountryForTimezone, getDefaultTimezoneForCountry, getHardwarePresets, getLocaleProfile, getPlaywrightContext, getPuppeteerArgs, getStaticFallbackHeaders, getStealthScript, getTimezoneOffsetMinutes, getTimezonesForCountry, hasCountryConfig, isGeoAligned, isTimezoneAlignedWithCountry, isValidCountryCode, isValidTimezone, listAllTimezones, murmur3, normalizeCountryCode, parseAcceptLanguage, parseStructuredBrandList, runComparativeBenchmark, toCurl, toGeoLocation, toLocaleProfile, validateHardwareContradictions, withPassport };
1334
- export type { BenchmarkMetrics, BenchmarkReportSummary, BrandVersion, BrowserProfile, ClientHintsGenerateOptions, ClientHintsHeaders, CoherenceEvaluationResult, ConsistencyCategory, ConsistencyCheck, Contradiction, ContradictionCategory, ContradictionSeverity, CountryGeoDefinition, CountryLocaleConfig, CpuProfile, CreatePassportInputOptions, DeviceMatrixPreset, DevicePassport, DevicePassportContext, DeviceProfile, EntropyAnalysis, EntropyAnalysisResult, EvaluationGrade, EvaluationStatus, GeoContext, GeoCoordinates, GeoDetectOptions, GeoLocation, GeoOptions, GpuProfile, HardwareProfile, HeaderEntropyProfile, JSONFileStorageOptions, LanguageWeight, LibraryBenchmarkProfile, LocaleProfile, MathematicalModelFormalism, MemoryProfile, MemoryStorageOptions, MetricMetadata, MetricScore, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, PassportLike, PassportManagerOptions, PlaywrightContextOptions, PuppeteerEmulationOptions, ScreenProfile, StorageAdapter, SubspaceEvaluation, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints };
475
+ export { ALL_PRESETS, BENCHMARK_METRICS_METADATA, BrandVersion, BrowserProfile, CHROME_VERSIONS, COMPARATIVE_DATASET, DevicePassport, DevicePassportContext, DevicePassportInstance, EDGE_VERSIONS, HardwareProfile, LocaleProfile, MACOS_PRESETS, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, PassportManager, PlaywrightContextOptions, PuppeteerEmulationOptions, StorageAdapter, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints, VERSION, WINDOWS_PRESETS, buildUserAgent, createDeterministicPRNG, createMulberry32, createPassport, fnv1a, formatComparativeMatrixJSON, formatComparativeMatrixLaTeX, formatComparativeMatrixMarkdown, formatStructuredBrandList, generateBrandVersions, generateDevicePassport, generatePassport, generateUserAgentClientHints, getApifyHeadersIfAvailable, getHardwarePresets, getPixelProtectionConfig, getPixelProtectionScript, getStaticFallbackHeaders, murmur3, parseStructuredBrandList, runComparativeBenchmark, validateHardwareContradictions };
476
+ export type { BenchmarkReportSummary, CanvasNoiseConfig, ClientHintsGenerateOptions, CreatePassportInputOptions, DeviceMatrixPreset, LibraryBenchmarkProfile, MetricMetadata, MetricScore, PassportManagerOptions };