{"id":17382201,"url":"https://github.com/sagivo/accept-bitcoin","last_synced_at":"2026-03-13T09:32:37.115Z","repository":{"id":18641835,"uuid":"21848402","full_name":"sagivo/accept-bitcoin","owner":"sagivo","description":"Accept bitcoin payments using Node.js","archived":false,"fork":false,"pushed_at":"2017-04-17T00:41:33.000Z","size":17042,"stargazers_count":162,"open_issues_count":8,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-23T09:51:31.717Z","etag":null,"topics":["bitcoin","coffeescript","nodejs"],"latest_commit_sha":null,"homepage":"http://bit.ly/accept-bitcoin","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sagivo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-07-15T06:05:04.000Z","updated_at":"2025-08-15T16:06:16.000Z","dependencies_parsed_at":"2022-09-15T01:21:34.885Z","dependency_job_id":null,"html_url":"https://github.com/sagivo/accept-bitcoin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sagivo/accept-bitcoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagivo%2Faccept-bitcoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagivo%2Faccept-bitcoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagivo%2Faccept-bitcoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagivo%2Faccept-bitcoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagivo","download_url":"https://codeload.github.com/sagivo/accept-bitcoin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagivo%2Faccept-bitcoin/sbom","scorecard":{"id":795147,"data":{"date":"2025-08-11","repo":{"name":"github.com/sagivo/accept-bitcoin","commit":"be932d06bf1fa9c00ec5c0c725732b80e18b23b9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 3/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T08:44:02.323Z","repository_id":18641835,"created_at":"2025-08-23T08:44:02.323Z","updated_at":"2025-08-23T08:44:02.323Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30464701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T06:34:02.089Z","status":"ssl_error","status_checked_at":"2026-03-13T06:33:49.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","coffeescript","nodejs"],"created_at":"2024-10-16T07:35:47.830Z","updated_at":"2026-03-13T09:32:37.094Z","avatar_url":"https://github.com/sagivo.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accept Bitcoin ![accept-bitcoin](https://en.bitcoin.it/w/images/en/7/74/BC_Rnd_64px.png)\n\nFinally a developer-friendly tool to simply accept bitcoins in your site. \n\n  - Lite and fast, built on top of [bitcore](http://bitcore.io).\n  - No need to install local bitcoin node RPC client. We use [blockr](http://blockr.io) API instead.\n  - No need to install any wallet client. \n  - Create ad-hoc address to accept bitcoins and transfer incomes to your offline account.\n  - Easy configurations.\n\n## Get Started\n\nSimply install via [npm](https://npmjs.org/):\n\n```javascript\nnpm install accept-bitcoin\n```\nLoad AC and you're ready to go!\n```javascript\nvar acceptBitcoin = require('accept-bitcoin');\nvar ac = new acceptBitcoin('YOUR_BITCOIN_ADDRESS');\n```\n\n## Motivation \nAccepting bitcoins online can be complex to program and require you to install a bitcoin RPC client in order to read and write to the blockchain. This client require a lot of resources (in terms of CPU, networking and storage).  \nMost of the users are using a wallet to store their bitcoins. This wallet is a simple way to secure your public and private key. For security reasons you better save this wallet offline in a \"cold storage\".  \nMore about the motivation behind this project at [my blog post](http://sagivo.com/post/97125970778/bitcoin-on-node-js-do-it-yourself).\n\n## Example\nYou can override the default settings on creating\n\nExamples are provided [here](https://github.com/sagivo/accept-bitcoin/tree/master/examples)\n```javascript\nvar settings = {network: 'live'}\nvar acceptBitcoin = require('accept-bitcoin');\nvar ac = new acceptBitcoin('YOUR_BITCOIN_ADDRESS', settings);\nkey = ac.generateAddress({alertWhenHasBalance: true});\nconsole.log(\"Hello buyer! please pay to: \" + key.address());\nkey.on('hasBalance', function(amount){\n  console.log(\"thanks for paying me \" + amount); //do stuff\n  key.transferBalanceToMyAccount(function(err, d){\n    if (d.status === 'success') console.log(\"Cool, the bitcoins are in my private account!\");\n  });\n});\n```\n\n## Settings\n\nYou can override the default settings:  \n\n| name                    | type   | default value                | comment                                                                                                                                                                 |\n|-------------------------|--------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `payToAddress`          | string | -                            | Your bitcoin adress you wish to transfer incomes to.                                                                                                                    |\n| `network`               | string | test                         | choose your bitcoin RPC env. values are: `test` and `live`more info [here](https://github.com/bitpay/bitcore/blob/cd353ac02e76fb3294c40366d8d5dc04ce1939d7/networks.js) |\n| `password`              | string | -                            | choose your random password to encrypt generated keys.                                                                                                                  |\n| `storePath`             | string | `./keys.txt`                 | path to store a file containing all the ad-hoc generated keys.                                                                                                          |\n| `encryptPrivateKey`     | bool   | false                        | in case you want the stored keys to be encrypted (using `password`).                                                                                                    |\n| `payReminderToAddress`  | string | payToAddress                 | In case transfer amount is smaller than income and fees.                                                                                                                |\n| `includeUnconfirmed`    | bool   | false                        | include unconfirmed transactions when checking for unspent incomes                                                                                                      |\n| `checkTransactionEvery` | int    | 1000 * 60 * 2  (2 minutes)   | how often (in millisecond) to ping the network when checking for transactions.                                                                                          |\n| `checkBalanceTimeout`   | int    | 1000 * 60 * 60 * 2 (2 hours) | timeout (in millisecond) when checking balance of an address.                                                                                                           |\n| `checkUnspentTimeout`   | int    | 1000 * 60 * 60 * 2 (2 hours) | timeout (in millisecond) when checking unspent transactions of an address.                                                                                              |\n| `minimumConfirmations`  | int    | 6                            | minimum confirmations needed in order to trigger `hasBalance` event.                                                                                                    |\n| `txFee`                 | float  | 0.0001                       | fee (in bitcoin) for transferring amount from ad hoc address to your address.                                                                                           |\n\n### Key class\nThis class is responsible for creating new bitcoin addresses, storing them and transferring funds between them. Some key functions are:  \n`storeKey(wk)` - store your key in a local file. Can be encrypted.  \n`checkBalance()`- check and notify you when an address has minimum balance.\n`payTo(payToAddress, options, callback)` - transfer all balance of this address to another address.\n\n### Encrypt class\nContains helpers to encrypt and decrypt strings. Used for storing your keys data locally.  \n\n## Contribute\nPlease do. Fork it, star it, share it and add your code to the project. Help others.  \nAll the src code is written in [coffeescript](http://coffeescript.org) and is under `src`. There's a tool that convert it automatically to js each time you change a file and put it under `lib` folder. Simply run `cake build` for that. \n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagivo%2Faccept-bitcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagivo%2Faccept-bitcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagivo%2Faccept-bitcoin/lists"}