Commit Graph

413 Commits

Author SHA1 Message Date
Peter D. Gray
0c831e4f75
devices/coldcard.py: accelerate enum process by using fingerprint value revealed during connection setup 2019-04-29 10:32:58 -04:00
Andrew Chow
c628206d31
Merge #154: Make versioned compressed packages for releases
cb2ed16 Build Windows binary in travis as well (Andrew Chow)
a86323d Make versioned compressed packages for releases (Andrew Chow)

Pull request description:

  The current build scripts produce binary files named `hwi` and `hwi.exe` which is both unversioned and conflicting for the Linux and MacOS binaries. For the 1.0.0 binaries, I had compressed these and named them myself before uploading. This PR changes the build scripts to compress and name the packages too. Additionally the names will include the version number which I forgot to do for 1.0.0.

ACKs for commit cb2ed1:

Tree-SHA512: 07a167f45ce3652c347350574c2dd0d2d7f39724665aa6b4ebb2b41212bf2526ff21fe36b732cb01890ff051e35d57dc91fa4220ec22f5395a02f3c9ed6bf266
2019-04-21 19:16:22 -04:00
Andrew Chow
cb2ed1654c Build Windows binary in travis as well 2019-04-21 18:18:50 -04:00
Andrew Chow
a86323d419 Make versioned compressed packages for releases 2019-04-21 18:18:50 -04:00
Andrew Chow
b5d74ec24c
Merge #153: Include Windows UCRT in Windows build
f109365 Install Windoew Universal C++ Runtime from Windows 10 SDK in Windows build (Andrew Chow)

Pull request description:

  Older versions of Windows needs to have the Windows Universal C++ Runtime packaged with the binary to work. This PR adds to the `build_wine.sh` build script to download the DLLs for the UCRT and package them with the Windows build.

  Fixes #150

ACKs for commit f10936:

Tree-SHA512: 7b9b98cdc4e329cf228dc42a09aa434f984c4db90b09b2ca6cb3dd7d8c1957cd717f761e8a1eeadbd8662f74452141a4df583ab40d939c57e20f0b0f83625b47
2019-04-21 18:08:02 -04:00
Andrew Chow
30146a26b8
Merge #156: Add Trezor Model T
95bd88e Add Trezor Model T (nopara73)

Pull request description:

  # Notes

  - I marked with `?` the functions I did not test myself.
  - I can make a PR in a way that I add Trezor Model T to the last row so the diff would be easier to see if you prefer.

ACKs for commit 95bd88:
  achow101:
    ACK 95bd88e41d

Tree-SHA512: fb2934f3a0cbc0ce4f473945be1f457f0e0a6fea17bdd6d89b8d375a249d251a68188de3d20a00a4954daa819734ebb3aad871e2b0aeb3ac231fc200cdba5eff
2019-04-21 18:05:45 -04:00
Andrew Chow
bfc29c26a5
Merge #155: Fix last command format at examples.md
9e82690 Fix last command format at `examples.md` (Roman Zeyde)

Pull request description:

ACKs for commit 9e8269:
  achow101:
    ACK 9e826909cf

Tree-SHA512: 55b039d8f4ad5205b83e92e6a2c36c9688055ed7083c6de75479a3e712b77087a82a1f8f6d5ee1d299fdd1c5d012ef368f4d741e52eca18a6119ea1d99b78bff
2019-04-21 18:04:35 -04:00
nopara73
95bd88e41d
Add Trezor Model T 2019-04-21 22:20:19 +02:00
Roman Zeyde
9e826909cf
Fix last command format at examples.md 2019-04-20 20:38:16 +03:00
Andrew Chow
f109365047 Install Windoew Universal C++ Runtime from Windows 10 SDK in Windows build
Download and extract the Universal C++ Runtime from the Windows 10 SDK
and copy the DLLs to C:\Windows\System32 when doing Windows build.
This will make sure that the proper DLLs are included in the Windows
binary so that it works on older Windows.
2019-04-19 22:37:49 -04:00
Andrew Chow
6e92b7d40f
Merge #147: Add udev rules for all supported devices
397993b [ci skip] Document udev rules (Andrew Chow)
1222d9a Add udev rules for all supported devices (Andrew Chow)

Pull request description:

  It's useful to have all of the udev rules needed for all devices in one location instead of having to go to every vendor's webpage to find these.

  Original sources:
  `20-hw1.rules` (Ledger): https://github.com/LedgerHQ/udev-rules/blob/master/20-hw1.rules
  `51-coinkite.rules` (Coldcard): https://github.com/Coldcard/ckcc-protocol/blob/master/51-coinkite.rules
  `51-hid-digitalbitbox.rules`, `52-hid-digitalbitbox.rules` (Digital Bitbox): https://shiftcrypto.ch/start_linux
  `51-trezor.rules` (Trezor): https://github.com/trezor/trezor-common/blob/master/udev/51-trezor.rules
  `51-usb-keepkey.rules` (Keepkey): https://github.com/keepkey/udev-rules/blob/master/51-usb-keepkey.rules

ACKs for commit 397993:

Tree-SHA512: c2dbe4dcff6e54ecb71724faeacc1aaca06b5a90dbc22289694ff40e0af30c756f42af8e52208c155d9fef54b099ac51679d9f9cbc0f0de1384ce47e39c00b3c
2019-04-16 14:32:43 -04:00
Andrew Chow
397993bfdc [ci skip] Document udev rules 2019-04-16 14:30:36 -04:00
Andrew Chow
f94913739e
Merge #146: Import HID in Ledger driver
d065307 Import HID in Ledger driver (Andrew Chow)

Pull request description:

  Apparently this is needed, especially for newly setup environments.

  Fixes #143

ACKs for commit d06530:

Tree-SHA512: 4434f947a1cf1191445ffb5c51ebb00d221fd05f64b48b6cb403feeca378bfcd59f81e414b90b16552cf1af1df452603e54aa2e90f01c741ac3c376d96d7a47e
2019-04-16 14:18:36 -04:00
Andrew Chow
4814a293e8
Merge #142: Document how to handle binary format files from command line with bas…
f096c18 Document how to handle binary format files from command line with bash example (Gregory Sanders)

Pull request description:

  …h example

  Since these are quite standard utilities, we may want to take the unix philosophy and let other utils take care of these common conversions.

ACKs for commit f096c1:
  achow101:
    ACK f096c18478

Tree-SHA512: ee04a1e4e7f4106f7afcb5130cd8bb8fb1446a79b8babaf14c7aed4b753699b29ed8dfca057928289848f562b24663850377eccbbef27ba9c60f011a901cdc5a
2019-04-15 20:29:24 -04:00
Andrew Chow
1222d9a492 Add udev rules for all supported devices 2019-04-15 19:50:26 -04:00
Andrew Chow
d065307317 Import HID in Ledger driver 2019-04-15 19:45:39 -04:00
Andrew Chow
685faa2e5c bump version number to 1.0.0 2019-03-15 16:43:53 -04:00
Gregory Sanders
f096c18478 Document how to handle binary format files from command line with bash example 2019-03-15 09:50:02 -04:00
Andrew Chow
7b0e84e26c
Merge #140: Add Keepkey Webusb device ids
6f67659 Add Keepkey Webusb device ids (Andrew Chow)

Pull request description:

  Keepkey's latest firmware uses webusb but has different device ids. Add those ids so that that interface can be used.

Tree-SHA512: 082f1eb1fd827af2e4d8380101477e879ed026910cc57413c69d941fe4bc75483ac10318f887a53796dbd44e0ce1206cba1dbc3d50ada2e0314f78748ab48faf
2019-03-14 23:44:44 -04:00
Andrew Chow
6f67659e07 Add Keepkey Webusb device ids 2019-03-14 23:09:44 -04:00
Andrew Chow
a83fdc6be3
Merge #124: Add a switch for interactivity and make setup and restore interactive only commands
4453555 Add interactivity to Trezor setup and restore (Andrew Chow)
18857d9 Add interactive option and move setup and restore to interactive only (Andrew Chow)

Pull request description:

  Currently using setup and restore on the Trezor and Keepkey (which are basically the only devices that support setup and restore) are broken. They require user interaction. Instead of removing them entirely, move those commands behind a switch, `--interactive`.

Tree-SHA512: 4c76a94d7dc3b876f57eb417f22b14cb0a4ecbb97dc79ba675dc49670369e5682edbaf846946e246a028532f92c32f3e0f67b66d000d341368937c856dea5347
2019-03-14 20:32:10 -04:00
Andrew Chow
4453555c21 Add interactivity to Trezor setup and restore 2019-03-14 16:39:12 -04:00
Andrew Chow
18857d9cd0 Add interactive option and move setup and restore to interactive only 2019-03-14 16:39:12 -04:00
Andrew Chow
0dd2e86394
Merge #126: Add option to enter commands over stdin
49bc7fa Add tests for stdin interface and travis job (Andrew Chow)
0185391 Add --stdin to enter commands and arguments over stdin (Andrew Chow)

Pull request description:

  This PR adds a `--stdin` option which allows arguments to be entered over stdin in a way similar to bitcoin-cli's `--stdin` option.

  Built on #125 and to test the `stdin` interface

Tree-SHA512: 48e04298b3537ac59523e40fab3e1709d2ec4ca50284b0bcbbe9062f284bcfbf0cbc4492bd5b8fa673be35375fe8d9436d4aaec0a304b574ba411ee0fb284c0d
2019-03-14 15:00:24 -04:00
Andrew Chow
d0ac6b9398
Merge #138: Update documentation and change name to Hardware Wallet Interface
376245a Update tests documentation with new tests (Andrew Chow)
0235baf List all command support (Andrew Chow)
7929692 Update Bitcoin Core usage docs to match current software behavior (Andrew Chow)
b7873ac Describe the other files in contrib/ (Andrew Chow)
fc33fc5 List additional dependencies (Andrew Chow)
5e42d3d Rename to Hardware Wallet Interface and describe it a bit more (Andrew Chow)

Pull request description:

  Updates the docs to reflect current behavior and describe the stuff that is currently in the repo.

  Also renames the project from Hardware Wallet Interaction scripts to Hardware Wallet Interface.

Tree-SHA512: b5bd81110ac6181011629c39dad3bbca1bfb2ddc05f5d190a9d91685c30de0d535c3d0e893b510638eb963adffe63db388a84a19a377fbb9ec820ce4aa2fc55f
2019-03-11 10:24:50 -04:00
Andrew Chow
49bc7fa5da Add tests for stdin interface and travis job 2019-03-11 10:23:45 -04:00
Andrew Chow
0185391c72 Add --stdin to enter commands and arguments over stdin 2019-03-11 10:23:45 -04:00
Andrew Chow
2bf3d418e1
Merge #139: Add --version
d924f39 Add --version option and show version in help text (Andrew Chow)
b99385c Add version number to __init__.py and docs to update that (Andrew Chow)

Pull request description:

  Adds version info and a `--version` option.

Tree-SHA512: 56562da645b555dabb40ba0508b35fc6a2bde0f510668f51f1be402a743796ca1be27afce4980589718768260c7469b373a6b8c8cc3a29e637ed7af071bd5bd4
2019-03-09 14:28:12 -05:00
Andrew Chow
d924f39b6b Add --version option and show version in help text 2019-03-09 12:39:09 -05:00
Andrew Chow
376245ae0f Update tests documentation with new tests 2019-03-09 01:17:05 -05:00
Andrew Chow
0235baf377 List all command support 2019-03-09 01:17:05 -05:00
Andrew Chow
7929692c9d Update Bitcoin Core usage docs to match current software behavior 2019-03-09 01:17:05 -05:00
Andrew Chow
b99385c8e2 Add version number to __init__.py and docs to update that 2019-03-08 18:05:10 -05:00
Andrew Chow
b7873acddc Describe the other files in contrib/ 2019-03-08 16:55:13 -05:00
Andrew Chow
fc33fc5bbe List additional dependencies 2019-03-08 16:55:12 -05:00
Andrew Chow
5e42d3d696 Rename to Hardware Wallet Interface and describe it a bit more 2019-03-08 15:20:18 -05:00
Andrew Chow
07ece90769
Merge #121: Tools for deterministic builds of standalone binaries and distribution archives
8931ae0 Run tests using the binary distribution (Andrew Chow)
39a6fc9 Fixes for Windows (Andrew Chow)
a229de0 Update .travis.yml to use poetry for build (Andrew Chow)
77257a1 Add build scripts and documentation for building releases (Andrew Chow)
9e04d1a Add a hwi.spec file for pyinstaller to build standalone binaries (Andrew Chow)
d6b24b8 Add pyproject.toml and poetry.lock for poetry dependency manager (Andrew Chow)

Pull request description:

  This PR adds several scripts and tools for making standalone binaries of the `hwi.py` script and for creating distribution archives that will go on pypi.org.

  To achieve deterministic builds, the dependencies used must be locked to specific versions and hashes. To do this, I have added configuration files for using the [Poetry dependency manager](https://github.com/sdispater/poetry). Because Poetry uses a `pyproject.toml` file instead of `setup.py`, I have created a helper script which will automatically generate the proper `setup.py` file from `pyproject.toml`. The reason I chose Poetry instead of Pipenv for this task is because it has the ability to do deterministic builds of the distribution archives (python wheel and source tar for pypi.org) which Pipenv does not have.

  Additionally scripts have been added to the newly created `contrib/` folder which will perform the deterministic builds of the binaries and distribution archives. The builds of the binaries are done using [pyinstaller](http://www.pyinstaller.org/). In order to build for different platforms, the `contrib/build_bin.sh` script needs to be run on each of the platforms we wish to release for. It can also be run in wine to do windows builds (see `contrib/build_wine.sh`). The configuration file that pyinstaller needs has also been added.

  Lastly the pyenv version for this project has been bumped to 3.6.8 since using python 3.5.x produced standalone binaries that did not work.

  This PR is built on #120 as reducing the number of dependencies fixed several issues with the standalone binary builds.

Tree-SHA512: abc1a6ac06d663b1316cde254980b0b1e8c392a6ffe478710df7c8e48a344cd57105e83555ec8fdcdc30e2b7d6d9cd6464367afda80653cb3cbc3acaf6119f48
2019-03-08 15:04:01 -05:00
Andrew Chow
8931ae0e90 Run tests using the binary distribution 2019-03-08 00:42:43 -05:00
Andrew Chow
39a6fc9654 Fixes for Windows 2019-03-08 00:17:33 -05:00
Andrew Chow
a229de0780 Update .travis.yml to use poetry for build 2019-03-08 00:17:33 -05:00
Andrew Chow
77257a18da Add build scripts and documentation for building releases
Adds builds scripts that are used to build releases deterministically.
Also adds documentation that explains the release process and what
the build scripts do.
2019-03-08 00:17:33 -05:00
Andrew Chow
9e04d1a16a Add a hwi.spec file for pyinstaller to build standalone binaries 2019-03-08 00:17:33 -05:00
Andrew Chow
d6b24b853d Add pyproject.toml and poetry.lock for poetry dependency manager
pyproject.toml contains everything that was in the setup.py. The setup.py
file is replaced with the one that poetry automatically generates.
2019-03-01 19:47:07 -05:00
Andrew Chow
6e4ffcdd1b
Merge #134: Use new importmulti array range format
2dc818c Use new importmulti array range format (Andrew Chow)

Pull request description:

  The range format changed again.

Tree-SHA512: fb81bfdceb5e0451ac0d72537a788f3c9d1aba0381afb129b1f1784d1635c154ec3b0ac93a0c3ea096d140833f18a6b47af1f495c8860d0401a05770c5305c23
2019-03-01 17:45:41 -05:00
Andrew Chow
2dc818c026 Use new importmulti array range format 2019-03-01 17:19:31 -05:00
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
Andrew Chow
9bc8bdc106
Merge #133: Fix Digital Bitbox tests for API changes
6c9964e Fix Digital Bitbox tests for API changes (Andrew Chow)

Pull request description:

  The Digital Bitbox API changed slightly which broke our tests due to the ordering of some operations. Normal usage is still fine. This fixes the test.

Tree-SHA512: bed658d935f6833c7f6e656f35edf5d123edf54a0dfd42383a65a9f178a556d07c84f930bc93e42b3df0b5b79b05e43e12a18042a2401c7040183472bfd6ddb6
2019-02-28 13:12:37 -05:00
Andrew Chow
6c9964ef84 Fix Digital Bitbox tests for API changes
The Digital Bitbox API changed slightly which broke our tests due to
the ordering of some operations. Normal usage is still fine.
2019-02-25 16:03:50 -05:00
Andrew Chow
ca9f0106cd
Merge #132: ledger: check keypath format for getxpub
6e1e9aa ledger: check keypath format for getxpub (Gregory Sanders)

Pull request description:

  Currently does none.

Tree-SHA512: 0219a415db038be0e40b5fda2798a000dce71a33d89265adfdf47f4e3a2c66b8d80238bb74688a68da146461e08f95bd08be6390ffecf13b3e704d1365787326
2019-02-19 12:26:18 -05:00
Andrew Chow
1a2b67d1f3 Test how a very large transaction is handled 2019-02-19 10:21:58 -05:00