What is the difference between irony and sarcasm

I think that the definition of irony is not correct since this is not a resource of language such as sarcasm, irony is only a situation opposite to that expected, for example that a prisoner wins some plane tickets, that the person who promised hurts you protect yourself, that it rains during your wedding or that you win the lottery and die of a heart attack due to emotion, instead sarcasm is a language resource and in the examples that gave the only difference is who is the object of the comment, but both are sarcastic.
By the way, the use of sarcasm is marked by the tone of voice and since it is impossible to bring the tone of voice to written language, what corresponds is to mark with a symbol (!), (?) Or: v in social networks, the ‘ pac man ‘the word or phrase that would be highlighted in spoken language since according to Poe’s Law it is impossible to distinguish an’ extreme ‘position from a sarcastic one if it is not specified that it was sarcasm.

I think it would also be convenient to distinguish between sarcasm and litote because they are also often confused.

Greetings.