banner 728x90

My Bitcoin and Monero in the browser

In Mobile Web Development 108 views
banner 728x90

I recently heard this story from Buenos Aires, where a Starbucks was caught, was caught digging cryptocurrency on client computers trying to connect to use free Wi-Fi. I also recently conducted a Twitter survey with the question of whether people allow sites to exploit cryptocurrency on every page as an alternative to advertising. Most preferred advertising, but it has made people think about new types of advertising models.

All this got me thinking about how a developer can implement Bitcoin (or Ethereum or Monero, etc.) on a web page that uses JavaScript. It is super simple with coin-hive, a tool made for Monero and other cryptocurrency mines!

Note: I absolutely disagree with the idea that you have to mine my cryptocurrency on a visitor machine without their knowledge. This is a breach of trust, a discharge of their battery, a possible increase in their energy costs, etc.

CoinHive is a service, so you must sign up for an account. You can view their conditions as you wish. Next you want the package with the beehive :

 npm install-g coin-hive 

Now you can mines on your local computer with a short JavaScript snippet:

 const CoinHive = require (& # 39; coin-hive & # 39;);

(async () => ) (); 

This fragment works both in Node.js and in the browser. coin-hive also has command line support. The CoinHive web dashboard gives you a nice summary of what you have generated and earned.

The process is pretty simple, but again, just because it's easy, does not mean that it's something you have to add to your public website without thinking about how you'll address the privacy issues. Also consider that you need a large amount of mining to earn real money.

  •  Write better JavaScript with promises

    Write better JavaScript with promises

    You I have probably heard the conversation about the water cooler about how promises are the future. They use all the cool children, but you do not see what makes them so special. Can not you just use a callback? What's the problem? In this article we will …

  •  Create a CSS cube

    Create a CSS cube


    CSS cubes really show what CSS has become over the years, evolving from simple color and dimension guidelines to a language that can create deep, creative images. Add animation and you have something very neat. Unfortunately, every tutorial in CSS cube that I have read is a bit …

  •  JavaScript speech recognition

    Speech recognition software is becoming increasingly important; it started (for me) with Siri on iOS, then on Amazon's Echo, then on my new Apple TV, and so on. Speech recognition is so useful for not only our technical superstars, but also for people who want to work both hands …

  •  CSS text Overlap ]

    One of the important functions of CSS is the placing of elements.
    Margin padding top left on the right bottom and z-index are just a few of the most important players in CSS positioning.
    By using the above distance …

<! –


banner 728x90
    Build a user settings store with AWS AppSync
    Build a user settings store with AWS AppSync
    Amazon Cognito Sync is a service that
    Synchronize user settings for Android with AWS AppSync
    Synchronize user settings for Android with AWS AppSync
    Amazon Cognito Sync is a service that
    Script & Style Show: Episode 10: Dojo
    Script & Style Show: Episode 10: Dojo
    In this episode welcome David and Todd

    Leave a reply "My Bitcoin and Monero in the browser"

    Must read×