# listAccounts

> Overview of the listAccounts 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 listAccounts(client, params): Promise<ListAccountsResult>;
```

Defined in: [packages/wallet-apis/src/actions/listAccounts.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/listAccounts.ts#L56)

Lists all smart accounts for a given signer using the wallet API client.

## Example

```ts
// Fetch the first page of accounts
const firstPage = await client.listAccounts({
  signerAddress: "0x123...",
  limit: 10,
});

// If an 'after' cursor exists, use it to fetch the next page
const nextPage = await client.listAccounts({
  signerAddress: "0x123...",
  limit: 10,
  after: firstPage.meta.after,
});
```

## Parameters

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

  <tbody>
    <tr>
      <td>
        `client`
      </td>

      <td>
        `InnerWalletApiClient`
      </td>

      <td>
        The wallet API client to use for the request
      </td>
    </tr>

    <tr>
      <td>
        `params`
      </td>

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

      <td>
        Parameters for listing accounts
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<[`ListAccountsResult`](../type-aliases/ListAccountsResult)>

A Promise that resolves to the list of accounts and pagination metadata