A Jetpack Compose Android app demonstrating gasless smart account transactions using ZeroDev Omni SDK for ERC-4337 account abstraction and Privy for authentication + embedded wallet signing.
- Login — User authenticates via email OTP (Privy)
- Embedded wallet — Privy creates a secure embedded Ethereum wallet
- Smart account — ZeroDev creates a Kernel v3.3 smart account with the Privy wallet as owner
- Gas sponsorship — ZeroDev's paymaster sponsors all gas fees (user pays nothing)
- Send transaction — Gasless UserOp from the smart account, confirmed on Sepolia
-
Set your credentials in
gradle.properties:ZERODEV_PROJECT_ID=your-project-id PRIVY_APP_ID=your-privy-app-id PRIVY_CLIENT_ID=client-your-privy-client-id
-
Build and run:
./gradlew assembleDebug adb install app/build/outputs/apk/debug/app-debug.apk
Or open in Android Studio and hit Run.
app/src/main/java/com/zerodev/demo/
├── DemoApplication.kt # Application class, Privy SDK init
├── MainActivity.kt # Entry point, Compose setup
├── PrivySigner.kt # SignerImpl: Privy wallet → ZeroDev signer
├── WalletViewModel.kt # Auth → wallet → smart account state machine
└── WalletApp.kt # Compose UI (login, OTP, dashboard)
From Maven Central and Google:
app.zerodev:zerodev-aa:0.0.1-alpha.5— ERC-4337 smart account SDKio.privy:privy-core:0.9.2— Auth + embedded wallets- Jetpack Compose (BOM 2024.12.01)
- Android 15 (API 35) — Pixel 8 emulator
- Android 16 (API 37) — Pixel 8 emulator (16KB page aligned)