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

@neabyte/trustless-id

v0.1.0

Published

Time-bound anonymous ID: request, decode, verify. No server

Readme

Trustless ID

Anonymous ID: request, decode, verify time-bound. No server, no storage.

Node Deno Bun Browser

Module type: ESM npm version JSR CI License

Features

  • Trustless — No server or DB; key from a shared identifier (connectorId) both sides agree on.
  • Connector-bound — Same connectorId = same pair; others can’t decode or verify.
  • Request, decode, verifyrequestdecode to codeIdverify with user input (number or digits).
  • Time-bound — Payloads expire automatically and predictably in 1–60 seconds (configurable).
  • Session IDhashId can be one-time per session (default) or stable per user for repeated identity proof.

Installation

[!NOTE] Prerequisites: For Deno install from deno.com. For npm use Node.js (e.g. nodejs.org).

npm:

npm install @neabyte/trustless-id

Deno (JSR):

deno add jsr:@neabyte/trustless-id

Quick Start

Use a connector ID (connectorId) (e.g. service URL or app identifier) on both sides. Generate a one-time hashId via generate(connectorId), create an instance via create(connectorId), build a requestId via request(hashId, expireTime?), then client decodes to a numeric code (codeId) to show the user; verifier checks the user-entered code with verify(requestId, secret).

import trustless from '@neabyte/trustless-id'

// Connector ID (same on both sides)
const connectorId = 'trustless://auth/example.com:0.1.0?service=none'

// One-time hashId per session
const hashId = trustless.generate(connectorId)

// Instance for connector (same on client and verifier)
const instance = trustless.create(connectorId)

// Build payload; send requestId to verifier (QR / link / form)
const requestId = instance.request(hashId, 10)

// Client decodes to get code (show to user so they can type it at verifier)
const codeId = instance.decode(hashId, requestId)
if (codeId !== null) {
  console.log('Code:', codeId)
  // Verifier side: check user-entered secret
  console.log('Verify:', instance.verify(requestId, codeId))
}

TOTP vs Trustless-ID

| Aspect | TOTP | Trustless-ID | | -------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Secret | A shared secret is generated and stored by both the server and the user (e.g. in an authenticator app). | No stored secret. Only a connector ID (connectorId) (e.g. service URL or app identifier) is agreed on; the key is derived from it when needed. | | Code derivation | Code is computed from the shared secret and the current time window (e.g. 30s) using HMAC-SHA1. | Code is derived from the session’s hashId and the encoded requestId using a FNV-1a–style mix; time is embedded in the request payload. | | Server / backend | A server (or backend) must store the secret per user and validate the code on each login. | No server or database. Client uses same connectorId to derive key, decode to code; verifier uses same connectorId to verify the user-entered code locally. | | Typical use | Two-factor authentication (2FA): prove that the user possesses the shared secret at login time. | One-time pairing or repeated identity: same connector; client uses requestdecode → code, verifier uses verify. Use a new hashId per session (anonymous) or one stable hashId per user (repeated proof, no server storage). |

Documentation

  • USAGE.md — Full API, flow, and type reference; how to use the library end-to-end and every method.
  • USECASE.md — Use cases to clarify flow and architecture (actors, channels, secure vs leak conditions).

Build & Test

From the repo root (requires Deno).

Check — format, lint, and typecheck source:

deno task check

Unit tests — format/lint tests and run all tests:

deno task test

Tests live under tests/ (Trustless flow, Cipher, Security, Expiration, EdgeCases).

License

This project is licensed under the MIT license. See the LICENSE file for details.