-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #550: ledger: Support Bitcoin App 2.0
daeec1d ledger: Try legacy protocol when unable to sign multisigs (Andrew Chow) 711e6ba ledger: P2WSH display is also not supported (Andrew Chow) 6df9c1b ledger: Detect when a ledger is not in a Bitcoin app (Andrew Chow) edbb7c0 ledger: document multisig limitation (Andrew Chow) 6b8381e tests: Use external keys for some multisigs (Andrew Chow) 4f223a5 test: Include xpubs in psbt (Andrew Chow) f3f20e0 tests, ledger: Test multisigs (Andrew Chow) ac66cbc tests: additional speculos automation things (Andrew Chow) dffd014 ledger: Support multisigs (Andrew Chow) ae2adb5 key: Add from_bytes to ExtendedKey (Andrew Chow) ef1cf9d docs: Document Taproot signing (Andrew Chow) 3953000 tests: Don't rely on coin selection for signtx tests (Andrew Chow) cb6b352 tests: Use --chain test more consistently (Andrew Chow) 30b42e4 ci: Test ledger legacy api (Andrew Chow) 3b0680d tests: Test Taproot on Ledger (Andrew Chow) 8536786 ledger: Remove btchip (Andrew Chow) c154cf7 ledger: Use ledger_bitcoin rather than btchip (Andrew Chow) b645164 ledger_bitcoin: Change LegacyClient.sign_psbt to return pubkeys too (Andrew Chow) 23baff5 ledger_bitcoin: Modifications to get_wallet_address for our legacy usage (Andrew Chow) 50e2d01 hwwclient: Add Chain as a parameter to constructor (Andrew Chow) 5aad268 key: Add helpers for determing addrtype and standard paths (Andrew Chow) 26a1ccc ledger_bitcoin: Optionally allow HID path in TransportClient (Andrew Chow) 57d5c2f ledgercomm: Add the option to pass in HID path (Andrew Chow) 15e5427 ledgercomm: Use relative imports of itself (Andrew Chow) 88235d6 Include ledgercomm library (Andrew Chow) b709028 ledger_bitcoin: Fix sign_psbt for our implementation of PSBTv2 (Andrew Chow) e34f6fd Add ledger_bitcoin library (Andrew Chow) Pull request description: The 2.0 version of the Ledger Bitcoin app uses a completely new protocol which utilizes PSBTv2 and descriptors(ish). Additionally, this new version supports signing Taproot inputs. This PR adds support for using the new protocol when the app major version number is detected to be greater than or equal to 2. Ledger has provided a python library in https://github.com/LedgerHQ/app-bitcoin-new/tree/master/bitcoin_client. Given that many components of this library are copied from HWI itself, it doesn't make sense to include the entire thing. Additionally, as we already have access to the device via btchip-python, there is no need to use any of the transport things. So instead, parts of the library are copied to `hwilib/devices/ledgerbitcoin2` and modifications are made to use relative imports to common HWI components. Our copy of btchip-python is slightly modified to work with the new version as well, particularly with returning the status code rather than consuming it when receiving APDU responses. As the new protocol uses PSBTv2, this PR also requires #549 for PSBTv2 itself. As v2.0.0 supports Taproot, this branch is based on #544 so that Taproot can be supported. ACKs for top commit: Sjors: re-ACK daeec1d Tree-SHA512: 8f956622b439afe15be0c169e02d852d2ec221af9c75a70819956f78a9a8c4c3a7b555d0de4f3fd4df61bb862abda68505c5c2297a13f5c310e200d123cd609b
- Loading branch information
Showing
57 changed files
with
3,356 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
exclude = *.pyc,__pycache__,hwilib/devices/btchip/,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui | ||
exclude = *.pyc,__pycache__,hwilib/devices/ledger_bitcoin/,hwilib/devices/btchip,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui | ||
ignore = E261,E302,E305,E501,E722,W5 | ||
per-file-ignores = setup.py:E122 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.