LNRPC
Synced to LND master branch
Features
- 🛠Auto-generates lnd/lnrpc client
- ✨Wraps requests in promises
- 🤝Easily setup SSL and Macaroons
- 📚Instantiates all gRPC services
- 🔢Configurable LND version
Installation
yarn add lnrpc # Or npm i lnrpc -S
For best results, be sure to install lnd before using this project and ensure you have an lnd instance running with --no-macaroons
, unless you provide macaroon authentication to your lnrpc instance.
Usage
Connecting to an lnd instance at localhost:10001
.
const createLnrpc = ; { const lnrpc = await ; // All requests are promisified const balance = await lnrpc; // ...and you're off! console;};
Options
const createLnrpc = ; { const lnrcpCustom = await ;};
Configuring LND Version
By default the LND master branch is installed, however you can easily install specific releases and branches by updating your project's package.json
file.
Install at Release
Install at Branch
⚠️ Setting an undiscoverable version will fail without error, so be sure you've selected a valid release or git branch.
API Reference
All lnrpc methods documentation can be found here.
Usage With BTCPayServer
By default lnrpc assumes SSl certificate pinning. In order to use lnrpc with a service (like BTCPayServer) which manages your certification, you'll have to opt to disable certificate pinning by passing { tls: false }
within your lnrpc configuration.
Contributors
To develop on the project please run:
git clone git@github.com:Matt-Jensen/lnrpc.git && cd $_yarnnpm run start
License
This project is licensed under the MIT License.