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

@orangecheck/stamp-ots

v0.1.1

Published

OpenTimestamps calendar client, proof helpers, and anchor-verification hooks for OC Stamp envelopes. See https://github.com/orangecheck/oc-stamp-protocol.

Readme

@orangecheck/stamp-ots

OpenTimestamps calendar client, proof helpers, and anchor-verification hooks for OC Stamp envelopes.

Install

npm i @orangecheck/stamp-core @orangecheck/stamp-ots

What it does

OC Stamp envelopes carry an optional ots field that anchors the envelope id to a Bitcoin block via the OpenTimestamps protocol. This package provides the thin client-side glue:

  • submitToCalendars(id, opts) — POST the envelope's 32-byte digest to one or more OTS calendars. Returns a pending OtsProof you can fold into the envelope's ots field.
  • upgradeProof(proof, id, opts) — poll calendars for an upgraded proof once OTS has anchored the containing batch to a Bitcoin block. Returns a confirmed OtsProof when available.
  • createCalendarClient(url) — low-level HTTP client implementing the minimal OTS calendar API (POST /digest, GET /timestamp/<hex>).
  • makeAnchorVerifier({ walkProof, headerSource }) — adapter that turns a proof-parser plus a block-header source into a function verify() (from @orangecheck/stamp-core) can call via its verifyOtsAnchor parameter.

What it does NOT do

This package does not ship a full OpenTimestamps proof parser. Parsing the binary proof format (Merkle path chunks, calendar attestations, Bitcoin attestations) requires a larger, maintained library like javascript-opentimestamps. We keep this package's dependency surface narrow and expose walkProof as a plug-in point.

Consumers who want fully-offline verification should combine:

import { verify } from '@orangecheck/stamp-core';
import { makeAnchorVerifier, adaptAnchorVerifier, base64Decode, hexDecode } from '@orangecheck/stamp-ots';
import { myOtsParser, myHeaderSource } from './your-adapters';

const anchor = makeAnchorVerifier({
    walkProof: myOtsParser,
    headerSource: myHeaderSource,
});

const result = await verify({
    envelope: env,
    verifyOtsAnchor: adaptAnchorVerifier(anchor, (blockHash) => hexDecode(env.id)),
    verifyBip322: myBip322Verifier,
});

Usage

Submit an envelope to calendars

import { stamp } from '@orangecheck/stamp-core';
import { submitToCalendars, toStampOts } from '@orangecheck/stamp-ots';

const env = await stamp({ /* ... */ });
const proof = await submitToCalendars(env.id);  // uses DEFAULT_CALENDARS
const envWithOts = { ...env, ots: toStampOts(proof) };
// envWithOts now has a pending OTS proof.

Upgrade later

import { upgradeProof, fromStampOts, toStampOts } from '@orangecheck/stamp-ots';

const current = fromStampOts(envWithOts.ots!);
const upgraded = await upgradeProof(current, envWithOts.id, {
    parseAnchor: myOtsParser, // plug in your OTS proof parser
});
const envUpgraded = { ...envWithOts, ots: toStampOts(upgraded) };

Exports

  • submitToCalendars(id, opts) / upgradeProof(proof, id, opts)
  • createCalendarClient(url, opts) / DEFAULT_CALENDARS
  • makeAnchorVerifier(config) / adaptAnchorVerifier(verifier, digestLookup)
  • toStampOts(proof) / fromStampOts(stampOts) — shape adapters
  • base64Encode / base64Decode / hexEncode / hexDecode
  • Types: OtsProof, CalendarClient, AnchorVerifier, BlockHeaderSource, etc.

See SPEC.md §6 for the normative OTS integration.