Deprecate wallet-owned signing APIs#505
Draft
noahjoeris wants to merge 2 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #505 +/- ##
==========================================
+ Coverage 80.96% 81.13% +0.16%
==========================================
Files 24 24
Lines 5489 5501 +12
Branches 247 247
==========================================
+ Hits 4444 4463 +19
+ Misses 968 958 -10
- Partials 77 80 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed
8 tasks
44a49b6 to
769b782
Compare
1 task
769b782 to
8857be6
Compare
oleonardolima
left a comment
Collaborator
There was a problem hiding this comment.
overall it's looking good, it's best if you fix the first commit and let the last one just adding the deprecation notice. let's us know when it's ready for final review.
Prefer bitcoin::Psbt::sign or Wallet::sign_with_signers in docs, examples, and tests instead of relying on wallet-owned signer state. Add FullyNodedExport::export_wallet_with_keymaps so private descriptor material can be supplied explicitly during export.
Mark Wallet::sign, signer/keymap accessors, keymap load/create helpers, and FullyNodedExport::export_wallet as deprecated. The replacement path is to keep KeyMaps/Xprivs outside Wallet, use bitcoin::Psbt::sign with wallet.secp_ctx(), or pass caller-owned SignersContainers to Wallet::sign_with_signers when SignOptions are needed.
8857be6 to
c810938
Compare
Contributor
Author
|
Thanks for spotting this. It seems I added the change to the last commit and not the first, my bad. I cleaned up the commits. |
14 tasks
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
Partially addresses #70
Deprecates wallet-owned signing APIs, migrating examples, tests, and documentation toward caller-owned keys using
bitcoin::Psbt::signandWallet::sign_with_signers.Depends on:
Xprvwith key origin info rust-bitcoin/rust-miniscript#872derivation_pathfor keys with origin rust-bitcoin/rust-miniscript#867Notes to the reviewers
bitcoin::Psbt::signwhere possible. And usedWallet::sign_with_signersif we need SignOptions.Changelog notice
Wallet::{add_signer, set_keymap, set_keymaps, get_signers, sign},CreateParams::keymap, andLoadParams::{keymap, extract_keys}in favor of caller-owned keys andWallet::sign_psbtandWallet::sign_with_signers.FullyNodedExport::export_wallet; useFullyNodedExport::export_wallet_with_keymapsto supply keymaps explicitly.Before submitting