{"id":15023793,"url":"https://github.com/immrmonero/coin-imp","last_synced_at":"2025-10-11T09:39:17.670Z","repository":{"id":57202897,"uuid":"116477385","full_name":"immrmonero/coin-imp","owner":"immrmonero","description":"A Simple Miner to Mine Cryptocurrencies using CoinImp in Node.js","archived":false,"fork":false,"pushed_at":"2018-03-07T16:02:44.000Z","size":133,"stargazers_count":61,"open_issues_count":6,"forks_count":28,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-06T05:58:14.020Z","etag":null,"topics":["bitcoin","coinhive","coinhive-miners","coinimp","cryptocurrency","miner-server","mining","mining-pool","monero","monero-mining","pool","puppeteer","stratum"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/coin-imp","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/immrmonero.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":"2018-01-06T11:27:11.000Z","updated_at":"2025-09-08T18:04:11.000Z","dependencies_parsed_at":"2022-09-15T13:22:46.306Z","dependency_job_id":null,"html_url":"https://github.com/immrmonero/coin-imp","commit_stats":null,"previous_names":["jefreesujit/coin-imp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/immrmonero/coin-imp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immrmonero%2Fcoin-imp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immrmonero%2Fcoin-imp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immrmonero%2Fcoin-imp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immrmonero%2Fcoin-imp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immrmonero","download_url":"https://codeload.github.com/immrmonero/coin-imp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immrmonero%2Fcoin-imp/sbom","scorecard":{"id":485899,"data":{"date":"2025-08-11","repo":{"name":"github.com/immrmonero/coin-imp","commit":"83ffc57a6109636c16b71b9357150e3ab278ca1f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"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"}},{"name":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-582f-p4pg-xc74","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-9qj9-36jm-prpv","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-8g7p-74h8-hg48","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-h726-x36v-rx45","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-c2gp-86p4-5935","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-5v72-xg48-5rpm","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:46:58.154Z","repository_id":57202897,"created_at":"2025-08-19T17:46:58.154Z","updated_at":"2025-08-19T17:46:58.154Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006749,"owners_count":26084181,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","coinhive","coinhive-miners","coinimp","cryptocurrency","miner-server","mining","mining-pool","monero","monero-mining","pool","puppeteer","stratum"],"created_at":"2024-09-24T19:59:26.919Z","updated_at":"2025-10-11T09:39:17.635Z","avatar_url":"https://github.com/immrmonero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoinImp\n\nMine cryptocurrencies [Monero (XMR)](https://getmonero.org/) and [Electroneum (ETN)](http://electroneum.com/) using [CoinImp](https://coinimp.com/) from node.js\n\nThis Project is a fork of [CoinHive](https://github.com/cazala/coin-hive), which uses CoinImp instead of CoinHive to mine cryptocurrencies\n\n**New:** Now you can [run this miner on any stratum based pool](https://github.com/immrmonero/coin-imp#faq).\n\n**New:** Now you can [mine Electroneum (ETN)](https://github.com/immrmonero/coin-imp#can-i-mine-other-cryptocurrency-than-monero-xmr).\n\n**Need a proxy?** check [web-socket-proxy](https://github.com/immrmonero/web-socket-proxy).\n\n## Install\n\n```\nnpm install -g coin-imp\n```\n\n## Usage\n\n```js\nconst CoinImp = require('coin-imp');\n\n(async () =\u003e {\n  // Create miner\n  const miner = await CoinImp('7591494ad1e56601bc8358580d567b319753bc773de35ce1f0d53bb8e4b97186'); // CoinImp's Site Key\n\n  // Start miner\n  await miner.start();\n\n  // Listen on events\n  miner.on('found', () =\u003e console.log('Found!'));\n  miner.on('accepted', () =\u003e console.log('Accepted!'));\n  miner.on('update', data =\u003e\n    console.log(`\n    Hashes per second: ${data.hashesPerSecond}\n    Total hashes: ${data.totalHashes}\n    Accepted hashes: ${data.acceptedHashes}\n  `)\n  );\n\n  // Stop miner\n  setTimeout(async () =\u003e await miner.stop(), 60000);\n})();\n```\n\n## CLI\n\nUsage:\n\n```\ncoin-imp 7591494ad1e56601bc8358580d567b319753bc773de35ce1f0d53bb8e4b97186\n```\n\nOptions:\n\n```\n  --interval        Interval between updates (logs)\n  --port            Port for the miner server\n  --host            Host for the miner server\n  --threads         Number of threads for the miner\n  --throttle        The fraction of time that threads should be idle\n  --proxy           Proxy socket 5/4, for example: socks5://127.0.0.1:9050\n  --puppeteer-url   URL where puppeteer will point to, by default is miner server (host:port)\n  --dev-fee         A donation to the developer, the default is 0.001 (0.1%)\n  --pool-host       A custom stratum pool host, it must be used in combination with --pool-port\n  --pool-port       A custom stratum pool port, it must be used in combination with --pool-host\n  --pool-pass       A custom stratum pool password, if not provided the default one is 'x'\n```\n\n## API\n\n* `CoinImp(siteKey[, options])`: Returns a promise of a `Miner` instance. It requires a [CoinImp Site Key](https://coinimp.com/dashboard). The `options` object is optional and may contain the following properties:\n\n  * `interval`: Interval between `update` events in ms. Default is `1000`.\n\n  * `port`: Port for the miner server. Default is `3002`.\n\n  * `host`: Host for the miner server. Default is `localhost`.\n\n  * `threads`: Number of threads. Default is `navigator.hardwareConcurrency` (number of CPU cores).\n\n  * `throttle`: The fraction of time that threads should be idle. Default is `0`.\n\n  * `proxy`: Puppeteer's proxy socket 5/4 (ie: `socks5://cryptominer.now.sh`).\n\n  * `launch`: The options that will be passed to `puppeteer.launch(options)`. See [Puppeteer Docs](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).\n\n  * `pool`: This allows you to use a different pool. It has to be an [Stratum](https://en.bitcoin.it/wiki/Stratum_mining_protocol) based pool. This object must contain the following properties:\n\n    * `host`: The pool's host.\n\n    * `port`: The pool's port.\n\n    * `pass`: The pool's password. If not provided the default one is `\"x\"`.\n\n  * `devFee`: A donation to send to the developer. Default is `0.001` (0.1%).\n\n* `miner.start()`: Connect to the pool and start mining. Returns a promise that will resolve once the miner is started.\n\n* `miner.stop()`: Stop mining and disconnect from the pool. Returns a promise that will resolve once the miner is stopped.\n\n* `miner.kill()`: Stop mining, disconnect from the pool, shutdown the server and close the headless browser. Returns a promise that will resolve once the miner is dead.\n\n* `miner.on(event, callback)`: Specify a callback for an event. The event types are:\n\n  * `update`: Informs `hashesPerSecond`, `totalHashes` and `acceptedHashes`.\n\n  * `open`: The connection to our mining pool was opened. Usually happens shortly after miner.start() was called.\n\n  * `authed`: The miner successfully authed with the mining pool and the siteKey was verified. Usually happens right after open.\n\n  * `close`: The connection to the pool was closed. Usually happens when miner.stop() was called.\n\n  * `error`: An error occured. In case of a connection error, the miner will automatically try to reconnect to the pool.\n\n  * `job`: A new mining job was received from the pool.\n\n  * `found`: A hash meeting the pool's difficulty (currently 256) was found and will be send to the pool.\n\n  * `accepted`: A hash that was sent to the pool was accepted.\n\n\n## Environment Variables\n\nAll the following environment variables can be used to configure the miner from the outside:\n\n* `COINIMP_SITE_KEY`: CoinImp's Site Key\n\n* `COINIMP_INTERVAL`: The interval on which the miner reports an update\n\n* `COINIMP_THREADS`: Number of threads\n\n* `COINIMP_THROTTLE`: The fraction of time that threads should be idle\n\n* `COINIMP_PORT`: The port that will be used to launch the server, and where puppeteer will point to\n\n* `COINIMP_HOST`: The host that will be used to launch the server, and where puppeteer will point to\n\n* `COINIMP_PUPPETEER_URL`: In case you don't want to point puppeteer to the local server, you can use this to make it point somewhere else where the miner is served (ie: `COINIMP_PUPPETEER_URL=https://cryptominer.now.sh`)\n\n* `COINIMP_PROXY`: Puppeteer's proxy socket 5/4 (ie: `COINIMP_PROXY=socks5://cryptominer.now.sh`)\n\n* `COINIMP_DEV_FEE`: A donation to the developer, the default is 0.001 (0.1%).\n\n* `COINIMP_POOL_HOST`: A custom stratum pool host, it must be used in combination with `COINIMP_POOL_PORT`.\n\n* `COINIMP_POOL_PORT`: A custom stratum pool port, it must be used in combination with `COINIMP_POOL_HOST`.\n\n* `COINIMP_POOL_PASS`: A custom stratum pool password, if not provided the default one is 'x'.\n\n\n## FAQ\n\n#### Can I run this on a different pool than CoinImp's?\n\nYes, you can run this on any pool based on the [Stratum Mining Protocol](https://en.bitcoin.it/wiki/Stratum_mining_protocol).\n\n```js\nconst CoinImp = require('coin-imp');\n(async () =\u003e {\n  const miner = await CoinImp('\u003cYOUR-MONERO-ADDRESS\u003e', {\n    pool: {\n      host: 'la01.supportxmr.com',\n      port: 3333,\n      pass: '\u003cYOUR-PASSWORD-FOR-POOL\u003e' // default 'x' if not provided\n    }\n  });\n  await miner.start();\n  miner.on('found', () =\u003e console.log('Found!'));\n  miner.on('accepted', () =\u003e console.log('Accepted!'));\n  miner.on('update', data =\u003e\n    console.log(`\n    Hashes per second: ${data.hashesPerSecond}\n    Total hashes: ${data.totalHashes}\n    Accepted hashes: ${data.acceptedHashes}\n  `)\n  );\n})();\n```\n\nNow your CoinImp miner would be mining on `supportXMR.com` pool, using your monero address.\n\nYou can also do this using the CLI:\n\n```\ncoin-imp \u003cYOUR-MONERO-ADDRESS\u003e --pool-host=la01.supportxmr.com --pool-port=3333 --pool-pass=\u003cYOUR-PASSWORD-FOR-POOL\u003e\n```\n\n\n\n#### Can I mine other cryptocurrency than Monero (XMR)?\n\nYes, you can also mine [Electroneum (ETN)](https://electroneum.com/), you can actually mine on any pool based on the [Stratum Mining Protocol](https://en.bitcoin.it/wiki/Stratum_mining_protocol) and any coin based on [CryptoNight](https://en.bitcoin.it/wiki/CryptoNight).\n\nYou can go get you ETN wallet from [electroneum.com](https://downloads.electroneum.com/offline_paper_electroneum_walletV1.5.html) if you don't have one.\n\n```js\nconst CoinImp = require('coin-imp');\nconst miner = await CoinImp('\u003cYOUR-ELECTRONEUM-ADDRESS\u003e', {\n  pool: {\n    host: 'etn-pool.proxpool.com',\n    port: 3333\n  }\n});\nminer.start();\n```\n\nNow your CoinImp miner would be mining on `etn.proxpool.com` pool, using your electroneum address.\n\nYou can also do this using the CLI:\n\n```\ncoin-imp \u003cYOUR-ELECTRONEUM-ADDRESS\u003e --pool-host=etn-pool.proxpool.com --pool-port=3333\n```\n\n#### Which version of Node.js do I need?\n\nNode v8+\n\n## Troubleshooting\n\n#### I'm having errors on Ubuntu/Debian\n\nInstall these dependencies:\n\n```\nsudo apt-get -y install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libxext6\n```\n\n#### I'm getting an Error: EACCES: permission denied when installing the package\n\nTry installing the package using this:\n\n```\nsudo npm i -g coin-imp --unsafe-perm=true --allow-root\n```\n\n#### An error occured Failed to launch chrome!\n\nTry changing chromium's executable path to `/usr/bin/chromium-browser`, like this:\n\n```js\nconst miner = await CoinImp('site-key', {\n  launch: {\n    executablePath: '/usr/bin/chromium-browser',\n    args: ['--disable-setuid-sandbox', '--no-sandbox']\n  }\n});\n```\n\nThis project is not endorsed by or affiliated with `coinimp.com` in any way.\n\n## Support\n\nThis project is pre-configured for a 0.1% donation. This can be easily toggled off programatically, from the CLI, or via environment variables.\n\n\u003c3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmrmonero%2Fcoin-imp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmrmonero%2Fcoin-imp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmrmonero%2Fcoin-imp/lists"}