{"_id":"@carnesen/bitcoin-regtest-service","_rev":"2-4382800de81450217b964e2847197cdb","name":"@carnesen/bitcoin-regtest-service","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"@carnesen/bitcoin-regtest-service","description":"A Node.js library for managing a regtest-mode bitcoind service","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 tsconfig.build.json","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","@carnesen/bitcoin-service":"0.0.1","@carnesen/bitcoin-software":"0.0.3"},"devDependencies":{"@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"24.0.5","@types/node":"11.9.4","jest":"24.1.0","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-regtest-service.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-regtest-service/issues"},"homepage":"https://github.com/carnesen/bitcoin-regtest-service","license":"MIT","gitHead":"b24df1a32dd0970737627961ee88cb9e2ebb83c0","_id":"@carnesen/bitcoin-regtest-service@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-C0KO9Bu0OuvDoh8kmAO0eC4wNXICbUOUtuicEyAbIZRLAQ1cEkGxlF+mnfKOpRD9jFrBbbpJUcYj8Pmo/AwAYw==","shasum":"a66908aee5a8e95e1af1177ef4a1a0b6a749f82c","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-regtest-service/-/bitcoin-regtest-service-0.0.0.tgz","fileCount":26,"unpackedSize":17120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaP4fCRA9TVsSAnZWagAAQWUP/1LzWXxp5W/FfgXHyZ+6\nMQXjM+QEPs0/If8GqvNlBGT17Y67bRZdGqDuuQH/GZVkn/dogDpjLL+EpLOD\nUO/GRBtVgYyn8jqgjKc2eXlAVJcpDwFyB7YvO7hTLi0TvK+XWkh0xR9YRR7u\nqef5xO/G7AqZJKiFo0686+re/l46xn2cMgMoXkaUu6hc6ciBdstWhBOJQqsX\nfOz+6IZSfJZ/OvgCiFbdiGlhA5M36DNFoYrfj4h2n2C8EYo91tuYd6BrPJEO\n0QjF5lcS87SpqSMpWt2t5mvDIXkrLwjyCdLCn6jatm+Toph35gYAKNwkJqz0\npb1b3TkljqiBB2H8GCb4r5/nnC6dPGL0rFRiLzH/xhNWMhBcc6hHrqj/TBg6\n5KiIAunmWw1iaSVBZIxiIehUWpHmqIhREv3R51TLrttR9RpyE3+74HfbmJtR\nzaV6aC+ZqjXZIgAVLjArYxCoWf/3tHXo+/UFOG/91laOjsFhcFqJe+dDnIWt\ntE/VIdowbRBUxCVA3mXura2LL0sO+S6JYA0uViOxdpCEzqUEncVv/bZopL6o\n4wjU1BQ3HPqfzix/dXOlscP/5fAlBwrQvllJXaHmapWUhVXrc/Ss4h7rucFk\n6flHv5dcERb9USAnjLyZQGD1FGqdBjdn8MU4Xu7UUFn0sudPdm+gqzgqlN5M\nKx4E\r\n=oncR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG51W3z+TwvUeeLifXSO/XCIRD2fG8vgTzxM8WuqgidTAiEA6jqbxWy7op2EvIq/AjovP6hNaRaRb2sqcKifvYH7vjI="}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-regtest-service_0.0.0_1550384670826_0.4863282295289062"},"_hasShrinkwrap":false,"deprecated":"This project has been abandoned"}},"time":{"created":"2019-02-17T06:24:30.633Z","0.0.0":"2019-02-17T06:24:31.046Z","modified":"2022-04-04T21:58:30.806Z"},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"description":"A Node.js library for managing a regtest-mode bitcoind service","homepage":"https://github.com/carnesen/bitcoin-regtest-service","repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-regtest-service.git"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"bugs":{"url":"https://github.com/carnesen/bitcoin-regtest-service/issues"},"license":"MIT","readme":"# @carnesen/bitcoin-regtest-service  [![npm version](https://badge.fury.io/js/%40carnesen%2Fbitcoin-regtest-service.svg)](https://badge.fury.io/js/%40carnesen%2Fbitcoin-regtest-service) [![Build Status](https://travis-ci.com/carnesen/bitcoin-regtest-service.svg?branch=master)](https://travis-ci.com/carnesen/bitcoin-regtest-service)\n\nA Node.js library for managing a \"regtest\"-mode `bitcoind` service. The package includes runtime JavaScript files suitable for Node.js >=8 as well as the corresponding TypeScript type declarations.\n\n## Usage\n\nThe `RegtestService` class combines features of [`@carnesen/bitcoin-config`](https://github.com/carnesen/bitcoin-config), [`@carnesen/bitcoin-software`](https://github.com/carnesen/bitcoin-software), and [`@carnesen/bitcoin-service`](https://github.com/carnesen/bitcoin-service) into a single easy-to-use object. The `start` method installs the software and writes a config file before spawning the service. A common use case is for unit testing:\n\n```js\nconst { regtestService } = require('@carnesen/bitcoin-regtest-service');\n\ndescribe('A unit test', () => {\n  beforeAll(() => regtest.start(), 30000);\n  // ^^ This method installs the software if it hasn't been already,\n  // which can take upward of 30 seconds depending on bandwidth.\n\n  afterAll(() => regtest.stop());\n\n  it('does the right thing', () => {\n    // Some test that uses the bitcoin regtest service ...\n  })\n})\n```\n## API\n\n### `new RegtestService({datadir?}): instance`\nCreate a new instance of the `RegtestService` class.\n\n#### `datadir`\nOptional `string`. Absolute path of a directory for the service software and its data.\n\n### `instance.start(): Promise<void>`\nInstalls the software if it hasn't been already, writes a configuration file, and starts the `bitcoind` service.\n\n### `instance.stop(): Promise<void>`\nStops the service.\n\n### `instance.restart(): Promise<void>`\nRestarts the service.\n\n### `instance.isRunning(): Promise<boolean>`\nReturns a promise that resolves to `true` if the service is running or `false` if it is not.\n\n### `instance.bitcoinHome`\n`string` getter. Absolute path where the regtest service's software is installed.\n\n### `instance.configFilePath`\n`string` getter. Absolute path of the regtest service's configuration file.\n\n### `instance.rpcHref`\n`string` getter. \"href\" string of the service's remote procedure call (RPC) interface(e.g. `'http://rpcuser:rpcpassword@localhost:48332'`), suitable for parsing using the [WHATWG URL API](https://nodejs.org/api/url.html#url_the_whatwg_url_api).\n\n## More information\nCheck out [the tests directory](src/__tests__) for more examples of how to use this library. If you encounter any bugs or have any questions or feature requests, please don't hesitate to [file an issue](https://github.com/carnesen/bitcoin-regtest-service/issues/new) or [submit a pull request](https://github.com/carnesen/bitcoin-regtest-service/compare) on [this project's repository on GitHub](https://github.com/carnesen/bitcoin-regtest-service).\n\n## Related\n- [@carnesen/bitcoin-config](https://github.com/carnesen/bitcoin-config): A Node.js library for bitcoin server software configuration\n- [@carnesen/bitcoin-service](https://github.com/carnesen/bitcoin-service): A Node.js library for managing the bitcoin service `bitcoind`\n- [@carnesen/bitcoin-software](https://github.com/carnesen/bitcoin-software): A Node.js library for installing bitcoin server software\n\n## License\n\nMIT © [Chris Arnesen](https://www.carnesen.com)\n","readmeFilename":"readme.md"}