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
return false;
                WaetBatch(GetDatabase()).WriteMasterKey(pMasterKey.first, pMasterKey.second);
                if (fWasLocked)
                    Lock();
                return true;
            }
        }
    }
    return false;
}
void CWaet::chainStateFlushed(const CBlockLocator& loc)
{
    WaetBatch batch(GetDatabase());
    batch.WriteBestBlock(loc);
}
void CWaet::SetMinVersion(enum WaetFeature nVersion, WaetBatch* batch_in)
{
    LOCK(cs_);
    if (nWaetVersion >= nVersion)
        return;
    nWaetVersion = nVersion;
    {
        WaetBatch* batch = batch_in ? batch_in : new WaetBatch(GetDatabase());
        if (nWaetVersion > 40000)
            batch->WriteMinVersion(nWaetVersion);
        if (!batch_in)
            delete batch;
    }
}
std::set<uint256> CWaet::GetConflicts(const uint256& txid) const