Overview
ZeroDev supports many ways to create AA wallets, but which one is right for your project?
Here is a set of questions you can ask to figure out the right approach for you:
- Does your project already have an existing Web2 account system, and you just want to tie a wallet to each user account?
- If so, you might want to create wallets with user IDs.
- Are you building a DApp that wants to onboard Web2 users?
- If so, you might want to create wallets with social logins.
- Does your project already manage private keys for users?
- If so, you might want to create wallets with private keys.
- Do you want to use a EOA provider such as Web3Auth/Magic/MetaMask to handle the login experience, while using ZeroDev for wallets?
- If so, you might want to create wallets with RPC provider.
API
ZeroDev wallets can be used through two interfaces:
Ethers.js: you can access a ZeroDev wallet as an instance of
ZeroDevSigner
, which is compatible with Ethers'Signer
interface. As a result, you can use the signer just like a regular Ethers signer (e.g. to sign messages and send transactions), but it also exposes additional AA functions which are detailed in Use AA Wallets.Wagmi: you can create ZeroDev wallets through Wagmi connectors, and access the wallet through Wagmi hooks like
useSigner
as well as our custom AA hooks likeuseContractBatchWrite
.
Each of the following sections will document both the Ethers and the Wagmi API.