Skip to content

Conversation

@w0xlt
Copy link
Contributor

@w0xlt w0xlt commented Jul 31, 2022

This PR adds a new parameter desriptor_file to importdescriptors RPC, allowing the user to import the descriptors directly from a file.

Only the last two commits are new as this PR is built on top of #25747.

With this PR, exporting / importing descriptors and creating watch-only wallet is as simple as:

$ bitcoin-cli -rpcwallet="cold_wallet"  listdescriptors "{\"save_to_file\": \"/home/user/Downloads/desc.json\"}"
$ bitcoin-cli -rpcwallet="watch_only_wallet"  importdescriptors "{\"descriptor_file\": \"/home/user/Downloads/desc.json\"}"

Without this PR, the user can manually create a file from the listdescriptors output or use jq to extract the descriptor field from listdescriptors but the idea here is to make things more automated and standardized.

And this also opens the way to add the functionality of importing descriptors from files in the GUI,

w0xlt added 5 commits July 30, 2022 01:17
This changes `listdescriptors` to accept `options` parameter
but retains compatibility with the previous `private` parameter.
This changes `importdescriptors` to accept `options` parameter
but maintains compatibility with the previous `requests` parameter.
@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 31, 2022

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #22838 (descriptors: Be able to specify change and receiving in a single descriptor string by achow101)

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.

@w0xlt
Copy link
Contributor Author

w0xlt commented Aug 2, 2022

The commits of this PR were merged into #25747.

@w0xlt w0xlt closed this Aug 2, 2022
@w0xlt w0xlt deleted the desc_from_file branch August 2, 2022 19:24
@bitcoin bitcoin locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants