Skip to content

Should be able to import an xpub descriptor to a privkey-enabled wallet if the wallet has the privkeys #27336

@apoelstra

Description

@apoelstra

Please describe the feature you'd like to see added.

If you have a privkey-enabled wallet, you should be able to import a public descriptor where your wallet knows the private keys corresponding to (some of) the xpubs in the descriptor.

Is your feature related to a problem, if so please describe it.

If you try to import a descriptor into a Core wallet that has private keys, and you only provide the public descriptor, it will fail with the error Cannot import descriptor without private keys to a wallet with private keys enabled. To do the import, you need to pull the private keys out of the wallet, populate the descriptor with them, recompute the checksum, then try again. This is unsafe and unnecessary.

Describe the solution you'd like

Before erroring out, the wallet should check whether it actually has private keys that would allow it to import the descriptor.

Describe any alternatives you've considered

No response

Please leave any additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions