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

@metrix-mx/mtx-conformance

v0.1.1

Published

Conformance suite + CLI for Metrix-compliant backends. Validates the Backend Standard contract.

Downloads

231

Readme

@metrix-mx/mtx-conformance

Conformance suite + CLI for backends that emit .mtx. Runs over HTTP — the backend exposes the standard endpoints (§6 of the Backend Standard), the suite hits them and reports pass/fail per test.

The certification language is T<n>·S<n>, e.g. T1·S0. Trust and Scale are orthogonal axes, both declared by the backend in /api/health and verified by the suite tags.

Usage

Once a backend is running and has a fixture campaign loaded under a known id:

npx mtx-conformance run \
  --backend https://cam.metrix.com.mx \
  --trust T1 \
  --scale S0 \
  --token "$BEARER" \
  --campaign-id minimal-T0

Optional flags:

  • --json — emit machine-readable output suitable for CI parsing.

What's tested today

T0 — issuer identifiable, no signature required

| Id | Verifies | |---|---| | T0.health.responds | /api/health returns 200 with schema_version, standard_version, compliance.trust, compliance.scale, issuer_did. | | T0.export.minimal_campaign | /api/campaigns/<id>/export.mtx returns a structurally valid .mtx for the minimal fixture. | | T0.export.evidence_count_matches | manifest.counts.evidence_items equals evidence.json.items.length. | | T0.did.well_known_resolves | /.well-known/did.json returns a W3C-compliant DID document. | | T0.manifest.issuer_id_matches_did | manifest.issuer.id resolves to the same DID document. | | T0.merkle.root_recomputable | Recomputing SHA-256 over non-excluded files reproduces manifest.integrity.merkle_root. |

T1 — issuer signs the manifest

| Id | Verifies | |---|---| | T1.export.signed_manifest | integrity/manifest.sig is exactly 64 bytes raw (no JSON wrapper); manifest.signature_ref declares it. | | T1.signature.verifies_with_did_document | Ed25519 signature verifies against publicKeyMultibase from the issuer DID document, using JCS canonicalization without signature_ref. |

Not yet implemented

T2 (custody multi-parte), S1 (companion mode), signature.canonicalization_reproducible. We add them when the first design partner reaches that level — currently every backend in development is T0–T1 / S0.

Self-test

The package ships a reference HTTP server (src/test-server.ts) that fronts the in-memory adapter from @metrix-mx/mtx-exporter. The Vitest suite (tests/run-against-self.test.ts) spins it up and runs every test against it. If npm test passes, the conformance suite is internally consistent — useful as a sanity check after adding tests.

cd packages/mtx-conformance
npm test

Pre-seeding fixtures into a backend

Conformance is HTTP-level, so it can't seed its own fixtures via API. Each backend exposes its own seeding mechanism (admin endpoint, CLI, fixture loader). The required state for a T1·S0 run:

  1. Ontology ontology:test/v1 (provided in fixtures/ontologies/test/v1.json) is registered.
  2. A campaign with id minimal-T0 (or whatever you pass to --campaign-id) is loaded with the contents of fixtures/campaigns/minimal.json.
  3. The campaign status is closed.
  4. The issuer's DID document is reachable at /.well-known/did.json.

For the metrix-cam migration, treat fixtures as part of the staging environment seeding scripts, not the production database.