Git Product home page Git Product logo

lit's Introduction

lit - a lightning node you can run on your pwn

Lit Logo

Under development, not for use with real money.

Installing on Linux

  1. Start by installing Go
  1. Make sure your Go paths are set correctly: the .../go/bin path is in $PATH, $GOROOT is set to .../go/, and $GOPATH is the location of where you want lit to be.

  2. Download the lit project: go get github.com/mit-dci/lit

  3. Run lit:

user@host:~/go/src/github.com/mit-dci/lit$ ./lit -spv my.testnet.node.tld

Folders:

cmd

has some rpc client code to interact with the lit node. Not much there yet

elkrem

a hash-tree for storing log(n) items instead of n

lndc

lightning network data connection -- send encrypted / authenticated messages between nodes

lnutil

some widely used utility functions

portxo

portable utxo format, exchangable between node and base wallet (or between wallets). Should make this into a BIP once it's more stable.

qln

A quick, channel implementation with databases. Doesn't do multihop yet.

sig64

Library to make signatures 64 bytes instead of 71 or 72 or something

watchtower

Unlinkable outsourcing of channel monitoring

uspv

An spv wallet library

Heirarchy of packages

One instance of lit has one litNode (package qln).

LitNodes manage lndc connections to other litnodes, manage all channels, rpc listener, and the ln.db. Litnodes then initialize and contol wallits.

wallit

A litNode can have multiple wallits; each must have different params. For example, there can be a testnet3 wallit, and a regtest wallit. Eventually it might make sense to support a root key per wallit, but right now the litNode gives a rootPrivkey to each wallet on startup. Wallits each have a db file which tracks utxos, addresses, and outpoints to watch for the upper litNode. Wallits do not directly do any network communication. Instead, wallits have one or more chainhooks; a chainhook is an interface that talks to the blockchain.

uspv

One package that implements the chainhook interface is uspv. Uspv deals with headers, wire messages to fullnodes, filters, and all the other mess that is contemporary SPV.

(in theory it shouldn't be too hard to write a package that implements the chainhook interface and talks to some block explorer. Maybe if you ran your own explorer and authed and stuff that'd be OK.)

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.