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

@08byte/sdk

v0.1.2

Published

Official TypeScript/JavaScript SDK for the 08byte Edge Data Parser & Token Compression API.

Downloads

101

Readme

@08byte/sdk

Official TypeScript / JavaScript SDK for the 08byte Edge Data Parser & Token Compression API.

npm install @08byte/sdk

Usage

import { Zero8Byte } from "@08byte/sdk";

const client = new Zero8Byte({ apiKey: process.env.ZERO8BYTE_API_KEY! });

// Mode-preset extraction
const news = await client.parse("https://techcrunch.com/article-url", { mode: "news" });
console.log(news.data.headline, news.data.what_happened);

// Custom schema extraction
const product = await client.extract("https://example.com/product/123", {
  schema: {
    properties: {
      title: { type: "string" },
      price: { type: "number" },
      in_stock: { type: "boolean" },
      features: { type: "array" },
    },
    required: ["title", "price"],
  },
});

// Batch parsing (up to 50 URLs per call)
const batch = await client.batchParseAndWait({
  urls: ["https://a.example.com", "https://b.example.com"],
  mode: "product",
});
console.log(batch.status, batch.results);

// Or fire-and-forget with a webhook instead of polling:
const accepted = await client.batchParse({
  urls: ["https://a.example.com", "https://b.example.com"],
  webhookUrl: "https://your-server.com/webhooks/08byte",
  webhookSecret: "whsec_your_own_secret",
});

Machine-to-Machine x402 Micropayments (Base USDC)

For autonomous agents and developers who want pay-per-call access without pre-funding an API key:

import { Zero8Byte, type X402Challenge } from "@08byte/sdk";

// Option A: Pre-signed X-PAYMENT header
const client = new Zero8Byte({
  x402Payment: "eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLC...",
});
const res = await client.parse("https://en.wikipedia.org/wiki/Artificial_intelligence");

// Option B: Dynamic auto-signing callback for 402 challenges
const agentClient = new Zero8Byte({
  signPayment: async (challenge: X402Challenge) => {
    // Sign the payment challenge using your wallet (e.g. viem, ethers)
    // and return the Base64-encoded payment string
    return signWithEVMWallet(challenge);
  },
});
const data = await agentClient.parse("https://news.ycombinator.com");

Verifying inbound batch webhooks

import { verifyWebhookSignature } from "@08byte/sdk";

// req.rawBody MUST be the exact bytes received — not a re-serialized
// JSON.parse(...) round-trip — or the signature will never match.
const valid = verifyWebhookSignature(
  req.rawBody,
  req.headers["x-08byte-signature"],
  process.env.ZERO8BYTE_WEBHOOK_SECRET!
);

Error handling

Every non-2xx response throws Zero8ByteError (.status, .code, .message):

import { Zero8ByteError } from "@08byte/sdk";

try {
  await client.parse("http://169.254.169.254/");
} catch (err) {
  if (err instanceof Zero8ByteError) {
    console.log(err.status, err.code); // 422 "INVALID_URL"
  }
}

Requirements

Node.js >= 18 (needs global fetch and node:crypto's timingSafeEqual).