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, ...).

{
    if (!isRedeemScript && ::IsMine(*pwallet, script) == ISMINE_SPENDABLE) {
        throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
    }
    pwallet->MarkDirty();
    if (!pwallet->HaveWatchOnly(script) && !pwallet->AddWatchOnly(script, 0 )) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
    }
    if (isRedeemScript) {
        const CScriptID id(script);
        if (!pwallet->HaveCScript(id) && !pwallet->AddCScript(script)) {
            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding p2sh redeemScript to wallet");
        }
        ImportAddress(pwallet, id, strLabel);
    } else {
        CTxDestination destination;
        if (ExtractDestination(script, destination)) {
            pwallet->SetAddressBook(destination, strLabel, "receive");
        }
    }
}
static void ImportAddress(CWallet* const pwallet, const CTxDestination& dest, const std::string& strLabel) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)
{
    CScript script = GetScriptForDestination(dest);
    ImportScript(pwallet, script, strLabel, false);
    
    if (IsValidDestination(dest))
        pwallet->SetAddressBook(dest, strLabel, "receive");
}
UniValue importaddress(const JSONRPCRequest& request)