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

rosud

v0.1.0

Published

Rosud SDK — AI agent USDC payment infrastructure

Readme

rosud · TypeScript SDK

AI agent USDC payment infrastructure — Official TypeScript/JavaScript SDK

npm install rosud
# or
pnpm add rosud

Quick Start

import Rosud from 'rosud'

const client = new Rosud({ apiKey: 'rosud_live_xxx' })
// or set ROSUD_API_KEY environment variable

// Create a payment
const payment = await client.payments.create({
  amount: 5.00,
  to: '0x742d35Cc6634C0532925a3b8D4C9E3Ff9C4A6bB',
  memo: 'api_call_fee',
})
console.log(payment.id, payment.status)

// Check balance
const { usdc } = await client.wallets.balance()
console.log(`Balance: ${usdc} USDC`)

// List recent payments
const { items } = await client.payments.list({ limit: 10, status: 'confirmed' })

Usage

Payments

// Create payment
const payment = await client.payments.create({
  amount: 1.50,
  to: '0xRecipient...',
  memo: 'service_fee',
  idempotency_key: 'unique-key-001', // safe to retry
})

// List payments
const { items, total } = await client.payments.list({
  status: 'confirmed',
  limit: 20,
  offset: 0,
})

// Get single payment
const p = await client.payments.get('payment-id')

Agents

// Create agent with spending limits
const agent = await client.agents.create({
  name: 'trading-bot-1',
  spending_limit_daily: 1000,   // max $1000/day
  spending_limit_per_tx: 100,   // max $100/tx
})
// agent.api_key is returned only on creation — save it!

// List agents
const agents = await client.agents.list()

// Delete agent
await client.agents.delete(agentId)

Webhooks

// Register webhook
const webhook = await client.webhooks.create({
  url: 'https://your-server.com/webhooks/rosud',
  events: ['payment.confirmed', 'payment.failed'],
  secret: 'your-hmac-secret',
})

// List webhooks
const hooks = await client.webhooks.list()

// Delete webhook
await client.webhooks.delete(webhookId)

Error Handling

import Rosud, { RosudError } from 'rosud'

try {
  await client.payments.create({ amount: 5, to: '0x...' })
} catch (e) {
  if (e instanceof RosudError) {
    console.error(e.status, e.code, e.message)
    // e.g.: 400 'insufficient_balance' 'Not enough USDC balance'
  }
}

Environment Variables

| Variable | Description | |---|---| | ROSUD_API_KEY | Your Rosud API key (required if not passed to constructor) |

Links