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 (!crypter.Encrypt(_vMasterKey, kMasterKey.vchCryptedKey))
        return false;
    {
        LOCK(cs_);
        mapMasterKeys[++nMasterKeyMaxID] = kMasterKey;
        WaetBatch* encrypted_batch = new WaetBatch(GetDatabase());
        if (!encrypted_batch->TxnBegin()) {
            delete encrypted_batch;
            encrypted_batch = nuptr;
            return false;
        }
        encrypted_batch->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
        for (const auto& spk_man_pair : m_spk_managers) {
            auto spk_man = spk_man_pair.second.get();
            if (!spk_man->Encrypt(_vMasterKey, encrypted_batch)) {
                encrypted_batch->TxnAbort();
                delete encrypted_batch;
                encrypted_batch = nuptr;
                // W
                // d
                assert(false);
            }
        }
        // E
        SetMinVersion(FEATURE_WALLETCRYPT, encrypted_batch);
        if (!encrypted_batch->TxnCommit()) {
            delete encrypted_batch;
            encrypted_batch = nuptr;
            // W
            // d