Implements the foundation for a Nostr-based Bisq marketplace bot:
Core Components:
- NostrHandler: Multi-relay connection management with simultaneous subscribe/publish
- BisqClient: Async wrapper around bisq-cli for marketplace queries
- MessageParser: Flexible command parsing with multiple input formats
- Formatter: Response formatting for Nostr publication
- BisqBot: Main orchestration class coordinating all components
Features:
- Multiple relay support (parallel connections)
- Event deduplication across relays
- Async/await architecture for non-blocking operations
- Comprehensive error handling and recovery
- Flexible command syntax (e.g., "USD BUY", "stats", "help")
Configuration:
- Environment-based configuration with sensible defaults
- Support for N relays via comma-separated config
- Bisq daemon connection configuration
Documentation:
- README.md: Complete user guide with installation and usage
- QUICKSTART.md: 10-minute setup guide
- ARCHITECTURE.md: Detailed technical architecture and design
- RELAY_STRATEGY.md: Multi-relay configuration and optimization
Deployment:
- systemd service file for production deployment on Debian
- setup.sh automated installation script
- .env.example configuration template
Phase 1 Status: ✅ COMPLETE
- Core bot skeleton
- Multi-relay support (no relay dependency needed)
- Nostr subscription and publishing
- Bisq query integration
- Basic command parsing and response
53 lines
1.0 KiB
Desktop File
53 lines
1.0 KiB
Desktop File
# systemd service file for Bisq Bot
|
|
# Installation:
|
|
# sudo cp bisq-bot.service /etc/systemd/system/
|
|
# sudo systemctl daemon-reload
|
|
# sudo systemctl enable bisq-bot
|
|
# sudo systemctl start bisq-bot
|
|
#
|
|
# Management:
|
|
# sudo systemctl status bisq-bot
|
|
# sudo systemctl restart bisq-bot
|
|
# journalctl -u bisq-bot -f
|
|
|
|
[Unit]
|
|
Description=Bisq Nostr Bot
|
|
Documentation=https://github.com/bisq-network/bisq-bot
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=bisq
|
|
Group=bisq
|
|
WorkingDirectory=/opt/bisq-bot
|
|
|
|
# Use the virtual environment's Python
|
|
ExecStart=/opt/bisq-bot/venv/bin/python -m src.bot
|
|
|
|
# Environment
|
|
EnvironmentFile=/opt/bisq-bot/.env
|
|
|
|
# Restart on failure
|
|
Restart=on-failure
|
|
RestartSec=30
|
|
|
|
# Resource limits
|
|
MemoryLimit=512M
|
|
CPUQuota=50%
|
|
|
|
# Security options
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/bisq-bot
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=bisq-bot
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|