This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Coinbase Developer Platform (CDP) SDK repository containing multi-language client libraries for creating, managing, and using crypto wallets. The SDK supports TypeScript, Python, and Go implementations.
typescript/- TypeScript/Node.js SDK implementationpython/- Python SDK implementationgo/- Go SDK implementationrust/- Rust SDK implementationexamples/- Working examples for all languagesopenapi.yaml- OpenAPI specification for the CDP API
# Install dependencies
pnpm install
# Build the SDK
pnpm build
# Run tests
pnpm test
# Run E2E tests
pnpm test:e2e
# Lint code
pnpm lint
# Fix linting issues
pnpm lint:fix
# Format code
pnpm format
# Check formatting
pnpm format:check
# Generate docs
pnpm run docs
# Generate Markdown docs
pnpm run docs:md
# Generate OpenAPI client
pnpm orval# Install dependencies (with dev dependencies)
uv sync
# Run tests
make test
# Run only unit tests (exclude E2E)
make e2e
# Lint
make lint
# Fix linting issues
make lint-fix
# Format code
make format
# Check formatting
make format-check
# Generate docs
make docs
# Generate OpenAPI client
make python-client# Clean and prepare
make clean
# Run tests
make test
# Lint code
make lint
# Fix linting issues
make lint-fix
# Generate OpenAPI client
make client
# Generate docs
make docs# Generate api.rs from openapi.yaml
# Note: This is required when openapi.yaml changes
# The build.rs script only runs when CDP_GENERATE=1 to avoid
# automatic generation during development
make generate
# Check code
make check
# Remove generated files and build artifacts
make clean
# Clean and prepare
make build
# Run tests
make test
# Run end-to-end tests
make test-e2e
# Lint code
make lint
# Fix linting issues
make lint-fix
# Format code
make format
# Generate docs
make docs# Update OpenAPI specification
make update-openapi
# Check if OpenAPI spec is up to date
make check-openapiTypeScript SDK:
CdpClient- Main client for API interactionsEvmServerAccount- Server-managed EVM accountsEvmSmartAccount- Smart contract accounts for EVMSolanaAccount- Server-managed Solana accounts- Account management, transaction signing, and policy controls
- Account types for EVM and Solana blockchains
- Compatible with Viem for Ethereum interactions
Python SDK:
CdpClient- Main client classEvmServerAccount- Server-managed EVM accountsEvmSmartAccount- Smart contract accountsSolanaAccount- Server-managed Solana accounts- Account types for EVM and Solana blockchains
- Compatible with Web3.py for Ethereum interactions
Go SDK:
- JWT-based authentication system
- OpenAPI generated client
- Multi-blockchain support (EVM chains, Solana)
- Server-managed and local account types
- Policy engine for operation controls
- Smart account (Account Abstraction) support
- Unit tests for core functionality
- E2E tests requiring live API credentials
- Mock Service Worker (MSW) for HTTP mocking in TypeScript
- Pytest fixtures and mocking in Python
openapi.yaml- API specification (auto-updated from CDN)- Language-specific configs:
pyproject.toml,package.json,go.mod,Cargo.toml - Linting: ESLint (TS), Ruff (Python), golangci-lint (Go)
- CI/CD via language-specific workflows
The examples/ directory contains working code samples for:
- Account creation and management
- Transaction sending and signing
- Token transfers and swaps
- Policy management
- Smart account operations
Each language has its own examples directory with runnable scripts.