Is there any complete specification of the transactions?
Or do I have to read the source code?


This is the only "official specification". The wiki pages have a lot of good info, but they sometimes contain inaccuracies or important omissions.

There's some info about the SIGHASH flags here:
https://en.bitcoin.it/wiki/OP_CHECKSIG