WebMiner ๐Ÿš€

Simple Standalone Static Monero Webminer

โœ… Production Ready - All core features implemented and tested
A lightweight, ethical, consent-based Monero webminer that runs entirely in modern browsers. Built as a single JavaScript file with no external dependencies for easy self-hosting and integration.

โœจ Key Features

๐ŸŽฏ Philosophy

WebMiner prioritizes ethical implementation over mining efficiency. Every design decision puts user consent, transparent communication, and maintainable code first. Mining should never happen without explicit user permission, and users should always understand exactly what their browsers are doing.

โš ๏ธ WebSocket-to-Stratum Proxy Required

Important: Most Monero pools use TCP Stratum protocol, which browsers cannot access directly. You need a WebSocket-to-Stratum proxy server to bridge the connection. ๐Ÿ“– Complete Proxy Setup Guide - Includes Node.js proxy server code, Docker deployment, and production configuration.
Browser (WebMiner) --[WebSocket]--> Proxy Server --[TCP Stratum]--> Mining Pool

๐Ÿš€ Quick Integration

Once your proxy is running, integration is simple:
<!-- Development Version (webminer.js) - Full documentation, 89KB -->
<script src="webminer.js" 
        data-pool="wss://your-proxy.example.com"
        data-wallet="YOURMONEROADDRESS"
        data-throttle="0.25">
</script>

<!-- Production Version (webminer.min.js) - Optimized, 54KB -->
<script src="webminer.min.js" 
        data-pool="wss://your-proxy.example.com"
        data-wallet="YOURMONEROADDRESS"
        data-throttle="0.25">
</script>
Or programmatic control:
WebMiner.init({
  pool: 'wss://your-proxy.example.com',
  wallet: 'YOURMONEROADDRESS',
  autoStart: false,
  throttle: 0.25
});

๐Ÿ“ฆ Build Options

| Build | File | Size | Use Case | |-------|------|------|----------| | Development | webminer.js | 89 KB | Development, debugging, customization | | Production | webminer.min.js | 54 KB | Live websites, CDN deployment | Both builds include identical functionality - use development for debugging and production for deployment.

๐Ÿ› ๏ธ Technical Approach

๐Ÿงช Testing the Implementation

All core features are complete! Test the full mining system with consent management and adaptive optimizations:
  • Local Testing:
  •    # Clone and serve locally
       python3 -m http.server 9000
          # Open http://localhost:9000/examples/basic.html
       
  • Try the Demo:
  • - Click "Show Consent Dialog" to test the consent system - Click "Start Mining" to test the complete flow - Observe the persistent mining indicator (now with real mining!) - Test the one-click stop functionality - Try the mining settings dialog for throttle adjustment
  • Run Tests:
  •    # Open the comprehensive test suite
       # http://localhost:9000/tests/test-suite.html
       
  • Integration Testing:
  •    <script src="webminer.js" 
               data-pool="wss://pool.example.com"
               data-wallet="YOURMONEROADDRESS"
               data-throttle="0.25">
       </script>
       
  • Test Optimization Features:
  •    # Open the optimization test suite
       # http://localhost:9000/tests/optimization-tests.html
       # Test performance monitoring, adaptive throttling, mobile optimizations
       
    Note: The implementation includes complete mining functionality with WebAssembly RandomX, pool connections, real hash calculations, and comprehensive optimization features. The system intelligently adapts to device capabilities, protects battery life, and provides mobile-optimized experiences. Ready for production use with real pool URLs and wallet addresses.

    ๐Ÿ“š Documentation

    ๐ŸŒ Static Site Generator

    WebMiner includes a Node.js static site generator that converts markdown documentation to a navigable HTML website with built-in consensual mining UI:
    <h1>Generate HTML site from markdown files</h1>
    node generate-site.js
    
    <h1>Generate with WebMiner integration (optional)</h1>
    node generate-site.js \
      --pool="wss://pool.supportxmr.com:443" \
      --wallet="YOURMONEROADDRESS" \
      --throttle="0.25"
    
    Features: Output: 17 HTML pages + styles.css ready for deployment

    ๐Ÿ“‹ Development Progress

    Milestone 1: Basic Framework โœ…

    Milestone 2: Core Mining โœ…

    Milestone 3: Optimization โœ…

    Milestone 4: Single-File Build โœ…

    Milestone 5: Documentation โœ…

    ๐ŸŽฎ Use Cases

    ๐Ÿ”’ Security & Ethics

    ๐Ÿ“š Available Documentation

    ๐Ÿค Contributing

    This project is in early development. Contribution guidelines will be available once the core framework is complete.

    โš–๏ธ License

    License information will be provided with the initial release.

    ๐ŸŽฏ Project Goals - All Achieved โœ…

  • โœ… Single file deployment - 89KB development, 54KB production (including embedded WebAssembly)
  • โœ… Works in 95%+ of browsers - Vanilla ES6+, modern browser support
  • โœ… Consent-first approach - No mining without explicit permission
  • โœ… Configurable resource usage - 10-50% CPU throttling options
  • โœ… Production-ready reliability - Handles network failures gracefully with auto-reconnect
  • โœ… Clear documentation - Developers can integrate in < 5 minutes
  • โœ… Ethical implementation - Transparent about earnings and impact

  • Ready for production use! This project sets a new standard for ethical browser-based cryptocurrency mining.
    Built with ๐Ÿ’œ for the open web