The reason you don't peel them first is because raw sweet potato will turn an unsightly brown in the air very, very fast.
Mashing the sweet potato is unsafe; the density causes heat penetration issues in the jar during processing.
The cubes of sweet potato are expected to be at least luke-warm going into the jars. (So, if you prepped them the day before and overnighted them in the fridge, you need to heat them up again somehow such as in a microwave before starting the canning process.)
If you have small sweet potatoes, you don't need to cube them; you can just quarter them.
Optional per 1/2 litre (US pint) jar (double for litres / US quarts): 1 tablespoon lemon or orange juice (some say can help prevent darkening; others say it just adds an interesting flavour.)
When you go to use these, drain them. Consider saving the drained water and freezing it in a tub for use in soups, etc: it makes a wonderful broth.