> ## 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: [cdp.ts:26](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L26)

The main client for interacting with the CDP API.

#### Constructors

##### Constructor

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

Defined in: [cdp.ts:77](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L77)

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()`.

###### 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)

#### Properties

##### endUser

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

Defined in: [cdp.ts:37](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L37)

Namespace containing all end user methods.

##### evm

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

Defined in: [cdp.ts:28](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L28)

Namespace containing all EVM methods.

##### policies

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

Defined in: [cdp.ts:34](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L34)

Namespace containing all Policies methods.

##### solana

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

Defined in: [cdp.ts:31](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L31)

Namespace containing all Solana methods.

##### webhooks

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

Defined in: [cdp.ts:40](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L40)

Namespace containing all webhook methods.

## Interfaces

### CdpClientOptions

Defined in: [cdp.ts:10](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L10)

#### Properties

##### apiKeyId?

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

Defined in: [cdp.ts:12](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L12)

The API key ID.

##### apiKeySecret?

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

Defined in: [cdp.ts:14](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L14)

The API key secret.

##### basePath?

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

Defined in: [cdp.ts:20](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L20)

The host URL to connect to.

##### debugging?

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

Defined in: [cdp.ts:18](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L18)

Whether to enable debugging.

##### walletSecret?

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

Defined in: [cdp.ts:16](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/cdp.ts#L16)

The wallet secret.
