File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11# lightning-client-js
22
33JavaScript [ 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+ ```
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments