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

clawdoe

v0.7.3

Published

Payments infrastructure for the agentic economy. SDK, CLI, and MCP server for AI agents on Base and x402.

Readme

Clawdoe

Payments infrastructure for the agentic economy. SDK, CLI, and MCP server for AI agents on Base and x402.

Your agent calls an API. It gets an x402, handles payment with USDC on Base, returns the payload, and more... with one line of code.

Install

npm install clawdoe

Quick Start

const clawdoe = require("clawdoe");
const { privateKeyToAccount } = require("viem/accounts");

// generate local wallet
const { privateKey, address } = clawdoe.wallet();

// initialize viem account
const account = privateKeyToAccount(privateKey);

// initialize client
const client = clawdoe({ apiKey: "clw_...", account });

// register agent with human dashboard
await client.register({ name: "weather-agent" });

// check balance
const { eth, usdc } = await client.balance();

// send USDC
await client.send({ amount: 4.2, to: "0x..." });

// fetch with integrated x402 orchestration
const res = await client.fetch("https://api.weather.com/forecast");

How client.fetch() Works

  1. Makes a normal GET request
  2. If the server responds with 402 Payment Required, decodes the x402 payment details
  3. Signs a USDC payment via EIP-3009 (gasless, no tx from the agent)
  4. Retries the request with the payment signature
  5. Returns the data

The agent just writes client.fetch(url). Everything else is handled.

Client Initialization

The client accepts any viem-compatible Account — local private keys, CDP wallets, Privy, or any custom signer. The account is required. The apiKey is optional and enables connection with your Clawdoe dashboard.

const { privateKeyToAccount } = require("viem/accounts");

// local private key
const account = privateKeyToAccount("0x...");
const client = clawdoe({ apiKey: "clw_...", account });
// Coinbase CDP wallet
const { CdpClient } = require("@coinbase/cdp-sdk");
const { toAccount } = require("viem/accounts");

const cdp = new CdpClient();
const account = toAccount(await cdp.evm.createAccount());
const client = clawdoe({ apiKey: "clw_...", account });

| Parameter | Type | Description | | --------- | ------- | ---------------------------------------------- | | account | Account | A viem Account object. Required. | | apiKey | string | Clawdoe API key (clw_...). | | network | string | "mainnet" or "testnet". Defaults to "mainnet". | | rpc | string | Custom RPC endpoint. Defaults to base.org. |

Methods

clawdoe.wallet()

Generate a new Ethereum wallet. Static method — no client needed.

const { privateKey, address } = clawdoe.wallet();

client.register({ name })

Register an agent on the Clawdoe dashboard. Requires apiKey. Idempotent — safe to call on every startup.

await client.register({ name: "weather-agent" });

client.balance()

Check ETH and USDC balance on Base.

const { address, eth, usdc } = await client.balance();

client.send({ amount, to })

Send USDC on Base. Amount is in dollars.

const { amount, to, tx_hash } = await client.send({ amount: 4.2, to: "0x..." });

client.fetch(url, { x402max? })

Fetch a URL with integrated x402 orchestration.

// default — pays whatever the server requires
const res = await client.fetch("https://api.weather.com/forecast");

// capped at $0.69
const res = await client.fetch("https://api.weather.com/forecast", { x402max: 0.69 });

// disabled — just a normal fetch
const res = await client.fetch("https://api.weather.com/forecast", { x402max: 0 });

// standard response
const data = await res.json();

CLI

# save credentials
clawdoe config --apiKey clw_... --privateKey 0x... --network mainnet

# generate wallet
clawdoe wallet

# register agent
clawdoe register --name "weather-agent"

# check balance
clawdoe balance

# send USDC
clawdoe send --amount 4.20 --to 0x...

# fetch with integrated x402 orchestration
clawdoe fetch https://api.weather.com/forecast
clawdoe fetch https://api.weather.com/forecast --x402max 0.69
clawdoe fetch https://api.weather.com/forecast --x402max 0

MCP Server

Any MCP-compatible AI agent (Claude, ChatGPT, etc.) can use Clawdoe tools natively and locally. Add this to your config:

{
	"mcpServers": {
		"clawdoe": {
			"command": "npx",
			"args": ["clawdoe", "mcp"],
			"env": {
				"CLAWDOE_API_KEY": "clw_...",
				"CLAWDOE_WALLET_PRIVATE_KEY": "0x...",
				"CLAWDOE_NETWORK": "mainnet"
			}
		}
	}
}

Skills: wallet, register, balance, send, fetch

Environment Variables

| Variable | Description | | ---------------------------- | ---------------------------------------------- | | CLAWDOE_API_KEY | API key. Required to connect with dashboard. | | CLAWDOE_WALLET_PRIVATE_KEY | Private key. Used by CLI and MCP. | | CLAWDOE_NETWORK | "mainnet" or "testnet". Defaults to "mainnet". | | CLAWDOE_RPC | Custom RPC endpoint. Defaults to base.org. |

Links

License

MIT