MCPcopy Index your code
hub / github.com/RadarTech/lnrpc

github.com/RadarTech/lnrpc @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
14 symbols 14 edges 13 files 6 documented · 43% updated 3y agov0.11.1-beta.1 · 2021-01-28★ 436 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LNRPC Build Status

Synced to LND master branch

Features

  • 🛠Auto-generates lnd/lnrpc client
  • ✨Wraps requests in promises
  • 🤝Easily setup SSL and Macaroons
  • 📚Instantiates all gRPC services

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 = require('lnrpc');

(async function() {
  const lnrpc = await createLnrpc();

  // All requests are promisified
  const balance = await lnrpc.walletBalance({});

  // ...and you're off!
  console.log(balance);
})();

Options

const createLnrpc = require('lnrpc');

(async function() {
  const lnrcpCustom = await createLnrpc({
    /*
     By default lnrpc connects to `localhost:10001`,
     however we can point to any host.
     */
    server: '173.239.209.2:3001',

    /*
     By default  lnrpc looks for your tls certificate at:
     `~/.lnd/tls.cert`, unless it detects you're using macOS and
     defaults to `~/Library/Application\ Support/Lnd/tls.cert`
     however you can configure your own SSL certificate path like:
     */
    tls: './path/to/tls.cert',

    /*
     You can also provide a TLS certificate directly as a string
     (Just make sure you don't commit this to git).
     Overwrites: `tls`
     */
    cert: process.env.MY_SSL_CERT,

    /*
     Optional path to configure macaroon authentication
     from LND generated macaroon file.
     */
    macaroonPath: './path/to/data/admin.macaroon',

    /*
     Optional way to configure macaroon authentication by
     passing a hex encoded string of your macaroon file
     */
    macaroon: process.env.MY_MACAROON_HEX,
  });
})();

API Reference

All lnrpc methods documentation can be found here.

Contributors

To develop on the project please run:

git clone git@github.com:Matt-Jensen/lnrpc.git && cd $_
yarn
npm run start

License

This project is licensed under the MIT License.

Core symbols most depended-on inside this repo

get
called by 0
lib/lnrpc.js
get
called by 0
lib/wallet-unlocker.js
get
called by 0
lib/lightning.js
LightningStub
called by 0
test/helpers/grpc-stub.js
WalletUnlockerStub
called by 0
test/helpers/grpc-stub.js
Metadata
called by 0
test/helpers/grpc-stub.js

Shape

Function 14

Languages

TypeScript100%

Modules by API surface

test/lightning.test.js3 symbols
test/helpers/grpc-stub.js3 symbols
test/release.test.js2 symbols
test/lnrpc.test.js2 symbols
test/wallet-unlocker.test.js1 symbols
lib/wallet-unlocker.js1 symbols
lib/lnrpc.js1 symbols
lib/lightning.js1 symbols

For agents

$ claude mcp add lnrpc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page