1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-19 09:54:02 +01:00
eclair/README.md

69 lines
2.7 KiB
Markdown
Raw Normal View History

2016-02-15 14:49:23 +01:00
[![Build Status](https://travis-ci.org/ACINQ/eclair.svg?branch=master)](https://travis-ci.org/ACINQ/eclair)
2015-08-19 13:47:01 +02:00
# eclair
2016-01-21 15:39:56 +01:00
A scala implementation of the Lightning Network. Eclair is french for Lightning.
More precisely, this is an implementation of Rusty's [deployable lightning](https://github.com/ElementsProject/lightning/raw/master/doc/deployable-lightning.pdf). In particular it uses the same wire protocol, and almost the same state machine.
## Overview
2016-01-21 15:40:51 +01:00
The general idea is to have an actor per channel, everything being non-blocking.
2016-01-21 15:39:56 +01:00
A "blockchain watcher" is responsible for monitoring the blockchain, and sending events (eg. when the anchor is spent).
2016-01-21 15:40:51 +01:00
## Modules
* lightning-types: scala code generation using protobuf's compiler (wire protocol)
2016-01-21 15:47:10 +01:00
* eclair-demo: actual implementation
2016-01-21 15:40:51 +01:00
2016-01-21 15:39:56 +01:00
## Usage
2016-02-16 18:03:40 +01:00
Prerequisites:
- A JRE or JDK depending on wether you want to compile yourself or not (preferably > 1.8)
- A running bitcoin-core (testnet or regtest)
Either run from source:
2016-02-16 17:55:10 +01:00
```
mvn exec:java -Dexec.mainClass=fr.acinq.eclair.Boot
```
2016-02-16 18:03:40 +01:00
Or grab the latest released jar and run:
2016-02-16 17:55:10 +01:00
```
2016-02-16 18:03:40 +01:00
java -jar eclair-demo_2.11-*-capsule-fat.jar
2016-02-16 17:55:10 +01:00
```
2016-02-16 18:03:40 +01:00
2016-02-16 17:55:10 +01:00
*See [TESTING.md](TESTING.md) for more details on how to use this software.*
2016-02-16 18:03:40 +01:00
Available jvm options (see `application.conf` for full reference):
```
eclair.server.port (default: 45000)
eclair.http.port (default: 8080)
eclair.bitcoind.rpcuser (default: foo)
eclair.bitcoind.rpcpassword (default: bar)
```
2016-02-16 17:55:10 +01:00
## JSON-RPC API
method | params | description
-------------|-------------------------------------|-----------------------------------------------------------
connect | host, port, anchor_amount | opens a channel with another eclair or lightningd instance
list | | lists existing channels
addhtlc | channel_id, amount, rhash, locktime | sends an htlc
fulfillhtlc | channel_id, r | fulfills an htlc
close | channel_id | closes a channel
2016-02-17 11:57:24 +01:00
help | | displays available methods
2016-01-21 15:39:56 +01:00
## Status
2016-02-15 16:04:07 +01:00
- [X] Network
2016-01-21 15:39:56 +01:00
- [ ] Routing
- [X] Channel state machine
- [X] HTLC Scripts
2016-01-22 10:21:05 +01:00
- [ ] Unilateral close handling
2016-01-21 15:39:56 +01:00
- [ ] Relaying Payment
- [X] Blockchain watcher
2016-01-22 10:21:05 +01:00
- [ ] Storing states in a database
2016-01-21 15:39:56 +01:00
## Ressources
- [1] Lightning Network by Joseph Poon and Thaddeus Dryja ([website](http://lightning.network)), [github repository (golang)](https://github.com/LightningNetwork/lnd)
2016-01-21 15:42:36 +01:00
- [2] Deployable Lightning by Rusty Russel (Blockstream), [github repository (C)](https://github.com/ElementsProject/lightning)
2016-01-21 15:39:56 +01:00
- [3] Thunder Network by Mats Jerratsch (Blockchain.info), [github repository (Java)](https://github.com/matsjj/thundernetwork)