Connect an external wallet
To determine if Privy has fully processed all external and embedded EVM wallet connections, use the ready
boolean returned by the useWallets
hook, or the ready
boolean returned by the useSolanaWallets
hook for Solana wallets.
To prompt a user to connect an external wallet (on EVM networks or Solana) to your app, use the connectWallet
method from the useConnectWallet
hook.
Usage
To connect external wallets on Solana, your application must first explicitly configure Solana connectors for Privy. Learn more
Parameters
An suggested address for the user to connect, which will be displayed in Privy’s UI.
A list of [wallet option] that you would like Privy to display in the connection prompt.
Filter the login wallet options to only show wallets that support the specified chain type.
Callbacks
You can optionally register an onSuccess or onError callback on the useConnectWallet hook.
An optional callback function that is called when a user successfully connects their wallet.
An optional callback function that is called when a user exits the connection flow or there is an error.
Was this page helpful?