{"_id":"@carnesen/bitcoin-service","_rev":"4-752e8985b5997206a5bfe2d84188d5ba","name":"@carnesen/bitcoin-service","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0-0":{"name":"@carnesen/bitcoin-service","description":"A Node.js library for managing the bitcoin service `bitcoind`","version":"0.0.0-0","main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"build":"tsc --project tsconfig.build.json","build:clean":"rimraf lib && npm run build","build:watch":"npm run build -- --watch","lint":"tslint --project .","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run test:unit && npm run build","test:unit":"jest --forceExit src","test:unit:coverage":"npm run test:unit -- --coverage","test:unit:coverage:watch":"npm run test:unit -- --coverage --watch","test:unit:watch":"npm run test:unit -- --watch","preversion":"npm test && npm run build:clean","postversion":"npm publish"},"dependencies":{"@carnesen/bitcoin-config":"0.0.0","@types/signal-exit":"3.0.0","signal-exit":"3.0.2"},"devDependencies":{"@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"24.0.0","@types/node":"10.12.21","@types/tempy":"0.2.0","jest":"24.1.0","rimraf":"2.6.3","tempy":"0.2.1","ts-jest":"23.10.5","ts-node":"8.0.2","tslint":"5.12.1","typescript":"3.3.3"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-service.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-service/issues"},"homepage":"https://github.com/carnesen/bitcoin-service#readme","license":"MIT","gitHead":"c1a5a80f3697c5776828006e26510b673185d208","_id":"@carnesen/bitcoin-service@0.0.0-0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-Dn5fqt3Cb0JEsP0Hya8H7Qx9Yjv/88KOs87FzpeudkYahBy4ehi7s12CoIZwoTWqbdUkmpOGOsNgw1h+th7MWw==","shasum":"64ab4162159a737c49192eee91c5a2386e0c04d1","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-service/-/bitcoin-service-0.0.0-0.tgz","fileCount":23,"unpackedSize":20503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXK0OCRA9TVsSAnZWagAAcxgP/jnCMN3UAgTUiL2d+ssj\nE03OGoEKHo37eN47kpU0Zb7GFNYYAj9KdIwXojkgQMv5XsyMUY1gK0h8C/5w\n74RXj2GNgNY7M1I9SpnWYAMvWeCfdcNcGOzqn76e4783PqmeuPGuRnvQwnHp\n/DUIhHlgbpERWZodLJqJI9CvCbkP//G6MMILN+B5Ck+jEdBj/9gpcg8gEbkU\nB6QMw4tlYTw2L1l5PIduhSFAr2TqLGdTEpDbSZE7PDxwvGwkEEy+RNs/7lTD\n7e0sB4m+51l52wBBM7dOgqLr5Kz+ziwHcDFYp03YYa4pCrL2T4a8AmcxP7lp\nEohXeOw4bac0kUo0+3qW7j46i463Tg9UsQnG6957GnYUeMxNg3GKDBwCoDJ0\nOF8VknhJb91qXDUPSW8QtaTIPE8dRXrlxTRKtQ/jzMUx/0Ac5eHrGCt1N5oc\ntU7JEKelvVQjYFoHPEkhJrhT7MtSU0+EhnlCz0aYIjx0uCHpmgwt1oojzRa7\nXU3MmMpnLGXZHD4xzX3PfqSrKFjZh7hXBPYiF0L/bSHlH4eBGQ0EZjOKPvOx\nfnBL/pChC7ngGhUWLvorufv0nZ4zi/YzY1aslvNDBpLZb4U98/Ws9ASR3Ub0\nRX/+4c/WM3PQOzAQFu4ESokIpCnkKx8WPa8cKWVSFdY72yvSiYr9tY6O6MK3\neoVY\r\n=IGEX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4hBnQtF1d+QWt16sZnyC0pPmfTZmYb2OPeQdAbiveYAiEA4TIDvJrk6LS2JO1npaWkq8U5y/D9sg1OlSyGvTU6VCs="}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-service_0.0.0-0_1549577485753_0.28616045818105684"},"_hasShrinkwrap":false},"0.0.0":{"name":"@carnesen/bitcoin-service","description":"A Node.js library for managing the bitcoin service `bitcoind`","version":"0.0.0","main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"build":"tsc --project tsconfig.build.json","build:clean":"rimraf lib && npm run build","build:watch":"tsc --watch","lint":"tslint --project .","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run test:unit && npm run build","test:unit":"jest src","test:unit:watch":"npm run test:unit -- --watch --coverage","prepare":"ts-node src/install-software.ts","preversion":"npm test && npm run build:clean","postversion":"npm publish"},"dependencies":{"@carnesen/bitcoin-config":"0.0.3","@types/signal-exit":"3.0.0","signal-exit":"3.0.2"},"devDependencies":{"@carnesen/bitcoin-software":"0.0.2","@carnesen/run-and-exit":"0.2.0","@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"24.0.0","@types/node":"10.12.24","@types/tempy":"0.2.0","jest":"24.1.0","rimraf":"2.6.3","tempy":"0.2.1","ts-jest":"23.10.5","ts-node":"8.0.2","tslint":"5.12.1","typescript":"3.3.3"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-service.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-service/issues"},"homepage":"https://github.com/carnesen/bitcoin-service#readme","license":"MIT","gitHead":"c6feb99686a2a66da2f8996fac689905ef234e42","_id":"@carnesen/bitcoin-service@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-x3ht19fkLI42wHjNTphJtLRxBYqegjZYOUtJZ3sC50aK35aPnNUgzxv0zVJKh5sm4L9Ogjw0KsFLOqDii4xttQ==","shasum":"c9238bc5d38d083e7a6e4652745a723b8304dcf4","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-service/-/bitcoin-service-0.0.0.tgz","fileCount":48,"unpackedSize":31091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYQ1FCRA9TVsSAnZWagAAmFcQAJfhdTLcYg8zyvvg9PeT\nN5CPuRMjlyOaUedDzitkF473bx9jwGWtGsEzehxnlV34geHZ+2bai+enCGai\nhbXIh9cDfg8OtJICnXjg86jpV75Pn+CG/HT2+IRgONHRK8OvUa2Gyv7Vfu0V\nIDfeGjVJNDYI29E9r+HhC29gKUX8sZw0ujNYXyD2KxwvHOJhJ+GwKchAgbmS\nxRtUcW231wR8MVLbLwpulwTw0GPS0LYvrCzLVu15VAobQ6PN+7d+3c0EdvfH\n2G5X5U67LabBaV5fEwasmCOUsDV0pYhTlSAFknpwS/w2D3fBCPpkeHA7s9m9\nEv3XtMh7mT1YMIYqgFefBD7N5nPgW35I7gcgaKEEvd3rGIXdTFgSqL1llGoq\nG4D0afXBuXfGFewDUfPeAIdOB59fYN4k6BtPlhT4PUWqgwfNcSZ0N8tySRiA\n3p7s3q9efhmI8NiQ60+tDMuXJNjQI66/Gv8BwaQhtuSv6Xl8hPtChGcDh8U1\nS3vEtnUuveqAxxBl5JWnWz1ZUJf9s7VMIdG2WcNNs/gbDVt914kAIGdFIdkH\nSPgPZ5oBXg6EAObPF3QMIM3OUXWG1GvOaspiacQa3DiwvbfX7MWYLB5h/E8Z\nW3xORIPMHAP6bWZ82AGVrCD8wd8l5PotdTD6u9E7DWTgTWig0E3+11mySIh0\n+z+P\r\n=rFZe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClOrdpnW/JHRwArsIr3ULHIgTUOMd+uCrtbNTXVZ1B1AiBRrUmJ1uESvNk3CRaLWgAG6OO9XEYYdgVLi+W2CQFoog=="}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-service_0.0.0_1549864260941_0.1573636053606149"},"_hasShrinkwrap":false,"deprecated":"This project has been abandoned"},"0.0.1":{"name":"@carnesen/bitcoin-service","description":"A Node.js library for managing the bitcoin service `bitcoind`","version":"0.0.1","main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"build":"tsc --project tsconfig.build.json","build:clean":"rimraf lib && npm run build","build:watch":"tsc --watch","lint":"tslint --project .","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run test:unit && npm run build","test:unit":"jest --coverage src","test:watch":"npm run test:unit -- --watch","preversion":"npm test && npm run build:clean","postversion":"npm publish"},"dependencies":{"@carnesen/bitcoin-config":"0.0.3","@types/signal-exit":"3.0.0","signal-exit":"3.0.2"},"devDependencies":{"@carnesen/bitcoin-software":"0.0.2","@carnesen/run-and-exit":"0.2.0","@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"24.0.0","@types/node":"10.12.24","@types/tempy":"0.2.0","jest":"24.1.0","rimraf":"2.6.3","tempy":"0.2.1","ts-jest":"23.10.5","ts-node":"8.0.2","tslint":"5.12.1","typescript":"3.3.3"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-service.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-service/issues"},"homepage":"https://github.com/carnesen/bitcoin-service#readme","license":"MIT","gitHead":"a3bef992f26ad1f65d5cc162178ee2931323e79f","_id":"@carnesen/bitcoin-service@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-wIFARWmXbTPx+sMsmY550D+SYSAMrcFYHBscj/zFjQvyIIXlWabS4PumZXFa4FLPZsX1EAMG6bZCnQPjV5SGlg==","shasum":"5edf785e99cbaeabc66a20592b5a4666eb65c234","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-service/-/bitcoin-service-0.0.1.tgz","fileCount":43,"unpackedSize":32116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaPQ6CRA9TVsSAnZWagAAuGgP/Am5ZltOxs9S+2YXc2Mn\nyuVGWMqFHB6xCNjDrMl83ds89Pqx75iL+iuRNFATCIeAY+ai47Zf5aWto2k4\nInW8e3ew0/b5iZwCOlJwBt8dT/iBWsOGxNe8Er/R0btTHd9B+Cs3z/JMazDU\nciBIUfff8KdrKfqrHS/Srbeq50P+2+Om7+xa6By456i1wnQb7BWXSDg7xqqX\nj3Oi8AxXzdjfFtat9Szn9TafONhkeNhA7T4OdHzvm0tFkPuFsXIegu/xyLxE\n0EgbtlMZfB28KoWBWpjKJzKR8kwT2NpOP+IQeA6PK9PNp1uJoSQIRQeGqu+/\n77eYXwmRtlZXn/nKtp1Xn5AT1Owv8IpNe9F9H+rKKtdIxJ4gNJ4kGPzzGhvD\nrmirDmzSenpFQpsR3FDDUR70s30kLv9xo2I1MUz9gCNNoXyCK5hTN+mN7Fxr\nQdVIfkYw1iDMvC8dAnN8aCYDagpnafpVkh2zDzBcgEFVmNycC5T7B6hNMQ0r\ng5JQ0L9xur1vgsLJtvefI69p64+sL6duOhjjFESO7LLiZZWLEf+SDCk8o+wy\n1xnmmFt7PhtylcCpdgqjC0/i/M3JEGI7BjEEgWOn+kURKXWkHGkhz/IEY/oi\nQMBKHae+HNZK7madqoDwmkxadCSTJvQ2ZAa7N22fZxYOx4bL7rNdbhc+A0rU\nAqu4\r\n=+M/8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi3wYkWhOT025R8aASXZG/nDeZza5/fTY6fIYpgPhoZgIhAOD7Z1SegFyXlI4qk6tPnCoYJqAKLkl23v017tpxYrdU"}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-service_0.0.1_1550382137315_0.9121993031595181"},"_hasShrinkwrap":false,"deprecated":"This project has been abandoned"}},"time":{"created":"2019-02-07T22:11:25.565Z","0.0.0-0":"2019-02-07T22:11:25.883Z","modified":"2022-04-04T21:58:33.305Z","0.0.0":"2019-02-11T05:51:01.111Z","0.0.1":"2019-02-17T05:42:17.584Z"},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"description":"A Node.js library for managing the bitcoin service `bitcoind`","homepage":"https://github.com/carnesen/bitcoin-service#readme","repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-service.git"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"bugs":{"url":"https://github.com/carnesen/bitcoin-service/issues"},"license":"MIT","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 >=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 () => {\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<{changed}>`\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<{changed}>`\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<{changed}>`\nStops and starts `bitcoind` as documented above.\n\n### `isServiceRunning(configFilePath): Promise<boolean>`\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","readmeFilename":"readme.md"}