This file provides guidance to Claude Code when working with code in this repository.
ATXP SDK is a TypeScript monorepo providing client and server libraries for the ATXP payment protocol. It supports multiple blockchain networks (Solana, Base, World Chain, Polygon) and integrates with MCP (Model Context Protocol) for AI agent payments.
# Install dependencies
npm ci
# Build all packages
npm run build
# Type check all packages
npm run typecheck
# Lint all packages
npm run lintIMPORTANT: Run tests package-by-package because the root level npm run test tends to hide test failures.
# Run tests for a specific package
npm test -w packages/atxp-common
npm test -w packages/atxp-client
npm test -w packages/atxp-server
npm test -w packages/atxp-express
npm test -w packages/atxp-x402
# etc.
# Run all package tests individually (recommended for CI validation)
for pkg in packages/*/; do
echo "Testing $pkg..."
npm test -w "$pkg" || exit 1
doneThis is an npm workspaces monorepo with the following packages:
packages/atxp-common- Shared types and utilitiespackages/atxp-client- Client-side SDK for making paymentspackages/atxp-server- Server-side SDK for receiving paymentspackages/atxp-express- Express.js middleware integrationpackages/atxp-cloudflare- Cloudflare Workers integrationpackages/atxp-base- Base chain supportpackages/atxp-solana- Solana chain supportpackages/atxp-polygon- Polygon chain supportpackages/atxp-worldchain- World Chain supportpackages/atxp-x402- X402 payment protocol supportpackages/atxp-sqlite- SQLite storage for OAuth tokenspackages/atxp-redis- Redis storage for OAuth tokens
Packages depend on each other via workspace references. When adding new types or exports to @atxp/common, ensure:
- The type is exported from
src/index.ts - Run
npm run build -w packages/atxp-commonto regenerate dist files - Other packages will pick up changes via TypeScript project references
If you see TypeScript errors about missing properties in workspace packages, check package-lock.json for nested node_modules/@atxp/* entries that point to npm registry versions instead of local workspace versions. Remove these entries and run npm ci again.