{"id":13429400,"url":"https://github.com/ACINQ/eclair","last_synced_at":"2025-03-16T03:31:35.116Z","repository":{"id":36724232,"uuid":"41030802","full_name":"ACINQ/eclair","owner":"ACINQ","description":"A scala implementation of the Lightning Network.","archived":false,"fork":false,"pushed_at":"2024-10-29T09:49:32.000Z","size":83405,"stargazers_count":1237,"open_issues_count":43,"forks_count":266,"subscribers_count":91,"default_branch":"master","last_synced_at":"2024-10-29T11:52:41.158Z","etag":null,"topics":["bitcoin","blockchain","cryptocurrency","eclair","lightning","lightning-network","payments"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ACINQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-19T11:47:01.000Z","updated_at":"2024-10-29T11:47:32.000Z","dependencies_parsed_at":"2023-09-23T00:44:08.425Z","dependency_job_id":"7a9c79f8-00de-4954-8654-cd7a61f24bc5","html_url":"https://github.com/ACINQ/eclair","commit_stats":{"total_commits":2546,"total_committers":56,"mean_commits":"45.464285714285715","dds":0.7741555380989789,"last_synced_commit":"a710922729844bea24d6b2b4635a931475d7b5a2"},"previous_names":[],"tags_count":96,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ACINQ%2Feclair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ACINQ%2Feclair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ACINQ%2Feclair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ACINQ%2Feclair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ACINQ","download_url":"https://codeload.github.com/ACINQ/eclair/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822312,"owners_count":20353496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","blockchain","cryptocurrency","eclair","lightning","lightning-network","payments"],"created_at":"2024-07-31T02:00:36.385Z","updated_at":"2025-03-16T03:31:35.107Z","avatar_url":"https://github.com/ACINQ.png","language":"Scala","readme":"![Eclair Logo](.readme/logo.png)\n\n[![Build Status](https://github.com/ACINQ/eclair/workflows/Build%20\u0026%20Test/badge.svg)](https://github.com/ACINQ/eclair/actions?query=workflow%3A%22Build+%26+Test%22)\n[![codecov](https://codecov.io/gh/acinq/eclair/branch/master/graph/badge.svg)](https://codecov.io/gh/acinq/eclair)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\n**Eclair** (French for Lightning) is a Scala implementation of the Lightning Network.\n\nThis software follows the [Lightning Network Specifications (BOLTs)](https://github.com/lightning/bolts).\nOther implementations include [core lightning](https://github.com/ElementsProject/lightning), [lnd](https://github.com/LightningNetwork/lnd), [electrum](https://github.com/spesmilo/electrum/), and [ldk](https://github.com/lightningdevkit/rust-lightning).\n\n---\n\n* [Lightning Network Specification Compliance](#lightning-network-specification-compliance)\n* [JSON API](#json-api)\n* [Documentation](#documentation)\n* [Installation](#installation)\n  * [Prerequisite: Bitcoin Core](#prerequisite-bitcoin-core)\n  * [Installing Eclair](#installing-eclair)\n* [Configuration](#configuration)\n  * [Configuration file](#configuration-file)\n  * [Configure Bitcoin Core wallet](#configure-bitcoin-core-wallet)\n  * [Java Environment Variables](#java-environment-variables)\n  * [Logging](#logging)\n  * [Backup](#backup)\n* [Docker](#docker)\n* [Plugins](#plugins)\n* [Testnet usage](#testnet-usage)\n* [Tools](#tools)\n* [Resources](#resources)\n\n---\n\n## Lightning Network Specification Compliance\n\nPlease see the latest [release note](https://github.com/ACINQ/eclair/releases) for detailed information on BOLT compliance.\n\n## JSON API\n\nEclair offers a feature-rich HTTP API that enables application developers to easily integrate.\n\nFor more information please visit the [API documentation website](https://acinq.github.io/eclair).\n\n:rotating_light: Eclair's JSON API should **NOT** be accessible from the outside world (similarly to Bitcoin Core API)\n\n## Documentation\n\nPlease visit our [docs](./docs) folder to find detailed instructions on how to [configure](./docs/Configure.md) your\nnode, connect to other nodes, open channels, send and receive payments, and help with more advanced scenarios.\n\nYou will also find detailed [guides](./docs/Guides.md) and [frequently asked questions](./docs/FAQ.md) there.\n\n## Installation\n\n### Prerequisite: Bitcoin Core\n\nEclair relies on Bitcoin Core to interface with and monitor the blockchain and to manage on-chain funds: Eclair does not include an on-chain wallet, channel opening transactions are funded by your Bitcoin Core node, and channel closing transactions return funds to your Bitcoin Core node.\n\nThis means that instead of re-implementing them, Eclair benefits from the verifications and optimisations (including fee management with RBF/CPFP, ...) that are implemented by Bitcoin Core. Eclair uses our own [bitcoin library](https://github.com/ACINQ/bitcoin-kmp) to verify data provided by Bitcoin Core.\n\n:warning: This also means that Eclair has strong requirements on how your Bitcoin Core node is configured (see below), and that you must back up your Bitcoin Core wallet as well as your Eclair node (see [here](#configure-bitcoin-core-wallet)):\n\n* Eclair needs a _synchronized_, _segwit-ready_, **_zeromq-enabled_**, _wallet-enabled_, _non-pruning_, _tx-indexing_ [Bitcoin Core](https://github.com/bitcoin/bitcoin) node.\n* You must configure your Bitcoin node to use `bech32` or `bech32m` (segwit) addresses. If your wallet has \"non-segwit UTXOs\" (outputs that are neither `p2sh-segwit`, `bech32` or `bech32m`), you must send them to a `bech32` or `bech32m` address before running Eclair.\n* Eclair requires Bitcoin Core 28.1 or higher. If you are upgrading an existing wallet, you may need to create a new address and send all your funds to that address.\n\nRun bitcoind with the following minimal `bitcoin.conf`:\n\n```conf\nserver=1\nrpcuser=foo\nrpcpassword=bar\ntxindex=1\naddresstype=bech32\nchangetype=bech32\nzmqpubhashblock=tcp://127.0.0.1:29000\nzmqpubrawtx=tcp://127.0.0.1:29000\n```\n\nDepending on the actual hardware configuration, it may be useful to provide increased `dbcache` parameter value for faster verification and `rpcworkqueue` parameter value for better handling of API requests on `bitcoind` side.\n\n```conf\n# UTXO database cache size, in MiB\ndbcache=2048\n# Number of allowed pending RPC requests (default is 16)\nrpcworkqueue=128\n\n# How many seconds bitcoin will wait for a complete RPC HTTP request.\n# after the HTTP connection is established.\nrpcclienttimeout=30\n```\n\n### Installing Eclair\n\nEclair is developed in [Scala](https://www.scala-lang.org/), a powerful functional language that runs on the JVM, and is packaged as a ZIP archive.\n\nTo run Eclair, you first need to install Java. Eclair targets Java 21 and will run on any compatible Java runtime, we recommend that you use [OpenJDK 21](https://adoptium.net/temurin/releases/?package=jdk\u0026version=21).\n\nThen download our latest [release](https://github.com/ACINQ/eclair/releases), unzip the archive and run the following command:\n\n```shell\neclair-node-\u003cversion\u003e-\u003ccommit_id\u003e/bin/eclair-node.sh\n```\n\nYou can then control your node via [eclair-cli](./docs/Usage.md) or the [API](./docs/API.md).\n\n:warning: Be careful when following tutorials/guides that may be outdated or incomplete. You must thoroughly read the official eclair documentation before running your own node.\n\n## Configuration\n\n### Configuration file\n\nEclair reads its configuration file, and write its logs, to `~/.eclair` by default.\n\nTo change your node's configuration, create a file named `eclair.conf` in `~/.eclair`. Here's an example configuration file:\n\n```conf\neclair.node-alias=eclair\neclair.node-color=49daaa\n```\n\nHere are some of the most common options:\n\nname                         | description                                                          | default value\n-----------------------------|----------------------------------------------------------------------|--------------\n eclair.chain                | Which blockchain to use: *regtest*, *testnet*, *signet* or *mainnet* | mainnet\n eclair.server.port          | Lightning TCP port                                                   | 9735\n eclair.api.enabled          | Enable/disable the API                                               | false. By default the API is disabled. If you want to enable it, you must set a password.\n eclair.api.port             | API HTTP port                                                        | 8080\n eclair.api.password         | API password (BASIC)                                                 | \"\" (must be set if the API is enabled)\n eclair.bitcoind.rpcuser     | Bitcoin Core RPC user                                                | foo\n eclair.bitcoind.rpcpassword | Bitcoin Core RPC password                                            | bar\n eclair.bitcoind.zmqblock    | Bitcoin Core ZMQ block address                                       | \"tcp://127.0.0.1:29000\"\n eclair.bitcoind.zmqtx       | Bitcoin Core ZMQ tx address                                          | \"tcp://127.0.0.1:29000\"\n eclair.bitcoind.wallet      | Bitcoin Core wallet name                                             | \"\"\n\nQuotes are not required unless the value contains special characters. Full syntax guide [here](https://github.com/lightbend/config/blob/master/HOCON.md).\n\n\u0026rarr; see [here](./docs/Configure.md) for more configuration options.\n\n### Configure Bitcoin Core wallet\n\nEclair will use the default loaded Bitcoin Core wallet to fund any channels you choose to open.\nIf you want to use a different wallet from the default one, you must set `eclair.bitcoind.wallet` accordingly in your `eclair.conf`.\n\n:warning: Once a wallet is configured, you must be very careful if you want to change it: changing the wallet when you have channels open may result in a loss of funds (or a complex recovery procedure).\n\nEclair will return BTC from closed channels to the wallet configured.\nAny BTC found in the wallet can be used to fund the channels you choose to open.\n\nWe also recommend tweaking the following parameters in `bitcoin.conf`:\n\n```conf\n# This parameter ensures that your wallet will not create chains of unconfirmed\n# transactions that would be rejected by other nodes.\nwalletrejectlongchains=1\n# The following parameters set the maximum length of chains of unconfirmed\n# transactions to 20 instead of the default value of 25.\nlimitancestorcount=20\nlimitdescendantcount=20\n```\n\nSetting these parameters lets you unblock long chains of unconfirmed channel funding transactions by using child-pays-for-parent (CPFP) to make them confirm.\n\nWith the default `bitcoind` parameters, if your node created a chain of 25 unconfirmed funding transactions with a low-feerate, you wouldn't be able to use CPFP to raise their fees because your CPFP transaction would likely be rejected by\nthe rest of the network.\n\nYou can also configure Eclair to manage Bitcoin Core's private keys, see our [guides](./docs/Guides.md) for more details.\n\n### Java Environment Variables\n\nSome advanced parameters can be changed with java environment variables. Most users won't need this and can skip this section.\n\nHowever, if you're seeing Java heap size errors, you can try increasing the maximum memory allocated to the JVM with the `-Xmx` parameter.\n\nYou can for example set it to use up to 512 MB (or any value that fits the amount of RAM on your machine) with:\n\n```shell\nexport JAVA_OPTS=-Xmx512m\n```\n\n:warning: Using separate `datadir` is mandatory if you want to run **several instances of eclair** on the same machine. You will also have to change ports in `eclair.conf` (see above).\n\nname                  | description                                | default value\n----------------------|--------------------------------------------|--------------\neclair.datadir        | Path to the data directory                 | ~/.eclair\neclair.printToConsole | Log to stdout (in addition to eclair.log)  |\n\nFor example, to specify a different data directory you would run the following command:\n\n```shell\neclair-node-\u003cversion\u003e-\u003ccommit_id\u003e/bin/eclair-node.sh -Declair.datadir=/tmp/node1\n```\n\n### Logging\n\nEclair uses [`logback`](https://logback.qos.ch) for logging. To use a [different configuration](./docs/Logging.md), and override the internal logback.xml, run:\n\n```shell\neclair-node-\u003cversion\u003e-\u003ccommit_id\u003e/bin/eclair-node.sh -Dlogback.configurationFile=/path/to/logback-custom.xml\n```\n\n### Backup\n\nYou need to backup:\n\n* your Bitcoin Core wallet\n* your Eclair channels\n\nFor Bitcoin Core, you need to backup the wallet file for the wallet that Eclair is using. You only need to do this once, when the wallet is\ncreated. See [Managing Wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md) in the Bitcoin Core documentation for more information.\n\nFor Eclair, the files that you need to backup are located in your data directory. You must backup:\n\n* your seeds (`node_seed.dat` and `channel_seed.dat`)\n* your channel database (`eclair.sqlite.bak` under directory `mainnet`, `testnet`, `signet` or `regtest` depending on which chain you're running on)\n\nYour seeds never change once they have been created, but your channels will change whenever you receive or send payments. Eclair will\ncreate and maintain a snapshot of its database, named `eclair.sqlite.bak`, in your data directory, and update it when needed. This file is\nalways consistent and safe to use even when Eclair is running, and this is what you should back up regularly.\n\nFor example, you could configure a `cron` task for your backup job. Or you could configure an optional notification script to be called by eclair once a new database snapshot has been created, using the following option:\n\n```conf\neclair.file-backup.notify-script = \"/absolute/path/to/script.sh\"\n```\n\nMake sure your script is executable and uses an absolute path name for `eclair.sqlite.bak`.\n\nNote that depending on your filesystem, in your backup process we recommend first moving `eclair.sqlite.bak` to some temporary file\nbefore copying that file to your final backup location.\n\n## Docker\n\nA [Dockerfile](Dockerfile) x86_64 image is built on each commit on [docker hub](https://hub.docker.com/r/acinq/eclair) for running a dockerized eclair-node.\nFor arm64 platforms you can use an [arm64 Dockerfile](contrib/arm64v8.Dockerfile) to build your own arm64 container.\n\nYou can use the `JAVA_OPTS` environment variable to set arguments to `eclair-node`.\n\n```shell\ndocker run -ti --rm -e \"JAVA_OPTS=-Xmx512m -Declair.api.binding-ip=0.0.0.0 -Declair.node-alias=node-pm -Declair.printToConsole\" acinq/eclair\n```\n\nIf you want to persist the data directory, you can make the volume to your host with the `-v` argument, as the following example:\n\n```shell\ndocker run -ti --rm -v \"/path_on_host:/data\" -e \"JAVA_OPTS=-Declair.printToConsole\" acinq/eclair\n```\n\nIf you enabled the API you can check the status of Eclair using the command line tool:\n\n```shell\ndocker exec \u003ccontainer_name\u003e eclair-cli -p foobar getinfo\n```\n\n## Plugins\n\nFor advanced usage, Eclair supports plugins written in Scala, Java, or any JVM-compatible language.\n\nA valid plugin is a jar that contains an implementation of the [Plugin](eclair-node/src/main/scala/fr/acinq/eclair/Plugin.scala) interface, and a manifest entry for `Main-Class` with the FQDN of the implementation.\n\nHere is how to run Eclair with plugins:\n\n```shell\neclair-node-\u003cversion\u003e/bin/eclair-node.sh \u003cplugin1.jar\u003e \u003cplugin2.jar\u003e \u003c...\u003e\n```\n\nYou can find more details about plugins in the [eclair-plugins](https://github.com/ACINQ/eclair-plugins) repository.\n\n## Testnet usage\n\nEclair is configured to run on mainnet by default, but you can still run it on testnet (or regtest/signet): start your Bitcoin node in\n testnet mode (add `testnet=1` in `bitcoin.conf` or start with `-testnet`), and change Eclair's chain parameter and Bitcoin RPC port:\n\n```conf\neclair.chain=testnet\neclair.bitcoind.rpcport=18332\n```\n\nFor regtest, add `regtest=1` in `bitcoin.conf` or start with `-regtest`, and modify `eclair.conf`:\n\n```conf\neclair.chain = \"regtest\"\neclair.bitcoind.rpcport=18443\n```\n\nFor signet, add `signet=1` in `bitcoin.conf` or start with `-signet`, and modify `eclair.conf`:\n\n```conf\neclair.chain = \"signet\"\neclair.bitcoind.rpcport=38332\n```\n\nYou may also want to take advantage of the new configuration sections in `bitcoin.conf` to manage parameters that are network specific,\nso you can easily run your Bitcoin node on both mainnet and testnet. For example you could use:\n\n```conf\nserver=1\ntxindex=1\n\naddresstype=bech32\nchangetype=bech32\n\nwalletrejectlongchains=1\nlimitancestorcount=20\nlimitdescendantcount=20\n\n[main]\nrpcuser=\u003cyour-mainnet-rpc-user-here\u003e\nrpcpassword=\u003cyour-mainnet-rpc-password-here\u003e\nzmqpubhashblock=tcp://127.0.0.1:29000\nzmqpubrawtx=tcp://127.0.0.1:29000\n\n[test]\nrpcuser=\u003cyour-testnet-rpc-user-here\u003e\nrpcpassword=\u003cyour-testnet-rpc-password-here\u003e\nzmqpubhashblock=tcp://127.0.0.1:29001\nzmqpubrawtx=tcp://127.0.0.1:29001\n```\n\n## Tools\n\n* [Demo Shop](https://starblocks.acinq.co/) - an example testnet Lightning web shop.\n\n## Resources\n\n* [1] [The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments](https://lightning.network/lightning-network-paper.pdf) by Joseph Poon and Thaddeus Dryja\n* [2] [Reaching The Ground With Lightning](https://github.com/ElementsProject/lightning/raw/master/doc/deployable-lightning.pdf) by Rusty Russell\n","funding_links":[],"categories":["Ecosystem","Lightning Network Protocol","Scala","Lightning Network","Table of Contents","Misc","Implementations"],"sub_categories":["Lightning Implementations","Implementations","Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FACINQ%2Feclair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FACINQ%2Feclair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FACINQ%2Feclair/lists"}