useUserWallets
Get access to the current user/session wallets
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 for more details.
Example: listing which wallets are currently connected
What does the Wallet type look like?
You can inspect the type using your code editor, but here’s a summary:
When is a wallet added to this array?
There are currently 2 ways a wallet can be added to the array:
- When the a new wallet is connected to the current session.
- 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. 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
.
Was this page helpful?