It's currently not possible to import (solvable) SegWit addresses (P2SH and native) using `importmulti`. I believe that's a shortcoming we should address before release.

My suggestion would be for P2WPKH (P2SH and native) to be supported without any extra arguments. This means that a P2WPKH address/script with corresponding private or public key should work. For P2SH it means checking if the supplied P2SH address perhaps matches the supplied public key or private key when converted to P2WPKH first.

To support P2WSH, I think we need an extra field "witnessScript". When supplied, it would either be required to match a P2WSH address/script directly, or if the address is P2SH, indirectly.
}
    std::string wallet_name;
    if (GetWalletNameFromJSONRPCRequest(request, wallet_name)) {
        if (!request.params[0].isNull()) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot unload the requested wallet");
        }
    } else {
        wallet_name = request.params[0].get_str();
    }
    std::shared_ptr<CWallet> wallet = GetWallet(wallet_name);
    if (!wallet) {
        throw JSONRPCError(RPC_WALLET_NOT_FOUND, "Requested wallet does not exist or is not loaded");
    }
    
    
    
    if (!RemoveWallet(wallet)) {
        throw JSONRPCError(RPC_MISC_ERROR, "Requested wallet already unloaded");
    }
    UnregisterValidationInterface(wallet.get());
    
    
    
    wallet->NotifyUnload();
    
    
    
    return NullUniValue;
}
static UniValue resendwallettransactions(const JSONRPCRequest& request)