Wash the black-eyed peas couple of times and then soak it in fresh water for about 2 hours. We could soak it longer as well, but 2 hours seems to be enough time to get perfectly cooked karamani.
Tip - If you are like me and forgot to soak the black-eyed peas, then just keep it immersed in hot water until you prep the rest of the ingredients, and then cook it a little longer in the pressure cooker or instant pot.
Drain the soaked karamani and then add enough fresh water to immerse the beans well. Add about 2 teaspoons of salt and cook the beans.
I cooked my karamani in the instant pot. I cooked it in the 'pot in pot method'. Add water to the inside pot and then place this pot on the trivet.
Set it on Manual mode and set the timer to 6 minutes. My beans had been soaking for about 2 hours. If you are using unsoaked beans, then set the cooking time to 10 minutes.
Do a quick release in 10 minutes. Check the beans to see if they have cooked. The black-eyed peas should remain whole but yet be soft when pressed.
Let the beans drain in a colander. Let it drain well to remove any moisture.
Heat a saute pan and add coconut oil. Add the seasoning ingredients, mustard seeds, green chilies, red chilies, asafoetida, and curry leaves.
Add the drained karamani and mix well. Let it cook for a couple of minutes.
Add the grated coconut and then mix well.
Turn off the heat and then serve.