npm

This package has been deprecated

Author message:

it

c-lightning-wrapper

1.0.3 • Public • Published

c-lightning-wrapper

Javascript wrapper for c-lightning

Install

$ npm i c-lightning-wrapper

Usage

It requires c-lightning to be installed on your system. The constructor takes path to lightning-cli program.

const LightningCmd = require('c-lightning-wrapper');

const lightingCmd = new LightningCmd('~/path/to/lightning/cli');

const dataAsObject = await lightingCmd.connect(
  'lightning-node-id',
  'lightning-node-host-ip'
);

API

  • connect(id, host, port = '9735')
  • listnodes()
  • getroute(id, msatoshi, riskfactor)
  • listchannels(short_channel_id)
  • stop()
  • getinfo()
  • getlog()
  • fundchannel(id, satoshi = 'all')
  • listconfigs()
  • listpayments()
  • pay(payreq)
  • listpeers()
  • close(id)
  • disconnect(id)
  • withdraw(destination, satoshi = 'all')
  • newaddr()
  • listfunds()

Test

npm test

License

MIT © Moonbois

Package Sidebar

Install

npm i c-lightning-wrapper

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

11.6 kB

Total Files

8

Last publish

Collaborators

  • moonbois