Preheat the oven to 180°C.
Grease and line a 20×20cm cake tin.
Cream the butter, sugar and rosewater until pale and creamy, using an electric mixer. Add
one egg and beat until just combined; repeat with the remaining egg scraping down the sides of the bowl as you go. Gradually beat in the flour and baking powder, until well combined, then fold in the halaweh, and the walnuts, if desired.
Pour the batter into the cake tin and bake for 25 to 30 minutes, or until a toothpick inserted in the center comes out clean. Remove the cake from the oven and let it stand for 10 minutes, then turn it out onto a wire rack to cool completely.
For the caramel sauce, place the sugar in a small saucepan over medium heat, stirring constantly until it dissolves into a smooth, dark caramel. Add the butter and continue stirring until the butter dissolves. Remove the saucepan from the heat and slowly pour in the cream, stirring constantly, until the cream is evenly incorporated.
Slice the cake and serve topped with warm caramel sauce.