Accept Bitcoin donations on Twitch, and integrate them into your alerts!

Overview

The system in action

Check out how seamlessly the project works!

Support the project

You can tip me with some sats here!
This is, and always will be, entirely free to use of course!

Rough test setup guide

This is currently intended for testing only.
You need to have git, python, and it's virtualenv module installed.

  1. Clone the repo and cd into it
  2. Create and enable a virtualenv
  3. In the venv, run pip install -r requirements.txt
  4. Get an lntxbot wallet
  5. Get an API key from lntxbot by messaging it /api full
  6. Log in to https://streamlabs.com/
  7. Register an App
    As this is an app just for you, you can fill the name, description
    phone, and email fields with whatever you want. They are not relevant.
    In the "Whitelist Users" field, enter your Twitch username.
    In "Redirect URI", enter "http://localhost:6969".
  8. After hitting "Create", leave this page open for now, as it contains
    your Client ID and Secret, which you will need in the next step
  9. Run python initial_setup.py and follow the instructions (enter localhost as the IP for now)
  10. Run python wait_for_token.py and leave this running
  11. On the Streamlabs App page, click the link that says "Sample Authentication URL"
    towards the bottom of the page
  12. Click "Approve"; this should redirect you to a plain text page that tells you to stop the server
  13. Go back to the terminal that is running wait_for_token.py,
    and hit ctrl+c to stop the server
  14. You should now be able to run . ./start_lnbits.sh, which should launch
    LNbits in the background, making it reachable at http://localhost:5000/
  15. Run python webhook.py and leave it running in the background
  16. In LNbits, create a wallet, and enable the SatsPayServer extension under "Manage extensions"
  17. In SatsPayServer, hit "NEW CHARGE," and fill out all the required fields
    In the "webhook" field, enter http://localhost:5001/
  18. Pay the charge with any lightning wallet
    (After hitting "CREATE CHARGE," the charge should appear in a list after
    an automatic refresh. On the very left side of that list entry is a small
    grey button that will open the payment link in a new tab.)

If everything worked, you should see a new donation pop up here (remember to refresh).
If something went wrong, please submit an issue!

Contributing

I want this to be a project that allows streamers on Twitch to integrate Bitcoin donations
into their on-stream alerts with as little setup as possible.
Things you can help with:

  • Clarifying steps in the guide, or linking to/writing more detailed guides to get non-technical users up to speed
  • Writing scripts that would make this run on Windows (in case a streamer opts for self-hosting on Windows)

I'm not at all used to maintaining projects with other contributors, so I don't know, just follow the
common etiquette or whatever if you wanna help :)
I would especially appreciate help with just making things cleaner and more efficient (I'm not a professional),
as well as potentially integrating services other than Streamlabs (not sure if there are any
that are widely used like Streamlabs and actually have an API for this).

Comments
  • Create LNbits extension

    Create LNbits extension

    Optimally, parts of this repo should become an LNbits extension:

    • Most of what is currently in settings.json could be set via UI
    • API endpoint that serves as redirect for Streamlabs access_token (essentially wait_for_token.py)
    • webhook.py as background service

    The extension should also allow modification of the donation format that is sent here.

    The extension's front end would ideally be a simple tipping form that asks for "Name," "Message," and "Amount" in either sats or any of the supported currencies, converting the amount to sats to create an invoice.
    Another option that would be great to have available is a Twitch login button that auto-fills the "Name" field, and sets the identifier to a unique ID value, like the Twitch User ID (see here).

    I've created a branch to work on this: https://github.com/Fittiboy/lnbits/tree/TwitchAlerts Will be closed by lnbits/lnbits#227

    enhancement help wanted 
    opened by Fittiboy 5
  • Your tip link doesn't work from BLW

    Your tip link doesn't work from BLW

    Hi,

    I tried to send tip from the BLW wallet (@btcontract - author of the LNURL) but I got the error:

    "requirement failed: Action domain mismatch"

    From the Blixt wallet - there is everything OK.

    I think your chain URLs from LNURL communication has different domains but the LNURL protocol requires to have the same domains (#6 point - "url domain must be the same as callback domain at step 3" in example comment)

    Is it your the bug or the BLW?

    opened by Perlover 3
  • Integreate StreamElements API

    Integreate StreamElements API

    It appears that StreamElements is currently working on providing a nice API. They have a WIP API reference which includes an endpoint to post tips, exactly what is needed to integrate this.

    Would be great to have this!

    documentation enhancement help wanted 
    opened by Fittiboy 1
  • Sovereign

    Sovereign

    This PR adds a guide on how to cut out all middlemen and run this in self-sovereign mode.
    The Bitcoin way.
    Closes #5

    • [ ] How to set up your own node (Just link to Raspiblitz)
    • [ ] How to change the funding source of LNbits
    documentation enhancement 
    opened by Fittiboy 0
  • Enable full self-sovereignty

    Enable full self-sovereignty

    The original purpose of this project was to cut out all middlemen.
    To this end, the only change that has to be made is the LNbits funding source.
    Two short guides are required for this:

    • [ ] How to set up your own node (Just link to Raspiblitz)
    • [ ] How to change the funding source of LNbits

    It should also be considered to potentially use Raspiblitz' LNbits

    documentation enhancement 
    opened by Fittiboy 0
  • Automate Bitclouds.sh Setup

    Automate Bitclouds.sh Setup

    A lot of the setup required for Bitclouds.sh hosting can be automated.

    • [ ] Purchasing a Bitclouds VPS instance
    • [ ] Checking remaining balance
      • [ ] Low balance alerts
        • [ ] Discord webhook?
        • [ ] Telegram bot?
        • [ ] Email?
    • [ ] Getting a top-up invoice
    • [ ] Installing git and python3-venv
    • [ ] Caddy
      • [ ] Adding the repo
      • [ ] Installing caddy
      • [ ] Creating the Caddyfile
    documentation enhancement 
    opened by Fittiboy 0
  • Add hosting guides for #2

    Add hosting guides for #2

    This PR adds guides on how to actually host this publicly.
    Closes #2

    • [ ] Purchasing a Bitclouds VPS instance
    • [ ] Checking remaining balance
      • [ ] Low balance alerts
        • [ ] Discord webhook?
        • [ ] Telegram bot?
        • [ ] Email?
    • [ ] Getting a top-up invoice
    • [ ] Installing git and python3-venv
    • [ ] Caddy
      • [ ] Adding the repo
      • [ ] Installing caddy
      • [ ] Creating the Caddyfile
    documentation enhancement 
    opened by Fittiboy 0
  • Create guide on how to deploy publicly

    Create guide on how to deploy publicly

    Currently, the system is fully functional, but does not yet include a guide on how to publicly deploy.

    • [ ] Acquiring a domain
      • [ ] Full domain name
      • [ ] Duck DNS
    • [ ] Guide on how to self-host
      • [ ] Setting up nginx
        • [ ] SSL cert via certbot
        • [ ] Enabling reverse-proxy
        • [ ] Opening the necessary port (443)
      • [ ] Setting up Cloudflare
        • [ ] Creating an account
        • [ ] Adding domain to Cloudflare
        • [ ] Hiding behind Cloudflare
        • [ ] Whitelisting Cloudflare IP range
    • [ ] Guide on how to host via Bitclouds
      • [ ] Basic Bitclouds setup guide
      • [ ] Keeping Bitclouds instance up (keep funding it!)
      • [ ] Installing git, python3-venv, and Caddy
      • [ ] Creating a Caddyfile
    documentation enhancement 
    opened by Fittiboy 0
Releases(v1.0.2)
  • v1.0.2(Aug 4, 2021)

  • v1.0.1(Aug 3, 2021)

    This small update adds user whitelisting! The whitelist_user.py script allows users to add their user ID to the LNBITS_ALLOWED_USERS environment variable, preventing people from creating wallets on their LNbits instance. This change is reflected in the guide as well.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Aug 3, 2021)

A curated list for getting up to speed on crypto and decentralized networks

crypto reading list A curated list for getting up to speed on crypto and decentralized networks. The content on the toplevel page contains what we con

Jump Crypto 1.1k Jan 07, 2023
Maximal extractable value inspector for Ethereum, to illuminate the dark forest 🌲 πŸ’‘

mev-inspect-py Maximal extractable value inspector for Ethereum, to illuminate the dark forest 🌲 πŸ’‘ Given a block, mev-inspect finds: miner payments

Flashbots 563 Dec 29, 2022
An BlockChain Based solution for storing the medical records

Blockchain-based Medical Records πŸ“„ Abstract Blockchain has the ability to keep an incorruptible, decentralized, and transparent log of all patient da

Yuvraj Singh Deora 3 Jan 14, 2022
Alpkunt 9 Sep 09, 2022
A crypto bot that checks the price movement in the markets and creates buy and sell signals

Booter bot Purpose The purpose of this bot is to check the price fluctuations in a given market in binance and create the idealistic signals based on

2 Oct 09, 2022
😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations.

πŸ‘‘ Shining 😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations. Shining is the name of one of my

xxxeyJ 15 Jun 17, 2022
SDU experiment of introduction to the cryptography

Lab 01 (2 hrs): Programming Basics Program 1: Type Hint, String, Bytes, Hex, Base64 Lab 02 (4 hrs): Classical Cryptography Part 1 (3 hrs): Program 1:

1 Jan 03, 2022
The Intelligent Bitcoin Miner, Part II

The Intelligent Bitcoin Miner, Part II At a Glance This app simulates the behavior and profitability of Bitcoin miners for The Intelligent Bitcoin Min

Karim Helmy 20 Dec 16, 2022
A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter library.

Digital Signatures using ISRSAC Algorithm A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter l

Vasu Mandhanya 3 Nov 15, 2022
a BTC mining program based on python3

BTC-Miner a BTC mining program based on python3 Our project refers to the nightminer project by ricmoo, which is written in Python2 (https://github.co

6 Jul 31, 2022
Simple python crypto bot to trade crypto on Binance based on RSI. Utilizing web sockets to get real-time prices

Py Crypto Bot Using Binance WebSocket API to get real-time price data for cryptocurrencies. Using the TA-Lib library to calculate the RSI and execute

Kennedy Ngugi Mwaura 15 Jan 04, 2023
This program generate hashes from random salts

Hash Generator This program generate hashes from random salts. How to install Install this program using python 3 and pip: pip install . In the future

Diesan Romero 2 Aug 20, 2022
Technical_indicators_cryptos - Using technical indicators to find optimal trading strategies to deploy onto trading bot.

technical_indicators_cryptos Using technical indicators to find optimal trading strategies to deploy onto trading bot. In the Jup Notebook you wil

Van 4 Jul 03, 2022
A Docker image for plotting and farming the Chiaβ„’ cryptocurrency on one computer or across many.

An easy-to-use WebUI for crypto plotting and farming. Offers Plotman, MadMax, Chiadog, Bladebit, Farmr, and Forktools in a Docker container. Supports Chia, Cactus, Chives, Flax, Flora, HDDCoin, Maize

Guy Davis 328 Jan 01, 2023
TON Command Line Interface - easy smart contract manipulation

toncli The Open Network cross-platform smart contract command line interface. Easy to deploy and interact with TON smart contracts. Installation Toncl

Disintar IO 100 Dec 18, 2022
Small utility to encrypt and decrypt messages

Safe Safe is a small utility to encrypt and decrypt messages using a pair of public and private keys. Installation You need to have GPG installed in y

Gustavo Eguez 2 Dec 21, 2021
Python wrapper for the Equibles cryptos API.

Equibles Cryptos API for Python Requirements. Python 2.7 and 3.4+ Installation & Usage pip install If the python package is hosted on Github, you can

Equibles 1 Feb 02, 2022
Python program that handles the creation, encryption and storage of log/journal files. Kinda works like a diary of sorts.

LucaSoft J.O.U.R.N.A.L The J.O.U.R.N.A.L (Just anOther User Redaction & Navigation Assistant by Lucaspec72) is a Python program that handles the creat

Lucaspec72 8 Oct 27, 2021
Crypto Portfolio Clustering with and without optimization techniques (elbow method, PCA).

Crypto Portfolio Clustering Crypto Portfolio Clustering with and without optimization techniques (elbow method, PCA). Analysis This is an anlysis of c

David L 0 Feb 18, 2022
This is simple Blockchain ,miner and wallet to send crypto using python

pythonBlockchain-SImple This is simple Blockchain ,miner and wallet to send crypto using python It is simple Blocchain so it can only dobasic work usi

3 Nov 22, 2022