The external_signer indicates that an external signer device may be called via HWI or equivalent application.
When it was initially introduced some additional constraints were placed on wallets with this flag: it had to be a descriptor wallet and watch-only. Also the flag could not be added or removed later.
The constraints aren't a problem for the main supported and documented use case of connecting a single hardware wallet and using it just like a normal single sig Bitcoin Core wallet.
But they get in the way of MuSig2 support, see https://github.com/Sjors/bitcoin/pull/91.
This pull request drops the following constraints:
disable_private_keysis no longer mandatory (but still default)external_signerflag is now mutable
Changing the external_signer flag reloads the wallet so that its descriptor ScriptPubKeyMans are recreated using the new setting.
Additionally it does the following:
- make the
blankoption forcreatewalletconsistent with regular wallets by not importing keys from the connected signer - avoid going through
createTransactionfor external signers (otherwise the GUI breaks) - create an
ExternalSignerScriptPubKeyManwhen importing a descriptor into an external signer wallet, instead of requiring an additional reload
This should have no noticeable effect on the default single sig use case described above.
Finally we add test coverage for spending from an imported hot key descriptor in an external signer wallet. The wallet signs with its own keys before involving the external signer.