Hydra-Yaci Documentation
Welcome to the Hydra-Yaci documentation! This project enables the use of Hydra protocols in a Yaci DevKit local network, providing a complete solution for testing and developing payment channel applications on Cardano.
π Quick Links
π Overview
Hydra-Yaci is a payment channel application that combines:
- Yaci DevKit: A local Cardano development network
- Hydra Head Protocol: Cardanoβs Layer 2 scaling solution
- Docker: Containerized Hydra nodes for easy deployment
This project provides a complete development environment for building and testing Hydra-based applications locally, with support for:
- Multi-party Hydra heads (Alice, Bob, Carol)
- Automated key generation
- Wallet funding and management
- WebSocket API for real-time interactions
- Monitoring with Prometheus and Grafana
π― Key Features
Developer-Friendly Setup
- Automated prerequisite checking
- One-command setup and initialization
- Docker-based Hydra nodes for cross-platform compatibility
- Comprehensive example scripts
Complete Hydra Integration
- Hydra node Docker integration (v1.2.0)
- Cardano CLI wrappers
- Automated key generation for all participants
- Script publishing utilities
Monitoring & Debugging
- WebSocket debugging support
- Prometheus metrics
- Grafana dashboards
- Hydra TUI (Terminal User Interface)
Example Applications
- Status checking
- Address generation
- Wallet funding
- Head opening/closing
- Payment transactions
ποΈ Project Structure
hydra-yaci/
βββ .github/
β βββ docs/ # Documentation (you are here)
βββ config/
β βββ hydra/ # Hydra protocol parameters
βββ examples/ # Example scripts
β βββ check-yaci.js
β βββ generate-address.js
β βββ fund-from-faucet.js
β βββ open-hydra-head.js
β βββ commit-fund.js
β βββ send-payment.js
β βββ close-head.js
βββ monitoring/ # Monitoring stack
β βββ docker-compose.monitoring.yml
β βββ grafana/
β βββ prometheus/
βββ scripts/ # Automation scripts
β βββ generator-keys.sh
β βββ fund-address.sh
β βββ start-hydra.sh
β βββ stop-hydra.sh
β βββ reset-all.sh
β βββ utils/
βββ package.json # NPM dependencies and scripts
βββ .env.example # Environment configuration template
βββ README.md # Main project README
π§ Technology Stack
- Node.js (v18+): Runtime environment
- Cardano: Blockchain platform
- Hydra Protocol: Layer 2 scaling
- Yaci DevKit: Local development network
- Docker: Containerization
- Lucid Evolution: Cardano library
- WebSocket: Real-time communication
π Prerequisites
Before getting started, ensure you have:
- Node.js >= 18.0.0
- npm >= 9.0.0
- Docker (for Hydra nodes)
- Yaci DevKit
- curl, jq (command-line tools)
See the Installation Guide for detailed setup instructions.
π Learning Path
New to Hydra and Yaci? We recommend following this learning path:
- Start Here: Getting Started Guide
- Understand the basics
- Set up your environment
- Run your first example
- Installation: Installation Guide
- Install prerequisites
- Configure the environment
- Verify your setup
- Configuration: Configuration Guide
- Environment variables
- Network settings
- Participant configuration
- Usage: Usage Guide
- Key generation
- Wallet funding
- Opening Hydra heads
- Sending payments
- Monitoring
- Troubleshooting: Troubleshooting Guide
- Common issues
- Debugging techniques
- FAQ
- API Reference: API Reference
- WebSocket API
- Example scripts
- NPM commands
π€ Contributing
We welcome contributions! Please feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
π License
This project is licensed under the MIT License.
π Acknowledgments
- Cardano Scaling - Hydra protocol
- Yaci DevKit - Local development network
- Lucid Evolution - Cardano library
π Support
- GitHub Issues: Report bugs and request features
- Documentation: Browse guides in this docs folder
- Yaci DevKit Docs: https://devkit.yaci.xyz/
Author: Kushal Acharya :)
Version: 1.0.0