Zemu
Ledger Nano Emulation/testing framework
Install / Use
/learn @Zondax/ZemuREADME
Zemu


We appreciate any contributions to this effort!
We recommend using the npmjs package in order to receive updates/fixes.
This project is under active development - API and usage guidelines are very likely to change
Overview
Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger apps ecosystem is lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this problem. Under the hood, Zemu uses Ledger's project speculos. It's currently being used in every Ledger App built by Zondax, among many others (such as Ethereum one built by Ledger team).
Zemu is an emulation and testing framework for Ledger Nano S/S+/X/Stax/Flex devices.
Features
- Minimal configuration + Docker based
- Speculos/Qemu based emulation
- Container pooling for improved test performance
- Easy JS/TypeScript API
- Vitest / Jest / Mocha compatible
- Parallelized testing
- Abstracted device control (buttons, reset, etc.)
- Navigate thru screens and take screenshots of them
- Support for all Ledger devices (Nano S/S+/X/Stax/Flex)
- Enhanced error handling with detailed APDU status codes
- Debugging (support for CLion and vscode, even mixed C/Rust)
Installation
npm install --save-dev @zondax/zemu
# or
pnpm add -D @zondax/zemu
Quick Start
import Zemu from '@zondax/zemu'
const sim = new Zemu(APP_PATH)
await sim.start({ model: 'nanos' })
// Interact with your app
await sim.clickRight()
await sim.clickBoth()
// Take screenshots
const screenshot = await sim.snapshot()
// Clean up
await sim.close()
Docs
Check our documentation and quickstart at https://docs.zondax.ch
Who we are?
We are Zondax, a company pioneering blockchain services. If you want to know more about us, please visit us at zondax.ch
Related Skills
gh-issues
333.3kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
333.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
82.0kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
