Rainbow Tasks









🎉 Congratulations! You earned 50 satoshis! 🎉
Rainbow Task Rewards

Rainbow Tasks









🎉 Congratulations! You earned 50 satoshis! 🎉
**How to Use:** 1. **Get a ZBD API Key**: Sign up at https://zbd.dev/ and obtain your API key from the ZBD developer portal. 2. **Replace Placeholders**: - Replace `YOUR_ZBD_API_KEY` with your actual ZBD API key. - Replace `RECIPIENT_LIGHTNING_ADDRESS` with the user's Lightning address (e.g., a ZBD wallet address or another compatible Lightning address). In a real app, you'd prompt the user to input their Lightning address, possibly via an input field. 3. **Secure the API Key**: For production, move the API call to a server-side endpoint (e.g., a Node.js server) to avoid exposing your API key in client-side code. The client would then call your server, which would handle the ZBD API request. 4. **Test the Payment**: Use ZBD's testnet environment (if available) to simulate payments without spending real satoshis. 5. **User Input for Lightning Address**: For a production app, add an input field for users to enter their Lightning address before claiming the reward. **Additional Notes**: - The ZBD API requires the amount in millisatoshis (1 satoshi = 1000 millisatoshis), so we multiply the satoshi amount by 1000. - The `description` field in the API request helps identify the transaction in the ZBD wallet. - For security and scalability, consider implementing rate limiting and user authentication to prevent abuse of the reward system. - Check the ZBD API documentation (https://zbd.dev/) for the latest endpoints and requirements, as APIs may evolve. This updated code maintains the original functionality (checking all tasks to unlock the reward) while adding ZBD integration for real Lightning Network payouts. Let me know if you need help setting up the server-side proxy or adding a user input field for the Lightning address!-->