Import
Features
This hook provides a unified interface for managing connected wallets. The user is prompted to sign a transaction with their active wallet in order to link wallets, enabling read-only functionality. Key features:- Get information about all connected wallets
- Set a specific wallet as active
- Disconnect wallets
- View linked wallets for embedded wallets
- Refresh the list of linked wallets
Usage
Return Type: UseWalletsReturnType
Properties
wallets
ConnectedWallet[]
Array of all connected wallets.
linkedWallets
LinkedWallet[] | undefined
Array of linked wallets for the active embedded wallet, if any. Only available when using a WaaS wallet.
setActiveWallet
(address: string) => Promise<void>
Sets a wallet as active by its Ethereum address.
disconnectWallet
(address: string) => Promise<void>
Disconnects a wallet by its Ethereum address.
refetchLinkedWallets
() => Promise<void>
Refreshes the list of linked wallets. Useful after linking a new wallet.