{"id":43223741,"url":"https://github.com/interledger-deprecated/lnd-lib","last_synced_at":"2026-02-01T09:17:48.655Z","repository":{"id":77719897,"uuid":"145398546","full_name":"interledger-deprecated/lnd-lib","owner":"interledger-deprecated","description":"A library for interacting with an LND server","archived":false,"fork":false,"pushed_at":"2018-10-27T22:45:53.000Z","size":90,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-09T10:06:59.139Z","etag":null,"topics":["bitcoin","lightning","lnd"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledger-deprecated.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-20T09:47:32.000Z","updated_at":"2018-11-23T04:14:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"07802185-ca14-453f-9da7-b814fcf58c87","html_url":"https://github.com/interledger-deprecated/lnd-lib","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.5454545454545454,"last_synced_commit":"23bd1c221b530edca187fdc5f098faac503d5754"},"previous_names":["interledgerjs/lnd-lib"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/interledger-deprecated/lnd-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Flnd-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Flnd-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Flnd-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Flnd-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger-deprecated","download_url":"https://codeload.github.com/interledger-deprecated/lnd-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Flnd-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","lightning","lnd"],"created_at":"2026-02-01T09:17:48.587Z","updated_at":"2026-02-01T09:17:48.648Z","avatar_url":"https://github.com/interledger-deprecated.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lnd-lib\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/interledgerjs/lnd-lib.svg)](https://greenkeeper.io/)\n\n# Installation\n\nInstall the package via `npm`:\n\n```\nnpm install install lnd-lib --save \n```\n# Introduction\n\nDraws heavily on \u003chttps://github.com/lightningnetwork/lnd/blob/master/docs/grpc/javascript.md\u003e, and \u003chttps://api.lightning.community/\u003e. \n\n# Usage\n\n```\nconst lndLib = require('lnd-lib')\nconst Lightning = new lndLib.Lightning({certPath, macaroonPath, lndAddress, protoPath})\n\n```\n\n* `[certPath]` Optional. Path to certificate. Defaults to `~/.lnd/tls.cert` on Linux and `~/Library/Application Support/Lnd/tls.cert` on Mac.  \n\n* `[macaroonPath]` Optional. Macaroon Path. Defaults to `~/.lnd/admin.macaroon` on Linux and `~/Library/Application Support/admin.macaroon` on Mac.  \n\n* `[lndAddress]` Optional. Lnd address. Defaults to `localhost:10009`. \n\n* `[protoPath]` Optional. Path to `rpc.proto`. Defaults to `./rpc.proto` (included in this repo).\n\n## Methods\n\n#### initialize\n\nFetches certificate, rpc.proto etc. and creates sets up an RPC connection to LND.  \n\n```\nLightning.initialize().then((resp)=\u003e{\n \t.... \n})\n```\n  \n#### connect\n\nConnects to another LND peer.\n\n```\nLightning.connect({addr, pubKey, host, perm}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[addr]` Optional. TODO..  \n\n\t*(need to either have `[addr]` or `[pubKey]` and `[host]`)*\n\n* `[pubKey]` Optional. TODO..\n\n* `[host]` Optional. TODO..  \n* `[perm]` Optional. TODO..\n\n  \n#### getInfo\nReturns basic information related to the Lightning node.\n \n```\nLightning.getInfo().then((resp)=\u003e{\n\t.... \n})\n```\n\n\n#### walletBalance \nReturns the wallet's balance (total utxos, confirmed and unconfirmed).\n\n```\nLightning.walletBalance().then((resp)=\u003e{\n \t.... \n})\n```\n\n\n#### newAddress\nGenerates a new wallet address.\n\n```\nLightning.newAddress(addressType).then((resp)=\u003e{\n \t.... \n})\n```\n\n`[addressType]`:\n\nEither:\n\n* `Lightning.addressType.p2wkh` or \n\n* `Lightning.addressType.np2wkh`. \n\n* Defaults to `Lightning.addressType.p2wkh` \n\n\n\n#### listPeers\nReturns a list of all connected peers.\n\n ```\n Lightning.listPeers().then((resp)=\u003e{\n \t.... \n})\n ```\n\n\n#### openChannel\nAttempts to open a channel to an existing peer.\n \n```\nLightning.openChannel(\n  {\n    nodePubkey,\n    localFundingAmount, \n    pushSatoshis, \n    targetConf, \n    satoshisPerByte, \n    minHtlcMsat, \n    _private, \n    minHtlcMsat, \n    remoteCsvDelay\n  },\n  statusCallback\n).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[nodePubkey]` TODO\n\n*  `[localFundingAmount]` TODO\n*  `[pushSatoshis]` Optional. TODO\n*  `[targetConf]` Optional. TODO\n*  `[satoshisPerByte]` Optional. TODO\n*  `[_private]` Optional. TODO\n*  `[minHtlcMsat]` Optional. TODO\n*  `[remoteCsvDelay]` Optional. TODO\n  \n* `[statusCallback]` TODO\n\n\n#### channelBalance\nReturns the total channel balance for all open channels.\n\n```\nLightning.channelBalance().then((resp)=\u003e{\n \t.... \n})\n```\n\n#### listChannels\nReturns a list of all open channels.\n\n```\nLightning.listChannels().then((resp)=\u003e{\n \t.... \n})\n```\n\n#### addInvoice\nAdds a new invoice, expressing intent for a future payment.\n\n```\nLightning.addInvoice({amt}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[amt]` TODO\n\n#### decodePayReq\nDecodes a payment request.\n\n```\nLightning.decodePayReq({payReq}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[payReq]` TODO\n\n#### sendPayment\nSends a payment over Lightning.\n\n```\nLightning.sendPayment({payReq}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[payReq]` TODO\n\n\n#### getChanInfo \nReturns the latest authenticated state for a particular channel.\n\n```\nLightning.getChanInfo({chanId}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[chanId]` TODO\n\n#### closeChannel\nAttempts to close an existing channel.\n\n```\nLightning.closeChannel(\n {\n    chanId, \n    channelPoint, \n    force, \n    targetConf, \n    satoshisPerByte\n  }\n).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[chanId]` TODO\n\n* `[channelPoint]` TODO\n* `[force]` TODO\n* `[targetConf]` TODO\n* `[satoshisPerByte]` TODO\n\n#### disconnect\nDisconnects from an existing peer.\n\n```\nLightning.disconnect({pubKey}).then((resp)=\u003e{\n \t.... \n})\n```\n\n* `[pubKey]` TODO\n\n## TODO:\n\nImplement remaining lightning functionality.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Flnd-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger-deprecated%2Flnd-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Flnd-lib/lists"}