# getSolanaConnection | @account-kit/core

> Overview of the getSolanaConnection function from @account-kit/core

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

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

```ts
function getSolanaConnection(config): null | SolanaConnection;
```

Defined in: [account-kit/core/src/actions/getSolanaConnection.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/actions/getSolanaConnection.ts#L17)

Used to get the connection for the id

## Example

```ts
import { getSolanaConnection } from "@account-kit/core";
import { config } from "./config";

const connection = getSolanaConnection(config);
```

## 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>
        [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig)
      </td>

      <td>
        the account config
      </td>
    </tr>

  </tbody>
</table>

## Returns

`null` | [`SolanaConnection`](../type-aliases/SolanaConnection)

a connection object for the current active chain