Skip to main content
CDP Wallets provide a sendTransaction feature that simplifies sending onchain transactions. For EVM, it handles gas estimation, nonce management, signing, and broadcasting automatically. For Solana, it handles signing and broadcasting, and sets the required priority fees for optimal transaction pricing.

EVM

sendTransaction is supported on Base, Ethereum, Avalanche, Polygon, Optimism, and Arbitrum. For other chains, use the sign transaction feature.
After the user logs in, use useSendEvmTransaction from cdp-hooks to send EVM transactions from the user’s wallet.

Network-scoped accounts

Use useNetwork() to scope an account to a specific network once, avoiding the need to pass network on every call. When scoped to Base or Base Sepolia, the SDK automatically uses CDP’s managed RPC endpoints.
Node (TypeScript)
To use a custom RPC endpoint or a network not natively supported by CDP, pass the RPC URL directly:
Node (TypeScript)

Solana

Solana transactions require building and serializing a transaction before sending. CDP injects the latest blockhash before broadcasting, so use the placeholder blockhash shown below.
Use useSendSolanaTransaction for programmatic control, or SendSolanaTransactionButton for a pre-built UI button with built-in loading and error states.

Bring your own node

Use signTransaction to sign with CDP and broadcast via a custom RPC node:

Priority fees

The priority fee increases the likelihood of your transaction being included in the next block. Priority fee = Compute unit limit × Compute unit price
CDP automatically adds compute unit limit and price instructions if they are not already present in your transaction.

Fee sponsorship

CDP can pay the Solana network fee on behalf of your wallet. Pass useCdpSponsor: true when calling sendTransaction.
Fee sponsorship is in private preview and available to enterprise-scale integrations only. To opt in, apply for access.

Send USDC

USDC uses 6 decimal places, so 1000000 atomic units equals 1 USDC.
The useSendUsdc hook from @coinbase/cdp-hooks works across all account types (EOA, Smart Account, Solana) and handles contract addresses, decimal conversion, and Associated Token Account creation automatically.
For Smart Accounts, pass useCdpPaymaster: true for gasless transactions. For Solana, pass createRecipientAta: true to create the recipient’s token account if it doesn’t exist.See the full parameter reference in the CDP Web SDK docs.

Webhooks

Subscribe to transaction lifecycle events using CDP Wallet Webhooks. The wallet.transaction.* events let you track each transaction from creation through confirmation or failure in real time.