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

@certivu/sdk

v2.6.0

Published

Official SDK for Certivu — quantum-resistant AI content provenance

Readme

@certivu/sdk

Official SDK for Certivu — quantum-resistant provenance for AI-generated content.

Certivu signs AI-generated content with ML-DSA (NIST FIPS 204) cryptographic signatures and invisible frequency-domain watermarks. Anyone can verify signed content without an account.

Install

npm install @certivu/sdk
# or
bun add @certivu/sdk

Requires Node.js 18+ (uses built-in fetch, Blob, crypto).

Quickstart

import { CertivuClient } from '@certivu/sdk'

const certivu = new CertivuClient({
  apiKey: 'ctv_key_abc123',
  generatorId: 'gen_xyz',
})

// Sign AI-generated content — returns the signed file + token
const { token, record_id, signedContent } = await certivu.sign({
  content: imageBuffer,   // Buffer or Uint8Array (image, audio, or text)
  model: 'stable-diffusion-xl',
  format: 'image',        // optional — auto-detected from magic bytes if omitted
})
// signedContent is a Uint8Array — serve this, it has provenance embedded

// Verify — token optional, extracted automatically from XMP or watermark
const result = await certivu.verify({ content: imageBuffer })

if (result.authentic && result.confidence === 'high') {
  console.log('Verified:', result.provenance?.org, result.provenance?.signed_at)
}

Get your API key and generator credentials at dashboard.certivu.ai.


API Reference

new CertivuClient(config)

| Field | Type | Required | Description | |---|---|---|---| | apiKey | string | Yes | API key from the dashboard (ctv_key_...) | | generatorId | string | No | Default generator ID for sign calls | | baseUrl | string | No | Override API base URL (default: https://api.certivu.ai) |


certivu.sign(input)

Signs AI-generated content server-side — watermarking, hashing, and ML-DSA signing all happen in the API. Accepts images (JPEG/PNG/WebP), audio (MP3/FLAC/WAV), and text (PDF/HTML/plain text). Returns the signed file with provenance embedded.

const { token, record_id, signedContent, format } = await certivu.sign({
  content: fileBuffer,             // Uint8Array | Buffer
  model: 'stable-diffusion-xl',   // model identifier
  generatorId: 'gen_xyz',         // overrides config.generatorId
  format: 'image',                // optional — 'image' | 'audio' | 'text', auto-detected if omitted
})
// signedContent — Uint8Array with provenance embedded (XMP / ID3 / meta tag / ZWC)
// format — the detected/confirmed format string
// watermarkedContent — alias for signedContent, kept for backwards compatibility

Upload limit: 50 MB.


certivu.verify(input)

Verifies content authenticity. Token is optional — extracted automatically from XMP metadata or the frequency-domain watermark.

const result = await certivu.verify({
  content: imageBuffer,   // Uint8Array | Buffer
  token: 'ctv_...',      // optional
})

Response shape:

{
  authentic: boolean,
  tampered: boolean,
  confidence: 'high' | 'medium' | 'low' | 'none',
  token_source: 'provided' | 'xmp' | 'watermark' | 'phash',
  format?: 'image' | 'audio' | 'text',
  signals: {
    watermark_found: boolean,
    record_found: boolean,
    signature_valid: boolean,
    phash_match?: boolean,
  },
  provenance: {
    org: string,
    model: string,
    signed_at: string,
  } | null,
  reason?: string,
}

| Confidence | Meaning | |---|---| | high | Watermark + record + signature all valid | | medium | Record + signature valid, no watermark | | low | Partial signals | | none | No provenance found — no claim either way |

Absence of provenance does not imply human origin.


certivu.verifyBatch(items)

Verify up to 50 items in a single request.

const { results } = await certivu.verifyBatch([
  { content: image1, token: token1 },
  { content: image2 },
])

certivu.getAuditLog(options?)

const { events, total } = await certivu.getAuditLog({ page: 1, limit: 50 })

certivu.getTokenStatus(token)

Lightweight CDN-cacheable status lookup — no image upload needed.

const status = await certivu.getTokenStatus('ctv_7f3kx9mq2...')
// { generator_status: 'active' | 'revoked', model, signed_at, org_id }

certivu.getAnalyticsOverview(days?)

Verification analytics summary. Plan-gated: Free = 7-day, Starter = 30-day, Growth+ = 90-day.

const overview = await certivu.getAnalyticsOverview(30)
// { total_verifications, tamper_count, authentic_count, daily_trend, top_records, period_days }

certivu.getRecordAnalytics(recordId)

Per-record verification drill-down. Growth+ required.

const record = await certivu.getRecordAnalytics('rec-uuid')
// { confidence_breakdown: { high, medium, low, none }, recent_events, ... }

certivu.listWebhooks()

const { endpoints, webhooks_enabled } = await certivu.listWebhooks()

certivu.createWebhook(input)

Register a new HTTPS endpoint. Growth+ required. The secret in the response is shown once.

const endpoint = await certivu.createWebhook({
  url: 'https://your-app.example.com/certivu',
  events: ['record.created', 'verify.tamper_detected', 'quota.warning'],
})

certivu.deleteWebhook(webhookId)

await certivu.deleteWebhook('webhook-uuid')

Error handling

try {
  await certivu.sign({ content, model: 'sdxl' })
} catch (e) {
  if (e instanceof Error) {
    console.error(e.message)
  }
}

| Status | Meaning | |---|---| | 400 | Validation error | | 401 | Bad API key | | 402 | Quota exhausted (free tier) | | 403 | Generator doesn't belong to your org | | 404 | Generator not found or revoked | | 413 | Upload exceeds 50 MB limit |


Docs

Full documentation at docs.certivu.ai.