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

@stratumn/fossilizer-client

v0.1.5

Published

A client to interact with a Chainscript fossilizer.

Readme

Chainscript Fossilizer Client

A fossilizer takes some data and provides an externally-verifiable proof of existence for that data. It also provides a relative ordering of the events that produced fossilized data.

Stratumn provides multiple fossilizer implementations and anyone can build a new fossilizer that meets their trust/scalability requirements.

Some fossilizer implementations can be found here.

For example, if you use a Bitcoin fossilizer, a merkle tree will be built from a batch of data and will be included in a Bitcoin transaction. Since the Bitcoin blockchain is immutable, you'll have a record that your data existed at block N. Since Bitcoin provides block ordering, you will also be able to prove that some data was produced before or after some other data.

Another possibility is to use a trusted authority to act as a fossilizer. It could be a bank, a government or a regulatory body. It would sign your data with the timestamp at which it received it and send back that signature. If you trust that entity, you can trust its timestamp so it provides a relative ordering for your events.

Usage: HTTP client

Fossilize complex data

import { FossilizerHttpClient } from "@stratumn/fossilizer-client";
import { sha256 } from "js-sha256";

// This is the url where you host your fossilizer.
const fossilizerEndpoint = "https://fossilize.your-domain.com";

const client = new FossilizerHttpClient(fossilizerEndpoint);
const myComplexData = {
  user: {
    name: "batman",
    city: "paris"
  },
  action: {
    description: "fought crime",
    year: 2018
  }
};

// You should always fossilize a hash of your data or a commitment, not the
// data directly.
// This way the fossilizer service doesn't know what data you are fossilizing.
// And it's also cheaper to store small hashes/commitments in a blockchain.
await client.fossilize(
  sha256(JSON.stringify(myComplexData)),
  "batman's hall of fame"
);

Subscribe to notifications

Fossilization is done asynchronously. For blockchain fossilizers, it's a lot cheaper to batch multiple fossils in a single blockchain transaction (usually the merkle root of the batch).

If you want to be notified when your data has been successfully fossilized, you should provide an event handler to the constructor:

import {
  FossilizedEvent,
  FossilizerHttpClient
} from "@stratumn/fossilizer-client";

// This is the url where you host your fossilizer.
const fossilizerEndpoint = "https://fossilize.your-domain.com";

const client = new FossilizerHttpClient(
  fossilizerEndpoint,
  (e: FossilizedEvent) => {
    if (e.meta === "batman is down") {
      callRobin(e.evidence);
    }
  }
);

await client.fossilize(
  "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592",
  "batman is down"
);

Provide a custom logger

The http client accepts an optional logger argument. If you are interested in logging the events raised by this package, here is how you can do it:

import {
  FossilizedEvent,
  FossilizerHttpClient
} from "@stratumn/fossilizer-client";

// Custom client that sends logging events to the console.
const client = new FossilizerHttpClient(
  "http://localhost:6000/",
  (e: FossilizedEvent) => {
    console.info(e);
  },
  {
    info(event: any) {
      console.info(event);
    },
    warn(event: any) {
      console.warn(event);
    },
    error(event: any) {
      console.error(event);
    }
  }
);