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

@c402/cli

v0.1.0

Published

Call any c402 endpoint from the terminal: inspect the 402 handshake, pay with your wallet, and verify the TEE attestation on-chain.

Readme

@c402/cli

Call any c402 confidential-compute endpoint from the terminal - this repo's treasury/payroll endpoints or anyone else's. Inspect the 402 handshake, pay with your wallet, and verify the TEE attestation on-chain.

# from the repo (no build step - Node runs the .ts directly):
node packages/c402-cli/src/index.ts <command>
# or, once linked as a bin, simply:  c402 <command>

Commands

c402 inspect <url> - no wallet needed

Decodes the 402 handshake: the Compute-Required header (TEE, compute contract, input/output schema) and the x402 PAYMENT-REQUIRED header (price, token, network).

c402 inspect http://localhost:4021/v1/decide

c402 call <url> - pay with your wallet

Pays the endpoint over x402 and prints the attested result. The payment is an EIP-3009 signed authorization (the facilitator relays it), so the wallet needs the settlement token (e.g. Sepolia USDC) but not gas. The attestation is re-verified on-chain unless you pass --no-verify.

c402 call http://localhost:4021/v1/decide \
  --key 0x<privkey> --rpc https://…sepolia \
  --body '{"exposure":6000,"signal":50}'

| Option | Meaning | |---|---| | --key <hex> | payer wallet key (or env C402_KEY / SEPOLIA_PRIVATE_KEY) | | --rpc <url> | RPC URL (or env SEPOLIA_RPC_URL) | | --network <caip2> | CAIP-2 network id (default eip155:11155111) | | --body <json> / --body-file <path> | request body | | --no-verify | skip on-chain attestation re-verification | | --json | print raw JSON only (pipe .attestation into c402 verify) |

c402 verify <attestation.json> - standalone, no server

Re-reads the commitment from chain and confirms it matches the attestation. Exit code 0 = valid.

c402 call <url> --json | jq .attestation > att.json
c402 verify att.json --rpc https://…sepolia

Notes

  • Works against any c402 server; the URL is the only thing that ties it to a particular app.
  • Browser (injected/MetaMask) paying is not handled here - this CLI uses a key-based wallet, which is the right shape for scripts and agents.