Skip to main content

Overview

The CDP SDK supports multiple account types across EVM and Solana blockchains. Each account type serves different use cases and offers distinct features for managing cryptographic keys and signing transactions.

EVM Account Types

EVM Server Accounts

EVM Server Accounts are server-managed accounts where private keys are securely stored and managed by the Coinbase Developer Platform. These accounts are ideal for backend applications that need to programmatically sign transactions without managing private keys locally. Key Features:
  • Private keys managed by CDP
  • Async signing methods for transactions and messages
  • Built-in policy support for transaction controls
  • Compatible with Web3.py and Viem
When to Use:
  • Backend services and APIs
  • Automated transaction workflows
  • Applications requiring secure key management
  • Multi-signature coordination
import { CdpClient } from "@coinbase/cdp-sdk";

const cdp = CdpClient.configureFromJson({
  filePath: "~/Downloads/cdp_api_key.json",
});

// Create a server-managed account
const account = await cdp.evm.createAccount({
  name: "My Server Account"
});

console.log(`Account address: ${account.address}`);
console.log(`Policies: ${account.policies}`);
Available Methods:
  • sign_message() - Sign EIP-191 messages
  • sign_transaction() - Sign EIP-1559 transactions
  • sign_typed_data() - Sign EIP-712 typed data
  • unsafe_sign_hash() - Sign arbitrary message hashes (use with caution)
  • send_transaction() - Send transactions to the network
  • transfer() - Transfer tokens between accounts
  • swap() - Execute token swaps
  • list_token_balances() - Query token balances

EVM Smart Accounts

EVM Smart Accounts implement Account Abstraction (ERC-4337) to enable advanced features like user operations, batched transactions, gas sponsorship via paymasters, and programmable transaction logic. Key Features:
  • Account Abstraction (ERC-4337) support
  • User operations instead of traditional transactions
  • Paymaster support for gas sponsorship
  • Batch transaction capabilities
  • Programmable ownership logic
  • Smart contract-based account logic
When to Use:
  • Gasless transactions (sponsored by paymasters)
  • Batch operations (multiple actions in one transaction)
  • Advanced wallet features (social recovery, session keys)
  • Consumer-facing applications with better UX
import { CdpClient } from "@coinbase/cdp-sdk";

const cdp = CdpClient.configureFromJson({
  filePath: "~/Downloads/cdp_api_key.json",
});

// Create owner account
const owner = await cdp.evm.createAccount();

// Create smart account with the owner
const smartAccount = await cdp.evm.createSmartAccount({
  owner: owner,
  name: "My Smart Account"
});

console.log(`Smart Account: ${smartAccount.address}`);
console.log(`Owner: ${smartAccount.owners[0].address}`);
console.log(`Policies: ${smartAccount.policies}`);
Available Methods:
  • send_user_operation() - Send user operations (batched contract calls)
  • wait_for_user_operation() - Wait for user operation confirmation
  • get_user_operation() - Get user operation status
  • transfer() - Transfer tokens (with optional paymaster)
  • swap() - Execute token swaps via user operations
  • sign_typed_data() - Sign EIP-712 typed data for the smart account
  • use_spend_permission() - Spend tokens via spend permissions

Key Differences

FeatureServer AccountSmart Account
Account TypeExternally Owned Account (EOA)Smart Contract Account
Transaction TypeStandard EIP-1559 transactionsUser Operations (ERC-4337)
Gas PaymentMust pay gas in native tokenSupports paymaster for gas sponsorship
Batch OperationsOne operation per transactionMultiple operations in one user operation
Owner ManagementSingle private keyProgrammable ownership logic
DeploymentNo deployment neededContract deployment on first use

Solana Accounts

Solana Accounts are server-managed accounts for the Solana blockchain. Like EVM Server Accounts, private keys are managed by CDP. Key Features:
  • Ed25519 keypair managed by CDP
  • Sign transactions and messages
  • Transfer SOL and SPL tokens
  • Request testnet tokens from faucet
When to Use:
  • Solana-based applications
  • SPL token operations
  • Solana program interactions
  • Cross-chain applications supporting both EVM and Solana
import { CdpClient } from "@coinbase/cdp-sdk";

const cdp = CdpClient.configureFromJson({
  filePath: "~/Downloads/cdp_api_key.json",
});

// Create a Solana account
const solanaAccount = await cdp.solana.createAccount({
  name: "My Solana Account"
});

console.log(`Solana address: ${solanaAccount.address}`);
Available Methods:
  • sign_transaction() - Sign Solana transactions
  • sign_message() - Sign arbitrary messages
  • transfer() - Transfer SOL or SPL tokens
  • request_faucet() - Request testnet tokens (devnet only)

Account Properties

Address

All accounts have an address property that uniquely identifies them on the blockchain:
  • EVM accounts use 0x-prefixed hexadecimal addresses (42 characters)
  • Solana accounts use Base58-encoded addresses (32-44 characters)

Name

Accounts can have an optional human-readable name for easier identification in your application.

Policies

Accounts can be associated with policies that control transaction behavior. The policies property contains an array of policy IDs that apply to the account. See the Policies documentation for more details.
Policies are evaluated when transactions or signatures are requested. Both project-level and account-level policies apply to account operations.

Best Practices

  • Use Server Accounts for backend services and simple transaction workflows
  • Use Smart Accounts when you need gas sponsorship, batch operations, or advanced wallet features
  • Use Solana Accounts for Solana blockchain interactions
  • Store account addresses persistently in your database
  • Use meaningful names to identify accounts
  • Monitor account balances before sending transactions
  • Clean up unused accounts to reduce clutter
  • Server-managed accounts keep private keys secure on CDP infrastructure
  • Apply policies to restrict unauthorized operations
  • Use idempotency keys to prevent duplicate transactions
  • Never expose API keys in client-side code

Next Steps

Networks

Learn about supported networks and capabilities

Transactions

Understand transaction lifecycle and management

EVM Accounts Guide

Step-by-step guide to working with EVM accounts

Smart Accounts Guide

Learn to build with Account Abstraction

Build docs developers (and LLMs) love