or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

agent.mdcomponents.mdentropy-sources.mdfingerprinting.mdindex.md
tile.json

entropy-sources.mddocs/

Entropy Sources

Built-in entropy sources for collecting browser and device characteristics across 41 different detection methods, organized by functional category.

Component Structure

All entropy sources return data in a standardized component format that includes either successful values or error information along with timing data.

interface Component<T> {
  value: T;
  duration: number;
} | {
  error: unknown;
  duration: number;
}

type UnknownComponents = Record<string, Component<unknown>>;

Audio & Media Sources

audio

Analyzes audio context characteristics for fingerprinting.

// Component name: 'audio'
// Returns: number (audio fingerprint hash)

Collects audio context fingerprints using oscillator nodes, dynamics compressors, and audio processing characteristics unique to each device and browser combination.

audioBaseLatency

Detects audio context base latency for timing-based fingerprinting.

// Component name: 'audioBaseLatency'  
// Returns: number | undefined

Measures the base latency of the audio context, which varies by audio hardware and driver configurations.

Visual & Canvas Sources

canvas

Generates canvas-based fingerprints through rendering operations.

// Component name: 'canvas'
// Returns: CanvasFingerprint object with winding, geometry, and text properties
interface CanvasFingerprint {
  winding: boolean;
  geometry: string;
  text: string;
}

Creates a canvas fingerprint by rendering text, gradients, and shapes, then extracting pixel data. Variations occur due to graphics drivers, hardware acceleration, and anti-aliasing differences.

webGlBasics

Collects basic WebGL renderer and context information.

// Component name: 'webGlBasics'
// Returns: WebGL parameter object with renderer, vendor, and capability information
interface WebGLBasics {
  renderer: string;
  vendor: string;
  // Additional WebGL parameters
}

webGlExtensions

Enumerates available WebGL extensions.

// Component name: 'webGlExtensions' 
// Returns: string[] | undefined

Lists all supported WebGL extensions, which vary significantly between graphics hardware and driver versions.

Font & Text Sources

fonts

Detects available system fonts.

// Component name: 'fonts'
// Returns: Promise<string[]>

Identifies installed fonts by attempting to render text and measuring width variations. Font availability is highly distinctive across different systems and installations.

fontPreferences

Analyzes font rendering preferences and characteristics.

// Component name: 'fontPreferences'
// Returns: Font preference object with various rendering metrics
interface FontPreferences {
  default: number[];
  apple: number[];
  serif: number[];
  sans: number[];
  mono: number[];
  // Additional font measurements
}

Screen & Display Sources

screenResolution

Captures screen resolution and pixel density information.

// Component name: 'screenResolution'
// Returns: [number | null, number | null] | undefined

screenFrame

Measures screen frame dimensions and available screen real estate.

// Component name: 'screenFrame'
// Returns: Screen frame measurements
interface ScreenFrame {
  availTop: number;
  availLeft: number;
  availWidth: number;
  availHeight: number;
  // Additional frame properties
}

colorDepth

Determines the color depth of the display.

// Component name: 'colorDepth'
// Returns: number

colorGamut

Detects supported color gamut capabilities.

// Component name: 'colorGamut'
// Returns: string

Identifies color gamut support (sRGB, P3, rec2020) through CSS media queries.

monochrome

Measures monochrome display capabilities.

// Component name: 'monochrome'
// Returns: number

Platform & Hardware Sources

platform

Identifies the operating system platform.

// Component name: 'platform'
// Returns: string

osCpu

Extracts OS and CPU information from navigator properties.

// Component name: 'osCpu'
// Returns: string | undefined

architecture

Detects CPU architecture when available.

// Component name: 'architecture' 
// Returns: string | undefined

cpuClass

Identifies CPU class information (legacy browsers).

// Component name: 'cpuClass'
// Returns: string | undefined

hardwareConcurrency

Reports the number of logical processors.

// Component name: 'hardwareConcurrency'
// Returns: number | undefined

deviceMemory

Indicates approximate device memory in gigabytes.

// Component name: 'deviceMemory'
// Returns: number | undefined

Browser & Vendor Sources

vendor

Identifies the browser vendor.

// Component name: 'vendor'
// Returns: string

vendorFlavors

Detects vendor-specific browser features and flavors.

// Component name: 'vendorFlavors'
// Returns: string[]

plugins

Enumerates browser plugins (legacy browsers).

// Component name: 'plugins'
// Returns: Plugin information array
interface PluginInfo {
  name: string;
  description: string;
  mimeTypes: string[];
}

Storage Sources

localStorage

Tests local storage availability and functionality.

// Component name: 'localStorage'
// Returns: boolean

sessionStorage

Tests session storage availability.

// Component name: 'sessionStorage'
// Returns: boolean

indexedDB

Checks IndexedDB availability and support.

// Component name: 'indexedDB'
// Returns: boolean

openDatabase

Tests WebSQL database availability (deprecated).

// Component name: 'openDatabase'
// Returns: boolean

Accessibility & Preferences Sources

invertedColors

Detects inverted colors accessibility preference.

// Component name: 'invertedColors'
// Returns: boolean

forcedColors

Identifies forced colors mode (high contrast).

// Component name: 'forcedColors'
// Returns: boolean

contrast

Determines contrast preference settings.

// Component name: 'contrast'
// Returns: string

reducedMotion

Checks for reduced motion accessibility preference.

// Component name: 'reducedMotion'
// Returns: boolean

reducedTransparency

Detects reduced transparency preference.

// Component name: 'reducedTransparency'
// Returns: boolean

hdr

Identifies HDR display support.

// Component name: 'hdr'
// Returns: boolean

Input & Interaction Sources

touchSupport

Analyzes touch input capabilities and characteristics.

// Component name: 'touchSupport'
// Returns: Touch support information
interface TouchSupport {
  maxTouchPoints: number;
  touchEvent: boolean;
  touchStart: boolean;
}

cookiesEnabled

Tests if cookies are enabled and functional.

// Component name: 'cookiesEnabled'
// Returns: boolean

pdfViewerEnabled

Checks if PDF viewing is enabled in the browser.

// Component name: 'pdfViewerEnabled'
// Returns: boolean

Language & Locale Sources

languages

Collects browser language preferences.

// Component name: 'languages'
// Returns: [primary: string, list: string[]]

timezone

Determines the system timezone.

// Component name: 'timezone'
// Returns: string

dateTimeLocale

Analyzes date and time locale formatting characteristics.

// Component name: 'dateTimeLocale'
// Returns: Locale formatting information
interface DateTimeLocale {
  // Various locale-specific formatting results
  [key: string]: string;
}

Security & Privacy Sources

domBlockers

Detects ad blockers and DOM manipulation tools.

// Component name: 'domBlockers'
// Returns: DOM blocker detection results
interface DOMBlockers {
  // Results of various blocker detection tests
  [blockerName: string]: boolean;
}

privateClickMeasurement

Checks for Private Click Measurement support (Safari).

// Component name: 'privateClickMeasurement'
// Returns: boolean

applePay

Tests Apple Pay availability and support.

// Component name: 'applePay'
// Returns: boolean

math

Generates mathematical operation fingerprints.

// Component name: 'math'
// Returns: Mathematical computation results
interface MathFingerprint {
  // Results of various mathematical operations that may vary by implementation
  [operation: string]: number;
}

Usage Patterns

Accessing Individual Sources:

const fp = await FingerprintJS.load();
const result = await fp.get();

// Check canvas fingerprint
if ('value' in result.components.canvas) {
  console.log('Canvas fingerprint:', result.components.canvas.value);
}

// Analyze font detection results
if ('value' in result.components.fonts) {
  const detectedFonts = result.components.fonts.value as string[];
  console.log(`Detected ${detectedFonts.length} fonts:`, detectedFonts);
}

Source Performance Analysis:

// Analyze source collection performance
const sources = Object.entries(result.components);
const slowSources = sources
  .filter(([_, component]) => component.duration > 50)
  .sort(([_, a], [__, b]) => b.duration - a.duration);

console.log('Slowest entropy sources:', slowSources);

Error Handling for Sources:

// Handle source collection errors
const failedSources = Object.entries(result.components)
  .filter(([_, component]) => 'error' in component)
  .map(([name, component]) => ({ name, error: component.error }));

if (failedSources.length > 0) {
  console.warn('Failed entropy sources:', failedSources);
}