Rafa Jimenez

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.

Build your first app with the HandCash Connect SDK
#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.

Featured Partners

Related Articles

View all articles
AF
Algorand Foundation
From Hype to Code: Real Blockchain Use Cases for Developers
So 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...
From Hype to Code: Real Blockchain Use Cases for Developers
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting 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...
WeAreDevelopers LIVE days are changing - get ready to take part
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos

From learning to earning

Jobs that call for the skills explored in this talk.