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

@lyhna/bind

v0.2.0

Published

Safe Commit for Autonomous Systems

Readme

@lyhna/bind

bind() is a commit gate for autonomous systems.

If a license/receipt exists, execution proceeds. If it doesn’t, execution cannot occur.

Lyhna turns “an agent wants to do something irreversible” into a signed, offline-verifiable receipt.

Install

npm i @lyhna/bind

(For deterministic demos, you can also install from a local tarball you packed:)

npm i ./lyhna-bind-0.1.0.tgz

API

This package exports two functions:

bind(request) → returns a signed receipt (LYHNA_RECEIPT_V1)

verifyReceipt(receipt) → returns true/false (offline verification)

Request shape (required fields)

{

action_type: string,

payload_hash: string,

authority_tier: "TIER_1" | "TIER_2" | "TIER_3" | "SOVEREIGN",

intent: string

}

Example: generate receipts + prove offline verification

Create demo.mjs with the following contents:

import fs from "node:fs";

import { bind } from "@lyhna/bind";

function write(name, obj) {

fs.writeFileSync(name, JSON.stringify(obj, null, 2), "utf8");

console.log(WROTE ${name} outcome=${obj.outcome});

}

async function main() {

const base = {

action_type: "vendor_payment",

payload_hash: "sha256:demo_payload_hash_001",

intent: "invoice_payment_v1",

};

// APPROVED (TIER_3)

const approved = await bind({ ...base, authority_tier: "TIER_3" });

write("receipt-approved.json", approved);

// ESCALATED (TIER_1)

const escalated = await bind({ ...base, authority_tier: "TIER_1" });

write("receipt-escalated.json", escalated);

// TAMPERED COPY (modify one field after signing)

const tampered = { ...approved, payload_hash: "sha256:TAMPERED_payload_hash_999" };

fs.writeFileSync("receipt-tampered.json", JSON.stringify(tampered, null, 2), "utf8");

console.log("WROTE receipt-tampered.json (tampered payload_hash)");

}

main().catch((e) => {

console.error(e);

process.exit(1);

});

Create verify.mjs with the following contents:

import fs from "node:fs";

import { verifyReceipt } from "@lyhna/bind";

const file = process.argv[2];

if (!file) {

console.error("Usage: node verify.mjs <receipt.json>");

process.exit(1);

}

const receipt = JSON.parse(fs.readFileSync(file, "utf8"));

const valid = await verifyReceipt(receipt);

console.log(JSON.stringify({ file, valid }, null, 2));

Run:

node demo.mjs

node verify.mjs receipt-approved.json

node verify.mjs receipt-escalated.json

node verify.mjs receipt-tampered.json

Expected:

receipt-approved.json → valid: true

receipt-escalated.json → valid: true

receipt-tampered.json → valid: false

CLI (if enabled)

If your install exposes the lyhna binary:

lyhna verify receipt-approved.json

(If the CLI isn’t wired yet, the verify.mjs script above is the canonical offline verifier.)