{"id":21561766,"url":"https://github.com/synonymdev/lsp-worker-btc","last_synced_at":"2025-06-19T07:06:55.313Z","repository":{"id":38209544,"uuid":"445018470","full_name":"synonymdev/lsp-worker-btc","owner":"synonymdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-08T17:18:04.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T10:56:26.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/synonymdev.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}},"created_at":"2022-01-06T02:44:36.000Z","updated_at":"2024-03-08T17:17:43.000Z","dependencies_parsed_at":"2024-03-08T18:33:12.419Z","dependency_job_id":"a8a150b1-c97d-4a24-9213-ad19abe903f6","html_url":"https://github.com/synonymdev/lsp-worker-btc","commit_stats":null,"previous_names":["synonymdev/lsp-worker-btc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Flsp-worker-btc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Flsp-worker-btc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Flsp-worker-btc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Flsp-worker-btc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/lsp-worker-btc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248216893,"owners_count":21066632,"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":[],"created_at":"2024-11-24T09:27:54.674Z","updated_at":"2025-04-10T12:06:18.152Z","avatar_url":"https://github.com/synonymdev.png","language":"JavaScript","readme":"# LSP Bitcoin Worker\nMicroservice worker to interact with Bitcoin node\n\n## Features\n\n* Support for various Bitcoin RPC endpoints\n* Support for watching mempool\n* Support for sweeping the blockchain\n  * Alerts on new block\n\n\n## Getting started\n\n```\nnpm install\n```\n\nNext set up your config by copying the examples...\n\n```\ncp ./config/blocks.worker.config.json.example ./config/blocks.worker.config.json\ncp ./config/mempool.worker.config.json.example ./config/mempool.worker.config.json\ncp ./config/worker.config.json.example ./config/worker.config.json\n```\n\n`worker.config.json` will require credentials of a Bitcoin node in it.\nFor a development environment, we recommend installing [Polar](https://lightningpolar.com/) so you can easily spin up a node for testing. The example credentials in the config file match the defaults for a Bitcoin node created in Polar.\n\nYou will also need MongoDB running. `worker.config.json` can be updated to include connection information for your DB.\n\nBlocktank uses [Grenache](https://github.com/bitfinexcom/grenache), a DHT based high performance microservices framework, to distribute and hand out tasks to workers. To create the DHT network, run 2 instances of [Grape](https://github.com/bitfinexcom/grenache-grape) to get started...\n\n```\ngrape --dp 20001 --aph 30001 --bn '127.0.0.1:20002'\ngrape --dp 20002 --aph 40001 --bn '127.0.0.1:20001\n```\n\n## Running everything\n\nYou can either launch each of the workers in this repo manually as follows...\n\n```\nnode start.bitcoin.js\nnode start.blocks.js\nnode start.mempool.js\n```\n\nor use [pm2](https://pm2.keymetrics.io/docs/usage/process-management/) to run them all and manage all the processes for you...\n\n```\npm2 start ecosystem.config.js\n```\n\n## Workers\n\nThe following workers are started here...\n\n* start.bitcoin.js: svc:btc - provides access to calling the connected Bitcoin node\n* start.blocks.js: svc:btc:blocks - watches for new blocks and calls workers when that happens\n* start.mempool.js: svc:btc:mempool - watches for new transactions in the mempool and calls workers when that happens\n\nBy default, the following workers are called (though this can be changed in the config files)...\n\n* start.blocks.js: svc:btc_zero_conf_orders - called on each new block (see config)\n* start.blocks.js: svc:btc_address_watch - called on each new block (see config)\n* start.mempool.js: svc:btc_zero_conf_orders - called on each new transaction detected (see config)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Flsp-worker-btc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Flsp-worker-btc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Flsp-worker-btc/lists"}