listAccounts

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

Import

1import { listAccounts } from "@account-kit/wallet-client";

Usage

1// Fetch the first page of accounts
2const firstPage = await client.listAccounts({
3 signerAddress: "0x123...",
4 limit: 10,
5});
6
7// If an 'after' cursor exists, use it to fetch the next page
8const nextPage = await client.listAccounts({
9 signerAddress: "0x123...",
10 limit: 10,
11 after: firstPage.meta.after,
12});

Parameters

client

InnerWalletApiClient

  • The wallet API client to use for the request

signer

SmartAccountSigner

  • The signer for which to list accounts

params

ListAccountsParams

  • Parameters for listing accounts

params.signerAddress

string

  • The address of the signer to list accounts for

params.limit

number

  • Optional maximum number of accounts to return (default: 100, max: 100)

params.after

string

  • Optional pagination cursor for fetching subsequent pages

Returns

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