alexbosworth / ln-service

Node.js interface to LND
MIT License
318 stars 60 forks source link

ssl_transport_security.cc:636] Could not load any root certificate #83

Open songproducer opened 5 years ago

songproducer commented 5 years ago

Hi! I'm using Lunanode with the default btcpayxxxxxx.lndyn.com domain.

I just ran the example code:

const lnService = require('ln-service');

const lnd = lnService.lightningDaemon({
  cert: 'base64 encoded tls.cert',
  macaroon: 'base64 encoded admin.macaroon',
  socket: '127.0.0.1:8080',
});

lnService.getWalletInfo({lnd}, (error, result) => {
  console.log(result);
});
alexbosworth commented 5 years ago

Try removing the cert

songproducer commented 5 years ago

I removed this line:

cert: 'base64 encoded tls.cert',

and got:

npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/1738/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> ir@1.0.0 start /home/ubuntu/ir
> node index.js

undefined
RyanMilb commented 5 years ago

Song producer, try modifying the test function to spit out the error. It should give you more info about the issue.

lnService.getWalletInfo({lnd}, (error, result) => { console.log(result); console.log(error); //< --- Add this line });