stacker.news/api/lnd/index.js

19 lines
420 B
JavaScript
Raw Normal View History

2021-04-29 21:58:43 +00:00
import lndService from 'ln-service'
const { lnd } = lndService.authenticatedLndGrpc({
cert: process.env.LND_CERT,
macaroon: process.env.LND_MACAROON,
socket: process.env.LND_SOCKET
})
2021-04-29 21:58:43 +00:00
2023-05-17 01:09:55 +00:00
// Check LND GRPC connection
lndService.getWalletInfo({ lnd }, (err, result) => {
if (err) {
console.error('LND GRPC connection error')
return
}
console.log('LND GRPC connection successful')
})
export default lnd