Skip to main content

Classes

CdpClient

Defined in: client/cdp.ts:27 The main client for interacting with the CDP API.

Extends

  • VendoredClient

Constructors

Constructor
Defined in: client/cdp.ts:82 The CdpClient is the main class for interacting with the CDP API. There are a few required parameters that are configured in the CDP Portal:
  • CDP Secret API Key (apiKeyId & apiKeySecret): These are used to authenticate requests to the entire suite of APIs offered on Coinbase Developer Platform. Read more about CDP API keys.
  • Wallet Secret (walletSecret): This secret is used specifically to authenticate requests to POST, and DELETE endpoints in the EVM and Solana Account APIs.
These parameters can be set as environment variables:
Or passed as options to the constructor:
The CdpClient is namespaced by chain type: evm or solana. As an example, to create a new EVM account, use cdp.evm.createAccount(). To create a new Solana account, use cdp.solana.createAccount(). The CDP Secret API Key is not required to call public (unauthenticated) endpoints, such as the x402 Bazaar discovery endpoints. A CdpClient may be constructed without credentials for this purpose; calling an authenticated endpoint without credentials will raise a clear error.
Parameters
options?
CdpClientOptions = {} Configuration options for the CdpClient.
Returns
CdpClient
Overrides

Properties

_accounts
Defined in: _vendor/Client.ts:23
Inherited from
_depositDestinations
Defined in: _vendor/Client.ts:24
Inherited from
_options
Defined in: _vendor/Client.ts:22
Inherited from
_paymentMethods
Defined in: _vendor/Client.ts:26
Inherited from
_transfers
Defined in: _vendor/Client.ts:25
Inherited from
endUser
Defined in: client/cdp.ts:38 Namespace containing all end user methods.
evm
Defined in: client/cdp.ts:29 Namespace containing all EVM methods.
policies
Defined in: client/cdp.ts:35 Namespace containing all Policies methods.
solana
Defined in: client/cdp.ts:32 Namespace containing all Solana methods.
webhooks
Defined in: client/cdp.ts:41 Namespace containing all webhook methods.

Accessors

accounts
Get Signature
Defined in: _vendor/Client.ts:32
Returns
AccountsClient
Inherited from
depositDestinations
Get Signature
Defined in: _vendor/Client.ts:36
Returns
DepositDestinationsClient
Inherited from
paymentMethods
Get Signature
Defined in: _vendor/Client.ts:44
Returns
PaymentMethodsClient
Inherited from
transfers
Get Signature
Defined in: _vendor/Client.ts:40
Returns
TransfersClient
Inherited from

Methods

fetch()
Defined in: _vendor/Client.ts:58 Make a passthrough request using the SDK’s configured auth, retry, logging, etc. This is useful for making requests to endpoints not yet supported in the SDK. The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
Parameters
input
The URL, path, or Request object. string | Request | URL
init?
RequestInit Standard fetch RequestInit options.
requestOptions?
RequestOptions Per-request overrides (timeout, retries, headers, abort signal).
Returns
Promise<Response> A standard Response object.
Inherited from

Interfaces

CdpClientOptions

Defined in: client/cdp.ts:11

Properties

apiKeyId?
Defined in: client/cdp.ts:13 The API key ID.
apiKeySecret?
Defined in: client/cdp.ts:15 The API key secret.
basePath?
Defined in: client/cdp.ts:21 The host URL to connect to.
debugging?
Defined in: client/cdp.ts:19 Whether to enable debugging.
walletSecret?
Defined in: client/cdp.ts:17 The wallet secret.