Catalog npm
Back to packageRELEASE DETAILS

0.1.1

npm

@08byte/sdk

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

08byteai-agentllmtoken-compressionweb-scrapingx402
Published22 Aug 2026
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

@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).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.6.0development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^20.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "ef0fb9a59071e089f09de9d68ef1d7525d6e4fb9",
  "tarball": "https://registry.npmjs.org/@08byte/sdk/-/sdk-0.1.1.tgz",
  "fileCount": 10,
  "integrity": "sha512-V73ezCbti8P4ILyT28Xq4mTCxkmqWT5oKsmmLIjzN9SH+GuG9O6Wid1j7e6DgjKIl1Efgg4mXk4XZyOPJDfGaA==",
  "signatures": [
    {
      "sig": "MEUCIQDsseihkb5QoP8oCum1AEnYglRHScc77ExFM4aJFTjbvwIgNDV0FyU7+s+Cuk1mlYWMvQ0E1VGx62yJE6vDMo820ck=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 14855
}

Repository

PENDING
sec1702/08byte

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:03 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ccfa849b26948c4987757af6a67df84de8625c06588a7ee6afeba4d5faef3610

Other collected versions

0.1.222 Aug0.1.021 AugView all collected versions →