bitcoins-ledger

Crates.iobitcoins-ledger
lib.rsbitcoins-ledger
version0.7.0
sourcesrc
created_at2021-04-04 18:29:25.190716
updated_at2022-07-06 19:37:06.469065
descriptionLedger Nano X/S Bitcoin app utilization library
homepage
repositoryhttps://github.com/summa-tx/bitcoins-rs
max_upload_size
id378904
size23,833
James Prestwich (prestwich)

documentation

README

bitcoins-ledger

Ledger Bitcoin App abstraction.

Building

Windows is not yet supported.

Native

  • Install dependencies
    • Linux
      • $ sudo apt-get install libudev-dev libusb-1.0-0-dev
    • OSX
      • TODO
      • please file an issue if you know. I don't have a macbook :)
  • Build with native transport
    • cargo build

WASM

  • Install wasm-pack
  • building for wasm
    • MUST disable default features
    • MUST select feature AT MOST ONE of browser and node
    • browser
      • usage env must be able to import
    • node

Features

The node and browser features are mutually exclusive. You must specify exactly one, as well as the --no-default-features flag.

When building for non-wasm architectures, a native HID transport is compiled in. When building wasm via wasm-pack, you must specify whether you want the node or browser wasm transport.

Testing

  • run the unit tests
    • $ cargo test -- --lib
  • run the integration tests
    • Plug in a Ledger Nano S or X device
    • Unlock the device
    • Open the Bitcoin application on the device
    • $ cargo test
Commit count: 377

cargo fmt