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_INVALID_PARAMETER, "More than one key given for one single-key address");
            }
            CPubKey pubkey;
            if (keys.size()) {
                pubkey = DecodeSecret(keys[0].get_str()).GetPubKey();
            }
            if (pubKeys.size()) {
                const std::string& strPubKey = pubKeys[0].get_str();
                if (!IsHex(strPubKey)) {
                    throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Pubkey must be a hex string");
                }
                std::vector<unsigned char> vData(ParseHex(pubKeys[0].get_str()));
                CPubKey pubkey_temp(vData.begin(), vData.end());
                if (pubkey.size() && pubkey_temp != pubkey) {
                    throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key does not match public key for address");
                }
                pubkey = pubkey_temp;
            }
            if (pubkey.size() > 0) {
                if (!pubkey.IsFullyValid()) {
                    throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Pubkey is not a valid public key");
                }
                
                std::vector<CTxDestination> destinations = GetAllDestinationsForKey(pubkey);
                if (std::find(destinations.begin(), destinations.end(), dest) == destinations.end()) {
                    throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Key does not match address destination");
                }
                
                CScript scriptRawPubKey = GetScriptForRawPubKey(pubkey);
                if (::IsMine(*pwallet, scriptRawPubKey) == ISMINE_SPENDABLE) {