{"id":20300726,"url":"https://github.com/carnesen-archive/bitcoin-service","last_synced_at":"2026-05-06T13:09:20.352Z","repository":{"id":93300609,"uuid":"169648310","full_name":"carnesen-archive/bitcoin-service","owner":"carnesen-archive","description":"A Node.js library for managing the bitcoin service `bitcoind`","archived":false,"fork":false,"pushed_at":"2019-02-17T06:15:41.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-08T14:33:22.394Z","etag":null,"topics":["bitcoin","bitcoind","carnesen","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/carnesen-archive.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}},"created_at":"2019-02-07T21:51:24.000Z","updated_at":"2020-01-01T20:25:01.000Z","dependencies_parsed_at":"2023-05-28T01:30:54.010Z","dependency_job_id":null,"html_url":"https://github.com/carnesen-archive/bitcoin-service","commit_stats":null,"previous_names":["carnesen/bitcoin-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carnesen-archive/bitcoin-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen-archive%2Fbitcoin-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen-archive%2Fbitcoin-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen-archive%2Fbitcoin-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen-archive%2Fbitcoin-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carnesen-archive","download_url":"https://codeload.github.com/carnesen-archive/bitcoin-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen-archive%2Fbitcoin-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32695048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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","bitcoind","carnesen","nodejs","typescript"],"created_at":"2024-11-14T16:20:41.384Z","updated_at":"2026-05-06T13:09:20.335Z","avatar_url":"https://github.com/carnesen-archive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @carnesen/bitcoin-service [![npm version](https://badge.fury.io/js/%40carnesen%2Fbitcoin-service.svg)](https://badge.fury.io/js/%40carnesen%2Fbitcoin-service) [![Build Status](https://travis-ci.com/carnesen/bitcoin-service.svg?branch=master)](https://travis-ci.com/carnesen/bitcoin-service)\n\nA Node.js library for managing the bitcoin service `bitcoind`. The package includes runtime JavaScript files suitable for Node.js \u003e=8 as well as the corresponding TypeScript type declarations.\n\n## Usage\n\nHere is a little TypeScript Node.js script that starts `bitcoind`:\n```ts\n// example.ts\nimport { startService } from '@carnesen/bitcoin-service';\nconst bitcoinHome = '/usr/local/bitcoin-0.17.1';\n(async () =\u003e {\n  try {\n    await startService({ bitcoinHome });\n    process.exit(0);\n  } catch (ex) {\n    console.log(ex);\n    process.exit(1);\n  }\n})()\n```\n\nRunning the script looks like:\n```\n$ ts-node example.ts\nBitcoin server starting\n```\n\n## API\n### `startService(configFilePath, bitcoinHome?): Promise\u003c{changed}\u003e`\nSets `daemon` to `true` in the configuration file and starts `bitcoind` if it's not running already\n\n#### `configFilePath`\n`string`. Absolute path of a bitcoin configuration file. Will be created if it does not already exist.\n\n#### `bitcoinHome`\nOptional `string`. Absolute path of a directory where the bitcoin server software is installed. If not provided, `` `${bitcoinHome}/bin` `` must be on your `PATH`.\n\n#### `changed`\n`boolean`. Is `false` if `bitcoind` was already running, `true` if the service was successfully started.\n\n### `stopService(configFilePath): Promise\u003c{changed}\u003e`\nStops `bitcoind` if it's running\n\n#### `changed`\n`boolean`. Is `false` if `bitcoind` wasn't running. Is `true` if the service was running and successfully stopped.\n\n### `restartService(configFilePath, bitcoinHome?): Promise\u003c{changed}\u003e`\nStops and starts `bitcoind` as documented above.\n\n### `isServiceRunning(configFilePath): Promise\u003cboolean\u003e`\nThe returned promise resolves to `true` if the service is running or `false` if it is not.\n\n## More information\nCheck out [the tests directory](src/__tests__) for more examples of how it works. If you encounter any bugs or have any questions or feature requests, please don't hesitate to file an issue or submit a pull request on this project's repository on GitHub.\n\n## Related\n- [@carnesen/bitcoin-service-cli](https://github.com/carnesen/bitcoin-service-cli): A Node.js CLI and library for managing the bitcoin server process `bitcoind`\n\n- [@carnesen/bitcoin-config](https://github.com/carnesen/bitcoin-config): A Node.js library for bitcoin server software configuration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarnesen-archive%2Fbitcoin-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarnesen-archive%2Fbitcoin-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarnesen-archive%2Fbitcoin-service/lists"}