{"id":18581651,"url":"https://github.com/bitcoin-core/btcdeb","last_synced_at":"2025-04-12T23:38:53.621Z","repository":{"id":37430463,"uuid":"114071262","full_name":"bitcoin-core/btcdeb","owner":"bitcoin-core","description":"Bitcoin Script Debugger","archived":false,"fork":false,"pushed_at":"2024-06-27T15:22:06.000Z","size":5053,"stargazers_count":562,"open_issues_count":9,"forks_count":139,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-12T23:38:48.563Z","etag":null,"topics":["bitcoin","bitcoin-script","debugger","script-debugger","taproot","tapscript","transaction"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitcoin-core.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/allocators/secure.h","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-13T03:53:21.000Z","updated_at":"2025-04-10T22:44:15.000Z","dependencies_parsed_at":"2024-02-06T01:26:11.191Z","dependency_job_id":"5e5a08c4-b305-4791-a42c-066f86e1dc33","html_url":"https://github.com/bitcoin-core/btcdeb","commit_stats":{"total_commits":354,"total_committers":16,"mean_commits":22.125,"dds":0.07344632768361581,"last_synced_commit":"e2c2e7b9fe2ecc0884129b53813a733f93a6e2c7"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoin-core%2Fbtcdeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoin-core%2Fbtcdeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoin-core%2Fbtcdeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoin-core%2Fbtcdeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoin-core","download_url":"https://codeload.github.com/bitcoin-core/btcdeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","bitcoin-script","debugger","script-debugger","taproot","tapscript","transaction"],"created_at":"2024-11-07T00:06:31.107Z","updated_at":"2025-04-12T23:38:53.600Z","avatar_url":"https://github.com/bitcoin-core.png","language":"C","readme":"# btcdeb\n\nBitcoin Script debugging utilities.\n\nThis is a set of tools used to debug or construct scripts for use in Bitcoin.\n\n[![Build Status](https://travis-ci.org/bitcoin-core/btcdeb.svg?branch=master)](https://travis-ci.org/bitcoin-core/btcdeb)\n\n## Preparation\n\nMac users need the macOS command line tools:\n\n```\nxcode-select --install\n```\n\nAnd [Homebrew](https://brew.sh/).\n\n## Dependencies\n\nbtcdeb depends on the following:\n\n- libtool\n- libssl\n- automake/autoconf\n- pkg-config\n\nUbuntu/debian users can do: `apt-get install libtool libssl-dev autoconf pkg-config` (with `sudo` prepended if necessary)\n\nMac users can do: `brew install libtool automake pkg-config`\n\n## Installation\n\nOn linux or mac, grab the source code and do:\n\n```Bash\n$ ./autogen.sh\n$ ./configure\n$ make\n$ sudo make install\n```\n\nOr use **docker**:\n\n```Bash\ndocker build -t btcdeb .\ndocker run -d -t --name btc-vm btcdeb btcdeb\n# and for run it in the shell\ndocker exec -it btc-vm /bin/sh\n```\n\nIf any of those give an error, please file an issue and I'll take a look. It could\nbe a dependency that I forgot about.\n\n## Emscripten\n\nYou can compile btcdeb tools into JavaScript using [emscripten](http://kripken.github.io/emscripten-site/).\n\nAfter installing the SDK, compile btcdeb tools with the following commands:\n\n```Bash\n$ make clean\n$ emconfigure ./configure\n$ emmake make\n$ for i in btcdeb btcc tap; do mv $i $i.bc \u0026\u0026 emcc -O2 $i.bc libbitcoin.a -o $i.js; done\n```\n\nand then instead of doing `./btcdeb` you do `node btcdeb.js` (or `mastify.js`, etc).\n\nThe last part is done because emscripten's `emcc` expects the input bytecode file to have the `.bc` extension, whereas the makefile generates files with no extension.\n\nNote: most things work, but the console in btcdeb does not. You can work around this by doing `echo -n -e \"step\\n\\n\\n\"` (with sufficient `\\n`s).\n\n## Script debugger\n\nThe `btcdeb` command can step through a Bitcoin Script and show stack content and operations on a per op level. See [doc/btcdeb.md](doc/btcdeb.md) for details on usage.\n\n## Script compiler\n\nThe `btcc` command can interpret a script in its human readable form and will\nreturn a corresponding Bitcoin Script.\n\n```Bash\n$ btcc OP_DUP OP_HASH160 897c81ac37ae36f7bc5b91356cfb0138bfacb3c1 OP_EQUALVERIFY OP_CHECKSIG\n76a914897c81ac37ae36f7bc5b91356cfb0138bfacb3c188ac\n```\n\nThe above is the script pub key for a transaction in Bitcoin in human readable format turned into its hexadecimal representation.\n","funding_links":[],"categories":["Resources"],"sub_categories":["Developer Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoin-core%2Fbtcdeb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoin-core%2Fbtcdeb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoin-core%2Fbtcdeb/lists"}