Skip to content
lightning network store
JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs
.gitignore
README.md
example.env
package.json
relay.js
tweet.js

README.md

Make your own Bitcoin-payable Twitter Bot with Lightning Charge!

Create a Wordpress site

Create a store site at https://wordpress.com/ You will need a Business plan to set up a store.

OR, create a free self-hosted Wordpress site with https://wordpress.org

Install WooCommerce and Lightning Payments plugins

The WooCommerce plugin is hosted in Wordpress.

Download the Lightning Payments plugin here: https://github.com/ElementsProject/woocommerce-gateway-lightning

Follow the instructions on the Woocommerce-Gateway repo to add Lightning as a payment option on your WooCommerce site.

Add a Product to your store

Get a Lightning node set up

Set up bitcoind, c-lightning, and lightning-charge. Instructions for all that stuff here: https://github.com/ElementsProject/lightning-charge#getting-started

Set up a Twitter bot

Create a Twitter account

Go through the usual account creation process. You will need to add a mobile number to use the API. Go to https://apps.twitter.com/. Create a new app, and copy the API keys.

Set up the Lightning-Twitter relay

That's this repository here.

git clone https://github.com/elaineo/lightningbot
cd lightningbot
npm install

Add Twitter API keys to environment variables in the .env file.

Run the relay:

npm run start 

Connect your WooCommerce payments to the Twitter bot

Create two new webhooks: One for order creation, and one for order updates.

Fill in your own server URL in the webhooks. The endpoints should go to /create and /update. Make sure the port number matches the one set in .env.

That's it! Now people can buy tweets from your bot!

You can’t perform that action at this time.