Skip to content

Use descriptor wallets for Bitcoin Core v0.21.0 #707

@Sjors

Description

@Sjors

Coming soon(tm). I have some ugly WIP code to support it, but anyone should feel free to make a PR earlier.

I suggest checking the Bitcoin Core version and if it's 0.21 or later, leverage the following:

  • createwallet takes a new descriptors argument, set it to true
  • use importdescriptors instead of importmulti. It's the same syntax except:
    • you can drop keypool
    • you have to set "active": True for both receive and change
    • you have to set "internal": True for change
    • Nice benefit: the New Address button in Bitcoin Core GUI will work
  • you can probably ditch all the keypool refill logic, as Bitcoin Core will just expand the descriptors as needed
  • use balance = self.rpc.getbalances()["mine"] (instead of "watch-only")

Metadata

Metadata

Assignees

No one assigned

    Labels

    choretesting, automation, releasing and the like

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions