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

mememage-resolver

v0.1.0

Published

Resolve a Mememage identifier to a record over configured mirrors, then check its integrity by hash. The network layer — mirror walk, per-source timeout, fallback. Fetch and the verify math are injected.

Readme

mememage-resolver

Resolve a Mememage identifier to a record over configured mirrors, then check its integrity — framework-agnostic, dependency-free.

A Mememage bar carries an identifier and a content hash. The identifier is a lookup key, not an authority. This module walks an ordered list of record sources (mirrors), takes the first that has the record, and checks it against the hash in the bar. The source is never trusted: the content hash is the authority, so a mirror can only fail to verify, never forge.

It owns the mirror walk, the per-source timeout, and the fallback. It is I/O-injected — you provide fetch and the verify math from the mememage SDK.

Install

npm install mememage-resolver mememage

Use

import { createResolver } from "mememage-resolver";
import { computeContentHash, isSupportedHashVersion } from "mememage";

const resolver = createResolver({
  fetch,                                              // your HTTP fetch
  verifyMath: { computeContentHash, isSupportedHashVersion },
  sources: [                                          // ordered mirrors; first hit wins
    "https://souls.mememage.art",
    "https://archive.org/download/{id}",             // {id} substitutes the identifier
  ],
  timeout: 5000,                                       // per-source ms
});

// bar comes from the detector / a decode: { identifier, contentHash }
const verdict = await resolver.verify(bar);
// -> { state: "verified" | "altered" | "norecord" | "error" | "nosource" | "unsupported", ... }

const found = await resolver.fetchRecord(bar.identifier);
// -> { ok, url, source } | { noSource } | { notFound, detail }

sources and timeout also accept a function (sync or async), so you can back them with live config that changes at runtime:

createResolver({ fetch, verifyMath, sources: () => readMyMirrors(), timeout: () => readMyTimeout() });

Per call, opts overrides them: resolver.verify(bar, { sources, timeout }).

Mirror format

A source is a URL base. {id} is substituted with the identifier; the resolver then tries <base>/<id>.json and <base>/<id>.soul.

  • https://souls.mememage.arthttps://souls.mememage.art/<id>.json
  • https://archive.org/download/{id}https://archive.org/download/<id>/<id>.json

Verdicts

| state | Meaning | |---|---| | verified | The record's content hash matches the bar. Integrity confirmed. | | altered | A record was found, but it recomputes to a different hash. | | norecord | Every source answered, none had the record. | | error | One or more sources timed out or were unreachable. | | nosource | No sources configured. | | unsupported | The record uses a hash model this check does not cover. Not tampering. |

verify returns the source and recordUrl that answered, plus a human detail/reason for the non-verified states.

License

MIT © Catmemes