#api #bitcoin #hardware-wallet #api-bindings #wasm #bitbox

bitbox-api

A library to interact with the BitBox02 hardware wallet

13 releases (5 breaking)

new 0.6.0 Oct 31, 2024
0.4.0 Jun 4, 2024
0.3.1 Feb 4, 2024
0.2.2 Nov 18, 2023

#12 in #hardware-wallet

Download history 86/week @ 2024-07-11 235/week @ 2024-07-18 71/week @ 2024-07-25 113/week @ 2024-08-01 142/week @ 2024-08-08 156/week @ 2024-08-15 104/week @ 2024-08-22 199/week @ 2024-08-29 497/week @ 2024-09-05 224/week @ 2024-09-12 56/week @ 2024-09-19 76/week @ 2024-09-26 40/week @ 2024-10-03 62/week @ 2024-10-10 233/week @ 2024-10-17 94/week @ 2024-10-24

459 downloads per month
Used in async-hwi

Apache-2.0

350KB
8K 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

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.


lib.rs:

Rust BitBox hardware wallet client library.

Dependencies

~10–26MB
~296K SLoC