hugomd / odin

Bot for tipping sats! ⚡

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Odin ⚡

Odin is a Discord tipping bot. It allows users to deposit and withdraw Bitcoin via the lightning network. Users can tip each other with the Bitcoin they deposit or receive, and can later withdraw to an external lightning wallet.

GIF of Odin being used in a Discord channel

Features

  • Tip users Bitcoin!
  • Withdraw via lightning invoice
  • Deposit via lightning invoice
  • Decode lightning payment requests

Installation

Clone the repository:

git clone git@github.com:hugomd/odin.git

Install dependencies:

npm i

Modify database configuration in src/config/index.js, or set NODE_ENV=production and set the Postgres environment variables defined below.

Create the database and run migrations:

npx sequelize-cli db:create
npx sequelize-cli db:migrate

Start the bot:

npm start

Environment variables

Postgres

  • DB_CONNECTION_URL: eg: postgres://user:pass@example.com:5432/dbname

Lightning

  • LND_IP
  • LND_PORT
  • MACAROON_BASE64

Generate a new macaroon

lncli bakemacaroon invoices:read invoices:write message:read message:write offchain:read offchain:write --save_to odin.macaroon

Convert it to base64:

 xxd -ps -u -c 1000 odin.macaroon

Related projects

License

MIT, see LICENSE.

About

Bot for tipping sats! ⚡

License:MIT License


Languages

Language:JavaScript 98.3%Language:Dockerfile 1.1%Language:Shell 0.6%