Check if a wallet is an Ethereum wallet
You can use theisEthereumWallet
helper method to check if a wallet is a Ethereum wallet. That way, TypeScript will know which methods are available to you.
Ethereum Wallet Methods
Method | Description |
---|---|
getPublicClient(): Promise<PublicClient<Transport, Chain>> | Retrieves the public client. |
getWalletClient(chainId?: string): Promise<WalletClient<Transport, Chain, Account>> | Retrieves the wallet client. |