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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.15%. Comparing base (fb7681a) to head (e046adc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   80.04%   80.15%   +0.11%     
==========================================
  Files          24       24              
  Lines        5336     5367      +31     
  Branches      242      242              
==========================================
+ Hits         4271     4302      +31     
  Misses        987      987              
  Partials       78       78              
Flag Coverage Δ
rust 80.15% <100.00%> (+0.11%) ⬆️

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant