Skip to content

Commit b0a1b02

Browse files
committed
2 parents f9246ea + 03a5873 commit b0a1b02

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
# lightning-client-js
22

33
JavaScript [c-lightning](https://github.com/ElementsProject/lightning) client.
4+
5+
This repository is published as the [`lightning-client`](https://www.npmjs.com/package/lightning-client) NPM module.
6+
7+
## Installing the client
8+
9+
You can easily install this client using `npm` by running:
10+
11+
```
12+
npm install lightning-client
13+
```
14+
15+
## Using the client
16+
17+
Once the client is installed you can use it by loading the main class and instantiating it in this way:
18+
19+
```
20+
const LightningClient = require('lightning-client');
21+
22+
// This should point to your lightning-dir, by default in ~/.lightning
23+
const client = new LightningClient('/home/bitcoind/.lightning');
24+
25+
// Every call returns a Promise
26+
client.getinfo()
27+
.then(info => console.log(info));
28+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lightning-client",
3-
"version": "0.5.2-beta.1",
3+
"version": "0.5.2-beta.2",
44
"description": "JavaScript c-lightning client",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)