Skip to content

Documentation / expo / useRecoverEmbeddedWallet

Function: useRecoverEmbeddedWallet()

useRecoverEmbeddedWallet(): UseRecoverEmbeddedWallet

Hook to recover an embedded wallet. It uses the primary wallet of the user to recover all of the embedded wallets.

Returns

UseRecoverEmbeddedWallet

An object with a recover method that allows you to recover the embedded wallets. Signing with the embedded wallet is done separately, using the getProvider() method after recovery.

Example

ts
const {recover} = useRecoverEmbeddedWallet();
const solanaWallet = useEmbeddedSolanaWallet();
// ...
await recover(...) // This recovers all embedded wallets
await solanaWallet.getProvider() // Connects to the Solana wallet