# BlockDecoder

blockdecoder provides an easy way to parse and debug SLP transactions.

The following is an expanded form of:

$ ./build/bin/blockdecoder `bitcoin-cli getblock \`bitcoin-cli getblockhash 543374\` 0`
$ ./blockdecoder 000000204e7fba9163604a292bec3cfb432399b118525d0e5df2130200000000000000005285df22f2e46b98e5885229ec8d97b5fec6b6c514b3092695296f1c3b3265b2acd4725bd0170218770742e91f01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff04038e4a08ffffffff039cae814a000000001976a91485d7ce5f9ec6daf72789be9fe639c92898595b2288ac0000000000000000434104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac00000000000000002a6a28e4fbeca4ac050a0a00be8c7055b5821562a90693b4d40c0b08d3816a2f8084f904000000a30cd900000000000100000004eb74a67b7e326d97a67fbae255c3c0be3d3f88966f1deed69c64efbf5b9bbe3b000000006a47304402200a0f411bffd35ee98fcbf61294e6a70e5ac1cca002c60bd5e099ba0ddf5d78cb022059bf97fb10d4b6fe90001d0a1025cba9502f0a10a4a4498e96cf1072c2b1146e412103c42f8c728b880f52c42aaa74675e5bfaf636c37812dfa23cdea2fdb39a270c52feffffffbc6f2020580a7e6d2fb90e25b5b592b7df42093ed5d3eccb0c92eb635d380c8f010000006a47304402204d5c831e495d89230a729994172359715d0bd8dea463161775138908a22391d602203f080c0ec352eea33180dd72a114b98ca933002dd6968fef12b936004e090f76412102fbbd0df4e63ad0c3cb9e52c65687e061767d54e6286f8610cd272897bf4f0c27feffffff404c3e93521c0e74ca83cce29e60be7bf2f232ed4ba47ae753b644558db052d2000000006a47304402200a9487fb547a69f3b89759b37dcbcb785cb5de3c16cbfb9bf175eeb5e9ee7c25022053798b8acefc536af2ba54a799858053f08f2633ebbbeea29bdbb9e7c0158625412103957875c1f18e1437ee648ddc8555a522d32a09a8400760c9e526caa871164f66feffffff922475d0faec0df3f0b52fa6a826542eda3c1cbc95412cefbf15a43a4fa12edc000000006a47304402203d88219ef064e1cc29b1a944033b0c439fa9a6e5c28f0fba7cf744f50652416c0220486ecf52a9174a4c7ad09fe02f72cecc11ce9a38f576283e74a6866b32d02dfc4121032117ddd63bd8399ee9da2494bbd1fdeec80deee4a0193bb88cceb0d49aad6fc7feffffff0184576202000000001976a914fa60958424ef49d1574049cd80a92935038c19ba88ac8c4a08000100000001bfdd20b3ea2d81e0af0862214d336838b82d0d1e7b20677f7bdb2cc5cf7ff79c010000006a4730440220130d9e76cfd6f85d0f610abb8d66581ec6603422f1de67608ccf17253698a7a90220609d239881497028fd000e9c0f6c2b77cf630bc8419a8d30e18d090ae88abbbb412103175a4701a9f3a6906e5b4892fed2fee8e68d14507fa5ed867e69686197ffb886ffffffff025d410f00000000001976a914e8e8afd3dc33af44374483801e0888c197465a2d88ac4fb7eb9e000000001976a9143c70ead9c5ca19c72f2e3d1cc876c5de77aaa7ef88ac000000000100000001226e2713420955a751fb545b1384efdd31b37f5b50d1cc85158009f7d7145b75010000006a4730440220038642b9037c9bc39802a380dc04e52ae9c19374dddd0c88b5c17ed673599700022010697d2b969596bbe576404981dbd8d54e0bb21ac3cbbe3632d78253c31b793a412103281a79fee7453250098364a9db721f91b9e3d5709e6c51ac2b6f31fe142a3cd5ffffffff017d558a1e000000001976a9147ab40f15fb503b7ae6264fd0c7e23ad9998ea41288ac000000000100000001f21b6f061785825cb3efdb2cb5b51ecccf5089f2eb423fb3d232196f9aec2dcd00000000171600142a6a4163db8fa47de01f868f5d967f6776caa232ffffffff0154effa02000000001976a914b54b899cad2dd204e46c9f6122adfbedba76559688ac000000000100000001bd401549f537d7e0b3a6ba5cadaf86c198a654f5d1adbf09c22d49c03fcd5492010000006b483045022100fdea573a8dad83fa42c886752c3c64d5e69f7fb2a7108de10dd71da02767a29e022011c7b046245121febee9a096f631256a2754f6ed2f27869a4376a944291ed00b41210322f6ed46d5936bfc03f5117f80029d9ea3ad994d9e337216fa1618af7a756a5affffffff02502d1900000000001976a914c8f45e453275269702a91b7539d586c30ea10bf688acf9677000000000001976a914e978522fb804fd7e2db3734ed7ff955de61971c188ac00000000010000000146eb84707d0437885af5de48349e932e2f1d3208662f53278f55e8917926a8740000000023220020239e4899d93f32444616fc94a035e157b8cf1b91ff33bcf2b66086895c5478d9ffffffff01b46bda01000000001976a914ca3a8adec73da96b4553006c5b998a78b3ec90d188ac00000000010000000130efebdc9e7f725f8b1289c17e5ce2690fbf4d23d807cb93aeef17e28c831e5c0100000017160014c1f497c087109bacecc84ea8f8df0030c47e42a7ffffffff01fb9e1200000000001976a914e67067251c487b26ae8bf98a67640e86a27bab0d88ac000000000200000002c5ebe56a6c29c7cc3bf95d81d4e443a85c55cee68d83c36364ee73f2cbab80ce220000006a473044022043567ed985d431459e8ad1b47050967caa97beecdb6bfb76cb36bf27207a33fa022021bba844e1cd3ba506b0626e2759d2be6584942ef26649e6817365501fe22ba3412103a6304febaa31abf223ec53a59d96a3c3a8bb33619a9d18b155f305c43f9691cffeffffff1b1676a232a6734dafa33a6dc56631889d556a7f4ed5c892f38f29698ad4ee90000000006b483045022100b16ecb0194250b3479038a78ee962d5d45ce76e66fe7741df93ece7505b20f23022011585c2eee05f7fb8a530963e19c9672386a451cc529dfec08299239ee2e27054121035efcad2fa261cb043c10e5ff5a32d7bcc43e4a328b56ef62eebf6e8316bb8a5afeffffff02d74a0f00000000001976a9141fa81395d85cdd20353246d09f8202d4acd28aac88ac20f40e00000000001976a9140db322ed11af3e488715c571018834c0318ed68488ac8c4a080001000000015cf1886775c54a7788ab7b81b3026f7de43780ed9cfe333501650fed3ddcb650000000001716001407e956503c5012b59e0ec571211aa91182effadaffffffff01e59cec00000000001976a914aa89113d3f22b1b170673bf9cd01702cdcddaeb688ac0000000001000000017dbdba676be594cf9a1cf52b11c6163aba5e732f1bc194bfe655cf3031acff410000000017160014a56a69d46e26e20c8c6a11a1f13ca36dda26e22effffffff01edcbe004000000001976a914814fdf3d631568458e2e452db5102312eb7fcd2e88ac0000000001000000018cef50fa0900281100dceed6941bb8ab70187bc2daaee7827292858104c56c900000000017160014ee871134e4d6e5c606b9043a816c39a7a5d05935ffffffff01ba4b8c00000000001976a91424d91bc6b49daa39c475cd8f3b40781b24b5771688ac0000000001000000011e7aaffbf26ab2345c541ba86a411b69c550c77474f00f4ce1471beb5780e9810000000017160014872de926ed5dfc950f1f7e035fed7eecff98d098ffffffff010191a900000000001976a91449ece94eca691290e54041f9548e807207204ec388ac000000000100000001f3cf256dcb9eed01f4c506ca5c16f43118140b684b4cd9ac8208fbc83abb69c70000000017160014aa2158fee3c91212b93acb57b0101acb313ffe20ffffffff01ee240000000000001976a9140c4bf066c321749f3cd14284af2f2fedc1c715d988ac00000000010000000170108429ae14cc36f47997a08a126e5aa069f3e96bf1a06286b20d5bbd9cbc9c0100000017160014a56a69d46e26e20c8c6a11a1f13ca36dda26e22effffffff0156372106000000001976a914a4cbdeb4e17cb459bb8b52251fc9285da8e2df0e88ac000000000100000001e0eed72fc96c7c0b19fd1cb97ad72cf0133d4633c3868fba37b988a8ff32e4980000000017160014e90d05135a43eaaf4ab36fd139302ac0e8f34706ffffffff01df396302000000001976a9146eb3ae7b37068101de26c4d291c610d404eed1ed88ac00000000010000000103c5db18b9bf033ddf2a78b1ce85db87d7856a3bd274abf5ed9572b6b8e1dc2f00000000171600147d7fbb1162b1da35b03bab18796ea15175cfc378ffffffff013afbaa00000000001976a914f10af9cfba705508dd3c719d6b1e2c65dd78407988ac0000000001000000019b4c1f9f6f331e6ea4baec8819b6e39f327273612abe13b76039e7c3c475c15601000000171600144ff9b0ab70935fa7f112f82c132172ae3e4da8bfffffffff013d0f0000000000001976a91401a258f0c58f0cda84e0e8ddfdf029dfc60cfb5a88ac000000000100000001ab86ee10a2c49dab72ec6ee0e084d4167ff8a5cad7975078ff9ca0da8298e27a000000001716001486bcc13194af7530039b0e3a5e3e00d1c8435d8cffffffff010cea1800000000001976a9144e8ad73ff360a3b6c3735d90493de24908e2590488ac0000000001000000019f10d689e92397717e9763feb3cdb54671fdfda7a4e625d9e3bbd9ea4521eed2000000001716001455fc576e79d70281fc6c2bd33f37d3b825ecfec5ffffffff01379a1b01000000001976a91400bf05f9726e6e2a125f13e1524bf1aed9a69bca88ac0000000001000000013855c9b1b3dfd1407218a766f6e80bd6d8a07e11703c5757998bfa7db916f4560000000023220020349d1f55ad0ac837c4e014bb171d20bcf3024bf6627f3a99de43a98211cab1b1ffffffff01ee240000000000001976a9142c7172a2a6075950dde7973e054c518caeaa335c88ac000000000100000001546edebaed75ab2c721f38c9a2366902a0b0dc31ddae52ef49c6cbfc5e17fab800000000232200208ec4db89c6631f441cc0bcfc40d0ca479e9fcfaf4fda15d333b1ddd816cb0613ffffffff01551e0000000000001976a9149095ab80bde99d2d9a2bb136ade382c7720f60ac88ac0000000001000000010f992f0dfd99ac77c78a566402d289d65d60298ccc8a65fb5736dc91f5bdecabcb01000023220020cbc07cb54cfc16f05a8fa7fe47fe23f6d861bfeeffd5b4ef3de3829589e8fe35ffffffff01f44c0000000000001976a914eb0fbfde58f1fa106c121bf67c4201948dbbb9e888ac00000000010000000121fb0246a97924dfaae1954412aed89ace6fa3b987feba8eff975fcf12396b0701000000232200205344e6a94ab633d552d3df4997bf253251e501387dc0a5425c5528957d861910ffffffff0121d20300000000001976a91480a86844c482ab33c7b68cb06733d3c5f0d910a488ac000000000100000001c5ebe56a6c29c7cc3bf95d81d4e443a85c55cee68d83c36364ee73f2cbab80ce11020000232200206c3f2e575f5ba78a5feb44f2e46fe815a10e75f4680a85469b119d2ccb7f91bcffffffff01149b0000000000001976a91484511bdeee301fbe59402e58c2e22345b8d0bb0988ac000000000100000001287e17e675cf9fbf8b92ddc05a205a0c24951ecae7ea2b71a8df05c347b44e36000000002322002084977b3f08dc402996efd5f508f349a4cee25b97273dc5ee849f5d3458ba6702ffffffff0136f83400000000001976a914ffb903ed2f6ff17a81198d24030cc5d3ac5e7ffd88ac00000000010000000185eba1bca81346b9ba9e0cb9d3af6e9a4e980514e1be1e5012e023a9600875a8000000006a47304402203c587099f57ff9faaa082b8cf7f6a60a7ac7944cbd0fca79cee55141d60e72a702207ca3d1a8c741aef8cf6cd19ae8fb49de8239872733ac65797cf905da17bbecea4121027785a94420ae21f2ce62662bcad5236282f8b2b5b8b6bfb1418c579dff3e462fffffffff0230050e37000000001976a91455cb79b9a0f92902133b40edb2febba6d0f498bd88acf870fa05000000001976a9149da453adbb49f16acd635b789867075a9c30bae888ac0000000001000000027d675d749103e9c39cf26f9f7da1e0c520e3c57a507c1a4cba686e4d8a0dca3a020000006b483045022100e065fc80654a4b3abb3a19136ee06919fd3e1de8ea72d14c07e641c58d4eecb70220066a903ff121038a8bf3216c08d7335069f5ded3e0d883f8a55d35cb93bc350e41210383c15483031d50ae74cb5146d39a90a65d515cfc29b9f8400686b5ae85ec993cfeffffff457c7abea3e4ab2f6edca8731b58fb0d773a314a402938110a78deda4025be56000000006a473044022014776534eebc37dc6c9e1805e4d422a2801cac8af9098afc55148eea8bf4aedc0220697e714525c115edda5c60b4f93115bb0c31aa4d42a5e0831bc309c3bb3c3fbb41210383c15483031d50ae74cb5146d39a90a65d515cfc29b9f8400686b5ae85ec993cfeffffff0598080000000000001976a914b0958f68748a218e724bfd93a6cd1df29593095e88ac22020000000000001976a9145b1c85c6d5ef8e7ff297016432cd8c1a4bca60f888acb1db0000000000001976a91454e17ec7b51f1995fa5aafbf2ec0ae588fc9bf8388ac22020000000000001976a9145f1288803c311aa12bff51dbb2bc9c8127206b1488ac0000000000000000336a31000000205431434f556d743033383037627432696d686d666e6938657237776d636a6167766835677800000000000000018c4a08000100000001e5b4e5e27326ccfb14cbd07e8bca30dcd6ede770be67606dd8caac10d4f1fa2c000000006a47304402202057ce5dd381700f70fd9fed2bb418d9be8e3f4e997b14af497e9d66474118e3022020d4d8dec9e73c5011badd30bfd73745280d8af1e3eb2143dab612e12a603c924121030845834e8896eb47b1e0c9b38b98a0dc32d33263778f54ec2ab1bdcbd3edb1beffffffff0422020000000000001976a91454e17ec7b51f1995fa5aafbf2ec0ae588fc9bf8388ac22020000000000001976a9145b1c85c6d5ef8e7ff297016432cd8c1a4bca60f888ace8020000000000001976a914b0958f68748a218e724bfd93a6cd1df29593095e88ac00000000000000005c6a4c59000000205434434f556d743033383037627432696d686d666e6938657237776d636a616776683567780000000000000006000000000000000d326366616631643431306163636164383664363036376265373065376564643600000000010000000182d9bf626d44e3e99a7772a57065ea856500a88aa6fdaf6c6fc969d519588fd3000000006b483045022100958bb9628fd6fe2626d89e10a03fbeb9b9ebcebe6e9fc0916ee5fbb87e14e19a022020b7ac55a8f0e5544dcb0af26ab745362cadf27bb7ae99db49524ece63b61f8e41210329dd10a8bb8e79347e1fc91cb8cc89567e03ad83f1a254cb59717fa689403544ffffffff029e1c2c04000000001976a914142d70e5643bfc451892b6127fc0bbee427e855a88ac4e5ea604000000001976a914ea4d6b67148dfa3d6de0930a3618cf54d62c96aa88ac00000000020000000154650b186d9da50a5d6ead750bacbdccb1ca4ef205439ff9954fbb118e2b41dd000000006b483045022100eaab632f51b6bfe705784419dc26072f09dc4ef4a25fd8d0cd939170bb635dbc02202da75b85fb93459e891a8c8c988228dfc966a2e761450ef8da4f268a14a390364121036b8e0d0967bdeb6164eaf98eb1d0dad2ff133b61762e29cffe5066b8862a53cbfeffffff04809fd500000000001976a9142f4aa634403baa532330dee3ea5ee7d8bfc5e9b288acf241b364000000001976a914dbfed535bbd5894818e286f9e4ae3574ea86fe4388acf0009a01000000001976a914bbb6d1752f77a9fe4266980dccec87d25e894e5e88ac00dd6d00000000001976a914893b0bc9f4b77c6f78125eef5da4e72e9262a4c088ac8c4a0800

# Result:

version:     536870912
prev_block:  00000000000000000213f25d0e5d5218b1992343fb3cec2b294a606391ba7f4e
merkle_root: b265323b1c6f29952609b314c5b6c6feb5978dec295288e5986be4f222df8552
timestamp:   1534252204
bits:        402790352
nonce:       3913418615
--------------------------------------------------------------------------------
txid:             dc2797eac919ca9a50e3cef1a1780b021a73b61a6f6994f1d70234e0a52e5de2
version:          1
lock_time:        0
slp: INVALID

inputs:
#0
    txid: 0000000000000000000000000000000000000000000000000000000000000000
    vout: 4294967295

outputs:
#0
    value:        1250012828
    scriptpubkey: 76a91485d7ce5f9ec6daf72789be9fe639c92898595b2288ac

#1
    value:        0
    scriptpubkey: 4104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac

#2
    value:        0
    scriptpubkey: 6a28e4fbeca4ac050a0a00be8c7055b5821562a90693b4d40c0b08d3816a2f8084f904000000a30cd900

--------------------------------------------------------------------------------
...