Giter VIP home page Giter VIP logo

danta's Introduction

Danta - Lightning Network event registration app

Simple lightning event registration rust app, this app connects to a lnd node using gRPC.

Demo

Requirements:

  1. You need Rust version 1.48 or higher to compile.
  2. You need to have LND 0.14.2, ideally v0.15.0-beta

Install

Clone the repository and then create a new .env file based on .env-sample file.

$ git clone https://github.com/grunch/danta.git
$ cd danta
$ cp .env-sample .env

To connect with a lnd node we need to set 3 variables in the .env file .

LND_CERT_FILE: LND node TLS certificate file path, the default is $HOME/.lnd/tls.cert on the lnd node.

LND_MACAROON_FILE: Macaroon file path, the macaroon file contains permission for doing actions on the lnd node, for this app a good choice is to use the invoice.macaroon file, the default is $HOME/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon.

LND_GRPC_HOST: IP address or domain name from the LND node, example: 192.168.0.2.

LND_GRPC_PORT: LND node port to connect, example: 10009.

Database

The data is saved in a sqlite db file named by default data.db, this file is saved on the root directory of the project and can be change just editing the env var DATABASE_URL on the .env file.

Before start building we need to initialize the database, for this we need to use diesel_cli:

$ cargo install diesel_cli --no-default-features --features sqlite

Now we can initialize our database:

DATABASE_URL=data.db diesel migration run

This creates data.db in our project file.

Install dependencies

To compile on Ubuntu/Pop!_OS, you need to install some dependencies, run the following commands:

$ sudo apt update
$ sudo apt install -y cmake build-essential libsqlite3-dev pkg-config libssl-dev

Compile and execute it:

$ cargo build --release
$ target/release/danta

Go to http://localhost:8000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.