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

# useUserWallets

> Get access to the current user/session wallets

<Card title="Recommended: JavaScript SDK with React Hooks" icon="react" color="#4779FE">
  For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](/javascript/reference/react-quickstart) to get started.
</Card>

Use this hook whenever you need access to all the current wallets in your app — it returns an array of wallets, with type `Wallet[]`.

The array represents all wallets that were connected in the current session + all wallets authenticated by the current user. See [this section](#when-is-a-wallet-added-to-this-array) for more details.

### Example: listing which wallets are currently connected

```javascript theme={"system"}
import { FC } from 'react'
import { useUserWallets } from '@dynamic-labs/sdk-react-core'

export const ListConnectedWallets: FC = () => {
  const userWallets = useUserWallets()

  return (
    <div>
      <h1>Wallets</h1>

      {userWallets.map((wallet) => (
        <p key={wallet.id}>
          {wallet.address}
        </p>
      ))}
    </div>
  )
}
```

### What does the Wallet type look like?

You can inspect the type using your code editor, but here's a summary:

```Typescript theme={"system"}
    id: string;
    key: string;
    address: string;
    additionalAddresses: WalletAdditionalAddress[];
    chain: string;
    isAuthenticated: boolean;
    connector: walletConnector
```

<Info>
  `walletConnector` is the connector/provider instance attached to the wallet (available as `wallet.connector`).
</Info>

### When is a wallet added to this array?

There are currently 2 ways a wallet can be added to the array:

1. When the a new wallet is connected to the current session.
2. When the user signs in, all wallets authenticated to his account are added.

> Notice the intentional distinction between the *user* and the *current session*: if your end-user connects in `connect-only` mode, [he doesn't get a jwt](/react/wallets/external-wallets/connected-vs-authenticated#the-difference-in-practice). This means we have no access to the authenticated wallets.

### When is a wallet removed from this array?

Wallets are only removed explicitly by the user, be it through log-out, unlinking, or disconnecting in `connect-only`.
