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
if (wallet.IsLockedCoin(entry.first, i))
                continue;
            if (wallet.IsSpent(wtxid, i))
                continue;
            isminetype mine = wallet.IsMine(wtx.tx->vout[i]);
            if (mine == ISMINE_NO) {
                continue;
            }
            if (!allow_used_addresses && wallet.IsSpentKey(wtxid, i)) {
                continue;
            }
            std::unique_ptr<SigningProvider> provider = wallet.GetSolvingProvider(wtx.tx->vout[i].scriptPubKey);
            bool solvable = provider ? IsSolvable(*provider, wtx.tx->vout[i].scriptPubKey) : false;
            bool spendable = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || (((mine & ISMINE_WATCH_ONLY) != ISMINE_NO) && (coinControl && coinControl->fAllowWatchOnly && solvable));
            vCoins.push_back(COutput(wallet, wtx, i, nDepth, spendable, solvable, safeTx, (coinControl && coinControl->fAllowWatchOnly)));
            
            if (nMinimumSumAmount != MAX_MONEY) {
                nTotal += wtx.tx->vout[i].nValue;
                if (nTotal >= nMinimumSumAmount) {
                    return;
                }
            }
            
            if (nMaximumCount > 0 && vCoins.size() >= nMaximumCount) {
                return;
            }
        }
    }
}
CAmount GetAvailableBalance(const CWallet& wallet, const CCoinControl* coinControl)