In a bowl, whisk together the eggs, melted butter, and vanilla extract. Mix in the sugar.
Add the flour, baking powder, baking soda, salt, and spices. Fold into the batter.
Fold in the grated carrot and walnuts. Divide the batter between two greased pans. Tip: line the bottoms with parchment paper.
Preheat your air fryer and bake the cakes (one at a time) for 18 minutes at 350°F /175°C (conventional oven). Check with a skewer and let cool completely on a rack.
For the frosting, beat the butter until creamy. Add cream cheese and vanilla extract and mix until smooth.
Add powdered sugar and mix until creamy. Chill until ready to use.
Level the cake layers if needed. Place one layer on a plate, spread frosting on top, then add the second layer (flat side up).
Pipe frosting around the edges and spread a thin layer over the top.
Decorate with walnuts.
How to store
Store covered in the refrigerator for 4-5 days. Let it sit at room temperature for 30 minutes before serving.