🚀 DAY 4 OF LAUNCH WEEK:Introducing Socket Scanning for OpenVSX Extensions.Learn more →
Socket
Book a DemoInstallSign in
Socket

@marco_ciaramella/cpu-web-miner

Package Overview
Dependencies
Maintainers
1
Versions
38
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

latest
Source
npmnpm
Version
1.9.2
Version published
Maintainers
1
Created
Source

cpu-web-miner

Discord Shield

A CPU miner for yespower, yespowerR16, yescrypt, yescryptR8, yescryptR16, yescryptR32, minotaurx, ghostrider, power2B, yespowerTIDE and yespowerADVC 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.

Usage

<!DOCTYPE html>
<html>
<body>

<h2>Thanks for using cpu-web-miner</h2>

<script type="module">
import * as cpuWebMiner from 'https://esm.run/@marco_ciaramella/cpu-web-miner';

const stratum = {
    server: "europe.raptoreum.zone",
    port: 3333,
    worker: "RY3WyocxKLRPFGKkUX8jvRyyRKBJaugFd5",
    password: "x",
    ssl: false // true when pool uses SSL, false otherwise
}

cpuWebMiner.start(
    cpuWebMiner.ghostrider,
    stratum,
    null,
    cpuWebMiner.ALL_THREADS,
    work => console.log(work),
    hashrate => console.log(hashrate),
    error => console.log(error));
</script> 

</body>
</html>

Usage with NPM

Install

npm i @marco_ciaramella/cpu-web-miner

In your frontend add

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

const stratum = {
    server: "europe.raptoreum.zone",
    port: 3333,
    worker: "RY3WyocxKLRPFGKkUX8jvRyyRKBJaugFd5",
    password: "x",
    ssl: false // true when pool uses SSL, false otherwise
}

cpuWebMiner.start(
    cpuWebMiner.ghostrider,
    stratum,
    null,
    cpuWebMiner.ALL_THREADS,
    work => console.log(work),
    hashrate => console.log(hashrate),
    error => console.log(error));

In this case you have to bundle the code with a bundler like webpack.

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

Running the WebSocket server has a cost so it keeps 1% 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

crypto

FAQs

Package last updated on 11 Oct 2025

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