{"id":13576966,"url":"https://github.com/deepwn/deepMiner","last_synced_at":"2025-04-05T09:30:38.748Z","repository":{"id":117137505,"uuid":"106433942","full_name":"deepwn/deepMiner","owner":"deepwn","description":"deepMiner webminer proxy (update for cryptoNight R)","archived":true,"fork":false,"pushed_at":"2019-03-21T01:07:20.000Z","size":3493,"stargazers_count":541,"open_issues_count":0,"forks_count":247,"subscribers_count":62,"default_branch":"master","last_synced_at":"2024-02-15T16:32:57.861Z","etag":null,"topics":["coinhive","cryptonight","deepminer","emscripten","javascript","miner","mining","monero","pool-proxy","wasm","web-mining","webminer","website","xmr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepwn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-10T15:14:02.000Z","updated_at":"2024-01-27T13:38:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"62aa7995-cd69-4cfd-aba1-9b8c4168f60c","html_url":"https://github.com/deepwn/deepMiner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwn%2FdeepMiner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwn%2FdeepMiner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwn%2FdeepMiner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwn%2FdeepMiner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepwn","download_url":"https://codeload.github.com/deepwn/deepMiner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247317914,"owners_count":20919444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coinhive","cryptonight","deepminer","emscripten","javascript","miner","mining","monero","pool-proxy","wasm","web-mining","webminer","website","xmr"],"created_at":"2024-08-01T15:01:16.393Z","updated_at":"2025-04-05T09:30:38.738Z","avatar_url":"https://github.com/deepwn.png","language":"C","readme":"# deepMiner\n\n![logo](https://raw.githubusercontent.com/deepwn/deepMiner/master/.github/banner.png)\n\n* deepMiner (idea like coinhive.js) By evil7@deePwn\n* Working on XMR(Monero) and ETN(Electroneum) personal wallet\n* Eazy way mining in browsers \u0026 Nice payback than Ad-inject\n* Goodbye Coinhive. You opened a new view for Web-Object + Blockchains.\n\n## Supports\n\n![xmr](https://raw.githubusercontent.com/deepwn/deepMiner/master/.github/xmr.png) ![etn](https://raw.githubusercontent.com/deepwn/deepMiner/master/.github/etn.png)![skn](https://raw.githubusercontent.com/deepwn/deepMiner/master/.github/sumokoin.png)\n\n* And All coins who follow `cryptoNight` / `cryptoNight v7 \u0026 v8 / cryptoNight R` \u0026\u0026 pool connect in `JSONRPC2`\n* Some coins used cryptoNote \u003chttps://cryptonote.org/coins/\u003e (example: Monero / Electroneum /Sumokoin / Aeon ...)\n* The whitebook: `cryptoNight.txt` and `cryptoNight.md`. Come from: \u003chttps://cryptonote.org/standards/\u003e\n* Technology: \u003chttps://cryptonote.org/inside/\u003e\n\n## Usage\n\nAdd some javascript and write like this :\n\n```html\n\u003cscript src=\"https://your_domain.com/lib/deepMiner.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var miner = new deepMiner.Init('miner_name');\n    miner.start();\n\u003c/script\u003e\n```\n## Testing notes\n\nAs now say. we only can have 25H/s maybe in the browsers (i7-4GHz/16G-RAM) because the cryptonight R updated.\n\nAnd that's why people called \"hardless to mining\" in browsers.\n\nAnd it's why the Coinhive choose closed too.\n\nBut by the way. If you can have 100USER/24H always online or running a online vedio website with 5k or 1M users and staying over 1h?\n\nMaybe you can get a nice payback more than 1$ every day. (25H/s/day/100Users = 1$ now).\n\nSo as you see. you can just do learn JS something with this repo. Or do another develping with it. Or do build a fee system more than Ad injection.\n\n\n## Development\n\n```bash\ncd deepMiner \u0026\u0026 npm install \u0026\u0026 npm start\n```\n\nall wasm source files in cryptonight-wasm\n\nserver.js for srv side (webSocket\u003c\u003etcpSocket)\n\n```text\nweb/lib/\n       |__ worker.js the worker to create hash job\n       |__ deepMiner.js the main of all should add in web\n       |   (used `npm i -g minify` and running `minify deepMiner.js \u003e deepMiner.min.js` if min file you need) \n       |__ cryptonight.js/.wasm come from emcc building. if in dev you can checking and rebuilding from folder: cryptonight-wasm\n```\n\n## Install\n\n```bash\ncurl https://raw.githubusercontent.com/deepwn/deepMiner/master/install.sh \u003e install.sh\nsudo sh install.sh\n```\n\nlib request: `*nodejs` / `*npm` / `?nginx`\n\nuseful pakages: `forever`\n\nssl support: \u003chttps://certbot.eff.org/\u003e / \u003chttps://acme.sh/\u003e\n\nOS tested on: `ubuntu(debian)`\n\n## API Document (come from Coinhive and have some rebuild on it)\n\n* Not Support ASMJS in this master release\n\nYou can use events in your page, to handling the HTML with mining status.\n\n```javascript\n\u003cscript\u003e\n    // Listen on events\n    miner.on('found', function() { /* Hash found */ })\n    miner.on('accepted', function() { /* Hash accepted */ })\n\n    // Update stats once per second\n    setInterval(function() {\n        var hashesPerSecond = miner.getHashesPerSecond();\n        var totalHashes = miner.getTotalHashes();\n        var acceptedHashes = miner.getAcceptedHashes();\n        console.table({\n            \"hashesPerSecond\":hashesPerSecond,\n            \"totalHashes\":totalHashes,\n            \"acceptedHashes\":acceptedHashes});\n\n        // Output to HTML elements...\n\n    }, 1000);\n\u003c/script\u003e\n```\n\n**new deepMiner.Init( [site, options] )**\n\nsite : New a miner, that you can add a siteID / nameID or some string for Identify.\n\noptions : threads / throttle\n\nE.g.:\n\n```javascript\nvar miner = new deepMiner.Init(document.location.host, {\n    autoThreads: true\n});\nminer.start();\n```\n\n**.start( [mode] )**\n\nmode: deepMiner.IF_EXCLUSIVE_TAB / deepMiner.FORCE_EXCLUSIVE_TAB / deepMiner.FORCE_MULTI_TAB\n\nE.g.:\n\n```javascript\nminer.start(deepMiner.IF_EXCLUSIVE_TAB);\n```\n\n**.stop( )**\n\nStop mining and disconnect from the pool.\n\n**.isRunning( )**\n\nReturns true|false whether the miner is currently running: connected to the pool and has working threads.\n\n**.isMobile( )**\n\nReturns true|false whether the user is using a phone or tablet device. You can use this to only start the miner on laptops and PCs.\n\n**.hasWASMSupport( )**\n\nReturns true|false whether the Browser supports WebAssembly. If WASM is not supported, the miner will automatically use the slower asm.js version. Consider displaying a warning message to the user to update their browser.\n\n**.getNumThreads( )**\n\nReturns the current number of threads. Note that this will report the configured number of threads, even if the miner is not yet started.\n\n**.setNumThreads( numThreads )**\n\nSet the desired number of threads. Min: 1. Typically you shouldn't go any higher than maybe 8 or 16 threads even if your users have all new AMD Threadripper CPUs.\n\n**.getThrottle( )**\n\nReturns the current throttle value.\n\n**.setThrottle( throttle )**\n\nSet the fraction of time that threads should be idle. A value of 0 means no throttling (i.e. full speed), a value of 0.5 means that threads will stay idle 50% of the time, with 0.8 they will stay idle 80% of the time.\n\n**.getHashesPerSecond( )**\n\nReturns the total number of hashes per second for all threads combined. Note that each thread typically updates this only once per second.\n\n**.getTotalHashes( [interpolate] )**\n\nReturns the total number of hashes this miner has solved. Note that this number is typically updated only once per second.\n\n**.getAcceptedHashes( )**\n\nReturns the number of hashes that have been accepted by the pool. Also see the accepted event.\n\n**.on( event, callback(params) { } )**\n\nSpecify a callback for an event.\n\n| event | description |\n| :---: | :--- |\n|optin|The user took action on the opt-in screen (AuthedMine only). The params.status is either \"accepted\" or \"canceled\". See below for an example.|\n|open|The connection to our mining pool was opened. Usually happens shortly after `miner.start()` was called.|\n|authed|The miner successfully authed with the mining pool and the siteKey was verified. Usually happens right after open. In case the miner was constructed with CoinHive.Token, a token name was received from the pool.|\n|close|The connection to the pool was closed. Usually happens when `miner.stop()` was called or the CoinHive.Token miner reached its goal.|\n|error|An error occured. In case of a connection error, the miner will automatically try to reconnect to the pool.|\n|job|A new mining job was received from the pool.|\n|found|A hash meeting the pool's was found and will be send to the pool.|\n|accepted|A hash that was sent to the pool was accepted.|\n\n## WASM sources\n\nAll sources in folder [cryptonight-wasm](https://github.com/deepwn/deepMiner/tree/master/cryptonight-wasm).\n\nYou need install [Emscripten](https://github.com/kripken/emscripten) first, and run `./build.sh` to make this wasm file up.\n\nthe `build.sh` will help you build it and copy the new one to `./web/lib`.\n\n## How to Update\n\nJust cd to `/srv/deepMiner` run `git pull`\n\nDon't forget backup your `config.json` at first.\n\n## Attention\n\nSome VPS's can't find pool's IP. change your VPS's DNS will work.\n\nSSL cert request default is `TRUE`. So use `certbot` or `acme.sh` to quick request a free cert.\n\nOr you can just running in devepment version without nginx using `cd FILE_PATH \u0026\u0026 npm start` or `forever start FILE_PATH/cluster.js`\n\nChoice another pool which you wanna using: \u003chttps://github.com/timekelp/xmr-pool-choice\u003e or online website \u003chttp://www.moneropools.com/\u003e\n\n## License\n\nMIT \u003chttps://raw.githubusercontent.com/deepwn/deepMiner/master/LICENSE\u003e\n\n## Donate (Like this project \u003c3)\n\n(I will add a dev donate session in next version or in the manager web view)\n\nXMR `41ynfGBUDbGJYYzz2jgSPG5mHrHJL4iMXEKh9EX6RfEiM9JuqHP66vuS2tRjYehJ3eRSt7FfoTdeVBfbvZ7Tesu1LKxioRU`\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepwn%2FdeepMiner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepwn%2FdeepMiner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepwn%2FdeepMiner/lists"}