2021-04-29 21:58:43 +00:00
|
|
|
import lndService from 'ln-service'
|
|
|
|
|
2021-06-09 21:29:15 +00:00
|
|
|
const { lnd } = lndService.authenticatedLndGrpc({
|
2021-06-11 00:49:20 +00:00
|
|
|
cert: process.env.LND_CERT,
|
2021-06-09 21:29:15 +00:00
|
|
|
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')
|
|
|
|
})
|
|
|
|
|
2021-06-09 21:29:15 +00:00
|
|
|
export default lnd
|