This Python script automates the monitoring, and management of DUSK blockchain staking, balances, compounding, epochs and system health. It efficiently handles claiming and restaking rewards, sends notifications via multiple services, and optionally updates the TMUX status bar with real-time information.
NOTE: The Auto Staking of rewards and/or Auto Restakes for reclaiming slashes CAN be disabled via the config.
Dusk wallet for Tips: eox326D2m1ohpBUFVgiF885yV7aN4sg4caA6UkAg7UUhB6JWystDE7t2bdvstBHKTGYrF1oEhYZEd4Bqh4Uhoer
-
Staking Management:
- Monitors staking rewards, reclaimable slashed stakes, and eligible stakes.
- Automatically claims and stakes rewards when profitable.
- Unstakes and restakes reclaimable slashed amounts when optimal.
-
Notification Support:
- Sends alerts via:
- Discord
- Pushbullet
- Telegram
- Pushover
- Webhook
- Sends alerts via:
-
Efficient Execution:
- Calculates sleep times based on epochs to minimize unnecessary processing.
- Prevents redundant or runaway actions.
-
TMUX Integration (Optional):
- Updates the TMUX status bar with real-time staking and balance data.
- Python: Version 3.7 or higher
-
Clone the Repository:
git clone https://github.com/wolfrage76/DuskMan.git cd DuskMan
-
Install Dependencies: Install the required Python libraries:
pip install -r requirements.txt
-
Set Wallet Password: In the same directory as the script:
touch .env chmod 600 .env
This will allow only the file owner to view the file.
-
Edit the file with your editor of choice: For example using nano:
nano .env
-
Add the following line: Replace WALLETPASSWORD with your password:
WALLET_PASSWORD=WALLETPASSWORD
-
Configure Settings: Rename config.yaml.example to config.yaml
mv config.yaml.example config.yaml
-
Edit config.yaml: Using nano as an example, edit then save your changes:
nano config.yaml
-
Run the Script in Foreground:
python dusk_manager.py
-
Or Run script in the background:
screen -dmS duskman python dusk_manager.py
-
Or run as a service: Instructions coming later
To enable notifications for specific services, provide the required credentials in the config
dictionary. Notifications will only be sent for properly configured services. Setting a value to None
disables that notification.
Service | Required Configuration Fields |
---|---|
Discord | discord_webhook |
Pushbullet | pushbullet_token |
Telegram | telegram_bot_token , telegram_chat_id |
Pushover | pushover_user_key , pushover_app_token |
Webhook | webhook_url |
-
Epoch Calculation:
The script calculates sleep times based on the remaining blocks until the next epoch, ensuring efficient execution. -
Minimum Rewards:
The script only claims and stakes rewards if they exceed a configurable threshold (default:1 DUSK
). -
TMUX Integration:
Displays real-time blockchain and balance data directly in the TMUX status bar if enabled.