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

@totemsdk/wots-lease

v0.1.3

Published

WOTS key-use coordination — canonical v3 watermark, provider-based lease safety layers

Readme

@totemsdk/wots-lease

WOTS key safety — prevents catastrophic signature slot reuse.

⚠️ WOTS keys are one-time use. Reusing a signing slot leaks the private key and permanently destroys the security of that address. This package is the guardian that prevents it from happening.

Coordinates key-use watermarks across devices and sessions so no signing slot is ever allocated twice.

Install

npm install @totemsdk/wots-lease

What's inside

Core stores

| Class | What it does | |-------|-------------| | WotsWatermarkStore | Canonical v3 watermark tracking; flatIndex maps (l1, l2) → flat slot number | | LeaseJournal | Append-only audit log of every signing slot allocation |

Provider tiers

| Provider | Use case | |----------|----------| | LocalLeaseProvider | Single-device, in-process coordination | | AxiaLeaseProvider | Cloud-coordinated leases via Axia API | | HybridLeaseProvider | Local-first with Axia sync fallback | | PersonalLeaseNodeProvider | Coordinates through your personal lookup node (ready for implementation) | | P2PQuorumLeaseProvider | Multi-device quorum consensus (stub) | | OnchainWatermarkProvider | On-chain watermark anchoring (stub) |

Device range splitting

import { allocateDeviceRange } from '@totemsdk/wots-lease';

// Split 262,144 signing slots across 4 devices without overlap
const range = allocateDeviceRange({ deviceIndex: 0, totalDevices: 4 });
// { start: 0, end: 65535 }

Error types

| Error | Meaning | |-------|---------| | WatermarkMonotonicityError | Attempted to use a slot at or before the current watermark | | WatermarkExhaustedError | All 262,144 signing slots for this address have been used | | DeviceRangeViolationError | Slot is outside this device's allocated range |

Usage

Local (single device)

import { LocalLeaseProvider, WotsWatermarkStore } from '@totemsdk/wots-lease';

const store    = new WotsWatermarkStore(storageAdapter);
const provider = new LocalLeaseProvider(store);

// Allocate the next available signing slot
const slot = await provider.allocateSlot({ addressIndex: 0 });
console.log('Use flat slot:', slot.flatIndex); // e.g. 42

// After signing, commit the watermark
await provider.commitSlot(slot);

Hybrid (local + Axia cloud backup)

import { HybridLeaseProvider } from '@totemsdk/wots-lease';

const provider = new HybridLeaseProvider({
  local: new LocalLeaseProvider(store),
  remote: new AxiaLeaseProvider({ baseUrl: 'https://api.axia.to', projectId: '...' }),
  syncIntervalMs: 60_000,
});

Audit log

import { LeaseJournal } from '@totemsdk/wots-lease';

const journal = new LeaseJournal(storageAdapter);
const entries = await journal.getEntries({ addressIndex: 0 });
entries.forEach(e => console.log(e.flatIndex, e.allocatedAt, e.committedAt));

See also