This PR adds functionality to convert a script to a descriptor, given a SigningProvider
with the relevant information about public keys and redeemscripts/witnessscripts.
The feature is exposed in listunspent
, getaddressinfo
, and scantxoutset
whenever these calls are applied to solvable outputs/addresses.
This is not very useful on its own, though when we add RPCs to import descriptors, or sign PSBTs using descriptors, these strings become a compact and standalone way of conveying everything necessary to sign an output (excluding private keys).
Unit tests and rudimentary RPC tests are included (more relevant tests can be added once RPCs support descriptors).
Fixes #14503.