Skip to content

Wallet export: add watch-only wallet export #818

Description

@johnny9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    • Status
      Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions