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

djd-agent-score-client

v0.2.0

Published

TypeScript client for the DJD Agent Score API — on-chain reputation for AI agents

Readme

djd-agent-score-client

TypeScript client SDK for the DJD Agent Score API --- on-chain reputation scoring for autonomous AI agents on Base L2.

Install

npm install djd-agent-score-client

Quick Start

import { DJDAgentScore } from 'djd-agent-score-client'

const client = new DJDAgentScore({
  baseUrl: 'https://djd-agent-score.fly.dev',
})

// Free: basic score (10/day)
const basic = await client.getBasicScore('0x1234...')
console.log(basic.score, basic.tier) // 72 "Established"

// Free: leaderboard
const lb = await client.getLeaderboard()

// Free: economy metrics
const economy = await client.getEconomyMetrics('daily', 7)

Paid Endpoints (x402)

Paid endpoints require a payment header provider that generates x402 USDC payment headers:

const client = new DJDAgentScore({
  baseUrl: 'https://djd-agent-score.fly.dev',
  paymentHeaderProvider: async (endpoint, price) => {
    // Your x402 payment logic here
    return base64EncodedPaymentHeader
  },
})

// $0.10 USDC --- full score with dimensions
const full = await client.getFullScore('0x1234...')

// $0.25 USDC --- force recalculation
const fresh = await client.refreshScore('0x1234...')

// $0.02 USDC --- submit fraud report
await client.submitReport({
  target: '0xbad...',
  reporter: '0xgood...',
  reason: 'payment_fraud',
  details: 'Failed to deliver on x402 payment',
})

API Reference

| Method | Endpoint | Price | Description | |--------|----------|-------|-------------| | getBasicScore(wallet) | GET /v1/score/basic | Free (10/day) | Basic score + tier | | getFullScore(wallet) | GET /v1/score/full | $0.10 | Full score + dimensions | | refreshScore(wallet) | GET /v1/score/refresh | $0.25 | Force recalculation | | submitReport(body) | POST /v1/report | $0.02 | Report fraud | | getLeaderboard() | GET /v1/leaderboard | Free | Top 50 agents | | getEconomyMetrics(period, limit) | GET /v1/data/economy | Free | Ecosystem health | | registerAgent(body) | POST /v1/agent/register | Free | Register agent | | submitCompute(wallet) | POST /v1/score/compute | --- | Async compute | | pollJob(jobId) | GET /v1/score/job/:id | --- | Check job status | | waitForScore(wallet) | --- | --- | Poll until complete |

Error Handling

import { DJDScoreError } from 'djd-agent-score-client'

try {
  await client.getBasicScore('invalid')
} catch (err) {
  if (err instanceof DJDScoreError) {
    console.log(err.status) // 400
    console.log(err.body)   // { error: 'Invalid wallet address' }
  }
}

Configuration

const client = new DJDAgentScore({
  baseUrl: 'https://djd-agent-score.fly.dev',
  timeoutMs: 15_000,      // Request timeout (default: 30s)
  maxRetries: 3,           // Retry on 5xx (default: 2)
  paymentHeaderProvider,   // x402 payment header generator
  fetch: customFetch,      // Custom fetch implementation
})

License

MIT