Skip to main content

Build onchain with CDP SDK

Multi-language SDK for managing EVM and Solana wallets with CDP-secured private keys stored in a Trusted Execution Environment.

Quick start

Get up and running with CDP SDK in minutes

1

Install the SDK

Choose your preferred language and install the CDP SDK package.
npm install @coinbase/cdp-sdk
2

Get your API credentials

Create a CDP API Key in the Coinbase Developer Platform Portal. Save your API Key ID, API Key Secret, and Wallet Secret.
export CDP_API_KEY_ID="your-api-key-id"
export CDP_API_KEY_SECRET="your-api-key-secret"
export CDP_WALLET_SECRET="your-wallet-secret"
3

Initialize the client

Create a CDP client instance and start building.
import { CdpClient } from "@coinbase/cdp-sdk";

const cdp = new CdpClient();
4

Create your first account

Create an EVM or Solana account and start transacting.
// Create an EVM account
const account = await cdp.evm.createServerAccount({
  network: "base-mainnet"
});

console.log("Account address:", account.address);

Explore by topic

Learn about the core features and capabilities of CDP SDK

EVM accounts

Create and manage accounts on EVM-compatible blockchains like Ethereum, Base, and Polygon.

Solana accounts

Build on Solana with server-managed accounts and secure key storage.

Smart accounts

Leverage ERC-4337 account abstraction for gasless transactions and advanced features.

Token transfers

Send native tokens and ERC-20 assets across supported networks.

Policy management

Control transaction permissions with granular policy rules.

Authentication

Secure your application with CDP API keys and JWT authentication.

Resources

Get help and connect with the community

Examples

Browse runnable code examples for all supported languages.

Discord community

Join the #cdp-sdk channel for questions and support.

GitHub repository

Contribute to the SDK and report issues on GitHub.

Ready to start building?

Create your first onchain application with CDP SDK in minutes. Get your API keys and start transacting on EVM and Solana blockchains.

Get Started

Build docs developers (and LLMs) love