<!DOCTYPE html><htmllang="en"><head><metacharSet="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><title>Eclair · bitcoin-s</title><metaname="viewport"content="width=device-width, initial-scale=1.0"/><metaname="generator"content="Docusaurus"/><metaname="description"content="This is a RPC client for [Eclair](https://github.com/acinq/eclair). It assumes that a bitcoind instance is running."/><metaname="docsearch:version"content="0.4.0"/><metaname="docsearch:language"content="en"/><metaproperty="og:title"content="Eclair · bitcoin-s"/><metaproperty="og:type"content="website"/><metaproperty="og:url"content="https://bitcoin-s.org/"/><metaproperty="og:description"content="This is a RPC client for [Eclair](https://github.com/acinq/eclair). It assumes that a bitcoind instance is running."/><metaproperty="og:image"content="https://bitcoin-s.org/img/undraw_online.svg"/><metaname="twitter:card"content="summary"/><metaname="twitter:image"content="https://bitcoin-s.org/img/undraw_tweetstorm.svg"/><linkrel="shortcut icon"href="/img/favicon.ico"/><linkrel="stylesheet"href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><linkrel="stylesheet"href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script>
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><divclass="container mainContainer docsContainer"><divclass="wrapper"><divclass="post"><headerclass="postHeader"><aclass="edit-page-link button"href="https://github.com/bitcoin-s/bitcoin-s/blob/master/docs/rpc/eclair.md"target="_blank"rel="noreferrer noopener">Edit</a><h1id="__docusaurus"class="postHeaderTitle">Eclair</h1></header><article><div><span><p>This is a RPC client for <ahref="https://github.com/acinq/eclair">Eclair</a>. It assumes that a bitcoind instance is running.</p>
<p>Currently this RPC client is written for <ahref="https://github.com/ACINQ/eclair/releases/tag/v0.3.3">v0.3.3</a> version of Eclair.</p>
<p>You can find the configuration we use for our testing infrastrture for eclair <ahref="https://github.com/bitcoin-s/bitcoin-s/blob/a043d3858ef33da51229ee59c478d2a6c9d5a46f/testkit/src/main/scala/org/bitcoins/testkit/eclair/rpc/EclairRpcTestUtil.scala#L98">here</a>.</p>
<p>You need to download the jar from the <ahref="https://github.com/ACINQ/eclair/releases/tag/v0.3.3">eclair's github</a>.</p>
<p>To run Eclair you can use this command:</p>
<pre><codeclass="hljs css language-bash">$ java -jar eclair-node-0.3.3-12ac145.jar &
</code></pre>
<p>If you wish to start Eclair from the RPC client, you can do one of the following:</p>
<ol>
<li>Construct a <ahref="https://github.com/bitcoin-s/bitcoin-s/blob/a043d3858ef33da51229ee59c478d2a6c9d5a46f/eclair-rpc/src/main/scala/org/bitcoins/eclair/rpc/client/EclairRpcClient.scala#L51"><code>EclairRpcClient.binary</code></a> field set</li>
<li>Set the <ahref="https://github.com/bitcoin-s/bitcoin-s/blob/a043d3858ef33da51229ee59c478d2a6c9d5a46f/eclair-rpc/src/main/scala/org/bitcoins/eclair/rpc/client/EclairRpcClient.scala#L701"><code>ECLAIR_PATH</code></a> environment variable to the directory where the Eclair Jar is located.</li>
</ol>
<p>We will default to using the <code>binary</code> field first when trying to start the jar, and the fallback to <code>ECLAIR_PATH</code>.</p>
<p>Here is an example of how to start eclair:</p>
<pre><codeclass="hljs css language-scala"><spanclass="hljs-keyword">implicit</span><spanclass="hljs-keyword">val</span> system = <spanclass="hljs-type">ActorSystem</span>(<spanclass="hljs-string">s"eclair-rpc-<spanclass="hljs-subst">${System.currentTimeMillis}</span>"</span>)
<p>As of <code>v0.3.3</code> eclair supports a websocket endpoint. This means you can receive updates of what is happening with eclair
in real time. You can see an example of us testing this <ahref="https://github.com/bitcoin-s/bitcoin-s/blob/a043d3858ef33da51229ee59c478d2a6c9d5a46f/eclair-rpc-test/src/test/scala/org/bitcoins/eclair/rpc/EclairRpcClientTest.scala#L591">here</a></p>