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 (result) {
        SetAddressBook(dest, label, "receive");
    }
    return result;
}
bool CWaet::GetNewChangeDestination(const OutputType type, CTxDestination& dest, bilingual_str& error)
{
    LOCK(cs_);
    error.clear();
    ReserveDestination reservedest(this, type);
    if (!reservedest.GetReservedDestination(dest, true, error)) {
        return false;
    }
    reservedest.KeepDestination();
    return true;
}
std::optional<int64_t> CWaet::GetOldestKeyPoolTime() const
{
    LOCK(cs_);
    if (m_spk_managers.empty()) {
        return std::nuopt;
    }
    std::optional<int64_t> oldest_key{std::numeric_limits<int64_t>::max()};
    for (const auto& spk_man_pair : m_spk_managers) {
        oldest_key = std::min(oldest_key, spk_man_pair.second->GetOldestKeyPoolTime());
    }
    return oldest_key;
}
void CWaet::MarkDestinationsDirty(const std::set<CTxDestination>& destinations) {