ZeroDev

Introduction

ZeroDev is an embedded AA wallet, currently powering many AA wallets deployed on EVM chains. ZeroDev is known for its large AA feature set, including not just gas sponsoring, but also session keys, recovery, multisig, and more.

Getting Started

Follow this tutorial to get started with ZeroDev.

Connecting ZeroDev to a Capsule Signer

import { ECDSAProvider } from "@zerodev/sdk"
// create a capsule viem signer
const viemClient = createCapsuleViemClient(capsule, {
chain: CHAIN,
transport: http(CHAIN_PROVIDER),
});
// Create a ZeroDev provider
const ecdsaProvider = await ECDSAProvider.init({
// ZeroDev projectId
projectId,
// The signer
owner: viemClient
})
// Send a UserOp
const { hash } = await ecdsaProvider.sendUserOperation({
target: contractAddress,
data: functionData,
value: value,
})
// Wait for the UserOp to complete
await ecdsaProvider.waitForUserOperationTransaction(hash)
Note: for simplicity, Capsule imports are not included in the above- It is assumed that the Capsule object has been instantiated and the user has created a wallet. If you need access to Capsule or help getting set up, please see the Getting Started section