EVM Wallets
There are methods in the Ethereum wallet specific to EVM which we list below, but in general all the methods you need are present on the generic Wallet described here.
Check if a wallet is an Ethereum wallet
You can use the isEthereumWallet
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. |
isAtomicSupported(chainId?: number): Promise<boolean> | If the wallet supports atomic actions (EIP-5792). |
isPaymasterServiceSupported(chainId?: number): Promise<boolean> | If the wallet supports paymaster services (EIP-5792). |
sendCalls(callParams: Omit<SendCallsParameters, ‘account’>, options?: { paymasterURL?: string }): Promise<SendCallsReturnType> | Sends multiple transactions atomically. Requires EIP-5792 support. |
Read only actions
If you want to read data from the blockchain, you will want either a “Public Client” (Viem terminology), or a “Provider” (Ethers terminology). Both allow you read only access to the blockchain.
Write actions
If you want to write data to the blockchain, you will need a “Wallet Client” (Viem terminology), or a “Signer” (Ethers terminology). Both allow you to sign transactions with the private key.
Send multiple transactions atomically
If you want to send multiple transactions atomically, you can use the sendCalls
method. This requires the wallet to support EIP-5792.
Examples
We’ve included a few examples of how to use the EVM wallet connector in this section: