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

@uor-foundation/uor-addr

v0.2.0

Published

Typed content-addressing — deterministic, verifiable sha256:<64hex> κ-labels from JSON / S-expressions / XML / ASN.1 DER / schema.org / in-toto. Wraps the uor-addr-wasm Component Model via jco-transpiled glue.

Downloads

398

Readme

@uor-foundation/uor-addr

JavaScript / TypeScript bindings for uor-addr — typed content-addressing producing deterministic sha256:<64hex> κ-labels from JSON, S-expressions, XML, ASN.1 DER, schema.org, in-toto, and more.

Wraps the uor-addr-wasm WASM Component Model artifact via jco. The produced κ-label is byte-for-byte identical to the Rust crate's output.

Install

npm install @uor-foundation/uor-addr

Runs anywhere a WebAssembly engine is available — Node, Deno, Bun, Cloudflare Workers, and the browser. The package is a single self-contained ES module: the WebAssembly is inlined, so there are no node: imports, no fetch, and no sidecar .wasm asset to resolve.

Quickstart

import { kappa } from "@uor-foundation/uor-addr";

const label = kappa.jsonAddress(new TextEncoder().encode('{"foo":"bar"}'));
console.log(label);
// sha256:7a38bf81f383f69433ad6e900d35b3e2385593f76a7b7ab5d4355b8ba41ee24b

API

Eleven *-address functions, one per realization (json, sexp, xml, asn1, ring, codemodule, the three schema-* descendants, gguf, onnx). Each takes a Uint8Array and returns a 71-byte ASCII string of the form sha256:<64-lowercase-hex>. Failures throw with a wasm-runtime error carrying the realization's address-error variant — invalid-input or pipeline-failure (too-large is reserved and never thrown under ADR-060: inputs are unbounded).

| Function | Realization | Imported spec | |---|---|---| | kappa.jsonAddress | JSON | RFC 8259 + RFC 8785 JCS + UAX #15 NFC | | kappa.sexpAddress | S-expressions | Rivest 1997 canonical form | | kappa.xmlAddress | XML | W3C XML-C14N 1.1 (subset) | | kappa.asn1Address | ASN.1 | ITU-T X.690 DER | | kappa.ringAddress | Ring elements | UOR-Framework Amendment 43 §2 | | kappa.codemoduleAddress | Code-module AST | CCMAS | | kappa.schemaPhotoAddress | schema.org/Photograph | schema.org/Photograph | | kappa.schemaDocumentAddress | schema.org/Article (+ subtypes) | schema.org/Article | | kappa.schemaCodemoduleSignedAddress | in-toto Statement v1 | in-toto Statement v1 |

Determinism + canonical-form invariance

The κ-label is deterministic — the same input bytes always produce the same label. It is also invariant under each format's canonical-form rules:

const enc = new TextEncoder();

// JSON: whitespace, key order, NFC vs NFD all collapse.
const a = kappa.jsonAddress(enc.encode('{"a":1,"b":2}'));
const b = kappa.jsonAddress(enc.encode('{ "b" : 2 , "a" : 1 }'));
console.assert(a === b);

// But it DISTINGUISHES typed values that look similar.
const intLabel = kappa.jsonAddress(enc.encode("42"));
const strLabel = kappa.jsonAddress(enc.encode('"42"'));
console.assert(intLabel !== strLabel);

TC-05 replay across the wasm boundary

Each *AddressWithWitness function returns a Grounded resource carrying the ψ-pipeline's emitted derivation. Calling grounded.verify() replays the derivation through prism_verify::certify_from_trace and returns the recovered κ-label without re-invoking SHA-256. The verifier reads the trace events the source pipeline emitted and re-packages the certified output (QS-05 replay equivalence; CL-R* in CONFORMANCE.md).

import { kappa } from "@uor-foundation/uor-addr";

const grounded = kappa.jsonAddressWithWitness(
  new TextEncoder().encode('{"foo":"bar"}'),
);

console.log(grounded.kappaLabel());
// sha256:7a38bf81f383f69433ad6e900d35b3e2385593f76a7b7ab5d4355b8ba41ee24b

console.log(grounded.verify() === grounded.kappaLabel());
// true — TC-05 round-trip; SHA-256 was not re-invoked.

const fp: Uint8Array = grounded.contentFingerprint();
// 32-byte content fingerprint (distinct from the κ-label hex suffix —
// it is prism's content-address of the Grounded's full state).

The Grounded resource is managed by the Component Model runtime; let it go out of scope to release the underlying handle. Cross-process attestation is not supported (the underlying Trace<256> constructor is pub(crate) in uor-foundation); for that, persist the κ-label itself and re-mint at the verifier side.

Byte identity with the Rust crate

The κ-label this package produces is byte-for-byte identical to uor_addr::<realization>::address(input).address from the Rust crate. Cross-validation is pinned by the CF-W* invariant class in CONFORMANCE.md.

Building from source

# From the workspace root — build the zero-import core module:
cargo build -p uor-addr-wasm --target wasm32-unknown-unknown --release

# Then in this directory:
cd bindings/npm
npm install
npm run build      # componentizes + inlines the wasm into one ES module
npm test           # smoke-tests every realization

License

Apache-2.0. See LICENSE.