Viewing truly raw but decoded transaction data I've previously been using bitcoin-cli decoderawtransaction to get human readable bitcoin transaction data but am just learning that it's not only decoding the raw transaction but also adding extra derived fields (e.g. txid, hash) that aren't explicitly stated within the transaction held in the blockchain.

Purely as a means of education I want to be able to interact with exactly the transaction data that's stored by bitcoin in blocks/mempool with no extra extrapolated data.

What's the best way to get this data?
Why not take that raw hex and decode it yourself? The serialization is documented here: https://en.bitcoin.it/wiki/Protocol_documentation#tx

For example: https://blockstream.info/tx/597d47f1c1653b6e067d8a323c07e0d7702cc92445922e4ba1a61748e0e6fee8

Raw hex:

01000000018a6b50504336d298af1bef59f4292afdbac8ad29a0217ef6d67eb70120f33704010
000006b483045022100b0c1bbc3ab2b716f388fe9136cbed2a1e1562fe7a9b8b9847f27284340
85e9e602206351a3b9fb8e04258730856792237e98b9e8d4a89ca10cd5c1dfa68295b9f409012
103ddc5d4f8c82c81304a409200095f26ce3f51847c6f11793b3a744818edff7ad3ffffffff02
204e0000000000001976a914d2212980d7adf3596d4db7be218d4c0e95944be488ac098033000
00000001976a91460d6cdf16948d0a40667b7af195f3d233a35b0e288ac00000000


Decoded:

01000000 version

01 # of inputs

(input 0:)

8a6b50504336d298af1bef59f4292afdbac8ad29a0217ef6d67eb70120f33704 prev out txid

01000000 prev out index

6b length of script (= 107 bytes)

483045022100b0c1bbc3ab2b716f388fe9136cbed2a1e1562fe7a9b8b9847f2728434085e9e6022
06351a3b9fb8e04258730856792237e98b9e8d4a89ca10cd5c1dfa68295b9f409012103ddc5d4f8
c82c81304a409200095f26ce3f51847c6f11793b3a744818edff7ad3 script

ffffffff nSequence

02 # of outputs

(output 0:)

204e000000000000 value (20,000 satoshis)

19 length of script (=25 bytes)

76a914d2212980d7adf3596d4db7be218d4c0e95944be488ac script

(output 1:)

0980330000000000 value (3,375,113 satoshis)

19 length of script (=25 bytes)

76a91460d6cdf16948d0a40667b7af195f3d233a35b0e288ac script

00000000 locktime