doesWalletExist
Checks whether a wallet exists with completed signing shares. This method verifies the presence of a wallet by checking for completed signing shares.
Function Signature
Parameters
forChainId
: Optional chain identifier (e.g., "eip155:1" for Ethereum mainnet, "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Solana mainnet). If nil, checks for wallets across all chains.
Returns
A boolean value indicating whether a wallet exists:
When chainId is provided:
Returns
true
if a wallet exists for the specified chain and has at least one completed signing shareReturns
false
if no wallet exists or if no signing shares are completed
When chainId is nil:
Returns
true
if any wallet exists and has at least one completed signing shareReturns
false
if no wallets exist or if no signing shares are completed
Throws
PortalClassError.clientNotAvailable
if the client is not initialized
Example Usage
Implementation Notes
The method checks for the presence of signing shares with a status of
.completed
Incomplete or pending signing shares are not considered when determining wallet existence
The check can be performed for a specific blockchain or across all supported chains
Useful for determining whether to trigger wallet creation or recovery flows
Usage in App Flow
Initial App Launch:
Chain-Specific Features:
Related Documentation
For more information about wallet management, see:
Last updated
Was this helpful?