default

📁 coinbase/com 📅 7 days ago
1
总安装量
1
周安装量
#54701
全站排名
安装命令
npx skills add https://docs.cdp.coinbase.com

Agent 安装分布

mcpjam 1
claude-code 1
replit 1
windsurf 1
crush 1

Skill 文档

Capabilities

Coinbase Developer Platform (CDP) enables developers to build sophisticated onchain applications with secure wallet management, trading capabilities, payment processing, and AI agent integration. The platform provides both backend infrastructure for server-side operations and frontend solutions for user-facing applications, supporting EVM networks, Solana, and multiple blockchain ecosystems.

Skills

Wallet Management

Server Wallet v2

  • Create and manage EVM and Solana accounts programmatically
  • Multi-network support across all EVM-compatible chains
  • Secure key management via AWS Nitro Enclave Trusted Execution Environment (TEE)
  • Single Wallet Secret for all accounts with rotation capability
  • Smart account support (EIP-4337) with transaction batching and gas sponsorship
  • Viem compatibility for seamless integration with popular libraries
  • API: POST /v2/end-user-accounts (create accounts), POST /v2/evm-accounts/send-a-transaction (send transactions)

Embedded Wallets

  • User-friendly authentication via email OTP, SMS, and social logins (Google, Apple, X)
  • Instant wallet creation in under 500ms without seed phrases
  • Multi-device support (up to 5 devices per wallet)
  • Custom authentication via JWT for existing identity providers
  • Account management dashboard for monitoring user wallets
  • USDC rewards (3.35% APY) on wallet balances

Trading & Swaps

Trade API

  • Real-time price discovery and token swaps across multiple DEXes
  • Sub-500ms execution latency for algorithmic trading
  • Support for Ethereum and Base mainnet networks
  • Slippage protection and MEV-aware routing
  • Multi-strategy support: spot trading, arbitrage, market making, yield optimization
  • Integration with both CDP wallets and external wallet libraries (viem, web3.py)
  • API: POST /v2/evm-swaps/create-a-swap-quote (get swap quotes), execute swaps with automatic signing

Advanced Trade APIs

  • Order management (create, list, cancel orders)
  • Market data via REST and WebSocket
  • Futures and perpetual trading support
  • Portfolio management and fund transfers
  • Real-time order updates via WebSocket: wss://advanced-trade-ws.coinbase.com

Payment Processing

Onramp & Offramp

  • Enable users to buy crypto with fiat (onramp)
  • Convert crypto back to fiat (offramp)
  • Support for multiple payment methods and currencies
  • One-click purchase URLs for seamless UX
  • Apple Pay integration for onramp
  • Session token authentication for secure transactions
  • API: POST /onramp-apis/generating-onramp-url, POST /offramp-apis/generating-offramp-url

Payment Links & Invoicing

  • Create shareable payment URLs for cryptocurrency payments
  • Generate invoices with payment tracking
  • Webhook support for payment notifications
  • Direct fund receipt to Coinbase Business accounts

x402 Protocol

  • HTTP 402 payment protocol for micropayments
  • Facilitator role for payment settlement
  • Multi-network support with wallet integration
  • MCP server for agent-based payments

Staking & Rewards

Staking API

  • Support for multiple protocols: Shared ETH, Dedicated ETH, Solana
  • Stake or delegate funds to validators
  • Fetch staking rewards and historical balances
  • Claim staking rewards (alpha feature)
  • Staking address models for different use cases
  • API: POST /staking/build-a-new-staking-operation, GET /staking/fetch-staking-rewards

Delegation Guides

  • Support for 15+ blockchain networks (Aleo, Aptos, Avalanche, Axelar, Cardano, Celestia, Cosmos, EigenLayer, NEAR, Polkadot, Solana, Sui, and more)
  • Step-by-step delegation workflows with wallet integration

AI Agent Integration

AgentKit

  • Toolkit for AI agents to interact with blockchain networks
  • Secure wallet management for autonomous agents
  • Comprehensive onchain actions: transfers, swaps, smart contract deployments
  • Framework flexibility: works with LangChain, Eliza, Vercel AI SDK, and custom frameworks
  • Multi-network deployment on EVM chains and Solana
  • Extensible design for custom actions and wallet providers
  • Built on CDP SDK for seamless integration

Data & Analytics

Node API

  • JSON-RPC endpoints for EVM networks
  • Core EVM methods for blockchain interaction
  • Paymaster methods for gas sponsorship queries
  • Address history methods for transaction tracking

SQL API (Alpha)

  • Query decoded onchain data with SQL
  • Schema exploration and best practices
  • REST API access to blockchain data

Token Balances API

  • List token balances for accounts
  • Support for EVM and Solana networks
  • Available via CDP SDK and REST API

Address History

  • Track transaction history for addresses
  • Available via JSON-RPC and REST API

Smart Accounts & Advanced Features

Smart Accounts (EIP-4337)

  • Batch multiple transactions in single user operation
  • Gas sponsorship via paymasters
  • Spend permissions with custom access policies
  • Time-based and amount-based restrictions

Gas Sponsorship

  • Sponsor transaction fees for users
  • Paymaster integration for gasless transactions
  • Automatic gas optimization

Spend Permissions

  • Create and manage spending limits
  • Revoke permissions at any time
  • List active spend permissions

Authentication & Security

JWT Authentication

  • Secure API authentication with JSON Web Tokens
  • Support for custom authentication providers
  • OAuth2 integration for user authorization

API Key Management

  • Create and manage API keys in CDP Portal
  • Secret API keys for server-side operations
  • Wallet Secrets for transaction signing

Security Features

  • Trusted Execution Environment (TEE) for key management
  • Private keys never exposed to Coinbase or AWS
  • Multi-factor authentication (MFA) support
  • Security best practices documentation

Workflows

Create a Wallet and Send Funds

  1. Authenticate with CDP API credentials
  2. Create EVM or Solana account: POST /v2/evm-accounts or POST /v2/solana-accounts
  3. Request testnet funds via faucet: POST /v2/faucets/request-funds-on-evm-test-networks
  4. Send transaction: POST /v2/evm-accounts/send-a-transaction
  5. Monitor transaction status via block explorer

Execute a Token Swap

  1. Get price estimate: POST /v2/evm-swaps/get-a-price-estimate-for-a-swap
  2. Create swap quote: POST /v2/evm-swaps/create-a-swap-quote
  3. Execute swap with automatic signing (CDP wallet) or manual signing (external wallet)
  4. Monitor swap status and get transaction hash
  5. Verify swap completion on block explorer

Implement Embedded Wallet Authentication

  1. Initialize Embedded Wallet SDK with configuration
  2. Implement authentication method (email OTP, SMS, or social login)
  3. User signs in with familiar authentication
  4. Wallet automatically created and ready for transactions
  5. User can export keys anytime for self-custody

Build an AI Agent with AgentKit

  1. Initialize AgentKit with CDP credentials
  2. Create wallet for agent: createWallet()
  3. Define agent actions and tools
  4. Integrate with AI framework (LangChain, Eliza, etc.)
  5. Deploy agent to hosting platform (Autonome, cloud provider, etc.)
  6. Agent autonomously executes onchain operations

Enable Staking for Users

  1. Get staking context: GET /staking/get-staking-context
  2. List available validators: GET /staking/list-validators
  3. Build staking operation: POST /staking/build-a-new-staking-operation
  4. Broadcast operation: POST /staking/broadcast-a-staking-operation-for-wallet
  5. Monitor staking rewards: GET /staking/fetch-staking-rewards

Integration

Framework Support

  • LangChain for AI agent development
  • Eliza for autonomous agents
  • Vercel AI SDK for AI applications
  • viem for EVM interactions
  • web3.py for Python development
  • wagmi for React applications

External Services

  • 0x protocol for swap aggregation
  • Paymaster services for gas sponsorship
  • Gelato for transaction automation
  • Multiple DEX liquidity pools

Webhook Integration

  • Real-time payment notifications
  • Transfer status updates
  • Order execution events
  • Custom webhook subscriptions

Multi-Chain Support

  • Ethereum mainnet and testnets
  • Base (L2)
  • Arbitrum, Optimism, Polygon
  • Solana mainnet and devnet
  • 15+ staking-supported networks

Context

Key Concepts

  • Wallet Secret: Single cryptographic secret that grants access to all accounts across EVM and Solana
  • Trusted Execution Environment (TEE): Secure enclave where private keys are stored and transactions signed, never exposed to Coinbase
  • Smart Account: ERC-4337 compliant account enabling advanced features like batching and gas sponsorship
  • User Operation: Transaction-like object for smart accounts supporting multiple operations in one call
  • Spend Permission: Delegated authorization allowing specific spending limits and time-based restrictions
  • Slippage: Maximum acceptable price difference between quote and execution
  • MEV (Maximal Extractable Value): Protection against front-running and sandwich attacks in swaps

Rate Limits

  • Standard API rate limits with higher tiers for enterprise customers
  • WebSocket connections for real-time market data
  • Batch operations for efficient bulk processing

Supported Networks

  • EVM: Ethereum, Base, Arbitrum, Optimism, Polygon, and 50+ others
  • Solana: Mainnet and Devnet
  • Testnets: Base Sepolia, Ethereum Sepolia, Solana Devnet

Security Considerations

  • Always use environment variables for API keys in production
  • Rotate Wallet Secrets periodically
  • Implement MFA for user accounts
  • Use spend permissions to limit transaction scope
  • Verify webhook signatures for payment notifications
  • Test on testnets before mainnet deployment

For additional documentation and navigation, see: https://docs.cdp.coinbase.com/llms.txt