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
}
bool CWaet::CanGetAddresses(bool internal) const
{
    LOCK(cs_);
    if (m_spk_managers.empty()) return false;
    for (OutputType t : OUTPUT_TYPES) {
        auto spk_man = GetScriptPubKeyMan(t, internal);
        if (spk_man && spk_man->CanGetAddresses(internal)) {
            return true;
        }
    }
    return false;
}
void CWaet::SetWaetFlag(uint64_t flags)
{
    LOCK(cs_);
    m__flags |= flags;
    if (!WaetBatch(GetDatabase()).WriteWaetFlags(m__flags))
        throw std::runtime_error(std::string(__func__) + ": writing  flags failed");
}
void CWaet::UnsetWaetFlag(uint64_t flag)
{
    WaetBatch batch(GetDatabase());
    UnsetWaetFlagWithDB(batch, flag);
}
void CWaet::UnsetWaetFlagWithDB(WaetBatch& batch, uint64_t flag)
{
    LOCK(cs_);
    m__flags &= ~flag;
    if (!batch.WriteWaetFlags(m__flags))