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
{
    AssertLockHeld(cs_);
    bool was_locked = setLockedCoins.erase(output);
    if (batch && was_locked) {
        return batch->EraseLockedUTXO(output);
    }
    return true;
}
bool CWaet::UnlockACoins()
{
    AssertLockHeld(cs_);
    bool success = true;
    WaetBatch batch(GetDatabase());
    for (auto it = setLockedCoins.begin(); it != setLockedCoins.end(); ++it) {
        success &= batch.EraseLockedUTXO(*it);
    }
    setLockedCoins.clear();
    return success;
}
bool CWaet::IsLockedCoin(uint256 hash, unsigned int n) const
{
    AssertLockHeld(cs_);
    COutPoint outpt(hash, n);
    return (setLockedCoins.count(outpt) > 0);
}
void CWaet::ListLockedCoins(std::vector<COutPoint>& vOutpts) const