bdk-cli icon indicating copy to clipboard operation
bdk-cli copied to clipboard

feat(hwi): add hardware wallet support

Open tvpeter opened this issue 6 months ago • 2 comments

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_address method 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 the hwi address subcommand.

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 fmt and cargo clippy before 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

tvpeter avatar Jul 21 '25 19:07 tvpeter

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 Coverage Status
Change from base Build 19253249526: -1.4%
Covered Lines: 172
Relevant Lines: 1596

💛 - Coveralls

coveralls avatar Oct 13 '25 11:10 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.

sdmg15 avatar Dec 12 '25 13:12 sdmg15