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

@suimpp/discovery

v0.2.1

Published

Sui-specific discovery validation for MPP servers — validate OpenAPI documents and probe 402 payment challenges

Readme

@suimpp/discovery

Sui-specific discovery validation for MPP servers. Validate OpenAPI documents, check x-payment-info extensions, and probe 402 payment challenges.

npm License: MIT

CLI

# Full validation — OpenAPI + live 402 probe
npx @suimpp/discovery check mpp.t2000.ai

# List paid endpoints only
npx @suimpp/discovery discover mpp.t2000.ai

# Machine-readable JSON
npx @suimpp/discovery check mpp.t2000.ai --json

Example output

t2000 MPP Gateway v1.0.0
https://mpp.t2000.ai/openapi.json

  Endpoints: 88 total, 88 paid

  POST   /openai/v1/chat/completions  $0.01
  POST   /openai/v1/embeddings        $0.001
  ...

  Discovery
  ✓ OpenAPI valid

  Probe https://mpp.t2000.ai/openai/v1/chat/completions
  ✓ 402 with Sui payment challenge
    Recipient: 0x...
    Currency:  0xdba...::usdc::USDC
    Realm:     mpp.t2000.ai

  ✓ All checks passed

Programmatic Usage

import { check, discover, probe } from '@suimpp/discovery';

// Full validation
const result = await check('mpp.t2000.ai');
console.log(result.ok);              // true
console.log(result.summary.errors);  // 0

// Discovery only (no probe)
const disc = await discover('mpp.t2000.ai');
for (const ep of disc.endpoints) {
  console.log(ep.method, ep.path, ep.paymentInfo.price);
}

// Probe a specific endpoint
const probeResult = await probe(
  'https://mpp.t2000.ai/openai/v1/chat/completions',
  'https://mpp.t2000.ai',
);
console.log(probeResult.hasSuiPayment); // true
console.log(probeResult.recipient);     // 0x...

What it validates

OpenAPI checks

  • OpenAPI 3.1.x version
  • x-payment-info on paid operations
  • protocols includes "mpp"
  • 402 response defined
  • requestBody on POST/PUT/PATCH
  • Price format for fixed pricing
  • x-guidance or x-service-info present
  • Route count warning (>80)

Probe checks (Sui-specific)

  • Server returns 402 Payment Required
  • Payment challenge extractable (body or WWW-Authenticate header)
  • Recipient is a valid Sui address (0x...)
  • Currency is recognized Sui USDC type
  • Realm matches the server's public domain

Validation codes

| Code | Severity | Description | |------|----------|-------------| | OPENAPI_FETCH_FAILED | error | Could not fetch /openapi.json | | OPENAPI_VERSION_INVALID | error | Not OpenAPI 3.1.x | | NO_PAID_ENDPOINTS | error | No operations with x-payment-info | | MISSING_402_RESPONSE | error | Paid operation missing 402 response | | MISSING_REQUEST_BODY | warning | POST/PUT/PATCH without requestBody | | MISSING_PROTOCOLS | warning | No protocols field in x-payment-info | | PROTOCOL_NOT_MPP | error | protocols does not include "mpp" | | MISSING_PRICING | error | Fixed pricing with no price | | HIGH_ROUTE_COUNT | warning | >80 paid routes | | PROBE_NOT_402 | error | Endpoint did not return 402 | | PROBE_INVALID_RECIPIENT | error | Not a valid Sui address | | PROBE_UNKNOWN_CURRENCY | warning | Unrecognized Sui token type | | PROBE_REALM_MISMATCH | error | Realm doesn't match origin |

Testing

pnpm --filter @suimpp/discovery test       # 19 tests
pnpm --filter @suimpp/discovery typecheck

License

MIT