mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-03-09 16:58:56 +01:00
trezor-thp
Rust library for Trezor Host Protocol. THP facilitates communication between an application on a host computer and a Trezor cryptocurrency wallet.
To learn more about THP, please see the full specification.
Design
The goal of the library is to be used by both bare-metal firmware and desktop applications.
- Implements both the Host and the Device (Trezor) side.
- Usable on
no_stdand withoutcore::alloc. - I/O-free to make integration into any kind of event loop possible.
- Usable with any protobuf and cryptography libraries.
- Minimal dependencies.
Due to these requirements, the crate is very low-level - it provides a library of components that you need to assemble to get a high-level abstraction of THP sessions.
Crates that provide a higher-level interface:
- trezor-client (work in progress)
Examples
The examples assume Trezor emulator available through UDP.
cargo run --example transport-level-ping
cargo run --example host-cli
Features
None yet.