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

@sidearmdrm/sdk-node

v0.6.0

Published

TypeScript client for the Sidearm API — protect media from AI training, detect AI content, and search for stolen work

Readme

@sidearmdrm/sdk-node

TypeScript client for the Sidearm API. Protect media from AI training, detect AI content, search for stolen work.

Install

npm install @sidearmdrm/sdk-node

Quick Start

import { Sidearm } from "@sidearmdrm/sdk-node";
const client = new Sidearm({ apiKey: "sk_live_..." });
const job = await client.protect({
  media_url: "https://example.com/art.png",
  level: "maximum",
});
const result = await job.wait();

Protection

// Preset level (auto-selects algorithms)
const job = await client.protect({
  media_url: "https://...",
  level: "standard",
  tags: ["portfolio"],
});

// Run specific algorithms by name
const job2 = await client.run({
  algorithms: ["nightshade", "glaze", "hmark"],
  media_url: "https://...",
});

Job Polling

Async endpoints return a Job handle with built-in polling:

// Wait until done
const result = await job.wait({ timeoutMs: 120_000, intervalMs: 2_000 });

// Manual poll
const status = await job.poll();

// Resume from a previous job ID
const resumed = client.jobs.handle("job-uuid");
await resumed.wait();

Algorithms

const all = await client.algorithms.list();
const audio = await client.algorithms.list({ media_type: "audio" });
const open = await client.algorithms.list({ category: "open" });

Detection

// AI content detection (async)
const aiJob = await client.detect.ai({ media_url: "https://..." });
const aiResult = await aiJob.wait();

// Fingerprint detection (sync)
const matches = await client.detect.fingerprint({
  media_url: "https://...",
  tier: "perceptual",
});

// Membership inference
const memJob = await client.detect.membership({
  content_ids: ["uuid-1", "uuid-2"],
  suspect_model: "stable-diffusion-xl",
  method: "combined",
});
await memJob.wait();

Search

const results = await client.search.run({
  media_url: "https://...",
  type: "perceptual",
  limit: 10,
});

const history = await client.search.list({ limit: 20 });

Media Management

await client.media.register({ media_url: "https://...", mode: "basic" });
const library = await client.media.list({ limit: 50 });
const asset = await client.media.get("uuid");
await client.media.update("uuid", { original_media_url: "https://..." });
await client.media.delete("uuid");

Rights and Billing

const rights = await client.rights.get("media-uuid");
const billing = await client.billing.get("account-uuid", {
  start_date: "2026-01-01",
});

Error Handling

import { Sidearm, SidearmError } from "@sidearmdrm/sdk-node";

try {
  await client.protect({ media_url: "..." });
} catch (err) {
  if (err instanceof SidearmError) {
    console.error(err.message); // Human-readable message
    console.error(err.status);  // HTTP status code
    console.error(err.body);    // Raw response body
  }
}

Requirements

  • Node.js 18+ or modern browser (native fetch)
  • Zero runtime dependencies
  • Full TypeScript types included

License

MIT