Wallet export: add watch-only wallet export #818

Open
opened 2026-08-03 18:38:25 +00:00 by johnny9 · 0 comments
johnny9 commented 2026-08-03 18:38:25 +00:00 (Migrated from github.com)

Gap

bitcoin-core/gui#872 added an Export watch-only wallet action for creating a public-data copy of an existing descriptor wallet for an air-gapped setup. It mirrors the exportwatchonlywallet RPC added by bitcoin/bitcoin#32489.

The QML app supports ordinary wallet backup and restore, but it does not expose this distinct watch-only export flow.

Work

  • Expose the merged wallet export interface through WalletQmlModel once the vendored Bitcoin Core source includes it.
  • Add an Export watch-only wallet action to Wallet settings without depending on Qt Widgets code.
  • Use a save-file dialog and report clear success, cancellation, and backend failure states.
  • Only offer the action when the selected wallet can produce an export; do not offer it for a wallet that already has private keys disabled.
  • Ensure the exported wallet file can be loaded through the existing QML restore-wallet flow.
  • Add model, QML, and functional coverage for the export and restore path.

Acceptance criteria

  1. A user can select a descriptor wallet with private keys and export a watch-only wallet file.
  2. The exported file contains no private keys and retains the public wallet state provided by the Core export API, including descriptors, labels, transactions, and applicable wallet flags.
  3. Restoring the exported file through the QML app loads it as a watch-only/private-key-disabled wallet.
  4. Cancellation does not start an export, and backend failures are shown without reporting success.
  5. The action is unavailable for wallets that cannot be exported, including already-watch-only wallets.

References

## Gap [bitcoin-core/gui#872](https://github.com/bitcoin-core/gui/pull/872) added an **Export watch-only wallet** action for creating a public-data copy of an existing descriptor wallet for an air-gapped setup. It mirrors the `exportwatchonlywallet` RPC added by [bitcoin/bitcoin#32489](https://github.com/bitcoin/bitcoin/pull/32489). The QML app supports ordinary wallet backup and restore, but it does not expose this distinct watch-only export flow. ## Work - Expose the merged wallet export interface through `WalletQmlModel` once the vendored Bitcoin Core source includes it. - Add an **Export watch-only wallet** action to Wallet settings without depending on Qt Widgets code. - Use a save-file dialog and report clear success, cancellation, and backend failure states. - Only offer the action when the selected wallet can produce an export; do not offer it for a wallet that already has private keys disabled. - Ensure the exported wallet file can be loaded through the existing QML restore-wallet flow. - Add model, QML, and functional coverage for the export and restore path. ## Acceptance criteria 1. A user can select a descriptor wallet with private keys and export a watch-only wallet file. 2. The exported file contains no private keys and retains the public wallet state provided by the Core export API, including descriptors, labels, transactions, and applicable wallet flags. 3. Restoring the exported file through the QML app loads it as a watch-only/private-key-disabled wallet. 4. Cancellation does not start an export, and backend failures are shown without reporting success. 5. The action is unavailable for wallets that cannot be exported, including already-watch-only wallets. ## References - Merged GUI implementation: https://github.com/bitcoin-core/gui/pull/872 - Merged wallet export API/RPC: https://github.com/bitcoin/bitcoin/pull/32489 - Related watch-only tracking: #560 - Secure, Back Up, and Restore Wallets epic: #578
Sign in to join this conversation.
No description provided.