{"id":13772825,"url":"https://github.com/freewil/node-bitcoin","last_synced_at":"2025-05-11T05:33:37.427Z","repository":{"id":3671924,"uuid":"4741157","full_name":"freewil/node-bitcoin","owner":"freewil","description":"UNMAINTAINED - See: https://github.com/ruimarinho/bitcoin-core - Communicate with bitcoind via JSON-RPC","archived":true,"fork":true,"pushed_at":"2018-05-13T20:35:58.000Z","size":136,"stargazers_count":324,"open_issues_count":2,"forks_count":89,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-21T09:52:58.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jb55/node-bitcoin","license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freewil.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-21T15:59:13.000Z","updated_at":"2024-10-11T22:54:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/freewil/node-bitcoin","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freewil%2Fnode-bitcoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freewil%2Fnode-bitcoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freewil%2Fnode-bitcoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freewil%2Fnode-bitcoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freewil","download_url":"https://codeload.github.com/freewil/node-bitcoin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252623212,"owners_count":21778192,"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-08-03T17:01:08.229Z","updated_at":"2025-05-11T05:33:37.149Z","avatar_url":"https://github.com/freewil.png","language":"JavaScript","readme":"# node-bitcoin\n[![travis][travis-image]][travis-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n[![js-standard-style][standard-image]][standard-url]\n\n[travis-image]: https://travis-ci.org/freewil/node-bitcoin.svg?branch=master\n[travis-url]: https://travis-ci.org/freewil/node-bitcoin\n\n[npm-image]: https://img.shields.io/npm/v/bitcoin.svg?style=flat\n[npm-url]: https://npmjs.org/package/bitcoin\n\n[downloads-image]: https://img.shields.io/npm/dm/bitcoin.svg?style=flat\n[downloads-url]: https://npmjs.org/package/bitcoin\n\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat\n[standard-url]: http://standardjs.com\n\nnode-bitcoin is a simple wrapper for the Bitcoin client's JSON-RPC API.\n\n**Unmaintained, please see [bitcoin-core](https://github.com/ruimarinho/bitcoin-core)**\n\nThe API is equivalent to the API document [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list).\nThe methods are exposed as lower camelcase methods on the `bitcoin.Client`\nobject, or you may call the API directly using the `cmd` method.\n\n## Install\n\n`npm install bitcoin`\n\n## Examples\n\n### Create client\n```js\n// all config options are optional\nvar client = new bitcoin.Client({\n  host: 'localhost',\n  port: 8332,\n  user: 'username',\n  pass: 'password',\n  timeout: 30000\n});\n```\n\n### Get balance across all accounts with minimum confirmations of 6\n\n```js\nclient.getBalance('*', 6, function(err, balance, resHeaders) {\n  if (err) return console.log(err);\n  console.log('Balance:', balance);\n});\n```\n### Getting the balance directly using `cmd`\n\n```js\nclient.cmd('getbalance', '*', 6, function(err, balance, resHeaders){\n  if (err) return console.log(err);\n  console.log('Balance:', balance);\n});\n```\n\n### Batch multiple RPC calls into single HTTP request\n\n```js\nvar batch = [];\nfor (var i = 0; i \u003c 10; ++i) {\n  batch.push({\n    method: 'getnewaddress',\n    params: ['myaccount']\n  });\n}\nclient.cmd(batch, function(err, address, resHeaders) {\n  if (err) return console.log(err);\n  console.log('Address:', address);\n});\n```\n\n## SSL\nSee [Enabling SSL on original client](https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon).\n\nIf you're using this to connect to bitcoind across a network it is highly\nrecommended to enable `ssl`, otherwise an attacker may intercept your RPC credentials\nresulting in theft of your bitcoins.\n\nWhen enabling `ssl` by setting the configuration option to `true`, the `sslStrict`\noption (verifies the server certificate) will also be enabled by default. It is\nhighly recommended to specify the `sslCa` as well, even if your bitcoind has\na certificate signed by an actual CA, to ensure you are connecting\nto your own bitcoind.\n\n```js\nvar client = new bitcoin.Client({\n  host: 'localhost',\n  port: 8332,\n  user: 'username',\n  pass: 'password',\n  ssl: true,\n  sslStrict: true,\n  sslCa: fs.readFileSync(__dirname + '/myca.cert')\n});\n```\n","funding_links":[],"categories":["List of content"],"sub_categories":["RPC"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreewil%2Fnode-bitcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreewil%2Fnode-bitcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreewil%2Fnode-bitcoin/lists"}