Function Signature
Description
Checks if a wallet exists for the client. Can optionally check for a specific chain.Parameters
Returns
bool - true if a wallet exists, false otherwise.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check if a wallet exists.
Future<bool> doesWalletExist([String? chainId])
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | String | No | Optional chain ID to check. If null, checks for any wallet. |
bool - true if a wallet exists, false otherwise.
import 'package:portal_flutter/portal_flutter.dart';
final portal = Portal();
// Check if any wallet exists
final exists = await portal.doesWalletExist();
if (exists) {
print('Wallet exists');
} else {
print('No wallet found');
}
// Check if EVM wallet exists
final evmExists = await portal.doesWalletExist('eip155:1');
// Check if Solana wallet exists
final solExists = await portal.doesWalletExist('solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp');
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
Was this page helpful?