{"id":14980254,"url":"https://github.com/rsbondi/btc-node-pay","last_synced_at":"2026-02-13T22:38:36.168Z","repository":{"id":33220330,"uuid":"153512145","full_name":"rsbondi/btc-node-pay","owner":"rsbondi","description":"lib for receiving bitcoin payments, nodejs, bitcoind node","archived":false,"fork":false,"pushed_at":"2022-12-08T15:12:14.000Z","size":177,"stargazers_count":0,"open_issues_count":7,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T18:38:37.380Z","etag":null,"topics":["bitcoin","bitcoin-payment","bitcoind","nodejs","receive-bitcoin-payments","xpub"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsbondi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-17T19:27:18.000Z","updated_at":"2020-07-30T12:59:24.000Z","dependencies_parsed_at":"2023-01-14T23:57:32.883Z","dependency_job_id":null,"html_url":"https://github.com/rsbondi/btc-node-pay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsbondi%2Fbtc-node-pay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsbondi%2Fbtc-node-pay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsbondi%2Fbtc-node-pay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsbondi%2Fbtc-node-pay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsbondi","download_url":"https://codeload.github.com/rsbondi/btc-node-pay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234419487,"owners_count":18829828,"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":["bitcoin","bitcoin-payment","bitcoind","nodejs","receive-bitcoin-payments","xpub"],"created_at":"2024-09-24T14:01:31.133Z","updated_at":"2025-09-27T12:31:21.841Z","avatar_url":"https://github.com/rsbondi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Overview\n\nWIP - this should be usable, but not tested, testers welcome\n\nThis is a simple class to receive bitcoin payments using xpub.  Addresses are tracked\nand expired addresses are re-used.  Defaults to sqlite but can be used with any db by providing\nproper db class.  You are the payment processor so you process directly in your apps without\nappearing to go to a third party.  Example use case would be to embed a qr code for donations\non a web page but with no address re-use.  An event is raised when a payment is received.\n\nThis is receive only and is not meant to be a complete wallet back end, you use the wallet of \nyour choice and generate an xpub, and use this library to automate generation of addresses for \nreceiving funds in your app.\n\n### Requirements\n\nnodejs and a fully synced bitcoin core node\n\n### Usage\n\n```javascript\nconst Payment = require('btc-node-pay')\nconst network = 'testnet'\nconst xpub = \"xpub...\"\nconst host = '127.0.0.1:18333'\nconst paytrack = new Payment(xpub, host, network)\n\npaytrack.on('payment_received', p =\u003e {\n  // do something meaningful\n})\n\n// expect a pament of 2000 satoshis, use zero for donation of any value\nconst payme = paytrack.getNewAddress(2000, 'p2sh')\n// generate qr code or something\n```\n\n\nsee `example` directory in repository for more usage info\n\nalso, this is based on bcoin, and should work with other forks supported by bcoin but has not been tested\n\nto use for example with litecoin, `const paytrack = new Payment(xpub, host, network, {bcoin: 'lcoin'})`\n\n### Limitations\n\n* At least one block needs to be mined before shutdown to track properly on startup\n* Currently does not handle reorg so you may end up with addresses not used if logged beforehand\n\n### Defining additional database types\n\nThe default database is sqlite.  You can create a simple database class for use with any database by creating the class and implementing the methods.  See the `sqlite.js` file for methods and types.  Methods beginning with underscore do not need to be implemented.\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsbondi%2Fbtc-node-pay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsbondi%2Fbtc-node-pay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsbondi%2Fbtc-node-pay/lists"}