A lightweight JavaScript/TypeScript library to instantiate a gRPC client for LND (Lightning Network Daemon) nodes. Version 2.0.3 is current; maintained with sporadic updates. Simplifies TLS/macaroon authentication and connection setup for LND's gRPC API. Differentiated by minimal dependencies and promise-based client generation, targeting Node.js environments.
npm install grpc-lndNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initialization of LndGrpc with credentials, async connection, and a simple wallet balance RPC call.
Use async/await or .then() on all RPC calls. Old callback patterns will hang.
Update options to use 'cert' and 'macaroon' keys.
Always specify host as 'host:port' explicitly.
Wrap connect() in a promise with a timeout using Promise.race or use a custom gRPC deadline.
Use try/finally or ensure lnd.close() in cleanup handlers.
Install the package: npm install grpc-lnd. For CommonJS, use dynamic import: const LndGrpc = (await import('grpc-lnd')).default;Use default import: import LndGrpc from 'grpc-lnd'.
Verify LND is running and reachable. Ensure you await lnd.connect() before making calls.