Skip to content

Comments

feat: Add new_wsh_sortedmulti and new_pk#949

Open
ItoroD wants to merge 2 commits intobitcoindevkit:masterfrom
ItoroD:miniscript-descriptor-methods
Open

feat: Add new_wsh_sortedmulti and new_pk#949
ItoroD wants to merge 2 commits intobitcoindevkit:masterfrom
ItoroD:miniscript-descriptor-methods

Conversation

@ItoroD
Copy link
Collaborator

@ItoroD ItoroD commented Feb 17, 2026

Description

This Pr is based on my comment from #687 here.

Notes to the reviewers

In bdk-wallet we can do the following to create a 1 of 2 multisig descriptor. Thanks so miniscript helper functions

let multisig_descriptor = Descriptor::new_wsh_sortedmulti(1, vec![key.clone(), key2.clone()]).unwrap();

In bindings: kotlin, we do:

val multisigDescriptor = Descriptor("wsh(multi(1,$key,$key2))", Network.REGTEST)

Current we have to concatenate a string with the keys and script type to parse the descriptor.

Much easier and safer to be able to do:

val multisigDescriptor = Descriptor.newWshSortedmulti(2u, pkList);

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

@ItoroD ItoroD changed the title Miniscript descriptor methods feat: Add new_wsh_sortedmulti and new_pk Feb 17, 2026
@ItoroD ItoroD changed the title feat: Add new_wsh_sortedmulti and new_pk feat: Add new_wsh_sortedmulti and new_pk Feb 17, 2026
@reez
Copy link
Collaborator

reez commented Feb 17, 2026

this is really cool @ItoroD

@ItoroD ItoroD mentioned this pull request Feb 19, 2026
9 tasks
@ItoroD ItoroD force-pushed the miniscript-descriptor-methods branch from e5c8e2f to eb836c7 Compare February 19, 2026 09:19
@ItoroD
Copy link
Collaborator Author

ItoroD commented Feb 19, 2026

this is really cool @ItoroD

Thanks!

If this get approved, I am hoping to bring in the other similar miniscript methods that take either a list of PKs or single Pk. There are other ones that take more complex params that I can focus my attention on later once these simple ones are in.

I did just these 2 in this pr just as a sort of concept and starter for the rest.

@ItoroD ItoroD force-pushed the miniscript-descriptor-methods branch from eb836c7 to 777bc48 Compare February 19, 2026 17:15
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.

2 participants