Skip to content

feat: expose detailed try_finalize_psbt outcomes#433

Open
reez wants to merge 1 commit intobitcoindevkit:masterfrom
reez:issue-73
Open

feat: expose detailed try_finalize_psbt outcomes#433
reez wants to merge 1 commit intobitcoindevkit:masterfrom
reez:issue-73

Conversation

@reez
Copy link
Copy Markdown

@reez reez commented Apr 7, 2026

Description

First step for #73, following ValuedMammal's suggestion.

This PR keeps the scope to PSBT finalization only:

  • add try_finalize_psbt which returns FinalizePsbtResult
  • report per input outcomes via FinalizePsbtInputResult

Notes to the reviewers

This is now additive rather than breaking: Wallet::finalize_psbt still returns bool

Intentionally not included here:

  • changing Wallet::sign to return a richer result type
  • any broader redesign beyond the PSBT finalization API surface

Changelog notice

  • Add Wallet::try_finalize_psbt, which returns FinalizePsbtResult and exposes per-input finalization outcomes while preserving the existing Wallet::finalize_psbt API.

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.13%. Comparing base (fb7681a) to head (69966b6).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/wallet/mod.rs 91.42% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   80.04%   80.13%   +0.09%     
==========================================
  Files          24       24              
  Lines        5336     5367      +31     
  Branches      242      242              
==========================================
+ Hits         4271     4301      +30     
- Misses        987      989       +2     
+ Partials       78       77       -1     
Flag Coverage Δ
rust 80.13% <91.42%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reez reez force-pushed the issue-73 branch 2 times, most recently from c65f534 to e046adc Compare April 7, 2026 20:16
@reez reez changed the title (draft) feat: expose detailed finalize_psbt outcomes (draft) feat: expose detailed try_finalize_psbt outcomes Apr 7, 2026
@reez
Copy link
Copy Markdown
Author

reez commented Apr 7, 2026

Updated per some good feedback from mammal

@reez reez marked this pull request as ready for review April 9, 2026 19:21
@reez reez changed the title (draft) feat: expose detailed try_finalize_psbt outcomes feat: expose detailed try_finalize_psbt outcomes Apr 9, 2026
@reez reez force-pushed the issue-73 branch 4 times, most recently from f15d651 to f3fb2a6 Compare April 14, 2026 14:00
@ValuedMammal ValuedMammal added this to the Wallet 3.1.0 milestone Apr 14, 2026
@ValuedMammal ValuedMammal added the new feature New feature or request label Apr 14, 2026
@ValuedMammal ValuedMammal moved this to In Progress in BDK Wallet Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants