Yes, sweet potatoes, also known (somewhat inaccurately) as yams, can be added to your compost heap.
As they’re a root that stores well, it takes them a good while to start breaking down if they’re left whole – cut them into chunks to encourage the process.
Sweet potato skin – peelings or otherwise left over skin – will rot down quite quickly.
What nutrients does sweet potato add to the compost. For example, coffee grounds add nitrogen and shells add calcium.