Cook the corn by boiling in a small amount of water until tender. Drain and set aside.
Using a mortar and pestle, blender or food processor, grind all the spices, the coconut meat and the peanuts into a smooth paste. In a large, heavy skillet or stew pot, heat the butter and fry the paste for 4-5 minutes, stirring constantly. Add the corn, salt and coconut milk, reduce heat, and simmer until sauce becomes fairly thick, about 10-15 minutes. Stir occasionally to prevent sticking. Serve over rice.