> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CDP Client

## Classes

### CdpClient

Defined in: [client/cdp.ts:27](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L27)

The main client for interacting with the CDP API.

#### Extends

* `VendoredClient`

#### Constructors

##### Constructor

```ts theme={null}
new CdpClient(options?: CdpClientOptions): CdpClient;
```

Defined in: [client/cdp.ts:82](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L82)

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](https://portal.cdp.coinbase.com/projects/api-keys):

* **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](https://docs.cdp.coinbase.com/get-started/docs/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:

```
CDP_API_KEY_ID=your-api-key-id
CDP_API_KEY_SECRET=your-api-key-secret
CDP_WALLET_SECRET=your-wallet-secret
```

Or passed as options to the constructor:

```typescript theme={null}
const cdp = new CdpClient({
  apiKeyId: "your-api-key-id",
  apiKeySecret: "your-api-key-secret",
  walletSecret: "your-wallet-secret",
});
```

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`](/sdks/cdp-sdks-v2/typescript/client/cdp-client#cdpclientoptions) = `{}`

Configuration options for the CdpClient.

###### Returns

[`CdpClient`](/sdks/cdp-sdks-v2/typescript/client/cdp-client#cdpclient)

###### Overrides

```ts theme={null}
VendoredClient.constructor
```

#### Properties

##### \_accounts

```ts theme={null}
protected _accounts: AccountsClient | undefined;
```

Defined in: [\_vendor/Client.ts:23](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L23)

###### Inherited from

```ts theme={null}
VendoredClient._accounts
```

##### \_depositDestinations

```ts theme={null}
protected _depositDestinations: DepositDestinationsClient | undefined;
```

Defined in: [\_vendor/Client.ts:24](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L24)

###### Inherited from

```ts theme={null}
VendoredClient._depositDestinations
```

##### \_options

```ts theme={null}
protected readonly _options: NormalizedClientOptionsWithAuth<BaseClientOptions>;
```

Defined in: [\_vendor/Client.ts:22](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L22)

###### Inherited from

```ts theme={null}
VendoredClient._options
```

##### \_paymentMethods

```ts theme={null}
protected _paymentMethods: PaymentMethodsClient | undefined;
```

Defined in: [\_vendor/Client.ts:26](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L26)

###### Inherited from

```ts theme={null}
VendoredClient._paymentMethods
```

##### \_transfers

```ts theme={null}
protected _transfers: TransfersClient | undefined;
```

Defined in: [\_vendor/Client.ts:25](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L25)

###### Inherited from

```ts theme={null}
VendoredClient._transfers
```

##### endUser

```ts theme={null}
endUser: EndUserClient;
```

Defined in: [client/cdp.ts:38](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L38)

Namespace containing all end user methods.

##### evm

```ts theme={null}
evm: EvmClient;
```

Defined in: [client/cdp.ts:29](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L29)

Namespace containing all EVM methods.

##### policies

```ts theme={null}
policies: PoliciesClient;
```

Defined in: [client/cdp.ts:35](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L35)

Namespace containing all Policies methods.

##### solana

```ts theme={null}
solana: SolanaClient;
```

Defined in: [client/cdp.ts:32](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L32)

Namespace containing all Solana methods.

##### webhooks

```ts theme={null}
webhooks: WebhooksClient;
```

Defined in: [client/cdp.ts:41](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L41)

Namespace containing all webhook methods.

#### Accessors

##### accounts

###### Get Signature

```ts theme={null}
get accounts(): AccountsClient;
```

Defined in: [\_vendor/Client.ts:32](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L32)

###### Returns

`AccountsClient`

###### Inherited from

```ts theme={null}
VendoredClient.accounts
```

##### depositDestinations

###### Get Signature

```ts theme={null}
get depositDestinations(): DepositDestinationsClient;
```

Defined in: [\_vendor/Client.ts:36](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L36)

###### Returns

`DepositDestinationsClient`

###### Inherited from

```ts theme={null}
VendoredClient.depositDestinations
```

##### paymentMethods

###### Get Signature

```ts theme={null}
get paymentMethods(): PaymentMethodsClient;
```

Defined in: [\_vendor/Client.ts:44](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L44)

###### Returns

`PaymentMethodsClient`

###### Inherited from

```ts theme={null}
VendoredClient.paymentMethods
```

##### transfers

###### Get Signature

```ts theme={null}
get transfers(): TransfersClient;
```

Defined in: [\_vendor/Client.ts:40](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L40)

###### Returns

`TransfersClient`

###### Inherited from

```ts theme={null}
VendoredClient.transfers
```

#### Methods

##### fetch()

```ts theme={null}
fetch(
   input: string | Request | URL, 
   init?: RequestInit, 
requestOptions?: RequestOptions): Promise<Response>;
```

Defined in: [\_vendor/Client.ts:58](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/_vendor/Client.ts#L58)

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

```ts theme={null}
VendoredClient.fetch
```

## Interfaces

### CdpClientOptions

Defined in: [client/cdp.ts:11](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L11)

#### Properties

##### apiKeyId?

```ts theme={null}
optional apiKeyId: string;
```

Defined in: [client/cdp.ts:13](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L13)

The API key ID.

##### apiKeySecret?

```ts theme={null}
optional apiKeySecret: string;
```

Defined in: [client/cdp.ts:15](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L15)

The API key secret.

##### basePath?

```ts theme={null}
optional basePath: string;
```

Defined in: [client/cdp.ts:21](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L21)

The host URL to connect to.

##### debugging?

```ts theme={null}
optional debugging: boolean;
```

Defined in: [client/cdp.ts:19](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L19)

Whether to enable debugging.

##### walletSecret?

```ts theme={null}
optional walletSecret: string;
```

Defined in: [client/cdp.ts:17](https://github.com/coinbase/cdp-sdk/blob/a1195adcfa5a93627bd3cb79831b188cc13073a1/typescript/packages/cdp-sdk/src/client/cdp.ts#L17)

The wallet secret.
