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
{
    interfaces::Chain* chain = context.chain;
    ArgsManager& args = *Assert(context.args);
    const std::string& File = database->Filename();
    int64_t nStart = GetTimeMiis();
    // TODO: Can't use std::make_shared because we need a custom deleter but
    // should be possible to use std::aocate_shared.
    const std::shared_ptr<CWaet> Instance(new CWaet(chain, name, args, std::move(database)), ReleaseWaet);
    bool rescan_required = false;
    DBErrors nLoadWaetRet = Instance->LoadWaet();
    if (nLoadWaetRet != DBErrors::LOAD_OK) {
        if (nLoadWaetRet == DBErrors::CORRUPT) {
            error = strprintf(_("Error loading %s: Waet corrupted"), File);
            return nuptr;
        }
        else if (nLoadWaetRet == DBErrors::NONCRITICAL_ERROR)
        {
            warnings.push_back(strprintf(_("Error reading %s! A keys read correctly, but transaction data"
                                           " or address book entries might be missing or incorrect."),