|
3 | 3 | </br>
|
4 | 4 | Nimiq Tutorial
|
5 | 5 | </h1>
|
| 6 | + |
6 | 7 | <p align="center">
|
7 |
| -Learn how to use the Nimiq Web Client to build awesome apps on top of the <b>Nimiq blockchain</b>. |
| 8 | + <strong>Learn how to build decentralized applications with the Nimiq blockchain using the Web Client</strong> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <em>No downloads, no installations - just JavaScript that connects directly to the blockchain!</em> |
| 13 | +</p> |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | +<a href="https://tutorial.nimiq.dev" target="_blank">Interactive Tutorials</a> |
| 17 | +<a href="https://nimiq.com/developers/web-client" target="_blank">Web Client Documentation</a> |
| 18 | +<a href="https://nimiq.com/developers/" target="_blank">Developer Center</a> |
| 19 | +</p> |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## 🌟 What Makes This Tutorial Special? |
| 24 | + |
| 25 | +- **🔥 Zero Setup Required**: Everything runs in your browser using WebContainer |
| 26 | +- **📚 Beginner-Friendly**: No prior blockchain experience needed |
| 27 | +- **🧪 Hands-On Learning**: Try code examples immediately |
| 28 | +- **🌐 Real Blockchain Interaction**: Connect to the actual Nimiq testnet and mainnet |
| 29 | +- **⚡ Interactive Environment**: Complete file system with terminal access |
| 30 | + |
| 31 | +## 📖 What You'll Learn |
| 32 | + |
| 33 | +By the end of this tutorial, you'll master: |
| 34 | + |
| 35 | +- ✅ **Network Connection**: Connect to Nimiq and read blockchain data |
| 36 | +- ✅ **Wallet Management**: Create wallets and generate addresses |
| 37 | +- ✅ **Transaction Handling**: Send payments and manage funds |
| 38 | +- ✅ **Staking Operations**: Delegate tokens and earn rewards |
| 39 | +- ✅ **Advanced Features**: Work with HTLCs, cashlinks, and more |
| 40 | + |
| 41 | +## 🗺️ Tutorial Structure |
| 42 | + |
| 43 | +### 🎯 **0. Introduction** |
| 44 | + |
| 45 | +- Welcome to Nimiq and blockchain development |
| 46 | +- Understanding the Web Client architecture |
| 47 | +- Setting up your development environment |
| 48 | + |
| 49 | +### 🔌 **1. Connecting to Network** |
| 50 | + |
| 51 | +- Establishing connection to Nimiq network |
| 52 | +- Exploring blockchain data and consensus |
| 53 | +- Understanding network synchronization |
| 54 | + |
| 55 | +### 💰 **2. Working with Transactions** |
| 56 | + |
| 57 | +- Creating and managing wallets |
| 58 | +- Requesting testnet funds from faucet |
| 59 | +- Signing and sending transactions |
| 60 | + |
| 61 | +### 🏆 **3. Staking and Validators** |
| 62 | + |
| 63 | +- Understanding Proof-of-Stake consensus |
| 64 | +- Exploring validator ecosystem |
| 65 | +- Implementing staking operations |
| 66 | + |
| 67 | +### 🔧 **4. Miscellaneous Features** |
| 68 | + |
| 69 | +- Advanced Web Client capabilities |
| 70 | +- Best practices and optimization |
| 71 | +- Real-world application patterns |
| 72 | + |
| 73 | +## 🚀 Getting Started |
| 74 | + |
| 75 | +### Prerequisites |
| 76 | + |
| 77 | +- Node.js (v18 or higher) |
| 78 | +- pnpm (recommended) or npm |
| 79 | +- Modern web browser |
| 80 | + |
| 81 | +### Installation |
| 82 | + |
| 83 | +```bash |
| 84 | +# Clone the repository |
| 85 | +git clone https://github.com/onmax/nimiq-tutorial.git |
| 86 | +cd nimiq-tutorial |
| 87 | + |
| 88 | +# Install dependencies |
| 89 | +pnpm install |
| 90 | + |
| 91 | +# Start development server |
| 92 | +pnpm dev |
| 93 | +``` |
| 94 | + |
| 95 | +### Development Commands |
| 96 | + |
| 97 | +```bash |
| 98 | +# Start development server |
| 99 | +pnpm dev |
| 100 | + |
| 101 | +# Build for production |
| 102 | +pnpm build |
| 103 | + |
| 104 | +# Preview production build |
| 105 | +pnpm preview |
| 106 | + |
| 107 | +# Run linting |
| 108 | +pnpm lint |
| 109 | + |
| 110 | +# Fix linting issues |
| 111 | +pnpm lint:fix |
| 112 | +``` |
| 113 | + |
| 114 | +## 🏗️ Project Structure |
| 115 | + |
| 116 | +``` |
| 117 | +nimiq-tutorial/ |
| 118 | +├── src/ |
| 119 | +│ ├── components/ # Custom UI components |
| 120 | +│ ├── content/ |
| 121 | +│ │ └── tutorial/ # Tutorial content |
| 122 | +│ │ ├── 0-introduction/ |
| 123 | +│ │ ├── 1-connecting-to-network/ |
| 124 | +│ │ ├── 2-working-with-transactions/ |
| 125 | +│ │ ├── 3-staking-and-validators/ |
| 126 | +│ │ └── 4-miscellaneous/ |
| 127 | +│ └── templates/ # Code templates |
| 128 | +├── public/ # Static assets |
| 129 | +├── scripts/ # Build scripts |
| 130 | +└── dist/ # Production build |
| 131 | +``` |
| 132 | + |
| 133 | +## 🛠️ Technology Stack |
| 134 | + |
| 135 | +- **[TutorialKit](https://tutorialkit.dev/)**: Interactive tutorial framework |
| 136 | +- **[Astro](https://astro.build/)**: Static site generator |
| 137 | +- **[Vue 3](https://vuejs.org/)**: Component framework |
| 138 | +- **[TypeScript](https://www.typescriptlang.org/)**: Type-safe JavaScript |
| 139 | +- **[UnoCSS](https://unocss.dev/)**: Atomic CSS engine |
| 140 | +- **[Nimiq Web Client](https://nimiq.dev/)**: Blockchain integration |
| 141 | + |
| 142 | +## 📝 Contributing |
| 143 | + |
| 144 | +We welcome contributions! Here's how you can help: |
| 145 | + |
| 146 | +### 🐛 Reporting Issues |
| 147 | + |
| 148 | +1. Use the "Feedback & Bugs" button in the tutorial |
| 149 | +2. Create detailed issues with: |
| 150 | + - Steps to reproduce |
| 151 | + - Expected vs actual behavior |
| 152 | + - Browser and environment details |
| 153 | + |
| 154 | +### 🔧 Making Changes |
| 155 | + |
| 156 | +1. Fork the repository |
| 157 | +2. Create a feature branch: `git checkout -b feature/your-feature` |
| 158 | +3. Make your changes following our coding standards |
| 159 | +4. Test thoroughly across different browsers |
| 160 | +5. Submit a pull request with a clear description |
| 161 | + |
| 162 | +### 📚 Content Guidelines |
| 163 | + |
| 164 | +When adding or modifying tutorial content: |
| 165 | + |
| 166 | +- **Keep it Simple**: Use clear, jargon-free language |
| 167 | +- **Be Progressive**: Each step builds on the previous |
| 168 | +- **Include Examples**: Provide working code snippets |
| 169 | +- **Test Everything**: Ensure all examples work correctly |
| 170 | +- **Add Comments**: Explain complex code blocks |
| 171 | + |
| 172 | +## 🎯 Learning Objectives |
| 173 | + |
| 174 | +This tutorial is designed to help developers: |
| 175 | + |
| 176 | +- **Understand blockchain fundamentals** without getting lost in complexity |
| 177 | +- **Build real applications** using Nimiq's browser-native approach |
| 178 | +- **Master Web Client APIs** through hands-on practice |
| 179 | +- **Develop best practices** for blockchain development |
| 180 | +- **Create production-ready** decentralized applications |
| 181 | + |
| 182 | +## 🔗 Additional Resources |
| 183 | + |
| 184 | +- **📖 [Official Nimiq Documentation](https://nimiq.dev/)** |
| 185 | +- **🌐 [Nimiq Website](https://nimiq.com/)** |
| 186 | +- **💬 [Telegram](https://t.me/Nimiq/)** |
| 187 | + |
| 188 | +## 📄 License |
| 189 | + |
| 190 | +This project is open source and available under the [MIT License](LICENSE). |
| 191 | + |
| 192 | +--- |
| 193 | + |
| 194 | +<p align="center"> |
| 195 | + <strong>Ready to build your first blockchain app?</strong><br> |
| 196 | + <a href="https://nimiq-tutorial.maximogarciamtnez.workers.dev/">Start the Tutorial →</a> |
| 197 | +</p> |
| 198 | + |
| 199 | +<p align="center"> |
| 200 | + Made with ❤️ by the Nimiq |
8 | 201 | </p>
|
9 |
| -<br/> |
|
0 commit comments