[BREAKGLASS] Append-only mirror of github.com/coldcard/HWI
Go to file
Andrew Chow 8d738ee31c
Merge #125: Test how the CLI deals with really big transactions
1a2b67d Test how a very large transaction is handled (Andrew Chow)
c69c0ee Add travis job for cli interface test (Andrew Chow)
e594a0b Allow specifiying a different interface for using HWI in tests (Andrew Chow)

Pull request description:

  It was mentioned in the #bitcoin-core-dev IRC channel a few days ago that really big transactions can cause problems if it was entered as an argument in the shell. This PR adds to the test suite the option to run the tests with different interfaces to allow us to test this. It can use the "library" interface which is what we currently do. This interface calls `process_commands` directly. The `cli` interface uses `subprocess` to run the `hwi` command in the shell to test the command line interface. This will emulate entering a command in the shell. This allows us to test the big transaction case which has been added. This case only tests the interface and not whether the transaction is signed. This test should pass when using the `library` interface but not when using the `cli`. Both interfaces will also be tested on travis as separate jobs.

Tree-SHA512: 47c85c3b4df66aaa552dc55028267024ea53a56f8028bc0e161fd390ea3e96166f3d9157f320bbf922c63fd5726f13c3918c75cbd3a1311c1536477c0605dcee
2019-02-28 21:47:56 -05:00
docs Update Bitcoin Core usage docs 2019-02-15 14:54:52 -05:00
hwilib Merge #132: ledger: check keypath format for getxpub 2019-02-19 12:26:18 -05:00
test Merge #125: Test how the CLI deals with really big transactions 2019-02-28 21:47:56 -05:00
.gitignore Add scripts to run tests and prepare test environments 2018-12-04 10:32:23 -05:00
.python-version Set Python version for PyEnv 2018-12-21 13:38:03 +00:00
.travis.yml Add travis job for cli interface test 2019-02-19 10:21:58 -05:00
hwi.py Refactor to make hwilib more like a library 2019-01-19 16:58:31 -05:00
LICENSE Add MIT license 2017-08-11 13:04:02 -07:00
README.md Update dependencies in the readme 2019-02-14 00:49:18 -05:00
setup.py Replace btchip-python with our own stripped down version of it 2019-02-12 17:26:27 -05:00

Bitcoin Hardware Wallet Interaction scripts

Build Status

This project contains several scripts for interacting with Bitcoin hardware wallets.

Prerequisites

Python 3 is required. The libraries and udev rules for each device must also be installed.

Install all of the libraries using pip (in virtualenv or system):

pip3 install hidapi # HID API needed in general
pip3 install ecdsa
pip3 install pyaes
pip3 install typing_extensions
pip3 install mnemonic
pip3 install libusb1

Install

git clone https://github.com/bitcoin-core/HWI.git
cd HWI

Usage

To use, first enumerate all devices and find the one that you want to use with

./hwi.py enumerate

Once the device type and device path is known, issue commands to it like so:

./hwi.py -t <type> -d <path> <command> <command args>

Device Support

The below table lists what devices and features are supported for each device.

Please also see docs for additional information about each device.

Feature \ Device Ledger Nano S Trezor One Digital BitBox KeepKey Coldcard
Support Planned Yes Yes Yes Yes Yes
Implemented Yes Yes Yes Yes Yes
xpub retrieval Yes Yes Yes Yes Yes
Message Signing Yes Yes Yes Yes Yes
Device Setup N/A Yes Yes Yes N/A
Device Wipe N/A Yes Yes Yes N/A
Device Recovery N/A Yes N/A Yes N/A
Device Backup N/A N/A Yes N/A Yes
P2PKH Inputs Yes Yes Yes Yes Yes
P2SH-P2WPKH Inputs Yes Yes Yes Yes Yes
P2WPKH Inputs Yes Yes Yes Yes Yes
P2SH Multisig Inputs Yes Yes Yes Yes N/A
P2SH-P2WSH Multisig Inputs Yes No Yes No N/A
P2WSH Multisig Inputs Yes No Yes Yes N/A
Bare Multisig Inputs Yes N/A Yes N/A N/A
Aribtrary scriptPubKey Inputs Yes N/A Yes N/A N/A
Aribtrary redeemScript Inputs Yes N/A Yes N/A N/A
Arbitrary witnessScript Inputs Yes N/A Yes N/A N/A
Non-wallet inputs Yes Yes Yes Yes Yes
Mixed Segwit and Non-Segwit Inputs N/A Yes Yes Yes Yes
Display on device screen Yes Yes N/A Yes Yes

Using with Bitcoin Core

See Using Bitcoin Core with Hardware Wallets.

License

This project is available under the MIT License, Copyright Andrew Chow.