Place ham, onions, carrot, bay leaves, and peppercorns in a pan and cover with cold water.
Simmer the ham for 20 minutes per 500g until the center is piping hot.
Allow the ham to cool completely in its cooking liquid before removing.
Mix spelt flour, sugar, salt, yeast, and 700ml water to form a dough.
Knead the dough for 10 minutes until smooth and let it double in size for 2 hours.
Preheat the oven to 180°C and peel the skin off the cooled ham.
Strain the cooking liquid and reserve 1.25 liters of stock.
Arrange vegetables in a casserole, add stock, place ham on top, and egg-wash the rim.
Cover the casserole with rolled dough, sealing the edges but leaving a gap at the bone.
Bake for 1 hour until the crust is golden-brown and sounds hollow when tapped.