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

From learning to earning

Jobs that call for the skills explored in this talk.