listAccounts

1function listAccounts(
2 client,
3 signer,
4 params,
5): Promise<{
6 accounts: object[];
7 meta: {
8 after: null | string;
9 totalCount: number;
10 };
11}>;

Defined in: account-kit/wallet-client/src/client/actions/listAccounts.ts:57

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

Example

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

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

signer

SmartWalletSigner

The signer for which to list accounts

params

ListAccountsParams

Parameters for listing accounts

Returns

Promise<{ accounts: object[]; meta: { after: null | string; totalCount: number; }; }>

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