Preheat oven to 200 C, 10 mins before baking.Line a baking sheet with al.foil or parchment/baking paper.Heat oil in a wide pan and add sliced onions. Cook till the onion becomes golden brown.Once the onion becomes golden brown, add crushed ginger and garlic and cook for 2-3 mins. Add all masala powders and salt. Cook till the oil appears, around 2-3 mins. Add 1 - 2 tbsp hot water to bring everything together. Add ketchup (refer notes), curry leaves and mix well.Thaw the puff pastry as per the package instructions.Beat 1 egg with 1-2 tsp water for egg wash. Apply this egg mixture on four sides of the puff pastry.Place about 1 tbsp of masala on each puff pastry, followed by half a slice of egg. Put some masala on top of the egg as well.Bring together the diagonally opposite sides and seal. Apply the egg wash all over the sealed puffs.Bake in the preheated oven for 20-25 mins or until the puff pastry is golden in colour.Serve with tomato ketchup.