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

@inkandswitch/onomancy

v0.3.0

Published

Wasm/JavaScript bindings for Onomancer (browser and Node.js)

Readme

onomancy_wasm

[!WARNING] Alpha software. Interfaces, wire formats, and specifications change without notice — use at your own risk.

Wasm/JavaScript bindings for Onomancer (browser and Node.js). Built as an npm package with wasm-bodge.

Verification runs entirely locally, from trust anchors compiled into the module. DNS proves one direction — that a zone names a document — and a certificate proves the other, that the document accepts the hostname back. Either alone is insufficient: anyone controlling any signed zone can point it at any document, so a resolved name is not an authenticated one until both directions agree. See the DNS anchoring specification §Verification.

What's inside

  • buildInfo(){ version, revision }. The version does not identify an artifact (two builds can share one); the embedded source revision does. Check it before debugging anything else.
  • Name (JsName) — the three-anchor name grammar: parse, normalize, and inspect anchors and segments. Names carry no version pins (# is reserved; pinning is edge data, not grammar).
  • doh — the DNS-over-HTTPS chain courier (RFC 8484 POST, message ID 0): DohProvider drives the sans-IO chain builder (onomancy_chain) over global-scope fetch(), so it works in windows, workers, and Node 18+ alike. The transport is exactly as untrusted as the socket one — validation happens locally.
  • resolveHostname(hostname, dohUrl?, nowSeconds?) — the one-call live walk: fetch the chain over DoH, validate it from the baked-in IANA anchors inside the Wasm module, and grade freshness. Returns { hostname, links, records, freshness, window: { inception, expiration }, checkedAt }. window and checkedAt are the inputs to the freshness decision, returned so a caller can check the work: checkedAt - window.expiration is how far a stale chain has lapsed, and comparing checkedAt to your own clock detects skew, which is otherwise indistinguishable from staleness. Pass nowSeconds to grade at a fixed instant — validation is pure over bytes, so one captured chain can be graded deterministically in tests.
  • verifyCertificate(bytes, hostname, nowSeconds?) — the other direction, for a certificate that arrived out of band (gossip, QR, a file). Checks the signature, the hostname, the DNSSEC chain from the baked-in anchors, the zone's cross-check, and the Keyhive delegation carriage. Returns { hostname, document, serial, freshness, generation, window, checkedAt }.
  • verifyBinding(held, anchor, hostname, nowSeconds?) — the same check, reading the certificate from a held document's reserved well-known path (following at most one hop of indirection). Replication stays the substrate's job: supply the document with hold().
  • signableBytes(rootDoc, signer, issuedAt, hostname) / encodeCertificate(…, signature, carriage, chain) — certificate issuance without the module ever holding a key. Assembly takes a signer, never key material: the Signing type ({ verifyingKey, sign }) is the contract. The signer MUST sign the bytes verbatim — a signer that frames its input (length prefix, domain tag, envelope) produces a signature encodeCertificate rejects, and no caller-side adjustment can fix that. resolveHostname returns the chain ready to pass through.

The delegation check replays each certificate's carriage into a throwaway Keyhive instance and discards it, so nothing here shares state with an application's own Keyhive — no second stateful instance, and verdicts depend only on the evidence presented.

Verification is not optional: there is no build of this package that resolves a name but cannot check it. verifyBinding additionally needs the document substrate, so it follows the names feature; verifyCertificate is always present.

Demo

A browser demo lives at demo/index.html (the pkg/ directory is generated — see demo/README.md for build steps). It runs against production DNS in browsers and Node 18+.