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

@solidus-network/capture

v0.1.0

Published

Embeddable web ID-capture SDK: mountCapture() gives guided camera capture with real quality gating and on-device MRZ/barcode extraction (via @solidus-network/id-extract); createCapture({publishableKey}) adds tenant white-label + policy for Solidus Verify

Readme

@solidus-network/capture

Embeddable web ID-document capture: guided camera UI, honest quality gating, and on-device MRZ/barcode extraction. Framework-free — works in any web app; React/Next users mount it inside an effect.

Try it before installing: live demo at capture.solidus.network/demo — runs entirely in your browser, nothing is uploaded.

npm i @solidus-network/capture

Quickstart (React / Next.js)

'use client'

import { useEffect, useRef } from 'react'
import { mountCapture, type CaptureWidgetResult } from '@solidus-network/capture'

export default function CaptureDemo() {
  const mountRef = useRef<HTMLDivElement>(null)

  useEffect(() => {
    if (!mountRef.current) return
    const widget = mountCapture(mountRef.current, {
      docType: 'national-id', // ID-1 card; MRZ side (back) by default
      onResult: (result: CaptureWidgetResult) => {
        // Extracted ON-DEVICE — the image never left the browser.
        console.log('autofill fields', result.autofill)
        console.log('confidence', result.confidence, 'source', result.source)
      },
    })
    return () => widget.unmount()
  }, [])

  return <div ref={mountRef} style={{ width: '100%', maxWidth: 480, margin: '0 auto' }} />
}

Open the page over HTTPS (or localhost) — browsers only expose the camera on secure origins.

Quickstart (vanilla)

<div id="capture" style="max-width: 480px"></div>
<script type="module">
  import { mountCapture } from 'https://esm.sh/@solidus-network/capture'

  mountCapture(document.getElementById('capture'), {
    docType: 'national-id',
    onResult: (result) => console.log(result.autofill),
  })
</script>

What you get

  • Guided capture — rear-camera preview, document frame guide, live guidance driven by real signals (lighting, glare, a four-border rectangle check, an MRZ-band probe). The guide turns to the accent color and the copy says "Looks good — tap Capture" only when a document actually frames the guide in good light.
  • Quality gating — captures are manual; the widget tells the user why conditions aren't good yet ("Find better light", "Reduce glare…") instead of pretending.
  • On-device extraction — the captured frame goes to @solidus-network/id-extract in the same browser tab: barcode first (PDF417 / QR / DataMatrix / Code128 via zxing-wasm), then MRZ OCR (tesseract.js, OCR-B whitelist) with checksum-validated reconstruction.
  • Typed autofillresult.autofill carries { given_name, family_name, birth_date, nationality, document_number } ready for your form. result.document_expiry when read.
  • A file-upload fallback — desktops without a camera (and users who decline it) can upload a photo through the same extraction path.

What it honestly does NOT do (v0.1)

Read this before integrating — these are real limits, not fine print:

  • Passport (TD3) MRZ is not parsed on-device yet. Checksum-validated reconstruction covers TD1 (ID-1 cards: national IDs, residence permits, many driving licenses). For passports the widget still guides and captures, but autofill will be null with needs_server_fallback: true — route the returned file to your own backend OCR if you need passports today.
  • Barcodes are decoded, not parsed. You get { format, text } per barcode; AAMVA (US/CA license) field parsing is not included.
  • No face match, no liveness, no document-authenticity scoring in this package. Those are server-side tooling in the Solidus Verify platform — this SDK is the capture + extraction layer.
  • A checksum-valid read is not identity proofing. It proves the MRZ was read correctly, nothing more.

When on-device confidence is low the result says so (confidence: 'low', needs_server_fallback: true) — nothing is silently made up.

OCR engine loading

Extraction engines are lazy: nothing heavy loads at import. On the first capture (or at mount, warmup: true by default) tesseract.js fetches its WASM core and English traineddata using its package defaults (network download, a few MB, cached by the browser). Fully self-hosted setups can pass a custom extractor wired to @solidus-network/id-extract's extractDocument(image, { ocr: { langPath, gzip } }).

Platform features (optional, keyed)

Everything above is keyless — no account, no network calls with document data. Separately, clients of the Solidus Verify Capture platform can resolve their tenant's white-label theme + verification policy:

import { createCapture } from '@solidus-network/capture'

const capture = createCapture({ publishableKey: 'vc_pk_…' })
const config = await capture.init() // white-label + policy + issuer standing
capture.applyTheme()

Platform onboarding is not yet generally available — if you want to issue portable, verifiable credentials from your captures (W3C SD-JWT VC, selective disclosure), contact [email protected].

Status — read honestly

  • 0.1.x — beta. API may change before 1.0.
  • Credential anchoring in the wider Solidus platform runs on testnet.
  • Solidus holds no third-party certifications for this SDK today (no iBeta PAD, no SOC 2, no ISO 27001, no eIDAS QTSP status). Assurance levels offered by the platform cap at L2 (documented remote verification), not supervised/eIDAS-High.
  • No accuracy/performance numbers are quoted anywhere in this README because we have not published measured ones.

Browser support

Evergreen Chrome / Edge / Firefox / Safari ≥ 16.4. Camera capture requires getUserMedia (secure origin). Extraction requires WebAssembly. ESM only.

License

Apache-2.0