{"id":13499311,"url":"https://github.com/alexbosworth/ln-service","last_synced_at":"2025-05-14T19:07:09.399Z","repository":{"id":18952494,"uuid":"85657865","full_name":"alexbosworth/ln-service","owner":"alexbosworth","description":"Node.js interface to LND","archived":false,"fork":false,"pushed_at":"2025-03-13T19:34:56.000Z","size":5722,"stargazers_count":320,"open_issues_count":26,"forks_count":63,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-06T09:04:31.997Z","etag":null,"topics":["bitcoin","grpc","lightning","lightning-network","lnd"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexbosworth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-03-21T04:07:17.000Z","updated_at":"2025-03-24T23:54:25.000Z","dependencies_parsed_at":"2023-01-13T20:06:01.961Z","dependency_job_id":"bf931974-21cb-4738-afdb-f76e0b039b11","html_url":"https://github.com/alexbosworth/ln-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbosworth%2Fln-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbosworth%2Fln-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbosworth%2Fln-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbosworth%2Fln-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexbosworth","download_url":"https://codeload.github.com/alexbosworth/ln-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717242,"owners_count":21150387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","grpc","lightning","lightning-network","lnd"],"created_at":"2024-07-31T22:00:32.107Z","updated_at":"2025-04-13T12:46:40.833Z","avatar_url":"https://github.com/alexbosworth.png","language":"JavaScript","funding_links":[],"categories":["Developer Resources"],"sub_categories":["Libraries"],"readme":"# Lightning Network Service\n\n[![npm version](https://badge.fury.io/js/ln-service.svg)](https://badge.fury.io/js/ln-service)\n\n## Overview\n\nThe core of this project is a gRPC interface for node.js projects, available\nthrough npm.\n\nSupported LND versions:\n\n- v0.18.0-beta to v0.18.5-beta\n- v0.17.0-beta to v0.17.5-beta\n- v0.16.0-beta to v0.16.4-beta\n- v0.15.2-beta to v0.15.5-beta\n- v0.14.4-beta to v0.14.5-beta\n\nFor typescript-ready methods, check out https://github.com/alexbosworth/lightning#readme\n\n## Installing LND\n\nThere is a guide to installing LND on the LND repository:\nhttps://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md\n\nExample LND configuration options (~/.lnd/lnd.conf)\n\n```ini\n[Application Options]\nexternalip=IP\nrpclisten=0.0.0.0:10009\n\n[Bitcoin]\nbitcoin.active=1\nbitcoin.mainnet=1\nbitcoin.node=bitcoind\n```\n\nIf you are interacting with your node remotely, make sure to set (in\n`[Application Options]`)\n\n```ini\ntlsextradomain=YOURDOMAIN\n```\n\nIf you're adding TLS settings, regenerate the cert and key by stopping lnd,\ndeleting the tls.cert and tls.key - then restart lnd to regenerate.\n\nIf you're going to use extended gRPC APIs, make sure to add the APIs to make\ntags.\n\n```sh\nmake \u0026\u0026 make install tags=\"autopilotrpc chainrpc invoicesrpc peersrpc routerrpc signrpc walletrpc watchtowerrpc wtclientrpc\"\n```\n\n## Using gRPC\n\nYou can install ln-service service via npm\n\n    npm install ln-service\n\nTo use authenticated methods you will need to provide LND credentials.\n\nTo export the credentials via a command, you can install\n[balanceofsatoshis](https://github.com/alexbosworth/balanceofsatoshis):\n`npm install -g balanceofsatoshis` and export via `bos credentials --cleartext`\n\nOr you can export them manually:\n\nRun `base64` on the tls.cert and admin.macaroon files to get the encoded\nauthentication data to create the LND connection. You can find these files in\nthe LND directory. (~/.lnd or ~/Library/Application Support/Lnd)\n\n    base64 tls.cert\n    base64 data/chain/bitcoin/mainnet/admin.macaroon\n\nBe careful to avoid copying any newline characters in creds. To exclude them:\n\n    base64 -w0 ~/.lnd/tls.cert\n    base64 -w0 ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon\n\nYou can then use these to interact with your LND node directly:\n\n```node\nconst lnService = require('ln-service');\n\nconst {lnd} = lnService.authenticatedLndGrpc({\n  cert: 'base64 encoded tls.cert',\n  macaroon: 'base64 encoded admin.macaroon',\n  socket: '127.0.0.1:10009',\n});\n\n// Callback syntax\nlnService.getWalletInfo({lnd}, (err, result) =\u003e {\n  const nodeKey = result.public_key;\n});\n\n// Promise syntax\nconst nodePublicKey = (await lnService.getWalletInfo({lnd})).public_key;\n```\n\nAn [unauthenticatedLndGrpc](#unauthenticatedLndGrpc) function is also available\nfor `unlocker` methods.\n\n## Subscriptions\n\n- Besides the events listed in this documentation, all `EventEmitter` objects\n  returned by any of the `subscribeTo...` methods also offer an `error`\n  event. This event is triggered e.g. when LND is shut down. So, in order to\n  detect and correctly handle such a situation, robust client code should\n  generally also add a listener for the `error` event. For example, a\n  function that will wait for and return the next forward but throw an\n  exception when LND is either not reachable or shuts down while waiting for\n  the forward would look something like this:\n\n  ``` node\n  const getNextForward = async (lnd) =\u003e {\n      const emitter = subscribeToForwards({ lnd });\n\n      try {\n          return await new Promise((resolve, reject) =\u003e {\n              emitter.on(\"forward\", resolve);\n              // Without the following line, the function will never throw\n              // when the connection is lost after calling subscribeToForwards\n              emitter.on(\"error\", reject);\n          });\n      } finally {\n          emitter.removeAllListeners();\n      }\n  };\n  ```\n\n- After the last listener has been removed from an `EventEmitter` object, the\n  subscription is released and subsequent attempts to add a listener will\n  result in an error. Call `subscribeTo...` again and add new listeners to the\n  new `EventEmitter` object.\n\n## All Methods\n\n- [addAdvertisedFeature](#addadvertisedfeature) - Advertise a supported feature\n- [addExternalSocket](#addexternalsocket) - Advertise a new p2p host:ip address\n- [addPeer](#addpeer) - Connect to a peer\n- [authenticatedLndGrpc](#authenticatedlndgrpc) - LND API Object\n- [beginGroupSigningSession](#begingroupsigningsession) - Start MuSig2 session\n- [broadcastChainTransaction](#broadcastchaintransaction) - Push a chain tx\n- [cancelHodlInvoice](#cancelhodlinvoice) - Cancel a held or any open invoice\n- [cancelPendingChannel](#cancelpendingchannel) - Cancel a pending open channel\n- [changePassword](#changepassword) - Change the wallet unlock password\n- [closeChannel](#closechannel) - Terminate an open channel\n- [connectWatchtower](#connectwatchtower) - Connect a watchtower\n- [createChainAddress](#createchainaddress) - Get a chain address to receive at\n- [createFundedPsbt](#createfundedpsbt): Create a funded PSBT given inputs and\n    outputs\n- [createHodlInvoice](#createhodlinvoice) - Make a HODL HTLC invoice\n- [createInvoice](#createinvoice) - Make a regular invoice\n- [createSeed](#createseed) - Generate a wallet seed for a new wallet\n- [createSignedRequest](#createsignedrequest) - create a signed payment request\n- [createUnsignedRequest](#createunsignedrequest) - create an unsigned invoice\n- [createWallet](#createwallet) - Make a new wallet\n- [decodePaymentRequest](#decodepaymentrequest) - Decode a Lightning invoice\n- [deleteChainTransaction](#deletechaintransaction) - Remove chain transaction\n- [deleteFailedPayAttempts](#deletefailedpayattempts) - Remove records of \n    failed pay attempts\n- [deleteFailedPayments](#deletefailedpayments) - Remove records of payments \n    that failed\n- [deleteForwardingReputations](#deleteforwardingreputations) - Wipe node reps\n- [deletePayment](#deletepayment) - Delete the record of a single past payment\n- [deletePayments](#deletepayments) - Delete entire history of past payments\n- [deletePendingChannel](#deletependingchannel) - Delete a pending channel that\n    will never confirm due to a conflicting confirmed transaction\n- [diffieHellmanComputeSecret](#diffiehellmancomputesecret) - Get DH shared key\n- [disableChannel](#disablechannel) - Disable a channel for outgoing payments\n- [disconnectWatchtower](#disconnectwatchtower) - Disconnect a watchtower\n- [enableChannel](#enablechannel) - Enable a channel for outgoing payments\n- [endGroupSigningSession](#endgroupsigningsession) - Complete MuSig2 session\n- [fundPendingChannels](#fundpendingchannels) - Fund pending open channels\n- [fundPsbt](#fundpsbt) - Create an unsigned PSBT with funding inputs and \n    spending outputs\n- [getAccessIds](#getaccessids) - Get granted macaroon root access ids\n- [getAutopilot](#getautopilot) - Get autopilot status or node scores\n- [getBackup](#getbackup) - Get a backup of a channel\n- [getBackups](#getbackups) - Get a backup for all channels\n- [getBlock](#getblock) - Get the raw block data given a block id in the chain\n- [getBlockHeader](#getblockheader) - Get the raw block header for a block\n- [getChainAddresses](#getchainaddresses) - Get created chain addresses\n- [getChainBalance](#getchainbalance) - Get the confirmed chain balance\n- [getChainFeeEstimate](#getchainfeeestimate) - Get a chain fee estimate\n- [getChainFeeRate](#getchainfeerate) - Get the fee rate for a conf target\n- [getChainTransaction](#getchaintransaction) - Get single wallet transaction\n- [getChainTransactions](#getchaintransactions) - Get all chain transactions\n- [getChannel](#getchannel) - Get graph information about a channel\n- [getChannelBalance](#getchannelbalance) - Get the balance of channel funds\n- [getChannels](#getchannels) - Get all open channels\n- [getClosedChannels](#getclosedchannels) - Get previously open channels\n- [getConfiguration](#getconfiguration) - Get configuration information\n- [getConnectedWatchtowers](#getconnectedwatchtowers) - Get connected towers\n- [getEphemeralChannelIds](#getephemeralchannelids) - Get other channel ids\n- [getFailedPayments](#getfailedpayments) - Get payments that were failed back\n- [getFeeRates](#getfeerates) - Get current routing fee rates\n- [getForwardingConfidence](#getforwardingconfidence) - Get pairwise confidence\n- [getForwardingReputations](#getforwardingreputations) - Get graph reputations\n- [getForwards](#getforwards) - Get forwarded routed payments\n- [getHeight](#getheight) - Get the current best chain height and block hash\n- [getIdentity](#getidentity) - Get the node's identity key\n- [getInvoice](#getinvoice) - Get a previously created invoice\n- [getInvoices](#getinvoices) - Get all previously created invoices\n- [getLockedUtxos](#getlockedutxos) - Get all previously locked UTXOs\n- [getMasterPublicKeys](#getmasterpublickeys) - Get a list of master pub keys\n- [getMethods](#getmethods) - Get available methods and associated permissions\n- [getNetworkCentrality](#getnetworkcentrality) - Get centrality score for nodes\n- [getNetworkGraph](#getnetworkgraph) - Get the channels and nodes of the graph\n- [getNetworkInfo](#getnetworkinfo) - Get high-level graph info\n- [getNode](#getnode) - Get graph info about a single node and its channels\n- [getPathfindingSettings](#getpathfindingsettings) - Get pathfinding system\n    settings\n- [getPayment](#getpayment) - Get a past payment\n- [getPayments](#getpayments) - Get all past payments\n- [getPeers](#getpeers) - Get all connected peers\n- [getPendingChainBalance](#getpendingchainbalance) - Get pending chain balance\n- [getPendingChannels](#getpendingchannels) - Get channels in pending states\n- [getPendingPayments](#getpendingpayments) - Get in-flight outgoing payments\n- [getPendingSweeps](#getpendingsweeps) - Get sweeps waiting for resolution\n- [getPublicKey](#getpublickey) - Get a public key out of the seed\n- [getRouteConfidence](#getrouteconfidence) - Get confidence in a route\n- [getRouteThroughHops](#getroutethroughhops) - Get a route through nodes\n- [getRouteToDestination](#getroutetodestination) - Get a route to a destination\n- [getRoutingFeeEstimate](#getroutingfeeestimate) - Get offchain fee estimate\n- [getSettlementStatus](#getsettlementstatus) - Get status of a received HTLC\n- [getSweepTransactions](#getsweeptransactions) - Get transactions sweeping to\n    self\n- [getTowerServerInfo](#gettowerserverinfo) - Get information about tower server\n- [getUtxos](#getutxos) - Get on-chain unspent outputs\n- [getWalletInfo](#getwalletinfo) - Get general wallet info\n- [getWalletStatus](#getwalletstatus) - Get the status of the wallet\n- [getWalletVersion](#getwalletversion) - Get the build and version of the LND\n- [grantAccess](#grantaccess) - Grant an access credential macaroon\n- [grpcProxyServer](#grpcproxyserver) - REST proxy server for calling to gRPC\n- [isDestinationPayable](#isdestinationpayable) - Check can pay to destination\n- [lockUtxo](#lockutxo) - Lock a UTXO temporarily to prevent it being used\n- [openChannel](#openchannel) - Open a new channel\n- [openChannels](#openchannels) - Open channels with external funding\n- [parsePaymentRequest](#parsepaymentrequest) - Parse a BOLT11 Payment Request\n- [partiallySignPsbt](#partiallysignpsbt) - Sign a PSBT without finalizing it\n- [pay](#pay) - Send a payment\n- [payViaPaymentDetails](#payviapaymentdetails) - Pay using decomposed details\n- [payViaPaymentRequest](#payviapaymentrequest) - Pay using a payment request\n- [payViaRoutes](#payviaroutes) - Make a payment over specified routes\n- [prepareForChannelProposal](#prepareforchannelproposal) - setup for a channel\n    proposal\n- [probeForRoute](#probeforroute) - Actively probe to find a payable route\n- [proposeChannel](#proposechannel) - Offer a channel proposal to a peer\n- [recoverFundsFromChannel](#recoverfundsfromchannel) - Restore a channel\n- [recoverFundsFromChannels](#recoverfundsfromchannels) - Restore all channels\n- [removeAdvertisedFeature](#removeadvertisedfeature) - Remove feature from ad\n- [removeExternalSocket](#removeexternalsocket) - Remove a p2p host:ip announce\n- [removePeer](#removepeer) - Disconnect from a connected peer\n- [requestBatchedFeeIncrease](#requestbatchedfeeincrease) - Request a batched\n    CPFP spend on an unconfirmed outpoint\n- [requestChainFeeIncrease](#requestchainfeeincrease) - Request a CPFP spend on\n    a UTXO\n- [restrictMacaroon](#restrictmacaroon) - Add limitations to a macaroon\n- [revokeAccess](#revokeaccess) - Revoke all access macaroons given to an id\n- [routeFromChannels](#routefromchannels) - Convert channel series to a route\n- [sendMessageToPeer](#sendmessagetopeer) - Send a custom message to a peer\n- [sendToChainAddress](#sendtochainaddress) - Send on-chain to an address\n- [sendToChainAddresses](#sendtochainaddresses) - Send on-chain to addresses\n- [sendToChainOutputScripts](#sendtochainoutputscripts) - Send to on-chain\n    script outputs\n- [setAutopilot](#setautopilot) - Turn autopilot on and set autopilot scores\n- [settleHodlInvoice](#settlehodlinvoice) - Accept a HODL HTLC invoice\n- [signBytes](#signbytes) -  Sign over arbitrary bytes with node keys\n- [signChainAddressMessage](#signchainaddressmessage) - Sign with chain address\n- [signMessage](#signmessage) - Sign a message with the node identity key\n- [signPsbt](#signpsbt) - Sign and finalize an unsigned PSBT using internal keys\n- [signTransaction](#signtransaction) - Sign an on-chain transaction\n- [stopDaemon](#stopdaemon) - Stop lnd\n- [subscribeToBackups](#subscribetobackups) - Subscribe to channel backups\n- [subscribeToBlocks](#subscribetoblocks) - Subscribe to on-chain blocks\n- [subscribeToChainAddress](#subscribetochainaddress) - Subscribe to receives\n- [subscribeToChainSpend](#subscribetochainspend) - Subscribe to chain spends\n- [subscribeToChannels](#subscribetochannels) - Subscribe to channel statuses\n- [subscribeToForwardRequests](#subscribetoforwardrequests) - Interactively\n    route\n- [subscribeToForwards](#subscribetoforwards) - Subscribe to HTLC events\n- [subscribeToGraph](#subscribetograph) - Subscribe to network graph updates\n- [subscribeToInvoice](#subscribetoinvoice) - Subscribe to invoice updates\n- [subscribeToInvoices](#subscribetoinvoices) - Subscribe to all invoices\n- [subscribeToOpenRequests](#subscribetoopenrequests) - Approve open requests\n- [subscribeToPastPayment](#subscribetopastpayment) - Subscribe to a payment\n- [subscribeToPastPayments](#subscribetopastpayments) - Subscribe to all sent\n    payments\n- [subscribeToPayViaDetails](#subscribetopayviadetails) - Pay using details\n- [subscribeToPayViaRequest](#subscribetopayviarequest) - Pay using a request\n- [subscribeToPayViaRoutes](#subscribetopayviaroutes) - Pay using routes\n- [subscribeToPayments](#subscribetopayments) - Subscribe to outgoing payments\n- [subscribeToPeerMessages](#subscribetopeermessages) - Listen to incoming\n    custom messages\n- [subscribeToPeers](#subscribetopeers) - Subscribe to peers connectivity\n- [subscribeToProbe](#subscribetoprobe) - Subscribe to a probe for a route\n- [subscribeToProbeForRoute](#subscribetoprobeforroute) - Probe for a route\n- [subscribeToRpcRequests](#subscribetorpcrequests) - Subscribe to rpc requests\n- [subscribeToTransactions](#subscribetotransactions) - Subscribe to chain tx\n- [subscribeToWalletStatus](#subscribetowalletstatus) - Subscribe to node state\n- [unauthenticatedLndGrpc](#unauthenticatedLndGrpc) - LND for locked lnd APIs\n- [unlockUtxo](#unlockutxo) - Release a locked UTXO so that it can be used\n    again\n- [unlockWallet](#unlockwallet) - Unlock a locked lnd\n- [updateAlias](#updatealias) - Update node graph identity alias\n- [updateChainTransaction](#updatechaintransaction) - Update a chain\n    transaction\n- [updateColor](#updatecolor) - Update node graph color value\n- [updateConnectedWatchtower](#updateconnectedwatchtower) - Update watchtower\n- [updateGroupSigningSession](#updategroupsigningsession) - Sign with MuSig2\n- [updatePathfindingSettings](#updatepathfindingsettings) - Update pathfinding\n    configuration\n- [updateRoutingFees](#updateroutingfees) - Change routing fees\n- [verifyAccess](#verifyaccess) - Verify a macaroon has access\n- [verifyBackup](#verifybackup) - Verify a channel backup\n- [verifyBackups](#verifybackups) - Verify a set of channel backups\n- [verifyBytesSignature](#verifybytessignature) - Verify a signature over bytes\n- [verifyChainAddressMessage](#verifychainaddressmessage) - Check chain message\n- [verifyMessage](#verifymessage) - Verify a message signed by a node identity\n\n## Additional Libraries\n\n- [bolt01](https://npmjs.com/package/bolt01) - bolt01 messaging utilities\n- [bolt03](https://npmjs.com/package/bolt03) - bolt03 transaction utilities\n- [bolt07](https://npmjs.com/package/bolt07) - bolt07 channel gossip utilities\n- [bolt09](https://npmjs.com/package/bolt09) - bolt09 feature flag utilities\n- [invoices](https://npmjs.com/package/invoices) - bolt11 request utilities\n- [lightning](https://npmjs.com/package/lightning) - methods with typescript\n    typing support\n- [ln-accounting](https://npmjs.com/package/ln-accounting) - accounting records\n- [ln-docker-daemons](https://github.com/alexbosworth/ln-docker-daemons) -\n    run regtest integration tests\n- [ln-pathfinding](https://npmjs.com/package/ln-pathfinding) - pathfinding\n    utilities\n- [ln-sync](https://www.npmjs.com/package/ln-sync) - metadata helper methods\n- [probing](https://npmjs.com/package/probing) - payment probing utilities\n- [psbt](https://www.npmjs.com/package/psbt) - BIP 174 PSBT utilities\n\n### addAdvertisedFeature\n\nAdd an advertised feature to the graph node announcement\n\nNote: this method is not supported in LND versions 0.14.5 and below\n\nRequires LND built with `peersrpc` build tag\n\nRequires `peers:write` permissions\n\n    {\n      feature: \u003cBOLT 09 Feature Bit Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {addAdvertisedFeature} = require('ln-service');\n\n// Add a new supported feature to the graph node announcement\nawait addAdvertisedFeature({lnd, feature: 12345});\n```\n\n### addExternalSocket\n\nAdd a new advertised p2p socket address\n\nNote: this method is not supported in LND versions 0.14.5 and below\n\nRequires LND built with `peersrpc` build tag\n\nRequires `peers:write` permissions\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      socket: \u003cAdd Socket Address String\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {addExternalSocket} = require('ln-service');\n\n// Add a new address to advertise on the graph via gossip\nawait addExternalSocket({lnd, socket: '192.168.0.1:9735'});\n```\n\n### addPeer\n\nAdd a peer if possible (not self, or already connected)\n\nRequires `peers:write` permission\n\n`timeout` is not supported in LND 0.11.1 and below\n\n    {\n      [is_temporary]: \u003cAdd Peer as Temporary Peer Bool\u003e // Default: false\n      lnd: \u003cAuthenticated LND API Object\u003e\n      public_key: \u003cPublic Key Hex String\u003e\n      [retry_count]: \u003cRetry Count Number\u003e\n      [retry_delay]: \u003cDelay Retry By Milliseconds Number\u003e\n      socket: \u003cHost Network Address And Optional Port String\u003e // ip:port\n      [timeout]: \u003cConnection Attempt Timeout Milliseconds Number\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {addPeer} = require('ln-service');\nconst socket = hostIp + ':' + portNumber;\nawait addPeer({lnd, socket, public_key: publicKeyHexString});\n```\n\n### authenticatedLndGrpc\n\nInitiate a gRPC API Methods Object for authenticated methods\n\nBoth the cert and macaroon expect the entire serialized LND generated file\n\n    {\n      [cert]: \u003cBase64 or Hex Serialized LND TLS Cert\u003e\n      [macaroon]: \u003cBase64 or Hex Serialized Macaroon String\u003e\n      [path]: \u003cPath to Proto Files Directory String\u003e\n      [socket]: \u003cHost:Port String\u003e\n    }\n\n    @throws\n    \u003cError\u003e\n\n    @returns\n    {\n      lnd: {\n        autopilot: \u003cAutopilot API Methods Object\u003e\n        chain: \u003cChainNotifier API Methods Object\u003e\n        default: \u003cDefault API Methods Object\u003e\n        invoices: \u003cInvoices API Methods Object\u003e\n        router: \u003cRouter API Methods Object\u003e\n        signer: \u003cSigner Methods API Object\u003e\n        tower_client: \u003cWatchtower Client Methods Object\u003e\n        tower_server: \u003cWatchtower Server Methods API Object\u003e\n        wallet: \u003cWalletKit gRPC Methods API Object\u003e\n        version: \u003cVersion Methods API Object\u003e\n      }\n    }\n\nExample:\n\n```node\nconst lnService = require('ln-service');\nconst {lnd} = lnService.authenticatedLndGrpc({\n  cert: 'base64 encoded tls.cert',\n  macaroon: 'base64 encoded admin.macaroon',\n  socket: '127.0.0.1:10009',\n});\nconst wallet = await lnService.getWalletInfo({lnd});\n```\n\n### beginGroupSigningSession\n\nStart a MuSig2 group signing session\n\nRequires LND built with `signrpc`, `walletrpc` build tags\n\nRequires `address:read`, `signer:generate` permissions\n\nThis method is not supported in LND 0.14.5 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [is_key_spend]: \u003cKey Is BIP 86 Key Spend Key Bool\u003e\n      key_family: \u003cHD Seed Key Family Number\u003e\n      key_index: \u003cKey Index Number\u003e\n      public_keys: [\u003cExternal Public Key Hex String\u003e]\n      [root_hash]: \u003cTaproot Script Root Hash Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      external_key: \u003cFinal Script or Top Level Public Key Hex String\u003e\n      id: \u003cSession Id Hex String\u003e\n      [internal_key]: \u003cInternal Top Level Public Key Hex String\u003e\n      nonce: \u003cSession Compound Nonces Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {beginGroupSigningSession} = require('ln-service');\n\nconst session = await beginGroupSigningSession({\n  lnd,\n  key_family: 0,\n  key_index: 0,\n  public_keys: [externalPublicKey],\n});\n```\n\n### broadcastChainTransaction\n\nPublish a raw blockchain transaction to Blockchain network peers\n\nRequires LND built with `walletrpc` tag\n\n    {\n      [description]: \u003cTransaction Label String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      transaction: \u003cTransaction Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      id: \u003cTransaction Id Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {broadcastChainTransaction} = require('ln-service');\nconst transaction = hexEncodedTransactionString;\n\n// Broadcast transaction to the p2p network\nconst {id} = await broadcastChainTransaction({lnd, transaction});\n```\n\n### cancelHodlInvoice\n\nCancel an invoice\n\nThis call can cancel both HODL invoices and also void regular invoices\n\nRequires LND built with `invoicesrpc`\n\nRequires `invoices:write` permission\n\n    {\n      id: \u003cPayment Preimage Hash Hex String\u003e\n      lnd: \u003cAuthenticated RPC LND API Object\u003e\n    }\n\nExample:\n\n```node\nconst {cancelHodlInvoice} = require('ln-service');\nconst id = paymentRequestPreimageHashHexString;\nawait cancelHodlInvoice({id, lnd});\n```\n\n### cancelPendingChannel\n\nCancel an external funding pending channel\n\n    {\n      id: \u003cPending Channel Id Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n```node\nconst {cancelPendingChannel, openChannels} = require('ln-service');\n\nconst channelsToOpen = [{capacity: 1e6, partner_public_key: publicKey}];\n\nconst {pending} = await openChannels({lnd, channels: channelsToOpen});\n\nconst [id] = pending;\n\n// Cancel the pending channel open request\nawait cancelPendingChannel({id, lnd});\n```\n\n### changePassword\n\nChange wallet password\n\nRequires locked LND and unauthenticated LND connection\n\n    {\n      current_password: \u003cCurrent Password String\u003e\n      lnd: \u003cUnauthenticated LND API Object\u003e\n      new_password: \u003cNew Password String\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {changePassword} = require('ln-service');\nawait changePassword({lnd, current_password: pass, new_password: newPass});\n```\n\n### closeChannel\n\nClose a channel.\n\nEither an id or a transaction id / transaction output index is required\n\nIf cooperatively closing, pass a public key and socket to connect\n\n`max_tokens_per_vbyte` will be ignored when closing a peer initiated channel\n\nRequires `info:read`, `offchain:write`, `onchain:write`, `peers:write`\npermissions\n\n`max_tokens_per_vbyte` is not supported in LND 0.15.0 and below\n\n`is_graceful_close` is not supported in LND 0.17.5 and below\n\n    {\n      [address]: \u003cRequest Sending Local Channel Funds To Address String\u003e\n      [id]: \u003cStandard Format Channel Id String\u003e\n      [is_force_close]: \u003cIs Force Close Bool\u003e\n      [is_graceful_close]: \u003cIs Waiting For Pending Payments to Coop Close Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [max_tokens_per_vbyte]: \u003cFail Cooperative Close Above Fee Rate Number\u003e\n      [public_key]: \u003cPeer Public Key String\u003e\n      [socket]: \u003cPeer Socket String\u003e\n      [target_confirmations]: \u003cConfirmation Target Number\u003e\n      [tokens_per_vbyte]: \u003cTarget Tokens Per Virtual Byte Number\u003e\n      [transaction_id]: \u003cTransaction Id Hex String\u003e\n      [transaction_vout]: \u003cTransaction Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      transaction_id: \u003cClosing Transaction Id Hex String\u003e\n      transaction_vout: \u003cClosing Transaction Vout Number\u003e\n    }\n\nExample:\n\n```node\nconst {closeChannel} = require('ln-service');\nconst closing = await closeChannel({id, lnd});\n```\n\n### connectWatchtower\n\nConnect to a watchtower\n\nThis method requires LND built with `wtclientrpc` build tag\n\nRequires `offchain:write` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      public_key: \u003cWatchtower Public Key Hex String\u003e\n      socket: \u003cNetwork Socket Address IP:PORT String\u003e\n    }\n\nExample:\n\n```node\nconst {connectWatchtower, getTowerServerInfo} = require('ln-service');\n\nconst {tower} = await getTowerServerInfo({lnd: towerServerLnd});\n\nconst [socket] = tower.sockets;\n\nawait connectWatchtower({lnd, socket, public_key: tower.public_key});\n```\n\n### createChainAddress\n\nCreate a new receive address.\n\nRequires `address:write` permission\n\nLND 0.14.5 and below do not support p2tr addresses\n\n    {\n      [format]: \u003cReceive Address Type String\u003e // \"np2wpkh\" || \"p2tr\" || \"p2wpkh\"\n      [is_unused]: \u003cGet As-Yet Unused Address Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      address: \u003cChain Address String\u003e\n    }\n\nExample:\n\n```node\nconst {createChainAddress} = require('ln-service');\nconst format = 'p2wpkh';\nconst {address} = await createChainAddress({format, lnd});\n```\n\n### createFundedPsbt\n\nCreate an unsigned funded PSBT given inputs or outputs\n\nWhen specifying local inputs, they must be locked before using\n\n`change_format` options: `p2tr` (only one change type is supported)\n\n`utxo_selection` methods: 'largest', 'random'\n\nRequires `onchain:write` permission\n\nRequires LND built with `walletrpc` tag\n\nThis method is not supported on LND 0.17.5 or below\n\n    {\n      [fee_tokens_per_vbyte]: \u003cChain Fee Tokens Per Virtual Byte Number\u003e\n      [inputs]: [{\n        [sequence]: \u003cSequence Number\u003e\n        transaction_id: \u003cUnspent Transaction Id Hex String\u003e\n        transaction_vout: \u003cUnspent Transaction Output Index Number\u003e\n      }]\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [min_confirmations]: \u003cSelect Inputs With Minimum Confirmations Number\u003e\n      [outputs]: [{\n        [is_change]: \u003cUse This Output For Change Bool\u003e\n        script: \u003cOutput Script Hex String\u003e\n        tokens: \u003cSend Tokens Tokens Number\u003e\n      }]\n      [target_confirmations]: \u003cBlocks To Wait for Confirmation Number\u003e\n      [timelock]: \u003cSpendable Lock Time on Transaction Number\u003e\n      [utxo_selection]: \u003cSelect Inputs Using Selection Methodology Type String\u003e\n      [version]: \u003cTransaction Version Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      psbt: \u003cUnsigned PSBT Hex String\u003e\n    }\n\n```node\nconst {createFundedPsbt} = require('ln-service');\n\nconst script = '00';\nconst tokens = 1e6;\n\n// Create an unsigned PSBT that sends 1mm to an output script\nconst {psbt} = await createFundedPsbt({lnd, outputs: [{script, tokens}]});\n```\n\n### createHodlInvoice\n\nCreate HODL invoice. This invoice will not settle automatically when an\nHTLC arrives. It must be settled separately with the secret preimage.\n\nWarning: make sure to cancel the created invoice before its CLTV timeout.\n\nRequires LND built with `invoicesrpc` tag\n\nRequires `address:write`, `invoices:write` permission\n\n    {\n      [cltv_delta]: \u003cFinal CLTV Delta Number\u003e\n      [description]: \u003cInvoice Description String\u003e\n      [description_hash]: \u003cHashed Description of Payment Hex String\u003e\n      [expires_at]: \u003cExpires At ISO 8601 Date String\u003e\n      [id]: \u003cPayment Hash Hex String\u003e\n      [is_fallback_included]: \u003cIs Fallback Address Included Bool\u003e\n      [is_fallback_nested]: \u003cIs Fallback Address Nested Bool\u003e\n      [is_including_private_channels]: \u003cInvoice Includes Private Channels Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [mtokens]: \u003cMillitokens String\u003e\n      [routes]: [[{\n        [base_fee_mtokens]: \u003cBase Routing Fee In Millitokens String\u003e\n        [channel]: \u003cStandard Format Channel Id String\u003e\n        [cltv_delta]: \u003cCLTV Blocks Delta Number\u003e\n        [fee_rate]: \u003cFee Rate In Millitokens Per Million Number\u003e\n        public_key: \u003cForward Edge Public Key Hex String\u003e\n      }]]\n      [tokens]: \u003cTokens Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      [chain_address]: \u003cBackup Address String\u003e\n      created_at: \u003cISO 8601 Date String\u003e\n      description: \u003cDescription String\u003e\n      id: \u003cPayment Hash Hex String\u003e\n      mtokens: \u003cMillitokens String\u003e\n      request: \u003cBOLT 11 Encoded Payment Request String\u003e\n      [secret]: \u003cHex Encoded Payment Secret String\u003e\n      tokens: \u003cTokens Number\u003e\n    }\n\nExample:\n\n```node\nconst {createHash, randomBytes} = require('crypto');\nconst {createHodlInvoice, settleHodlInvoice} = require('ln-service');\nconst {subscribeToInvoice} = require('ln-service');\n\nconst randomSecret = () =\u003e randomBytes(32);\nconst sha256 = buffer =\u003e createHash('sha256').update(buffer).digest('hex');\n\n// Choose an r_hash for this invoice, a single sha256, on say randomBytes(32)\nconst secret = randomSecret();\n\nconst id = sha256(secret);\n\n// Supply an authenticatedLndGrpc object for an lnd built with invoicesrpc tag\nconst {request} = await createHodlInvoice({id, lnd});\n\n// Share the request with the payer and wait for a payment\nconst sub = subscribeToInvoice({id, lnd});\n\nsub.on('invoice_updated', async invoice =\u003e {\n  // Only actively held invoices can be settled\n  if (!invoice.is_held) {\n    return;\n  }\n\n  // Use the secret to claim the funds\n  await settleHodlInvoice({lnd, secret: secret.toString('hex')});\n});\n```\n\n### createInvoice\n\nCreate a Lightning invoice.\n\nRequires `address:write`, `invoices:write` permission\n\n`payment` is not supported on LND 0.11.1 and below\n\n    {\n      [cltv_delta]: \u003cCLTV Delta Number\u003e\n      [description]: \u003cInvoice Description String\u003e\n      [description_hash]: \u003cHashed Description of Payment Hex String\u003e\n      [expires_at]: \u003cExpires At ISO 8601 Date String\u003e\n      [is_encrypting_routes]: \u003cUse Blinded Paths For Inbound Routes Bool\u003e\n      [is_fallback_included]: \u003cIs Fallback Address Included Bool\u003e\n      [is_fallback_nested]: \u003cIs Fallback Address Nested Bool\u003e\n      [is_including_private_channels]: \u003cInvoice Includes Private Channels Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [secret]: \u003cPayment Preimage Hex String\u003e\n      [mtokens]: \u003cMillitokens String\u003e\n      [routes]: [[{\n        [base_fee_mtokens]: \u003cBase Routing Fee In Millitokens String\u003e\n        [channel]: \u003cStandard Format Channel Id String\u003e\n        [cltv_delta]: \u003cCLTV Blocks Delta Number\u003e\n        [fee_rate]: \u003cFee Rate In Millitokens Per Million Number\u003e\n        public_key: \u003cForward Edge Public Key Hex String\u003e\n      }]]\n      [tokens]: \u003cTokens Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      [chain_address]: \u003cBackup Address String\u003e\n      created_at: \u003cISO 8601 Date String\u003e\n      [description]: \u003cDescription String\u003e\n      id: \u003cPayment Hash Hex String\u003e\n      [mtokens]: \u003cMillitokens String\u003e\n      [payment]: \u003cPayment Identifying Secret Hex String\u003e\n      request: \u003cBOLT 11 Encoded Payment Request String\u003e\n      secret: \u003cHex Encoded Payment Secret String\u003e\n      [tokens]: \u003cTokens Number\u003e\n    }\n\nExample:\n\n```node\nconst {createInvoice} = require('ln-service');\n\n// Create a zero value invoice\nconst invoice = await createInvoice({lnd});\n```\n\n### createSeed\n\nCreate a wallet seed\n\nRequires unlocked lnd and unauthenticated LND API Object\n\n    {\n      lnd: \u003cUnauthenticated LND API Object\u003e\n      [passphrase]: \u003cSeed Passphrase String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      seed: \u003cCipher Seed Mnemonic String\u003e\n    }\n\nExample:\n\n```node\nconst {createSeed, createWallet} = require('ln-service');\nconst {seed} = await createSeed({lnd});\n\n// Use the seed to create a wallet\nawait createWallet({lnd, seed, password: '123456'});\n```\n\n### createSignedRequest\n\nAssemble a signed payment request\n\n    {\n      destination: \u003cDestination Public Key Hex String\u003e\n      hrp: \u003cRequest Human Readable Part String\u003e\n      signature: \u003cRequest Hash Signature Hex String\u003e\n      tags: [\u003cRequest Tag Word Number\u003e]\n    }\n\n    @throws\n    \u003cError\u003e\n\n    @returns\n    {\n      request: \u003cBOLT 11 Encoded Payment Request String\u003e\n    }\n\nExample:\n\n```node\nconst {createSignedRequest} = require('ln-service');\n\n// Get hrp and signature from createUnsignedRequest\n// Get signature via standard private key signing, or LND signBytes\nconst {request} = createSignedRequest({\n  destination: nodePublicKey,\n  hrp: amountAndNetworkHrp,\n  signature: signedPreimageHash,\n  tags: paymentRequestTags,\n});\n```\n\n### createUnsignedRequest\n\nCreate an unsigned payment request\n\n    {\n      [chain_addresses]: [\u003cChain Address String\u003e]\n      [cltv_delta]: \u003cCLTV Delta Number\u003e\n      [created_at]: \u003cInvoice Creation Date ISO 8601 String\u003e\n      [description]: \u003cDescription String\u003e\n      [description_hash]: \u003cDescription Hash Hex String\u003e\n      destination: \u003cPublic Key String\u003e\n      [expires_at]: \u003cISO 8601 Date String\u003e\n      features: [{\n        bit: \u003cBOLT 09 Feature Bit Number\u003e\n      }]\n      id: \u003cPreimage SHA256 Hash Hex String\u003e\n      [mtokens]: \u003cRequested Milli-Tokens Value String\u003e (can exceed Number limit)\n      network: \u003cNetwork Name String\u003e\n      [payment]: \u003cPayment Identifier Hex String\u003e\n      [routes]: [[{\n        [base_fee_mtokens]: \u003cBase Fee Millitokens String\u003e\n        [channel]: \u003cStandard Format Channel Id String\u003e\n        [cltv_delta]: \u003cFinal CLTV Expiration Blocks Delta Number\u003e\n        [fee_rate]: \u003cFees Charged in Millitokens Per Million Number\u003e\n        public_key: \u003cForward Edge Public Key Hex String\u003e\n      }]]\n      [tokens]: \u003cRequested Chain Tokens Number\u003e (note: can differ from mtokens)\n    }\n\n    @returns\n    {\n      hash: \u003cPayment Request Signature Hash Hex String\u003e\n      hrp: \u003cHuman Readable Part of Payment Request String\u003e\n      preimage: \u003cSignature Hash Preimage Hex String\u003e\n      tags: [\u003cData Tag Number\u003e]\n    }\n\nExample:\n\n```node\nconst {createUnsignedRequest} = require('ln-service');\n\nconst unsignedComponents = createUnsignedRequest({\n  destination: nodePublicKey,\n  id: rHashHexString,\n  network: 'bitcoin',\n});\n// Use createSignedRequest and a signature to create a complete request\n```\n\n### createWallet\n\nCreate a wallet\n\nRequires unlocked lnd and unauthenticated LND API Object\n\n    {\n      lnd: \u003cUnauthenticated LND API Object\u003e\n      [passphrase]: \u003cAEZSeed Encryption Passphrase String\u003e\n      password: \u003cWallet Password String\u003e\n      seed: \u003cSeed Mnemonic String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      macaroon: \u003cBase64 Encoded Admin Macaroon String\u003e\n    }\n\nExample:\n\n```node\nconst {createWallet} = require('ln-service');\nconst {seed} = await createSeed({lnd});\nawait createWallet({lnd, seed, password: 'password'});\n```\n\n### decodePaymentRequest\n\nGet decoded payment request\n\nRequires `offchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      request: \u003cBOLT 11 Payment Request String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      chain_address: \u003cFallback Chain Address String\u003e\n      [cltv_delta]: \u003cFinal CLTV Delta Number\u003e\n      created_at: \u003cPayment Request Created At ISO 8601 Date String\u003e\n      description: \u003cPayment Description String\u003e\n      description_hash: \u003cPayment Longer Description Hash Hex String\u003e\n      destination: \u003cPublic Key Hex String\u003e\n      expires_at: \u003cISO 8601 Date String\u003e\n      features: [{\n        bit: \u003cBOLT 09 Feature Bit Number\u003e\n        is_known: \u003cFeature is Known Bool\u003e\n        is_required: \u003cFeature Support is Required To Pay Bool\u003e\n        type: \u003cFeature Type String\u003e\n      }]\n      id: \u003cPayment Hash Hex String\u003e\n      is_expired: \u003cInvoice is Expired Bool\u003e\n      mtokens: \u003cRequested Millitokens String\u003e\n      [payment]: \u003cPayment Identifier Hex Encoded String\u003e\n      routes: [[{\n        [base_fee_mtokens]: \u003cBase Routing Fee In Millitokens String\u003e\n        [channel]: \u003cStandard Format Channel Id String\u003e\n        [cltv_delta]: \u003cCLTV Blocks Delta Number\u003e\n        [fee_rate]: \u003cFee Rate In Millitokens Per Million Number\u003e\n        public_key: \u003cForward Edge Public Key Hex String\u003e\n      }]]\n      safe_tokens: \u003cRequested Tokens Rounded Up Number\u003e\n      tokens: \u003cRequested Tokens Rounded Down Number\u003e\n    }\n\nExample:\n\n```node\nconst {decodePaymentRequest} = require('ln-service');\nconst request = 'bolt11EncodedPaymentRequestString';\nconst details = await decodePaymentRequest({lnd, request});\n```\n\n### deleteChainTransaction\n\nRemove a chain transaction.\n\nRequires `onchain:write` permission\n\nThis method is not supported on LND 0.17.5 and below\n\n    {\n      id: \u003cTransaction Id Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deleteChainTransaction} = require('ln-service');\n\n// Eliminate past broadcast chain transaction\nawait deleteChainTransaction({id, lnd});\n```\n\n### deleteFailedPayAttempts\n\nDelete failed payment attempt records\n\nRequires `offchain:write` permission\n\nMethod not supported on LND 0.12.1 or below\n\n`id` is not supported on LND 0.13.4 or below\n\n    {\n      [id]: \u003cDelete Only Failed Attempt Records For Payment With Hash Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deleteFailedPayAttempts} = require('ln-service');\n\n// Eliminate all the records of past failed payment attempts\nawait deleteFailedPayAttempts({lnd});\n```\n\n### deleteFailedPayments\n\nDelete failed payment records\n\nRequires `offchain:write` permission\n\nMethod not supported on LND 0.12.1 or below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deleteFailedPayments} = require('ln-service');\n\n// Eliminate all the records of past failed payments\nawait deleteFailedPayments({lnd});\n```\n\n### deleteForwardingReputations\n\nDelete all forwarding reputations\n\nRequires `offchain:write` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deleteForwardingReputations} = require('ln-service');\n\n// Delete all routing reputations to clear pathfinding memory\nawait deleteForwardingReputations({});\n```\n\n### deletePayment\n\nDelete a payment record\n\nRequires `offchain:write` permission\n\nNote: this method is not supported on LND 0.13.4 and below\n\n    {\n      id: \u003cPayment Preimage Hash Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deletePayment} = require('ln-service');\n\n// Eliminate the records of a payment\nawait deletePayment({id, lnd});\n```\n\n### deletePayments\n\nDelete all records of payments\n\nRequires `offchain:write` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {deletePayments} = require('ln-service');\n\n// Eliminate all the records of past payments\nawait deletePayments({lnd});\n```\n\n### deletePendingChannel\n\nDelete a pending channel\n\nPass the confirmed conflicting transaction that spends the same input to\nmake sure that no funds are being deleted.\n\nThis method is not supported on LND 0.13.3 and below\n\n    {\n      confirmed_transaction: \u003cHex Encoded Conflicting Transaction String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      pending_transaction: \u003cHex Encoded Pending Transaction String\u003e\n      pending_transaction_vout: \u003cPending Channel Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n\n```node\nconst {deletePendingChannel} = require('ln-service');\n\n// Delete a stuck pending channel\nawait deletePendingChannel({\n  lnd,\n  confirmed_transaction: confirmedTransactionHex,\n  pending_transaction: stuckPendingChannelOpenTxHex,\n  pending_transaction_vout: pendingChannelOutputIndexNumber,\n});\n```\n\n### diffieHellmanComputeSecret\n\nDerive a shared secret\n\nKey family and key index default to 6 and 0, which is the node identity key\n\nRequires LND built with `signerrpc` build tag\n\nRequires `signer:generate` permission\n\n    {\n      [key_family]: \u003cKey Family Number\u003e\n      [key_index]: \u003cKey Index Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      partner_public_key: \u003cPublic Key Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      secret: \u003cShared Secret Hex String\u003e\n    }\n\n### disableChannel\n\nMark a channel as temporarily disabled for outbound payments and forwards\n\nNote: this method is not supported in LND versions 0.12.1 and below\n\nRequires `offchain:write` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      transaction_id: \u003cChannel Funding Transaction Id Hex String\u003e\n      transaction_vout: \u003cChannel Funding Transaction Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {disableChannel} = await require('ln-service');\n\nconst [channel] = (await getChannels({lnd})).channels;\n\n// Disable outgoing traffic via the channel\nawait disableChannel({\n  lnd,\n  transaction_id: channel.transaction_id,\n  transaction_vout: channel.transaction_vout,\n});\n```\n\n### disconnectWatchtower\n\nDisconnect a watchtower\n\nRequires LND built with `wtclientrpc` build tag\n\nRequires `offchain:write` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      public_key: \u003cWatchtower Public Key Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n\n```node\nconst {disconnectWatchtower, getConnectedWatchtowers} = require('ln-service');\n\nconst [tower] = (await getConnectedWatchtowers({lnd})).towers;\n\nawait disconnectWatchtower({lnd, public_key: tower.public_key});\n```\n\n### enableChannel\n\nMark a channel as enabled for outbound payments and forwards\n\nSetting `is_force_enable` will prevent future automated disabling/enabling\n\nNote: this method is not supported in LND versions 0.12.1 and below\n\nRequires `offchain:write` permission\n\n    {\n      [is_force_enable]: \u003cForce Channel Enabled Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      transaction_id: \u003cChannel Funding Transaction Id Hex String\u003e\n      transaction_vout: \u003cChannel Funding Transaction Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n\nExample:\n\n```node\nconst {enableChannel} = await require('ln-service');\n\nconst [channel] = (await getChannels({lnd})).channels;\n\n// Enable outgoing traffic via the channel\nawait enableChannel({\n  lnd,\n  transaction_id: channel.transaction_id,\n  transaction_vout: channel.transaction_vout,\n});\n```\n\n### endGroupSigningSession\n\nComplete a MuSig2 signing session\n\nRequires LND built with `signrpc` build tag\n\nRequires `signer:generate` permission\n\nThis method is not supported in LND 0.14.5 and below\n\n    {\n      id: \u003cSession Id Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [signatures]: [\u003cCombine External Partial Signature Hex String\u003e]\n    }\n\n    @returns via cbk or Promise\n    {\n      [signature]: \u003cCombined Signature Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {endGroupSigningSession} = require('ln-service');\n\n// Cancel a group signing session\nawait endGroupSigningSession({id, lnd});\n```\n\n### fundPendingChannels\n\nFund pending channels\n\nRequires `offchain:write`, `onchain:write` permissions\n\n    {\n      channels: [\u003cPending Channel Id Hex String\u003e]\n      funding: \u003cSigned Funding Transaction PSBT Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n\n```node\nconst {fundPendingChannels, openChannels} = require('ln-service');\n\nconst channelsToOpen = [{capacity: 1e6, partner_public_key: publicKey}];\n\nconst {pending} = await openChannels({lnd, channel: channelsToOpen});\n\nconst channels = pending.map(n =\u003e n.id);\n\n// Fund the pending open channels request\nawait fundPendingChannels({channels, lnd, funding: psbt});\n```\n\n### fundPsbt\n\nLock and optionally select inputs to a partially signed transaction\n\nSpecify outputs or PSBT with the outputs encoded\n\nIf there are no inputs passed, internal UTXOs will be selected and locked\n\n`utxo_selection` methods: 'largest', 'random'\n\n`change_format` options: `p2tr` (only one change type is supported)\n\nRequires `onchain:write` permission\n\nRequires LND built with `walletrpc` tag\n\nThis method is not supported in LND 0.11.1 and below\n\nSpecifying 0 for `min_confirmations` is not supported in LND 0.13.0 and below\n\n`utxo_selection` is not supported in LND 0.17.5 and below\n\n    {\n      [change_format]: \u003cChange Address Address Format String\u003e\n      [fee_tokens_per_vbyte]: \u003cChain Fee Tokens Per Virtual Byte Number\u003e\n      [inputs]: [{\n        transaction_id: \u003cUnspent Transaction Id Hex String\u003e\n        transaction_vout: \u003cUnspent Transaction Output Index Number\u003e\n      }]\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [min_confirmations]: \u003cSpend UTXOs With Minimum Confirmations Number\u003e\n      [outputs]: [{\n        address: \u003cChain Address String\u003e\n        tokens: \u003cSend Tokens Tokens Number\u003e\n      }]\n      [target_confirmations]: \u003cConfirmations To Wait Number\u003e\n      [psbt]: \u003cExisting PSBT Hex String\u003e\n      [utxo_selection]: \u003cSelect UTXOs Using Method String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      inputs: [{\n        [lock_expires_at]: \u003cUTXO Lock Expires At ISO 8601 Date String\u003e\n        [lock_id]: \u003cUTXO Lock Id Hex String\u003e\n        transaction_id: \u003cUnspent Transaction Id Hex String\u003e\n        transaction_vout: \u003cUnspent Transaction Output Index Number\u003e\n      }]\n      outputs: [{\n        is_change: \u003cSpends To a Generated Change Output Bool\u003e\n        output_script: \u003cOutput Script Hex String\u003e\n        tokens: \u003cSend Tokens Tokens Number\u003e\n      }]\n      psbt: \u003cUnsigned PSBT Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {fundPsbt} = require('ln-service');\n\nconst address = 'chainAddress';\nconst tokens = 1000000;\n\n// Create an unsigned PSBT that sends 1mm to a chain address\nconst {psbt} = await fundPsbt({lnd, outputs: [{address, tokens}]});\n\n// This PSBT can be used with signPsbt to sign and finalize for broadcast\n```\n\n### getAccessIds\n\nGet outstanding access ids given out\n\nNote: this method is not supported in LND versions 0.11.1 and below\n\nRequires `macaroon:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      ids: [\u003cRoot Access Id Number\u003e]\n    }\n\nExample:\n\n```node\nconst {getAccessIds, grantAccess} = require('ln-service');\n\n// Create a macaroon that can be used to make off-chain payments\nconst {macaroon} = await grantAccess({lnd, id: '1', is_ok_to_pay: true});\n\n// Get outstanding ids\nconst {ids} = await getAccessIds({lnd});\n\n// The specified id '1' will appear in the ids array\n```\n\n### getAutopilot\n\nGet Autopilot status\n\nOptionally, get the score of nodes as considered by the autopilot.\nLocal scores reflect an internal scoring that includes local channel info\n\nPermission `info:read` is required\n\n    {\n      lnd: \u003cAuthenticated LND Object\u003e\n      [node_scores]: [\u003cGet Score For Public Key Hex String\u003e]\n    }\n\n    @returns via cbk or Promise\n    {\n      is_enabled: \u003cAutopilot is Enabled Bool\u003e\n      nodes: [{\n        local_preferential_score: \u003cLocal-adjusted Pref Attachment Score Number\u003e\n        local_score: \u003cLocal-adjusted Externally Set Score Number\u003e\n        preferential_score: \u003cPreferential Attachment Score Number\u003e\n        public_key: \u003cNode Public Key Hex String\u003e\n        score: \u003cExternally Set Score Number\u003e\n        weighted_local_score: \u003cCombined Weighted Locally-Adjusted Score Number\u003e\n        weighted_score: \u003cCombined Weighted Score Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getAutopilot} = require('ln-service');\nconst isAutopilotEnabled = (await getAutopilot({lnd})).is_enabled;\n```\n\n### getBackup\n\nGet the static channel backup for a channel\n\nRequires `offchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      transaction_id: \u003cFunding Transaction Id Hex String\u003e\n      transaction_vout: \u003cFunding Transaction Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      backup: \u003cChannel Backup Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {getBackup, getChannels} = require('ln-service');\nconst [channel] = (await getChannels({lnd})).channels;\nconst {backup} = await getBackup({\n  lnd,\n  transaction_id: channel.transaction_id,\n  transaction_vout: channel.transaction_vout,\n});\n```\n\n### getBackups\n\nGet all channel backups\n\nRequires `offchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      backup: \u003cAll Channels Backup Hex String\u003e\n      channels: [{\n        backup: \u003cIndividualized Channel Backup Hex String\u003e\n        transaction_id: \u003cChannel Funding Transaction Id Hex String\u003e\n        transaction_vout: \u003cChannel Funding Transaction Output Index Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getBackups} = require('ln-service');\nconst {backup} = await getBackups({lnd});\n```\n\n### getBlock\n\nGet a block in the chain\n\nThis method requires LND built with `chainrpc` build tag\n\nRequires `onchain:read` permission\n\nThis method is not supported on LND 0.15.5 and below\n\n    {\n      [height]: \u003cBlock Height Number\u003e\n      [id]: \u003cBlock Hash Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      block: \u003cRaw Block Bytes Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {getBlock, getHeight} = require('ln-service');\n\nconst chain = await getHeight({lnd});\n\nconst {block} = await getBlock({lnd, id: chain.current_block_hash});\n\nconst lastBlockSize = Buffer.from(block, 'hex').byteLength();\n```\n\n### getBlockHeader\n\nGet a block header in the best chain\n\nThis method requires LND built with `chainrpc` build tag\n\nRequires `onchain:read` permission\n\nThis method is not supported on LND 0.17.0 and below\n\n    {\n      [height]: \u003cBlock Height Number\u003e\n      [id]: \u003cBlock Hash Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      header: \u003cRaw Block Header Bytes Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {getBlockHeader, getHeight} = require('ln-service');\n\nconst chain = await getHeight({lnd});\n\nconst {header} = await getBlockHeader({lnd, id: chain.current_block_hash});\n\nconst lastBlockHeader = Buffer.from(header, 'hex');\n```\n\n### getChainAddresses\n\nGet the wallet chain addresses\n\nRequires `onchain:read` permission\n\nThis method is not supported on LND 0.15.5 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      addresses: [{\n        address: \u003cChain Address String\u003e\n        is_change: \u003cIs Internal Change Address Bool\u003e\n        tokens: \u003cBalance of Funds Controlled by Output Script Tokens Number\u003e\n      }]\n    }\n\n```node\nconst {getChainAddresses} = require('ln-service');\n\n// How many chain addresses have been created\nconst numberOfChainAddresses = (await getChainAddresses({lnd})).addresses;\n```\n\n### getChainBalance\n\nGet balance on the chain.\n\nRequires `onchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      chain_balance: \u003cConfirmed Chain Balance Tokens Number\u003e\n    }\n\nExample:\n\n```node\nconst {getChainBalance} = require('ln-service');\nconst chainBalance = (await getChainBalance({lnd})).chain_balance;\n```\n\n### getChainFeeEstimate\n\nGet a chain fee estimate for a prospective chain send\n\n`utxo_selection` methods: 'largest', 'random'\n\nRequires `onchain:read` permission\n\nSpecifying 0 for `utxo_confirmations` is not supported in LND 0.13.0 or below\n\n`utxo_selection` is not supported in LND 0.17.5 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n      send_to: [{\n        address: \u003cAddress String\u003e\n        tokens: \u003cTokens Number\u003e\n      }]\n      [target_confirmations]: \u003cTarget Confirmations Number\u003e\n      [utxo_confirmations]: \u003cMinimum Confirmations for UTXO Selection Number\u003e\n      [utxo_selection]: \u003cSelect UTXOs Using Method String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      fee: \u003cTotal Fee Tokens Number\u003e\n      tokens_per_vbyte: \u003cFee Tokens Per VByte Number\u003e\n    }\n\nExample:\n\n```node\nconst {getChainFeeEstimate} = require('ln-service');\nconst sendTo = [{address: 'chainAddressString', tokens: 100000000}];\nconst {fee} = await getChainFeeEstimate({lnd, send_to: sendTo});\n```\n\n### getChainFeeRate\n\nGet chain fee rate estimate\n\nRequires LND built with `walletrpc` tag\n\nRequires `onchain:read` permission\n\n    {\n      [confirmation_target]: \u003cFuture Blocks Confirmation Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      tokens_per_vbyte: \u003cTokens Per Virtual Byte Number\u003e\n    }\n\nExample:\n\n```node\nconst {getChainFeeRate} = require('ln-service');\nconst fee = (await getChainFeeRate({lnd, confirmation_target: 6})).tokens_per_vbyte;\n```\n\n### getChainTransaction\n\nGet a chain transaction.\n\nRequires `onchain:read` permission\n\nThis method is not supported on LND 0.17.5 and below\n\n    {\n      id: \u003cTransaction Id Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      [block_id]: \u003cBlock Hash String\u003e\n      [confirmation_count]: \u003cConfirmation Count Number\u003e\n      [confirmation_height]: \u003cConfirmation Block Height Number\u003e\n      created_at: \u003cCreated ISO 8601 Date String\u003e\n      [description]: \u003cTransaction Label String\u003e\n      [fee]: \u003cFees Paid Tokens Number\u003e\n      id: \u003cTransaction Id String\u003e\n      inputs: [{\n        is_local: \u003cSpent Outpoint is Local Bool\u003e\n        transaction_id: \u003cTransaction Id Hex String\u003e\n        transaction_vout: \u003cTransaction Output Index Number\u003e\n      }]\n      is_confirmed: \u003cIs Confirmed Bool\u003e\n      is_outgoing: \u003cTransaction Outbound Bool\u003e\n      output_addresses: [\u003cAddress String\u003e]\n      tokens: \u003cTokens Including Fee Number\u003e\n      [transaction]: \u003cRaw Transaction Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {getChainTransaction} = require('ln-service');\nconst txIsConfirmed = (await getChainTransaction({id, lnd})).is_confirmed;\n```\n\n### getChainTransactions\n\nGet chain transactions.\n\nRequires `onchain:read` permission\n\n`inputs` are not supported on LND 0.15.0 and below\n\n    {\n      [after]: \u003cConfirmed After Current Best Chain Block Height Number\u003e\n      [before]: \u003cConfirmed Before Current Best Chain Block Height Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      transactions: [{\n        [block_id]: \u003cBlock Hash String\u003e\n        [confirmation_count]: \u003cConfirmation Count Number\u003e\n        [confirmation_height]: \u003cConfirmation Block Height Number\u003e\n        created_at: \u003cCreated ISO 8601 Date String\u003e\n        [description]: \u003cTransaction Label String\u003e\n        [fee]: \u003cFees Paid Tokens Number\u003e\n        id: \u003cTransaction Id String\u003e\n        inputs: [{\n          is_local: \u003cSpent Outpoint is Local Bool\u003e\n          transaction_id: \u003cTransaction Id Hex String\u003e\n          transaction_vout: \u003cTransaction Output Index Number\u003e\n        }]\n        is_confirmed: \u003cIs Confirmed Bool\u003e\n        is_outgoing: \u003cTransaction Outbound Bool\u003e\n        output_addresses: [\u003cAddress String\u003e]\n        tokens: \u003cTokens Including Fee Number\u003e\n        [transaction]: \u003cRaw Transaction Hex String\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getChainTransactions} = require('ln-service');\nconst {transactions} = await getChainTransactions({lnd});\n```\n\n### getChannelBalance\n\nGet balance across channels.\n\nRequires `offchain:read` permission\n\n`channel_balance_mtokens` is not supported on LND 0.11.1 and below\n\n`inbound` and `inbound_mtokens` are not supported on LND 0.11.1 and below\n\n`pending_inbound` is not supported on LND 0.11.1 and below\n\n`unsettled_balance` is not supported on LND 0.11.1 and below\n\n`unsettled_balance_mtokens` is not supported on LND 0.11.1 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channel_balance: \u003cChannels Balance Tokens Number\u003e\n      [channel_balance_mtokens]: \u003cChannels Balance Millitokens String\u003e\n      [inbound]: \u003cInbound Liquidity Tokens Number\u003e\n      [inbound_mtokens]: \u003cInbound Liquidity Millitokens String\u003e\n      pending_balance: \u003cPending On-Chain Channels Balance Tokens Number\u003e\n      [pending_inbound]: \u003cPending On-Chain Inbound Liquidity Tokens Number\u003e\n      [unsettled_balance]: \u003cIn-Flight Tokens Number\u003e\n      [unsettled_balance_mtokens]: \u003cIn-Flight Millitokens String\u003e\n    }\n\nExample:\n\n```node\nconst {getChannelBalance} = require('ln-service');\nconst balanceInChannels = (await getChannelBalance({lnd})).channel_balance;\n```\n\n### getChannel\n\nGet graph information about a channel on the network\n\nEither channel `id` or a `transaction_id` and `transaction_vout` is required\n\nRequires `info:read` permission\n\n`inbound_base_discount_mtokens` is not supported on LND 0.17.5 and below\n\n`inbound_rate_discount` is not supported on LND 0.17.5 and below\n\n`transaction_id` is not supported on LND 0.18.0 and below\n\n`transaction_vout` is not supported on LND 0.18.0 and below\n\n    {\n      [id]: \u003cStandard Format Channel Id String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [transaction_id]: \u003cFunding Outpoint Transaction Id Hex String\u003e\n      [transaction_vout]: \u003cFunding Outpoint Transaction Output Index Number\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      capacity: \u003cMaximum Tokens Number\u003e\n      id: \u003cStandard Format Channel Id String\u003e\n      policies: [{\n        [base_fee_mtokens]: \u003cBase Fee Millitokens String\u003e\n        [cltv_delta]: \u003cLocktime Delta Number\u003e\n        [fee_rate]: \u003cFees Charged in Millitokens Per Million Number\u003e\n        [inbound_base_discount_mtokens]: \u003cSource Based Base Fee Reduction String\u003e\n        [inbound_rate_discount]: \u003cSource Based Per Million Rate Reduction Number\u003e\n        [is_disabled]: \u003cChannel Is Disabled Bool\u003e\n        [max_htlc_mtokens]: \u003cMaximum HTLC Millitokens Value String\u003e\n        [min_htlc_mtokens]: \u003cMinimum HTLC Millitokens Value String\u003e\n        public_key: \u003cNode Public Key String\u003e\n        [updated_at]: \u003cEdge Last Updated At ISO 8601 Date String\u003e\n      }]\n      transaction_id: \u003cTransaction Id Hex String\u003e\n      transaction_vout: \u003cTransaction Output Index Number\u003e\n      [updated_at]: \u003cChannel Last Updated At ISO 8601 Date String\u003e\n    }\n\nExample:\n\n```node\nconst {getChannel} = await require('ln-service');\nconst id = '0x0x0';\nconst channelDetails = await getChannel({id, lnd});\n```\n\n### getChannels\n\nGet channels\n\nRequires `offchain:read` permission\n\n`in_channel`, `in_payment`, `is_forward`, `out_channel`, `out_payment`,\n`payment` are not supported on LND 0.11.1 and below\n\n`is_trusted_funding` is not supported on LND 0.15.0 and below\n\n`description` is not supported on LND 0.16.4 and below\n\n    {\n      [is_active]: \u003cLimit Results To Only Active Channels Bool\u003e // false\n      [is_offline]: \u003cLimit Results To Only Offline Channels Bool\u003e // false\n      [is_private]: \u003cLimit Results To Only Private Channels Bool\u003e // false\n      [is_public]: \u003cLimit Results To Only Public Channels Bool\u003e // false\n      lnd: \u003cAuthenticated LND gRPC API Object\u003e\n      [partner_public_key]: \u003cOnly Channels With Public Key Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channels: [{\n        capacity: \u003cChannel Token Capacity Number\u003e\n        commit_transaction_fee: \u003cCommit Transaction Fee Number\u003e\n        commit_transaction_weight: \u003cCommit Transaction Weight Number\u003e\n        [cooperative_close_address]: \u003cCoop Close Restricted to Address String\u003e\n        [cooperative_close_delay_height]: \u003cPrevent Coop Close Until Height Number\u003e\n        [description]: \u003cChannel Description String\u003e\n        id: \u003cStandard Format Channel Id String\u003e\n        is_active: \u003cChannel Active Bool\u003e\n        is_closing: \u003cChannel Is Closing Bool\u003e\n        is_opening: \u003cChannel Is Opening Bool\u003e\n        is_partner_initiated: \u003cChannel Partner Opened Channel Bool\u003e\n        is_private: \u003cChannel Is Private Bool\u003e\n        [is_trusted_funding]: \u003cFunding Output is Trusted Bool\u003e\n        local_balance: \u003cLocal Balance Tokens Number\u003e\n        [local_csv]: \u003cLocal CSV Blocks Delay Number\u003e\n        [local_dust]: \u003cLocal Non-Enforceable Amount Tokens Number\u003e\n        [local_given]: \u003cLocal Initially Pushed Tokens Number\u003e\n        [local_max_htlcs]: \u003cLocal Maximum Attached HTLCs Number\u003e\n        [local_max_pending_mtokens]: \u003cLocal Maximum Pending Millitokens String\u003e\n        [local_min_htlc_mtokens]: \u003cLocal Minimum HTLC Millitokens String\u003e\n        local_reserve: \u003cLocal Reserved Tokens Number\u003e\n        other_ids: [\u003cOther Channel Id String\u003e]\n        partner_public_key: \u003cChannel Partner Public Key String\u003e\n        past_states: \u003cTotal Count of Past Channel States Number\u003e\n        pending_payments: [{\n          id: \u003cPayment Preimage Hash Hex String\u003e\n          [in_channel]: \u003cForward Inbound From Channel Id String\u003e\n          [in_payment]: \u003cPayment Index on Inbound Channel Number\u003e\n          [is_forward]: \u003cPayment is a Forward Bool\u003e\n          is_outgoing: \u003cPayment Is Outgoing Bool\u003e\n          [out_channel]: \u003cForward Outbound To Channel Id String\u003e\n          [out_payment]: \u003cPayment Index on Outbound Channel Number\u003e\n          [payment]: \u003cPayment Attempt Id Number\u003e\n          timeout: \u003cChain Height Expiration Number\u003e\n          tokens: \u003cPayment Tokens Number\u003e\n        }]\n        received: \u003cReceived Tokens Number\u003e\n        remote_balance: \u003cRemote Balance Tokens Number\u003e\n        [remote_csv]: \u003cRemote CSV Blocks Delay Number\u003e\n        [remote_dust]: \u003cRemote Non-Enforceable Amount Tokens Number\u003e\n        [remote_given]: \u003cRemote Initially Pushed Tokens Number\u003e\n        [remote_max_htlcs]: \u003cRemote Maximum Attached HTLCs Number\u003e\n        [remote_max_pending_mtokens]: \u003cRemote Maximum Pending Millitokens String\u003e\n        [remote_min_htlc_mtokens]: \u003cRemote Minimum HTLC Millitokens String\u003e\n        remote_reserve: \u003cRemote Reserved Tokens Number\u003e\n        sent: \u003cSent Tokens Number\u003e\n        [time_offline]: \u003cMonitoring Uptime Channel Down Milliseconds Number\u003e\n        [time_online]: \u003cMonitoring Uptime Channel Up Milliseconds Number\u003e\n        transaction_id: \u003cBlockchain Transaction Id String\u003e\n        transaction_vout: \u003cBlockchain Transaction Vout Number\u003e\n        [type]: \u003cChannel Commitment Transaction Type String\u003e\n        unsettled_balance: \u003cUnsettled Balance Tokens Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getChannels} = require('ln-service');\n\n// Get the channels and count how many there are\nconst channelsCount = (await getChannels({lnd})).length;\n```\n\n### getClosedChannels\n\nGet closed out channels\n\nMultiple close type flags are supported.\n\nRequires `offchain:read` permission\n\n`other_ids is not supported on LND 0.15.0 and below\n\n    {\n      [is_breach_close]: \u003cOnly Return Breach Close Channels Bool\u003e\n      [is_cooperative_close]: \u003cOnly Return Cooperative Close Channels Bool\u003e\n      [is_funding_cancel]: \u003cOnly Return Funding Canceled Channels Bool\u003e\n      [is_local_force_close]: \u003cOnly Return Local Force Close Channels Bool\u003e\n      [is_remote_force_close]: \u003cOnly Return Remote Force Close Channels Bool\u003e\n      lnd: \u003cAuthenticated LND gRPC API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channels: [{\n        [anchor_is_confirmed]: \u003cAnchor Sweep Confirmed Bool\u003e\n        [anchor_is_pending]: \u003cAnchor Sweep Pending Confirmation Bool\u003e\n        [anchor_spent_by]: \u003cAnchor Sweep Transaction Id Hex String\u003e\n        [anchor_vout]: \u003cAnchor Output Index Number\u003e\n        capacity: \u003cClosed Channel Capacity Tokens Number\u003e\n        [close_balance_spent_by]: \u003cChannel Balance Output Spent By Tx Id String\u003e\n        [close_balance_vout]: \u003cChannel Balance Close Tx Output Index Number\u003e\n        close_payments: [{\n          is_outgoing: \u003cPayment Is Outgoing Bool\u003e\n          is_paid: \u003cPayment Is Claimed With Preimage Bool\u003e\n          is_pending: \u003cPayment Resolution Is Pending Bool\u003e\n          is_refunded: \u003cPayment Timed Out And Went Back To Payer Bool\u003e\n          [spent_by]: \u003cClose Transaction Spent By Transaction Id Hex String\u003e\n          tokens: \u003cAssociated Tokens Number\u003e\n          transaction_id: \u003cTransaction Id Hex String\u003e\n          transaction_vout: \u003cTransaction Output Index Number\u003e\n        }]\n        [close_confirm_height]: \u003cChannel Close Confirmation Height Number\u003e\n        [close_transaction_id]: \u003cClosing Transaction Id Hex String\u003e\n        final_local_balance: \u003cChannel Close Final Local Balance Tokens Number\u003e\n        final_time_locked_balance: \u003cClosed Channel Timelocked Tokens Number\u003e\n        [id]: \u003cClosed Standard Format Channel Id String\u003e\n        is_breach_close: \u003cIs Breach Close Bool\u003e\n        is_cooperative_close: \u003cIs Cooperative Close Bool\u003e\n        is_funding_cancel: \u003cIs Funding Cancelled Close Bool\u003e\n        is_local_force_close: \u003cIs Local Force Close Bool\u003e\n        [is_partner_closed]: \u003cChannel Was Closed By Channel Peer Bool\u003e\n        [is_partner_initiated]: \u003cChannel Was Initiated By Channel Peer Bool\u003e\n        is_remote_force_close: \u003cIs Remote Force Close Bool\u003e\n        other_ids: [\u003cOther Channel Id String\u003e]\n        partner_public_key: \u003cPartner Public Key Hex String\u003e\n        transaction_id: \u003cChannel Funding Transaction Id Hex String\u003e\n        transaction_vout: \u003cChannel Funding Output Index Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getClosedChannels} = require('ln-service');\nconst breachCount = await getClosedChannels({lnd, is_breach_close: true});\n```\n\n### getConfiguration\n\nGet the current configuration file settings and the output log\n\nRequires `info:read`, `offchain:read`, `onchain:read`, `peers:read`\npermissions\n\nThis method is not supported on LND 0.17.5 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      log: [\u003cLog Line String\u003e]\n      options: [{\n        type: \u003cOption Type String\u003e\n        value: \u003cOption Value String\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getConfiguration} = require('ln-service');\nconst {log, options} = await getConfiguration({});\nconst minimumChannelSize = options.find(n =\u003e n.type === 'minchansize').value;\n```\n\n### getConnectedWatchtowers\n\nGet a list of connected watchtowers and watchtower info\n\nRequires LND built with `wtclientrpc` build tag\n\nRequires `offchain:read` permission\n\nIncludes previously connected watchtowers\n\n`is_anchor` flag is not supported on LND 0.11.1 and below\n\n`is_taproot` flag is not supported on LND 0.17.5 and below\n\n    {\n      [is_anchor]: \u003cGet Anchor Type Tower Info Bool\u003e\n      [is_taproot]: \u003cGet Taproot Type Tower Info Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      max_session_update_count: \u003cMaximum Updates Per Session Number\u003e\n      sweep_tokens_per_vbyte: \u003cSweep Tokens per Virtual Byte Number\u003e\n      backups_count: \u003cTotal Backups Made Count Number\u003e\n      failed_backups_count: \u003cTotal Backup Failures Count Number\u003e\n      finished_sessions_count: \u003cFinished Updated Sessions Count Number\u003e\n      pending_backups_count: \u003cAs Yet Unacknowledged Backup Requests Count Number\u003e\n      sessions_count: \u003cTotal Backup Sessions Starts Count Number\u003e\n      towers: [{\n        is_active: \u003cTower Can Be Used For New Sessions Bool\u003e\n        public_key: \u003cIdentity Public Key Hex String\u003e\n        sessions: [{\n          backups_count: \u003cTotal Successful Backups Made Count Number\u003e\n          max_backups_count: \u003cBackups Limit Number\u003e\n          pending_backups_count: \u003cBackups Pending Acknowledgement Count Number\u003e\n          sweep_tokens_per_vbyte: \u003cFee Rate in Tokens Per Virtual Byte Number\u003e\n        }]\n        sockets: [\u003cTower Network Address IP:Port String\u003e]\n      }]\n    }\n\nExample:\n\n```node\nconst {getConnectedWatchtowers} = require('ln-service');\n\nconst {towers} = (await getConnectedWatchtowers({lnd}));\n```\n\n### getEphemeralChannelIds\n\nGet ephemeral channel ids\n\nRequires `offchain:read` permission\n\nThis method is not supported on LND 0.15.0 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channels: [{\n        other_ids: [\u003cChannel Identifier String\u003e]\n        reference_id: \u003cTop Level Channel Identifier String\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getEphemeralChannelIds} = require('ln-service');\n\n// Get the list of ephemeral ids related to channels\nconst {channels} = await getEphemeralChannelIds({lnd});\n```\n\n### getFailedPayments\n\nGet failed payments made through channels.\n\nRequires `offchain:read` permission\n\n`created_after` is not supported on LND 0.15.5 and below\n`created_before` is not supported on LND 0.15.5 and below\n\n    {\n      [created_after]: \u003cCreation Date After or Equal to ISO 8601 Date String\u003e\n      [created_before]: \u003cCreation Date Before or Equal to ISO 8601 Date String\u003e\n      [limit]: \u003cPage Result Limit Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [token]: \u003cOpaque Paging Token String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      payments: [{\n        attempts: [{\n          [failure]: {\n            code: \u003cError Type Code Number\u003e\n            [details]: {\n              [channel]: \u003cStandard Format Channel Id String\u003e\n              [height]: \u003cError Associated Block Height Number\u003e\n              [index]: \u003cFailed Hop Index Number\u003e\n              [mtokens]: \u003cError Millitokens String\u003e\n              [policy]: {\n                base_fee_mtokens: \u003cBase Fee Millitokens String\u003e\n                cltv_delta: \u003cLocktime Delta Number\u003e\n                fee_rate: \u003cFees Charged in Millitokens Per Million Number\u003e\n                [is_disabled]: \u003cChannel is Disabled Bool\u003e\n                max_htlc_mtokens: \u003cMaximum HLTC Millitokens Value String\u003e\n                min_htlc_mtokens: \u003cMinimum HTLC Millitokens Value String\u003e\n                updated_at: \u003cUpdated At ISO 8601 Date String\u003e\n              }\n              [timeout_height]: \u003cError CLTV Timeout Height Number\u003e\n              [update]: {\n                chain: \u003cChain Id Hex String\u003e\n                channel_flags: \u003cChannel Flags Number\u003e\n                extra_opaque_data: \u003cExtra Opaque Data Hex String\u003e\n                message_flags: \u003cMessage Flags Number\u003e\n                signature: \u003cChannel Update Signature Hex String\u003e\n              }\n            }\n            message: \u003cError Message String\u003e\n          }\n          [index]: \u003cPayment Add Index Number\u003e\n          [confirmed_at]: \u003cPayment Attempt Succeeded At ISO 8601 Date String\u003e\n          created_at: \u003cAttempt Was Started At ISO 8601 Date String\u003e\n          [failed_at]: \u003cPayment Attempt Failed At ISO 8601 Date String\u003e\n          is_confirmed: \u003cPayment Attempt Succeeded Bool\u003e\n          is_failed: \u003cPayment Attempt Failed Bool\u003e\n          is_pending: \u003cPayment Attempt is Waiting For Resolution Bool\u003e\n          route: {\n            fee: \u003cRoute Fee Tokens Number\u003e\n            fee_mtokens: \u003cRoute Fee Millitokens String\u003e\n            hops: [{\n              channel: \u003cStandard Format Channel Id String\u003e\n              channel_capacity: \u003cChannel Capacity Tokens Number\u003e\n              fee: \u003cFee Number\u003e\n              fee_mtokens: \u003cFee Millitokens String\u003e\n              forward: \u003cForward Tokens Number\u003e\n              forward_mtokens: \u003cForward Millitokens String\u003e\n              [public_key]: \u003cForward Edge Public Key Hex String\u003e\n              [timeout]: \u003cTimeout Block Height Number\u003e\n            }]\n            mtokens: \u003cTotal Fee-Inclusive Millitokens String\u003e\n            [payment]: \u003cPayment Identifier Hex String\u003e\n            timeout: \u003cTimeout Block Height Number\u003e\n            tokens: \u003cTotal Fee-Inclusive Tokens Number\u003e\n            [total_mtokens]: \u003cTotal Millitokens String\u003e\n          }\n        }]\n        created_at: \u003cPayment at ISO-8601 Date String\u003e\n        [destination]: \u003cDestination Node Public Key Hex String\u003e\n        id: \u003cPayment Preimage Hash String\u003e\n        [index]: \u003cPayment Add Index Number\u003e\n        is_confirmed: \u003cPayment is Confirmed Bool\u003e\n        is_outgoing: \u003cTransaction Is Outgoing Bool\u003e\n        mtokens: \u003cMillitokens Attempted to Pay to Destination String\u003e\n        [request]: \u003cBOLT 11 Payment Request String\u003e\n        safe_tokens: \u003cPayment Tokens Attempted to Pay Rounded Up Number\u003e\n        tokens: \u003cRounded Down Tokens Attempted to Pay to Destination Number\u003e\n      }]\n      [next]: \u003cNext Opaque Paging Token String\u003e\n    }\n\nExample:\n\n```node\nconst {getFailedPayments} = require('ln-service');\n\n// Get the list of failed payments\nconst {payments} = await getFailedPayments({lnd});\n```\n\n### getFeeRates\n\nGet a rundown on fees for channels\n\nRequires `offchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channels: [{\n        base_fee: \u003cBase Flat Fee Tokens Rounded Up Number\u003e\n        base_fee_mtokens: \u003cBase Flat Fee Millitokens String\u003e\n        id: \u003cStandard Format Channel Id String\u003e\n        inbound_base_discount_mtokens: \u003cSource Based Base Fee Reduction String\u003e\n        inbound_rate_discount: \u003cSource Based Per Million Rate Reduction Number\u003e\n        transaction_id: \u003cChannel Funding Transaction Id Hex String\u003e\n        transaction_vout: \u003cFunding Outpoint Output Index Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getFeeRates} = require('ln-service');\nconst {channels} = await getFeeRates({lnd});\n```\n\n### getForwardingConfidence\n\nGet the confidence in being able to send between a direct pair of nodes\n\n    {\n      from: \u003cFrom Public Key Hex String\u003e\n      lnd: \u003cAuthenticated LND gRPC API Object\u003e\n      mtokens: \u003cMillitokens To Send String\u003e\n      to: \u003cTo Public Key Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      confidence: \u003cSuccess Confidence Score Out Of One Million Number\u003e\n    }\n\nExample:\n\n```node\nconst {getForwardingConfidence} = require('ln-service');\nconst from = nodeAPublicKey;\nconst mtokens = '10000';\nconst to = nodeBPublicKey;\n\n// Given two nodes, get confidence score out of 1,000,000 in forwarding success\nconst {confidence} = await getForwardingConfidence({from, lnd, mtokens, to});\n```\n\n### getForwardingReputations\n\nGet the set of forwarding reputations\n\nRequires `offchain:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      nodes: [{\n        peers: [{\n          [failed_tokens]: \u003cFailed to Forward Tokens Number\u003e\n          [forwarded_tokens]: \u003cForwarded Tokens Number\u003e\n          [last_failed_forward_at]: \u003cFailed Forward At ISO-8601 Date String\u003e\n          [last_forward_at]: \u003cForwarded At ISO 8601 Date String\u003e\n          to_public_key: \u003cTo Public Key Hex String\u003e\n        }]\n        public_key: \u003cNode Identity Public Key Hex String\u003e\n      }]\n    }\n\n```node\nconst {getForwardingReputations} = require('ln-service');\nconst {nodes} = await getForwardingReputations({lnd});\n```\n\n### getForwards\n\nGet forwarded payments, from oldest to newest\n\nWhen using an \"after\" date a \"before\" date is required.\n\nIf a next token is returned, pass it to get additional page of results.\n\nRequires `offchain:read` permission\n\n    {\n      [after]: \u003cGet Only Payments Forwarded At Or After ISO 8601 Date String\u003e\n      [before]: \u003cGet Only Payments Forwarded Before ISO 8601 Date String\u003e\n      [limit]: \u003cPage Result Limit Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [token]: \u003cOpaque Paging Token String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      forwards: [{\n        created_at: \u003cForward Record Created At ISO 8601 Date String\u003e\n        fee: \u003cFee Tokens Charged Number\u003e\n        fee_mtokens: \u003cApproximated Fee Millitokens Charged String\u003e\n        incoming_channel: \u003cIncoming Standard Format Channel Id String\u003e\n        mtokens: \u003cForwarded Millitokens String\u003e\n        outgoing_channel: \u003cOutgoing Standard Format Channel Id String\u003e\n        tokens: \u003cForwarded Tokens Number\u003e\n      }]\n      [next]: \u003cContine With Opaque Paging Token String\u003e\n    }\n\nExample:\n\n```node\nconst {getForwards} = require('ln-service');\nconst {forwards} = await getForwards({lnd});\n```\n\n### getHeight\n\nLookup the current best block height\n\nLND with `chainrpc` build tag and `onchain:read` permission is suggested\n\nOtherwise, `info:read` permission is required\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      current_block_hash: \u003cBest Chain Hash Hex String\u003e\n      current_block_height: \u003cBest Chain Height Number\u003e\n    }\n\nExample:\n\n```node\nconst {getHeight} = require('ln-service');\n\n// Check for the current best chain block height\nconst height = (await getHeight({lnd})).current_block_height;\n```\n\n### getIdentity\n\nLookup the identity key for a node\n\nLND with `walletrpc` build tag and `address:read` permission is suggested\n\nOtherwise, `info:read` permission is required\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      public_key: \u003cNode Identity Public Key Hex String\u003e\n    }\n\nExample:\n\n```node\nconst {getIdentity} = require('ln-service');\n\n// Derive the identity public key of the backing LND node\nconst nodePublicKey = (await getIdentity({lnd})).public_key;\n```\n\n### getInvoice\n\nLookup a channel invoice.\n\nThe received value and the invoiced value may differ as invoices may be\nover-paid.\n\nRequires `invoices:read` permission\n\n`payment` is not supported on LND 0.11.1 and below\n\n    {\n      id: \u003cPayment Hash Id Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      [chain_address]: \u003cFallback Chain Address String\u003e\n      cltv_delta: \u003cCLTV Delta Number\u003e\n      [confirmed_at]: \u003cSettled at ISO 8601 Date String\u003e\n      [confirmed_index]: \u003cConfirmed Index Number\u003e\n      created_at: \u003cISO 8601 Date String\u003e\n      description: \u003cDescription String\u003e\n      [description_hash]: \u003cDescription Hash Hex String\u003e\n      expires_at: \u003cISO 8601 Date String\u003e\n      features: [{\n        bit: \u003cBOLT 09 Feature Bit Number\u003e\n        is_known: \u003cFeature is Known Bool\u003e\n        is_required: \u003cFeature Support is Required To Pay Bool\u003e\n        type: \u003cFeature Type String\u003e\n      }]\n      id: \u003cPayment Hash String\u003e\n      [is_canceled]: \u003cInvoice is Canceled Bool\u003e\n      is_confirmed: \u003cInvoice is Confirmed Bool\u003e\n      [is_held]: \u003cHTLC is Held Bool\u003e\n      is_private: \u003cInvoice is Private Bool\u003e\n      [is_push]: \u003cInvoice is Push Payment Bool\u003e\n      mtokens: \u003cMillitokens String\u003e\n      [payment]: \u003cPayment Identifying Secret Hex String\u003e\n      payments: [{\n        [confirmed_at]: \u003cPayment Settled At ISO 8601 Date String\u003e\n        created_at: \u003cPayment Held Since ISO 860 Date String\u003e\n        created_height: \u003cPayment Held Since Block Height Number\u003e\n        in_channel: \u003cIncoming Payment Through Channel Id String\u003e\n        is_canceled: \u003cPayment is Canceled Bool\u003e\n        is_confirmed: \u003cPayment is Confirmed Bool\u003e\n        is_held: \u003cPayment is Held Bool\u003e\n        messages: [{\n          type: \u003cMessage Type Number String\u003e\n          value: \u003cRaw Value Hex String\u003e\n        }]\n        mtokens: \u003cIncoming Payment Millitokens String\u003e\n        [pending_index]: \u003cPending Payment Channel HTLC Index Number\u003e\n        timeout: \u003cHTLC CLTV Timeout Height Number\u003e\n        tokens: \u003cPayment Tokens Number\u003e\n      }]\n      received: \u003cReceived Tokens Number\u003e\n      received_mtokens: \u003cReceived Millitokens String\u003e\n      [request]: \u003cBolt 11 Invoice String\u003e\n      secret: \u003cSecret Preimage Hex String\u003e\n      tokens: \u003cTokens Number\u003e\n    }\n\nExample:\n\n```node\nconst {getInvoice} = require('ln-service');\nconst invoiceDetails = await getInvoice({id, lnd});\n```\n\n### getInvoices\n\nGet all created invoices.\n\nIf a next token is returned, pass it to get another page of invoices.\n\nRequires `invoices:read` permission\n\nInvoice `payment` is not supported on LND 0.11.1 and below\n\n`created_after` is not supported on LND 0.15.5 and below\n`created_before` is not supported on LND 0.15.5 and below\n\n    {\n      [created_after]: \u003cCreation Date After or Equal to ISO 8601 Date String\u003e\n      [created_before]: \u003cCreation Date Before or Equal to ISO 8601 Date String\u003e\n      [is_unconfirmed]: \u003cOmit Canceled and Settled Invoices Bool\u003e\n      [limit]: \u003cPage Result Limit Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [token]: \u003cOpaque Paging Token String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      invoices: [{\n        [chain_address]: \u003cFallback Chain Address String\u003e\n        cltv_delta: \u003cFinal CLTV Delta Number\u003e\n        [confirmed_at]: \u003cSettled at ISO 8601 Date String\u003e\n        [confirmed_index]: \u003cConfirmed Index Number\u003e\n        created_at: \u003cISO 8601 Date String\u003e\n        description: \u003cDescription String\u003e\n        [description_hash]: \u003cDescription Hash Hex String\u003e\n        expires_at: \u003cISO 8601 Date String\u003e\n        features: [{\n          bit: \u003cBOLT 09 Feature Bit Number\u003e\n          is_known: \u003cFeature is Known Bool\u003e\n          is_required: \u003cFeature Support is Required To Pay Bool\u003e\n          type: \u003cFeature Type String\u003e\n        }]\n        id: \u003cPayment Hash Hex String\u003e\n        index: \u003cIndex Number\u003e\n        [is_canceled]: \u003cInvoice is Canceled Bool\u003e\n        is_confirmed: \u003cInvoice is Confirmed Bool\u003e\n        [is_held]: \u003cHTLC is Held Bool\u003e\n        is_private: \u003cInvoice is Private Bool\u003e\n        [is_push]: \u003cInvoice is Push Payment Bool\u003e\n        mtokens: \u003cMillitokens String\u003e\n        [payment]: \u003cPayment Identifying Secret Hex String\u003e\n        payments: [{\n          [canceled_at]: \u003cPayment Canceled At ISO 8601 Date String\u003e\n          [confirmed_at]: \u003cPayment Settled At ISO 8601 Date String\u003e\n          created_at: \u003cPayment Held Since ISO 860 Date String\u003e\n          created_height: \u003cPayment Held Since Block Height Number\u003e\n          in_channel: \u003cIncoming Payment Through Channel Id String\u003e\n          is_canceled: \u003cPayment is Canceled Bool\u003e\n          is_confirmed: \u003cPayment is Confirmed Bool\u003e\n          is_held: \u003cPayment is Held Bool\u003e\n          messages: [{\n            type: \u003cMessage Type Number String\u003e\n            value: \u003cRaw Value Hex String\u003e\n          }]\n          mtokens: \u003cIncoming Payment Millitokens String\u003e\n          [pending_index]: \u003cPending Payment Channel HTLC Index Number\u003e\n          timeout: \u003cHTLC CLTV Timeout Height Number\u003e\n          tokens: \u003cPayment Tokens Number\u003e\n          [total_mtokens]: \u003cTotal Millitokens String\u003e\n        }]\n        received: \u003cReceived Tokens Number\u003e\n        received_mtokens: \u003cReceived Millitokens String\u003e\n        [request]: \u003cBolt 11 Invoice String\u003e\n        secret: \u003cSecret Preimage Hex String\u003e\n        tokens: \u003cTokens Number\u003e\n      }]\n      [next]: \u003cNext Opaque Paging Token String\u003e\n    }\n\nExample:\n\n```node\nconst {getInvoices} = require('ln-service');\nconst {invoices} = await getInvoices({lnd});\n```\n\n### getLockedUtxos\n\nGet locked unspent transaction outputs\n\nRequires `onchain:read` permission\n\nRequires LND built with `walletrpc` build tag\n\nThis method is not supported on LND 0.12.1 and below\n\n`output_script`, `tokens` are not supported on LND 0.15.0 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      utxos: [{\n        lock_expires_at: \u003cLock Expires At ISO 8601 Date String\u003e\n        lock_id: \u003cLocking Id Hex String\u003e\n        [output_script]: \u003cOutpoint Output Script Hex String\u003e\n        [tokens]: \u003cToken Value of Outpoint Number\u003e\n        transaction_id: \u003cTransaction Id Hex String\u003e\n        transaction_vout: \u003cTransaction Output Index Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getLockedUtxos} = require('ln-service');\n\nconst numLockedUtxos = (await getLockedUtxos({lnd})).utxos.length;\n```\n\n### getMasterPublicKeys\n\nGet the currently tracked master public keys\n\nRequires LND compiled with `walletrpc` build tag\n\nRequires `onchain:read` permission\n\nThis method is not supported in LND 0.13.3 and below\n\n    {\n      lnd: \u003cAuthenticated API LND Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      keys: [{\n        derivation_path: \u003cKey Derivation Path String\u003e\n        extended_public_key: \u003cBase58 Encoded Master Public Key String\u003e\n        external_key_count: \u003cUsed External Keys Count Number\u003e\n        internal_key_count: \u003cUsed Internal Keys Count Number\u003e\n        is_watch_only: \u003cNode has Master Private Key Bool\u003e\n        named: \u003cAccount Name String\u003e\n      }]\n    }\n\n```node\nconst {getMasterPublicKeys} = require('ln-service');\n\nconst {keys} = await getMasterPublicKeys({lnd});\n\n// Find the master public key that derives pay to witness public key hash keys\nconst masterAddressesKey = keys.find(n =\u003e n.derivation_path === `m/84'/0'/0'`);\n```\n\n### getMethods\n\nGet the list of all methods and their associated requisite permissions\n\nNote: this method is not supported in LND versions 0.11.1 and below\n\nRequires `info:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      methods: [{\n        endpoint: \u003cMethod Endpoint Path String\u003e\n        permissions: \u003cEntity:Action String\u003e]\n      }]\n    }\n\nExample:\n\n```node\nconst {getMethods} = require('ln-service');\nconst perrmissions = ['info:read'];\n\nconst {methods} = await getMethods({lnd});\n\n// Calculate allowed methods for permissions set\nconst allowedMethods = methods.filter(method =\u003e {\n  // A method is allowed if all of its permissions are included\n  return !method.permissions.find(n =\u003e !permissions.includes(n));\n});\n```\n\n### getMinimumRelayFee\n\nGet the current minimum relay fee for the chain backend\n\nRequires LND built with `walletrpc` tag\n\nRequires `onchain:read` permission\n\nThis method is not supported on LND 0.18.2 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      tokens_per_vbyte: \u003cMinimum Relayable Tokens Per Virtual Byte Number\u003e\n    }\n\n### getNetworkCentrality\n\nGet the graph centrality scores of the nodes on the network\n\nScores are from 0 to 1,000,000.\n\nRequires `info:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      nodes: [{\n        betweenness: \u003cBetweenness Centrality Number\u003e\n        betweenness_normalized: \u003cNormalized Betweenness Centrality Number\u003e\n        public_key: \u003cNode Public Key Hex String\u003e\n      }]\n    }\n\n```node\nconst {getNetworkCentrality} = require('ln-service');\n\n// Calculate centrality scores for all graph nodes\nconst centrality = await getNetworkCentrality({lnd});\n```\n\n### getNetworkGraph\n\nGet the network graph\n\nRequires `info:read` permission\n\n`inbound_base_discount_mtokens` is not supported on LND 0.17.5 and below\n`inbound_rate_discount` is not supported on LND 0.17.5 and below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      channels: [{\n        capacity: \u003cChannel Capacity Tokens Number\u003e\n        id: \u003cStandard Format Channel Id String\u003e\n        policies: [{\n          [base_fee_mtokens]: \u003cBae Fee Millitokens String\u003e\n          [cltv_delta]: \u003cCLTV Height Delta Number\u003e\n          [fee_rate]: \u003cFee Rate In Millitokens Per Million Number\u003e\n          [inbound_base_discount_mtokens]: \u003cSource Base Fee Reduction String\u003e\n          [inbound_rate_discount]: \u003cSource Per Million Rate Reduction Number\u003e\n          [is_disabled]: \u003cEdge is Disabled Bool\u003e\n          [max_htlc_mtokens]: \u003cMaximum HTLC Millitokens String\u003e\n          [min_htlc_mtokens]: \u003cMinimum HTLC Millitokens String\u003e\n          public_key: \u003cPublic Key String\u003e\n          [updated_at]: \u003cLast Update Epoch ISO 8601 Date String\u003e\n        }]\n        transaction_id: \u003cFunding Transaction Id String\u003e\n        transaction_vout: \u003cFunding Transaction Output Index Number\u003e\n        [updated_at]: \u003cLast Update Epoch ISO 8601 Date String\u003e\n      }]\n      nodes: [{\n        alias: \u003cName String\u003e\n        color: \u003cHex Encoded Color String\u003e\n        features: [{\n          bit: \u003cBOLT 09 Feature Bit Number\u003e\n          is_known: \u003cFeature is Known Bool\u003e\n          is_required: \u003cFeature Support is Required Bool\u003e\n          type: \u003cFeature Type String\u003e\n        }]\n        public_key: \u003cNode Public Key String\u003e\n        sockets: [\u003cNetwork Address and Port String\u003e]\n        updated_at: \u003cLast Updated ISO 8601 Date String\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getNetworkGraph} = require('ln-service');\nconst {channels, nodes} = await getNetworkGraph({lnd});\n```\n\n### getNetworkInfo\n\nGet network info\n\nRequires `info:read` permission\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      average_channel_size: \u003cTokens Number\u003e\n      channel_count: \u003cChannels Count Number\u003e\n      max_channel_size: \u003cTokens Number\u003e\n      median_channel_size: \u003cMedian Channel Tokens Number\u003e\n      min_channel_size: \u003cTokens Number\u003e\n      node_count: \u003cNode Count Number\u003e\n      not_recently_updated_policy_count: \u003cChannel Edge Count Number\u003e\n      total_capacity: \u003cTotal Capacity Number\u003e\n    }\n\nExample:\n\n```node\nconst {getNetworkInfo} = require('ln-service');\nconst {networkDetails} = await getNetworkInfo({lnd});\n```\n\n### getNode\n\nGet information about a node\n\nRequires `info:read` permission\n\n`inbound_base_discount_mtokens` is not supported on LND 0.17.5 and below\n`inbound_rate_discount` is not supported on LND 0.17.5 and below\n\n    {\n      [is_omitting_channels]: \u003cOmit Channels from Node Bool\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      public_key: \u003cNode Public Key Hex String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      alias: \u003cNode Alias String\u003e\n      capacity: \u003cNode Total Capacity Tokens Number\u003e\n      channel_count: \u003cKnown Node Channels Number\u003e\n      [channels]: [{\n        capacity: \u003cMaximum Tokens Number\u003e\n        id: \u003cStandard Format Channel Id String\u003e\n        policies: [{\n          [base_fee_mtokens]: \u003cBase Fee Millitokens String\u003e\n          [cltv_delta]: \u003cLocktime Delta Number\u003e\n          [fee_rate]: \u003cFees Charged Per Million Millitokens Number\u003e\n          [inbound_base_discount_mtokens]: \u003cSource Base Fee Reduction String\u003e\n          [inbound_rate_discount]: \u003cSource Per Million Rate Reduction Number\u003e\n          [is_disabled]: \u003cChannel Is Disabled Bool\u003e\n          [max_htlc_mtokens]: \u003cMaximum HTLC Millitokens Value String\u003e\n          [min_htlc_mtokens]: \u003cMinimum HTLC Millitokens Value String\u003e\n          public_key: \u003cNode Public Key String\u003e\n          [updated_at]: \u003cPolicy Last Updated At ISO 8601 Date String\u003e\n        }]\n        transaction_id: \u003cTransaction Id Hex String\u003e\n        transaction_vout: \u003cTransaction Output Index Number\u003e\n        [updated_at]: \u003cChannel Last Updated At ISO 8601 Date String\u003e\n      }]\n      color: \u003cRGB Hex Color String\u003e\n      features: [{\n        bit: \u003cBOLT 09 Feature Bit Number\u003e\n        is_known: \u003cFeature is Known Bool\u003e\n        is_required: \u003cFeature Support is Required Bool\u003e\n        type: \u003cFeature Type String\u003e\n      }]\n      sockets: [{\n        socket: \u003cHost and Port String\u003e\n        type: \u003cSocket Type String\u003e\n      }]\n      [updated_at]: \u003cLast Known Update ISO 8601 Date String\u003e\n    }\n\nExample:\n\n```node\nconst {getNode} = require('ln-service');\nconst publicKey = 'publicKeyHexString';\nconst nodeDetails = await getNode({lnd, public_key: publicKey});\n```\n\n### getPathfindingSettings\n\nGet current pathfinding settings\n\nRequires `offchain:read` permission\n\nMethod not supported on LND 0.12.1 or below\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      baseline_success_rate: \u003cAssumed Forward Fail Chance In 1 Million Number\u003e\n      max_payment_records: \u003cMaximum Historical Payment Records To Keep Number\u003e\n      node_ignore_rate: \u003cAvoid Node Due to Failure Rate In 1 Million Number\u003e\n      penalty_half_life_ms: \u003cMillisecs to Reduce Fail Penalty By Half Number\u003e\n    }\n\nExample:\n\n```node\nconst {getPathfindingSettings} = require('ln-service');\nconst settings = await getPathfindingSettings({lnd});\n```\n\n### getPayment\n\nGet the status of a past payment\n\nRequires `offchain:read` permission\n\n    {\n      id: \u003cPayment Preimage Hash Hex String\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      [failed]: {\n        is_insufficient_balance: \u003cFailed Due To Lack of Balance Bool\u003e\n        is_invalid_payment: \u003cFailed Due to Payment Rejected At Destination Bool\u003e\n        is_pathfinding_timeout: \u003cFailed Due to Pathfinding Timeout Bool\u003e\n        is_route_not_found: \u003cFailed Due to Absence of Path Through Graph Bool\u003e\n      }\n      [is_confirmed]: \u003cPayment Is Settled Bool\u003e\n      [is_failed]: \u003cPayment Is Failed Bool\u003e\n      [is_pending]: \u003cPayment Is Pending Bool\u003e\n      [payment]: {\n        confirmed_at: \u003cPayment Confirmed At ISO 8601 Date String\u003e\n        created_at: \u003cPayment Created At ISO 8601 Date String\u003e\n        destination: \u003cDestination Node Public Key Hex String\u003e\n        fee: \u003cTotal Fees Paid Rounded Down Number\u003e\n        fee_mtokens: \u003cTotal Fee Millitokens To Pay String\u003e\n        id: \u003cPayment Hash Hex String\u003e\n        mtokens: \u003cTotal Millitokens Paid String\u003e\n        paths: [{\n          fee_mtokens: \u003cTotal Fee Millitokens Paid String\u003e\n          hops: [{\n            channel: \u003cStandard Format Channel Id String\u003e\n            channel_capacity: \u003cChannel Capacity Tokens Number\u003e\n            fee: \u003cFee Tokens Rounded Down Number\u003e\n            fee_mtokens: \u003cFee Millitokens String\u003e\n            forward_mtokens: \u003cForward Millitokens String\u003e\n            public_key: \u003cPublic Key Hex String\u003e\n            timeout: \u003cTimeout Block Height Number\u003e\n          }]\n          mtokens: \u003cTotal Millitokens Paid String\u003e\n        }]\n        [request]: \u003cBOLT 11 Encoded Payment Request String\u003e\n        safe_fee: \u003cPayment Forwarding Fee Rounded Up Tokens Number\u003e\n        safe_tokens: \u003cPayment Tokens Rounded Up Number\u003e\n        secret: \u003cPayment Preimage Hex String\u003e\n        timeout: \u003cExpiration Block Height Number\u003e\n        tokens: \u003cTotal Tokens Paid Number\u003e\n      }\n      [pending]: {\n        created_at: \u003cPayment Created At ISO 8601 Date String\u003e\n        destination: \u003cPayment Destination Hex String\u003e\n        id: \u003cPayment Hash Hex String\u003e\n        mtokens: \u003cTotal Millitokens Pending String\u003e\n        paths: [{\n          fee_mtokens: \u003cTotal Fee Millitokens Paid String\u003e\n          hops: [{\n            channel: \u003cStandard Format Channel Id String\u003e\n            channel_capacity: \u003cChannel Capacity Tokens Number\u003e\n            fee: \u003cFee Tokens Rounded Down Number\u003e\n            fee_mtokens: \u003cFee Millitokens String\u003e\n            forward: \u003cForwarded Tokens Number\u003e\n            forward_mtokens: \u003cForward Millitokens String\u003e\n            public_key: \u003cPublic Key Hex String\u003e\n            timeout: \u003cTimeout Block Height Number\u003e\n          }]\n          mtokens: \u003cTotal Millitokens Pending String\u003e\n        }]\n        [request]: \u003cBOLT 11 Encoded Payment Request String\u003e\n        safe_tokens: \u003cPayment Tokens Rounded Up Number\u003e\n        [timeout]: \u003cExpiration Block Height Number\u003e\n        tokens: \u003cTotal Tokens Pending Number\u003e\n      }\n    }\n\nExample:\n\n```node\nconst {getPayment} = require('ln-service');\nconst id = 'paymentHashHexString';\nconst payment = await getPayment({id, lnd});\n```\n\n### getPayments\n\nGet payments made through channels.\n\nRequires `offchain:read` permission\n\n`created_after` is not supported on LND 0.15.5 and below\n`created_before` is not supported on LND 0.15.5 and below\n\n    {\n      [created_after]: \u003cCreation Date After or Equal to ISO 8601 Date String\u003e\n      [created_before]: \u003cCreation Date Before or Equal to ISO 8601 Date String\u003e\n      [limit]: \u003cPage Result Limit Number\u003e\n      lnd: \u003cAuthenticated LND API Object\u003e\n      [token]: \u003cOpaque Paging Token String\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      payments: [{\n        attempts: [{\n          [failure]: {\n            code: \u003cError Type Code Number\u003e\n            [details]: {\n              [channel]: \u003cStandard Format Channel Id String\u003e\n              [height]: \u003cError Associated Block Height Number\u003e\n              [index]: \u003cFailed Hop Index Number\u003e\n              [mtokens]: \u003cError Millitokens String\u003e\n              [policy]: {\n                base_fee_mtokens: \u003cBase Fee Millitokens String\u003e\n                cltv_delta: \u003cLocktime Delta Number\u003e\n                fee_rate: \u003cFees Charged Per Million Tokens Number\u003e\n                [is_disabled]: \u003cChannel is Disabled Bool\u003e\n                max_htlc_mtokens: \u003cMaximum HLTC Millitokens Value String\u003e\n                min_htlc_mtokens: \u003cMinimum HTLC Millitokens Value String\u003e\n                updated_at: \u003cUpdated At ISO 8601 Date String\u003e\n              }\n              [timeout_height]: \u003cError CLTV Timeout Height Number\u003e\n              [update]: {\n                chain: \u003cChain Id Hex String\u003e\n                channel_flags: \u003cChannel Flags Number\u003e\n                extra_opaque_data: \u003cExtra Opaque Data Hex String\u003e\n                message_flags: \u003cMessage Flags Number\u003e\n                signature: \u003cChannel Update Signature Hex String\u003e\n              }\n            }\n            message: \u003cError Message String\u003e\n          }\n          [confirmed_at]: \u003cPayment Attempt Succeeded At ISO 8601 Date String\u003e\n          created_at: \u003cAttempt Was Started At ISO 8601 Date String\u003e\n          [failed_at]: \u003cPayment Attempt Failed At ISO 8601 Date String\u003e\n          is_confirmed: \u003cPayment Attempt Succeeded Bool\u003e\n          is_failed: \u003cPayment Attempt Failed Bool\u003e\n          is_pending: \u003cPayment Attempt is Waiting For Resolution Bool\u003e\n          route: {\n            fee: \u003cRoute Fee Tokens Number\u003e\n            fee_mtokens: \u003cRoute Fee Millitokens String\u003e\n            hops: [{\n              channel: \u003cStandard Format Channel Id String\u003e\n              channel_capacity: \u003cChannel Capacity Tokens Number\u003e\n              fee: \u003cFee Number\u003e\n              fee_mtokens: \u003cFee Millitokens String\u003e\n              forward: \u003cForward Tokens Number\u003e\n              forward_mtokens: \u003cForward Millitokens String\u003e\n              [public_key]: \u003cForward Edge Public Key Hex String\u003e\n              [timeout]: \u003cTimeout Block Height Number\u003e\n            }]\n            mtokens: \u003cTotal Fee-Inclusive Millitokens String\u003e\n            [payment]: \u003cPayment Identifier Hex String\u003e\n            timeout: \u003cTimeout Block Height Number\u003e\n            tokens: \u003cTotal Fee-Inclusive Tokens Number\u003e\n            [total_mtokens]: \u003cTotal Millitokens String\u003e\n          }\n        }]\n        [confirmed_at]: \u003cPayment Confirmed At ISO 8601 Date String\u003e\n        created_at: \u003cPayment at ISO-8601 Date String\u003e\n        destination: \u003cDestination Node Public Key Hex String\u003e\n        fee: \u003cPaid Routing Fee Rounded Down Tokens Number\u003e\n        fee_mtokens: \u003cPaid Routing Fee in Millitokens String\u003e\n        hops: [\u003cFirst Route Hop Public Key Hex String\u003e]\n        id: \u003cPayment Preimage Hash String\u003e\n        [index]: \u003cPayment Add Index Number\u003e\n        is_confirmed: \u003cPayment is Confirmed Bool\u003e\n        is_outgoing: \u003cTransaction Is Outgoing Bool\u003e\n        mtokens: \u003cMillitokens Sent to Destination String\u003e\n        [request]: \u003cBOLT 11 Payment Request String\u003e\n        safe_fee: \u003cPayment Forwarding Fee Rounded Up Tokens Number\u003e\n        safe_tokens: \u003cPayment Tokens Rounded Up Number\u003e\n        secret: \u003cPayment Preimage Hex String\u003e\n        tokens: \u003cRounded Down Tokens Sent to Destination Number\u003e\n      }]\n      [next]: \u003cNext Opaque Paging Token String\u003e\n    }\n\nExample:\n\n```node\nconst {getPayments} = require('ln-service');\nconst {payments} = await getPayments({lnd});\n```\n\n### getPeers\n\nGet connected peers.\n\nRequires `peers:read` permission\n\nLND 0.11.1 and below do not return `last_reconnected` or `reconnection_rate`\n\n    {\n      lnd: \u003cAuthenticated LND API Object\u003e\n    }\n\n    @returns via cbk or Promise\n    {\n      peers: [{\n        bytes_received: \u003cBytes Received Number\u003e\n        bytes_sent: \u003cBytes Sent Number\u003e\n        features: [{\n          bit: \u003cBOLT 09 Feature Bit Number\u003e\n          is_known: \u003cFeature is Known Bool\u003e\n          is_required: \u003cFeature Support is Required Bool\u003e\n          type: \u003cFeature Type String\u003e\n        }]\n        is_inbound: \u003cIs Inbound Peer Bool\u003e\n        [is_sync_peer]: \u003cIs Syncing Graph Data Bool\u003e\n        [last_reconnection]: \u003cPeer Last Reconnected At ISO 8601 Date String\u003e\n        ping_time: \u003cPing Latency Milliseconds Number\u003e\n        public_key: \u003cNode Identity Public Key String\u003e\n        [reconnection_rate]: \u003cCount of Reconnections Over Time Number\u003e\n        socket: \u003cNetwork Address And Port String\u003e\n        tokens_received: \u003cAmount Received Tokens Number\u003e\n        tokens_sent: \u003cAmount Sent Tokens Number\u003e\n      }]\n    }\n\nExample:\n\n```node\nconst {getPeers} = require('ln-service');\nconst {peers} = await getPeers({lnd});\n```\n\n##","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbosworth%2Fln-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexbosworth%2Fln-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbosworth%2Fln-service/lists"}