cool-fingerprint
v1.1.0
Published
fingerprint for web, and its cool with ethereum wallet format
Readme
cool-fingerprint
A high-performance, lightweight web fingerprinting library that generates unique device identifiers in an Ethereum-style wallet format.
Why Cool-Fingerprint?
Traditional fingerprinting libraries are often heavy or easily spoofed. cool-fingerprint leverages deep hardware properties and environment characteristics to gather unique identifiers that are difficult to mask.
Features
- Advanced Hardware Entropy: Gathers unique device signatures from the underlying hardware layer.
- Custom Seeding: Fully supports custom seeds to generate different namespaces of fingerprints.
- Ethereum-style Format: Returns a 32-character hexadecimal string prefixed with 0x.
- Environment Aware: Gracefully handles various browser environments using fallback entropy sources.
- Lightweight: Zero dependencies, optimized for minimal bundle size.
Installation
npm install cool-fingerprintQuick Start
import fingerprint from "cool-fingerprint";
console.log(await fingerprint("cool-seed")); // Output: 0x...How It Works
The library collects entropy from multiple layers of the browser environment:
- Hardware Characteristics: Accesses internal device limits and architecture properties.
- Rendering Engine Details: Gathers unique rendering signatures and vendor-specific identification.
- System Info: Timezone, aspect ratio, platform, and touch capabilities.
- Seeding: Your custom seed is mixed into the internal hashing algorithm to ensure unique outputs for your specific application.
The internal hashing algorithm uses bitwise rotation and non-linear mixing to ensure that even small changes in the environment or seed result in a completely different fingerprint.
API Reference
fingerprint(seed)
The default export. An asynchronous function that generates the fingerprint.
- seed (string, optional): A custom string to further differentiate the fingerprint. Default: "cool-fingerprint".
- Returns: Promise - A 32-character hex string starting with 0x.
