bitcoins-ledger

Communication library between Rust and Ledger Nano S/X devices

Building

Windows is not yet supported.

Native

WASM

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

License Notes

This repo was forked from Zondax's repo at commit 7d40af96. Their code is reproduced here under the terms of the Apache 2 License. Files containing elements from their code maintain their original Apache 2 license notice at the bottom of the file.

Further work by Summa is available under the GNU LGPLv3 license.

These changes are as follows: - Remove bip44 crates - Significant refactoring to all other crates - Crates have been moved to be modules of a single crate - Refactor APDUErrorCodes - Refactor APDUCommand to move towards nostd support. They hold &'a [u8] instead of vectors - Refactor APDUAnswer to move towards nostd support and avoid unnecessary copies. It is now a thin wrapper around a &[u8] - Change exchange functions to accept a mutable buffer. The caller must allocate space for the response packet - wasm_bindgen bindings for JS ledger transports - Conditional compilation based abstraction of transport type - Native HID if not wasm32 - Feature flags for browser or node if wasm32 - Break out integration tests - Strip print logs