Socket
Socket
Sign inDemoInstall

eclair-node-rpc

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eclair-node-rpc

Connecting to eclair LN node. Based Shlomi Zeltsinger <shlomi.zeltsinger@gmail.com> fork of Bitpay's bitcoind-rpc


Version published
Weekly downloads
1
Maintainers
1
Install size
8.70 kB
Created
Weekly downloads
 

Readme

Source

eclair-rpc.js

A client library to connect to eclair RPC in JavaScript. Forked of Bitpay's bitcoind-rpc.

Get Started

eclair-rpc.js runs on node, and can be installed via npm:

npm install eclair-rpc

Configure eclair node

Install eclair and make sure eclair API is running and reachable. Example .eclair/eclair.conf file might look like:

eclair.chain=testnet
eclair.node-alias=testone
eclair.node-color=49daaa


eclair.bitcoind.rpcport=18333
eclair.bitcoind.rpcuser=bitcoind_username
eclair.bitcoind.rpcpassword=bitcoind_password


eclair.api.enabled=true
eclair.api.password="eclair_password"

eclair.api.binding-ip="0.0.0.0"

Warning: Exposing your node's API externally is not safe and should be limited to testnets only!

Examples

var run = function() {
  var EclairClient = require('eclair-rpc');

  var config = {
    protocol: 'http',
    pass: 'password',
    host: '127.0.0.1',
    port: '8080',
  };

  var rpc = new EclairClient(config);

  var txids = [];

  function getNodeInfo() {
    rpc.getinfo(function(err, res){
      if (err) {
        console.error(err);
      }
      console.log(res);
    });
  }

  getNodeInfo();
};

Supported callspec

RpcClient.callspec = {
  allnodes: '',
  channels: '',
  checkinvoice: 'str',
  close: 'str',
  connect: 'str str int',
  getinfo: '',
  open: 'str int',
  receive: 'int str',
  send: 'str',
};

License

Code released under the MIT license.

Keywords

FAQs

Last updated on 26 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc