device-passport 1.0.0 → 1.2.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.
- package/CHANGELOG.md +33 -0
- package/README.md +110 -2
- package/assets/ego-profile-manager.png +0 -0
- package/dist/adapters/index.cjs +19 -0
- package/dist/adapters/index.d.cts +66 -0
- package/dist/adapters/index.d.mts +66 -0
- package/dist/adapters/index.d.ts +66 -0
- package/dist/adapters/index.mjs +3 -0
- package/dist/ego/index.cjs +22 -0
- package/dist/ego/index.d.cts +5 -0
- package/dist/ego/index.d.mts +5 -0
- package/dist/ego/index.d.ts +5 -0
- package/dist/ego/index.mjs +8 -0
- package/dist/evaluator/index.cjs +140 -0
- package/dist/evaluator/index.d.cts +204 -0
- package/dist/evaluator/index.d.mts +204 -0
- package/dist/evaluator/index.d.ts +204 -0
- package/dist/evaluator/index.mjs +119 -0
- package/dist/geo/index.cjs +50 -0
- package/dist/geo/index.d.cts +213 -0
- package/dist/geo/index.d.mts +213 -0
- package/dist/geo/index.d.ts +213 -0
- package/dist/geo/index.mjs +18 -0
- package/dist/index.cjs +110 -3940
- package/dist/index.d.cts +45 -1091
- package/dist/index.d.mts +45 -1091
- package/dist/index.d.ts +45 -1091
- package/dist/index.mjs +11 -3849
- package/dist/shared/device-passport.BGfRcQNh.mjs +565 -0
- package/dist/shared/device-passport.BKtmLzPt.cjs +1266 -0
- package/dist/shared/device-passport.BPQj0qdT.mjs +1238 -0
- package/dist/shared/device-passport.CDS7xrj8.d.ts +469 -0
- package/dist/shared/device-passport.C_F1vBE8.d.cts +79 -0
- package/dist/shared/device-passport.C_F1vBE8.d.mts +79 -0
- package/dist/shared/device-passport.C_F1vBE8.d.ts +79 -0
- package/dist/shared/device-passport.CfLes-lq.d.cts +469 -0
- package/dist/shared/device-passport.Cjxlv8xI.cjs +245 -0
- package/dist/shared/device-passport.CsOWqPIr.d.cts +77 -0
- package/dist/shared/device-passport.CyQtcZeD.mjs +237 -0
- package/dist/shared/device-passport.D7pEnyp2.d.ts +77 -0
- package/dist/shared/device-passport.D9xW6R0B.cjs +1571 -0
- package/dist/shared/device-passport.DirQmSd4.d.cts +47 -0
- package/dist/shared/device-passport.DirQmSd4.d.mts +47 -0
- package/dist/shared/device-passport.DirQmSd4.d.ts +47 -0
- package/dist/shared/device-passport.EK4RX7Xd.cjs +584 -0
- package/dist/shared/device-passport.ZBspe4ZW.d.mts +77 -0
- package/dist/shared/device-passport.dVEqzSEb.d.mts +469 -0
- package/dist/shared/device-passport.gNo82fQ5.mjs +1537 -0
- package/dist/shared/device-passport.kekU28UM.mjs +705 -0
- package/dist/shared/device-passport.qL4tjwc0.cjs +718 -0
- package/dist/storage/index.cjs +10 -0
- package/dist/storage/index.d.cts +97 -0
- package/dist/storage/index.d.mts +97 -0
- package/dist/storage/index.d.ts +97 -0
- package/dist/storage/index.mjs +3 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +397 -0
- package/dist/types/index.d.mts +397 -0
- package/dist/types/index.d.ts +397 -0
- package/dist/types/index.mjs +1 -0
- package/package.json +32 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,576 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* DevicePassportInstance encapsulates a single concrete, zero-contradiction digital identity persona.
|
|
389
|
-
*
|
|
390
|
-
* Provides runtime adapters for:
|
|
391
|
-
* 1. Lightweight HTTP mode (Fetch, Axios, Undici, Got, cURL) with strict canonical header ordering.
|
|
392
|
-
* 2. Heavyweight browser automation (Playwright, Puppeteer, ego-lite) with deep fingerprint masking.
|
|
393
|
-
* 3. Self-evaluating consistency diagnostics based on empirical telemetry models.
|
|
394
|
-
*/
|
|
395
|
-
declare class DevicePassportInstance {
|
|
396
|
-
readonly profile: DevicePassport;
|
|
397
|
-
constructor(profile: DevicePassport);
|
|
398
|
-
/**
|
|
399
|
-
* Factory method to create an instance from a plain DevicePassport object.
|
|
400
|
-
*/
|
|
401
|
-
static from(profile: DevicePassport): DevicePassportInstance;
|
|
402
|
-
get id(): string;
|
|
403
|
-
get seed(): string;
|
|
404
|
-
get createdAt(): string;
|
|
405
|
-
get browser(): BrowserProfile;
|
|
406
|
-
get os(): OperatingSystemProfile;
|
|
407
|
-
get hardware(): HardwareProfile;
|
|
408
|
-
get locale(): LocaleProfile;
|
|
409
|
-
get headers(): Record<string, string>;
|
|
410
|
-
get clientHints(): UserAgentClientHints;
|
|
411
|
-
get context(): DevicePassportContext;
|
|
412
|
-
get userAgent(): string;
|
|
413
|
-
get timezone(): string;
|
|
414
|
-
get playwrightContext(): PlaywrightContextOptions;
|
|
415
|
-
get puppeteerArgs(): PuppeteerEmulationOptions;
|
|
416
|
-
get evaluation(): PassportEvaluation | undefined;
|
|
417
|
-
/**
|
|
418
|
-
* Returns HTTP headers formatted in strict canonical browser sequence.
|
|
419
|
-
* Essential for anti-bot evasion against Cloudflare, Akamai, and DataDome.
|
|
420
|
-
*/
|
|
421
|
-
getHeaders(overrides?: Record<string, string>): Record<string, string>;
|
|
422
|
-
/**
|
|
423
|
-
* Returns a higher-order fetch function wrapping standard fetch with this passport's canonical persona.
|
|
424
|
-
*/
|
|
425
|
-
wrapFetch(customFetch?: typeof fetch): typeof fetch;
|
|
426
|
-
/**
|
|
427
|
-
* Alias for wrapFetch.
|
|
428
|
-
*/
|
|
429
|
-
withPassport(customFetch?: typeof fetch): typeof fetch;
|
|
430
|
-
/**
|
|
431
|
-
* Generates a copy-pasteable cURL command with correct browser headers and User-Agent.
|
|
432
|
-
*/
|
|
433
|
-
toCurl(url: string, options?: {
|
|
434
|
-
method?: string;
|
|
435
|
-
data?: any;
|
|
436
|
-
headers?: Record<string, string>;
|
|
437
|
-
}): string;
|
|
438
|
-
/**
|
|
439
|
-
* Generates Playwright BrowserContext options.
|
|
440
|
-
* Usage:
|
|
441
|
-
* ```ts
|
|
442
|
-
* const context = await browser.newContext(passport.getPlaywrightContext());
|
|
443
|
-
* ```
|
|
444
|
-
*/
|
|
445
|
-
getPlaywrightContext(): PlaywrightContextOptions;
|
|
446
|
-
/**
|
|
447
|
-
* Returns Puppeteer launch args and page emulation parameters.
|
|
448
|
-
*/
|
|
449
|
-
getPuppeteerArgs(): PuppeteerEmulationOptions;
|
|
450
|
-
/**
|
|
451
|
-
* Generates an in-page stealth script to patch runtime JavaScript APIs
|
|
452
|
-
* (navigator.webdriver, hardwareConcurrency, deviceMemory, WebGL, Client Hints).
|
|
453
|
-
*/
|
|
454
|
-
getStealthScript(): string;
|
|
455
|
-
/**
|
|
456
|
-
* Injects stealth scripts and extra HTTP headers into a Playwright BrowserContext.
|
|
457
|
-
*/
|
|
458
|
-
applyToPlaywright(context: any): Promise<void>;
|
|
459
|
-
/**
|
|
460
|
-
* Injects stealth scripts and emulation parameters into a Puppeteer Page.
|
|
461
|
-
*/
|
|
462
|
-
applyToPuppeteer(page: any): Promise<void>;
|
|
463
|
-
/**
|
|
464
|
-
* Evaluates cross-layer consistency and Shannon entropy.
|
|
465
|
-
* Caches the result on `this.profile.evaluation`.
|
|
466
|
-
*/
|
|
467
|
-
evaluate(forceRecompute?: boolean): PassportEvaluation;
|
|
468
|
-
/**
|
|
469
|
-
* Returns the underlying raw DevicePassport data object.
|
|
470
|
-
*/
|
|
471
|
-
toJSON(): DevicePassport;
|
|
472
|
-
toString(): string;
|
|
473
|
-
}
|
|
474
|
-
interface CreatePassportInputOptions extends PassportGeneratorOptions {
|
|
475
|
-
/** Optional file path or storage adapter to persist this passport deterministically */
|
|
476
|
-
store?: string | StorageAdapter<DevicePassport>;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Universal polymorphic factory for creating a DevicePassportInstance.
|
|
480
|
-
*
|
|
481
|
-
* Supports:
|
|
482
|
-
* - One-line string seed: `createPassport('alice', { geo: 'US' })`
|
|
483
|
-
* - Full options object: `createPassport({ seed: 'bot1', store: './passports.json' })`
|
|
484
|
-
* - Existing raw profile: `createPassport(rawProfile)`
|
|
485
|
-
* - Zero-config ephemeral persona: `createPassport()`
|
|
486
|
-
*/
|
|
487
|
-
declare function createPassport(seedOrOptionsOrProfile?: string | CreatePassportInputOptions | DevicePassport, extraOptions?: CreatePassportInputOptions): DevicePassportInstance;
|
|
488
|
-
|
|
489
|
-
interface PassportManagerOptions {
|
|
490
|
-
/**
|
|
491
|
-
* Storage backend for persisting passports:
|
|
492
|
-
* - String path (e.g. './passports.json') -> creates JSONFileStorage automatically.
|
|
493
|
-
* - StorageAdapter instance -> custom pluggable storage (Memory, File, Redis, DB).
|
|
494
|
-
* - Omitted or 'memory' -> uses MemoryStorage.
|
|
495
|
-
*/
|
|
496
|
-
store?: string | StorageAdapter<DevicePassport>;
|
|
497
|
-
/**
|
|
498
|
-
* Default geographic country code for newly generated personas (e.g. 'US', 'GB', 'DE', 'JP').
|
|
499
|
-
* Defaults to 'US'.
|
|
500
|
-
*/
|
|
501
|
-
defaultGeo?: string;
|
|
502
|
-
/**
|
|
503
|
-
* Default operating system preference ('macOS' | 'Windows').
|
|
504
|
-
*/
|
|
505
|
-
defaultOS?: SupportedPlatform;
|
|
506
|
-
/**
|
|
507
|
-
* Default browser preference ('Chrome' | 'Edge').
|
|
508
|
-
*/
|
|
509
|
-
defaultBrowser?: SupportedBrowserName;
|
|
510
|
-
/**
|
|
511
|
-
* Generator function. Defaults to engine's generatePassport.
|
|
512
|
-
*/
|
|
513
|
-
generator?: (options?: PassportGeneratorOptions) => DevicePassport;
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* PassportManager manages fleet-scale digital device identities.
|
|
517
|
-
*
|
|
518
|
-
* Guarantees true sticky identity across runs:
|
|
519
|
-
* Calling `getPassport(seed)` with the same seed (e.g. account ID, proxy IP, username)
|
|
520
|
-
* will consistently return the exact same device passport across restarts and cron jobs.
|
|
521
|
-
*/
|
|
522
|
-
declare class PassportManager {
|
|
523
|
-
readonly storage: StorageAdapter<DevicePassport>;
|
|
524
|
-
readonly defaultGeo: string;
|
|
525
|
-
readonly defaultOS?: SupportedPlatform;
|
|
526
|
-
readonly defaultBrowser?: SupportedBrowserName;
|
|
527
|
-
private readonly generator;
|
|
528
|
-
constructor(options?: PassportManagerOptions);
|
|
529
|
-
/**
|
|
530
|
-
* Retrieves an existing sticky passport by seed or deterministically generates
|
|
531
|
-
* and persists a new one if it does not already exist.
|
|
532
|
-
*
|
|
533
|
-
* @param seed Deterministic seed (user ID, account handle, proxy IP, worker slot)
|
|
534
|
-
* @param options Generator options to use if persona needs to be created
|
|
535
|
-
*/
|
|
536
|
-
getPassport(seed: string | number, options?: PassportGeneratorOptions): Promise<DevicePassportInstance>;
|
|
537
|
-
/**
|
|
538
|
-
* Synchronous passport retrieval for environments backed by MemoryStorage or JSONFileStorage.
|
|
539
|
-
*/
|
|
540
|
-
getPassportSync(seed: string | number, options?: PassportGeneratorOptions): DevicePassportInstance;
|
|
541
|
-
/**
|
|
542
|
-
* Forces re-generation and overwrite of a passport for the given seed.
|
|
543
|
-
*/
|
|
544
|
-
renewPassport(seed: string | number, options?: PassportGeneratorOptions): Promise<DevicePassportInstance>;
|
|
545
|
-
/**
|
|
546
|
-
* Check if a passport exists in storage for the given seed.
|
|
547
|
-
*/
|
|
548
|
-
hasPassport(seed: string | number): Promise<boolean>;
|
|
549
|
-
/**
|
|
550
|
-
* Delete a passport from storage.
|
|
551
|
-
*/
|
|
552
|
-
deletePassport(seed: string | number): Promise<boolean>;
|
|
553
|
-
/**
|
|
554
|
-
* Import an existing passport into storage.
|
|
555
|
-
*/
|
|
556
|
-
importPassport(passport: DevicePassport | DevicePassportInstance): Promise<DevicePassportInstance>;
|
|
557
|
-
/**
|
|
558
|
-
* List all stored seeds.
|
|
559
|
-
*/
|
|
560
|
-
listSeeds(): Promise<string[]>;
|
|
561
|
-
/**
|
|
562
|
-
* List all stored passports as DevicePassportInstance objects.
|
|
563
|
-
*/
|
|
564
|
-
listPassports(): Promise<DevicePassportInstance[]>;
|
|
565
|
-
/**
|
|
566
|
-
* Clear all stored passports.
|
|
567
|
-
*/
|
|
568
|
-
clear(): Promise<void>;
|
|
569
|
-
/**
|
|
570
|
-
* Return number of stored personas.
|
|
571
|
-
*/
|
|
572
|
-
count(): Promise<number>;
|
|
573
|
-
}
|
|
1
|
+
export { A as AccountProfileManager, a as AccountProfileManagerOptions, B as BindProfileOptions, b as BuildEgoSessionPlanOptions, C as CreatePassportInputOptions, c as CreateSessionPlanOptions, D as DevicePassportInstance, E as EgoNativeBridge, P as PROXY_MISSING_NOTE, d as PROXY_RESOLUTION_NOTE, e as PassportManager, f as PassportManagerOptions, g as buildEgoSessionPlan, h as buildProxyDeclaration, i as createEgoBridge, j as createPassport, k as defaultTaskSpaceName, l as getEgoNativeBridge, m as getProfileReadiness } from './shared/device-passport.CfLes-lq.cjs';
|
|
2
|
+
import { OperatingSystemProfile, HardwareProfile, SupportedPlatform, SupportedArchitecture, SupportedBrowserName, BrandVersion, UserAgentClientHints, PassportGeneratorOptions, DevicePassport } from './types/index.cjs';
|
|
3
|
+
export { BenchmarkMetrics, BrowserProfile, CdpCommand, CdpInitScript, CdpPassportPlan, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DevicePassportContext, DeviceProfile, EgoAccountProfile, EgoLiteBridge, EgoProfile, EgoProfileReadiness, EgoProxyBinding, EgoProxyDeclaration, EgoSessionPlan, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, MemoryProfile, PassportEvaluation, ScreenProfile } from './types/index.cjs';
|
|
4
|
+
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';
|
|
5
|
+
export { CANONICAL_HEADER_ORDER, PassportLike, applyCdpPassport, formatCanonicalHeaders, getCdpPlan, toCurl, withPassport } from './adapters/index.cjs';
|
|
6
|
+
export { P as PlaywrightContextOptions, a as PuppeteerEmulationOptions, b as applyToPlaywrightContext, c as applyToPuppeteerPage, g as getPlaywrightContext, d as getPuppeteerArgs, e as getStealthScript } from './shared/device-passport.CsOWqPIr.cjs';
|
|
7
|
+
export { S as StorageAdapter } from './shared/device-passport.DirQmSd4.cjs';
|
|
8
|
+
export { JSONFileStorage, JSONFileStorageOptions, MemoryStorage, MemoryStorageOptions } from './storage/index.cjs';
|
|
9
|
+
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';
|
|
10
|
+
export { C as CountryGeoDefinition, G as GeoContext, a as GeoCoordinates, b as GeoLocation, c as GeoOptions, d as LanguageWeight, L as LocaleProfile } from './shared/device-passport.C_F1vBE8.cjs';
|
|
574
11
|
|
|
575
12
|
/**
|
|
576
13
|
* Zero-Contradiction Hardware Matrix for Device Passport.
|
|
@@ -707,533 +144,50 @@ declare function generatePassport(options?: PassportGeneratorOptions): DevicePas
|
|
|
707
144
|
declare const generateDevicePassport: typeof generatePassport;
|
|
708
145
|
|
|
709
146
|
/**
|
|
710
|
-
*
|
|
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.
|
|
147
|
+
* Pixel-Level Protection — canvas / WebGL noise that survives read-back.
|
|
861
148
|
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
*
|
|
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.
|
|
149
|
+
* 🔴 Why this module exists (real gap found 2026-11-04):
|
|
150
|
+
* `getStealthScript()` only rewrites **API return values**. `canvas.toDataURL()` and
|
|
151
|
+
* `gl.readPixels()` still hand back the **real** framebuffer, so a headless Chromium
|
|
152
|
+
* exposes `ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device ...))` while its UA claims
|
|
153
|
+
* a discrete NVIDIA card. Worse, every persona rendered on the same machine produces a
|
|
154
|
+
* **byte-identical** canvas hash — a fleet of accounts with different identities but one
|
|
155
|
+
* identical pixel fingerprint is trivially clustered.
|
|
932
156
|
*
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
|
|
936
|
-
|
|
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)
|
|
157
|
+
* ⚠️ Determinism is the whole point:
|
|
158
|
+
* The noise MUST be derived from the passport seed, never from `Math.random()`.
|
|
159
|
+
* The same account has to read back identical pixels on every visit, otherwise a
|
|
160
|
+
* changing canvas hash is itself an automation signal (and breaks "sticky hardware").
|
|
1090
161
|
*
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
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.
|
|
162
|
+
* The noise is a **seeded permutation of a few discrete levels**, not random dithering:
|
|
163
|
+
* real devices quantize canvas output; a smooth ±1 RGB jitter on every pixel is its own
|
|
164
|
+
* fingerprint because no GPU produces it.
|
|
1121
165
|
*/
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
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.
|
|
1152
|
-
*
|
|
1153
|
-
* Implements the Formal Mathematical Model:
|
|
1154
|
-
* P = ⟨H, S, G, C⟩
|
|
1155
|
-
*
|
|
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⟩
|
|
1161
|
-
*
|
|
1162
|
-
* The coherence evaluation function Φ(P) maps P into [0, 100%], quantifying
|
|
1163
|
-
* cross-subspace plausibility and absence of anti-bot contradiction signatures.
|
|
1164
|
-
*/
|
|
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
|
-
};
|
|
166
|
+
/** Canvas read-back surface exposed to the page. */
|
|
167
|
+
interface CanvasNoiseConfig {
|
|
168
|
+
/** Deterministic seed; identical seeds must produce identical pixels. */
|
|
169
|
+
seed: string;
|
|
170
|
+
/** Maximum per-channel deviation applied to read-back pixels. */
|
|
171
|
+
amplitude?: number;
|
|
172
|
+
/** Noise applied to 2D canvas read-back. */
|
|
173
|
+
enabled2d?: boolean;
|
|
174
|
+
/** Noise applied to WebGL read-back. */
|
|
175
|
+
enabledWebgl?: boolean;
|
|
1207
176
|
}
|
|
1208
177
|
/**
|
|
1209
|
-
*
|
|
1210
|
-
*/
|
|
1211
|
-
declare function evaluateGeoAlignment(passport: DevicePassport): number;
|
|
1212
|
-
/**
|
|
1213
|
-
* Evaluates the complete internal consistency and coherence of a Device Passport.
|
|
178
|
+
* Produces the JavaScript source that patches canvas and WebGL read-back.
|
|
1214
179
|
*
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
180
|
+
* The patch is intentionally dependency-free and IIFE-scoped so it can be injected through
|
|
181
|
+
* Playwright `addInitScript`, Puppeteer `evaluateOnNewDocument`, or a raw CDP
|
|
182
|
+
* `Page.addScriptToEvaluateOnNewDocument` call.
|
|
1217
183
|
*/
|
|
1218
|
-
declare function
|
|
1219
|
-
|
|
184
|
+
declare function getPixelProtectionScript(config: CanvasNoiseConfig): string;
|
|
1220
185
|
/**
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1223
|
-
* Implements verification algorithms for the formal model:
|
|
1224
|
-
* P = ⟨H, S, G, C⟩
|
|
186
|
+
* Builds the noise configuration for a passport.
|
|
1225
187
|
*
|
|
1226
|
-
*
|
|
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.
|
|
188
|
+
* The seed is the passport seed, so a persona keeps identical pixels across sessions.
|
|
1235
189
|
*/
|
|
1236
|
-
declare function
|
|
190
|
+
declare function getPixelProtectionConfig(seed: string, overrides?: Partial<Omit<CanvasNoiseConfig, 'seed'>>): CanvasNoiseConfig;
|
|
1237
191
|
|
|
1238
192
|
/**
|
|
1239
193
|
* Academic Comparative Benchmark Matrix for Anti-Detection and Device Personas.
|
|
@@ -1330,5 +284,5 @@ declare function formatComparativeMatrixJSON(): string;
|
|
|
1330
284
|
*/
|
|
1331
285
|
declare const VERSION = "1.0.0";
|
|
1332
286
|
|
|
1333
|
-
export { ALL_PRESETS,
|
|
1334
|
-
export type {
|
|
287
|
+
export { ALL_PRESETS, BENCHMARK_METRICS_METADATA, BrandVersion, CHROME_VERSIONS, COMPARATIVE_DATASET, DevicePassport, EDGE_VERSIONS, HardwareProfile, MACOS_PRESETS, OperatingSystemProfile, PassportGeneratorOptions, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints, VERSION, WINDOWS_PRESETS, buildUserAgent, createDeterministicPRNG, createMulberry32, fnv1a, formatComparativeMatrixJSON, formatComparativeMatrixLaTeX, formatComparativeMatrixMarkdown, formatStructuredBrandList, generateBrandVersions, generateDevicePassport, generatePassport, generateUserAgentClientHints, getApifyHeadersIfAvailable, getHardwarePresets, getPixelProtectionConfig, getPixelProtectionScript, getStaticFallbackHeaders, murmur3, parseStructuredBrandList, runComparativeBenchmark, validateHardwareContradictions };
|
|
288
|
+
export type { BenchmarkReportSummary, CanvasNoiseConfig, ClientHintsGenerateOptions, DeviceMatrixPreset, LibraryBenchmarkProfile, MetricMetadata, MetricScore };
|