Some comments from @sipa in #12702.

___

Yes, I think `importmulti` is superior in every way, except:
* Slightly less convenient to use (it requires redundant information, as you have to explicitly state what you want to import, and then give the keys/... to enable that).
* ~Doesn't support P2SH-P2WPKH yet~. Added in #14454

The latter can be fixed by just adding support for that case. The former can be improved by adding 'default' cases (e.g. if you prove a WIF private key, it can permit omitting the address, ...).

throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
                }
                pwallet->MarkDirty();
                if (!pwallet->AddWatchOnly(scriptRawPubKey, timestamp)) {
                    throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
                }
            }
        }
        
        if (::IsMine(*pwallet, scriptpubkey_script) == ISMINE_SPENDABLE) {
            throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
        }
        pwallet->MarkDirty();
        if (!pwallet->AddWatchOnly(scriptpubkey_script, timestamp)) {
            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
        }
        if (!watchOnly && !pwallet->HaveCScript(CScriptID(scriptpubkey_script)) && !pwallet->AddCScript(scriptpubkey_script)) {
            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding scriptPubKey script to wallet");
        }
        
        if (IsValidDestination(scriptpubkey_dest)) {
            pwallet->SetAddressBook(scriptpubkey_dest, label, "receive");
        }
        
        for (size_t i = 0; i < keys.size(); i++) {
            const std::string& strPrivkey = keys[i].get_str();
            
            CKey key = DecodeSecret(strPrivkey);
            if (!key.IsValid()) {
                throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key encoding");