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

json-record

v0.1.0

Published

A lightweight, tamper-evident, hash-linked ledger for JSON or binary payloads, with optional WebCrypto signatures.

Readme


json-record gives you chronological integrity: a guarantee that a sequence of blocks has not been altered, reordered, or truncated. It does not enforce authenticity or authorship; it simply ensures the history is intact.


Why json-record?

Most applications do not need a blockchain, or consensus protocol.
They just need a simple, deterministic way to ensure that:

  • events were appended in order
  • nothing was removed
  • nothing was rewritten

json-record gives you that primitive, nothing more and nothing less.

It is ideal for:

  • local-first apps
  • PWAs
  • offline-capable audit logs
  • tamper-evident histories
  • deterministic event journals

Features

  • Minimal, deterministic block format
  • SHA-256 hashing for payload and block headers
  • Hash-linked chain structure (prevHash)
  • Full chain verification
  • Zero dependencies
  • Works in browsers and Node

Environment Support

json-record runs anywhere WebCrypto is available:

  • Node.js 18+ (global crypto.subtle)
  • Browsers
  • Service workers
  • Deno
  • Bun
  • Edge runtimes (Cloudflare Workers, Vercel, etc.)

No filesystem access, no platform-specific APIs, no dependencies.
A pure, deterministic, in-memory primitive.


What json-record guarantees

json-record provides tamper-evident ordering:

  • A block's payload cannot be changed without detection
  • A block's header cannot be changed without detection
  • Blocks cannot be removed, inserted, or reordered without detection
  • The entire chain can be verified end-to-end

This is the same integrity model used by Git commit chains and linear Merkle-style journals.


What json-record does not guarantee

json-record does not provide:

  • authenticity
  • authorship
  • permissions
  • identity
  • access control

If you need to prove who created the data, seal the payload with json-seal before storing it in the trail.

json-record stays intentionally minimal.


Usage

Creating a block

import { createBlock } from "json-record";

const payload = new TextEncoder().encode("hello world");

const block0 = await createBlock(payload);
const block1 = await createBlock(payload, block0);

Verifying a block

import { verifyBlock } from "json-record";

const ok = await verifyBlock(block1);
console.log(ok); // true

Verifying a chain

import { verifyChain } from "json-record";

const chain = [block0, block1];
const ok = await verifyChain(chain);
console.log(ok); // true

Recommended: Authenticity with json-seal

If you want to prove where the data came from, seal the payload before putting it into the trail:

import { generateKeyPair, signPayload } from "json-seal";
import { createBlock } from "json-record";

const { privateKey, publicKey } = await generateKeyPair();

const sealed = await signPayload({ foo: 123 }, privateKey, publicKey);

const block = await createBlock(
  new TextEncoder().encode(JSON.stringify(sealed))
);

This gives you:

  • authenticity of the payload (json-seal)
  • chronological integrity of the chain (json-record)

A clean, layered integrity model.


Storage

json-record is an in-memory primitive.
For persistence, serialize blocks however you like.

A recommended format:

{
  "version": 1,
  "blocks": [ ... ]
}

json-record does not define a storage format.
You choose how to store, sync, or replicate the chain.


Design Philosophy

json-record is intentionally small:

  • no I/O
  • no storage format
  • no key management
  • no assumptions about payloads
  • no built-in authenticity

It is a primitive, not a framework.
You build the policies on top.


Prior Art

json-record builds on a long lineage of cryptographic integrity primitives:

  • Git commit chains
  • Merkle-style hash chains
  • Blockchain data structures (without consensus or networking)
  • Certificate Transparency logs
  • Secure audit log research

json-record distills these ideas into a tiny, deterministic, dependency-free primitive designed for local-first apps, PWAs, and in-memory trails. It offers integrity without the complexity.


License

MIT