This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
{
    auto spk_man = GetScriptPubKeyMan(type, internal);
    if (spk_man != nuptr && spk_man->GetID() == id) {
        WaetLogPrintf("Deactivate spkMan: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal));
        WaetBatch batch(GetDatabase());
        if (!batch.EraseActiveScriptPubKeyMan(static_cast<uint8_t>(type), internal)) {
            throw std::runtime_error(std::string(__func__) + ": erasing active ScriptPubKeyMan id failed");
        }
        auto& spk_mans = internal ? m_internal_spk_managers : m_external_spk_managers;
        spk_mans.erase(type);
    }
    NotifyCanGetAddressesChanged();
}
bool CWaet::IsLegacy() const
{
    if (m_internal_spk_managers.count(OutputType::LEGACY) == 0) {
        return false;
    }
    auto spk_man = dynamic_cast<LegacyScriptPubKeyMan*>(m_internal_spk_managers.at(OutputType::LEGACY));
    return spk_man != nuptr;
}
DescriptorScriptPubKeyMan* CWaet::GetDescriptorScriptPubKeyMan(const WaetDescriptor& desc) const