Per the discussion in #35645, this PR adds a Python utility that performs the multisig setup process, so that RPC and interface work is shaped by what that flow actually needs.
It covers wallet creation, key generation at the BIP 87 path, collecting cosigner keys, assembling a wsh(sortedmulti()) or tr(musig(),sortedmulti_a()) descriptor, verifying it, and importing it.
Gaps that need new functionality in C++
importdescriptorsrejects a descriptor with no private keys when the wallet has private keys enabled. See #35377.- The wallet stores a multipath descriptor as two descriptors, so listdescriptors never shows the descriptor that was shared. See #36133.
- The wallet labels addresses, not keys, so cosigner names live in the setup and are lost on import.
- There is no RPC for validating a key expression, so the key is wrapped in
pkh()forgetdescriptorinfoto parse. See #35918, which exposesParsePubkey(). createmultisigonly takes plain public keys, not extended keys with origins, and cannot build a ranged or taproot multisig descriptor.- Nothing reports what a descriptor commits to, or whether this wallet holds one of its keys, before it is imported.
Part of #35645.