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

twzrd-doorman

v0.3.0

Published

Agent identity + Path A V6 door: offline cNFT history tiers (free) and paid V6 trust enforcement (requireV6) so high-value routes force GET /v1/intel/trust (0.05 USDC) instead of free-preflight-only agents.

Readme

twzrd-doorman

Agent identity and Path A V6 enforcement at your door, offline, in one line.

const { doorman } = require('twzrd-doorman');

// Day 1: free cNFT history tiers (observe)
app.use(doorman());

// High-value: REJECT unless caller presents a paid Path A V6 (0.05 USDC).
// This is the revenue force — free preflight alone is not enough.
app.use('/high-value', doorman({
  mode: 'enforce',
  requireV6: true,
  v6Subject: 'GFpLvocNdEjnSsLH3VJQL6wGcjGxTbUBrj6fqN3Qe1Gs', // optional lock
}));
// -> 403 twzrd_doorman_v6_required + how to buy Path A

Why requireV6 exists (incentive integrity)

| Surface | Cost | What agent gets | |---------|------|-----------------| | Free preflight | $0 | allow | warn | block decision | | Path A GET /v1/intel/trust/{pubkey} | 0.05 USDC | signed V6 receipt only (same decision class already free) |

If nothing downstream rejects missing V6, rational software never pays. requireV6 is that rejection. Gate autoReceipt remains opt-in and upsell-only until a door (or host policy) makes the artifact mandatory.

Two receipt products (do not conflate)

| Product | Header | Source | Cost | Role | |---------|--------|--------|------|------| | cNFT history | x-twzrd-receipt | twzrd.xyz/r/<wallet>.json | free | identity tier from observed payment history | | Path A V6 | x-twzrd-v6-receipt | paid GET intel…/v1/intel/trust/{pubkey} | 0.05 USDC | portable signed trust; revenue SKU |

Checks

| Check | Proves | How | Network? | |---|---|---|---| | Control | caller IS the wallet | Ed25519 over host-bound challenge | no | | History (cNFT) | wallet has real paid history | free receipt, offline verify | no | | Path A V6 | paid portable trust for a subject | V6 offline verify + payer bind | no | | Standing | wallet not flagged since mint | free GET intel…/v1/grade/{wallet} | optional, fail-open |

tier is granted only when control AND cNFT history both pass. requireV6 needs control + verified V6 with preimage.payer === x-twzrd-wallet (anti free-ride on a leaked receipt).

Server side

const { doorman } = require('twzrd-doorman');

// Day 1: observe. Annotates req.twzrd, never blocks. See who's knocking.
app.use(doorman({ onInspect: (t) => metrics.count('twzrd_tier', t.tier || 'anon') }));

// When ready: tier your limits (free cNFT history).
app.use('/api', doorman({ mode: 'enforce', minTier: 'Silver', denyFlagged: true }));

// High-value / high-risk: force Path A V6 purchase.
app.use('/api/premium', doorman({
  mode: 'enforce',
  requireV6: true,
  v6Subject: process.env.MERCHANT_PAYTO, // V6 agent_id must match
  v6MinScore: 40,                        // optional
  v6MaxAgeSeconds: 7 * 24 * 3600,        // default 7d; 0 = no age check
}));

// Or your own policy:
app.use(doorman({
  mode: 'enforce',
  policy: (t) => t.tier === 'Platinum' || myRateLimiter.allow(t.wallet || ip),
}));

Works with anything Express-shaped. For other stacks, call the pure function:

const { inspect } = require('twzrd-doorman');
const verdict = await inspect(request.headers, { host: 'api.example.com' });

No code changes at all: the standalone door proxy

Any HTTP API gets a door without touching its code - front it with the proxy:

npx -p twzrd-doorman twzrd-doorman-proxy --upstream http://localhost:3000 --port 8402

Observe mode by default: requests pass through untouched, responses gain x-twzrd-door* headers, and your upstream receives the caller's verdict in x-twzrd-door-verdict (incoming x-twzrd-* credential headers are stripped, so callers can never inject a verdict). Opt into tiered limits or a floor:

twzrd-doorman-proxy --upstream http://localhost:3000 \
  --limits anon=60,proven=300,receipt=1200 \
  --mode enforce --min-tier Silver

# Path A V6 force (high-value upstream):
twzrd-doorman-proxy --upstream http://localhost:3000 \
  --mode enforce --require-v6 --v6-subject <merchant_or_subject_pubkey>

A 429/403 for cNFT tier tells the caller how to earn free history passage. A 403 twzrd_doorman_v6_required tells them how to buy Path A (0.05 USDC).

Agent side

const { presentTwzrd, presentV6 } = require('twzrd-doorman');

// Free cNFT history (identity tier)
const cnft = await fetch(`https://twzrd.xyz/r/${wallet}.json`).then(r => r.json());
const headers = presentTwzrd({ secretKey, host: 'api.example.com', receipt: cnft });

// Paid Path A V6 (high-value door) — buy then present
// const paid = await x402Fetch(`https://intel.twzrd.xyz/v1/intel/trust/${subject}`);
// const v6 = (await paid.json()).twzrd_receipt;
// Object.assign(headers, presentV6({ receipt: v6 }));

await fetch('https://api.example.com/thing', { headers });

Protocol (v1)

Headers, all optional - absence means anonymous, never an error (unless requireV6 enforce is on):

  • x-twzrd-wallet: base58 Ed25519 pubkey
  • x-twzrd-ts: unix seconds
  • x-twzrd-proof: base58 signature over twzrd-doorman/v1\n{host}\n{ts} (host-bound: no cross-door replay; time-bound: 300s default window)
  • x-twzrd-receipt: base64 of free cNFT history JSON from twzrd.xyz/r/<wallet>.json
  • x-twzrd-v6-receipt: base64 of paid Path A twzrd_receipt (AO reputation V6)

Guarantees

  • Offline core: control + history checks need no network and no TWZRD account.
  • Fail-open: any doorman error or TWZRD outage annotates and passes; your door never goes down because ours did. Enforcement denials happen only on explicit policy (minTier / denyFlagged / policy).
  • No new trust: the receipt key is published at https://api.twzrd.xyz/v1/receipts/pubkey, pinned in twzrd-receipt-verifier, and equals the verified on-chain creator of the genesis cNFT tree.

MIT.