Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@marco_ciaramella/cpu-web-miner

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marco_ciaramella/cpu-web-miner

A CPU miner for website monetization

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
212
increased by404.76%
Maintainers
0
Weekly downloads
 
Created
Source

cpu-web-miner

A CPU miner for yespower, yespowerR16, yescrypt, yescryptR8, yescryptR16, yescryptR32, minotaurx and ghostrider POW.

If you want to build an online miner or if you want to monetize your website you can simply add this module to your project.

Install

npm i @marco_ciaramella/cpu-web-miner

Usage

In your frontend add

import * as cpuWebMiner from "@marco_ciaramella/cpu-web-miner";

const stratum = {
    server: "stratum-eu.rplant.xyz",
    port: 17111,
    worker: "a3JWJQqhwQ9cWZssvE9WAjxxv6QWYrgp14",
    password: "x",
    ssl: true  // true when pool uses SSL, false otherwise
}

cpuWebMiner.mine(cpuWebMiner.yespower, stratum, true, cpuWebMiner.ALL_THREADS);

Use a bundler like webpack for using the above code in your html pages.

How it works

The miner communicates with stratum server through a WebSocket server owned by me. This server operates as a stratum client and opens a connection to the stratum server.

Fee

Maintaining the WebSocket server has a cost so it keeps 2% of shares as fee.

How to monetize your website

Crypto mining can be used as a monetization tool. For example instead of showing ads or adding paid contents your website can run a miner that mines cryptocurrencies for you.

WARNING

You should warn the user about the background mining. Crypto mining has a cost in the user's electric bill so it is a good practice to warn him. Warn with an alert or with a message in the website.

Keywords

FAQs

Package last updated on 20 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc