#bitcoin #api-bindings #api #wasm #bitbox

bitbox-api

A library to interact with the BitBox02 hardware wallet

14 releases (6 breaking)

0.7.0 Mar 10, 2025
0.6.0 Oct 31, 2024
0.5.0 Aug 14, 2024
0.4.0 Jun 4, 2024
0.2.2 Nov 18, 2023

#170 in #bitcoin

Download history 38/week @ 2024-12-06 132/week @ 2024-12-13 74/week @ 2024-12-20 43/week @ 2024-12-27 126/week @ 2025-01-03 116/week @ 2025-01-10 137/week @ 2025-01-17 107/week @ 2025-01-24 151/week @ 2025-01-31 64/week @ 2025-02-07 11/week @ 2025-02-14 57/week @ 2025-02-21 95/week @ 2025-02-28 238/week @ 2025-03-07 316/week @ 2025-03-14 150/week @ 2025-03-21

802 downloads per month
Used in async-hwi

Apache-2.0

355KB
9K SLoC

Rust 7K SLoC // 0.0% comments TSX 1.5K SLoC JavaScript 148 SLoC // 0.0% comments Shell 27 SLoC TypeScript 8 SLoC // 0.2% comments

BitBox02 library

A library to interact with the BitBox02 hardware wallet.

Check out examples/singlethreaded.rs for an example.

To run the example:

cargo run --example singlethreaded --features=usb,tokio/rt,tokio/macros

See Cargo.toml for further examples.

Simulator tests

tests/simulator_tests.rs runs a set of integration tests against BitBox02 simulators. They are automatically downloaded based on tests/simulators.json, and each one is tested with.

To run them, use:

cargo test --features=simulator,tokio -- --test-threads 1

Use --nocapture to also see some useful simulator output.

cargo test --features=simulator,tokio -- --test-threads 1 --nocapture

If you want to test against a custom simulator build (e.g. when developing new firmware features), you can run:

SIMULATOR=/path/to/simulator cargo test --features=simulator,tokio

In this case, only the given simulator will be used, and the ones defined in simulators.json will be ignored.

Dependencies

~10–23MB
~298K SLoC