Using the Signer as an EOA

Note that EOA wallets will not have access to smart account features like gas sponsorship, batched transactions, multi-owner, or plugins. If you want to switch from EOA to smart accounts later, then each user will need to transfer their assets from the EOA account to a new smart account. It is not currently possible to “upgrade” and EOA to a smart contract account, although the community is discussing potential EIPs to do that in the future.

Because the Alchemy Signer has its own address and supports signing messages as raw hashes, it is possible to use this signer as an EOA directly. To do so, you can adapt the AlchemySigner to your library of choice and leverage its signMessage, signTypedData, and signTransaction methods directly. The public address of the signer can be accessed via getAddress.

If you are using viem, then you can use the toViemAccount method which will allow you to use the signer with a WalletClient.

1import { signer } from "./signer";
2import { createWalletClient, http } from "viem";
3import { sepolia } from "viem/chains";
4
5export const walletClient = createWalletClient({
6 transport: http("alchemy_rpc_url"),
7 chain: sepolia,
8 account: signer.toViemAccount(),
9});