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

@xpr-agents/sdk

v0.2.6

Published

TypeScript SDK for XPR Network Trustless Agent Registry - register agents, submit feedback, validate outputs, and manage escrow jobs

Readme

@xpr-agents/sdk

TypeScript SDK for the XPR Network Trustless Agent Registry.

XPR Agents Ecosystem

| Package | Description | |---------|-------------| | create-xpr-agent | Deploy an autonomous AI agent in one command | | @xpr-agents/sdk | TypeScript SDK for all four contracts | | @xpr-agents/openclaw | 55 MCP tools for AI assistants |

Installation

npm install @xpr-agents/sdk @proton/js

For browser/frontend usage with wallet integration:

npm install @xpr-agents/sdk @proton/js @proton/web-sdk

Quick Start

Read-Only Operations (No Wallet)

import { JsonRpc } from '@proton/js';
import { AgentRegistry, FeedbackRegistry, ValidationRegistry, EscrowRegistry, NETWORKS } from '@xpr-agents/sdk';

// Use NETWORKS.TESTNET for testnet, NETWORKS.MAINNET for mainnet
const rpc = new JsonRpc(NETWORKS.TESTNET.rpc);

// Initialize registries
const agents = new AgentRegistry(rpc);
const feedback = new FeedbackRegistry(rpc);
const validation = new ValidationRegistry(rpc);
const escrow = new EscrowRegistry(rpc);

// Query agents
const agent = await agents.getAgent('myagent');
const allAgents = await agents.listAgents({ active_only: true });

// Get trust score
const trustScore = await agents.getTrustScore('myagent');
console.log(`Trust score: ${trustScore.total}/100`);

// Query feedback
const agentFeedback = await feedback.listFeedbackForAgent('myagent');

// Query jobs
const job = await escrow.getJob(1);
const clientJobs = await escrow.listJobsByClient('clientacc');

Write Operations (With Wallet)

import ProtonWebSDK from '@proton/web-sdk';
import { AgentRegistry, FeedbackRegistry, NETWORKS } from '@xpr-agents/sdk';

// Connect wallet (use NETWORKS.MAINNET for production)
const net = NETWORKS.TESTNET;
const { link, session } = await ProtonWebSDK({
  linkOptions: {
    chainId: net.chainId,
    endpoints: [net.rpc],
  },
  selectorOptions: { appName: 'My App' },
});

// Initialize with session for write operations
const agents = new AgentRegistry(link.rpc, session);
const feedback = new FeedbackRegistry(link.rpc, session);

// Register as an agent
await agents.register({
  name: 'My AI Agent',
  description: 'An AI assistant',
  endpoint: 'https://api.myagent.com',
  protocol: 'https',
  capabilities: ['compute', 'ai'],
});

// Submit feedback
await feedback.submit({
  agent: 'otheragent',
  score: 5,
  tags: ['helpful', 'fast'],
  job_hash: 'abc123',
});

API Reference

AgentRegistry

| Method | Description | |--------|-------------| | getAgent(account) | Get agent by account name | | listAgents(options?) | List agents with optional filters | | getTrustScore(account) | Calculate trust score (0-100) | | register(data) | Register as an agent | | update(data) | Update agent metadata | | setStatus(active) | Toggle active status |

FeedbackRegistry

| Method | Description | |--------|-------------| | getFeedback(id) | Get feedback by ID | | listFeedbackForAgent(agent) | Get all feedback for an agent | | getAgentScore(agent) | Get aggregated score | | submit(data) | Submit feedback | | dispute(id, reason) | Dispute feedback |

ValidationRegistry

| Method | Description | |--------|-------------| | getValidator(account) | Get validator info | | listValidators(options?) | List validators | | getValidation(id) | Get validation by ID | | registerValidator(method, specs) | Register as validator | | validate(data) | Submit validation | | challenge(validationId, reason) | Challenge a validation | | stakeChallengeDeposit(id, amount) | Fund a challenge | | stake(amount) | Stake XPR as validator | | unstake(amount) | Request unstake (time-delayed) | | withdraw(unstakeId) | Withdraw after delay | | setValidatorStatus(active) | Toggle validator status | | cancelChallenge(id) | Cancel unfunded challenge |

EscrowRegistry

| Method | Description | |--------|-------------| | getJob(id) | Get job by ID | | listJobsByClient(client) | List jobs for a client | | listJobsByAgent(agent) | List jobs for an agent | | createJob(data) | Create a new job | | fundJob(jobId, amount) | Fund a job | | acceptJob(jobId) | Accept a job (agent) | | deliver(jobId, uri) | Submit deliverables | | approve(jobId) | Approve and release payment | | dispute(jobId, reason) | Raise a dispute |

Networks

| Network | Chain ID | Endpoints | |---------|----------|-----------| | Mainnet | 384da888... | https://proton.eosusa.io | | Testnet | 71ee83bc... | https://tn1.protonnz.com |

Types

All TypeScript types are exported:

import type {
  Agent,
  Feedback,
  Validator,
  Validation,
  Challenge,
  Job,
  Milestone,
  TrustScore,
} from '@xpr-agents/sdk';

License

MIT