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

pqs-verify

v0.1.0

Published

Verify x402 API endpoints before payment. Trust primitive for the agent economy.

Readme

pqs-verify

Verify x402 API endpoints before payment. Trust primitive for the agent economy.

PQS (Protocol Quality Standard) is a Certificate Authority for AI agents. Before your agent pays for an API endpoint via x402 micropayments, check if the endpoint is PQS-verified — trusted, attested on-chain, and meeting quality standards.

Think of it as Let's Encrypt for AI Agents.

Install

npm install pqs-verify

Quick Start

const { verifyEndpoint, shouldPay } = require('pqs-verify');

// Check if an endpoint is trusted
const result = await verifyEndpoint('https://api.example.com/data');
console.log(result.trusted); // true or false

// One-liner: should my agent pay this endpoint?
const safe = await shouldPay('https://api.example.com/data');

Integration Examples

Basic Verification

const { verifyEndpoint } = require('pqs-verify');

const check = await verifyEndpoint('https://api.example.com/signal');

if (check.trusted) {
  console.log('Endpoint is PQS-verified');
  console.log('On-chain attestation:', check.eas_uid);
  // proceed with request/payment
} else {
  console.log('NOT verified — do not pay');
}

x402 Payment Flow

Check PQS trust before sending x402 payment:

const { verifyEndpoint } = require('pqs-verify');

async function payIfTrusted(endpointUrl) {
  const check = await verifyEndpoint(endpointUrl);

  if (!check.trusted) {
    console.log('Blocked: endpoint not PQS-verified');
    return;
  }

  // Safe to pay via x402
  const response = await fetch(endpointUrl, {
    headers: { 'X-PAYMENT': x402PaymentToken }
  });

  return response.json();
}

Agent Middleware

Auto-check every endpoint before payment — drop into any agent framework:

const { shouldPay } = require('pqs-verify');

async function agentRequest(url, paymentFn) {
  if (!await shouldPay(url)) {
    throw new Error(`PQS: ${url} not verified`);
  }
  return paymentFn(url);
}

Python (CrewAI / LangChain)

Equivalent pattern using requests:

import requests

def pqs_verify(endpoint_url):
    r = requests.get(
        'https://api.smartflowproai.com/pqs/verify',
        params={'endpoint': endpoint_url},
        timeout=5
    )
    data = r.json()
    return data.get('valid', False)

# Use in your agent's tool
if pqs_verify('https://api.example.com/data'):
    # safe to pay
    pass

API Reference

verifyEndpoint(url, options?)

Verify a single endpoint against PQS CA.

Returns: { trusted, cert, score, tier, eas_uid, raw }

| Field | Type | Description | |-------|------|-------------| | trusted | boolean | Whether the endpoint is PQS-verified | | cert | object\|null | Certificate details if verified | | score | number\|null | PQS quality score | | tier | string\|null | PQS tier (e.g. "standard", "premium") | | eas_uid | string\|null | On-chain EAS attestation UID | | raw | object | Full API response |

shouldPay(url, options?)

Quick boolean: should an agent pay this endpoint?

Returns false on network errors (fail-safe).

Options: { baseUrl, timeout, minScore }

listVerified(options?)

Get all verified endpoints from PQS CA.

Returns: { total, ca_public_key, certs: [...] }

health(options?)

Check PQS CA health status.

stats(options?)

Get PQS CA statistics.

Options (all functions)

| Option | Default | Description | |--------|---------|-------------| | baseUrl | https://api.smartflowproai.com/pqs | PQS CA server URL | | timeout | 5000 | Request timeout in ms | | minScore | 0 | Minimum PQS score (shouldPay only) |

PQS Leaderboard

See verified endpoints and their scores: pqs-leaderboard.pages.dev

License

MIT