Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
501"output_cmp": "txcreatesignv1.hex",502"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"503},504{ "exec": "./bitcoin-tx",505"args":506["-json",507"-create", "nversion=1",508"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",509"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",510"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",511"sign=ALL",512"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],513"output_cmp": "txcreatesignv1.json",514"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"515},516{ "exec": "./bitcoin-tx",517"args":518["-create",519"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",520"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",521"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",522"sign=ALL",523"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],524"output_cmp": "txcreatesignv2.hex",525"description": "Creates a new transaction with a single input and a single output, and then signs the transaction"526},527{ "exec": "./bitcoin-tx",528"args":529["-create",530"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",531"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",532"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":\"0foo\",\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",533"sign=ALL",534"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],535"return_code": 1,536"error_txt": "error: prevtxs internal object typecheck fail",537"description": "Tests the check for invalid vout index in prevtxs for sign"538},539{ "exec": "./bitcoin-tx",540"args":541["-create",542"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",543"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",544"set=prevtxs:[{\"txid\":\"Zd49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59412\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",545"sign=ALL",546"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],547"return_code": 1,548"error_txt": "error: txid must be hexadecimal string (not 'Zd49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59412')",549"description": "Tests the check for invalid txid due to invalid hex"550},551{ "exec": "./bitcoin-tx",552"args":553["-create",554"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",555"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",556"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc594\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",557"sign=ALL",558"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],559"return_code": 1,560"error_txt": "error: txid must be hexadecimal string (not '4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc594')",561"description": "Tests the check for invalid txid valid hex, but too short"562},563{ "exec": "./bitcoin-tx",564"args":565["-create",566"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",567"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",568"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc5948512\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",569"sign=ALL",570"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],571"return_code": 1,572"error_txt": "error: txid must be hexadecimal string (not '4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc5948512')",573"description": "Tests the check for invalid txid valid hex, but too long"574},575{ "exec": "./bitcoin-tx",576"args":577["-create",578"in=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff:0",579"set=privatekeys:[\"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn\"]",580"set=prevtxs:[{\"txid\":\"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\",\"vout\":0,\"amount\":\"0\", \"scriptPubKey\":\"0014751e76e8199196d454941c45d1b3a323f1433bd6\"}]",581"sign=ALL",582"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],583"output_cmp": "txcreatesignsegwit1.hex",584"description": "Creates a new transaction with a single witness input and a single output, and then signs the transaction"585},586{ "exec": "./bitcoin-tx",587"args":588["-create",589"in=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff:0",590"set=privatekeys:[\"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn\"]",591"set=prevtxs:[{\"txid\":\"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\",\"vout\":0,\"scriptPubKey\":\"0014751e76e8199196d454941c45d1b3a323f1433bd6\"}]",592"sign=ALL",593"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],594"return_code": 1,595"error_txt": "Missing amount for CTxOut with scriptPubKey=0014751e76e8199196d454941c45d1b3a323f1433bd6",596"description": "Tests the check for missing input amount for witness transactions"597},598{ "exec": "./bitcoin-tx",599"args":600["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],601"output_cmp": "txcreateoutpubkey1.hex",602"description": "Creates a new transaction with a single pay-to-pubkey output"603},604{ "exec": "./bitcoin-tx",605"args":606["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],607"output_cmp": "txcreateoutpubkey1.json",608"description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"609},610{ "exec": "./bitcoin-tx",611"args":612["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],613"output_cmp": "txcreateoutpubkey2.hex",614"description": "Creates a new transaction with a single pay-to-witness-pubkey output"615},616{ "exec": "./bitcoin-tx",617"args":618["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],619"output_cmp": "txcreateoutpubkey2.json",620"description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"621},622{ "exec": "./bitcoin-tx",623"args":624["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],625"output_cmp": "txcreateoutpubkey3.hex",626"description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"627},628{ "exec": "./bitcoin-tx",629"args":630["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],631"output_cmp": "txcreateoutpubkey3.json",632"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"633},634{ "exec": "./bitcoin-tx",635"args":636["-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],637"return_code": 1,638"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",639"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"640},641{ "exec": "./bitcoin-tx",642"args":643["-create",644"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",645"outdata=4:badhexdata"],646"return_code": 1,647"error_txt": "error: invalid TX output data",648"description": "Attempts to create a new transaction with one input and an output with malformed hex data. Expected to fail"649},650{ "exec": "./bitcoin-tx",651"args":652["-create",653"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",654"outdata=badhexdata"],655"return_code": 1,656"error_txt": "error: invalid TX output data",657"description": "Attempts to create a new transaction with one input and an output with no value and malformed hex data. Expected to fail"658},659{ "exec": "./bitcoin-tx",660"args":661["-create",662"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",663"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",664"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],665"output_cmp": "txcreatedata1.hex",666"description": "Creates a new transaction with one input, one address output and one data output"667},668{ "exec": "./bitcoin-tx",669"args":670["-json",671"-create", "nversion=1",672"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",673"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",674"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],675"output_cmp": "txcreatedata1.json",676"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"677},678{ "exec": "./bitcoin-tx",679"args":680["-create",681"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",682"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",683"outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],684"output_cmp": "txcreatedata2.hex",685"description": "Creates a new transaction with one input, one address output and one data (zero value) output"686},687{ "exec": "./bitcoin-tx",688"args":689["-json",690"-create",691"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",692"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",693"outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],694"output_cmp": "txcreatedata2.json",695"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"696},697{ "exec": "./bitcoin-tx",698"args":699["-create",700"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:11aa"],701"return_code": 1,702"error_txt": "error: invalid TX sequence id '11aa'",703"description": "Try to parse a sequence number outside the allowed range"704},705{ "exec": "./bitcoin-tx",706"args":707["-create",708"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:-1"],709"return_code": 1,710"error_txt": "error: invalid TX sequence id '-1'",711"description": "Try to parse a sequence number outside the allowed range"712},713{ "exec": "./bitcoin-tx",714"args":715["-create",716"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967296"],717"return_code": 1,718"error_txt": "error: invalid TX sequence id '4294967296'",719"description": "Try to parse a sequence number outside the allowed range"720},721{ "exec": "./bitcoin-tx",722"args":723["-create",724"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",725"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],726"output_cmp": "txcreatedata_seq0.hex",727"description": "Creates a new transaction with one input with sequence number and one address output"728},729{ "exec": "./bitcoin-tx",730"args":731["-create",732"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0: 4294967293 ",733"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],734"output_cmp": "txcreatedata_seq0.hex",735"description": "Creates a new transaction with one input with sequence number (+whitespace) and one address output"736},737{ "exec": "./bitcoin-tx",738"args":739["-json",740"-create",741"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",742"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],743"output_cmp": "txcreatedata_seq0.json",744"description": "Creates a new transaction with one input with sequence number and one address output (output in json)"745},746{ "exec": "./bitcoin-tx",747"args":748["01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",749"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],750"output_cmp": "txcreatedata_seq1.hex",
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.