This is the data of the 26th transaction in a block that was created on 28 Aug 2017 21:20:46 GMT:
00 00 00 00 02 00 00 00 00 01 01 88 03 30 8C 8C 79 75 F2 A4 EA 36 8D 1D B4 07 50 41 64 18 F7 43
5D DE 6A 67 44 9D 32 76 79 61 79 01 00 00 00 17 16 00 14 C0 AF C6 18 E6 E5 5E 77 21 01 2D A4 FB
ED FC 41 05 13 8D F1 FF FF FF FF 02 D4 AD 71 EF 04 00 00 00 17 A9 14 FA 2A 70 3A F8 1A 31 25 28
4C 5F C6 45 31 E8 2B 1C 2D CD 99 87 D2 21 12 00 00 00 00 00 19 76 A9 14 63 C5 06 75 7B 4C B6 25
59 FB 7B F2 B1 F0 81 11 54 F4 29 99 88 AC 02 47 30 44 02 20 43 4B B6 B4 D0 FA 71 83 62 5B D5 0F
55 C2 6C 8B 74 B3 12 DF 5F 06 1B 96 88 6F 33 E5 16 AF 3D 92 02 20 7F C7 61 99 99 CB 72 96 35 6A
BE 82 A9 A0 B1 EC 73 1B 66 27 25 2E C8 29 38 B9 09 99 1E 43 C3 B4 01 21 02 00 62 14 1C CC 8E 79
C1 7F C2 0C 0C CE F8 DA 06 1F 58 D3 43 D2 1E D9 2C 00 57 F4 80 FA 52 2C 3D 00 00 00 00
I have analysed the structure as follows:
Locktime of previous tx = 00 00 00 00
Version = 02 00 00 00
Segwit field? = 00 01
Number of inputs = 01
Hash previous tx = 88 03 30 8C 8C 79 75 F2 A4 EA 36 8D 1D B4 07 50 41 64 18 F7 43 5D DE 6A 67 44 9D 32 76 79 61 79
Index of output in prev tx = 01 00 00 00
Script length = 17 (23)
Script = 16 00 14 C0 AF C6 18 E6 E5 5E 77 21 01 2D A4 FB ED FC 41 05 13 8D F1
Sequence = FF FF FF FF
Number of outputs = 02
Amount of first output = D4 AD 71 EF 04 00 00 00 (BTC = 40,17204692)
Script length = 17 (23)
Script = A9 14 FA 2A 70 3A F8 1A 31 25 28 4C 5F C6 45 31 E8 2B 1C 2D CD 99 87
Amount of second output = D2 21 12 00 00 00 00 00 (BTC = 0,01188306)
Script length = 19 (25)
Script = 76 A9 14 63 C5 06 75 7B 4C B6 25 59 FB 7B F2 B1 F0 81 11 54 F4 29 99 88 AC
Segwitcode? = 02
Length of first Segwit field? = 47 (71)
First Segwit field? = 30 44 02 20 43 4B B6 B4 D0 FA 71 83 62 5B D5 0F 55 C2 6C 8B 74 B3 12 DF 5F 06 1B 96 88 6F 33 E5 16 AF 3D 92 02 20 7F C7 61 99 99 CB 72 96 35 6A BE 82 A9 A0 B1 EC 73 1B 66 27 25 2E C8 29 38 B9 09 99 1E 43 C3 B4 01
Length of second Segwit field? = 21 (33)
Second Segwit field? = 02 00 62 14 1C CC 8E 79 C1 7F C2 0C 0C CE F8 DA 06 1F 58 D3 43 D2 1E D9 2C 00 57 F4 80 FA 52 2C 3D
Locktime = 00 00 00 00
The fields with questionmarks have been introduced with the activation of Segwit on August 24 2017. I have seen Segwitcodes 00, 02 and 04. Code 00 appears to have no additional Segwit fields, code 02 appears to have 2 Segwitfields and code 04 appears to have 3 Segwitfields. What do these codes and additional fields mean and are there other codes possible?