Allows a user to export a watchonly version of their wallet to be used in an airgapped setup.
Menu action to export a watchonly wallet #872
pull achow101 wants to merge 9 commits into bitcoin-core:master from achow101:export-watchonly-wallet-gui changing 19 files +673 −101-
achow101 commented at 11:31 PM on May 13, 2025: member
-
DrahtBot commented at 11:31 PM on May 13, 2025: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #bitcoin/bitcoin/35445 (wallet, descriptor: Revert
StringType::COMPATfor Miniscript expressions and drop the concept of a Descriptor ID that can be validated by achow101) - #bitcoin/bitcoin/35444 (wallet: make descriptor SPKM mutex non-recursive by w0xlt)
- #bitcoin/bitcoin/35436 (wallet: Add addHDkey interface by pseudoramdom)
- #bitcoin/bitcoin/35377 (wallet: Allow importing of descriptors without private keys when the wallet has the private keys by achow101)
- #bitcoin/bitcoin/34909 (wallet, refactor: modularise wallet by extracting out legacy wallet migration by rkrux)
- #bitcoin/bitcoin/34861 (wallet: Add importdescriptors interface by polespinasa)
- #bitcoin/bitcoin/33392 (wallet, rpc: add UTXO set check and incremental rescan to importdescriptors by musaHaruna)
- #bitcoin/bitcoin/33034 (wallet: Store transactions in a separate sqlite table by achow101)
- #bitcoin/bitcoin/32895 (wallet: Prepare for future upgrades by recording versions of last client to open and decrypt by achow101)
- #bitcoin/bitcoin/32784 (wallet: derivehdkey RPC to get xpub at arbitrary path by Sjors)
- #bitcoin/bitcoin/32489 (wallet: Add
exportwatchonlywalletRPC to export a watchonly version of a wallet by achow101)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
- #bitcoin/bitcoin/35445 (wallet, descriptor: Revert
- DrahtBot added the label CI failed on May 14, 2025
- DrahtBot added the label Needs rebase on May 16, 2025
- achow101 force-pushed on May 16, 2025
- DrahtBot removed the label Needs rebase on May 16, 2025
- DrahtBot removed the label CI failed on May 17, 2025
- DrahtBot added the label Needs rebase on May 19, 2025
- achow101 force-pushed on May 20, 2025
- DrahtBot removed the label Needs rebase on May 20, 2025
- hebasto renamed this:
gui: Menu action to export a watchonly wallet
Menu action to export a watchonly wallet
on May 20, 2025 - DrahtBot added the label Needs rebase on May 21, 2025
- achow101 force-pushed on May 21, 2025
- DrahtBot removed the label Needs rebase on May 21, 2025
- DrahtBot added the label CI failed on May 21, 2025
- achow101 force-pushed on Jun 2, 2025
- DrahtBot removed the label CI failed on Jun 2, 2025
- achow101 force-pushed on Jun 4, 2025
- DrahtBot added the label Needs rebase on Jul 1, 2025
- achow101 force-pushed on Sep 11, 2025
- DrahtBot removed the label Needs rebase on Sep 11, 2025
- DrahtBot added the label Needs rebase on Dec 17, 2025
- achow101 force-pushed on Apr 28, 2026
- DrahtBot removed the label Needs rebase on Apr 28, 2026
- DrahtBot added the label CI failed on Apr 28, 2026
-
DrahtBot commented at 8:12 PM on April 28, 2026: contributor
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed. <sub>Task
tidy: https://github.com/bitcoin-core/gui/actions/runs/25068575825/job/73442374300</sub> <sub>LLM reason (✨ experimental): CI failed because clang-tidy reported anbugprone-unused-return-valuewarning inqt/bitcoingui.cpp(neglecting a returned value), which was treated as an error.</sub><details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
- achow101 force-pushed on Apr 29, 2026
- DrahtBot removed the label CI failed on Apr 29, 2026
- DrahtBot added the label Needs rebase on May 14, 2026
-
1192e94294
descriptor: Add CanSelfExpand()
CanSelfExpand() reports whether a descriptor can be expanded without needing any caches or private keys to be provided by the caller of Expand().
-
a402b9c48e
wallet: Use Descriptor::CanSelfExpand() in CanGetAddresses()
If a descriptor does not need any caches or private keys in order to expand, then CanGetAddresses() should return true for that descriptor.
-
cf4653dfd1
wallet: Write new descriptor's cache in AddWalletDescriptor
If a new WalletDescriptor is provided to us with a cache, write the cache to disk as well.
-
6cbb698149
wallet: Move listdescriptors retrieving from RPC to CWallet
When listdescriptors retrieves the descriptors from the wallet, instead of having this logic in the RPC, move it into CWallet itself. This will enable other functions to get the descriptors in an exportable form.
-
039ec2ca30
wallet: Add CWallet::ExportWatchOnly
ExportWatchOnly produces a watchonly wallet file from a CWallet. This can be restored onto another instance of Bitcoin Core to allow that instance to watch the same descriptors, and also have all of the same initial address book and transactions.
-
wallet, rpc: Add exportwatchonlywallet RPC 4329024967
-
test: Test for exportwatchonlywallet ee20a17aba
-
doc: update offline-signing-tutorial to use exportwatchonlywallet rpc 4f1f33fa17
-
gui: Menu action for exporting a watchonly wallet 59fd6f901d
- achow101 force-pushed on May 26, 2026
- DrahtBot removed the label Needs rebase on May 26, 2026
- DrahtBot added the label CI failed on May 26, 2026