1.0.0 • Published 7 years ago
react-captcha-coinhive v1.0.0
React Coinhive Captcha
React Component for coinhive captcha, mine cryptocurrency when you want to verify your users are not bots.
This uses Coin-Hive to mine Monero (XMR).
Installation
npm install --save react-coinhive-captchaUsage
// Anywhere in your app as long as it gets mounted
<CoinhiveCaptcha siteKey='EiQYufg9i1OKaZ8mSoSZrjui9ahcbfjG' onComplete={() => console.log('mining completed')} />Props
siteKey: Your Coin-Hive Site Key.userName: If used, the miner will be created withCoinHive.User(siteKey, userName). By default the miner is created withCoinHive.Anonymous(siteKey).threads: The number of threads the miner should start with. Default is2.maxHash: The number of maximum hash the miner should mine. Default is1024.throttle: The fraction of time that threads should be idle. Default is0.onComplete: A function that is called when theminerinstance is completed.
Disclaimer
I have nothing to do with coin-hive.com
1.0.0
7 years ago