isWalletRecoverable
Checks whether the wallet can be recovered using any available backup methods. This method verifies if there are any completed backup methods that could be used to recover the wallet.
Function Signature
Parameters
forChainId
: Optional CAIP-2 chain identifier (e.g., "eip155:1" for Ethereum mainnet, "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Solana mainnet). If nil, checks recovery options across all chains.
Returns
A boolean value indicating whether the wallet can be recovered:
Returns
true
if at least one completed backup method is availableReturns
false
if no completed backup methods are found
Throws
PortalClassError.clientNotAvailable
if the client is not initializedPortalClassError.unsupportedChainId
if the chain's namespace is not supportedPortalClassError.noWalletFoundForChain
if no wallet exists for the specified chain
Example Usage
Implementation Notes
This method uses
availableRecoveryMethods()
internally to determine if any completed backup methods existOnly considers backup methods that have been fully completed and verified
Useful for determining whether to show recovery options to users
Should be checked before attempting wallet recovery
Usage in App Flow
Initial Setup Check:
Recovery Process:
Related Documentation
For more information about wallet recovery, see:
Last updated
Was this helpful?