feat: Add descriptor miniscript constructor method#1016
Open
ItoroD wants to merge 1 commit into
Open
Conversation
00d3bc7 to
b51cdc1
Compare
b51cdc1 to
5b09b02
Compare
reez
reviewed
May 28, 2026
Collaborator
reez
left a comment
There was a problem hiding this comment.
Looks great overall, 2 comments
| Descriptor.newWpkh(timelockConjunction) | ||
| Descriptor.newWsh(timelockConjunction) | ||
| Descriptor.newPkh(timelockConjunction) | ||
| Descriptor.newShWithWpkh(newShDescriptor.toString()) |
Collaborator
There was a problem hiding this comment.
Can we split these into separate assertFailsWith blocks? I think this new newShWithWpkh case never executes because Descriptor.newBare(...) throws first in the same block.
| val newWpkhDescriptor = Descriptor.newWpkh("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB") | ||
| val newShWpkhDescriptor = Descriptor.newShWpkh("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB") | ||
| val newTrDescriptor = Descriptor.newTr("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB","and_v(v:pk(02b4632d08485ff1df2db55b9dafd23347d1c47a457072a1e87be26896549a8737),older(50))") | ||
| println(newWpkhDescriptor) |
Collaborator
There was a problem hiding this comment.
Should we remove this debug println before merge?
- Add new_tr, new_sh_with_wsh, and new_sh_with_wpkh
5b09b02 to
c1a34cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Notes to the reviewers
Documentation
new_tr - https://docs.rs/miniscript/12.3.5/miniscript/descriptor/enum.Descriptor.html#method.new_tr
new_sh_with_wsh - https://docs.rs/miniscript/12.3.5/miniscript/descriptor/enum.Descriptor.html#method.new_sh_with_wsh
new_sh_with_wpkh - https://docs.rs/miniscript/12.3.5/miniscript/descriptor/enum.Descriptor.html#method.new_sh_with_wpkh
bdk_walletbitcoinuniffiOther:
Changelog
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingchangelog:*labelNew Features: