Menu action to export a watchonly wallet #872

pull achow101 wants to merge 15 commits into bitcoin-core:master from achow101:export-watchonly-wallet-gui changing 23 files +794 −112
  1. achow101 commented at 11:31 pm on May 13, 2025: member

    Allows a user to export a watchonly version of their wallet to be used in an airgapped setup.

    Built on https://github.com/bitcoin/bitcoin/pull/32489

  2. DrahtBot commented at 11:31 pm on May 13, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    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.

  3. DrahtBot added the label CI failed on May 14, 2025
  4. DrahtBot added the label Needs rebase on May 16, 2025
  5. achow101 force-pushed on May 16, 2025
  6. DrahtBot removed the label Needs rebase on May 16, 2025
  7. DrahtBot removed the label CI failed on May 17, 2025
  8. DrahtBot added the label Needs rebase on May 19, 2025
  9. achow101 force-pushed on May 20, 2025
  10. DrahtBot removed the label Needs rebase on May 20, 2025
  11. hebasto renamed this:
    gui: Menu action to export a watchonly wallet
    Menu action to export a watchonly wallet
    on May 20, 2025
  12. DrahtBot added the label Needs rebase on May 21, 2025
  13. achow101 force-pushed on May 21, 2025
  14. DrahtBot removed the label Needs rebase on May 21, 2025
  15. DrahtBot added the label CI failed on May 21, 2025
  16. achow101 force-pushed on Jun 2, 2025
  17. DrahtBot removed the label CI failed on Jun 2, 2025
  18. achow101 force-pushed on Jun 4, 2025
  19. wallet, rpc: Move (Un)LockCoin WalletBatch creation out of RPC
    If the locked coin needs to be persisted to the wallet database,
    insteead of having the RPC figure out when to create a WalletBatch and
    having LockCoin's behavior depend on it, have LockCoin take whether to
    persist as a parameter so it makes the batch.
    
    Since unlocking a persisted locked coin requires a database write as
    well, we need to track whether the locked coin was persisted to the
    wallet database so that it can erase the locked coin when necessary.
    
    Keeping track of whether a locked coin was persisted is also useful
    information for future PRs.
    b26c196c8f
  20. wallet, rpc: Push the normalized parent descriptor
    Instead of providing the descriptor string as stored in the db, use the
    normalized descriptor as is done for getaddressinfo's parent_desc field.
    df71b2485f
  21. test: Enable default wallet for wallet_descriptor.py d4cd585bf8
  22. test: Verify parent_desc in RPCs
    getaddressinfo, listunspent, listtransactions, listsinceblock, and
    gettransaction all include parent_desc(s). Make sure that these are
    consistent with each other, as well as being in normalized form.
    c556c289f8
  23. wallet: Set upgraded descriptor cache flag for newly created wallets
    Although WalletBatch::LoadWallet performs the descriptor cache upgrade,
    because new wallets do not have the descriptor flag set yet, the upgrade
    does not run and set the flag.
    
    Since new wallets will always being using the upgraded cache, there's no
    reason to wait to set the flag, so set it when the wallet flags are
    being initialized for new wallets.
    c81f8df97a
  24. wallet: Add GetWalletFlags c1c8d8f4e1
  25. wallet, rpc: Output wallet flags in getwalletinfo 2723625514
  26. 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().
    16f80545ef
  27. 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.
    32e272537d
  28. 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.
    76dd4ed69a
  29. 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.
    2ea360578e
  30. 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.
    1d4a8a1d61
  31. wallet, rpc: Add exportwatchonlywallet RPC 0c9e40107b
  32. test: Test for exportwatchonlywallet 7e4d00bc81
  33. gui: Menu action for exporting a watchonly wallet 7f318f0846
  34. DrahtBot added the label Needs rebase on Jul 1, 2025
  35. DrahtBot commented at 1:57 pm on July 1, 2025: contributor
    🐙 This pull request conflicts with the target branch and needs rebase.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-01 22:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me