Coder Social home page Coder Social logo

jouir / mining-companion Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 70 KB

The cryptocurrency mining pool companion. Be notified for new blocks, new balance and new payments.

License: The Unlicense

Dockerfile 0.36% Python 97.68% HTML 1.95%
cryptomining flexpool telegram fiat python ethermine

mining-companion's Introduction

mining-companion

Cryptocurrency mining interest has raised recently due to high Ethereum profitability. You can opt for the solo-mining path or use a mining pool to increase your chances to receive block rewards.

mining-companion is able to listen and notify for the following events:

  • new block is mined by the mining pool
  • unpaid balance is updated
  • new payment has been sent by the mining pool

Notifications are sent via Telegram Messenger.

Supported pools

Installation

sudo apt install python3-virtualenv
virtualenv venv
source venv/bin/activate

Pool libraries are loaded at execution time. For example, if you use only "flexpool" mining pool, you don't need to install "ethermine" libraries. Requirements files have been splitted to install only libraries you need.

pip install -r requirements/base.txt
pip install -r requirements/ethermine.txt
pip install -r requirements/flexpool.txt

To install all libraries at once:

pip install -r requirements.txt

Telegram bot

This tutorial explains how to create a Telegram bot. You'll need the chat_id and auth_key for the next section.

Configuration

Configuration file use the JSON format with the following keys:

  • pools: list of mining pools
  • miner: wallet address of the miner
  • currency: symbol of the currency to convert
  • telegram: send notifications with Telegram
    • auth_key: Telegram authentication key for the bot API
    • chat_id: Telegram chat room id (where to send the message)
  • state_file: persist data between runs into this file (default: state.json)

See configuration example.

All options are optional (but the companion would do nothing).

Usage

python3 companion/main.py --help

Contribute

Contributions are welcomed! Feel free to update the code and create a pull-request.

Be sure to lint the code and run tests before:

docker build -t pre-commit .
docker run -it -v $(pwd):/mnt/ --rm pre-commit bash
# cd /mnt/
# pip install -r requirements.txt
# pre-commit run --all-files
# pytest
# exit

mining-companion's People

Contributors

jouir avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mining-companion's Issues

Disable block notifications

Flexpool now discovers 100 blocks a day on average that could be seen as spam.
Block notifications should be disabled by default.
A setting could enable block notifications if needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.