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

@botsigged/sdk

v1.0.14

Published

BotSigged SDK - Real-time bot detection via WebSocket

Readme

BotSigged SDK

A lightweight SDK for real-time bot detection via WebSocket to be connected to botsigged.com (account required).

Bundle Size

The SDK uses code splitting to minimize initial load time. Optional features are lazy-loaded only when enabled.

ESM Build (npm package)

| File | Size | Gzipped | When Loaded | |------|------|---------|-------------| | index.js | 66 KB | 17 KB | Always (initial) | | challenge-.js | 6 KB | 2 KB | Only if action: 'challenge' | | hash-.js | 9 KB | 4 KB | Only if hashVerification.enabled |

IIFE Build (script tag)

| File | Size | Gzipped | |------|------|---------| | botsigged.js | 85 KB | 25 KB |

The IIFE build includes all features in a single file for simplicity.

Features

  • Lightweight - ~17 KB gzipped initial bundle (ESM)
  • Code splitting - Challenge and hash modules lazy-loaded on demand
  • Modular architecture:
    • Mouse, scroll, and form behavior tracking
    • Browser fingerprinting
    • WebSocket transport (Phoenix channels)
    • Form protection (optionally auto-blocks bots before detection completes)
    • PoW challenge system (optional)

Installation

npm install @botsigged/sdk

Or include directly in HTML:

<script src="https://unpkg.com/@botsigged/sdk/dist/botsigged.js"></script>

Usage

Basic

import { BotSigged } from '@botsigged/sdk';

const botsigged = new BotSigged({
  apiKey: 'pk_your_api_key_here',
});

The SDK auto-starts and begins collecting behavioral signals immediately.

With Account Identification

Track risk across sessions by associating a user account:

const botsigged = new BotSigged({
  apiKey: 'pk_your_api_key_here',
  accountId: 'user_123', // Associate session with account on init
});

// Or identify later (e.g., after login)
await botsigged.identify({ accountId: 'user_123' });

Server-Side Verification

Pass the session ID to your backend for server-side score lookup:

const botsigged = new BotSigged({
  apiKey: 'pk_your_api_key_here',

  // Option 1: Cookie (for traditional form posts)
  cookie: true, // Sets '_bsid' cookie

  // Option 2: Headers (for SPAs using fetch/XHR)
  headers: true, // Adds 'X-BotSigged-ID' header to requests

  // Option 3: Hidden form field (cookie-free forms)
  formInject: true, // Injects '_bsid' hidden input
});

Then verify on your backend:

GET https://api.botsigged.com/v1/sessions/{session_id}
Authorization: Bearer sk_your_secret_key

Form Protection

Automatically hold form submissions until bot detection completes:

const botsigged = new BotSigged({
  apiKey: 'pk_your_api_key_here',
  formProtection: {
    mode: 'holdUntilReady', // Wait for score before allowing submit
    maxHoldTime: 3000,      // Max 3s wait
  },
});

React / SPA Usage

For programmatic form submissions:

const botsigged = new BotSigged({ apiKey: 'pk_your_api_key_here' });

// Wait for detection before submitting
const handleSubmit = async (data) => {
  const { score, timedOut } = await botsigged.waitUntilReady();

  if (score && score > 70) {
    return; // Block suspicious submissions
  }

  await fetch('/api/submit', {
    method: 'POST',
    body: JSON.stringify(data),
  });
};

Blocking Bots

Automatically block or challenge high-scoring sessions:

const botsigged = new BotSigged({
  apiKey: 'pk_your_api_key_here',
  action: 'block',      // or 'challenge' for PoW
  actionThreshold: 70,  // Score threshold
});

License

MIT