bdk-cli
bdk-cli copied to clipboard
feat(hwi): add hardware wallet support
Description
fixes #194
Notes to the reviewers
- enable offline signer for creating tx whenever hwi feature is enabled
- make handle_offline_wallet_subcommand fn async to handle hwi operations
- The
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 SpecterSimulator and Coldcard, although not all hwi features 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
- [x] hwi devices
- [x] hwi register
- [x] hwi address
- [x] hwi sign tx
All Submissions:
- [x] I've signed all my commits
- [x] I followed the contribution guidelines
- [x] I ran
cargo fmtandcargo clippybefore committing
New Features:
- [ ] I've added tests for the new feature
- [ ] I've added docs for the new feature
- [x] I've updated
CHANGELOG.md
Bugfixes:
- [ ] This pull request breaks the existing API
- [ ] I've added tests to reproduce the issue which are now passing
- [x] I'm linking the issue being fixed by this PR
Pull Request Test Coverage Report for Build 19265985308
Details
- 0 of 182 (0.0%) changed or added relevant lines in 2 files are covered.
- 1 unchanged line in 1 file lost coverage.
- Overall coverage decreased (-1.4%) to 10.777%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/utils.rs | 0 | 89 | 0.0% |
| src/handlers.rs | 0 | 93 | 0.0% |
| <!-- | Total: | 0 | 182 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| src/handlers.rs | 1 | 14.22% |
| <!-- | Total: | 1 |
| Totals | |
|---|---|
| Change from base Build 19253249526: | -1.4% |
| Covered Lines: | 172 |
| Relevant Lines: | 1596 |
💛 - Coveralls
I have tested with most of the devices, expect BitBox since you're not providing the emulator feature, this makes the is_bitbox02 always returning false even when the simulator is running.