Code Monkey home page Code Monkey logo

lightning-app's Introduction

Lightning Build Status

An easy-to-use cross platform lightning wallet

Screenshot

N.B. This is still early technology and there’s a risk of losing all of your funds. We recommend not putting in more money than you are willing to lose.

Getting Started

The app comes for two threat models:

  1. Pocket Money: prebuilt and signed releases with auto update (recommended for most users).

  2. Tin Foil Hat: if you'd rather build it yourself and do without auto updates, see the instructions below.

Contributing

See the ToDo (next release) column on our project board. Issues that are easy to pick up for outside contributors are labeled help wanted.

Developing Locally

To build the mobile app locally, see the README in the /mobile directory for instructions.

To build the desktop app locally follow the instructions below:

Install lnd

We will use lnd to make GRPC calls from the ReactJS environment

git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
cd $GOPATH/src/github.com/lightningnetwork/lnd
make && make install tags="experimental autopilotrpc"

If you have any issues with this step, make sure to review the Preliniaries to installing LND

Install btcd

We will use btcd as the backend operating mode

git clone https://github.com/btcsuite/btcd $GOPATH/src/github.com/btcsuite/btcd
cd $GOPATH/src/github.com/btcsuite/btcd
GO111MODULE=on go install -v . ./cmd/...

Set up & run

Cloning this git repo git clone https://github.com/lightninglabs/lightning-app and from the project root folder run the following commands:

npm install

npm test

To start the app in development mode (simnet):

npm run electron-dev

Running in development mode can allow you to run in full node mode instead of the default neutrino mode, and will also allow you to run in simnet node for testing. The app will use it's own lnd data/lnd dir and does not share state with other lnd installations on your system. See setup local cluster on how to set up your simnet cluster for development.

Review UI style guide

To build the UI style guide

npm run storybook

Building the Packaged App

To build the packaged version of the app e.g. for macOS run:

cp $GOPATH/bin/lnd ./assets/bin/darwin
npm run electron-pack

The packaged app will then be available in the dist directory. The packaged version of the app will run on Bitcoin mainnet.

Starting the Packaged App (light client)

To run the packaged version of the app e.g. for macOS run:

./dist/mac/Lightning.app/Contents/MacOS/Lightning

The app is configured for mainnet by default but you can opt-in to testnet:

./dist/mac/Lightning.app/Contents/MacOS/Lightning --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=btcd-testnet.lightning.computer --neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json

Starting the Packaged App (full node)

btcd

Start btcd in a separate terminal session and wait until it's fully synced (can take a while):

btcd --txindex --rpcuser=kek --rpcpass=kek

To run the packaged version of the app e.g. for macOS run:

./dist/mac/Lightning.app/Contents/MacOS/Lightning --bitcoin.mainnet --btcd.rpcuser=kek --btcd.rpcpass=kek

bitcoind

Start bitcoind in a separate terminal session and wait until it's fully synced (can take over a day):

bitcoind -txindex=1 -rpcuser=kek -rpcpassword=kek -rpcbind=localhost -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28333

To run the packaged version of the app e.g. for macOS run:

./dist/mac/Lightning.app/Contents/MacOS/Lightning --bitcoin.mainnet --bitcoin.node=bitcoind --bitcoind.rpcuser=kek --bitcoind.rpcpass=kek --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 --bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

Lnd data and logs

Lnd data and logs are written to the following locations in production:

  • Linux: ~/.config/lightning-app/lnd
  • OSX: ~/Library/Application Support/lightning-app/lnd
  • Windows: %USERPROFILE%\AppData\Roaming\lightning-app\lnd

lightning-app's People

Contributors

tanx avatar valentinewallace avatar casesandberg avatar kevinejohn avatar halseth avatar bryanvu avatar roasbeef avatar kaplanmaxe avatar wbobeirne avatar willpiers avatar greenkeeper[bot] avatar brijananand avatar thejourneydude avatar grunch avatar obarat avatar otech47 avatar tmedetbekov avatar arch-wiki avatar bitcoina avatar cheesesnake avatar

Watchers

James Cloos avatar

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.