hsd-ledger
This is a client library for ledger-app-hns. It uses primitives from hsd.
Usage
Currently, we only support Node.js. We have plans to support browser usage through WebUSB. Example usage can be found and run using the following files:
- examples/getAppVersion.js - Get the application version number.
- examples/getAccountXPUB.js - Get a BIP44 account xpub.
- examples/getXPUB.js - Get an arbitrary xpub.
- examples/getAddress.js - Get a BIP44 compliant address.
- examples/getPublicKey.js - Get a BIP44 compliant address.
- examples/signTransaction-p2pkh.js - Sign P2PKH transaction.
- examples/signTransaction-p2sh.js - Sign P2SH transaction.
Note:
hsd
is a peer dependency.
More documentation to come...
Tests
Unit tests
$ npm test
End-to-end tests
For all end-to-end tests, a LOG_LEVEL
environment variable can be set
to control the log output. Possible log levels include: none
, info
,
warning
, debug
, error
, spam
.
Note: the end-to-end tests require a connected Ledger Nano S using the seed phrase:
abandon abandon abandon abandon abandon abandon
abandon abandon abandon abandon abandon about
Using Ledger Nano S
$ npm run test-hid
Using Ledger Nano S and hsd
$ npm run test-hsd
Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
License
- Copyright (c) 2018, Boyma Fahnbulleh (MIT License).
This project is a fork of bledger.
bledger
- Copyright (c) 2018, The Bcoin Developers (MIT License).
See LICENSE for more info.