84315dd Build and test with Trezor T emulator (Andrew Chow)
ef81662 Switch to Trezor monorepo (Andrew Chow)
6952edd Introduce full_type in tests for distinguishing between device models (Andrew Chow)
9484803 Update Trezor T support (Andrew Chow)
Pull request description:
Fills out the table in the README with the rest of the Trezor T support.
Changes the Trezor emulator stuff to use their new monorepo. Also adds Trezor T tests.
Built on #157
ACKs for commit 84315d:
Tree-SHA512: f4f19574d4f7b177dc98e5770017c7801fec35f481d1b50cc5ec8bf95ce483327c47626d824cea372c28ebd807c19adb412aec58d0a016643ab5366bb0eb528e
4d21f29 ignore other devices when checking that the coldcard has started (Andrew Chow)
54e14ba Change the order devices are tested in (Andrew Chow)
1c33312 Test need_passphrase_sent and need_pin_sent (Andrew Chow)
bca8535 Add needs_pin_sent to indicate whether promptpin needs to be used (Andrew Chow)
d2696cf Add needs_passphrase_sent to enumerate output (Andrew Chow)
Pull request description:
This adds two fields to `numerate`: `needs_passphrase_sent` and `needs_pin_sent` which indicate whether a command with a `-p` option is needed or `promptpin` and `sendpin` need to be done. These fields will be true in the instances that a passphrase needs to be sent and have not been cached by the device. To avoid a chicken and egg problem with fingerprints on Trezors, if the device needs a passphrase but one was not specified in `enumerate`, the fingerprint won't be retrieved in order to not contaminate the passphrase cache on device.
Built on #152 because it has some interactions with it that needed to be addressed.
ACKs for commit 4d21f2:
Tree-SHA512: 4164a8e541a9441b615205b84561966dd2f199f5f5e738cc55f12c60866483e458f3a5c05ac22c69baf862c37f6beeb3ca78f01c7b63770b9440f47a56811173
Test the digitalbitbox first because it will self wipe if the wrong
password is given too many times (by other tests) which causes test
to fail.
Then, group up tests by simulator, those with simulators started at
the beginning (dbb and coldcard) go first. Then those with simulators
started for each test (trezor and keepkey). Lastly the test that
requires a physical device.
cada7f5 Add installudevrules command for linux (lontivero)
Pull request description:
This PR is for discussing the concept and the implementation. The idea is to make it easier for Linux users to install the udev rules in their systems by running:
```
$ hwi installudevrules
```
ACKs for commit cada7f:
achow101:
ACK cada7f5ce0
Tree-SHA512: 54a11b9bbbf8f4258a32a8503694026fda6adfe301bc3f44ed85c155426b894d512698046f14d9b62600d80614f2a6bd28d1d77ff0cfd2859c0f0786bc4013d6
54bd668 Actually test that displayaddress is returning correct output (Andrew Chow)
0974f69 Ensure the client's fingerprint is available for descriptor displayaddress (Andrew Chow)
cea784e tests: Replace remaining process_commands with self.do_command in tests (Andrew Chow)
70e31ca tests: Properly escape arguments for cli interface (Andrew Chow)
Pull request description:
`displayaddress` with descriptors wasn't working correctly nor was it being tested correctly. Fixed it and the tests.
ACKs for commit 54bd66:
Tree-SHA512: 84d27925a0bdb26e6ab844ded23e08d7b5f3e2aa78964d324c9223c04aaa26252a1e60e556696937b90518072fd62765fb38a15bc5f54600f837e4867cf1b148
d00ae56 Don't send Initialize when first connecting to a Trezor (Andrew Chow)
Pull request description:
When the client is opened, we would send an `Initialize` message. However because a client may end up being opened many times in the process of executing one command, the saved state (in particular cached passphrases) would be lost each time the client is opened due to `Initialize` being sent. In order to have it keep that state, we don't want to send `Initialize` every time. Instead we will send `GetFeatures` which does the other part of what `Initialize` does (get the features for the device). `GetFeatures` failing would indicate that the state is inconsistent (which can be caused by command abort, exceptions, etc.), so in that case, `Initialize` is sent to clear the inconsistent state.
I tested this using the Trezor T emulator and the password prompt does not appear multiple times per command. Additionally the password prompt does not appear for every command.
Fixes#151
ACKs for commit d00ae5:
Tree-SHA512: 76bde488bf9a486267cc0c84668db79e9f1706f10f4d12d093829bcf1a5f713a7aec9da3eae674b152071d3d5c7219c163fe01465dea9e02f1e56298d318058a
6735983 Have setup_environment.sh remove emulator.img files for trezor and keepkey (Andrew Chow)
Pull request description:
This makes travis stop hanging when it gets to the keepkey tests.
ACKs for commit 673598:
Tree-SHA512: 1eb37e4114e35a5636c69d9d0ba57a808d471f8675f1f02823bcb25aa1a6775d52bf4e5ab5fa12934fc79db8a82c4bfe589ccb0dddddf7b7761ee4a0e454c86a
0cf6bb9 commands.py: use fingerprint if already captured by client (Peter D. Gray)
Pull request description:
For me with a `signmessage` to the Coldcard simulator, this saves 6-7 seconds. But this should speed up all devices, since they are already capturing the fingerprint value into the enumeration information.
ACKs for commit 0cf6bb:
achow101:
ACK 0cf6bb9998
Tree-SHA512: db2bb8eed855b70e8f1ee68c4eaf59eae191732246525669f9e600c10bee0dca1108685f1f508c24232151a792b8178d11bf80eee8cf880f0442e5f69dd81f56
0c831e4 devices/coldcard.py: accelerate enum process by using fingerprint value revealed during connection setup (Peter D. Gray)
Pull request description:
... by using fingerprint value revealed during connection setup.
For my system, with one Coldcard and CC simulator connected, this change saves six seconds.
ACKs for commit 0c831e:
achow101:
ACK 0c831e4f75
Tree-SHA512: d309dcc4730c54a47fc32329fed6adb9e6abe93e9068765874d32f6155d4e946359537a945afdc11f4fbcab692e0b8c29cd1e78d73c52d47ce21521d781970f4
85eaf70 pin poetry version to 0.12.12 as 0.12.14 is broken (Andrew Chow)
Pull request description:
The latest version of poetry (0.12.14) is broken which is causing travis to fail. Pin the version to 0.12.13 for now.
ACKs for commit 85eaf7:
Tree-SHA512: 9d024ddc52f688c8ec24018201113273a089ee36afb2f2b2c959cada5b982db61365222afc9f934657bdbc862401ab000ae59e4bf4f354121a7d8f22a0001a0c
ae9bca3 Add packages to pyproject.toml to allow generating a working setup.py (Jonas Nick)
Pull request description:
Fix of #159. Now setup.py was generated with `contrib/generate_setup.sh` after adding `hwi.py` and `hwilib` explicitly to `pyproject.toml`. This allows installing with `setup.py`.
ACKs for commit ae9bca:
achow101:
ACK ae9bca3ae3
Tree-SHA512: f31d2b81292d7fa324806ab4ff588f678e6d58dea37d209e423a20522c97a1a9dfeb18db8d02840f46aafc18b2533b8eef3913fd86dee5ef31db7e1b02e936ee
483b589 Fix keypool refill instructions in docs (Jonas Nick)
Pull request description:
The current instructions both give the same results, so I presume the first should be non-internal.
ACKs for commit 483b58:
achow101:
ACK 483b589eeb
Tree-SHA512: 0c01de587c86e7b1df3e8781f83dab8f906ed0f89864f33f83992e0f724ceb3216e4aeee21a1d00c1ef74021c4975b823b0f20fe13b6ef7c0c6c2b61da5f9d8d
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
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
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
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.
Instead of sending Initialize, don't. This lets it stay in the
same "session" as previous commands so some state such as passphrases
are still cached by the device.
If GetFeatures fails, then try sending Initialize so that any
inconsistent state on the device is cleared.
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
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