2021-04-29 16:58:43 -05:00
|
|
|
import lndService from 'ln-service'
|
|
|
|
|
2021-06-09 16:29:15 -05:00
|
|
|
const { lnd } = lndService.authenticatedLndGrpc({
|
2021-06-10 19:49:20 -05:00
|
|
|
cert: process.env.LND_CERT,
|
2021-06-09 16:29:15 -05:00
|
|
|
macaroon: process.env.LND_MACAROON,
|
|
|
|
socket: process.env.LND_SOCKET
|
|
|
|
})
|
2021-04-29 16:58:43 -05:00
|
|
|
|
2023-05-17 03:09:55 +02: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')
|
|
|
|
})
|
|
|
|
|
2021-06-09 16:29:15 -05:00
|
|
|
export default lnd
|