Skip to main content

Crate speculos

Crate speculos 

Source
Expand description

Rust wrapper for the Ledger Speculos device emulator.

Spawns the speculos Python binary as a child process, exposes its REST API for reading screen text, and sends button / tap / drag input.

use speculos::{Speculos, Button, Model};

let sim = Speculos::launch(std::path::Path::new("/path/to/app.elf"), Model::NanoX).unwrap();
// ... talk to sim.apdu_addr() with your Ledger transport ...
sim.press(Button::Right).unwrap();
sim.press(Button::Both).unwrap();

Structs§

ScreenEvent
One screen text element returned by Speculos /events.
SpawnOptions
Optional spawn-time configuration for Speculos::launch_with. Every field defaults to “let speculos pick / use the default”.
Speculos
Speculos process handle and REST client.

Enums§

Button
Hardware buttons on Nano X / Nano S Plus.
Error
Model
Ledger device families supported by Speculos.

Type Aliases§

Result