hw-core
A Rust library for low-level hardware wallet communication, including the Trezor Host Protocol.
What it is
hw-core is a cross-platform hardware wallet interface written in Rust. It provides the low-level wallet functionality needed to talk to a hardware device, with an initial focus on the Trezor Host Protocol (THP) introduced by the Trezor Safe 7.
Features
- Trezor Host Protocol — low-level support for THP and the Trezor Safe 7.
- Interactive CLI — commands for scanning, pairing, deriving addresses, and signing.
- BLE transport — communicate with devices over Bluetooth Low Energy.
- Shared core — wallet orchestration logic reusable across multiple application surfaces.
- FFI bindings — a UniFFI layer for integrating with mobile and desktop apps.
How to use
hw-core is a Rust library and CLI. The interactive CLI exposes scan, pair, address, and sign operations, while the UniFFI bindings let you embed the same core in Swift or Kotlin applications. See the repository for build and setup details.
Why
Hardware wallet integrations are often locked to a single platform or transport. hw-core aims to keep the wallet logic in one well-tested Rust core and reuse it everywhere — desktop, mobile, and command line — so the same protocol implementation backs every surface.