Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugomd/odin
Bot for tipping sats! ⚡
https://github.com/hugomd/odin
bitcoin discord lightning
Last synced: about 2 months ago
JSON representation
Bot for tipping sats! ⚡
- Host: GitHub
- URL: https://github.com/hugomd/odin
- Owner: hugomd
- License: mit
- Created: 2020-04-17T06:03:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T00:59:00.000Z (over 2 years ago)
- Last Synced: 2024-04-14T05:54:05.322Z (9 months ago)
- Topics: bitcoin, discord, lightning
- Language: JavaScript
- Size: 1.58 MB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Odin ⚡
Odin is a Discord tipping bot. It allows users to deposit and withdraw Bitcoin via the [lightning network](https://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](./demo.gif)
## Features
* Tip users Bitcoin!
* Withdraw via lightning invoice
* Deposit via lightning invoice
* Decode lightning payment requests## Installation
Clone the repository:
```bash
git clone [email protected]:hugomd/odin.git
```Install dependencies:
```bash
npm i
```Modify database configuration in [`src/config/index.js`](./src/config/index.js), or set `NODE_ENV=production` and set the Postgres environment variables defined below.
Create the database and run migrations:
```bash
npx sequelize-cli db:create
npx sequelize-cli db:migrate
```Start the bot:
```bash
npm start
```### Environment variables
#### Postgres
* `DB_CONNECTION_URL`: eg: `postgres://user:[email protected]:5432/dbname`#### Lightning
* `LND_IP`
* `LND_PORT`
* `MACAROON_BASE64`### Generate a new macaroon
```bash
lncli bakemacaroon invoices:read invoices:write message:read message:write offchain:read offchain:write --save_to odin.macaroon
```Convert it to base64:
```bash
xxd -ps -u -c 1000 odin.macaroon
```## Related projects
* [lnd-invoice](https://github.com/hugomd/lnd-invoice)## License
MIT, see [LICENSE](./LICENSE).