# watchAccount | @account-kit/core

> Overview of the watchAccount 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 watchAccount<TAccount>(type, config): (onChange) => any;
```

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

Watches for changes to a specific type of account and triggers the provided callback function when changes occur.

## Example

```ts
import { watchAccount } from "@account-kit/core";
// see createConfig for more information on how to create a config
import { config } from "./config";

watchAccount("LightAccount", config)(console.log);
```

## Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TAccount` *extends* [`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes)
      </td>

      <td>
        The type of account to watch
      </td>
    </tr>

  </tbody>
</table>

## Parameters

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

  <tbody>
    <tr>
      <td>
        `type`
      </td>

      <td>
        `TAccount`
      </td>

      <td>
        The type of account to watch
      </td>
    </tr>

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

      <td>
        [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig)
      </td>

      <td>
        The configuration containing client store settings
      </td>
    </tr>

  </tbody>
</table>

## Returns

A function that accepts a callback to be called when the account changes and returns a function to unsubscribe from the store

```ts
(onChange): any;
```

### Parameters

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

  <tbody>
    <tr>
      <td>
        `onChange`
      </td>

      <td>
        (`account`) => `void`
      </td>
    </tr>

  </tbody>
</table>

### Returns

`any`