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

trustrouter

v0.2.1

Published

ERC-8004 reputation-aware service router — discover, rank, and route to the best services and agents on-chain

Readme

TrustRouter

npm version

ERC-8004 Reputation-Aware Service Router

Discover, rank, and route to the best services on-chain — agents, MCP tools, oracles, APIs, DeFi bots, and anything registered on ERC-8004. TrustRouter queries the public TrustRouter Cloud API (backed by the Identity and Reputation registries) to instantly find the highest-trust provider for any given task.

"Reputation-aware routing: Middleware that ingests ERC-8004 reputation data and dynamically routes requests to the best-performing service for a given task at a given moment."Vitto Rivabella, ERC-8004 co-creator

What It Does

  • Discovers all registered services from the ERC-8004 Identity Registry — agents, MCP servers, oracles, APIs, and more
  • Scores them using on-chain reputation feedback from the Reputation Registry
  • Ranks by a composite trust score (reputation + activity)
  • Filters by service type (A2A, MCP, OASF, x402) and keyword matching
  • Routes you to the best available provider for your task

Works as a CLI tool for humans and an OpenClaw skill for agents. Zero config, no API keys needed.

Quick Start

# Run directly with npx (no install needed)
npx trustrouter@latest list

# Or install globally
npm install -g trustrouter

TrustRouter works out of the box using the public TrustRouter Cloud API — zero API keys or RPC URLs required.

# Find the best service for a task
trustrouter find --task "price feed oracle" --chain base

# List all services ranked by reputation
trustrouter list --chain ethereum --sort reputation

# Inspect a specific service (by ID or name)
trustrouter inspect 42 --chain arbitrum
trustrouter inspect "PriceFeedOracle" --chain base

Commands

| Command | Description | |---------|-------------| | trustrouter find --task "..." [--type mcp\|a2a] [--chain ethereum] | Find best service for a task | | trustrouter list [--chain ethereum] [--sort reputation] [--limit 20] | List all registered services | | trustrouter inspect <id-or-name> [--chain ethereum] | Full details of a service (by ID or name) |

Speed & Caching: The CLI fetches data directly from the decentralized TrustRouter API (https://trustrouter-api...), completely bypassing slow RPC queries to deliver instant <200ms service routing. (Any direct RPC fallbacks are automatically cached locally in ~/.trustrouter/cache.json for 1 hour).

All commands support the global -o json flag for machine-readable output:

# JSON output (for scripts and agents)
trustrouter -o json list --limit 5
trustrouter -o json find --task "oracle" --chain base
trustrouter -o json inspect 42

# Pipe to jq
trustrouter -o json list --limit 100 | jq '.[].name'

Errors follow the same pattern — table mode prints Error: ... to stderr, JSON mode prints {"error": "..."} to stdout with a non-zero exit code.

Supported Chains

Supports all EVM chains where the ERC-8004 registries are deployed (via CREATE2):

  • Mainnets: Ethereum, Base, Arbitrum, Polygon, Avalanche, BNB, Gnosis, Linea, Celo
  • Testnets: Sepolia, Base Sepolia

Specify the chain using the -c or --chain flag (e.g., --chain base).

Trust Score Algorithm

trustScore = (0.6 × avg_reputation) + (0.4 × log(feedback_count))
  • Reputation — Average on-chain feedback score from the Reputation Registry getSummary()
  • Activity — Log-scale bonus based on the total number of feedback events

What Can Be Discovered

ERC-8004 is not just for agents — it's a universal service registry. TrustRouter discovers anything registered:

| Type | Example | |------|---------| | AI Agents | A2A-compatible autonomous agents | | MCP Servers | Tool providers, code sandboxes, database connectors | | Oracles | Price feeds, data providers, block time trackers | | DeFi Services | Liquidation bots, keeper networks, MEV searchers | | APIs | Any HTTP service with an endpoint |

Agent Integration

TrustRouter ships with a SKILL.md for OpenClaw agents. After installing, any agent can discover and route to ERC-8004 services autonomously:

"Find me the best MCP tool for price feeds on Ethereum"
→ trustrouter find --task "price feed" --type mcp --chain ethereum --json

Architecture

┌─────────────┐       ┌────────────────────┐
│  CLI / Agent │ ──fetch▸│  TrustRouter API   │
│   Commands   │       │  (Cloud Run)       │
└──────┬──────┘       └────────┬───────────┘
       │                       │
       ▼                       ▼
┌──────────────────────────────────────────┐
│          Google Cloud Firestore          │
│       (Indexed for instant sorting)      │
└──────────────────────┬───────────────────┘
                       │
              ┌────────▾─────────┐
              │  indexer.ts      │
              │  (Background Job)│
              └──────────────────┘

Advanced Usage (Custom RPCs)

TrustRouter works out of the box, but for heavy usage you can set custom RPC endpoints:

export ETH_RPC_URL="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"
export BASE_RPC_URL="https://mainnet.base.org"

Development

git clone https://github.com/nice-bills/trustrouter
cd trustrouter
npm install
npm run build
node dist/cli.js list --chain ethereum

License

MIT