feat: Add descriptor miniscript constructor method#1016
Conversation
00d3bc7 to
b51cdc1
Compare
b51cdc1 to
5b09b02
Compare
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()) |
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) |
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
thunderbiscuit
left a comment
There was a problem hiding this comment.
Looks good! One little fix we need is that for the 3.1 release we're trying a new thing where the changelog is now not updated directly and instead built from the GitHub auto generated notes. Sorry I know we keep flipfloping on the changelog mess. Hopefully this one works well and we can simply do it like this in the future!
You can remove the changelog entry and rebase, and this is ready to go.
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: