Deprecate wallet-owned signing APIs - #505
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #505 +/- ##
==========================================
+ Coverage 81.84% 81.94% +0.10%
==========================================
Files 25 25
Lines 6487 6491 +4
Branches 296 296
==========================================
+ Hits 5309 5319 +10
+ Misses 1078 1069 -9
- Partials 100 103 +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:
|
44a49b6 to
769b782
Compare
769b782 to
8857be6
Compare
oleonardolima
left a comment
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.
8857be6 to
c810938
Compare
|
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. |
|
I still need to look into |
|
For One tricky part is A possible migration path is adding Downside: policy-path users get one more builder call, and |
|
Neither
|
|
No, passing empty signers won't work. It can create different A path built from |
|
So after some discussion with @thunderbiscuit and @notmandatory we concluded that we cannot remove the signers fields unless we update TxBuilder to accept a spending policy to be passed in. If we don't want to update it (from what I heard) then the wallet signer removal is coupled to the TxBuilder removal. And it might make sense to deprecate both at the same time once we integrated |
That sounds extreme. The whole policy path ceremony in |
c810938 to
9a9b2ca
Compare
9a9b2ca to
469d16c
Compare
|
On second thought I think it should be merged to master and backported to 3.x, so we don't lose track of the tests migration |
|
Do you want to leave the |
8fc6337 to
515bee8
Compare
ValuedMammal
left a comment
There was a problem hiding this comment.
ACK 515bee8; ran the tests locally
Prefer bitcoin::Psbt::sign or Wallet::sign_with_signers in docs, examples, and tests instead of relying on wallet-owned signer state. Keep FullyNoded exports public-only and independent of wallet-owned signer state.
Add TxBuilder::set_condition and wire create_tx to prefer an explicit Condition, falling back to policy-path derivation. Export Condition / Condition::merge. Migrate the compiler example off Wallet::policies.
Mark Wallet::sign, signer/keymap accessors, keymap load/create helpers, Wallet::policies, and TxBuilder::policy_path as deprecated. Replacement: keep KeyMaps/Xprivs outside Wallet; bitcoin::Psbt::sign or Wallet::sign_with_signers; extract_policy + Policy::get_condition + TxBuilder::set_condition for spending paths.
515bee8 to
73c6736
Compare
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
Before submitting