{"_id":"@carnesen/bitcoin-config-cli","_rev":"3-6c1a6371ee614e044986db7be01a8749","name":"@carnesen/bitcoin-config-cli","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0-0":{"name":"@carnesen/bitcoin-config-cli","description":"A Node.js command-line interface (CLI) for bitcoin server software configuration","version":"0.0.0-0","main":"lib/index.js","types":"lib/index.d.ts","bin":{"bitcoin-config":"lib/cli.js"},"engines":{"node":">=8.0.0"},"scripts":{"build":"tsc --project tsconfig.build.json","build:clean":"rimraf lib && npm run build","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: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-4","@carnesen/cli":"0.2.0","@types/mkdirp":"^0.5.2","mkdirp":"^0.5.1"},"devDependencies":{"@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"23.3.13","@types/node":"10.12.19","@types/tempy":"0.2.0","jest":"24.0.0","tempy":"0.2.1","ts-jest":"23.10.5","ts-node":"8.0.2","tslint":"5.12.1","typescript":"3.2.4"},"license":"MIT","author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-config-cli.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-config-cli/issues"},"homepage":"https://github.com/carnesen/bitcoin-config-cli#readme","gitHead":"73272d05165c0fab0a00a3005aca1f8a1e3a8479","_id":"@carnesen/bitcoin-config-cli@0.0.0-0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-/rZ6R79bYtWTD3xf7d/QrbVZTosfF7t1GBZ/u5QEGkMQWDYQQNTYIMkrQ1QYj0Z8OJ0ow/gMcLFoeLYepu2t0Q==","shasum":"7d9986058170d264a26db2ed13081f3582ba0292","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-config-cli/-/bitcoin-config-cli-0.0.0-0.tgz","fileCount":58,"unpackedSize":25472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUfxnCRA9TVsSAnZWagAAQqgQAKPSlECQObQhwh5+2Jce\nryfz4g5eEi77JjVgnZwSNHJV+C7eC4RNe4Jv+wKomlfC7LBIV0nNRlbV1rL6\nO+4QgDFBlBEU2MH8In6VQzpJ3LfvY9c1eKCNKfPaZYZUP1n+Urp952nPSR06\nAr0WAidxIgSAamPYOTz1EopkwmaYl1Sh6jJlEudfmK2mpTq5Q+HKjOSsOYvW\nVFGjw60aMPwmcGsQxdO1IFlcIi1yhRrvnACMFQoSKiBAwUaC0p/q7t7wgE9Y\nuEBBbPwPaPlvGkbdVS92LwK2VHGxX2vn282RrazKov9FE7y23rr7yVG/kXSI\n+RF1sDIg+z5tEEJ5W9pPiuJLEHdH47+35DyoeMLNc6V5U48V/AceHF9xlDGq\n6/3ojF0DrTUpYRTewGzbn+FP4gZ/7uCspmycSDRX6XGcK1J5Xkvdhx6cmkdT\nQPXnjFarRjnZo1+tOW2m481KHmyac/WVCFvB7J4+dZjisjoZAqZqeVyaxCPZ\nG1AtMM21D7o6lCTsJbDTLqw/hWfm3PHiJN3RSC1RLi/ybDryfT+VR4uWKz23\nJ48/iWe9mm2WnHfskhFNxdRTg2n+GoWZxZh/yU1EQpZMyaMaL9YT7m3n26cb\nhB0WiJnMB4VBgH81qDB39tkXXTEIpWR1SoRUlWNGIPb6MWdjh+RdHqA/ErHV\njztT\r\n=d9f4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkKxSc86qIyCsokEL6V+Z4cju4ldeqUJzqRjbzljmO6gIhAIGEDinoV4ZczHVVM3jCZkWpQGYT321BE6lPE1xR9OpI"}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-config-cli_0.0.0-0_1548876900691_0.7572454925132079"},"_hasShrinkwrap":false},"0.0.0":{"name":"@carnesen/bitcoin-config-cli","description":"A Node.js command-line interface (CLI) for bitcoin server software configuration","version":"0.0.0","main":"lib/index.js","types":"lib/index.d.ts","bin":{"bitcoin-config":"lib/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"build":"tsc --project tsconfig.build.json","build:clean":"rimraf lib && npm run build","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: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.1","@carnesen/cli":"0.3.1"},"devDependencies":{"@carnesen/tsconfig":"0.1.0","@carnesen/tslint-config":"0.1.2","@types/jest":"24.0.0","@types/node":"10.12.24","@types/temp-write":"3.3.0","@types/tempy":"0.2.0","jest":"24.1.0","temp-write":"3.4.0","tempy":"0.2.1","ts-jest":"23.10.5","ts-node":"8.0.2","tslint":"5.12.1","typescript":"3.3.3"},"license":"MIT","author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-config-cli.git"},"bugs":{"url":"https://github.com/carnesen/bitcoin-config-cli/issues"},"homepage":"https://github.com/carnesen/bitcoin-config-cli#readme","gitHead":"49b6dfd135fcd100b2b956217084cde5b6280d55","_id":"@carnesen/bitcoin-config-cli@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"carnesen","email":"chris.arnesen@gmail.com"},"dist":{"integrity":"sha512-9jbrEet+Bs08pfUsDFhwQFuOv3KMtZBjxzMhHoHBkiTzrGp2hsHReT5neSbfY42F/5vjMCy3Y0xsRBKjrHjIoA==","shasum":"8030ceb35d9fcf0519dbe1a5500a70a1b56a23e6","tarball":"https://registry.npmjs.org/@carnesen/bitcoin-config-cli/-/bitcoin-config-cli-0.0.0.tgz","fileCount":68,"unpackedSize":51525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXiW8CRA9TVsSAnZWagAAk8UP/0MjN1xDiPw3QTiXSXZK\nCh6Snf8df1gD1XG+t3j70nZa6T64S55V/Ii8XPR+swCys6KsvaYYlTEyf8NC\nbBS2ZcbriwjVhJ9qYlIg5pRMTs+/V2x2yHbJsQ7MaYbWAmyZPnl1QFCkPJpU\noX0+e41TEYks54zOby2FKeQC3cZPakE+9jWjsuHaxbpqwwvCd6QmIixrj2T/\nqwb7iXgfNzjCEBLYacap+g7XPg8iTkED4tAAi9miuw9MhzkxzWFGy7c/o8wV\nD7DQsnI4MjKINswpQthIKrFP/qOfRxu168nuHpvJVIS05rEYPbk/6fKGeX/N\nERusl21CM5G2ywa6/iw+LJ1J+PBbsH4vj7F2AbZSkzS+16u3KKDMntMzSCCR\npZJmLft/oUDYmkEDsPGTxF0hwvumlxZFw2Cn7+e02gW8wyc97yjlgX2W0XvS\nQmZDnZXN3ST6P5accuHv1JixMDYONPHZv/ohDUZmkHXts2I69KLqFR+uDC2C\naH8sMQcyd7CjJo0Cog/jKuTFZSD+NC4SevEeKEatb6Jn4n7ezHT140a24BuU\nOJeqiXOTeb5MX8tHeY52EEqnKAepscQprdQTJsLzi1ocMlt4MPOTLqDscZQM\nFk7SVvKB/kNY0KK5M2D9thcqo3pVAfHOC/mEsnogY+vZ9NQ9WoTIaSJiKK8s\nGyES\r\n=76OH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEAbc2iy08NiWMRwOcmCdnJ9mgRo6BqnljXUpKJphwLAiAXxRkyFh2JmCh8WzbLhUurpT3GGLro9XIDw1J6+dsRvA=="}]},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin-config-cli_0.0.0_1549673915991_0.7941370561655494"},"_hasShrinkwrap":false,"deprecated":"This project has been abandoned"}},"time":{"created":"2019-01-30T19:35:00.507Z","0.0.0-0":"2019-01-30T19:35:03.299Z","modified":"2022-04-04T21:58:30.204Z","0.0.0":"2019-02-09T00:58:36.139Z"},"maintainers":[{"name":"carnesen","email":"chris.arnesen@gmail.com"}],"description":"A Node.js command-line interface (CLI) for bitcoin server software configuration","homepage":"https://github.com/carnesen/bitcoin-config-cli#readme","repository":{"type":"git","url":"git://github.com/carnesen/bitcoin-config-cli.git"},"author":{"name":"Chris Arnesen","email":"chris.arnesen@gmail.com"},"bugs":{"url":"https://github.com/carnesen/bitcoin-config-cli/issues"},"license":"MIT","readme":"# @carnesen/bitcoin-config-cli [![Build Status](https://travis-ci.com/carnesen/bitcoin-config-cli.svg?branch=master)](https://travis-ci.com/carnesen/bitcoin-config-cli)\nA Node.js command-line interface (CLI) for bitcoin server software configuration\n\n## Install\n```\nnpm install --global @carnesen/bitcoin-config-cli\n```\n^^ This installs this package to your global `node_modules` area. Probably you can now invoke this CLI from anywhere using the command `bitcoin-config`. If not you'll need modify your [`PATH`](https://en.wikipedia.org/wiki/PATH_(variable)).\n\n## Usage\nBy default this CLI reads/writes the default bitcoin configuration file location, e.g. `~/.bitcoin/bitcoin.conf` on Linux.\n\nThe CLI can take a JSON-serialized configuration object and write it as an INI-serialized string as expected by the bitcoin server software:\n```\n$ bitcoin-config write --json '{\"regtest\": true, \"daemon\": true}'\n```\nLet's check the contents of the configuration file:\n```\n$ bitcoin-config read --format ini\n# This is a bitcoin configuration file written using @carnesen/bitcoin-config\n\n# Run this node on its own independent test network.\nregtest=1\n\n# Spawn bitcoin as a background process\ndaemon=1\n```\nLooks good! Now suppose later we want to update a configuration file with a specific value:\n```\n$ bitcoin-config set --acceptnonstdtxn 1\n```\nThe \"set\" command preserves existing values and adds the one(s) specified:\n```\n$ bitcoin-config read\n{ regtest: true, daemon: true, acceptnonstdtxn: true }\n```\nBy now there are a TON of available bitcoin configuration options:\n```\n$ bitcoin-config set --help\nUsage: bitcoin-config set <options>\n\nOptions:\n\n   [--acceptnonstdtxn <str>] : Relay and mine non-standard transactions\n                               Allowed values {'0', '1'}\n   [--addresstype <str>] : p2sh-segwit, legacy, or bech32\n   [--addnode <str0> [...]] : Add a node IP address to attempt to connect to\n   [--addrmantest <str>] : allows you to test address relay locally\n                           Allowed values {'0', '1'}\n   [--alertnotify <str>] : Execute a command when an alert or long fork is received.\n                           \"%s\" in the command string is replaced by the alert message.\n...\n```\n\n## Usage as a library\nIn addition to providing a CLI, this npm package can also be used as a library in conjunction with [`@carnesen/cli`](https://github.com/carnesen/cli/):\n\n```ts\nimport { bitcoinConfig } from '@carnesen/bitcoin-config-cli';\nimport { branch, cli } from '@carnesen/cli';\n\nexport const root = branch({\n  commandName: 'awesome',\n  subcommands: [bitcoinConfig],\n})\n\nif (module === require.main) {\n  cli(root)();\n}\n```\n## Related\n- [@carnesen/bitcoin-config](https://github.com/carnesen/bitcoin-config): Constants, utilities, and TypeScript types for bitcoin server software configuration with Node.js\n- [@carnesen/cli](https://github.com/carnesen/cli): A library for building Node.js command-line interfaces\n\n## License\n\nMIT © [Chris Arnesen](https://www.carnesen.com)\n","readmeFilename":"readme.md"}