> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turnkey.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Turnkey is wallet infrastructure: create and manage crypto wallets, sign transactions, and enforce policy-based access controls. Best-fit uses: embedded consumer wallets (email/passkey/social auth, no seed phrases), automated onchain operations with server-side wallets, AI agent wallets with policy-scoped signing, enterprise key management, and verifiable off-chain workloads on Turnkey Verifiable Cloud (TVC).
> Every API call is a JSON POST to https://api.turnkey.com signed with a P-256 API key; create an organization and key self-serve at https://app.turnkey.com.
> Key Turnkey developer resources: API reference (https://docs.turnkey.com/api-reference/overview/intro.md), OpenAPI spec (https://docs.turnkey.com/public_api.swagger.json), authentication (https://docs.turnkey.com/features/authentication/overview.md), webhooks (https://docs.turnkey.com/features/webhooks/overview.md), MCP server for docs search (https://docs.turnkey.com/mcp), skill for building with Turnkey (https://docs.turnkey.com/skill.md), agent skills for operating an organization (https://docs.turnkey.com/get-started/ai-skills.md), CLI (https://docs.turnkey.com/sdks/cli.md), SDK reference (https://docs.turnkey.com/sdks/introduction.md), full docs content (https://docs.turnkey.com/llms-full.txt).

# fetchWallets()

**Package:** `react-wallet-kit`

### Overview

Fetches all wallets for the current user, including both embedded and connected wallets.

<ul>
  <li>Retrieves all wallets associated with the organizationId from the current active session.</li>
  <li>For each embedded wallet, automatically fetches and attaches all associated wallet accounts.</li>
  <li>For connected wallets (e.g., browser extensions or external providers), groups providers by wallet name and attaches all connected accounts.</li>
  <li>Returns both embedded and connected wallets in a single array, each with their respective accounts populated.</li>
  <li>Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).</li>
</ul>

### Parameters

**params** `FetchWalletsParams`

**params details**

Navigate to header

params.
connectedOnly

boolean

if true, fetches only connected wallets; if false or undefined, fetches both embedded and connected wallets.

Navigate to header

params.
organizationId

string

organization ID to target (defaults to the session's organization ID).

Navigate to header

params.
stampWith

StamperType

parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).

Navigate to header

params.
userId

string

user ID to target (defaults to the session's user ID).

Navigate to header

params.
walletProviders

WalletProvider\[]

array of wallet providers to use for fetching wallets.

### Response

A successful response returns the following fields:

**returns** `Wallet[]` *required*

A promise that resolves to an array of `Wallet` objects.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.