<p>Plugins can be written in any language as long as a client library for that language exists. </p>

<p>The command line API and the Plugins communicate with <code>lightningd</code> over a unix domain socket using JSON RPC 2.0. </p>

<p>As far as I know no Java / Scala lib exists. I have started creating one at this pull request: <a href="https://github.com/ElementsProject/lightning/pull/2223" rel="noreferrer">https://github.com/ElementsProject/lightning/pull/2223</a></p>

<p>also it makes sense to look at the python plugin lib to see how the format of the JSON RPC 2.0 is used. Check out: <a href="https://github.com/ElementsProject/lightning/blob/master/contrib/pylightning/lightning/plugin.py" rel="noreferrer">https://github.com/ElementsProject/lightning/blob/master/contrib/pylightning/lightning/plugin.py</a> which is really just a client lib talking to the UNIX Domain socket and parsing / dispatching the JSON RPC responses. So as soon as you create this in Java / Scala you should be able to create as many plugins as you wish. You could build upon my pull request (though I have started with the client library for the standard API)</p>

CC BY-SA 4.0
2019-02-05T14:29:50.103Z
2019-02-05T14:29:50.103Z
Rene Pickhardt
<p>I know that there's a Python library available for writing plugins for <code>c-lightning</code>. What would I need to do to for example use a JVM language like Scala?</p>

<lightning-network><development><core-lightning><plugins>
What languages can I write plugins for c-lightning in?
torkel
# What languages can I write plugins for c-lightning in?

(Asked by: username_0 on 2019-02-05)

I know that there's a Python library available for writing plugins for `c-lightning`. What would I need to do to for example use a JVM language like Scala?

**Tags:** lightning-network, development, core-lightning, plugins


---

## 1 answers

### Answer by username_1 on 2019-02-05. Score: 5 | Accepted answer

Plugins can be written in any language as long as a client library for that language exists.

The command line API and the Plugins communicate with `lightningd` over a unix domain socket using JSON RPC 2.0.

As far as I know no Java / Scala lib exists. I have started creating one at this pull request: <https://github.com/ElementsProject/lightning/pull/2223>

also it makes sense to look at the python plugin lib to see how the format of the JSON RPC 2.0 is used. Check out: <https://github.com/ElementsProject/lightning/blob/master/contrib/pylightning/lightning/plugin.py> which is really just a client lib talking to the UNIX Domain socket and parsing / dispatching the JSON RPC responses. So as soon as you create this in Java / Scala you should be able to create as many plugins as you wish. You could build upon my pull request (though I have started with the client library for the standard API)


---

