Build your first app with the HandCash Connect SDK
What if you could add nanopayments to your app with a single API call? This tutorial shows you how by building a real-world Twitch chatbot.
#1about 5 minutes
Understanding the HandCash ecosystem and Duro currency
HandCash provides a single user identity and balance across various apps and games using the Duro currency for nanopayments.
#2about 1 minute
Project overview: Building a Duro faucet for Twitch
The goal is to create a chatbot that automatically sends five Duro to users who post their HandCash handle in a Twitch chat.
#3about 2 minutes
Setting up the HandCash and Twitch developer environments
Register your application on both the HandCash and Twitch developer dashboards to obtain the necessary App ID and Client ID for integration.
#4about 4 minutes
Implementing and testing a basic Twitch chatbot
Start by adapting an example chatbot from the Twitch documentation to connect to your channel and respond to a simple command.
#5about 4 minutes
Integrating the HandCash Connect SDK for payments
Install and initialize the HandCash Connect SDK, then generate a redirection URL to authorize the application and obtain an OAuth token for making payments.
#6about 4 minutes
Coding the payment logic to send Duro from chat
Modify the chatbot's message handler to parse user handles and trigger an asynchronous payment using the HandCash SDK's `pay` method.
#7about 3 minutes
Adding logic to prevent duplicate user payments
Use a JavaScript Set to keep track of handles that have already received a payment, preventing users from draining the faucet's wallet.
Related jobs
Jobs that call for the skills explored in this talk.
WeAreDevelopers LIVE days are changing - get ready to take partStarting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
Algorand Foundation
From Hype to Code: Real Blockchain Use Cases for DevelopersSo you’ve wrapped your head around why blockchain exists . You’re on board with the concepts: decentralization, immutability, and trust-minimized infrastructure. But now comes the real question:
What can you actually build with it?
This post is for d...
Daniel Cranney
The CAMARA Project: How Telcos Collaborating Improves Developer ExperienceEvery industry has friction points, but few have historically been as fragmented for developers as telecommunications. If you’ve ever tried to build something that interacts with mobile networks, you’ve quickly found yourself navigating a maze of dis...
From learning to earning
Jobs that call for the skills explored in this talk.