Skip to content

feat: Add descriptor miniscript constructor method#988

Open
ItoroD wants to merge 1 commit intobitcoindevkit:masterfrom
ItoroD:add-miniscript-descriptors
Open

feat: Add descriptor miniscript constructor method#988
ItoroD wants to merge 1 commit intobitcoindevkit:masterfrom
ItoroD:add-miniscript-descriptors

Conversation

@ItoroD
Copy link
Copy Markdown
Collaborator

@ItoroD ItoroD commented May 4, 2026

Description

This is the third part of #973. Here I am adding in all the methods that accept Miniscript as parameter. The last batch to be added will be new_sh_with_wpkh, new_sh_with_wsh, and new_tr I am testing these ones out and trying to find best why to implement them in a follow up PR.

Notes to the reviewers

These method implementions are not much different from what we have in #973. The main difference is how we parse the string param. In #973 we do BdkDescriptorPublicKey::from_str(pk) as the param expects a publickey. In this PR we do BDKMiniscript::from_str(&mini_script) as the params we expect is miniscript.

Documentation

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added a changelog in the next release tracking issue (see example)
  • I've linked the relevant upstream docs or specs above

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Copy link
Copy Markdown
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d8f13b2

I'd squash the changelog commit into the other commit though

@ItoroD ItoroD force-pushed the add-miniscript-descriptors branch from 73b8bff to de91a86 Compare May 4, 2026 17:17
@ItoroD ItoroD force-pushed the add-miniscript-descriptors branch from de91a86 to 461e33b Compare May 5, 2026 10:42
@thunderbiscuit
Copy link
Copy Markdown
Member

I started reviewing this this morning and you just sent me down a rabbit hole of looking at old scripts and ways to quickly try new APIs... 🤣 in the end I did that all day and didn't finish the review. I promise you're on my list for tomorrow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants