Getting Started
Quick Start
GSwarm is a Telegram monitoring service for Gensyn AI that provides real-time notifications about your blockchain activity. Here's how to get started:
1. Install GSwarm
go install github.com/Deep-Commit/gswarm/cmd/gswarm@latest
2. Run the Service
gswarm
The service will guide you through the setup process interactively.
Basic Usage
Interactive Setup (Default)
When run for the first time, the service will prompt for all necessary configuration:
gswarm
You'll be guided through:
- Telegram Bot Token: Get this from @BotFather on Telegram
- Telegram Chat ID: Your personal chat ID or group chat ID
- EOA Address: Your Ethereum address from the Gensyn dashboard
Command Line Options
Flag | Description | Default | Environment Variable |
---|---|---|---|
--telegram-config-path | Path to telegram-config.json file | telegram-config.json | GSWARM_TELEGRAM_CONFIG_PATH |
--update-telegram-config | Force update of Telegram config via CLI prompts | false | GSWARM_UPDATE_TELEGRAM_CONFIG |
Environment Variables
All flags can be set via environment variables with the GSWARM_
prefix:
export GSWARM_TELEGRAM_CONFIG_PATH=/path/to/config.json
export GSWARM_UPDATE_TELEGRAM_CONFIG=true
gswarm
Telegram Setup
1. Create a Telegram Bot
- Start a chat with @BotFather (opens in a new tab) on Telegram
- Send
/newbot
and follow the instructions - Choose a name for your bot (e.g., "GSwarm Monitor")
- Choose a username (must end with 'bot', e.g., "gswarm_monitor_bot")
- Save the bot token provided by BotFather
2. Get Your Chat ID
- Start a chat with your bot by clicking the link or searching for it
- Send any message to the bot (e.g., "Hello")
- Visit this URL in your browser (replace
YOUR_BOT_TOKEN
with your actual token):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Find your chat ID in the response (look for
"chat":{"id":123456789}
)
3. Get Your EOA Address
- Log into your Gensyn dashboard (opens in a new tab)
- Navigate to your account settings or profile section
- Copy your Ethereum address (EOA) - this is required for monitoring your blockchain activity
Usage Examples
# Start monitoring service (interactive setup)
gswarm
# Use custom config path
gswarm --telegram-config-path /path/to/config.json
# Force update Telegram config
gswarm --update-telegram-config
# Show version
gswarm version
What GSwarm Monitors
The service monitors and notifies you about:
- Vote Changes: When your vote count increases or decreases
- Reward Changes: When your accumulated rewards change
- Balance Changes: When your wallet balance changes
- Peer ID Activity: Monitoring of all peer IDs associated with your EOA address
- Welcome Message: Initial setup confirmation
Sample Notifications
Here's what you'll receive in your Telegram chat:
🚀 G-Swarm Update
📊 Blockchain Data Update
👤 EOA Address: 0x1234567890abcdef...
🔍 Peer IDs Monitored: 4
📈 Total Votes: 1,456 📈
💰 Total Rewards: 0.75 ETH 📈
📋 Per-Peer Breakdown:
🔹 Peer 1: QmZkyXja166VBTMU76xLR17XKAny9kAkFgx4fNpoceQ8LT
📈 Votes: 22
💰 Rewards: 3075
🔹 Peer 2: QmYJeqmiqLNC5cosqE76wZSVdBEHL5Mq9zwFUX61d2fAzn
📈 Votes: 0
💰 Rewards: 0
⏰ Last Check: 2025-06-20 20:05:23
Configuration Files
GSwarm stores configuration locally in the following structure:
~/.gswarm/
├── telegram-config.json # Telegram configuration
└── telegram_previous_data.json # Previous blockchain data
telegram-config.json
This file contains your Telegram bot configuration:
{
"botToken": "your_bot_token_here",
"chatID": 123456789,
"eoaAddress": "0x1234567890abcdef..."
}
Troubleshooting
Common Issues
-
"Bot token invalid"
- Verify your bot token from @BotFather
- Use
--update-telegram-config
to re-enter it
-
"Chat ID not found"
- Make sure you've sent a message to your bot
- Check the getUpdates URL response
- Use
--update-telegram-config
to re-enter it
-
"No notifications received"
- Check that your bot is active
- Verify the chat ID is correct
- Ensure you have blockchain activity to monitor
-
"EOA address not found"
- Get your EOA address from the Gensyn dashboard
- Make sure the address starts with "0x" and is 42 characters long
- Verify the address is correct
-
"No peer IDs found"
- Ensure your EOA address is correct
- Check that you have active peer IDs on the Gensyn network
- The service will automatically detect and monitor all your peer IDs
Next Steps
After setting up GSwarm:
- Monitor your notifications - Check your Telegram for updates
- Customize your setup - See Advanced Usage for more options
- Get help - Check the FAQ for common questions
- Report issues - Use GitHub issues for bug reports
Support
- Documentation: Check the Telegram Monitoring guide for detailed setup
- FAQ: See FAQ for common questions and solutions
- Issues: Report bugs on GitHub
- Community: Join discussions on GitHub