npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kaidn/fp

v0.4.1

Published

Kaidn device fingerprint — thin browser client. Computes a stable device_id + automation signals (headless/UA/JA4 beacon) to pass to the Kaidn fraud-scoring API. Open client, closed engine.

Readme

@kaidn/fp

Browser device-fingerprint client for Kaidn. Computes a stable device_id plus automation signals (headless / UA-spoofing) and beacons them to the Kaidn edge so the connection's JA4 TLS fingerprint is captured against that device.

Browser-only, and safe there. This package holds no secret — the beacon uses a publishable key (pk_live_…) that is domain-locked in your Kaidn dashboard. Your server then scores with the same device_id using @kaidn/sdk and your secret API key. Never put your API key in the browser.

Install

npm install @kaidn/fp

Or drop the pre-built tag in — no build step, window.Kaidn is set for you:

<script src="https://api.kaidn.io/fp/pk_live_xxx.js" defer></script>

Usage (bundler / SPA)

import { beacon } from "@kaidn/fp";

// on your signup / login / checkout page, from the END USER's browser:
const fp = await beacon("https://api.kaidn.io/v1/fp", "pk_live_xxx");

// submit fp.device_id alongside your form; your backend passes it to /v1/score
form.elements.namedItem("device_id").value = fp.device_id;

collect() computes the fingerprint without any network call:

import { collect } from "@kaidn/fp";
const { device_id, device, attributes, anomalies } = await collect();

Why the browser call matters

JA4 is the fingerprint of whoever opens the TLS connection. Only a direct browser→edge request (this beacon) captures the real end user's TLS stack; a server-to-server call would capture your own backend's. The beacon associates the JA4 with device_id, and your later /v1/score lookup inherits it.

Exports

  • collect(options?) — compute { device_id, device, attributes, anomalies } (no network)
  • beacon(endpoint, pk, options?)collect() + best-effort POST to /v1/fp
  • watch(endpoint, pk, options?) — session heartbeat: fingerprints once, then re-beacons the same device_id every ~60s (and on tab refocus) so Kaidn sees the connection's IP over time. Because device_id + JA4 stay constant across a VPN change, a beacon whose IP flips connection type mid-session (a dropped VPN leaking the real home IP, or a device that starts cloaking) is caught by scoring. Returns { stop() }.
  • createTracker(deps) — the testable core behind the window.Kaidn drop-in tag
  • detectAutomation, checkUaConsistency, parseUserAgent, flattenComponents, pickWebglRenderer — the pure signal helpers

The verdict never comes back to the browser (by design) — scoring stays server-side.

Server side

Pair this with @kaidn/sdk:

import { Kaidn } from "@kaidn/sdk";
const kaidn = new Kaidn({ apiKey: process.env.KAIDN_API_KEY! });
const { verdict } = await kaidn.score({ event: "signup", device_id, ip, email });