# validateAlchemyConnectionConfig

> Overview of the validateAlchemyConnectionConfig function

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function validateAlchemyConnectionConfig(config): Object;
```

Defined in: [packages/common/src/transport/connectionSchema.ts:107](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/common/src/transport/connectionSchema.ts#L107)

Validates an Alchemy connection configuration object.

## Example

```ts
try {
  const config = validateAlchemyConnectionConfig({
    apiKey: "your-api-key",
  });
  // config is now typed as AlchemyConnectionConfig
} catch (error) {
  if (error instanceof ConnectionConfigError) {
    console.error("Invalid config:", error.message);
  }
}
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `config`
      </td>

      <td>
        `unknown`
      </td>

      <td>
        The configuration object to validate
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Object`

The validated configuration object

## Throws

If the configuration is invalid