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

sold-universal-sdk-js

v1.0.1

Published

TypeScript/JavaScript SDK for Akamai Bot Manager. Generate sensor data, pixel, sbsd and cookies without headless browsers.

Readme

Universal SDK — TypeScript / JavaScript

TypeScript/JavaScript SDK for Akamai Bot Manager: sensor data generation, pixel and SBSD challenges, sec-cpt solving and _abck cookie validation.

🔑 Getting API Access

Before using this SDK you need an API key:

  1. Go to sold-out.dev, create an account and link your API key.
  2. You can even ask for a free trial on our Discord.

📦 Installation

npm install sold-universal-sdk-js

🔧 Basic Usage

import { Session, SensorInput, generateSensorData } from 'sold-universal-sdk-js';

const session = new Session("your-api-key");

const result = await generateSensorData(session, new SensorInput(
    // sensor input fields
));

Session options

import { Session, CompressionType } from 'sold-universal-sdk-js';

const session = new Session("your-api-key", {
    compression: CompressionType.Gzip,
    timeout: 30000,
    proxy: "http://user:[email protected]:8080",
    rejectUnauthorized: true,
});

For drop-in compatibility with the upstream SDK, the legacy call shape new Session(apiKey, jwtKey, appKey, appSecret, options) is still accepted — the credential arguments are ignored, since this API authenticates with the API key alone.

Custom base URL

The API base url defaults to DEFAULT_BASE_URL (https://sold-out.dev). Override it via the baseUrl session option:

import { Session, DEFAULT_BASE_URL } from 'sold-universal-sdk-js';

const session = new Session("your-api-key", {
    baseUrl: "https://akamai.example.com", // trailing slashes are stripped
});

console.log(session.baseUrl, DEFAULT_BASE_URL);

🛡️ Akamai Bot Manager

Generating Sensor Data

import { SensorInput, generateSensorData } from 'sold-universal-sdk-js';

const result = await generateSensorData(session, new SensorInput(
    // sensor input fields
));

Parsing Script Path

import { parseAkamaiPath } from 'sold-universal-sdk-js';

const scriptPath = parseAkamaiPath(htmlContent);

Handling Sec-Cpt Challenges

import { parseChallengeHTML, parseChallengeJSON } from 'sold-universal-sdk-js';

const challenge = parseChallengeHTML(htmlContent);
// or: const challenge = parseChallengeJSON(jsonResponse);

if (challenge?.cryptoChallenge) {
    const payload = challenge.cryptoChallenge.generatePayload(secCptCookie);
}

await challenge?.wait();

Cookie Validation

import { isAkamaiCookieValid, isAkamaiCookieInvalidated } from 'sold-universal-sdk-js';

const isValid = isAkamaiCookieValid(cookieValue, requestCount);
const needsRefresh = isAkamaiCookieInvalidated(cookieValue);

Pixel Challenge Solving

import {
    PixelInput,
    generatePixelData,
    parsePixelHtmlVar,
    parsePixelScriptUrl,
    parsePixelScriptVar
} from 'sold-universal-sdk-js';

const htmlVar = parsePixelHtmlVar(htmlContent);
const scriptUrls = parsePixelScriptUrl(htmlContent);
const scriptVar = parsePixelScriptVar(scriptContent);

const pixelData = await generatePixelData(session, new PixelInput(
    // pixel input fields
));

SBSD Challenge Solving

import { SbsdInput, generateSbsdPayload } from 'sold-universal-sdk-js';

const sbsdData = await generateSbsdPayload(session, new SbsdInput(
    // sbsd input fields
));

📄 License

MIT — see LICENSE.


Fork of the Hyper Solutions SDK, trimmed down to the Akamai part and pointed at our own API.