Heat 2 tablespoons of coconut oil in a pan. Add ½ teaspoon of mustard seeds and ½ teaspoon of fennel seeds and let them pop.
Add 2 cups of thinly sliced onions and ½ teaspoon of salt, and cook, stirring, until golden. Stir in 1 teaspoon of crushed ginger and 1 teaspoon of crushed garlic.
Stir in ¼ teaspoon of turmeric, ¾ teaspoon of red chili powder, ¼ teaspoon of ground black pepper, 1 teaspoon of garam masala, and 2 teaspoons of ground coriander.
Add 1 medium finely chopped tomato and ¼ cup of hot water, and cook until the water is gone.
Add 4 peeled hard-boiled eggs and 1 sprig of curry leaves. Fry for 7-10 minutes, turning the eggs in the masala, until the onions caramelize.