Get all wallets for your application.
To fetch all your application’s wallets, use the Privy client’s walletApi.getWallets method. This is a paginated query.
getWallets: ({cursor?: string, limit?: number, chainType?: 'ethereum' | 'solana'}) => Promise<{data: WalletApiWalletResponseType[], nextCursor?: string}>

Usage

const wallets = [];
let nextCursor;

do {
    const result = await privy.walletApi.getWallets({chainType: 'ethereum', cursor: nextCursor});
    wallets.push(...result.data);
    nextCursor = result.nextCursor;
} while (nextCursor);
const wallet = wallets.find((wallet) => wallet.address === desiredAddress);

Parameters

The getWallets method optionally accepts an object with the following fields:
cursor
string
ID of the wallet from which start the search
limit
number
Max amount of wallets to fetch per page
chainType
'ethereum' | 'solana'
Chain type to filter by.

Returns

data
WalletApiWalletResponseType[]
List of wallets in the current page
nextCursor
string
Cursor to use for fetching the next page of results, if any