比特币已经开采量
It's worth noting that Google and ad blockers consider this script as malware, so use with that understanding in mind.
值得注意的是,Google和广告拦截器将此脚本视为恶意软件,因此在使用时应牢记这一点。
I recently heard this story from Buenos Aires where a Starbucks was caught was caught mining cryptocurrency on customer computers that were attempting to connect to free WiFi. I also ran a Twitter poll recently asking if people would allow sites to mine cryptocurrency on each page as an alternative to advertising. Most preferred advertising but it got people thinking about new types of ad models.
我最近从布宜诺斯艾利斯(Buenos Aires)听到了一个故事,在那儿,一名星巴克被捕,当时他们正在试图连接免费WiFi的客户计算机上挖掘加密货币。 我最近还进行了一次Twitter民意测验,询问人们是否允许网站在每个页面上挖掘加密货币,以替代广告。 最喜欢的广告,但它使人们开始思考新型广告模型。
All of this got me thinking about how a developer could implement Bitcoin (or Ethereum or Monero, etc.) mining within a webpage using JavaScript. It's super simple with coin-hive, a utility created for Monero and other cryptocurrency mining!
所有这些使我开始思考开发人员如何使用JavaScript在网页中实现比特币(或以太坊或门罗币等)挖掘。 它是为门罗币和其他加密货币挖矿创建的实用程序coin-hive ,非常简单!
Note: I'm definitely not endorsing the idea that you should mine cryptocurrency on a visitor machine without their knowledge. Doing so is a breach of trust, a drain on their battery, a possible hike on their energy cost, etc.
注意:我绝对不赞成您应该在访客机器不知情的情况下在其机器上挖掘加密货币的想法。 这样做是违反信任,耗尽电池,可能增加能源成本等。
CoinHive is a service so you'll need to sign up for an account. You can explore their terms as you'd like. Next you'll want to get the coin-hive package:
CoinHive是一项服务,因此您需要注册一个帐户。 您可以根据需要探索他们的条款。 接下来,您将要获得coin-hive软件包:
npm install -g coin-hiveNow you can mine on your local machine with a short JavaScript snippet:
现在,您可以使用简短JavaScript代码段在本地计算机上进行挖掘:
const CoinHive = require('coin-hive'); (async () => { // Create miner const miner = await CoinHive('YOUR_COINHIVE_KEY'); // CoinHive's Site Key // Start miner await miner.start(); // Listen on events miner.on('found', () => console.log('Found!')); miner.on('accepted', () => console.log('Accepted!')); miner.on('update', data => console.log(` Hashes per second: ${data.hashesPerSecond} Total hashes: ${data.totalHashes} Accepted hashes: ${data.acceptedHashes} `) ); // Stop miner setTimeout(async () => await miner.stop(), 60000); })();This snippet will work both in Node.js and the browser. coin-hive also has command line support. The CoinHive web dashboard gives you a nice mertrics of what you've generated and earned.
此代码片段将在Node.js和浏览器中均有效。 coin-hive还具有命令行支持。 CoinHive Web仪表板为您提供了您所生成和获得的收益的漂亮指标。
The process is pretty straight-forward, but again, just because it's easy doesn't mean it's something you should add to your public website without a lot of thought about how you'll handle the privacy concerns. Also consider you need hefty volume of mining to earn any real money.
该过程非常简单,但是再次,仅仅是因为它很简单,并不意味着它应该添加到公共网站中,而无需过多考虑如何处理隐私问题。 还请考虑您需要大量的采矿才能赚到任何真钱。
翻译自: https://davidwalsh.name/bitcoin-monero-browser
比特币已经开采量
相关资源:jdk-8u281-windows-x64.exe