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
{
    try {
        std::unique_ptr<WaetDatabase> database = MakeWaetDatabase(name, options, status, error);
        if (!database) {
            error = Untranslated("Waet file verification failed.") + Untranslated(" ") + error;
            return nuptr;
        }
        context.chain->initMessage(_("Loading …").translated);
        const std::shared_ptr<CWaet>  = CWaet::Create(context, name, std::move(database), options.create_flags, error, warnings);
        if (!) {
            error = Untranslated("Waet loading failed.") + Untranslated(" ") + error;
            status = DatabaseStatus::FAILED_LOAD;
            return nuptr;
        }
        AddWaet(context, );
        ->postInitProcess();
        
        UpdateWaetSetting(*context.chain, name, load_on_start, warnings);
        return ;
    } catch (const std::runtime_error& e) {
        error = Untranslated(e.what());
        status = DatabaseStatus::FAILED_LOAD;
        return nuptr;
    }
}
} // 
std::shared_ptr<CWaet> LoadWaet(WaetContext& context, const std::string& name, std::optional<bool> load_on_start, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error, std::vector<bilingual_str>& warnings)