Repository navigation
Conversation
tvpeter
marked this pull request as ready for review
July 23, 2025 04:34
tvpeter
force-pushed
the
feat/hwi
branch
2 times, most recently
from
October 13, 2025 11:10
2c28a68 to
067f8eb
Compare
Pull Request Test Coverage Report for Build 19265985308Details
💛 - Coveralls |
tvpeter
force-pushed
the
feat/hwi
branch
3 times, most recently
from
October 15, 2025 08:52
d3cfe8b to
60628b8
Compare
sdmg15
reviewed
Dec 12, 2025
Contributor
|
I have tested with most of the devices, expect BitBox since you're not providing the emulator feature, this makes the |
tvpeter
force-pushed
the
feat/hwi
branch
3 times, most recently
from
February 20, 2026 03:58
7681e80 to
4a71d1d
Compare
- enable offline signer for creating tx whenever hwi feature is enabled - make handle_offline_wallet_subcommand fn async to handle hwi operations - add connecting to hwi fn in utils
- add `register` wallet hwi subcommand
fix clippy issues
- add signing psbt with hardware wallet
- add ledger and coldcard integration - update hwi as top level command - update CHANGELOG rebase and fix clippy issues
- async-hwi requires libudev-sys for linux systems - remove skip_blocks param as it is no longer needed for cbf
- update code_coverage workflow to use the latest actions - add hidapi dependencies to workflows to fix failing compilation
notmandatory
approved these changes
Feb 25, 2026
notmandatory
left a comment
Member
There was a problem hiding this comment.
utACK 8a6012d
Looks like last commit failed due to some unrelated CI/codecov error.
Member
|
Thanks for getting this one done, it's a really important feature! We should talk this one up when the next release is published. |
Collaborator
Author
1 of 3 tasks
5 of 6 tasks
Collaborator
Author
|
Closing this PR in favour of #311 |
tvpeter
added a commit
that referenced
this pull request
Oct 21, 2026
d34e6bf test(hwi): add more tests to helper fns (Vihiga Tyonum) c2466e9 ref(hwi): move descriptor utils into descriptor utils (Vihiga Tyonum) 4131510 feat(hwi): Add fingerprint to "hwi xpub" (Vihiga Tyonum) 3e3c0be feat(hwi): Add merging ext and int desc into policy (Vihiga Tyonum) e59a64d feat(hwi): Move register, address & sign to wallet (Vihiga Tyonum) a121866 feat(hwi): Reuse saved wallet config for hwi (Vihiga Tyonum) abea789 feat(hwi): Add hwi documentation (Vihiga Tyonum) 25b60b6 feat(hwi): Add hidapi to workflows (Vihiga Tyonum) ea7043e feat(hwi): Add hwi feature to dispatch and routing (Vihiga Tyonum) 7eab246 feat(hwi): Add hwi subcommand handler (Vihiga Tyonum) 0c9e1c3 feat(hwi): Add utility fns to detect & list device (Vihiga Tyonum) Pull request description: <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description Adds hardware wallet support to the project using `async-hwi` library. Supported hardware devices include Specter, Jade, Ledger, Coldcard, and BitBox02 together with their simulators. This supersedes #207, which was approved but went stale after the project restructure. The feature has been reimplemented from scratch on the current modular structure, and the design is reworked around the saved wallet config. Commands: The feature introduced two top-level commands (`hwi devices` and `hwi xpub`) and wallet subcommands (`register`, `address`, and `sign`). - `hwi xpub [<path>] [--type <wpkh|tr|sh-wpkh|pkh>]`: reads a device extended public key. Outputs a ready-to-use key expression and external/internal descriptors. - `hwi devices`: list every connected device (fingerprint + model). - `register`: Wallet scoped operation (`wallet -w <walletname> hwi register`). It registers the wallet policy on the device (returns the HMAC where the device supports it). The policy comes from the saved wallet config. - address: Also a wallet-scoped operation. It displays the address on-device where supported, and derive it locally. - `sign <psbt>`: sign a PSBT with the device. fixes #194 <!-- Describe the purpose of this PR, what's being adding and/or fixed --> ### Notes to the reviewers - `xpub` and `devices` are top-level because you need xpub to build a wallet. - `register`, `address`, `sign` live under wallet and read descriptors from the saved config. - Policy handling. async-hwi expects a single multipath (…/<0;1>/*) public wallet policy. BDK stores the external/internal chains as two single-path descriptors, so the code combines them (from the wallet's public_descriptor, guaranteeing xpub-only) into the multipath form. - `create_tx` defaults --offline_signer to true when built with hwi, so PSBTs carry the xpub data the hardware wallets need. Known limitations: - Only the first connected device is used - `sign` produces partial signatures only; finalize separately with `finalize_psbt` - On-device address display for single-sig is limited to taproot (async-hwi has no simple wpkh display path); other single-sig returns the locally derived address. HWI subcommand implementation - `hwi xpub` - `hwi devices` - `wallet … hwi register` - `wallet … hwi address` - `wallet … hwi sign` <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> Devices tested: - specter simulator: devices, xpub, register, sign - bitbox simulator: devices, xpub, register, sign - coldcard device: devices, xpub, address, sign ## Changelog notice - Added hwi feature with hardware wallet support (Specter, Jade, Ledger, Coldcard, BitBox02) to read device xpubs, list devices, register a wallet policy, display/verify addresses, and sign PSBTs. <!-- Notice the release manager should include in the release tag message changelog --> <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [x] I've added docs for the new feature * [x] I've updated `CHANGELOG.md` ACKs for top commit: Musab1258: tACK d34e6bf Tree-SHA512: 4756dc1ecbb541f478f183ac8d625fe5ed1978a201cfe869b71eaa40532400b840dcc0fd91545e94ba0eff9e90190c8440ae47f7ebb44914a0de67dec92ac474
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
fixes #194
Notes to the reviewers
display_addressmethod in the provided trait in async-hwi library is meant to trigger address generation by the connected device and display it on the device screen. Generated addresses are the same for both the app and device, so app addresses are returned for thehwi addresssubcommand.This feature was tested with
SpecterSimulatorandColdcard, although not allhwifeatures were successfully tested on coldcard.For signing with hwi, it does sign but do not finalized the
PSBT, so it has to be finalized before broadcasting.Changelog notice
Checklists
HWI Wallet Subcommands implementation
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.mdBugfixes: