{"id":22342461,"url":"https://github.com/st3b1t/bitcoin-nodejs-playground","last_synced_at":"2026-01-25T13:02:07.374Z","repository":{"id":243433788,"uuid":"805122980","full_name":"st3b1t/bitcoin-nodejs-playground","owner":"st3b1t","description":"This repository contains small experiments with a series of scripts that implement in a few lines some of the workings of Bitcoin or show and process some of the data structures of the blockchain for greater understanding.","archived":false,"fork":false,"pushed_at":"2024-11-20T18:21:31.000Z","size":3092,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T01:58:11.866Z","etag":null,"topics":["bitcoin","bitcoin-hacking","bitcoinjs-lib","javascript","nodejs","zeromq"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/st3b1t.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":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-23T23:40:20.000Z","updated_at":"2024-11-20T18:21:38.000Z","dependencies_parsed_at":"2025-07-30T01:32:46.420Z","dependency_job_id":"fe5b66f9-badd-4e64-80c4-1db8131dee4d","html_url":"https://github.com/st3b1t/bitcoin-nodejs-playground","commit_stats":null,"previous_names":["st3b1t/bitcoin-nodejs-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/st3b1t/bitcoin-nodejs-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3b1t%2Fbitcoin-nodejs-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3b1t%2Fbitcoin-nodejs-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3b1t%2Fbitcoin-nodejs-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3b1t%2Fbitcoin-nodejs-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st3b1t","download_url":"https://codeload.github.com/st3b1t/bitcoin-nodejs-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3b1t%2Fbitcoin-nodejs-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28753411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-hacking","bitcoinjs-lib","javascript","nodejs","zeromq"],"created_at":"2024-12-04T08:12:48.695Z","updated_at":"2026-01-25T13:02:07.356Z","avatar_url":"https://github.com/st3b1t.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcoin Nodejs Playground\n\nThis repository contains small experiments with a series of scripts that implement in a few lines some of the workings of Bitcoin or show and process some of the data structures of the blockchain for greater understanding.\n\n\n## 1. Stream Transactions and OP_RETURN\n\nStream in the browser via WebSocket any transaction and OP_RETURN of your Bitcoin Full Node from [ZeroMQ](https://github.com/zeromq/zeromq.js/) interface\nServer side written in NodeJs [Fastify](https://github.com/fastify) and [BitcoinJs-lib](https://github.com/bitcoinjs/bitcoinjs-lib)\n\n### Requirements:\nAdd in `bitcoin.conf` enable this line:\n\n`zmqpubrawtx=tcp://127.0.0.1:28332`\n\nnpm dependecies: zeromq bitcoinjs-lib fastify @fastify/websocket\n\n```bash\n$ npm install\n```\n\n#### Optionals:\ncommand line utility(part of bitcoin-core): `bitcoin-tx`\n\n### RUN\nspecify HOST of Bitcoin and ZeroMQ port\n\n```bash\n$ export HOST=127.0.0.1 PORT=28332\n$ node zmq_tx_websocket_fastify.js\n```\n\nshow in the browser at http://localhost:8080/\n\n![](images/zmq_tx_wesocket_fastify.gif)\n\n---\n\n## 2. Proof Of Work\n\n```bash\n$ node proofofwork.js\n```\n\n![](images/proofofwork.gif)\n\n## 3. Proof Of Work Binary comparison\n\nThe hash comparison occurs at the binary level, allows greater granularity of target diffucilty\n\n```bash\n$ node proofofwork_binary.js\n```\n\n![](images/proofofwork_binary.gif)\n\n# Donate ❤️ sats via LN ⚡ to incentivize work of this repository\n\n[![image](https://raw.githubusercontent.com/st3b1t/st3b1t/main/donate.png)](https://getalby.com/p/st3b1t)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst3b1t%2Fbitcoin-nodejs-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst3b1t%2Fbitcoin-nodejs-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst3b1t%2Fbitcoin-nodejs-playground/lists"}