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

myapi-asc

v0.1.1

Published

MyApi Agentic Secure Connection — Ed25519 per-request signing for AI agents.

Readme

myapi-asc

Ed25519 per-request signing for AI agents talking to MyApi. The agent's identity is its public key, not its IP or User-Agent — so workers can rotate freely without tripping the "suspicious device" alert.

Why

OAuth tokens identify the client, not the device. AI agents legitimately run from load-balanced workers with rotating IPs, missing User-Agent headers, and short-lived hosts. Binding a token to a device fingerprint produced false-positive alerts.

ASC fixes this: every request carries a fresh Ed25519 signature over <timestamp>:<tokenId>. The server verifies the signature against a registered public key. The key fingerprint is the agent's identity.

Install

In-repo for now — copy the packages/myapi-asc directory or symlink it. npm publish later.

npm install ./packages/myapi-asc

Use

Generate a keypair (once per agent)

const { generateKeypair } = require('myapi-asc');
const { publicKey, privateKey } = generateKeypair();
// Save privateKey securely on the agent host.
// Register publicKey in the MyApi dashboard → Connect an AI Agent.

Sign each request

const { sign } = require('myapi-asc');
const headers = sign({ privateKey, tokenId: 'tok_abcd...' });
// headers = { 'X-Agent-PublicKey': '...', 'X-Agent-Signature': '...', 'X-Agent-Timestamp': '...' }

await fetch('https://api.myapi.com/api/v1/identity', {
  headers: {
    Authorization: `Bearer ${rawToken}`,
    ...headers,
  },
});

Drop-in fetch wrapper

const { wrapFetch } = require('myapi-asc');
const myFetch = wrapFetch(fetch, {
  tokenId: 'tok_abcd...',
  privateKey,
  bearer: rawToken,
});

await myFetch('https://api.myapi.com/api/v1/identity');

Curl (no SDK)

TS=$(date +%s)
SIG=$(printf "$TS:$TOKEN_ID" | openssl pkeyutl -sign -inkey ed25519.pem -rawin | base64 -w0)
PUB=$(openssl pkey -in ed25519.pem -pubout -outform DER | tail -c 32 | base64 -w0)

curl -H "Authorization: Bearer $TOKEN" \
     -H "X-Agent-PublicKey: $PUB" \
     -H "X-Agent-Signature: $SIG" \
     -H "X-Agent-Timestamp: $TS" \
     https://api.myapi.com/api/v1/identity

First-time approval

The first signed request from an unregistered public key returns 403 DEVICE_APPROVAL_REQUIRED and surfaces a pending approval in the dashboard. Once the user clicks Approve, that public key is permanently associated with the token. Subsequent signed requests pass.

Replay protection

The server rejects requests whose X-Agent-Timestamp is more than 60s out of sync. Sign every request fresh — do not cache headers.