Yes. The TXID is the nversion, txin, txout, and nlocktime fields. The wtxid is everything. Just concatenate everything together from the part where each field is broken down. The lengths are still there so you can just stick them all together.
I think you misunderstood my question!
I already know how they is calculated. I am making a library and I just want data (the two hashes) to feed my Unit Tests.
For example the TxID of the first transaction in [1] above is:
e8151a2af31c368a35053ddd4bdb285a8595c769a3ad83e0fa02314a602d4609
I ended up using Electrum to get the transaction IDs. But I still don't have WTxIDs and I don't know how to get them. For instance is there any command in Bitcoin Core that I can use to get it?