Overview
TheCdpClient is the main entry point for interacting with the Coinbase Developer Platform (CDP) API. It provides namespaced access to EVM, Solana, Policies, and End User management functionality.
Constructor
Configuration options for the CdpClient.
Properties
Namespace containing all EVM methods for creating accounts, sending transactions, and managing smart accounts.
Namespace containing all Solana methods for creating accounts, sending transactions, and managing token balances.
Namespace containing all Policies methods for creating, updating, and managing policies.
Namespace containing all end user management methods.
Example Usage
Environment Variables
Initialize with Environment Variables
Initialize with Constructor Options
Using Namespaced Methods
Authentication
The CdpClient requires three credentials:-
CDP Secret API Key (
apiKeyId&apiKeySecret): Used to authenticate requests to the entire suite of APIs offered on Coinbase Developer Platform. -
Wallet Secret (
walletSecret): Used specifically to authenticate requests toPOSTandDELETEendpoints in the EVM and Solana Account APIs.
Requirements
- Node.js version 19 or higher
- Valid CDP API credentials