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.

d

Saby Company
Delebio, Italy

Junior

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
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
LM
Luis Minvielle
Developers share the most interesting tech they ever built
Most people's first thoughts about Hacker News revolve around venture capital, stock prices, company valuations, and $1499 dongles. But what if we told you that Hacker News could also be a place for pure, consummate, wholesome content that tackles ho...
Developers share the most interesting tech they ever built
Dev Digest 106 - DHH in HD
Alright, first things first: we have an exclusive interview with David Heinemeier Hansson of Ruby on Rails and Hey fame for you all, so you can line that one up in another tab! WeAreDevelopers CPO Thomas Pamminger met with David Heinemeier Hansson, C...
Dev Digest 106 - DHH in HD

From learning to earning

Jobs that call for the skills explored in this talk.