{"_id":"lnd-grpc","_rev":"89-5007a58907bd570c53b3c2472d093573","name":"lnd-grpc","dist-tags":{"latest":"0.5.4","next":"0.4.0-beta.8","beta":"0.4.7-beta.1","temp":"0.3.0-3.1","zap":"0.3.1-alpha-zap.2"},"versions":{"0.1.0":{"name":"lnd-grpc","version":"0.1.0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"bin":{"lnd":"./dist/bin/lnd","lnd-install":"./dist/bin/lnd-install"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"4e43527c6381d0ed8892b90882db01bd86191af2","_id":"lnd-grpc@0.1.0","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-0/oegEg5HUqxZqtIXTpDjzuCYsF0zg3WgoMv1p/kdQaGJUytwIUIAwkXhHIgQJfUjAilrc/+tMxMPnvoLFz2EQ==","shasum":"aa3a175ff52dbb53ac83298d6092d3d027d960aa","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.0.tgz","fileCount":3,"unpackedSize":4092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUvWeCRA9TVsSAnZWagAA4zQP/jJ/cyN149KStsvOPKQo\nmrKW9tBuqfmpp7iZ/egVSDYldUaVQlkIaZjfmvVtuotF5GTGuN3/rye5GBV2\ngB9q6CqiexzYS75FYp2OooK++7zvnAli95mOfZC/TBTDzh6RWGC7R+4jJdar\nq48mM6wW28zRkZQGwNqQ97SHhwZgeMrkarIo7GPYSY1VAcuGA8NkP883QgoY\nfk0tnZrgulUpv8qNw+NScYNr+IpqgSFtcCptCWcXfhKqzEDuxOb5wty29Jdt\n6vdx0iTncX8zEOgDJYGjNOnqRFc4VnTTweCWqzncVCyXk2SJoqN6QgC86o0b\nyQT27PJh0rxHZjlJOuKbjS/DpAnyCQGIoJpeuHMY35ulPKgQo+ibAX8RN85F\nL7Zv4ZZ8Lloj49us7WUBkEYUOjEw6bews55HPY1fXfv4FkuiYjZYSEo6KTCK\nGQJstFosRmFbJJQTsoH5nBMRtldDfrCNwxc9C96ndUjXFF/3BCGhBdV1Iy/u\ngPK3BOg/DhpWckNRag4K/duPjDY1L1MMOzFG1lH6VXlPuRa2HNQ1lVs+EABc\nnC67OzhGKSdCM3XVE7XE9bBRKKUXslWzBSFXCYGCTreOHO1zV7gwzUWy0TH3\nSYhDSHTEBd0onjEpGC7y3QsbcbQ9evTncb7UtVV7VgEKpfBZ/BpRn5zPVwhb\nRB3d\r\n=RLwx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiaQlxlp9c1qcDfYQaGqmr31TNoTaiSAOiFJnlwnfvLAiAXOaIvCwx047Cnx4g4VoerzLCf82wp9sYURer30dpn8g=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.0_1548940701720_0.4392269101430686"},"_hasShrinkwrap":false},"0.1.1":{"name":"lnd-grpc","version":"0.1.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"7effc122473e22996ebd1f16a744d2c2b9db9129","_id":"lnd-grpc@0.1.1","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-C6Ribpkx3wQ9YrQg864wMxOgr6Qk3v1tVJE2QQP/NCUt8g6D/FmvxSbLuay990jTnzEjHQvlj1GdTxHOdXkLjQ==","shasum":"09b8b76df41605e0a2207cf4a02b47bb535f8c7c","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.1.tgz","fileCount":4,"unpackedSize":20505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUveQCRA9TVsSAnZWagAADfgP/3JfqTsBQIi3qONL14DG\n2uPGoiQ9c6fduPnDTAqbhM5bFz9OCcoDaBHqFgUfFAJlGIxJubtXVyAuvgJR\nvEHfy6SPiCdVrk/Kw6UIetkVHySGwGZBtAsonkS4CnSluG0EBGyqUtQI5JDW\ndvFLJCzmv9lFIecy/anxSVbPH6bDHbZhJtZBCuQA8NBs/aSQQaVXzyNuIKgc\n/S+WW4vF7uMbaciJT3mLYHemtQLyTiRV+sHY9Fh7N1qsKtKJj1elgyVpkCqA\npiHrvxCtIEsSg40+LfWdOmBH8ceMDTdBzmqxhw+JSOwWXfGoWMmmIpMHpyJG\n43u8ep8x7M9p0f+loEfUoiRp9IA6e72yNO958B+gc/FmU503XbheHXJcFrCL\nOGDBCCOebA077ZiMaHrHdnaATxUZbZ2fp65cbBzCVe695wyTEIr3QEnLdc9i\nUT4G6zdDQeWEPqa9Tf1oge4IkQAnctsn3VVQpDy1uh4+i4uqRNSIa9karqhc\nbfz2I2U6KJnhVBr2ZmMJctHAo8g372/vpan7TzpJZnm/io6gDY4vtFsZOeu4\n34YpBycA5Ujn5d4rUZVhhEzuc23E3DFR0sGpkymflTkhZNEXL4msqfvaRTzH\ncmaCgaqUjqJahQtr6JwP9uQrWL8pm7zvxGd4MhGyJdmoDi2GmpGQT1sCL8FA\nzzYQ\r\n=Gwnh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/bt+wo17EVbrOae+YpGUT2zZYtzzB35b6Cbn6ho4fIAiBUUxduMMNfnwR4w9VJnh377hScHtlAfQ8YfCQsZ1nPrw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.1_1548941200259_0.2631087796144749"},"_hasShrinkwrap":false},"0.1.2":{"name":"lnd-grpc","version":"0.1.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"6958193bdb5f40008514c7e8d78149b111182260","_id":"lnd-grpc@0.1.2","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-HlfrPLuUjGvq9iUd6B/KRNmZVUZv1ZEAMhlsVqDY92YshJBHrv/KEChIWLq7okCg8eNQb1maA9z4Bwrflk/Dfw==","shasum":"c740f8ebc56cb6d62c7b4df80f8a5ebee9dfc482","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.2.tgz","fileCount":15,"unpackedSize":813162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUvjdCRA9TVsSAnZWagAAlcUP/Rn2b4Ve4uLpFLh5oyf0\nemszZlKsIgg0TEGzcFvBuQXp2c2BDKl0oeAN7dsOoNkTiTRVxF5lR6TvXAdw\nGYgau4ARG+o5nkBtW0wayNHB8O13NvJw9RBY4/tqUUZUW40UwFe6GgxEYmKT\nJu5hVhUbiPN1jkPKHfrV/BspdI+JTMXVnAOoQhofKjFDpT5UQfl4MbFm//pF\nCoe69j6b61G7XiYcZLT5SmHz3fUVuojbQwiqMets5lnZmYoz88HoOoig8/xl\nwFTiQLXfxYzAW6Smk+TOd4xvMa9MMdQwI1BGJP/OcDOrCK13SeR128i8bWD+\nccClz2xBs2gPmFWguHDgb74ocricu4Eb9mROP4Tte3mz34S/ycglnjjbQ1He\n5t73hzI2wtrsJVHKsZQmUY697vKD7tZYJJYRJxop8PfpvcPTQn4EM5djOwjw\nF/mJ6sDzOM2gqAPIHKtLFAmvfvRI/9yVlqZ2pz6px+zRiRgptGfcTkpxa+eu\nDdpTCOcpCpgnulgxqZ85B/LOaugHlNfIQ8c3vXXdvg46gaqfjc9C8P9EdEPJ\nrfwzpxLjmc1mAUmyVsRExeG72lIu20+LFX3CLtGaNE7UsbNnX1b2NK2Y8Rud\nElofM2mq3flkIUu7+fbmvno8MnVM7lVM4LaWrv1CMwVj/pEc04Vc1pG4cEeN\nABP2\r\n=HBYj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpMmJ4H1jMh6q7XlcsogLssZZLRL31joqXVxNMRKNQswIhAMUlfddMHtZZoUca7Kqtd2GXTqjKUvD1r8Uemfjm7wst"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.2_1548941532454_0.5732512022167526"},"_hasShrinkwrap":false},"0.1.3":{"name":"lnd-grpc","version":"0.1.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"62c6ff36958c518bdc00201689418abbd311b4b4","_id":"lnd-grpc@0.1.3","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-KZFhGx+PUQ9ITevuVc14Xo3abIfWYghVM2EqJ1l4XgP29hCwUHk2o7QjjkRkbh1Pg2cfsa/R1DTDUU5Svh1vMA==","shasum":"fc2290453bd6d9ebf09484a6c5e97235792ca2be","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.3.tgz","fileCount":15,"unpackedSize":812703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU1I7CRA9TVsSAnZWagAAJGcP/j9l0SlBYDaGegIzbeo3\nynZrwYtNO+mveW1454qYjHZQt0Rq1N3mg6JAS9zpuIxkTWWHLEqM243/cp5p\ncmqPxWV5Qg4TpB4VcHNNmwy79faVuEhiuWq8IcqcDhmjStNwAgAbU/Q/NHs/\n19pQzD06+p+ZcV6vXGTptYW+IQ5TMsR4KOPjWFCfJugDF47Hb/N57EhhMhXq\n8L2PnROnt+1I2goaZdTOON2u3X7YmFIpbkBHdNRrgXQN/YOUmeILWfLXKj7h\n9eeNU2f+96AX8jY+xVSLdMVaSdfLtFGK7qO9SYu/Yj2f0GwW8g0c5+nxVdUy\ne3TlKD1VIBBdIpqpbsQJ+s/mLozpPFdbn/NOHxZ7zQIuhq343HN7OOsb4TV/\n56VjU1XkqqLxsZMubci8+bqlBSt2vbvnA/7X/j0GTeDR1Toh/QnWskXwk7Cg\n1EpoS0VjDhNFF7bRVoMzqvbf3ntfFTor3iEMx28BkJY5ymSYsxMlFW+7MhhD\nTB1IgJOhuHsGh0UZZZ3wdNymH8n9k0DDNW1rfll+c/tA5d/6ZixA62ADQk2q\ncP2EtSMcwrAon39bqi6+m4w9dFVR+QGMJ34MtGmCYEEO7w6ub+9K6504PGEF\nAJ6T20OCIKY1IY/0tOryXO3SUWK9ISL3u3oMmYfTfPUpzuhokZLkKMjtg3IP\nPDAE\r\n=9o8D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCunZ008w8mCoKhC9uwmQJEoqVAJpEwiTsrbcnJmtwFIgIgH8FwmyutM8cr++1+Lguziw22pLWn1Hr9WFk/FYPTup4="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.3_1548964410901_0.4456397572102544"},"_hasShrinkwrap":false},"0.1.4":{"name":"lnd-grpc","version":"0.1.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"74c7f8d32d0bc1610e45714fc6e77677165402f5","_id":"lnd-grpc@0.1.4","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-r+MAk6/m71nTug3mOpifKX18hczaqqa/o7dfLjzjlLwgd3Ovs/PH6HxmbOMbV6xCNjv8vo4YvQ6VQEYA4zaQHw==","shasum":"90541037fe4e58c8cc4ca8ac62fbf82367c1fd47","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.4.tgz","fileCount":16,"unpackedSize":881308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV20OCRA9TVsSAnZWagAAFsUP/2bxYifRe8ovFPThOaSP\nRpHKdsNxGW1+4pEKlPuSdqAL3LrquRoT6wjiC5Qg8hgj+nazncOGNKh033UZ\n11AGFeo/j5BW80V4PUhXpAAWpXbqhA0izADuAeWkaD9DK/0Nz5cxOAuAgMl+\nfh981drelGWmoFq+ZX1qlZsX6gTPYLps1kIk0oMoT1tCUR8cZtoPTgbvadhu\nWwbWHDJQ2aD9/C1HYDRx39dOMvkUYaNJAV5LxyF+a+nQqHEeEHkTcaspI7Bu\nG/mvEbSyjgaAqU/IUZAc9JKkA7816yFXci1nqGhOlQSfj9I0eFVjBBg5ESXM\nKCu+WX4xlX184ObdhOavepAZT5hKJxfm4LViMSVWIEwRHJrpl8NiWtLpGoXD\nVkADyPSmcsFX/xk+bvDEVsnpyMLwqIQy2ChMi3RPDRG5ja9JueN2zB4lIKNZ\nDma30+TZ8rGVb6kdb1COhQqn3oy9IJeERUenEcWnbmDNT8jdOKodgIl4uKAF\nFiYpKI5nOedWD7+18177M0ORx0hL6Z1KZ6OI8bbZ/1DWmPETdK1C/NaiNjgd\nLgJwl2iyYo9cea5rDaXMarlYQivPEKkI6hyV+oQrSahRZEBdQj1IcgoFIrX2\nFn3svX5bWb1FIWEqMt8bb4U8ET5TqHhRCgQh0//vNgfdOi4JAPoWazZdAeN6\nEwo/\r\n=QxJl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbIQMsGoP/pD0pxoofA5GpB0Wh9Pq66tagbqCRraUklAiEAlcxhWrm75iK4cEtaTkw2nlEURdINM88EpF5TC4zNwpc="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.4_1549233421926_0.3092754828140054"},"_hasShrinkwrap":false},"0.1.5":{"name":"lnd-grpc","version":"0.1.5","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"13c94b3ab7369c6c15e7236adce07dbe91114db0","_id":"lnd-grpc@0.1.5","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-Utohnn5MxqzZk+qAly1p7dqX9ESvy3UxQRQHK7Rvzm6ERoNpiDhWCBMEH3+ZWisjgx7yg78NY9VDoGO4wWu9iA==","shasum":"7d0e716d15f512789fdc3c0bc88ca266814dc62e","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.5.tgz","fileCount":16,"unpackedSize":886366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW4mACRA9TVsSAnZWagAAAPwP/iiJFd+jY39obR3K0zL5\nvGRLCPDQVdcd2HcrHrUw1nJbSPyPEjCttQepP1AXQ9bUf65OsecslTQai+LE\nuppIGHQHuzrAGrMg52qFYxU5vC++VwhrB7KXMFdfNEQ7PHTkfELoymVPwP34\nTOrWhLnd23uBleVMC7xof9dCgjcPQ9ZJ/HZzfEmgXf1q/1BCUNH4dhTT+CsA\nVlB8yO6fxgcyZs5CcNgp0BMu3tdWm2dKxV8Med34omI3zTcMLx77c7hamhR2\ny2SA3F9wS8DAHXdEVokvg8FUr25NihNEFSfNoj3jKRSFefL5yk3rVVTftyOG\nTbPBGuzA3CJuKmnkERW9zhthlMD/FtyAI7NMKqBiI3dSF9IYHXjZ1cZWueO8\nxlnc9al1gAOGb1lFoX6P/StEEAQ6Z/t7FXmQ9sW335PibRmsO8u5gsCrvLEL\nUbA47CvbIpiw4OjbJSd29oRPcPY6ZlU3TgjOACiYPsDuluQtbDMJDLHjAwkq\nP/UZNI2altin24c3EdF9zcoxyJ6c6tYcurs9o7mWXFZDV10LgqBzSVf4IOsh\nqed1zprTkMMXcx5KI1MOItfEIUynee4PsBqvEQkhNEy6J4ItlyYyO8RTXvwc\nz08JubNJTOfKbZyt1X2/QaDVNCBejiYKxYAtCTMLaStKCxllPoyFkSIWuXdU\ntVgl\r\n=jcrU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9CcPgXjmuxFU29uIhm9hZx/EcLkDhRoMxj1kMM2MAhgIgV3ISqMHwQPbWGXZ2XMRjqWotn3lWdw/vm5KGpUchEJ4="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.5_1549502847681_0.3476879751666342"},"_hasShrinkwrap":false},"0.1.6":{"name":"lnd-grpc","version":"0.1.6","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"7f04954949952b485438b3d510511c98f786d62a","_id":"lnd-grpc@0.1.6","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-9YjzFuSKL/8X4qr2NoHr9ztkFEBKvT8JT1kbKLcpgpUaTTro60ZTi56h1bAwpgcx5ZpW8gtl1Gnr8TpivvY/QA==","shasum":"633d48a87fdd216489f94a821b3c9240818abd31","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.6.tgz","fileCount":17,"unpackedSize":946147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXAClCRA9TVsSAnZWagAA7VwQAIFw5sLRdtY+nG4COgLI\nZvT9+V3hwdpxeP7bQKhwL/3im2dEPCZxl37MG1rQQCusi7TX9g596amzJHNZ\neP8j/mfSoacE3RMQiqF639kTLkI2Gp/MDUPq4XEWttnAC3wZrqRnH7OnWfkd\nkuUq9W0nrHl9m09/tVnJzB/4cXxijY5vWi2TnYod3dvP2J6Fr4Oa6IKLu7Ez\n6OCWR4d1W8KPchQD6WtKTLtTTSZ/z4hDYVfnC3Jyw0uB4ZqIRQ9nnVx3LDYj\n1VqWn23QImjIpMc9DwToQrCsKHCZ50A4qK2SvbLq7lVyHggL+cd8SFQye9Ik\nlvnCtiW/f5wjgh6tAjeYbTIGCualiHu/gZeaGmaK6c6njlsZJxl/Pr1w2bCt\nWdyNp8YTOySxSkNz0WmiclQKnP8HrCPLFfdTlESIjYe+RbIuE97X+NY8W6P+\nIzdzLXZlCEiVkpmORQZ3/ql1reJ16+f1vy41i5mSdH/X2cQLrFSWAadgnk2B\nkDlepe1to7olZq4Vn40kkDkgx1vCSJ69KovFXeRpMU/wy7eQ8sGxZMkk9AnY\nhpulxPF2ISrSJNvEMp/DEvanKpb/bxURyWqtcgH8q9WrA/4P/Yu/C9qCtsUC\n3gDx1W6+qNXbk8k3cb2OhxmmDt5ijjvFX0biAfrEWXd3m9eAPpBJp5GBI71W\nsGtn\r\n=lycK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqHvZGhhd0VzMz2z812kmtWLJewFYTmKro9bcTU/+/hAIgc7iv+JqG7GUnWqqtsyjiwwVwYfFjl9E9RQuQoWwOvP0="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.6_1549533348826_0.28048688571420555"},"_hasShrinkwrap":false},"0.1.7":{"name":"lnd-grpc","version":"0.1.7","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"b70c25032eb09a0298cd395de985acafcc6d15e7","_id":"lnd-grpc@0.1.7","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"dist":{"integrity":"sha512-c2iAEZ2/keeOM33CQvb3fCHobWTHa6wiHfS3Iup+7q2Z0b8L9HodQFMXyb00zGeaY0YIhwbMoOCZi7aZeLOXGA==","shasum":"94c01ba212d1caf5be5a5e9970f49e615c7d1423","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.7.tgz","fileCount":26,"unpackedSize":1616106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc9cSCRA9TVsSAnZWagAAgIwP/ArHhKTXvUCKhyTBiiP5\nlCjpwrl9UoIJbxWE0cY7NsnZj4gATvHSzS40K8GrbasU6dUBCYBPu23zanZq\nukrfKejHq4x+qPvxezOQaCB8V3WGwV4iCcq2oWQsvuIf6GmOaRttw7iVKzwI\nxjwtdIfVQhuZyGQcApsyjJ2s63x9xzyxm0ZTaKiWN1ERNPS/m0GNdrhxO4iJ\nZnhpv0XK56+fL3leH/2hdHx9rSxRsXlhJA0u8aSQS+qStMrZi8qNtztTjjgu\nkUz09A7OvY/JA7Aa9385mSc3qrgqhuDJvz9HfM1B52+zAt4VSGSYiKlINk2Q\nP7VHX3N3QtqVKu3/FMu8051MjFsv6sUz7MHYuU2P35R/z6pQR5QN+xuIR1vL\nx7kM0Er6MG1bQ+5NBgVtguJ6ib+4zhn+yA7VnCA4YQ9ZIYOH7zMY0D1/u3gF\nwD8bT75itODNSqySQ5LO4AK7Jl3V7Ce2BEdEBtRrV9RgClTNzW8VAIqbrBvm\nBpfpakKN7xQzXfcr8qnc78ojbxvjAMRP+hu2sirAHi0CTx4u6iI7BLBOGqSl\nppylc4iZSUcdqBrv2cbjIOm8TThVdZjoI67lOC8nzY9JxPkz4FELQC40cZ5y\nME4fO4wOZUTo8JRfW1eX4m69uC08s32sBUZgm8zlJCSSzGB1e2K6KT98Fp/K\nOG2u\r\n=GyIm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/DJ/CEVSG22ED1Bnxn8U0iICKmP44ZaONP8Hy7r8NGgIgE0xXbovTM9qYRkG1GXzdP5IHi3sdGzbzZRB83SMsaWY="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.7_1551095569468_0.6961320274569536"},"_hasShrinkwrap":false},"0.1.8":{"name":"lnd-grpc","version":"0.1.8","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"5ba29646c652b074985d65a47797007b0fe1d306","_id":"lnd-grpc@0.1.8","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Pgtb2BXzVoSBdQktCtsWwMn22rOIr3rmxmChNPahN+UiKH9CI83cqRyjdpte8deByyKMli1oK0rSY5EM1QOVUQ==","shasum":"58b25b55673712a4d228f29efccc9161e3b89eb2","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.8.tgz","fileCount":29,"unpackedSize":1841262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchmstCRA9TVsSAnZWagAAGekP/0eZ/MYx816QVjC+RPvM\noR1gGLkybl/ut0JvZ4VTQIMuVxcL9U+e8j9UkRsjnpjtV+nqAGSqlV29YW2O\nQf9MUh/WNA8X4qYa2gN8rXdm4sZuBlmMVn3DzlX3ZDfSsd1QUIzzybUmj3sm\nhxQQdljWwsZDpemlvyr9o+ioQiFEsTHJKZhbCFeEiJ6/yA0lTm8++HQHXYrh\n5FXgPs8TiIFFDy2Ids0ckY/asIchY+Bh48Gxjwf0cUnQ0V/BX4DkrsB+FTly\n9Dshb55u296LmIJiUsoFYobeWnWw9Iw5zr8p4qXvWvEL4muOdfEwfXVlOti2\nfZ1tsnk7HokjbKojjBjUrIAEzvVP9hQLGFh4orQkyMzcfmrcOMVA4TKENpT8\nARPJg0cnPYtLB7yOsjjgh5OJ1Q7yU0MlUZhsfYCe+u8ONFIaaPQSXYxd7PSZ\nnnFs5xZZ9Q0XUVZk6gcLgAyt5YfGObmKYymOy6/FBo1hyHSnSqKynv/YEwIb\nUviN95l+19A/hTk6aZHjxcdSJtbC0CIQodfP2BILUWlvIm+IGDgleaCZRVy5\nB9pfNrFXwrSNDGUXcWlcXfUbyD6yV2y/9slZOEWgA+WBaCkLQ1IM8tOw2V0s\nRVNlvUcqbfQytkZhOxVXu2wKUKk1ekvy9MEbAWO+oqn7+E1owN7IwGbzw185\n2nVR\r\n=FR8A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNrw9pO7sbxwF6xgrR7LcQC0kCJdVk5QpoxgiGyTQFnAiEAi/QQs/yCS7Hp1/sOHexrqFMRGEpqOP6d+1/vD7sdPeI="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.8_1552313133219_0.8708267830332879"},"_hasShrinkwrap":false},"0.1.9":{"name":"lnd-grpc","version":"0.1.9","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"54dee926cdf49cb037054a2a480996f512d9b448","_id":"lnd-grpc@0.1.9","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-CqxS8FwRvadBe00+oP/IgR8TrFjdq14DtpwUk8ATXxUW1h9j1HiCceHHkz7nPJ2N0sW4NjV1YsM1dFspFgtYVQ==","shasum":"cf1c02bacb246b04db9280ecd233edf0e8839593","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.9.tgz","fileCount":32,"unpackedSize":2068896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcigGdCRA9TVsSAnZWagAAEJQP/iZ3+7/oWD+RZHFliGU8\n/ba+fuwW2w8Lig4nL7P/iGczHSwJWV52O/xmJRV8xSKnYOOcmLYD/bq8Jy6l\ntDj22uDvI471Zs3O4+9KpXJnUNFNYwTIFmd/etMUhT1enB862n0PaHUJ1OzS\nfKeq22jxqnWo/KHvKpWWXptTJAHR4Gve45GksjbTs1LXw/IAH1EOziZf3CCd\niHefcK7eEiznmlOkOHl4gt6toV2jTp2nzKcF6Nd18OckG0HWlfKUWBnBCQLI\n5eZUUKC+vO36evGe//RnWH2iYDbFO5ky7dN698YFpqEJMpHUzo4PtBlh7u8k\nwZyGbT0DCh0SEoDTy20yNmEJNxokmyjDHXm3qXz8aGGyEYNv9VzKpiWiynjl\nS5PsS3M1eCkQuAfgcfdzIfzrC8k5UoVbkkOGvmtorojQVEX1xYjEeMXTMK3A\nOtHuGO3kp7reYdKFSKTt0FPyLubKJE9uqWC/LyYvpA4jBI0IXnpEufr7XoYF\n9lzTEdjI+9vS1TA2zA9ooPps7ByRc9LF9wp+QAr9f+bJD4Y3sygTr0kSRqpd\nhadRsCq8VL4SeYXXIh7wJPKFd/Y+qYHomPiSfP+sYKzIU7o1GIGLuqrfDTNQ\nmo4peckiSbfZl4ZEsRxN3+UCWOs1f2GdpqFOuLPlML2qmmvq7dznZLbMf3/u\nsUJO\r\n=yzs5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5lKjZzP8lYRR96jFgRSV8bsgQ3q7AL6XI2IIKmaGUBwIhAIWdHo2M3jPVaKQWhOmoxmoxsu+tPuIgfeYf93ikZkFX"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.9_1552548252222_0.05619573838121239"},"_hasShrinkwrap":false},"0.1.10":{"name":"lnd-grpc","version":"0.1.10","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"716e694413fe7aaca42d2a992b2513fae770d1b1","_id":"lnd-grpc@0.1.10","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-vRSzez5ZfKKTvsgWnylPNVxNF35TCRlBnbjaQneSmAIsXt0OUVcOgpXtqpUZkq1gpVjvjAnQZNb+EfC1NEGtJw==","shasum":"8b04abcd640dbdcb1ed5cb75c52701980d8dfc5a","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.10.tgz","fileCount":33,"unpackedSize":2144917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjoFqCRA9TVsSAnZWagAAlzEP/1EgyWQsNxVJSEG1wNly\nzztg/MurKdIyn6PaIxfrcXHZBsirbUBo8YivziOyEdy2lUyJTwy4woZl8IBA\n/K/qRYJF1rrbTPNs/nqYYQByOvuZwgsrxk3or0EcuE6IRUq2AdP/3GpjW+B2\nRFazGUnNCaxf//2ooMxOMeeCRK44d6nRdjZYoy+W4SShLQykfZBdsZR/aUxp\nPdbOAjDe3rJwqNjUWml67BnFwjIhN5V4CXjETRVQjUJgonNGMY+tacxxkqaR\nSE9jKqpjarFokB59F6U242M+GB1GbtJwQneqVsybRm9O3iRXAJUCyDpUB0Z8\nSsGn+7uuPdYAydXEBf8pR/Heyd4TjAFv5BxmWrocwJ7KzEhKFmUZib1SJqUJ\n0k6v33pKoKc1sHUdwLwVwLXOjZx1UaaRp3hApvZ5o+s3L1lVZNxlY7XPusz8\nS2EG7J5+6tpIXoAl/t1OzZmw3J49xynQbou2WDB7As7DP9zikrSAD/+HSlke\nxXELepqNIqRuuXqvnkibIMOGTtYjiE5gpDhAbiNYZyRWGwDA4R6ewoQ1ghMO\nE1yqCRMInpq9e+xSiqRtvvSBu4MyOGaNEfTGTYl1Mg0NveKghDtGBF0/RCsA\nvXZq+/nPU5zf7Rbx6VzOQGl3qAjl4sN2Gb/0EHeH6aSjNBYonLXJHQ/3dHuG\nsLsV\r\n=iFPk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHrKfF7vTjT3LKJ41h3l+aRAo90agTa/5lF4BI6dJ4IQIgXioH3IzbHsuuXMoB7bVIuInWhQsBPCSfDMtLxFi0+LE="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.10_1552843113982_0.5457041945179413"},"_hasShrinkwrap":false},"0.1.11":{"name":"lnd-grpc","version":"0.1.11","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"2034ab08078d834765e41f33e8b0ceed27982591","_id":"lnd-grpc@0.1.11","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kGgpUuRKbp9z/LwOveUOek3notX7InWSa94gfuxVKIIAsOxR1zF/wCnYm+KQasIGE2tur0zaC3rK5hj4XAWdhw==","shasum":"6edd5f9ca7f6fbcb60e1493fcda543f93e8cc09d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.11.tgz","fileCount":35,"unpackedSize":2286830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj/2dCRA9TVsSAnZWagAAV7MQAJSJzJq3oyTUvKdGjk+3\n58WhBTUaW6ScIJuJe42a6d3aP9/PQ+nFyqa/e1xtrWAwwh+S/GHn/AXpwEbS\nU/uWnZozcyfTJdzf2cBRYzq7U5LBz7zQRAcVzCeZCMHTzyw8VGi9cXkHm19T\n82BVneUh9f/sE8slwIA4QAWiMoqPxgJtue2QiqUNMp9Ohc+BYPtFu+WlF58N\npaczWfRbAK1nuakooYa9K1qL1pjPRbCXuYmmyF/d+BxoX76YRzO1kqh7SQIq\nJflkjpnyZAay3+XLxyAd+xX9mLlAcxoy6S+7ROwiHtxYU713j+HvV4GSY5Tq\nh2nG812kxIKCConbbUhV1Gsptm/zPqEvSbCrMzlcGqoWCdadYdj8UUesQG2s\nTt4Uu2MDXelQIIdprmkIxR5xP/HWUmrY8JGfPjaMpcIYC3hfYY/t65qVgLds\nCrK7/EmfXtUWpaHuR5+hK5fn6KNp4yaAYswhxOTCzjNTf3hUcP3p6KJ3VfAO\nAI9aL8RXXAtBkCzVME0xePNDROhe7Xa25I3Is947G0EbdhVxdFJKDEnIn4lw\n7+IFL0ua6pBHoDIihP9HLSZk/+Wfwx/mJI/dYYQiIXbPoZq0Ta8JB/5HgfOp\npjOAOr4Ax0yfIPcs2EbSEdoTQFaS+lBqTg2rnlq6pkfGyM1s11TGyLVg5hxg\nTjfs\r\n=TEgQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7dTgAJCRHqQbqcOBqeRGkJ2K2BkVKU630SuebZ/vpiwIhAI74ou32y4CnQ8wqayBO2p2VMndVFOoVhdsg2KqCndey"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.11_1552940444749_0.12416818551192965"},"_hasShrinkwrap":false},"0.1.12":{"name":"lnd-grpc","version":"0.1.12","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"a51c27a26aa4fd38f5f9f95ed5f4e015a9884691","_id":"lnd-grpc@0.1.12","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2BizI5lqj/89zA1oW9G19D1xous6a36iwlUFGAktMfnrI260tAM63pAOkgg5i8Yu03Sg9vBYZIqBOWmmmOGMqw==","shasum":"914e2a1d63a1c3809e3196f68ce5314869639840","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.12.tgz","fileCount":35,"unpackedSize":2289487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJck6zdCRA9TVsSAnZWagAAwtoP/23+DAD2EWN4EL72AaCe\nbOJtWFtMb8jHDSoulEiqz0IdfJIeI1LTWG8vKEqrYBfhySsTLYVWoLYKKTit\njEZjburXNk0ss6By/oBxK2RfaQbocxBkGGCBFMZ+TS+tkqYwmXRs5nTakwSo\n618NB4FaKszN+CWaPHFmGhTdVE8foWVf8XDlI6fufkadFz7nZmOjqG081qBW\n15IQiIQleHtdRmn8RyrPnTFMBZWEW3HLssewrTtXJ/rsLyw+0y3uh5F01afP\n7vaVDGodyMaL79DoHX3XttaYmWHPXlVwkwDY6szKNcZPXP/ZxvCwHAThWXcw\nMAa4zd/FmzzfaLM5V/CQ0SHjPVwBE+GielhovHFvtYxGsTf/LkYTz116HYjC\nvxdE0VTNSGlVMVpDQZ6mPmbyhZK490wJsEas70AipSVr5ptVOhNYaDlGCBZS\nBI1Ubo85JjFucZ3MNjZM9g8l1x/fIHEpdbbHTfVhhjMRYnPWElf914gJ1Ko4\nmcsqYKZQi6L8qQpYZmTYnUdr06cCzFITzYZepKayqIAC1kvbN1wCTdypfnIE\nPEMnDP9GvsHlRwI/mmieXFcSkTM7Xs4yEBQbRYR4tAJAQYmyf+lB3FxMODPu\nPCAZwm1JxgOfme8oY4junJaDMoAPJPx15v6P+kIpd/fvJiEwUvM8ZTOcZ0c1\nLBaH\r\n=jB7X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC2v9mnIFA+44WKkmibZq/HMSrEfgnK3s/NxiV4Za38WAiEApWu2m3waKy91J3Rz3QjxiJtZMB4BR5FJ1NwYhaT8wok="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.12_1553181916805_0.5881648875228649"},"_hasShrinkwrap":false},"0.1.13":{"name":"lnd-grpc","version":"0.1.13","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"f0b4bf6b344ba2434c5282dabbae12598607fa9e","_id":"lnd-grpc@0.1.13","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8O9yNPBWchfq8ZWYtSOXgp0jRZL7oU/AeFR64zQSl8kA2UREJoWfFAQEkdZk6tqaOm8B+toB8Pmf+LPbzcZroQ==","shasum":"bb81f54469cc6d02493d79ba8436b8cac4983953","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.13.tgz","fileCount":35,"unpackedSize":2289567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJck79iCRA9TVsSAnZWagAA8foP/0Mj03lV7mN6KjCLQsZp\niRgr2aWnfW8F6KrIGyKtReklRCi3r3OABH2yZgUlLAkOYcc9gl7jeZR0djx4\nFDNjqtL9bQdu7rZryhVPuQrDVhe1zF4bo6aJgp2t4XBhhhg+/UGgfs7u7QWA\n0KrQUYLPS01Q/gKY7O2CCDXptcWIHUbAtZRL3LFfh+A8uiikPPwM5pWOly3n\n06REGMfrh04zaKfilBZI7j4VqJ1aHvK9osk9Eeb8uc4UcGxRSfgUcuy5bHvs\nbACxwb27zQE7ec4c4gyg/6vYpqXtbY9O3wyBOxz6Q2esg6mP02kHL3BJKMeM\n/v1LszeqoFWKtj4P1l/BVmTj8c9Q/XEnAWcSJhLfdQkzWFbxy6O96MRg6LCh\neUNljJOJB73IzSdDakBTHFgdZ8vyD2fyxaVXI38Pu2WKyxqthkFf04qLE0bR\nofEL/j6R4jOTzFwOthQUlGqeOs3sO5OtV2zyfb0oF6bOd8fXAptcp1rMS6UH\nlyMdQztZbXVHpf3Rdj2GIuTub4T072NYR5n962stiaBGjmVj3HmhOIDQ6hqR\n8Z76uCNt50kQTmhIiZ5fqE0eaNZFy3dXpml168vS+Ieb1i8zQPIgLbm47N2b\nwPm0oeVh8iSehy0GUOqAPMfy4EGUBnJUyUJDZW5x/pSofnFmsIslcFcLUBno\npA2A\r\n=mRGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/MgBWiNcGa99PmAhZk3dKUaR5rXyz4oeF8I24AgeGhAiEAgORbJh75jA0EHM2A6hCTI9N+ZbzOUYQZy59rli0cQzE="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.13_1553186657940_0.3705998376548407"},"_hasShrinkwrap":false},"0.1.14":{"name":"lnd-grpc","version":"0.1.14","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"0231ef9ee0b2deae7f25c913c9fe6d9d1f364d8f","_id":"lnd-grpc@0.1.14","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9HLm0UoB3ezMxuPsdQNCMQoEWskyA5k21+Z5wfX+cw3LL5m+y8LHQCYL0wFLSX0jwFRvN5enwhQ3e0RfyLcbeg==","shasum":"9c10f8bf8ea814ee9e0a6a69db303e4674b547b4","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.14.tgz","fileCount":35,"unpackedSize":2289571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJck+LPCRA9TVsSAnZWagAAYhsQAKQmk4oz5xEC8sq+qKLP\ntuvgv7SN1ekufgrZg2YdZW4JW5R4gdywH1Yk8z0mkdLy1O4x4hVYjp80IBCy\ndaveYc2tTFokJASk88MK9yQ5OcU6gbbOvo18bkeTojN2luiT66vKXD5Yb5h1\nmiotR9lqLbtonKgnfRwubYdS3mNp8l+lnQtZdcsTcBuPUE4MEZESKemJKAr4\nbQW3kNLqoLTePg0IYfzdwdKFeIqW7VE8n1uLqKXiNHDH4bMMFy2vcIjSMHDe\nYVd1BLWWcaGnIeFGiZRTd7+mrA32+Fgf8HkXsOPCBOb5iFACKkC3Ecg8HYFy\nWzTcA/P39nGEgRm9nr9g5KhsATmBDF2w6y/xpfrIpC+QKxFNtnFWan1xvuv2\nYcNgwtE/VmmmyzkSv6aT9Lx8ZvMe6eAgh6RZe0OS7PWort9qeajLSS2NwM+J\nIFgBk0v0TNDcBPZ0OM3KBzXm+KTOq6MJJRTkN0itxlKToy/tq5kVyf4WUD0Q\noVy6LRoFwfObdo3FzXLUhFL4phn7KhrwKqERkCzHxeKCiuCQtATkhQwm5Wfl\nBEx5zWQoGR/aVjWFT9v2yGNI8HXc72RqC7iBXp1/fFKGxUvqyNZjIPLDenpQ\n8VUlSlDU3za7+4PQzoNsrXvzK66pCH5Sd0M1YmaLX69cXikKhhZDeZA4HYlo\n9YFH\r\n=5aLn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1KzzxP+y/cQtWKByqiYwDj4H9uea4uM49j7hAlmLGUAiEA1cjbhvKU158LumvFUAPU08xGogslJoOcoD32W6obb+0="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.14_1553195726907_0.9882738365212611"},"_hasShrinkwrap":false},"0.1.15":{"name":"lnd-grpc","version":"0.1.15","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"22cc622fcc138b003005425a7a58bbabeaf69c96","_id":"lnd-grpc@0.1.15","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-TD+eNY/l4Dz8TLejnxLuQl2L77/qTOAXGZ+AlA4WRZrCDOyl0vPBH6fn37SvjzZdDVDQFSKR7vGZF9w+2YHUIw==","shasum":"2eccbb4bff70956518fceef1ff334a91674f19e0","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.15.tgz","fileCount":35,"unpackedSize":2289604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJck+THCRA9TVsSAnZWagAA3qIP/iIY/BYBqp/lNJRRSwnT\nwXl7dNYlZXZMHmywNk86OyO8ZWEuZoTvncHhVTSYq6iN3LwKlRnaOP310l5f\njLwbOTQla/EXXWtofaIVtd9znaoS4nxHNqw46/zSB886vuft0Yp00T0GzxG1\nu+cvtw8pf7q5KhdBxzK29CMcfdmr8ABe6bs3L7spf7L9ze8M7Cs2jtOdR68F\n/4Ed8+Y9H7WRyn+wTSP8Hky59mc7qDLo3OzoJrvTimy/+hXierC2HWq3lzVd\n/vFgapu7MNtecY4gLHdNE3e0fDdS8xqroZ00N8ro128CSN5fkYPrzcxvYlt7\nD1FjbmgazuI/t2m8x6ozwmdedzKBzRFkl/tTJuHJIHJqLygxqPOSYTu0KR56\nAr3Z+QwbphoucfZRhyh6KmyjBVwRLm4KWrvelo0jhbqtWZsZ5jVqQmqPzVpp\n/1WIg7EPMcnQE9V62K0a2mx59S537Li3SnzNAvkDo7KkDfcB7eIiI4SeG/Dc\nUPyp7TfmCjyZ/NLh84Bo5XPNU1klxy3SDEvWMEnh2x9awclkAFIEbg2eGoBl\nwz5BCvNYL7ZiUYqI+I4JPJFX0gutCI+kbDMyHIH2PYbMmF+c2Q6VXchGe7fI\nGP3H5+R6sQoYt6lEl9bMgxtB/Y7B0DVinHIvrWyb8/PbIJKjLCcXwZWiqrim\neDNZ\r\n=BGnH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2c07NiIgPBgMY0OnilNZG+xfLylUHAUSj/aIsZdzG9wIhAJAQ/ELWG6QGW2hC7s/ZBbCiEC9IGYvrTSNLHJv1Kpkx"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.15_1553196231115_0.837433432889555"},"_hasShrinkwrap":false},"0.1.16":{"name":"lnd-grpc","version":"0.1.16","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"de8821d3987939244aacb30089a7e4ec22848412","_id":"lnd-grpc@0.1.16","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-EKKM4/NTmjUwMdqe931ZxVcbWQv37tnCdTgT7Mbu05uNTQyzSV7aKeWUrLB00Z/KDekihR5pZEkrYJPwS71Vsw==","shasum":"fc4fe9dc6fd29e81007eaec235d6bc19d3b66c46","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.16.tgz","fileCount":35,"unpackedSize":2289732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclBQ0CRA9TVsSAnZWagAANm8QAIdJHiF8F50hbJW2O3Ng\nesbAkBfwlXL8GlWGNzrTe/eQ5voBz3wOb88Pm6c9NA8mWwR3or7bYTx4ILh5\ncwT70UjaWcr94ZwxY/Mnw2eweLFQrcyqBWkSppXLGF8yZrtB+1GWI3UkslcO\nE28OfrK0EV46SAul2fGn+w1vDy0WQoJFMjpcnM/W0j9l/8mTO6yLjGVLJevs\nUBcWAMuS9+023IufZ/gO+9uPPvE7nSyN+h/Zt9Zr8UxrGAN3MRe+5U0PeBoU\nqv8mguNy2/qvZjYILDTSzMDxfn0jKFXA0/QQZvveRx/3hjKSZ33E1jSgI+9O\nLu9lg2uMRk2IuLHAxe9jtgyzshRTKIflmkBj7OkveqEdlKArrq6WUs+pi3Dc\nLLU1hz6OCJnKJAn7Xr8aH/GdcEC9P2TvcfzG0wUZfkWyD6aR8e30xwLnT+Xw\n9UW6nf4/MGHPTO/Gm2m4RFcc+3Lw79uYgw8a3n8JrwxzrF2zYixtZipIiBHG\nwKvZSM7aD1hPeZmU0Wc+HvVihugue0mjTS6pXIt2WGMQsdkSw8cwr9Jbltqx\nTEsTRt/Axxoi+RF6Vy/tXgD32/BqXqNiRh8LeR+VcYgAZEZvEZT10wdlEK8Q\nV6zOA7bXkxVUbpS5OVirNY2fqx7kA/DWXByG4UV2zVlrmmdLX6eSsYVH3Snq\nLGHj\r\n=tp2M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqmy5shU7XAk/vEQgw+wl/NwMdgPHxFNYTF+lzZCF3bgIgY9Iv/IYC+gMaEe7lgQGTB0WkkWjQmiN9LX1W2pbFM/A="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.16_1553208371812_0.7078717414769713"},"_hasShrinkwrap":false},"0.1.17":{"name":"lnd-grpc","version":"0.1.17","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"0a8fec39100abc2d71edc9ab5a60d1a54d4d8941","_id":"lnd-grpc@0.1.17","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Vku1IuKOKPHAF0rx0/UKkHlOj9S90ZYoRBzp3o036Yphw1EU0uEPWQwqa2OqP40GGfUmTNIv3TAqsOoUBg3wfg==","shasum":"91797e97f5ed79f563e4439bd872b9b534bca5ce","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.17.tgz","fileCount":41,"unpackedSize":2748310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclP7OCRA9TVsSAnZWagAAXF0P/A5mM9rEi9l7yHyVteOg\ntE1qajjIsGfHX2gTVYofBqyzRSHW8a6J0Ea1yCJwpkzHPLUP+PHBfyRJSJlt\nco6bZRo6BTHI3skSI1OGNpuWdjtNgi3oW63crk3jz0EA9fruPUlvjie2/CAY\nLru1T+vIgA5mENpwkqJHm2Z1WZn/Kq/kJQOhKla91gMLJIogVnNz5vVtdryi\nnBAtRIM1plHabVYYBpMC4clY714Ey2NhwPbefX7MibdNmuRjhMZ8pMwXfg2V\nqbePHvHso+VcCR/1NEBZ1ey6vuA0UJFeZ/etaD8K5FYm3T2QSwJ7O/J+CLfL\nqoR8wYIRQSPhi8EBJL8ZmXrXzDf0/T/XpnFwwUwTPR00Nttt5TejLXai2k13\n/tWk2DJHPlDPgfvixqRTj9owkhjsz/IzR75ZfZF/WgoSEOkvuC2wOLK0O4gp\nLhW/ULcQZUmdKq03HH2C91nUYuVqyS7n8f1jpa0DYxfR/Daq969/Ie9b09qt\nUQlp6WsB8Vt5KVxKqSysCuSunYRTeBq3C+F7yMYCnWHScpyIg70Su7RGZGut\nAqP4qxbh/PbeINmncL+pqJDxv5+RObE1OBRFD42/gJO6s2D8/g5VEe5//u0k\n5WEkBrFvehfbr313sy81fLELSy7p22i7t0h6HXlaXoPayHdN1CK3kr2sMz3W\nPagc\r\n=Y13e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCB/oz9yTDsAS5oVQJnwocVyhGych/IXL6bNhgC4eiexwIgZKO+Mqs1imBBrfMd61AD4PK3W1yccvbqR1jWroF/3U4="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.17_1553268430202_0.19817715012382342"},"_hasShrinkwrap":false},"0.1.18":{"name":"lnd-grpc","version":"0.1.18","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"6cb86ed512eaadf42a070e0eeb6e7ec1d4c70bd8","_id":"lnd-grpc@0.1.18","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-H4aIKb5g/OWdkves8KZezLcWmokrHPYlh4/sUBsO1vdzVCss7Q2qS/8bDCWVZBHFyuDxku4itysacqd0nXr7Pw==","shasum":"55766e9fb6296e967651c13fbcd0d4a843e8f7eb","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.18.tgz","fileCount":31,"unpackedSize":1986078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclQJPCRA9TVsSAnZWagAARCgP/3uPCD0y5MHeNuJM3xhU\nMtRzkAUYPQYb9LjAAZTKhHHAJ+QjA5U3u2z1yI7n1aKnmaUWVIv5xagcH5Gk\nIJTZA2DmN9b8Jm16Z9Wws9DJfxziKDqrqdnWkJ4GN0IiZrGAYiGfqp1AuN/L\nCkgeeka0bVYwOXdTGO0QzPg0RY5nE+pugN0KAI6Ep2nbCGhe5cKGZB/JlpM2\nB+cJwNuZI5KpE4bnZavvZcIRwiCmmqtJw86O8cwEQk7QhsUCqNXXVqug8MqM\nsaQv/v311J+ltEynOR31X/QLI9/8FnqkYFtKemGoVBdS3kPi1gEs5KB8yAOl\n7GHNZ3UywzXWk4dcVQ5I8x+5WJMEdH5gt3QY6MjhULDu+E5lPReXWuuG8yIH\ns0tIztk/jK5dY/C6V0AFaJ447GfTnKR+TWRBgYnTkIfuY0N+Ye9UfZWjuhLE\nKBE5fMmTVglfjvHOZs/5HLyHf1qQjjRlqN0tzQqt4ISrbDyIn4S0weVVioXY\nyMNkIpi0dEkcx6IcEKRHji7rXIjok2DohVCzd5acWKbazMmTvRRqe7OWsJtl\nU3EXfh9oTm8uJ4JLjCa/5E8jj3qTK3tzNuWTSkmHaEe5VGMUTkJfffdjXiYk\nKBMAggj6u2Lb0XC7/DPu5bEqkDpPIoOuJwZdbLrWzQberE/QeTO1EaWJo7ba\nXaKc\r\n=cz1W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuGO++liGEmfrZLuVJlRIIYjtDlieRcTJKLcvCiA2bzAIhAI+OCgwidmBIfFM4AGfZq4asRIqcW68xiQaSOtf05zqx"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.18_1553269326460_0.2850779101637453"},"_hasShrinkwrap":false},"0.1.19":{"name":"lnd-grpc","version":"0.1.19","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.6.0"},"gitHead":"0c4732e8e4b002fe3bdc635711f1f0825c946a09","_id":"lnd-grpc@0.1.19","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-00dFO+8hrWZeLsSyPCXUKgmWPACW3RLvxy8EMZh6mKRtmDKb5SFat7gZufrC/EtxE3jzA8wiWdu9bzV5ITnGgA==","shasum":"7c8da8b56dcd14ca9fb357ccb369a8cc0538b51b","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.19.tgz","fileCount":36,"unpackedSize":2366570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclQPJCRA9TVsSAnZWagAAazoP/0IMVswsVt2XAO3ylK4Z\n4U9mP/cmgaY/ZEwX715UOjAVRwVwM39wVZuiL5u7mKn39JpCfDPLdPVJ7x5I\nfRMR0mVkppa5E6WdzytC6+b7wxE92chLZnQCPdd6iup5n8Ip3r9Rr3uQ7ebP\nw4q4qfDrx2EGJt4pcH0oxFA46Zx2CObFiWkfE1s7un7fQ+MhZqg0WEBWt8OI\nRzt5GDxTiNVvZNtRmjsG3bhJ3imAQzvihkw4AKt3GaIzDaWssI7Er2GPfby7\ndOCH72aUMn+NpRBmmAttSuptJtWJ3o9qmot8uvDNrnzHJa/oTRLOFhNPyqrm\nKNwUep9tT2cQqVrvo5BWxfPNq3EveBk72EqncJOyp1pWwrS7SVEOzVzmaMgO\nce1s0HNHf6yvY7STVWkuyeNWC5wf7jBPviqNn2FDcoeHls2b8U7HssD0rH/v\nzrX4+3vDHP3IEMEp1IUJAz8YhLZlxZG4TiHSfEDKXGZMxLMpWyu2cR7i+ThL\nqInjZwmMBAS5Gf7oN8UW/EVFQv4XAjH92vrAK8rMPsataxOj9qQ5pWfAhbhn\n7X6H+GsPsxhI0qFWNj5ABgeyLTffUz2iMolFN1lMGph2p3BSHC+E8DhJcQCg\na8TXOqXDTKJUmeION0Yy9WrskUBQfxwInthqTooSk/LC5SoBAbgd4qJbOB5b\ncL7R\r\n=Z2xV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbFR1jRwJ27lfSOXgQUF3zUzq0xTEJxedSq3iyV9wENAiEA/KwQNcQxizph2iQKtAnjnrpKKty0iotktI6akQUWnRs="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.19_1553269704848_0.21361253731607444"},"_hasShrinkwrap":false},"0.1.20":{"name":"lnd-grpc","version":"0.1.20","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.7.0"},"gitHead":"6025a0fc42b8ad230635a1863699465398fca32b","_id":"lnd-grpc@0.1.20","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-C3UWpZPVuVi7DoOKUBg4eQfBaSyLI8nX/0hKEv6NtpKf8pqFyaItvgdhNWj0Vk3prps8tTjECSRc3iEiVEQr6A==","shasum":"501faf65908ed39c2dc9fe9d0bc135d817559c65","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.20.tgz","fileCount":42,"unpackedSize":2856137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp0taCRA9TVsSAnZWagAAcHAP/jvDpaNnpXd38rTf6YXQ\n53XJyIOWP8aaBZdqqW4CZFHfCsM4C51tx1S5jlMLwNlPp9qJ1wS0dabLuT8w\nCrUzX0wu59uix06+TgC9xsit5iwBtXTELHdE+fmc2mNYgCis4t9DHcGR6JJi\n6C2Hy7IDOtK8DbKXM93eoCHVrw+P5Gl4xtUIDcuaXMr1OqeYuVj3B2MhS/Iy\nUMrA47g+PSNlwVhbCWb5nrQxLRMRJzKKRvqnvBdIxAeagye6iC3Io2mpJvzH\nBzyu+mA/1GHFsQn2q9WFhQik9v1nhA6PYp7W1FRqqGPDXbkar7cFMNIVYM8O\nvpI/tp5cweNBBgG2l7gtnKdhsmYy0NBwdaYOs+5QawaYOO/DvwusiMgE0fqO\nvU9H8gKLOZ6U1jmpWBBuJDA+p1ZKE+IH855CvEgGAW2C9mdKZRfpPczhSI4S\nW0NJ9rhz83WWhCRqRGz83GQbfnx185SbgnfKWfXHrP0y9degeHt4cUj3i8u3\nCSJ43gkPTNXm+kVxFs1UuaVMc7ECYAe3lOfTIZJQpkKj6iY7PNVAcn1h98vP\n5NICRVYzArqZC3HaLZUJL+dFMnPy+NmfHeEbZlD+fbrDIZa9MJ57uGnsc8kt\nUdDJXg5tTRCahYAoRocb4tmMVbV2oVZddCqdkx9lb1SMlRUBEIDYoWYrrcp/\nLFUy\r\n=pjR4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqyECL/KcIDJmrQ1WfHlCIorD9tyoVtx8yqNOrydoHBAiEAxAo6XJ1lTu+AWxlWZLQymniHfZ96sCkMxQBZ9tNY2gQ="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.20_1554467673804_0.9296142383552586"},"_hasShrinkwrap":false},"0.1.21":{"name":"lnd-grpc","version":"0.1.21","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.7.0"},"gitHead":"282e17191a7566b1ea30d9b85d83c7fc5586537b","_id":"lnd-grpc@0.1.21","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-snvslOfv+vpruu8IyXbZ+BoGEQHcQpubvDiiNZpiram26ck+48mbMsYgbOHyNPVP4DHVcHnVZmY3t1CsmFpe4A==","shasum":"4dc04946feaacc3ff2e4f61fb3deb26e6124c25c","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.21.tgz","fileCount":42,"unpackedSize":2855971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp1PKCRA9TVsSAnZWagAA1ooP/3ZWNCMsEB8Oh3ss2sCA\n/x39LfSRQzwcbHwn2eP4/gYTd80tgCPv45SVCzcGDb4LDcdhEOUabwt8u1Uc\nxmWyRNeOrcWy9i+aco39YNgcUH448NfwsScNTiuh9wl3zG5XxN4raWaHaMKu\n2lykPS1SgYD2BNRZn9wabaPYdhIDxgjAwi778Z8ngQdBKIZAbs4zpMYMDP+F\nNxAua0Jg6NAzfBWfsaJV/7HoUSR98cHs4beoc7zbhqz2YKxucMpx5lHFQEr5\nzz5OHASul8HPM4L0FFEO8lP/uH02MMVtEXlDvf7m9SAo+1yPEkh8CPvBBsoO\nmAge7MVJL0Lw6UE5HuC/rNRwcPF3XWt1W/eug8cgCGZEKYVR0kcu8SRMnvtD\nOuGY/tFV0sIos5amLWvygR256GTav47pLScbpinzhw32gS96gW81o7kYFhtG\njx99vgqdd+Az325l58FE6daSSAbYlChrmaA/SLmmPOE1PnYamJdF31YhHZrT\n3MHOmJBCsC2sM9x7LyJztD5GuXwUkG3HYRq2a7aA93N3lhO2JQNrN32/z2c0\ne680ICFqNV9sFB2SXl3aGmCKlXVb6SDTCGoAdOL19U1EW1jDXT79D9icNog9\nEzakAsnPimRHIovHm5YnZJbwl700QCg+uXsIvKszYTOwfcZGgVmSVL9h9/lp\nvCmd\r\n=diVx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuuzfsZCra5GhmW5loev8hMsGEleLti2Kb0msCyCIenwIgYtovhf1m4kD9yh84CMHaO7WNeIoa+cKldT+WohEnwJY="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.21_1554469833302_0.9781209291072994"},"_hasShrinkwrap":false},"0.1.22":{"name":"lnd-grpc","version":"0.1.22","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-source-map-support":"^2.0.1","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","babel-tape-runner":"^3.0.0","eslint":"^5.12.0","eslint-config-prettier":"^4.0.0","prettier":"^1.13.5","prettier-eslint":"^8.8.1","prettier-eslint-cli":"^4.7.1","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.9.0","tape-promise":"^4.0.0"},"buildDependencies":["babel-cli","babel-plugin-add-module-exports","babel-preset-env"],"dependencies":{"debug":"^4.1.1","semver":"^5.7.0"},"gitHead":"8756d018e135806a39ed4cabd693290e62a20f49","_id":"lnd-grpc@0.1.22","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JUN4KOqg/RuIkvl9qM9XO12yktwlu4DBoHswC+lvgcUW0WnMc3nWfP5UmZMmi/BlKgAW9FaJRauioCgm67pibA==","shasum":"7261918a78915ac69d72ec76830b8c3ca28b88d1","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.1.22.tgz","fileCount":47,"unpackedSize":3274479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsH7VCRA9TVsSAnZWagAAHY4P/3Wq8efKM8UPqwy1tsZY\ndqw1oPJOJB9JV9+3N7me2QmzCq8DcX+ayrpmf4G3ofQ2eUVhguRxO7Qnlduk\nlAJBW3NyhGN7cy/4O2IwPxM0uQBinPfIIrZMIyw/fM+iKFOIYfg0yovmEcmq\nNDG6aLCXgHJ6h/atkP5F4/EdWVmIaZL2gvbYfnZgtK7kd4gVBoQhLlNaTFlO\nUvCb/r/V5s1eAD2bKyuQdnk9berRJg0N6DIKRU0xIEuopx9P2rWUVbjdMe0w\n7yL1omOw+uSvKv5/1v2ZlvJmabCaAIyRr9P1TPs9dD9FLIrMI1mbEU47p8zg\n0umV0sz5FcF6R7ofqdYLQ8VDu0MhzotY78abLT6cqpiUR6z94QbTIcrp2Caq\nL92jpSCis3zJvTJhFLHvLxFyrFHbLdAOBcDwhH+Eq1fmdjQgeSMRywVxGD1L\nW6g7PJyfEcsv/rcpR6Jx4fVSDj3WDbaSAPW80NVYEC3xh9bLHxddSZ1Hrzzt\n5YHNr/y+svV2mHGC6tZG2VilQkaKtff1oFGwlUxTnp7drjye7s2zEtnd8EdX\nXnTjlH1h0WzWh3da7ioW+YHJWuaedTjMEc21HVwNqLCUXpT+M5+xSbJm4l1U\ncxcbYgOP6nQA9689YPyyWEHzkBjZYus/h2ZpuwLIwMuZjgUFs+vq2lUXl5fz\nlGv5\r\n=gR7L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0SulFXw55I+I4sgWl4mei3jgugTvhLXSdFm3weSYW9AiEAzuiq3SrZbqusxsiH1rjlN1+i26JqSWZ3cj+h3vHeueY="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.1.22_1555070677168_0.7727558001834025"},"_hasShrinkwrap":false},"0.2.0-beta":{"name":"lnd-grpc","version":"0.2.0-beta","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"^10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"^0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.1","prettier-eslint-cli":"4.7.1","rimraf":"^2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"^3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@babel/cli":"^7.4.4","@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Async/Promise support\n- Automatic lnd version detection\n- lndconnect support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **host {string}:**  \n  Hostname and port of lnd gRPC.\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data.\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data.\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls.\nconst { Lightning } = grpc.services\nconst info = await Lightning.getInfo()\nconst balance = await Lightning.walletBalance()\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"a75ab0bd57bbd5773eb2c876e4815a34c786f7fe","_id":"lnd-grpc@0.2.0-beta","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-5kXrxXvwr7wKd78E4Ntp15oHAI+e40qbDAZHFHz31cjwdXYt0vXn8W3kcUo8mnyRXwZbzFQXzr4Ok2zEVFPQ5w==","shasum":"07e92ac6c5ea9c2d67ba642eec454f9be2d24ff5","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.0-beta.tgz","fileCount":36,"unpackedSize":551608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyquGCRA9TVsSAnZWagAAP7YQAJ9YMxL/WCJM0MHpdi6b\n3fA6Ov3nKO1hJznjQWSyr55C+lmA6nHOU6c8P+Zga8kCaJC5Gr4QAIFMaaGk\njIhtUDsWs9n0q4Hs48d6hnHAGgNyV4xDNKYwFU5kcl6Z9lFd5LCwYhdZDcPJ\nND5EK2uY9zfbtMs6nCY/wSIWSt3nzxJL8MMhOWzYPPaPp4g92aH9tdlbDcgR\n8imaC9la9U5HBUF3ns0+u9jLwZJYJGMtlRWivUgaSVr7BYF8aUCCl9Z/NXnM\nzISb8/IdGzlif/5G6eNvaBIj0Cb4Xu0r1jrvULmKqNJVIb9W8CV+AzcVp5s0\n5NRI8qipiifQgSxX3IXtNXnAC5BCJOc9a4M3eA3oVYNDvs5H4z9tS5mEuI/m\nQOz/GTaWfqodZdBlk7mHXs7O/EzVSX2xYWlvSISB33qFbn09KNC6KQea3ddk\nXf4FA9mde3coAZHtOBkZz7SOfwGj1KeOmD1xtXq55RLvqROVtYdEgh0M0wY0\nWVosVdBS+lAPPhtOFPHaHZRRhUkGgZjDFBYwoJPoy/Om4HXrjBHe9IdvtnJW\nbBgxAbGAFBVosQMSVTlReu/5pS+u66TgP09b0PbjPhlF3xlEo6/ZXObAg2OB\nUhrJ+nWNImVrGH+Y9N8opK0G4KhgB5Hqx8UQU28eecoDuPhDqdhr0PrPsCe0\n3drJ\r\n=BskG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIASX1Qs76iVqOdLzOlRaVYbyMdis6NntpZCB92JvymUYAiA15mhyh+Ca0C47Gwxu0uvL0wesYirC/I2T43epzE9u1A=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.0-beta_1556786053622_0.9159459309495013"},"_hasShrinkwrap":false},"0.2.0-beta.2":{"name":"lnd-grpc","version":"0.2.0-beta.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"^10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"^0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.1","prettier-eslint-cli":"4.7.1","rimraf":"^2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"^3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Async/Promise support\n- Automatic lnd version detection\n- lndconnect support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **host {string}:**  \n  Hostname and port of lnd gRPC.\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data.\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data.\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls.\nconst { Lightning } = grpc.services\nconst info = await Lightning.getInfo()\nconst balance = await Lightning.walletBalance()\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"eeb84fb09e2e71f06326c972ccfabe65bf58609f","_id":"lnd-grpc@0.2.0-beta.2","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vGIHIOEIlSscjJ0YixVWV0FDvk4OBg85EP5gWiggrMnsDRTXgI+RBzG2b/j7Ku4c3UmjHCBzYOvy/56cdXYAFw==","shasum":"e757f312cd36120c3c7180aa0923519f6e0dd725","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.0-beta.2.tgz","fileCount":36,"unpackedSize":551610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyqyvCRA9TVsSAnZWagAAt8EP/03OlDzikc+TfLnOZINa\nJampm0gxv2qM3GlSsGrgBfoqvw8RhfHZysDKIJ1xUl35Hy1V5tVhk1nhSf2k\nApyARc7Vd84kQZu1oU2GEnL2qnvW9ZCucpE0ydNvw7bEBSHHFagglZARJ/o+\nM8gSU+7Bia2M9ScgrBnrHrIaWCTOQrDfzZV7Gm1ZdZPLmlvw+2zSXuqTk54u\nyk2j/o66X9BHrFV6LZjpnoMW61OUCGM/CMOqkVtfD65AncECxmoJZGPOW3fU\nFpzVJwYJoB+8ouIGO2BTe+3Kgk8Wbdb+v+3bEhBNEuHdwidixYhT5LzAExR4\n6V+iWK9VUBLCnZke+1+AtvLqOPabDv3aM4Q78/YjGXT53hZZ84Lk5h9v4db7\ncJhKXbIlJBfTE9WwXSv3d5o0XU15sRgCcGKi1mWoO8ImIncZc6yY4fC+s1Xf\nHGbZQ4UL/Wz63tsK1F8dKCDD9TmHdX6i9rtozICXqIqM8t6p8i3weO8TiAPi\nyJvvI0bPSQa8rPe0XCA/qhDDoalDXGCq3exwl/yWl+h/6MLI37PeztVVgpWr\nfujGxE77FSWDNuo5EmThc81zqmBkl3qarrfFSllVvNKfZqEX+SGc7Frorioj\nuFGj1kXmSXQ/x+552GIuSfCkxBHHghDnt5rNSpmAZZdZEaRvS/XtNs0MmTmN\n26gD\r\n=04dc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrhOjmreByNs89+Ik71t4x5tcC/03fp96WgkO0dWOnCwIhAKmB5oI9uNuxCDmi76AOcPtrbW8N3GPPqbViMoLVGxIM"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.0-beta.2_1556786350462_0.6848391083959675"},"_hasShrinkwrap":false},"0.2.0-beta.3":{"name":"lnd-grpc","version":"0.2.0-beta.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"^10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"^0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.1","prettier-eslint-cli":"4.7.1","rimraf":"^2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"^3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Async/Promise support\n- Automatic lnd version detection\n- lndconnect support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **host {string}:**  \n  Hostname and port of lnd gRPC.\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data.\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data.\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls.\nconst { Lightning } = grpc.services\nconst info = await Lightning.getInfo()\nconst balance = await Lightning.walletBalance()\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"9d69145668d6d130659b86919087030634df3444","_id":"lnd-grpc@0.2.0-beta.3","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xl8P8aXFqIo0Zo4oFL1PBXMT+7J79fbh9OpnqpSPewoZYRvd2ewWAGQH98ClaLd+7HwmqedDcSQxB73I6SmXwQ==","shasum":"139716722070cd91199f66fc77b7d81aa7a90965","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.0-beta.3.tgz","fileCount":36,"unpackedSize":521195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyryQCRA9TVsSAnZWagAAzaMP+QHUwbH7AsNv4kYU6axW\nzeX8Lnc5LcqQZKZSzqR0PZ9Ov8QnlFKweAWTRBZ3muEbiUddis+3YP9Vtkwl\nG5XZRUbFjNEmixmmkaRJa5Bqiglo1kusLHCQ0tffg9/v7NYY/GsVDTEiOvVi\nOQYU5yP+Sy6ddv9FjLzJxrx2JZkhaWQFLHNSm+WmSSLpCz+sW5P5uR0S19kX\noRZceTDufICkvgZUe+6CgEsba1xnrlzrRBHSbx0RcFLquM75KExxcdGqOyVT\nMbOiEFFFv5Pt3+iQ+rRV2hDWxH5wroCU2vbLn511MiiqSNUnnUICPzkVjB6u\nl44PWegN1JUZKbR/RpzIbjp1Kw9bDSi8y1Aooe3ZUevYrNfBaH1xJIbepuNO\ndNCmIhAY8rN2/CtY3sueWUD/Ze+ewzrt4srKLO5N5pL2AnpJRRa7JK6bN1R2\nbvxx1U8oxFxwjO93aGyOm+HdJsWAUEBKXszCO36fCg0z1wmh73dhATuLArYl\nEm9PHN6gIEAusQ1BHE0mk54Ou+ktt+FiMj7SiOXhYTMI2U+mmRQ7oZFSApZ4\nzII6mFWg0fyjOLvQDwv6PT2x2eRFcjLz3lgMwszT8LSTDSbYf/RzBhr1EkIS\nP4Xa7n6ZZvMEx7Eh9PePStpzDPl+CRkfQevCMRpeVKWkW+9k64+iYAnsLt/k\nizZY\r\n=bS7K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8qCGQK4OrE9IT4dOS1xyaDuiOF4xwo0jshxM1jtUX1gIhAPBAwdNTBeqWhbeZs2zvDjbeXYS8qex4Ne/4U/8+pkut"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.0-beta.3_1556790415855_0.26643420611230195"},"_hasShrinkwrap":false},"0.2.0-beta.4":{"name":"lnd-grpc","version":"0.2.0-beta.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"^10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"^0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.1","prettier-eslint-cli":"4.7.1","rimraf":"^2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"^3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Async/Promise support\n- Automatic lnd version detection\n- lndconnect support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **host {string}:**  \n  Hostname and port of lnd gRPC.\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data.\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data.\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"1e5629d46a574a5d61a235e3e7f34d499356e46d","_id":"lnd-grpc@0.2.0-beta.4","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-W1h/Qa07IvwuPDaAjbyZ4htqXWEhe/CeuzMd6kgZMC+iWCw91nM+jGX0iuUV776OlmEbYDFGKGa7/nazFYqwUg==","shasum":"913e638b69b792a64e4e0bfb002da136555c8137","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.0-beta.4.tgz","fileCount":36,"unpackedSize":521087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcysScCRA9TVsSAnZWagAAInUP/jGl6oi8rFBRqttYMalS\n3gFilMNlpQR64CRyVuAeahp28Vg4f8DNMKe+8Dp//t1d5lWxr5U7qpGKSGHM\nb/9QR0t+X/zMKUBcmW+PvWyD+jjJ8+ZcBIIt175i5RfG12ytBfI1Tt2myqz7\n198v6FFq6TpGgnrQjICr6sfio2sMw3HTtXGXvfcl6CZ3za3h6rr6GMX1hZDj\nxq400fs312ASoRsefAvEKKwMiVjnnUTGs6kyR4/ast+Y650XcKkbujQvxkYq\nAixGA89rOr6tKGhkhCnzoXG0s5s5AFUR1g5TzBuArLIQHkhPmjUPKbajXNcH\njMHtKWQdTJYUekW0Y2N6VELaz9jDTdHy/7XU+boIIC/zwdZhmpAHRK0k4gAO\nz5dgtCDISKIbjuGNKAlzKE+xkKTFHFFVt/gAec+qLCYkJl5eaSb1jHMSN22W\nxF8NC/GVfqF+mkwyCJ5gFXxX/bxM4cvXP/zx/G3gIKDgh2ALa1cGGjWbn7LV\nWBoCPNAW9yRWrTxmqL+e4TT7tB1RuySGL7x7BNK+hatUr4wJbIZCZr48C1yT\nCoZ74youv+9Ml1HWBwiJYkHKG1aEjTgc1NVSH4gNLVz7bV0OgfRH1bo0NUSt\nOpp9LhbKJp99GCMvP2DB2Aeh3ZkH6z4w7sMHw2kP69dq9e7GGI703BzaYaBi\nfktn\r\n=gChY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFDOgK36Z6KZfvTfWPC0qLMZjRt6qbcc1HqBsr5hiVOAiAOad8O+/Wp3HHNAoMMzfAp+LNJ1y6iYYWFMWFj7MlDdQ=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.0-beta.4_1556792476225_0.04348495074698455"},"_hasShrinkwrap":false},"0.2.0":{"name":"lnd-grpc","version":"0.2.0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"2.6.5","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"458b945ad9c0817eb5163adf934c9b533dfa6cd8","_id":"lnd-grpc@0.2.0","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-x9ETUICqzPUWUAnrTkAaxqVcMvUP5Ho8G30jykXCT0RaE+c6cEKgvUW+xO+487nt5ZBJF3efP3ONbV/KsRZDwA==","shasum":"1ac13d8b3322b42700658edca2f08b043fe3edb1","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.0.tgz","fileCount":36,"unpackedSize":521099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyywRCRA9TVsSAnZWagAAzGYP/jbPSuAajgSf90J4jeu2\n7oqRj4P8oYIDEjDIlZU5POBNQMQ0iIgLjTvTnMGLS0w4QeC63SaPr19saCnH\ntTtwxNHVqk1x2Hi/Z6koO2G+cu5liPn5iaTasL39XFFyLTBE5WdPjGh195TB\nxGV87/sf8ZXyNJwzzP/DCX4VLVq3YuS5VpAAAQi2K29ISQ+c/jNKrjUf2Rhu\nqFpVMf7ZHJ5ucwDPzAnZAfVctZNwiyr6s8irzZzb5ZutwWl0RWfPJZHqwxSJ\nGurXnowrxtGJwCkcSZHKVRmy02BJdvmkhMeEE5s5NjdlAl9Q4bZEZqhIXqq3\nkqTfJfkArczaN/NYmazza4ZDBXT74V/2VswIUsd6Pububej8RhoXGSx76cos\neJBd/1q+Z+9XbEGpNzFkDo4RtuncuRkkyv+qkywPD2pCtnfb6a/LHwQWPuG/\nrwjfgFJtFnsQMbrlA+YzEtwfj1CmJgCK32RjPubGbONVY6Xoi2PHTF+Cvvs1\ntAuBdbP1fCH3TQbws6K3stN9TyTl8wYl6E/HGGTNWpp5a1Xc3rZwBVtQPB1M\nUt0v4Bb2UDTXPIdDdMN4XrE6OsjeF34C5HSTY1aQcAE3Z2FDyKJU1ZHrJxOk\nQ0VJEC+0K4OL0Jp+6Fr6eSWRON6Uj7rumdImZ6YD15g744qb7u0GaBAyCi1l\n21tk\r\n=VS2Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAnQ4d46059lbsXjCIXdr99JxKb4ZF4Qmla/lC6cptpQIgUcB+cKynl4sNUFZFhj7KalovTn6hyxundbtIULad45g="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.0_1556818960046_0.39776817706728207"},"_hasShrinkwrap":false},"0.2.1":{"name":"lnd-grpc","version":"0.2.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"2.6.5","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"4ea0756e9dcffabb838a79c4c2b121a507e7eebd","_id":"lnd-grpc@0.2.1","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-61RMqOsU4qH0OwK1rJ1Ev3s5neJwCnFhm5wKhvJ+bjPsxxsKZxgVmxIeVuUQR+QEYuB+dsMwT/4iPXObs/zo4w==","shasum":"38e6d0392c99446eef4bdf4c2f243a079652b85d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.1.tgz","fileCount":36,"unpackedSize":522642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcy/p0CRA9TVsSAnZWagAAV7gQAIDw9Il9gjetPgH5MmXl\nroJyDwE8Eb+K4Lh7x4lsxkWt4ddEJJqBMN3Ik1bIrd+aAb9bHbdoxjmgXgI+\n4PU/Cs1oqRSGz8TOvDfX6nMq8jZqH4Fp/4jbCCgESy+qMuY1lmpfiJwdOy0+\nkwnfRfuWFkd3/sAWJTAAFfkRWnGqH1YRdzXEyJ7HJYmAktCitfdqLxUiKENp\nQQWtU941FZyqS/EZr0uUeBjAiYN+tDNoW8vwVmdWnbsNIig6mx2KHYPcY7sK\n7trN3kww3fB6PHFZnvX3BfvRgDbqnxQ8DoniGaxxGkf0OH30W1segw7mSr4/\nAfX5xDhVqGghLkwzRIEmju6n1Nr6IStHTUFWEk/xxjvL1YNdoLCgU1trWvYh\nbAwRZCZ345W5NXBTbG5y33t7/3A+OVdRXQIDI1zpX820l7g2RS4hoFgnYgg+\n+v0W8g4dYNmz8H7ww8Qmjl6B0ia7gJGBSWsU00/MEbVsWZmNhTCjyuMYIlx3\no7rA1mBEgOKLcoDj9AacEG6RVg83Wwv3OlkrIqwmvgiozV+dKPc5+SO9Fics\nIaaVJEkdbG8WDaLxgSR8nUzA7d/Jh+2sriJKgQIEcFLZIOcHlA1J3TPj25V1\n6JUKws7rMfuWSMmJ0rZHniQFNgAuWjAfdSq0AElgEtJp2MfQfRMPM+gP6+/X\n92JC\r\n=2nw2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9mL3vRIeeTc/12WAEmXmTeU7U8NpQuoPYAQnRysCV2wIgSxu0EM2CuCfYqnttsMV4wcwGKMSqFF3uiYEqRlYZRDI="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.1_1556871795917_0.606964984757695"},"_hasShrinkwrap":false},"0.2.2":{"name":"lnd-grpc","version":"0.2.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"ff20b8f84cb8f727f4dcba8d3e022ff05d89ac50","_id":"lnd-grpc@0.2.2","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-z8EG1C4z32ETIvTFwqAgIG/u6QlWz6RymNqzkom/MB7+m8TFni8hdA1LD5qrBLRWscNLN48GJj8ScvW77MiSPw==","shasum":"3c7e03313046aafdafacadfdaa7bd3527fdc691d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.2.tgz","fileCount":58,"unpackedSize":551470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczKW1CRA9TVsSAnZWagAAUFsP/1nehZSGr6FDvIbPqCL2\nwmrwgOcYjNMR04DVK8TdkMr7xlE0N+081XLpETF3OCdtkD6OTNVdI2hCmOGm\ntBf/ZnCjwt/2z2aHdVrC+SI0DIf7DjELZIkaK0IlK76FFXYX5lOSxq2OPLFd\n4i+1lNbwyfIICvE5KCgmSH78/q27igJHVCee8nlijuPdsEXFpbgcIbk19gTt\nGqqOovu7lcY4FTpWBhFqCVbh8qNyFzJ8xPUEXGm0OYK7uFhK/wIQ1h28Uv3t\nSiGD73LHQbtvFMMU9JZ9zErVNFLFJbcP1j2DFnKh4T2lMbo3tyPoDrV9V/Hi\nVxcNQmO/oa/0FXWP/uKaR1WjYa/gZ99b0sZKNalqetl/ETEtUeh8OhZERy6k\n+er7OOoB/Au81Awuli0rBk6wOemz4deKBbAJHrIPEQTdNYqCZcW4N7DrHI3N\nkiewe5GLtgr42F7QLD5V07Wu8GD2mCsxMQwV7y3rZ4sTK2sUOgpT0TwLTxbN\n7ptHPAzsRUcNuKZZnviddEUIgjvQt5WZbIpg0TY3AXbXG9vpQ7zw6DIrDLWP\n8KKsYyUpY6QzBQfi4wNvATT162s1x5jktfjCvVVvi5RAt8RTYWLYFJNAb2ZE\noe4Hod4eluYvdIDD/BzINLOWJaYutty7p9yhKVE7eRn3TfXrxEAlREd8tF22\nv+Eu\r\n=VVpj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCe5kz+zTyaf5hmat4y6KHAWCUbSUFR36uw1lil+hlH3wIhAPPybL9KblGIRV/6myAZZfSTVYlfqD83/YFtNkYtufcO"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.2_1556915637122_0.6368738224354695"},"_hasShrinkwrap":false},"0.2.3":{"name":"lnd-grpc","version":"0.2.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.3.6","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"5580afe193df169bec6e4546ec6e40268e925465","_id":"lnd-grpc@0.2.3","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GS34sX3uFzOraqiU8OrijQv/KBW/vIBPUipJ+v2TlR/W+Jkde7uWV9xbUDY/OY9S++/SS61smuJcFYrDpWi/nw==","shasum":"7d20a1c52af650d728a106d960eff5cdcd2ebade","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.3.tgz","fileCount":60,"unpackedSize":556412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczK8HCRA9TVsSAnZWagAAB7oP/0E/QFfWXt3qI8v+BnCZ\nd50lc/arpuo+WpWSLTYi+aL55YtrIV2TOPZ6oXFcOxTLg3eqhRo+DqCRZcuB\n/Cq9h61WHfTYRGlUOYK8k3aJPoa12X0NKFmIoRhYnLZ3y7D3rVXjgUFcMDkj\ntap//yV+bQFDyvkK/bonfYA30UMCFyepmplAfxPRNhbHGy/kgEqvax4zdR3Z\ng7Fdu2C6RRkF09+UrJziHjo4uUOgucW9Lbf9zb0De1j2g4f0yTbXAgYXpRGa\nvYDblLxI/lm5UbmfONHdKLhkgeU14GspUmfq+HJFT9yXGUa9ubumbIMuFFV2\noMk1OdHnmRBZZof2b/Qtixd5BthItZFuUErQErNfw0tk3qCR0M0tYHM1ARbs\nj+6EJn7Y8NwhEYadmI53kCqZwwe2CWxgNfZk/E3FNC35ub8jJ9gPV+XBSl/v\nwzbCxY0TwlsZj6bra38MMNgcaRBbnoJi+yAdVAHvKoMKzOA1USipK2og1oUS\n9jwRPntuB3mlhA/VBwkSEeeK6/vjvAYvXZFqBFNOgnTtAZz3DpAI9e1Wo9Re\nT/4OGF7rerh3H9EB8xpNZ7iKb+tBe67l2otubOJlHG77HbblPj4wJfQRSeG0\n7omyhVDEglU9wcMSU3kQabc45vV6enQMZ+bjU6gZdhaieCBXEmgNHrAW32Gd\n3l1k\r\n=RC4b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJS9HhPODz81q53CopFBQLtGHeFQO76bqI/9DYNwTpAAiEAopll/gue70H9UJwUpEn/ITaiYQ2haHZNTKze5TLvSS8="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.3_1556918022395_0.6009900295410813"},"_hasShrinkwrap":false},"0.2.4":{"name":"lnd-grpc","version":"0.2.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"300a1c5116bc24c05aabe872efbc56e7603dd9bf","_id":"lnd-grpc@0.2.4","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JFOaT7L6hp8up/jEFDJG4P8EBgnIwU9Mr5C6qbLyIJhA18YEAS0vVxwAhDOivxUWP7u78XhfJAwiHDDeRgH1aQ==","shasum":"8c31e2d054759dd3fdda9d44200ca0f7dc495d49","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.4.tgz","fileCount":60,"unpackedSize":556412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcz+GNCRA9TVsSAnZWagAAhboP/3Dwx58LptEqsRSrrm+G\n9fARGqxzfUHMPkP2Tg0CcjK1QzFKrCokgC4zQyOcWWVakBkc0y/MWy0u63st\n8oUqsqhGHWOdqbY5n0HAYti2Y8sQGE8Y1gw6H0vt6N+pjhURuxFKcueJxOHb\nujGpInuIAyzvflchplBXessQqBhRnNTYvDLQd6CymklI0CkX+JDpAHd7iDMi\nGxTS2rktBXDeFNzgIxkF/ykXrFB9V9vrge42U/TTyWfIZo3EppMauzSdS408\n2gyuAfOINXASKOx9UN0TFZmww9FqgWXuLczNpQUlBrpaOxUjdt7Iss8h0uA1\nM7Dr8qWl2eyzteMmmsyej7KWUFM8i6t/o25FkbnpG+9VUJe+mRfhB7s0I3sB\nC3oin+gaAPxkNSudu+IuTM9XNK4JWDoWnuc9LYNfmZZ5MoWR01jiVBLonj8W\nrL37HV2So6Nj53qwECBhaguVVLQwkSyiidsE7vhy6EqIzbiBpNb7Wis51TKK\nIF6wRB36UvK3SiRYX7FlV4v7gekpWa2dMNm5lGEjfS3iZ5QRBmeNgUIuVRaL\njfgPevHTM9mxFiNbUS9YX5S6vQdJEwqOO2MjDwNKWL4cBvl3jjHV38hnFm9s\nsamZ241zU1VOwI2n8YS8r7HZYxVzgvEJJqgtLcCtxfoZUjK4JwkHD/gZOXWx\nxKcT\r\n=et0Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLNvOPE8Szt6E44Ihd95tosyR0AdSWRyoLCL2Zz3sr2AiB7wTB2NqcI7bMp+05GnljQ3Hn2FCpoe7yrP/CBlB5aZw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.4_1557127564185_0.9237199889459196"},"_hasShrinkwrap":false},"0.2.5":{"name":"lnd-grpc","version":"0.2.5","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.0","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"1256435c5ca2bbdf88e75a8713dd588bd53ca1fb","_id":"lnd-grpc@0.2.5","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Bw7d5njWvLirhGAm1+NlKg+My4+1V+Dk180XtZju6xYLQrrDW0bqLVE/S6sRVUYb0OxMp4ASbUub+GQwy6Y7Gw==","shasum":"d854a52b8ac87371788a1c56c0ca9bb2a23fa65d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.5.tgz","fileCount":60,"unpackedSize":559221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc01a2CRA9TVsSAnZWagAAxdsQAKRBZxriGfgcl7puQ4YJ\npwnGVWu/Vv1Wflk3gfH5LHmv3UyPeMivLAS56dTNB+vEjFk0c3D77beUXBDH\n2OFSpFQiDysw5qhENc31KACPuY5Lk6dmLth9rGx0BX6MjPbUjTkpRXbNkfSx\nHsB920Ew8GqRHTxkM+OPAQQBUL4KPN0OPZF4xD/4xJ8NgCud4lBO6JtSSVmq\nCZkS+bMWLb1TVfM+ftXM+6LUIYPQrbhWVpT7bCY4yVOC0H7Cs09q9PKfhs57\nk/YRJDVluwihVYClv0u1DNN/kaDmzoopE+8M+QsKmOiu7nYM/cdjKi5unAQZ\ntwBbgMISRz/xCKPMfZFk5CLbT3nuSQBP6oD4G1otqM9gp0Gn2UsseX7rl/Yg\nb2bUVbOgT7FZo2sbzQP3XSSiVXik4XEmUZtPjsHtVbvn1doF5y0/Q+tMcPKa\nF39FvWqJ9CkWzY9lMT4SAah8rtE6tku20i1rgtKprrxVdiSjUVEqrtVhZdDs\nwAzyfajltasn7wImSZ5X1KNJEVc1ZjTleQDd0vSM9Yfrm+4AgFaQra0UvNVy\nJowQBkpxokywuTqf0VIBo9H2wTf4bpqN8Nd3dt5UxFKz7yGZdb74NqZtSJek\ny9B0GJuwIwL8ZPGvyK5MmF1Bvm5x1lX2ODtKINIXLkFKyQ86nnJwpZgnj1lG\nIKvE\r\n=odpq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC9x7aMGQbpCp4hedV1s/T71xNW5HgfIzj9unYB3AFUKAiBO8U6BBDGFRWvR6szVZb5G0fMsVzpJ1o2cFDVJFDN7YQ=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.5_1557354165186_0.47328542884915303"},"_hasShrinkwrap":false},"0.2.6":{"name":"lnd-grpc","version":"0.2.6","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.2.0","lnd-binary":"0.3.10","prettier":"1.17.1","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.0","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"c7dcdf2fc12a6872122e7ded2c5c182ea62bc97c","_id":"lnd-grpc@0.2.6","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-xQBwh6RVnl0m+pEaqntzygYWYcqd4mHhbNxO8UriTpQ0kMJSu1jmSYv8dnr3BdFFpDSLTCWf5ZNRUlPgXn9lcA==","shasum":"32e56c4e72cf54ec32f6da917cb1a7d7e0bf6439","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.6.tgz","fileCount":62,"unpackedSize":565235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3ApcCRA9TVsSAnZWagAAwvoQAJlj41syY0zpk57ZLZRs\nXx/BtSabWED7zvxKSIOrHARV7iz4Nw4h42/4X3EnN3M2a9eCDXxA/NonnGby\nGeBFTSvti8DDWqmEvMbxujHY7buIe3DMMmWIXBBaOWbSRbEtEUgOJxPaVw4x\nMmj7UhpQtKuTI68NWrJvGOnD0F29RPK5MzJky0KO9eIQrVIV7ElHl3uPPJH0\nN0SLzxGwOH6HRzFyEVPYDJBbH+h7ehUA/Tl002XmnVIwZRWHQkY+xfaFbJwy\n6dOYpOJETDe+MDVJHrikTooVtFoZENv4Pwuc23EqWOvJ8e2V0ABAJBoVhVIO\nlzoWyIthVT1AyI5TDuzgZ0O4vdZyEODSj4cQO9jD4ZIq5fzzIDyKaTF1Xhro\n5XB18BxQPkbgNuxbFVyqhF90ahsJG/wH37365HMiLoL9wPcQ8GnFZZioFjlM\nBi3kyfA7uGyONWti7eFA4tLINExYenNpz+dYffKUfsE2zS40fraGRutezuub\nbY3S9omBz2JHza+1heL38obBeCKf9F6iQpGshhBclERELMTUewXCmCVhYpFE\npeX2jwO3P0Kn7HSyX6xYJdypXYEtfXgTNPztqHHOrZdq6egU48RE209pk7Hb\nOwn/ZdJqtQz9obfg5k3W+HZYXkot3+e83hMfz+aaiBRj8ZMd1K5B3vqNUkaR\nOU4M\r\n=MlvT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYPUCSutTDYOhZDUMhdfwvDsjYs9wab/osIanEvMJC8AiEA+TxLkoKwKBlzwH+dgZjDP706qDVojHCw23fapBJYxZM="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.6_1557924444098_0.01129299126557548"},"_hasShrinkwrap":false},"0.2.7":{"name":"lnd-grpc","version":"0.2.7","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","eslint":"5.16.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.10","prettier":"1.17.1","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","source-map-support":"0.5.12","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"c8f4b303ad44502e9d85c311cb7b6b6a67083612","_id":"lnd-grpc@0.2.7","_nodeVersion":"11.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LlIkf9yA6KaVVWzbCvOR6/NMZaZg9tfNEYbeI724euZ3B7ZkO3VhnAYxWVWdHG06Ni1PJsnKZDipL1Qrpj5MRg==","shasum":"fbbdae24984e250e27ffc797e53902628d291c2d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.7.tgz","fileCount":62,"unpackedSize":565235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3v5oCRA9TVsSAnZWagAAA5QP/RB2PoLeMEMhk7v1tF4e\nKkrtRFXXpD2QpNMHOYers2796lucKf9qLLxLbzc+0a/A10b01mI29cIe+k5a\nHP0SLB8+usaPXVJFPeXu1rEu6araPATeufURwqAOZmTnsJydBOJ3WqTQbc7u\n3DnlgPgHhmRs4CCp5t2Nh17eQ18ZCfeK6b8+hOVPhYzPWV6saMrOUZDkXiSv\nkS3vhBjB1jl5NGntgr6dglmf9Y/ChFhu9PX3BWLpYS7fWrneKD7ctYngZxbF\nRqXAXqLhYdJeHjFZlAa8dONHOTH2U+Y+gKJ30CSSJR0naVLFdv4HCYIqEygV\nIR+RWzcw9nhxtBcRdC857iFH4HW3kejm2LhPH5s0twzmT4PsZuZNlMzsKP/J\nVrViO7JY6IhKf7mauxGl/BxVDpeo4ejJH8HPva1gxzCbVqZvA0Y0A/PVUwTB\ngMN98US8FKEQ50Z5/7fRow/HCF3l/TB8DOnYHnyA8aMLJ7UAEJ8g1cyZLnKa\nOPUY3Hy/Pia3Fp9/zvL9U+C8llnZfb7XO/AUPtcqnA5cJiYlcvuS6D1jr7AT\n4YeH2dKQLDOPWzEqGsgg8BCbGaXTKSYARsU2OaCgs0tUomo+uxwu+FVrMotX\nxv2/Gb7Qy1dl3FgchcODZUXnzXsYcyUrmdWiaut8ZZ2KAUhfuraJlE/I+Plr\n5tob\r\n=5E5n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhllZkjK/jkS3e1g28XsviWBUBcEnzQsOZue1E5iGX4AiEA1D5l+GMpG889fmT7iNSgctPWLeGa+rbDC3snpewJFTs="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.7_1558117991146_0.537150942778388"},"_hasShrinkwrap":false},"0.2.8":{"name":"lnd-grpc","version":"0.2.8","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.0.1","cross-env":"5.2.0","eslint":"5.16.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.10","prettier":"1.17.1","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.5","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"83c516b8dbf6402bcfed539df93ae03e4917985e","_id":"lnd-grpc@0.2.8","_nodeVersion":"11.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sC70MEZniH13HzJTo4X+gm/uAQrHPdxlSgrk2vdFp8SVkJn/CTL0h1+NMrludH5+7xzXsfqeANJ5EZfWHyv1YQ==","shasum":"d1a3ff273031362b2bdfdf2cf5d7f21605bae450","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.8.tgz","fileCount":62,"unpackedSize":564312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4w/4CRA9TVsSAnZWagAAxv8QAIU86BxB/pYWO8z6MhyU\neuLnmD161tJ3P7iIVKLTHkqKTV8yv620QPPZ+eQcY7wB5iCQGSpkk9NaIb5N\nEPiXxwKnAl+WeyLRqQtBgtNcsuz3ByoAwJN0kNNPB/qSay8J0Kmw1Fw6k1ND\n6THVdDPLLlbQP5zZRtmkmhtvTFhdwPwM9O+8MMftjZfPt55ifkaZFHNrgzQL\nnvUZU2VGFfoyacZg5RvlLQUAbPzhwFpO8sad5zJXbTkr3x6RXY5CNxbGk/zu\nFwqBJYm/IDYGzEyZUzDDcQYe/tQRv1hOIJgPSvEzy88piJj8fLY/RpXvXpBh\nkw1Sf1zSDcQ0bHINVYa2RB9poD6y75g/eP9BSRaknpB0UNTibjXWdbMWdlBc\nS/bTGfwG6DW4keylpO7UuO/3QCY4FiQKd/8m1Q7YJ1UmfhfR5hlRZr6Vcgkc\n+bVPgYi1LapUjzBfV1T38tIvlXxNJG5KNf217FwZ0ELjF7YfLoNX+zvr1Y4I\nZQupBeqejee/zLuNtuOxlvczWVz5VxxX/PKP4CVX27JAtZ5PAjZS5oJCIhn4\nWertllwViHaIPgS2JFl7kSEcLGZwOcnLujAvuEBPJfHmBCAeuf+s+RtfYy8Q\nlBiHvEOk6yj3yGLEAy2Wxca0kAORBPe7fUoN4YWZsTL7Ti4PxXtW3cNeW/eZ\nib1e\r\n=mUfz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9uNRU4Hbvd3QDzehO8ipm8Hbqz43UnsN1/R9odOt6agIgP5S/oaYDgnOn5SG/rEEPxbl893Q6oupWCaREsUZXsKM="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.8_1558384632132_0.1712403708943404"},"_hasShrinkwrap":false},"0.2.9":{"name":"lnd-grpc","version":"0.2.9","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.4","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.1","cross-env":"5.2.0","eslint":"5.16.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.10","prettier":"1.17.1","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.0","@grpc/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.0.0","untildify":"4.0.0","validator":"10.11.0"},"gitHead":"f457523790de58aac3e84666e6ff79968543b26a","_id":"lnd-grpc@0.2.9","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-cWESEOm6EbL+xrkLAqY6vW8R2UnYG51ZJ2suf7tt+ncr9Z5DsiTRCvrSsU9xpoyG+DlMMimTMIb99R+FBKunow==","shasum":"0d90d9c6554f47e966da56ab5e290df1c7c6de98","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.9.tgz","fileCount":62,"unpackedSize":566191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5BlRCRA9TVsSAnZWagAAE3YQAJyvs8xWXmGHLwATz+tj\n9rz+T8xUjPUcvfZoEyt6Qu1nSZgKFOw3y2ZEqhQJYQRoSGFJU3mxc5qv5OjN\nEqhgBEgJJX8k/kODv/ag0FeuvvbewV3F1ROrZhxyBx8sWXtvAQY6v8shbN7F\nnudUbtHbZiJgmlTZwaQsXCX3EwiibvTvR2ltQrouVDs8QVmThyYnEllcizgk\nxx5ZW463a8MVN/SvYnxHHD+AqzkXuHutznj0LFDZLpzTFCfe1+7DlZ5jMwwo\nsRmWJu+Elu5HXcUi8OOxsfPB5Kg4dWiytXoQQE12gupD5hWEoHYEA2EYv8PD\nuxxvrKTyrR1IZiVh0JPc52LMV3PLd84dO5zCtuaT+F3uberGWk7EswpbO2Po\n2Ka+FTmKYk9Ha74oJFeRiqgJ/Pc0tK4C4qPKOYi961j87IGZL1X0mmnF0+vg\ntfKFXaapR6hEQLrKaJ9igS9I81ItLP13RVWGBBMmGA9T6VkgpVk4RRM/1iPk\nIvabX0bGYT4FR1/RZZt+jWjfswq/kv9WZjgsI3/Thjs+7yGpVeTcHIZjvAMg\nq8JIApUWvXWKNPPQCZshfjDW4w9wZ4kxBOcEKRry58tNx58GO+tF0QtnyX3p\nsEW5Xl+U/xGZTCYX9siFnPab/GYj4BH8aaST6dfPGbt6Fy5fo538mH/330Sc\nCsJZ\r\n=B/Vh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2XSHPONa9spZBhmvdYxyqY77rfajBmIv5JCJUc58UYAiBB0bzQyH0OkeRjBD6x/gVLjuQXFLeFzEg0HwvDscMwfw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.9_1558452560262_0.7569732127226996"},"_hasShrinkwrap":false},"0.2.10":{"name":"lnd-grpc","version":"0.2.10","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.1","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.3","cross-env":"5.2.0","eslint":"5.16.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.10","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@grpc/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"gitHead":"30a359cb014439c2d743c5ebf01b0e1bf667cc26","_id":"lnd-grpc@0.2.10","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-oE0LN07Zu65fdSKlFpgQLvDbyQrX38rJq/aeBevA8XOAOpGZVMJK0h6yTBJGA9ihxdaf5acv/uxquakqXH+kwg==","shasum":"40ec5616324baec49a3c2dfb2ccd6a11a3bea8d3","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.10.tgz","fileCount":62,"unpackedSize":566191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdALi0CRA9TVsSAnZWagAA+RoQAIG4EXgYFLuF8wH0GCXT\nrxKBcXGjL4sF2ZvBoD+9wX7GNMr26oftO/TKc0T8iPhop45FLv13aMzfr5Te\nzyFwkw2j6JYaCCeDYLOnsvRk9ozOhIO0y1Xk+HBEa/1n0HFFsGtW/ncpHEyX\nrNhkzFBXtYSAR8WIW5QZzYrPAvD0+jgXP57wY/GfjbBIny8rbpb1xjVKoLsv\nsJ19Lfg95fzrZdpp1cIm1RIdYUDWZGJeOBiX78c6DGHa+GWkt2xSHBGtkUCi\nq10s0sowzs8zUnLEtOS8g3d5ZS5QM3o+SR5Lrq1JtUagYAM6p+B7AOYOjafk\n3BE/oT6USBmK5xoAIPQvjg9Z5JI38irooUvSlaJTAt68xpU79CSU/w4nb5Ly\nePa3eObxoFW3NmsTvs+eYdSMv8vB8qn4VOV9uKjK+Ve1zq7hra/UoF9Yg5LA\n4/L8gmWnWKRe/RcHsj69Y4BMVldyh0mQRZUdC+2cFW7kr/HGF6tXvcc8i8IO\nP3c4t2sFu4XHQVMMnPXOAU5GaCil6IjQfFjVJyyS2cQWABZKQD8WEhSotw5T\nDDt/zq+HvsPEEzK+TmSD+sQUk+9Mr+CaYGh+1IfZ7VctkwAHIZ1ViQ6MNqdb\n2tO5UXTwlpXJ6vqRJElzgH9VbCcCfJ9pPlwaVVA1MhAtZZWDh5+NR2TQrSKW\nW8zO\r\n=zJXG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjdy97GtNaDEtFMvm/L2PNLYoRo11LAGmvNPlKpMPdUgIhAJLqRiuHlM7/mVpeagRdWLsKzeSap1Xd327w/Tso+Zgl"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.10_1560328371496_0.14273123273366828"},"_hasShrinkwrap":false},"0.3.0-0":{"name":"lnd-grpc","version":"0.3.0-0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@grpc/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"85619607f17ab745c3792325567eea35ec2d546b","_id":"lnd-grpc@0.3.0-0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2k7tIdOHYnWhwpAC1K7IKoFH9hnN9Kr+zJNFLxFpHiNYlHYz4jp7v10TBT2dT8vmeMmH8kRddk0wBwuk/uXF6A==","shasum":"7b6d5a81430edd65badf42aa0a96c49021b8f8de","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-0.tgz","fileCount":62,"unpackedSize":566191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEMsACRA9TVsSAnZWagAAp7gP/3wOz49FaRDVcy8fZJ1q\n0KC+94Lq7eIdZQ8h/XqJl2emu+wWJAOhrVFCtVgdrgB78IxOO9UaIccE+dGp\n0LOYkZGjhf6f8E+EZQM5z/W8GZs6GAHMoHR//mgs+BrRc7tkPHQf21z9GmIv\nspb2pxpfz7AUH3Ju0FmcbJSxwYxfhvcJs7nLPpANUjpJo+xntNkYtpUzQYV8\nlfSi6o9fS1ByTry88hb1dLk9ST4jGbpUOjwQLGxN6OdEMn+7BUWfli3edC0A\n1XMN26gkM9w55xE1NF2Uw+iwIkryovs6+snB+MC93pjlpGxklNJ/Inq8f7zt\n8gIvTzntcPKwJiMc0G/7rXL8eo4OL39OJQQB3B4RbQnuu9ERelmaBlRKASbZ\n4ii09n1ih4dtkYiPwOomPTTZHxPReSwQWqW+3meG/hpGWWmYG9H4IX6l225y\nQBdud3aHWDlCqDhfHg/K5u2ymuNRByr2mvbIXBA3eVXlmHThhx0BCG0lXL+U\nTf+SL5ho4UtvhdMmj9KxxQlMecXWiYS18wfjcPK6mKZPtYVP6ypERPTN3QrV\nKd1Hmy+mHjMFfLsTbiD6130BCUCvBtxZe0mxmu/WSHdK7cX/+T0PMaFjksd1\nvijNipFRofXpih2D1PI0/Boc7pqJ7LEN0mnqFJZn3v7rmc83FeUVRt/8LNL7\nraBI\r\n=aFs1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxPNOrMCgLO8y5lQtJTme9ILuJfcQ46J0w572MYXT8nwIgB/ZL55FLJhw8ikuyb+PJw43V0wk+/iKK0clh1dDL5Eg="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-0_1561381631878_0.6221299404097225"},"_hasShrinkwrap":false},"0.3.0-1":{"name":"lnd-grpc","version":"0.3.0-1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"e0adc4195d0df3b92f8188307109d4c33ff693d2","_id":"lnd-grpc@0.3.0-1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KLdqfkgRVCSV2k/dl+UDsOKspHJ2JITTwDDCuXZMtBdvsY/x6pUpElRaqXUjiJJxA/KmUMCrMCBbkAwRuOCS8Q==","shasum":"cc6c33c463b575166f63c7056af1892c405d9909","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-1.tgz","fileCount":62,"unpackedSize":566201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEMyfCRA9TVsSAnZWagAAi5MP+QAVuRMCFA0ZD3XvVpx6\nzIBtq3/ubR96ivxFhIREfaITNAdpDKqjwkW/Vmq6VmHbEK9JXcMtyMiqCXVt\n/wRv0j/8T8Tym9PzFmCZLHMUR6FUbPLUdXannU/s6Y/RxT3Q3/BFiYUMchc0\nRKhUE1HXQCYDJVa4I68hJ+VE5dGx7VJWlbfhjicH1pp3C4ONfsFkhtgUNQw7\nGVnyjkOXAWt8Z9ur1o8JlZTLuU5ondXx3Kj4jhbx+tbU74jvPFLe/Y3Brunh\nj5zrA/wRKs3sFJivRe+DMyfdMUPK7tSxmNpExglETnwUgasEOYxiiNsqOPCa\nxsUDo9qeFMMnRuMbNNRI6h1heQRQKZCydFNqT+z1ssf3ANAL94NeM/q39dyg\nPzqLk63DqtKONCC/ITYAZG9X+B+vZcp0kKbK/23BNOK1FaXEm1hf0+grvevR\nPWR29H+33RSUbRWrHsM3XWIBX3SanlUiKb7/S7TccWYNATRM/AsVx4TyR2Vz\netUnBZcWXmCFfoK+mxoytBLbkExNKWAWLyKN4mnhHCjKP//nJoX217sjyyy2\nudK7RyGedKayiwT+OnMemsziphEBEKZphM3Zgv5JWyYe3sX9bQQDdoEK70cW\nK/iDkNoXQTEtJIJD6yO1nColsaRERIGGG67E5JjUg+SUSJH3zXZ14MahYT6p\nsN7i\r\n=pGRp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJJuLhhhMFSFB8HPatUtJAkVX+1saggVLzsRVFw4O+egIhAPJ/zC9fseURYExHkKYQItJyoAM5hZNZFr8GIxFBBeoe"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-1_1561382046563_0.4642198528243082"},"_hasShrinkwrap":false},"0.3.0-2":{"name":"lnd-grpc","version":"0.3.0-2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"b6994dad33f1b1589591c751e3267610c81ea152","_id":"lnd-grpc@0.3.0-2","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Y/l+iA4o5O9yf45x3neTgy0ukxWOk7JMVohOnMtoiEzdpGWQLEU58hRTyQorfrb7sAJp1TVv1jqEZJw4AeQm1g==","shasum":"3152df56ff756b0a1d15401de7ab031a2c7ff5e5","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-2.tgz","fileCount":62,"unpackedSize":565380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEnTOCRA9TVsSAnZWagAAHU0P/iZbb4iFxStIyCCSU+aq\n0PMs5IkREda7UD6aQXVezDt+qSFY6VPK2V0yS/nWzHLqnrPT1W+7o54ER1Xe\nbov6Y+Z0I2vvtlFKRrRbUDDYxlt4e5cruFYk5hoazc4h+ih3s9nPDdDoRNy0\n8OzHCBTWwYTpbsLJJ0KDs4WCU83eIJ/x1HRKtIdlGNcJ3QXhHhEc6e6LIYve\nRv4RqZqtzxOrMhMl2BKQtGrpV7OPiuJ+rQHzC07mK+5m9l32o9LSEhcQ8n/6\nRNR1jnXYWhvqJw3crm+B0np2zTV5QBhU0A5Sdz4zlxeIqm3OoIag4FZjacre\nAcijgazm7mQqPD3Y13a5NBY4eSJvmQtvLROdmaZGkeRZgZo8CfhZwmYwj/uD\nWDc758Q22YzgiAjxILRsYwee2cP2mL5ssQ08gK+zSVzefbkRPV8lgAnhikHo\nP/3rt1vpMzf69fCqneGPFYOE7Ea91P1WHGrDwCTKqPCPPdGsydpChBKkalLg\nn9nI9MfILJObKbfFBDkj9nRpwkxdD4dHU71y8ZsSG4mG+K5OTosKYMbEfb1a\n26uWF7/TuNRzXVA2r17ZG72sKgTZAFyb+azS6QDL9HaWEllRZPk0Hts6YPZ0\npP6B5sB0B48pHbnY0vwEDGleCQVuSgc1u7YuVPgBTxWYWpoju5XvIoVtPFBv\nW9/+\r\n=iaTW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3gYHDDc6LcEYXMnGNMGFDOiBhK/DHbjzTat/tJ7hujAIgNi1dgrBb4u15HKS3/nfaSKm+DkUOJl7oMzanebx8qMo="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-2_1561490637452_0.06197374369544373"},"_hasShrinkwrap":false},"0.2.11":{"name":"lnd-grpc","version":"0.2.11","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"gitHead":"cb3a7df35ccd4d36dc479a2901180674805717d2","_id":"lnd-grpc@0.2.11","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JWjgZD00Kgg+UaZKDC750x050r/5jmYPnVzwwMs/aLzsfqhhgSQCBL0eRxa2NbHWjW66DGki1v1SrYHjI0aKBQ==","shasum":"f77379dc93b12786ba879983d1c61b9dfb84d20c","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.11.tgz","fileCount":72,"unpackedSize":694189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFME4CRA9TVsSAnZWagAAW7wP/1sm+QnY6EI7jjNU0k3g\nBQwE85sygE/lOjoHrQ5E7mdRHvxNFm1wqUFnaFCyq2n5EGKvD//7nfgx/Ttw\nvB99VDvkOkMpe4gTNMkRhb76zzlPhrQGP3m582iXXYPLBa+ic/k7V53uzeR5\nFkrXM4wiZ4tLAGtr1VaCnD/ZcI2A17Jix1PAPrlJJtJALgwp+ZFD9T4zgnNv\nj9P2KFtlK6Ge+PXnrn0HofT7QWv1+9gLXtBycv9uf1MsOUXPFBHfvGbUBNb9\nBUj+pT58J3af2xK73tK3Oo8XpJU76vFY9BbNk629YjuuasjjdcNjMzR6EAPI\njxXAGAkBUyoSOKmtD0CYs6Ulp/ERQuYc/HKpMiYvxhdexFUwABEJHpe1Ogbf\nJASwB9k6hZWaXtrEL1cblldlCU+uzPpkjrm8HucAUEwaYj1/jC+O8TQ8upMe\nU2rHL+cjH2JUbw0JRNMgo7uC9wbTU5+NY7mJ0sKqWZGYZykI7dMcnWtXl7U8\nZTM2X/BWzqNNucD0WyaQTbXWh5cKxI2IMjwSIy8TUEmho7bR59TECWbt44wO\ngY9lntW21V4pZ1JQ82Uhh58Hev7qxJUdP9obWPcSrCyqyagl2FK8l7rFkzqn\nOHNIphz8USOU9YX5agZxJwtxlZ6lKjLglKuyEHqBG53ROZkM3LPCsONLAg4V\nHDIR\r\n=O5Ix\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChaO6leYbzEhc7GzCF+edzgTHlbeS/vxU8oTyL35UsTwIhAPPHIOFRs/8slFwKTsTQEm1y1kvm926qWgB9AnQHkCXd"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.11_1561641271846_0.18928454271916517"},"_hasShrinkwrap":false},"0.3.0-3":{"name":"lnd-grpc","version":"0.3.0-3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"00d7b3fa2f82c2da76af1e7827fbb4947188e26c","_id":"lnd-grpc@0.3.0-3","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UuTaB21+HO+yZHkyyRWhy+QhGnblAd/ah3xCzDynJoqbmsncdF0+xihX1gXaang+jK2sxBfNjTo73Eh4YMqttw==","shasum":"dd62d6165da1a4ca13f46d0336ed73b5ac183a2a","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-3.tgz","fileCount":72,"unpackedSize":693369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFMKvCRA9TVsSAnZWagAAezkP/3TLIpOsZsZKSl/ThEGn\n4Pujj+4R81sgV2amscbC+34XzPJRM/H+A3ds60R3n9QvJUFfP+MOd5vru71y\nwSul17EdsaPiMGqJzGIk4yFQYKcy0BUqHnWPH2uGzTR5AQKYyApOxMX7mXsZ\nH/LwacHeb6udYssnXRoNtE76fWRMQJrQ4NfaAE5MoDLE6DFP0JmDham09Wez\ne27omdSo1Ba+faEapGrQHx7b40x2A/t+6VtXoqwj3VkbYlOCNS8mXqJKI0s7\nXhQjt2kEAhZ5QIcxwqZ1KB5tgAmr4+iPSXeGNvtFZDoyt8hQQJRaxBGqVoRy\nzak61vqg+Aobvwu9a2eSGFjQK5xDgSnrz43/yVYGshWTL6n3eNgrfm8A3WZf\nrCIhvpq/vdkO/htW6w7rKBHSsZLSgMQtgSHFM0JsEwVdGu+8MBiWd5quGWb4\ntKHkrICX1h0UgSzfUM+P46eNB1NfU4iWbnSNCtmpiIBywSLQabzdCvpA97K9\ntlJpRlniGsHIrKUHaRVAwidfuOk1LGuI0G6PADoPII4L1nsZv1RaBix+m3Ec\ncq629TCWC5ZfcT4256PyIvnyQ4mqs6Sajd5PjXe8elBYZPxAoBL2v7QLa5rD\n28x4MRAdMZp83ih0Upf39H0cNWysU8+Uk5LYdElymmaCvDRMmQXeWEcT/Pzw\nAgJw\r\n=uMuU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgnWLAqPzctQNXSdkIAKPmAmAXhZhK3dtNjpB56EwOOAIhAPIsyFhKR5nHStT/VSyo7403OlYzm34G1GKN5W3sbspK"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-3_1561641646637_0.8336186002987496"},"_hasShrinkwrap":false},"0.3.0-3.1":{"name":"lnd-grpc","version":"0.3.0-3.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.4.4","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.4","@babel/preset-env":"7.4.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.0","eslint-config-prettier":"4.3.0","lnd-binary":"0.3.11","prettier":"1.18.2","prettier-eslint":"8.8.2","prettier-eslint-cli":"4.7.1","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.10.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.4.3","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.7","lodash.defaultsdeep":"4.6.0","semver":"6.1.1","untildify":"4.0.0","validator":"11.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"b3bce13f182c433fdc5e21b31b4fb6cf60efa55b","_id":"lnd-grpc@0.3.0-3.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-rtttPMEYiBtMNoVFbsWo7CtslaNrPVm0etobFWOecth5bMQ8c0/9E/tQpPQ2+SYduDx7FfghCY3wW8KA3Kq6ZA==","shasum":"49951aa62fef5159cfe3e832233652b98d811a35","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-3.1.tgz","fileCount":72,"unpackedSize":694725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH5LkCRA9TVsSAnZWagAA4RwP/3gQszP4XtMZUY2o+zYR\npK6iRiN6dGnQLYjaNpG+7sRQjl+xjhggeNiHePEM8UB9GXdX/hz7DER5FAOS\nv1bwpDFjvrOZxEfnD6B3Uz3PIDGuYISAIzCffehYgVyCWJvYLQPwrmQwc7Gg\n6dtWOWh1/ZNYVhXAfHe1wX+BqUNUKuIm2sE2noQ7fiN4SNZBgKeyQoMcc98K\nqeUsFQxW/To5l75Of68fRwUfe8PBUL2mlxdki6j4zVFLvUkqTU4uuYgrjpCz\nG2CJ/z29XWkQI/5DwmleoJWIOInZTzwsQacfB1qpJ5NqtZIyA56tMyEAfrtP\nqq3MbnCrZe+LbCiK8pvFxAlAp9ey+UTu7eXclRHP6OL+pUj2wBqWdv0uNfRY\nVYjNGj5yz60TjRmrWniOkHXJ2PVreVLJf93p163xjMOIWOcuxMJhSgs0BHPH\n5DDP+15BTqODUB6CEYkPC2Z0HIRn4xbBtfeL10Iyh45XGELVrcdKVZ98dNdM\nkTRhVoRN01k7b5Xbwmc4cyFf6EbcbdoAo1Kfpo7xf0YRZMqAiUulNCVI4At/\ne/iJHFIrZ5pdVibNElAo692fTiPp3yrMgBdHYOY/HMiryDqZTL7O3c1HzuP8\n5g4Jy0iodsbnNvy+u/u+i2697cBr5nqcVXGF0XJvqvaxt2ph8TPUSioohGdL\n1P6K\r\n=BZMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8UTb0VPhi3sZODyPRDUbH7m4myUAzMXSSyvVbgJXkjgIhALtsDDmsC33+fUCo5ZCJ46ZTv/oJ6f8PvApLEAtWHXr8"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-3.1_1562350307784_0.674279393568914"},"_hasShrinkwrap":false},"0.2.12":{"name":"lnd-grpc","version":"0.2.12","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.0","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.5.1","@babel/preset-env":"7.5.0","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.1","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.0","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.0","semver":"6.2.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"075d9498bcb0e0a5e567c5f90e2433570d90046a","_id":"lnd-grpc@0.2.12","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zuDqIYS/HvYip6mFd8CCZaj6mp4mNiXnI7GPcfH/aXWHgmxXezNglkvIwY26WiEPkA9cV3ZdAfj7Qo1BRvKUlw==","shasum":"a53df6d3631106880af3b79f6b66bd0b1bea0e69","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.12.tgz","fileCount":72,"unpackedSize":694189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIwgqCRA9TVsSAnZWagAA7AwP/R/R538xH4xuCSP59iV3\nkiZ77sHK1Lv9X1ysojkg8E+WAp9+t9XDdqRcwUd+1C3+Fq3bZXbUpTaT2OqR\n5jWkkXn8MgfCevhcy+zvvkw2IWzrtDkzwEmd8EupqVqxhjvHAi8jvPkUNxNd\nrvjj0HE45xgTSxgMCSwjhgMvNE/Ry09S3xl2L5WuNs44TN4ZBYF92PX2CZyX\nSTI9ESzoSg2ppI6Q5VWhQLyoeAOwjIlXIKsFq7+t6eHDstzedo1xjDcvFreh\nOBIZ+waBSdbM/Zqx1IkE+geVzdcaqLtf+HwAUA5PbpwUjSRXFl88bIPSByxF\nENtkadFFgIm16zGNStbdlBGGH0dYG9QaT3c8p7dt0tpdZeFgFb2OeXQlSq/I\n/ubsuK7kXOAFXXKZmzKdjy1Q2H/LtGnCbaoSVgXaB5ucBXWqHVSWasmMk0SW\nfoSbHVQHhLXHoxhto1ovYtbgihFYdlxpyUkf/s6LyyTYXDYg4P89IqLPas54\nAVPeiI5SAvRWKywKtv8RLhlHQfmfoqmh3H34i6ny63+eHVLdzF7LeQEuc4te\nA/sV0TfdAVVcgx99BhnEqNqo9W449Zj1Y1/77cOcrpwPtSgn9017M1zOUbhR\nWsJHRTedyYGDhnDtLQNk4sJr0bO86fmLF2YdllxHBCYMCspV4t2YeiCqn+/L\nObtj\r\n=vIY1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVoVMEoRg0ccefmo3S2+V5CNl7Y9hd0Yrg5zGG4o2POQIgcO4Sbp5kf7VzN7uAt1fP+z+BTkgrtOCOIUfXP40Jmbk="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.12_1562576938008_0.7687001794847621"},"_hasShrinkwrap":false},"0.3.0-4":{"name":"lnd-grpc","version":"0.3.0-4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.0","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.5.1","@babel/preset-env":"7.5.0","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.1","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.0","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.0","semver":"6.2.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"823383a08601839a20cc4a20aef7df3566044e17","_id":"lnd-grpc@0.3.0-4","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0Aeoi/w5I85A6MY5S9CNJ1Tl04+FbnrCALreQtjWmZnEzMcf6A7A815OUU6+0MZ3jMqt648FX/uUYSvhaHa2Zg==","shasum":"37161b2033820c6d726d29875c0ebc0bffa2ad1c","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-4.tgz","fileCount":74,"unpackedSize":698352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI0nPCRA9TVsSAnZWagAA3BMP/3MgmIw1R0XMPDH+H7IF\nz0do3W2kCPUOXcXgIiKQewIel7aHjA/ax928d90pQSEueaa5UD4NqPq3UMzl\nREMG4PquYqtKL1ep+U/q44IIrpH2AoCPZ584EfO0oafYlgIZwV3jDHQrR6Qk\nKY4zTVNlh7LYJGoqalgV5f7v4HVYp3lApFYDQTdHSC1aomXoOcfSA0570gjC\nruZuNKGh1QswTIVn9xfiBAwd12WnamVGKbAfjg7DBsq4cWnMfM2FiYscGD4D\n6TKCj8MIuT9ZP/pp3xXLWzo6vLfxogbjAgv4UaWPgF5M5g5Y2v4vklBFSKUU\n0r0RYvVxcrZxZpxaKs6i5QtGykiOSGSKm7VgBBlX6gc02v0O4LHvF7iNugKa\nx4IHDvKSWJV4mOPOrDkG4jrXx9ioNKhYhpwwzuY97/MHJBk9/aQNLICeBhCP\nW5tn8zJPy/yVQgDQ/bDAqmQ8+Qpk2r4xloA1dWQMZm5AM4laK+HGRAVX2f4R\natc60Lnwkim0yYpO7AgXuDIv/2lTEHHZftxhfqbVrfF4S7STaGxGbuTPojUK\nQo/g5XIaSh1TA8g8cDnQ14SZ7y0cPWS+IZqA35LKFQa5qq/K2O4HvplFXaFY\nbTB+lsz7XEi35YL4PW8B3VsG3K0/kHQPQM/thT0DKPVJbzaz3OyXrQ2uT8+N\ni0fE\r\n=W88m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgS8g3WxGUm8RP58qq1Fc9kMLZk3d9ciF1jKMmgsBqSAiAdtmlGjklRQyZnYGSIuNYkZodxTQQosJ1vqrhpYw8iJw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-4_1562593742482_0.32851376647132957"},"_hasShrinkwrap":false},"0.2.13":{"name":"lnd-grpc","version":"0.2.13","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.0","@babel/plugin-proposal-export-default-from":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.5.1","@babel/preset-env":"7.5.0","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.0.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.0.1","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.0","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.0","semver":"6.2.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"756ac432ccad4c7c6104c0fe0c4b2c8216d02062","_id":"lnd-grpc@0.2.13","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-70VTUDud0VPXv0NpUSeI9iV2gRtH6cfzm1zAh3OQRmvjyr/BFk/2ux+eqs3o/H0wKM6y+JaxHcUeGjz0oJp8bg==","shasum":"06f94a76baf1b6e6e0a97a6d92922e25699e91fa","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.13.tgz","fileCount":74,"unpackedSize":699145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI0pCCRA9TVsSAnZWagAAr90P/jzTQo9DFHKGiTuD3x2+\nS3n+Sit0hMjedECNChKiV7S04R5nn9yp2eNN5cllCrrWOmQQKYF3AYtNBbHr\nh2zwpQtaMH2w1XxNVXbBEyX6GobLZ/yUuhWUkuu+l/ijG1A307Gzkxs8pabf\n3CixfevnMtzRQEhiw8kVGazz+UMTw9LF1ojM25bp1cSeLFu1MCf+C9SjAI3p\n/y/e2+c418ZSlNw/IzSeOyzvztF/5wyRRs2wkMb7Oy3+N71yx7+qAeppz+Ji\nPCgazsSB59gfTqhlNgyVx2nuEa/wFiAgBTGSqGjQf1Auche2U1nzLQwzbqpw\niL4H6LqJyiDRE/ns7neJUF06ilUBpD7K21M8MiATvBAKLa/vlG/X3HqjKTeU\nVomfwSIMhE1zYYOUTGpkqb5GAotfc/G2SpO6LSE3p0Dvvhw/kREiKhJe+9di\nifXy5yUivhb/SrqM+geCO0BlM7pkXmWoDGIni0gJMiL8+u3nYbOzfOf++qg8\nhySUWy1Xa5vEdab69K/wtPqErhzh6BOX+WPwIHUzbAhnQzqyDOtQy18MdweR\neF6CIuyxQMV8laho9nD56llhoSq6eEAwHTjnmq2IXcQgtzjEoN/fuJoRvGvM\n/Q8jNvf4zNleCS0U9ZvwcUHi8Ksj+Cy6S8kIVFX7yh5JfoQhnl6biYYiLh7H\npguC\r\n=K9iB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAD0+KuXz4/gakCEsqX9YTH45U5Ya0fz8roYuy7W/ByaAiEA3FHTAbnD/e88D9SfWoD1Qdh6B2cG2WNyUNpqXbIbtc8="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.13_1562593858097_0.899847410247429"},"_hasShrinkwrap":false},"0.2.14":{"name":"lnd-grpc","version":"0.2.14","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"ee9c772f51d1e3e690e194ba016da678eb04c5df","_id":"lnd-grpc@0.2.14","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-4GtQzjQCxeP/RQ252953nnriR+Jw16CKVPSnERrWiPEf5XDWHEsV19zgaVcVmU7vTmUBOR7CoL/tmHT1MnkZgw==","shasum":"3e69b5e6ef5cd226752d78e68d036706745e27e5","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.14.tgz","fileCount":74,"unpackedSize":699145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOi+lCRA9TVsSAnZWagAA8VwP/jppmAs2X3D/Ya1LihkA\n5NGXUIvGJkNbMHC0ujhxvFItd937D0ovSmKAd7QDXZiRgLSraxpLuMZArRM4\nxtkmmvEljTUzhbugh9IvyVVXUjBRN7flp9IACHD2wh0MSRYQW2NXbcK9Jhk/\nKuu2agKCX7XyetEqFsTV2XZmnOfHL4Cv0W+i5Utr8qbQaZ+GHLQfpQGseMHV\n/3cdXVHTkz3+444q2y7ambuWI4fW3rlEqNFugZF+o11GNdJjgbkeZ9Bkewp6\nAqavDfoMcerTKbfaLfj+DVk8I0YHe9s0TFxMsfhjPoEcMwHcv/aTOdLCvBTU\nuZQtHrWobHJFMMfHXA3XtklD4va9Tlgk1ua592R9p+1lvw7mnVErRCl5viMm\ncdtmD3/iK+CqSxdf4ta4qkNnJw4dOIJ7k6Lptjnr8Sj8qOYZEPCNezE7CjWr\nhH4MOo59mH7NbWw7G2dKl/iVNzpPdUQRhKipvV2CRtj8fZTqjz/XTTiGTcRw\nbX5ASM0BG5CxKPk/jRT1MBof1rfFMGdpp7mpLCotMQqBLshRi1+VRltvSAiH\nArwF7q6lriVgMQ0W1/l/pwgHN+rLpHSB/M+nZ6brOxB0es58dJCMVRPXgGZf\nxuhc5XGjDleyro/8hi53Rs5i52gLF3vkwn3/+UlGYvWs94mPIkeHKlz0AFcu\nwBX4\r\n=rzMx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNUNDYZWmePCCMcYg7X7MnJ8cCL0E07rVrWrebc860yAiBfTJPSnIUaeHMBqbKDGiezo12Cit/flEYjxEdp6/hXfw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.14_1564094372364_0.6117448581523031"},"_hasShrinkwrap":false},"0.3.0-beta.1":{"name":"lnd-grpc","version":"0.3.0-beta.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"8866cebf1d59274f45205805740f1b9e8dea2717","_id":"lnd-grpc@0.3.0-beta.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-lqgOvGGNwgx6b26UXtEbkPUOKC2i6MwPzdkL8y+7tmZVph2k1hRzF0XYnisj8erHE3jkdnFskNuJ3v9a0dmDqw==","shasum":"f0cee9d83bca41f2f0b1a23f4b94589f82974ee4","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-beta.1.tgz","fileCount":74,"unpackedSize":698357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOrLFCRA9TVsSAnZWagAAEk0P/2k6tx7OMHL27jmKoMdW\nKFlabGdJOZSLMJV7Xig5d+iq/BWFL4k/Hy2pTYOkCvtPavGa+htnkbQJ7llx\nBl8MgQFFOAQ3gZ8r4y5+PZZYHmAi0kPG33praBGThS7u4H1ioWspYAZ/kRyV\nNwoPEioyxg0+g3IEQqWRvVa8OIhTi6e5gEPeM0A8PdiIRe4DtZ4QCZWAI/Hq\nyavP9aMD+lvIgD3IrR7IXxE4zLVGh8UEyFsvmk1FEm7YEE+W0NkGHsXqt9G1\nvE4Lb+RWa4y4t5mVPfKQ2AKI5WH2NW6ud2OfMdcff5Lnqa94X1XH5APnPYwB\n8EGzhJiGGjnYEdUBTR+8urnsfcBExcZmVYu2RQVcprithHv7FcTqO73kp0kr\nuEQEG2M+3EUoIrrdCawMrL7l1MwJWDSV7Lk4fRWi8DX5oIuLHRlU1Lh7NeRI\n7O1u4+29qto+2TALteLB13cS70r244+NG6Ch3AyEE8FEwFji6T3Djo1Fd6a2\n/MH3/nVo7scERXVKfRTPjWvunCu4xckUjL/pQmMG1/zqSx0r58W1HG4/6y1z\nwVY78IXRssLgXpcOpPf6KCAgATgFAdB46iE/BCSOhOR4qWK+Hqz9rxzZBpla\ntz0XL4uD5YsDn77XJQkqqXt7zF6qSer+OsIttM9rPT4IDX0EAVdDjXg5NNrM\n9bal\r\n=BjjU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICp3d4RbXiIe1fIbaYiwLSdVY4dYlnqCa5tJTnpA8XmcAiBRcqQ5hi6MN63ZNYf5d57tmrX/MjUQwnClyBGcviaWzQ=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-beta.1_1564127941326_0.7670886903783212"},"_hasShrinkwrap":false},"0.3.0-beta.2":{"name":"lnd-grpc","version":"0.3.0-beta.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"7a74a9f8f2f98b52bf76a175c1e0103b6e9af4a5","_id":"lnd-grpc@0.3.0-beta.2","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vA9E8Y6mqGom2tveWukO1Tdf89GaL1rY9XLaJwpyszYahjgXHjmnALqIF/MW+TTi+HCtds1vWVmg8xX4SBV/pg==","shasum":"1e884df1959465554334405cca9b5aae4374d4ce","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-beta.2.tgz","fileCount":82,"unpackedSize":822310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOw1iCRA9TVsSAnZWagAACMUP/ihZ1wo7Dregle7KbEHj\nmAPJ1EQYeknfhqPIMJ+SnflhPzS1Sy2QAgKz37OZI2UCcMWeboiqdI3Q2mHE\nauP7TCMs1qjR3UH1zI8mhuEJwNVQ6cW0LObHN2z8f1ic4k9t6gS9G0iBMKcq\nB4LjojZbrRQ/EzOsFYwPoYno+wPrhm1jB1EEzqaubCVFsNKRb5x0tjPqlryd\nc9Xti86KI0EN3eYvsiAuCQM/tj59ME+NRQATlGUeVQ+oyCWlTeGybCdoO7ey\naZKrrgIhZMp/+KxAQRLzZsn5EAp2poKA9qG3mPnVRGoQeznE3r28OiwI0tku\nPCfo1P53hwzTmyA86BDDD7j4ywUX1ttFMrlFSI+GiBNjgntEhYgFbS/UtZQo\nX6bEJJN2K5gSV0uJx6LTjbH5ei6uaw2y8ZVeE0/wPnsGygoLd19QK6G13nnE\n9uAui4TvqVKf/JjbialJqkUK9b4SKxDU8gXQ+DwtiPlIMJXYlB3rwtgrXpFf\nVrajPaRXKaULSFWi6fdXYdmoDcC1lWtcII4YXWbOtHUcVRc4LMyQcpiWMuNt\nUuNfSqQcQiVLfWdwF06WlDmsxBR1PAl8Blq1bYZYmlmvJw0nfS2a8yFG1zsi\nNLPiSdmhVfHcc2QCZgvddOb3m+WXtc9oyh3YbbH2/pCOFD7UBolY6Uece+gJ\nktjE\r\n=T/0i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBG5uy/j66y6o7x5HMIk7RHuBPjciis4gnWteJnasR+mAiEAhiVZQ0kbHUtQXuJi8qC7rfNSYABiPjhDSgD00zXiMPI="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-beta.2_1564151137540_0.07381735709515991"},"_hasShrinkwrap":false},"0.3.0-beta.3":{"name":"lnd-grpc","version":"0.3.0-beta.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"3d5018bafc0f19829dbefd83b9f4f7e3c91639e5","_id":"lnd-grpc@0.3.0-beta.3","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1Zefsal6ddqGcuLJJ7i4Zsx2D7ddvBtCmH47wlGbmmB9HDXfJqtLC9fWwP6Z3sr44fDPD/J39jcbrSxqcxTW2Q==","shasum":"2238e0f08307efb482f95eb9217b560b1d362e85","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-beta.3.tgz","fileCount":82,"unpackedSize":822219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOxmwCRA9TVsSAnZWagAAx9sP+gJmSmmRj8GqD5DGxveC\nntLQ26YVF169W1yXnBLDajMU8YJ756kLkdoYfvKgZJkK8hQ0Aei9VjAkFlmj\n8fbSzsNhQx3AMETxllTgy1+ZXWBUIVf6eTw/jDsobaqc2PkfBHTpXOKDk72z\nHJWKzTROxXV08qTLXJ23fv5TcIaYS9pY7YK0xAuPCZRmvMThVI68EXez8q7k\ns4/hnSApK2OeMK5zLKBkHznLYBoh0+D7jRwNZqTxACrcM930fU9r/0USAmWr\no32ay+5SrCivFsRs3JAkGS0Sx4j3mcJOpiI0IdlQQgDH6BNE2rYUbFtJU8vn\nq7Qfa5eloicAXk6mD5B7/m3CgtOOaOMyXyQ3/WXv3IH5OnC+srdI8YbTWqBE\nDXnsa1RwLKjZP+MNudapiaZYyYWOjhq8ldRFoW/GcnFdqMZ2MhwL9TPPoDoc\nIuQs7HqM7UMEVCj96VrLdJCjFgETGFqVepAJZ5UIBVdo2ws8cxoDTAF+NyfY\nxi8XZ+i//QFltn160FRZYKIqYDfv0QRdzth2GflnSaaAKZ1WWE8eLmi92wKf\ngRoyonYqQ+51j8V4TaK+y9DCcEALI3zQxByA7+EaUBHfUGSC2irYZuaZ4uSI\nAFtwnG3vje/i3zOpyNCoNS1///VkOD4GhH6NILF3HX6rMrqCQdO+d5ltbu1Q\nDsgp\r\n=MqUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY2PRdk8qRStat9VYGCR1/W4JVifiZ16TSS1dbXZIzqAIgNv5DA/SCadscfRJXH/xpxoxCkxiciK4ANkQpSD1H0hk="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-beta.3_1564154287959_0.9717003202458665"},"_hasShrinkwrap":false},"0.2.15":{"name":"lnd-grpc","version":"0.2.15","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.12","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.8","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"15f9ba23fbda52e305a5b690704f11438d94e9e3","_id":"lnd-grpc@0.2.15","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-BwhcfCUl8W1SQNmjrQnWTFdtVNRQVOyBr8j7Tn9qCkZWyrgR90c33b/3oLJkN4xenqYrT00sLvDOOFE//id3Vg==","shasum":"7dd96088a92c7b3b68b3862e7457fcf92a2da72e","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.15.tgz","fileCount":82,"unpackedSize":823007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ/fYCRA9TVsSAnZWagAAmoIP/RgVRHL3gI5lvXnaoecE\niWTw6IOlsuu2Kgf636x4QP+9V6ZTTw/IUlFW2qPb7aQA6yI6FY8agzVu3gV3\nFrMbpSOedBmAFGIIWzgsNozDgtp4a+8jecjL6vNK9aOgn7bk2mtpuHO9V4m2\nv4XMeFt5CcEPdlMDAFB48AudY0nnzERxPakTF8C3MP15cGuGrxbtgyziqG7j\nvpX9wdi8t6Tz3m3J4q3axgPBUPUVWj16DeH6VIw0XRSHmXzQfh/G0wiknvM7\nPmQyB8HipGREf82k5GMHp/G/OXPrrS42EWCGYeMyZcK8JVXf8ewsXcDvVBzd\n1xiBAUbvVDrgfHDVffOZUmjrOLWqXAblBVPnoVa5SutCfbsSOEMLjlvMGqxY\nQ0bEXfDuVZ95v8UiVDBkeKdbYv1R/J9WWhW2oeNBQTcNfZ5RO7OwVBb73Jo4\nbCVu/Fj9I1qZM620nm8XBCqLJcg26vyGC7JsKvl40Iv7QBw1mDnvyEuYgj75\nQ6/nVTTXGr7fTGGemeQOWjuoVEB4tKY/qluwz/B4TRO7KuENt4UHFPZDUf22\nccrS4orQuWseQgq0rum2i7CzWgz6ZVkczG3tuZvButOD+6+9Lm5GXbu6rBFg\nGkXZ8K2S8yHOrR54V5eceRFiRliYvL1JmQXOewgiBLH28RN8t805L6kgtWVi\nPG4p\r\n=FyU9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdyrfaHroayubxVhUwKqxBxQ+d2j5Td7Xc/ES0p2k0KAiANTrhCim51emaJQixKGJOQicgz0FIjkJFhG37dsIPV5Q=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.15_1564735447419_0.33764104827948005"},"_hasShrinkwrap":false},"0.2.16":{"name":"lnd-grpc","version":"0.2.16","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.12","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.3.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.9","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"3b84d40f96a09cc680ce090f883149cf3304e330","_id":"lnd-grpc@0.2.16","_nodeVersion":"12.4.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-C4x6Fvep91aK1m1KhuiSuUee4EC1/MlFbelln1CfyDkyAee4z1fXX4bhJ7rca4Tky3rUGscNPe474BH7ch3FqQ==","shasum":"b4a584a07c1efe9d4cc60f8fa1bd88d2a277c1db","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.16.tgz","fileCount":82,"unpackedSize":823149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRKznCRA9TVsSAnZWagAAdtQP/35fY7S9HXrYiElx5hwY\n17VZvYmgLRyEMLTncz2+I2ZSCeS+fxqH4zqUxrP4LlOK2L+3Yy94dyYkyCKb\nNaxKeLW4HOHpKA4/QWhp1hJx33bEHp/nTvaVG83CAxv2mZlXkBNbjnyi29R4\nxDaP3e7Ru/IfAKhdxq9Vp1ejyHc09ineWyUZyIEznA5HczKsCRp3tC2AqpfC\npa85eHvgy1uJLB3gs4aNogEZLtegdNBbY38Jl23eqL9Xg0l/nJV6ioR2EdhC\nYlsF4tHjXwJucXovB3cJeAAyaXiKGb3ecz9/BG4k1BPOG8+AuJJCvo/Hf4wa\nqVYt/BqSqiIX9Ah2H2PtvZTUCrLKemr1eSmj/G1//Cmy8TLyv8BEMaw0jt6R\n3A5TidmzcaP85H7UscaaVwDQ7lC7eCefZCveSowgzXxF2RvFUrn6OrZqz/w/\noCRSD7KpruGOxJ+0gZFdJUC60yJaVeR0KjVbdjKJVFj32Hxwl+ycnpQl32UB\nB557CI6m2YtwtNd/D419NSa2uu0ouoDKZPsIXph7HtA4NS7w37lcNAVRQFZC\n/wiyBERM2b2KrEp4lPaBQkq/dKO5iz/HJkG24cLz6qZfzsYerrxbyIBrsgNb\n18zzLHJlXzemGk/ceI7TscELnyL/KjBZ3JopZm66t6g8VnnoHsfxfn/SC9fB\nRTvD\r\n=6qaF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFfS6kNmgEdNJB0wzF+sqMXC7OyY82pXc4+UAbZQOXtNAiEA0Ms1dSQei+ayio0UWxarTipAszEzw/HqcMOd/wCMoII="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.16_1564781798547_0.4095916627456273"},"_hasShrinkwrap":false},"0.3.0-beta.4":{"name":"lnd-grpc","version":"0.3.0-beta.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.1.4","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.6.3","sinon":"7.4.1","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.9","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"9f5157fbaa611fa6d3256cc0dad47752e55bd077","_id":"lnd-grpc@0.3.0-beta.4","_nodeVersion":"12.4.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-gaalVdam4Jsoep6rz43F+0ayn9CwsJnEY6bPWrZlJMu4/koAiN7B42DV3Bh1ZRAI2OgkcfcIlIup125MwrG87A==","shasum":"532fefbf81ee1d9dc0b8a1eee9dd06d7646879d5","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-beta.4.tgz","fileCount":84,"unpackedSize":828148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS91zCRA9TVsSAnZWagAAqRwP/juFsIQqmap9y7rNs74X\n30pmQlQSZNoCdzfY0XoibkXdDmED0iXSqTPmMJ9aZga7E5/qOK1cE/fK6coP\n3KBWG1I9Y6nzCCSprVHxSfPnOSpZBuBjXMxenNn+h0ZKzfDVSlSpzxtLYGv9\n49Pl00+1CflvD7xXgVEMdKVKYC5F4JZhUXrmFfvB7xf0I6A6qRA4Q5kzbLeY\n+zEluJVBcZTze+cWLRmmlyB88r2BLFZ2YAUNAjNB2dJggWAZZyoC89/hszxR\nQkVEQRT+3CM6KSg+1Lpi3Ce52VQ8CqYyASFMSXul7NaAXKQDw442uWlwaGzA\nqDGZ9mNB0KQqfpDBe6PAkECkWbFvg9iEqhRej3davuAQmJyci1SN61Sd/VoW\nSISrHQOzm9k5QGIz4HkX/S1lAuqQuDlQtUqwXPpOu8IIQh2FjZ6lpNHCYInX\n1QyWXct5fdTBidhfEd94ADyWqwM8rk85+ELuK1vPp55vexUknmXH5sO43ukJ\nMn3xFeg4krURdsFl09zdjWUTjtKal4/G1X7eR3ypJwv/tABSiMKgTlZbDOgD\naJGo+QS4Z3skceaqBYqXjIEPhiQRNc/Le8oPfxi4rq4y6qWcav6vvW5V5ggD\nvsTbZAAB0OERJfne2lg862VRFXb2mY6YAVBc4dlJZgoT2iV6h9KDsyEE5FU3\nIF1E\r\n=IfHO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyiKPVQkcBPfZ/LHwgy3+B3hThjNQhvFMqtRZDAmjf6AIhANKHazA6UFV+3Dw5no9XFwOmKPfY2Wh8SyQEtiKQNSKS"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-beta.4_1565252978525_0.7089566660629743"},"_hasShrinkwrap":false},"0.3.0-beta.5":{"name":"lnd-grpc","version":"0.3.0-beta.5","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.5.5","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.5.5","babel-eslint":"10.0.2","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.0","eslint":"6.1.0","eslint-config-prettier":"6.0.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"2.7.0","sinon":"7.4.1","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.9","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri {[string]}:**  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host {[string]}:**  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert {[string]}:**  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon {[string]}:**  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert {[boolean|number]}:**  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon {[boolean|number]}:**  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version {[string]}:**  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir {[string]}:**  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions {[Object]}:**  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter successfully connecting, `state` will be set to one of the following, depending on the state of the node that you are connecting to:\n\n- `locked`: The node is locked (`WalletUnlocker` interface is active).\n- `active`: The node is unlocked (All other interfaces are active).\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### Events\n\n**Event: 'locked'**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**Event: 'active'**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**Event: 'disconnected'**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Advanced settings\n\n**gRPC Options**\n\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"7875b354227c058e38971cf8eafee5043e49b9c7","_id":"lnd-grpc@0.3.0-beta.5","_nodeVersion":"12.4.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-d0EW16KKg2why0BS1FO6btJ9phvFgBEgJBBOgVjNBFJWzGfDIPUfnw+emyzqttRyplSm1nT7GOzlNb4j68+Amw==","shasum":"0f83f7ea769990ca40f36c7fee82358db33a413b","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0-beta.5.tgz","fileCount":84,"unpackedSize":828106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU+VQCRA9TVsSAnZWagAAqgsP/A8lTcSPcFry4w2B7cDM\nUq/3zKlQhpbwMjA8EJ7fYbwdBdxVOxqNibdDcMNgy/wKfNkAA8iWD/mD6Kyt\nB+JgmUjppRoNIV7fR8as76gnHaBBkAEy35/Ebtu+KDzKHo76D8hK6AbSmha3\n5fUwzsxILgq/nTzrR2i9w1/sNLFu6TuiFXqVUHlX0Pn9RiZ1x5ht2WB6u3XR\nd/lSvzak+CsDNEUSV7sbRT6G5wEjDc+HbeBebAOI9IpQeysU/SHKgeGN9VaH\nmNLjpkdsPmIQdKr+qXXk0WCVIA8LBSyShcCyRpw4L0L2THl+MA/0EzqSriWU\no5VdQmY3XEnP5R0r93/dgYi/6cUHNHm97B4aeyB5kDsPEGEuR4eU8V2V0UNC\ntnjmQAjYSVHje2IifsedxhICOWo4xrFIao00cEAzWrvMLRzq8kEVU1ArmeGp\nv6lH5aL/bquDSZ5LLNXBQAdPD3XN8RBKPzYVEf5cPIXi4iSSAEucdU8sXFaY\nx6DvviOkC26x988Ppv1NR4lBo0KP/urpLUCe7tLfpZCSA9mvmg5asTFG2zy5\nQeBZXj/oy/fbdDYgdWYrCStcNogiyMkfe/7qyCWmzTP2r0jxd8lNGkEEPWXq\nS2q3jHjY2vl0YSMBEmR0kDDjPRv6F6EdqRw8kRFRpdqovQJticAfzTqv2IXK\nRTd2\r\n=13Qc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFYqEEWiyciF7fjEEI9s7KYnNSgiTZnupdPridjEswFlAiAWvLTM5DN7OcQzSnHk78gCpYFWijaoE6IPFkmuzkhGTQ=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0-beta.5_1565779279808_0.8887159113041792"},"_hasShrinkwrap":false},"0.2.17":{"name":"lnd-grpc","version":"0.2.17","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"c43c225d604d62303cf31eeb92d242bb100f46c2","_id":"lnd-grpc@0.2.17","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-HuMv4MdtL9Y4YJl9WkXmUD8SkHINjN8quFUUfD7l+I2qp/cVJOMRDN3fLjH3d2HpYII8v//jZGSMA6w3W7r41A==","shasum":"b70ff7687a9496ab43773073c4b158161e4a6fc8","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.2.17.tgz","fileCount":82,"unpackedSize":823264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc5VwCRA9TVsSAnZWagAAq/8P+wXQEgQ6iPESuCipu7c5\nBgwn1fKtBQrtvWOa02zqBO1jtI4cOKkdxAzIIbStgv6U+hp02VPRCLlkaBMe\n4jCu9DxmLZwNYlZQKjutOJSXRnxr00b+3gV02p6n9u4StCgdgpI6RMtgoiKh\nrdSWfH02QrnNfMyPA2mlXmCyEiQlYvs3ryAhnTxfsY+AfRUnmHKpQbp/xiGZ\nijdJN5tOlCX3F4v6gnD+TqjX0Gm92sslJMimtyyPNdRkkOnpzK+uwL0gK4j1\nRkkNu36sRSp4vrucL8Y3NwQ9V8i3thu+p7hWYn3p6szLK9YL+uq/6JMiuwJC\nGuwrvUEb5A7zT01akHy8o4xoR6+PBH1KcvVZu9LDvf0svy78gqo4TbaNaCOJ\nG5iuA9k59WT7c/VaieTW0uOnaAz1RQQDvu8ep+7gLNGHPlKk37KD5OyIasmK\nc1oCt6fC8L3RiOQ540jaxRnNod2wWLc0ag9v/mtbUl0Oto1ESai+ajsKxnGc\n+q3tXBQtx8pKDfHsO9uzZILskc07E4h/BviG1EiYQzeHk/Q4tYugdZWXOSMe\nW1I/imQwjgtpawnkzmmT91Mf32B0JRAWc/srbI5tIlPvRuPVp45JnVtzuzX2\nNEgkBfjKG0VFG6NKM7zs0ZCMzeq49/4aYpp5CrV/kdsp1ZSDNt/iQwNy+2/W\nOpFW\r\n=OPS0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3hfClc9hBYuEkDgiYdiFNy6CjhOk6H3eH+ei9Pw/XwQIgDU2f9slkWIxTTXGuJUDB8ANGoA7wOeRAEIHV3Epz5HI="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.2.17_1567855984123_0.1467354601229658"},"_hasShrinkwrap":false},"0.3.0":{"name":"lnd-grpc","version":"0.3.0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"a3b2f571e0938d19a5891c7795df3e677a22ed32","_id":"lnd-grpc@0.3.0","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+SI8m9B5K/VXZ0OZu3lNWC0xplsgqrIMfSGIjcS1Wu8Xwq/XnzYIp1Jkxhfysg4eKAwmR8BbzGlNFKw4GVfH/A==","shasum":"dea4258ce36bb43f6a72658b2962e679caa1ade2","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.0.tgz","fileCount":84,"unpackedSize":829620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc5bqCRA9TVsSAnZWagAADQ4P/idPWBz7DEHUnCKUjrqM\nUyc6WywV2K799j9oKHoDocST0UX5j1lamqT2ZJdwDueA9IuD8ruktSnx7Nk4\nISdqu5Tu7UMp2VG1GqDrjZW3LHvIB9ctxQRtAEe251fB7+hz2o8HyniIViPa\n3EemVNjZ1HlvdwAHZiCDTz9bF8VvZQO5M/YpaoObZXIqTmv1yngD/hMmaPmn\nJIzixNDElz4W/OLhofbCemJ31AsZVKmztHP1D91W7+z7Ktvk75mt3/2e4EZU\noVHFEMEZJe0wbS1p7SzFGjluGcpso9Jt7xCFxdMrZO9VVcHKwP5Zn5CdYnZ5\nhTAexBuE/lOfOTlCruW9XRuAFkZloOVvrvyYHc1t6k1FX/ShWp455CCwF9uJ\njvglTte4M2gFQrkTedHDVzejhxJnAQQrq8IsX6F72SuXlVIffV+IJn/t54sT\nXEK5kNfmedEeeplUm1ut1iEiWyRX/QSJ/Bh7lvFSfOUiOvcUmBz3fhmHGKSS\n2Gf6r/+I5HRkdqwk/BvADNPfMIsjMAzgUF5IHEA8PSt1zLdqpC+O7dCoGWmy\nxNqZzMx6WQl8MxKrcCrmbG9ozUkCU4EKLT8VnIXyuQ4PqhYEaH4n+vgvaW/n\n1iCLj0aefHbsoFAkZ/6XJ1/6KbRugy4C5em4lypcTMInWBh3Tt4xE7AI7glx\nY2ux\r\n=q4qT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnkVpr5tjVf21yUifmjYFpL9pAJKQxoR11Jd6Ck61YMAiBkURciqqEAdNZtjQfEFi911WTOtn1QmlDKh4U/Q6agOA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.0_1567856361812_0.05705056487151183"},"_hasShrinkwrap":false},"0.3.1-alpha-zap.1":{"name":"lnd-grpc","version":"0.3.1-alpha-zap.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"8073b6908db38805b0c03223634e87d50b2224eb","_id":"lnd-grpc@0.3.1-alpha-zap.1","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-YlGmmN8NdFIYkLTy33y45/8qxx57+9RKwzMklx35BHsNPM0JspJHma9D7MZO3wtS8q8kPhZjvdulxXHQeTwT1Q==","shasum":"e2423ee74380b9dfe1e60bd1a03ff7541e84d4ce","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.1-alpha-zap.1.tgz","fileCount":93,"unpackedSize":961898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkwuCCRA9TVsSAnZWagAAWEAP/0Tc9RjgdaSm1NXGypHd\n6Zn90pjVovkcO67eZySwc+T49T96ndV0nRsHnVfk2JWkiVa+m2QnK/N+B9uv\npK0FJYgZmK1ZxUKuL6WDKQBeZlRKuxwoG8XGUAYW0gtGvZFYQjYU+n/qb2vI\nhCrcD4s8un6pdwksG6Ew3bM2zgxaKfU+vGyijZAUhjeO8rbKOdAX7T3ee2vB\nPLC7mYMbbsPycd4PiSEILFC2yCq4ncyg6pCf7Y92tRUi5UeL0R0/EILJlAHe\nhtl+H0IpbG0GtRfmG43uXafDbBEWohPYJf8W5zIPKq/B+CPDgXRMTJi7G1ro\nlFc3Ngxke8ky3k80s7BOpP4KKfOX39APtLQOKb4k8NGEOiyhliv4EmoZCAlO\n1iUBGIwPgEBF8AQREiV2X3yVvj3gNCBAYJz6pipcmus4+6WGUgC122AnqLqt\nBVWmpVPkbDRbjvqFAl/xlDPayqibxqi+NFZ8bo8gvoaEe1+b30MH+p+OjsDU\niAabblBdOW0497FbqaPbC7GachGUYx6VH7lxSPA7u8TpXKumhKqUj3ctDEX/\nrjjYqLrva+bISvWE1SfxmGcxsrCD9OBfxch/gyUXG/5WL8WjAGwkAqdoaiTh\noew2Spc2pUIvVjcbdsmkrml400b4CGftXrpTHJxhiNn6vrkur354Q5DAotXc\n1RP/\r\n=ofFM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPbLY7zGY3244UUay+s9rjSlNsuPS1ZimXNRefgQAAGAiEA25taYJ5rH6eklUsEQbIBPH+swDHbJz4sPVEjp4zP+7s="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.1-alpha-zap.1_1569917825895_0.7516330487213072"},"_hasShrinkwrap":false},"0.3.1-alpha-zap.2":{"name":"lnd-grpc","version":"0.3.1-alpha-zap.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"9fa0e93ea6147724774abafa2b5fa9e1f066c433","_id":"lnd-grpc@0.3.1-alpha-zap.2","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-U5ECpkNaV3eTHRUUn8z0pjG5Ba20Zl+n0z4yP/r58M2Au3ETZqCKKVH7fj6KAx6BBgyjPFT3g3m8F9NKdgY1bg==","shasum":"fdeaf59d69bcacfce43b4c717fead6e539eb071f","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.1-alpha-zap.2.tgz","fileCount":95,"unpackedSize":965703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkyOzCRA9TVsSAnZWagAA3CQQAKCV5LbazXb7sqMdhsLg\njJB8GJ/8rzYIMZQ5Z/xEZnvwQ/DDutAbTHpgT0LzfzP2suURQ8zdjGODUS9d\nswwQN+X40efJB72KytPN4sgQOFXek//xQlx8WnIvA/3b0IMYuBKvzfWtnnmB\nGuz3MUPIy3H84svfUv0Ivku3zbOcQxnAcze3QNtB0WT74qB+PFFe2mAbgdbr\n8msJBe9YooP8ea35VbvFE1eBCvjTvYVRlkTKDoOWrglDG1b3IICPoXV9YnS0\nBdsSn8ZoaruWC9rhPZFCHPrf/XQOyL97uw6mz5L2R2rbYBOMvTr+ubnfn9rH\nXtr4xh4wDxY1uPmX7dhhfJiLpqyJQ6fYtDLeeqL5LRq24NYjZm3kDTQcogPd\nBKATG7E2FY/VQXTM6IjaUL9Kyxr1xK8VTXy8eK+abGaEwo+dUhdGbdLdPtYr\nP+5+0CWympH1BModVzYh/oDmFpEOPTptQbZ5hAXMchG7KBA9VllbBCXUgqSW\nX1d+KhEmdPnFVeu0Dxcm/lvf4Y55nDDRZPDpgwSOZKtBY6h660Tv4VePlac/\nHz2LuS83vO01oObMPRxAs9OQ519UXAoeFxM63f0eXFSu1lfMcjeGqB99Kfed\nguT8HMX8xnXaFFid1BAwMT480qNqhuSILDXZgvRjlUQW0yU7cyNzLg7QyKXS\nTI+3\r\n=f7Fh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBf9VUaDvEGaQn+If8WRQoFdUbsfm16sPJjzmdkH15gAiBNAfEZ98N01M/I4xUo5VDvuUpJXUrNRLeLT3mVaJxBag=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.1-alpha-zap.2_1569924019019_0.4746591950978365"},"_hasShrinkwrap":false},"0.3.1":{"name":"lnd-grpc","version":"0.3.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"00aa0e192d670a894f72a50201a62919da5e4a8d","_id":"lnd-grpc@0.3.1","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-tnpGvnS+oP30JT5pH4+OOurGPsKux7gdt8aN4MlzlcQkuw9ntrXcpDiON3HearEy7SJ9X886XTiZFLT6GCT2Vg==","shasum":"69586dac49fb1559f577d01b1ea81d2a630facc3","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.1.tgz","fileCount":84,"unpackedSize":830824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0t6CRA9TVsSAnZWagAAP8MP/AtIp+ssSXuqzLy5WJ0Z\n/l5clA2AcPMee26ZoU1qCVKNNp6RyDcHLZCiOZ9bVgTp6Rg9y1seBQvb7Cm0\nZcvIEYiUJgKT1itKZH3TIjyHQglOO0zXtVqexsEDfq7GR26E9HnmCHmyl5FP\nCfpBMvT6HvOoN3q9NwQZPVCvlyLnrD6LNfecypgeT3sdY/q+vMmZR2MwiEZI\nlzGDY5khiAMFVEwONj4+MFo7oA2lMKFTaSCfiCAlt5Yj20zLz4PwG14gePNX\nusJ+cn5criw0Wgh1AIAw0eZ4bwbcbPblJSzy4q4hggX8QYE/McTtBWQshm4e\nq5+ptwuS8yZl1WjgUpHHdxchcsbEDW+DZ5vvZhBT7Wes68b1sZlAJP/OPC82\nzLddVUcD4B3Kj/KdfDUdugPBH/j9/uo9zB0+Cd8gE/Xmk4ceH9iETG1UQPBw\nJE18Lwx+2WlT6wUkaKJ697FfaIdsJxpnURz+HscCs7QLodJNVcaPGTXAvGSh\nNC62F661pOcgIKecuuAbSZ/UOqhzWJGyFne+9T93aTvF2sGZMvcUggAoFVUG\nwVb5oqZAHpZ+R1Az7dy9iYvEiGEteK+N+C+d+rOe6WovfDUatC32/2PvOrcy\n4IP5qJ6Smx9L8KVq+Yyt9ax0FQwco3Jc7W5KD9qWXIGHVn/e+6KG7hTgMwxh\ni3We\r\n=r212\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpfEdBtu3k6yjDxMkkqrXXzXwyqGnV568AiXh2QgrqoQIhAJ1JlE/aCCohP6P1NnXo6IXDjl8f1+PPWgWQ3+Zky6at"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.1_1570720634050_0.06714510056251699"},"_hasShrinkwrap":false},"0.3.2":{"name":"lnd-grpc","version":"0.3.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"f671783b000bb461a844b152e97a38b8506fd081","_id":"lnd-grpc@0.3.2","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-AkbH6VNFXkvYUdCMnVYXp1tHViiX71SRmsxvbOOVM/4oeaKdwLz7+MBUQByGmRZjcM/oQIdt+BXTJ1OQhCWljA==","shasum":"2ba8b6a98490ee3e95afd262b102adbfeb3a7426","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.2.tgz","fileCount":95,"unpackedSize":967903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn1PmCRA9TVsSAnZWagAAJYEP/2yHJR/7dT8Wmaxp/vaX\niyYFFOelDrOx5ychc9giBypFH1Mi/LLlnanHK2BzQa0TrunboriRXv/E/txv\nDs4WR8pA3cfXpSnT4GiuXMO62K9v5pZM2JfjcDeXxB1qnvJULjhWYxOx+jRb\nuuvg86n92m1n2NAg5aNXQRdddWllLHdHpi+RtovHY4nV/PQFHU4d6m7yjZo1\nTkmflhGreymDdmg97BX5vTAB72QQoJ8ETgAovxlMJjNByyLNmhHuy6KbRLHV\n4+h+peFUk/6jDPVrjCcwYTmJerj6dIZDT8tMK53Wl0jorC5+Hyk6VTjuRFrM\nV7hmV64j/DEI7pBs5Kwfq4ChwwFpJNvzydnw/7OjQnNMnlf3chkbD2XaFnse\nelzztWF6kPGNAKBQSRv3Y8tXHQxXuRA4cGh6br3YelLFolZkRNd5v18qjiXX\nmOp5Zgk8n1Rs/C3NQpxu9XKdIIMHLzpoJZ0u8bEVYq8lkUDMuWnMwJ4zgoB3\nyvfym0whv5F0p98svuopWnWtQINCg79srn0EpbREnhJ0kSSnyU/CBmCv+kVe\nWEWv8oiOyeNZ8QVLGQBprWhAI0rkw3SqVQO2AFINSl2p5A2i9/HoJvC6t76W\n+OSHDQnTFGiWLfS2ivlmb0JJUKN+miVFMBaoBQQ5sU7fNyUgxl33HeLWKYuI\nxcYS\r\n=KeiV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAj4Ucugn2MQjJosa9CmIskvwlk5KQ0x5f5JM3Pmt3qAAiBtapr64y82mKU4+GNv1c8BvOSIFkRk/+QgFtMB1Fpngw=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.2_1570722789749_0.7731532913425856"},"_hasShrinkwrap":false},"0.3.3":{"name":"lnd-grpc","version":"0.3.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"19a6000bae7b23ca0e51a335e68d0cf9449c8fd0","_id":"lnd-grpc@0.3.3","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-3mYTUR3u3tsF8j1aFyS6owneNvxsvOdY4qoccUqgb8vataWldWBrRnYwI4x6x6hWzgf6trSViApbSTQ0wwJhWw==","shasum":"049a54d33305031ed03ad068aa9abbf9b53752e8","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.3.tgz","fileCount":95,"unpackedSize":967901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoDE0CRA9TVsSAnZWagAAetAQAInYVTSlX5isXup70DAV\ngUTzMFXKn3GhJIv/GkASiFvaErcLlhe1GZrZmwhLFSIAIAPjphdv1FfqLZ8b\nIkzadBqunQkVlB0w/h0v0jeyfw6n72vH161MDeS+7pHLQFVxOJgJWF+IpQ0A\nUP53jjAMH1++i0DwOGd5fdolxRgD9EjRoqjX180iwJ9h9CaNwzQvDydKQSZl\n7ptQF6fVL0V3DCplLnU4uWvhuGaWJDUWatpwh3yjuLh4cU98aqhQPC3l1wUI\nA3/ZNTYPsHJ2FMfAzFP8jddrB+k/mu5oZgWCHofrT58jl1bsO6KcBYaq1Icm\nbhrGSLndB54aAX53rrm+PlbmshyP4d63AF0YSO9gsAVebKFML4RryCu7H+IB\ntRHhnasMb6/tkiy8TY4mIF0s/OboUR75UTkYy8iENo9tOMCLwlHia2uzY79J\nRkV65N44Hk1rHdFJQMSG1ONkCeFEddFAYDKBWLxxCQn//qEa/OTTBydxlekW\naaOc2n7AAS37GDSQPHFCMoXLzV92F8OpFJsSWlUzOTFoohfWSQJ7d2ZR6NlC\nA+yaJbyt4S/c/mllTcsDl7xOfrELc2hSsBD+5c7x7prp03keWZgpjqtv4MKk\nRxKcIff+RWKXjhQ3B8ng0zO0WcDuQlyXSMMvtXBD8/khRysp34MMV4+bga2O\n+ADf\r\n=h/C5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMm7vyZT30r6babgsoCyLhh8SZlZiw1VTbqpZq7lla3wIhAI1DPSfrcSAvM21rgkN8BNi+ce+HTY+WQWgwCtLbuh+6"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.3_1570779443581_0.19612936151362792"},"_hasShrinkwrap":false},"0.3.4-beta.1":{"name":"lnd-grpc","version":"0.3.4-beta.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.6.9","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"444d5a8b970f31e674203e6bad8addabac699715","_id":"lnd-grpc@0.3.4-beta.1","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-ZNxusQ/FBSw1+FpaMjIjH7YexXgcxs368m8T6iYFqE3M3mb6TzBnknhKD9TLlnwHJOjvHNlWMw/77v9OZ/U7CQ==","shasum":"f7a720b23c5382ca686ec75889befc2b5c022274","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.4-beta.1.tgz","fileCount":97,"unpackedSize":972179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqXe8CRA9TVsSAnZWagAAJtoP/3HAfFdg63Qi5UhzEJin\nStCr8Q2UFUz92eBb0Tv18Ac4g4gmyYhlWawRd+vsOHc701oFHtQ8K8/rGB5c\npgQ6ViACEz/HgQz78gRKrPilFy4R39+osmzKQG8EQUz7EArHaDRxXafxiFFF\n7CAKwPSVx/Dj4yx52/D+RM7CsoiER1PJWg6XdU3cdrpz4XwrkoQ6IkOr4Hv4\nPB2gYn6r+XTdQVSilEUMSWBuS+uuf0TIs4TvdLAbKyRTnY2wTkEbzbO2ZEk8\nWKvqLfkTnetC1+074fQdCB0q6tttmyeDqPOu5TfLMO4q+I98xVPWemCWyfpw\n+3AWoOoayaEEqBvaTR6luX8OmxGgA3dHeGCdu8xzDs8go84jVhBzfm8AqY+n\nLAHroJEjuggrMyCq1FmClPjRGCmi07z0RTl+JcQpR60P6oKAfwKCRAQKa4p/\negguKnBVTq2z0k6t8+Ma+zVWqAQJ6dFEOq5eRyWPbsMEUxUERBI2bo0HFAmT\nSQmnCsDwHHbHsobWOejXavRcIj+FVMMjr1QrRToWxOTuFtOGewYOiTd2fq+m\njmmCWMuY/r+Df/qZMjfFk5eIk/B4kPfVn8V5I+y24IowfgBVfkI/Fyqs8n7A\nMfs4Y0jLjN8jVnGmRUea27AlfIObdzlqmlUU/ouDMyilKk3hjar5s7GreIPg\nT9E9\r\n=iVAq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGl0zSDiWjscIoFUQ26pieBHMYgwkHMjQA2LRFl0mOwAiBnavRFzYnAnwhU+K8S/SRD/SQcHYRipxjl4T7Y4wWKVA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.4-beta.1_1571387324020_0.6986488487692373"},"_hasShrinkwrap":false},"0.3.4-beta.2":{"name":"lnd-grpc","version":"0.3.4-beta.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@ln-zap/grpc-js":"^0.6.9","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"076022205569b9957606634671399789dd229af5","_id":"lnd-grpc@0.3.4-beta.2","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-qyjkQ4OV3M7RlhiHosvgOij5NANLF1+2/1RUU4zJVjIFmbPXuCHsI2INq+yt2LeZGnvoA8EHV8U5PjmFkz3OVQ==","shasum":"420d13cd45dd41390ce3844399e8e2729dec78aa","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.4-beta.2.tgz","fileCount":97,"unpackedSize":972218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqiTvCRA9TVsSAnZWagAA1WEQAIlW0VPPhnnr+kV2bzad\n3/s74i7DOlrStgQ9t2LuDydAndqqAiUF48+6gv1UofJ6Dd2NZ3ZzfhmBclWP\nO+sQ7bKlekBd3YopA0N27FUcqzFC7odV/VCdUN1q1cpriOikQ9XrIbDF3o4m\nZvA5FOak9vgPM5lHyc24BtGFbUvfJ4hCnaa4WQ7MXpGf1bPY/NdkUphG9ASq\nC5EMTHssFushXT4TohYjWk38HXfuuU+KtfRC0uZkKe4yZPQyzzOCqFfD0oTQ\nnoTMXS1uIenFO7foF+i9haIyp5bf1MAUtuupToocXENxrimTktkSAkgYNVFZ\nGVa4OtlMIOf27AQYxp4ObsptHYfp1/0N0r3QZBVsmikZz3CQpnZHmmnYp3Gn\nyV3TEWuxe9R7xqOOXItqEN+pDQljcFXmCP++oFArukDZ4suwodHWvBR3vgki\nS6ThELInPDDdyo5/kb854jEr+8to5bN0xIrEvqPeTw2F/zZdpGXRqViucnJr\nREe1CGzDC8ofmruOi7FGUdn/m3oFEEYfbM9uqSaEWFtLuUcJK3rVabB0lZzU\nyj98T1hU+FsJCAHMScuOSsuH5mG+/U4VUJQkmMnYdSTdW2KAI3FDRC7hZYHe\nyJl8bEPsHrjic7iCC8tPjmJuhIrUlky+nA41yia8dGzqdfNI/HQbSyX2lhbn\n3XEv\r\n=f6BB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjLKv8xO21zFJeal2V/F/lsnYWhE88CEJDrjatYDR08AIhAIVwGFq06k8KwtTf1bm68h0LIooAiT/p+w0NOz5sYSMJ"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.4-beta.2_1571431662901_0.05594794097749656"},"_hasShrinkwrap":false},"0.3.4-beta.3":{"name":"lnd-grpc","version":"0.3.4-beta.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.13","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@ln-zap/grpc-js":"0.6.9","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"8fd998777b1c8f6899e41ca39214d96270458475","_id":"lnd-grpc@0.3.4-beta.3","_nodeVersion":"12.4.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-vT0TpNY+vp4iE7yWLjO4SvRzhci/PYC67VIpcNVmPUjiNbVXzjhGnCn6MkZ+nOvT8+c3peUjhtNGd8jGhvzg3g==","shasum":"fd3a6e8f5f9f9fd3d94fa0db2575fcd309c8cbbc","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.4-beta.3.tgz","fileCount":97,"unpackedSize":972217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqiZWCRA9TVsSAnZWagAA+XYP/10lKOvz8dc1LJcQX08g\n6FyWjD6oMKDMzGDM3AZB7/W/nagqeUiYDp9DPSDYi4pWSxLPEeVyKEQnOeLH\nmUIFjw46CvLER+BznKvn94NE26fHdZdtu9bh1msWVq+9LMTiYT8O6V4AEOh9\nSDcHML9s9/jroLAHLn1VH1/Gmpk2vbFjA194YSQNqmX4eDzh4Qk17xT88LAL\nqy5zQHq7/bF2ZVOUANHd4ZATfgt6kLr+t2K+3DGln7OjxGLIAr0Ujzn+J6+m\nzcGSw1nsKwQ/BnisYWmlhSHr3f5UoZ1HTW4O3YQcOXI567nlWCjO/O826P78\ndqhKCzCn2QzsKJ6is6hvX1OeLqrsmoiW9oVIuZwosy6D6uJDuJrm3NcUQYOA\nG4FVGruCTGYp9VUvr5KnBzKfWaF1FHdTmz6RjtTXu7JU539vSl8y2jNnBHFE\nJTWjIJn18pjAk3N7qHfIe+J+ml1C5UKDV3FjwEI/3vGzz4KyfZbem5xIaNCR\nm8Y9ow0XgZ3oOQrIRGOcbwbCdf6zEk6/F8IQHMICAiXJdWXf09hgbVbYNT0z\n488MHhiiXsFsrg+sfadEWIR9vqiL7Hybb+Yh1BBy1KF4EoBzRcBMWewrdoxK\nG9QfKW4tJ10ZxoV6AxLKY8pNvsz0aOpyDzVaZoxisSZKnWyR037ByPOShkU2\nb9Sq\r\n=eMN/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtMebakSWhBsJq1ar8MBHvBmhARqt66Praurjap1CaxAiEA4GgQLAz3nvvjfhev1t6jyyoL4T5b7qkiuzvByBx2Z5U="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.4-beta.3_1571432021282_0.9185461740269181"},"_hasShrinkwrap":false},"0.4.0-beta.1":{"name":"lnd-grpc","version":"0.4.0-beta.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"TOR=true npm run test","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.0","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/preset-env":"7.6.0","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.2.1","cross-env":"5.2.1","eslint":"6.3.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.14","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.4.2","source-map-support":"0.5.13","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","get-port":"5.0.0","grpc":"1.24.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"95dee2208310c817ccd774db477a692a95cf6a97","_id":"lnd-grpc@0.4.0-beta.1","_nodeVersion":"12.4.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-UMsT5+DEnjo4iyT83+QPVw8/OkJRlJDzEzppytXeOULHFDM7KRhg2rFdH+bLqILHjgXgn8kTJhg0BNmfgxUoNg==","shasum":"6f295e0d93111a2e1df23812d7125e721c5dd340","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.1.tgz","fileCount":99,"unpackedSize":989668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdssCUCRA9TVsSAnZWagAAi4cP/jsRw4MqdQHK7cpg5pZV\nUWRyl3gr4bd0ia9yh768LsgflGx9e45FtZUyOnukbzHC2RSwtN2+u8JI8IOi\nog+EaWJo5UjW465KmDMaDrbsrxcrXXOfFFu0yg7b+ypgiub2gxSKhIQTvDrc\nb4AnSbTfwDqo+kAaH1boypNx+EKZ3A8E4AGhLbtsQgf6UognnJKOnh0MhXbO\nsgZkVP7KpTFq8bpHW0ZMJmOvpGQdSP1H71KrXxq5g8l5E4ChjN7hef96igoT\nRpY+xISRBYvWUTyVFmmMfZzL+fUNQ8gwBRC5DZI5GHLxt7jJNCfvxCRX4Cnn\nKOs7/Leet0gW6YkVQjVPpKEM7lz9Bg9LRU3p1UlkQ8Qn5HTjRPZQmfVQzZOu\nlSInDI2FYc5YYG1ehkESyJbCOgQolKumd2eyIXF8dRyTKJl5XohloLjVSTc8\nxdJ7hZVr3CULOlvcjyFEVC/fb2wO0zgTr/1Iq19wH3vX6sq92nH65rSWIA1p\n+lTpx1M80oAxeoBZNbLfNjTgCS4EPX+N4CkUoHDb28vN07URgUJR7QF88re7\nmOrKjJb2sTYuzPGaqIb66Xs5HXBZcDKZzUA/nysf9zUHGX8Anjds9eIl2FqO\ny1GAXfF+aKxqPG+Fw0KRGXKyDdMyxkyNdPqBNxAF7vZbwndc/8PVJo1hqbxK\nANwu\r\n=tEtf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJs2r8v8BX15sMd2MYwX5VmOf/dUjXRw3MtlEEAn9m0AiEAldt4B/yRR7540ONF+ZnEBS6Z8SU+D7A2D0vCGDAihjI="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.1_1571995796258_0.7149302710328664"},"_hasShrinkwrap":false},"0.3.4":{"name":"lnd-grpc","version":"0.3.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"./**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.6.4","@babel/plugin-proposal-export-default-from":"7.5.2","@babel/plugin-proposal-object-rest-spread":"7.6.2","@babel/preset-env":"7.7.1","babel-eslint":"10.0.3","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"3.3.6","cross-env":"6.0.3","eslint":"6.6.0","eslint-config-prettier":"6.2.0","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"9.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.0","sinon":"7.5.0","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"4.11.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.5.2","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"6.3.0","untildify":"4.0.0","validator":"11.1.0"},"gitHead":"3112471ec0ac1dd69d36b900f7458588c1fa0c7d","_id":"lnd-grpc@0.3.4","_nodeVersion":"12.13.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-5GdufbAzLaPS9mh6PhnTjKrI1N3Lzb9QW7em/Az+emHXyEDFjNoIIZddGTlQ+TdxdRHv4xRxUQiPPdae+Nm1BA==","shasum":"1070e900039549e94115c7258d40362cb8a6d0b2","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.3.4.tgz","fileCount":104,"unpackedSize":1129637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOXK+CRA9TVsSAnZWagAAgaUQAIGr2EKDnWQIWMwGqg41\n+pbiGqruVzYgIX9wgnt/AB9Isj/pN70e3BaRTXpAXBLQ5++5rP1Gag1Qvpok\n7aGuySbCUs17rs/TdFX7o66BduwQ2uSI8yen6Exjv/MUgNJlF/5RZRU+wrzh\nMe66L+tpJwmLcTidQVmH1YuCBVnrDc0STeKEsdhiUQszdY8D/S4t2sOm9xpz\nvOTm2BDKdufl+XtYsgjo2+LfXAN/3JJoJcbfEIY1O27Fl2/9ovghV/eG/jFd\npJEZ7HI1oAIa4HSZR5UxiLCQODMEtaQ35fxl5PE6h2SET6lXAFPX725lyLQJ\n1De7eacd9xBtaX9vzYH4nq0oXVe0HB+TJZSBqSkmxtUmJdDDuZQEOZiBT+KM\nNj2QwNCJdc5KM+Dj1b2d6qmCoRs+JWi+shwX1LYdbgZys2nERSdRT8qBiev3\n354STHYBL9GBkyabbvsl4PzkmN3ba8k5hGTRNBbKZ22ZWsB3x3tGtdFodRhW\nvbRtPP8ofFMJZfh3BotRP02SFhJD6fl1qxS5PvM1O6E9xPV+9QJPeQXfZn6A\nDKYtKBPs3Dh+onNra3dI02n35wV8inPqXyrXRyl+h9Zs2Rnl3b+wPBgXi3b5\nxm0T2JMNzadW3E2AtvjcyoPzfseZfXlCvCYZEB04lB4M1A/QTlFb47qUuJNL\nK21e\r\n=vvvo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGnZgGyk5GhyM6Gd+KO9e8l+ZX1RTX6FdQFWKJ1X2z/sAiAlSqtC0kiMQ5AZdB7/Sh9KeLDxGbAD2wPfRDo141JdJA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.3.4_1580823229927_0.1426628869424742"},"_hasShrinkwrap":false},"0.4.0-beta.2":{"name":"lnd-grpc","version":"0.4.0-beta.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.7.4","@ln-zap/proto-loader":"0.5.1","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"65443b65b6d8108fb03ec068d6ed25eea3fba1c5","_id":"lnd-grpc@0.4.0-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-PudQjf0oD6gNIZAwebBiOMfGxHijB1gIKCXYuMAA6MPpEuMJdwuWlYF7034p5SAjJQyljD33tY1Li7yOlEbFMA==","shasum":"f20642461fdf30e7a6e320b592d89ca7a8ad816d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.2.tgz","fileCount":106,"unpackedSize":1143558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehEdCCRA9TVsSAnZWagAAvIAP/2slXTheNKNh3GbkKVDb\n80UMFdn5sq9Cq+Nbh7G2P6KuTVeO48fJdY/ktuDJJa8hdZEGeePxRW4TrLl4\nLJe0IQJY7O8Wm0sVkFnwCNhrQKGZu/EU04JT8aiHQUXjfkdUEA/NSvEnEo7U\nZM8LmIZ/rJW+XLgdZmQ92ZZeTCOdaDXF1rthrgTwoe2cjeip/EqZpW1sFa6Z\nPyxiHRu+rBMv8XjzCUkhIpoXUGFbNfK2dIBX7L/M1qPdi+D/BPh/6socjxQt\nsT/TOkZUJSgRG/2WE2V9mrMtUBYlp2yuq+slrsSi73FHMY/oOQI0HiI7Adbc\nv5p/h4DQn1P22DiFRRWqV3bXOrDSycKz0ZBOUleC6Llk+Jt6daqD1U6/RRbq\nlRHRfrAxx3uqXbfnxmNfkKbL5911CTmkUEeGf1Dp8FE7QoB1Bn4w33nKd4zF\n48o5QrsOD0qDxO0+GS+abWBmUbCCTzMi8Cw8iZP+8AEh9BiNcz28yHhNiLoF\ne3wQuL5Pfo6t2ljyz5Yimn1QKvZXlZpCMYWQGSYN6uqNlF0Oo2YX07+hjsG2\noZGQoSBLiuclCjgQnIuGTnm+G+dHgeEAhqnMebw8iL1L8Spaqb68NlQvHGIx\nljiMrCIARfI7YPObw0pa7yN/zlZJm5WOGqFwYU5nBRJqJYmHw/sBDRwzmm/m\nKl45\r\n=i5Ov\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEK+H7HATNpHk1ukOZHkei4RPP+l2RcuX94cshchdlvlAiBTDBTTI9d9CZamfBNbcwOu6nEQKG1xfikIfNOu6fCKzA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.2_1585727297596_0.4898042343404607"},"_hasShrinkwrap":false},"0.4.0-beta.3":{"name":"lnd-grpc","version":"0.4.0-beta.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"0.7.6","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"79cb386a99bc8343b2a0474c6564902d6510acc6","_id":"lnd-grpc@0.4.0-beta.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-tkTZzg+24GhXO2hAj/3So+eMitmPqjH7C2Q/JiaR5BzZfUwKumWUdawBOKpy7hE7GISvGVRf8qJtHeNv3Bc8VA==","shasum":"73e31f6690af53ac4d5b00a2447e814ec4c707f1","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.3.tgz","fileCount":106,"unpackedSize":1145502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejKLXCRA9TVsSAnZWagAAfq4P/0m26vcg03p0N8dxKQ+T\nUFQMfj5TwqfUHvKFmZvyodkuccSk9hm58n/zH2bINr5Dh2ftdiHe5ACS/l7J\nQkW8nX0/FZK7utAT2Z9J4Z/1oidfvTkbocwRU2FHCwkelyB3FaA5sgZ9/+SC\nHEjln3/fmETJIlqkzJIHFksXorncBjmDtD48gNdUbIgr+vH/ruB8YZf+aqOA\nK7dG+gO8OO/zrelT5mZ8GULZk4HDykgV6wT01w9n6p7wYlycYMuV8+1zWePa\nti6hS4/D/gfg9VGzpqjdIQeGQqhBqUzK79e92+hjr9sC/fpVLs+L/+lQK+Bm\nQUMWhWbtThXdYTzO+nd73wHgoLbMXHp6cKuXBrC7ZqkyAh0r1sVGroBclZa8\n3HRj07YExiFEncWrKKpcAnOK+QaC82QQTzu7IM+mG8082GJGEwjZCyWM/RBd\n4JIdyP7M+yvWrTtZKYVfc67EdEiMTO1RiWSSwsTlzdVhlGGEkcpjhTKUkdOV\nrL+bWXmzK3WQ6N0LPBEFfv3k05Jf9fFLN1MOHOoVrAg6dQ5IahF/jVY6RA4c\nKrdeJi3hxm6SobGu/YfxY8l37cAD5pU7aNbUvKiTO6ELY3JFZSg2QupnXYL2\nVsAAEeV0fqQVPjM6OyHf3MVp/Wp0I62RP9VCOoX1dCZMF8CABB+QvFqbwv4Q\nns/N\r\n=9b0g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiHirlXpmu3QwDKA+IiqkqeBqBYs4+M/VpTY8fZdCF/gIgeVWuk1kqS3gkstXMMaMjGWNkuBB3Sxlwny04co4AxY8="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.3_1586275030918_0.8607432027811068"},"_hasShrinkwrap":false},"0.4.0-beta.4":{"name":"lnd-grpc","version":"0.4.0-beta.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^0.8.1","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"f70f929a82829dfa5711362c53b8f1ed0f158877","_id":"lnd-grpc@0.4.0-beta.4","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-VcQSOj5xlco/f1cdUUSj3IJWyTIxhIGSAeDRSw7pDtfznXa/J/z+FbXjCeMC8aznLKB/gTEvBDGkNtiK3+XtDQ==","shasum":"dcdede4d162783c8fc5b8541ae1cc9c20af41d62","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.4.tgz","fileCount":119,"unpackedSize":1314506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenDc5CRA9TVsSAnZWagAAUhYQAIUbkS/xzUzDULEFzkGy\nOp4bAUBO759lfDUNMEaAC/T92j/op0Fh/ucr6bP/k/dlAKM2KJU6jlo3ab8H\nb3FGLvG9HUY2C4Pnb2m/7Lzo5Imbwh7gGdjDSXHO2dvxEgc+9zsLNnaeoLxk\nNhX32v99R/vWdHVFSErb6pgYyQEFBZnpmKeVwFjtb+ja7vswBU8/pM+Ll1Zo\nf0PzoM15npX/X+AnLrnGN22YzvJ5Bu0AnuRTHonDiC/cwkh4S6q2W01qCrgH\naAnhf10mtfA5fSB6+W8woSKbI71jTDUOs3U3HUsGzbkky5hS04VNwsRsm5HK\nCcmyjwb15YF0JS/r3Pcn6b1CFIkYP4Nyd9nyQ3FC5+YEey/zG3TO5QLpPSqJ\nT9eVgsJt0Is+qfZ9kcY/UuYR/+WNS+J2soIOfxWuaJJ5rWxOWxonQoBV013j\noXBPbRLcuC9TcaIlAtO/PkAEq8Z36NFFQiISxjcZDssypbjY3vIt28QG5uCS\n/WPycOVL7RL5pNzI8BndtFtCIuBTHMZBoMtj7Rk1de2SZFbkYstnePllJW4i\nmh4ZP2pF28iUMba5+14V1S2b4Ybw+OG/e8cjjssR4rjVCy124wYroijTEymN\n5Gl5G9fQ0dx/uyQc40drnRroT2MFo0F8ukaVvdzRazX9DVZIwgxTNDfLkDMo\nUELe\r\n=RP2X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbHtHs07bT5niODl6sB5qkIlQG1m7DhaPPFqF0IBrcRgIhAMXR88BCXnnIhpBPoLrFOuJlLGsIf+T0bqWicZlcxUTO"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.4_1587296056522_0.5726352818811995"},"_hasShrinkwrap":false},"0.4.0-beta.5":{"name":"lnd-grpc","version":"0.4.0-beta.5","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^0.8.1","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"0ca46d29d08af46bbd3790345cf53a8f443e680c","_id":"lnd-grpc@0.4.0-beta.5","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4Tpi9ohLweplM0sDl7b+5QPZhU5i6hlhHtmob/BIyhZHgES0BqaTPDU/VkCzXpHLq1y03qqp3gqwancNvgyL1Q==","shasum":"d0ad61294d52c94c806842cc5ca079a4d27415cb","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.5.tgz","fileCount":119,"unpackedSize":1313007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenEfECRA9TVsSAnZWagAAOW4P/1wiRAbhO7oMMS1wxLvh\n3ZRgaM1kh5kQGuufV6iPnyS6J4CuS+C0UeBANnJvuukaIsU+mNBivZDOZr6O\n7P/wHwW8yakwL7xiuOUROcmnw3IR4545pv9KSR/GRNajoKXbLDX8LRSAZZCc\nX0mW6NeIOx2yrNv1cOGfoc+V4AqEpKaZrCOk3P9irdDbFVfnRzPdekVH5vHP\ny30lMCoAcUJuIakosOU4bt0NYovL67lhbjzdIi46v73lCocfGOmr9RJ0Pha6\nR80DNUaG3U1dqRDc7ocsCKYwzi6imDlhmE1nO8tkJBlbM6x21C7RWC5Vb36X\nK7OIm9njBjFshO/c3VG0YWN+UY1DI5+YtRt9EAe3sig3dUFXxSdHk0sSmMqM\nk0bK2y/45uuFlTrwKXKIJ/wSXyVJgfiXtz619G3fmblB21ceZt6I1LScRzyq\nW+5gs29TQEZE/O0gt8+eyR/D+5a1znj70i1T1CSt5zrOXDI7a0x3nRypruYy\nrrIGj0J5BQZTa1mQQpPDdOF3w7E8H4cX/L7mf073UTOHFU74deufe0S8ZiS3\n+ALMfKSU2YNSXaURmy4BxD+Ygb/G4GqMqRDPshSOuWeAYcIjxZyZYs/YHil/\nxi9SQDFPq7Gr/7pGCsxo/aLzbNWjUFw+umIgqieaQTr0Yk6MJQ9jH5065p9t\njICF\r\n=0bzE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFjYhSb97x/l2XWEgqqKJfP/fw56JNxrbnMnpHfDVBr/AiAQo0sQairzbQXsU9PS0fiWlNt5cUKJUnnYiR0s5yJLqA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.5_1587300292382_0.4563474422620837"},"_hasShrinkwrap":false},"0.4.0-beta.6":{"name":"lnd-grpc","version":"0.4.0-beta.6","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^0.8.1","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"53c194c79e4962208af5eea9f963ce8dce6b79e5","_id":"lnd-grpc@0.4.0-beta.6","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-MrrZ8ULkIvwQt6W9yRxI4/UnPvFwvhDYy2YjmtVoX2EnlM34Ub49DMbP0hArpiyCEiBsUjMC6J24PNDbkBRMJA==","shasum":"92c74a7f89e5404dc5fad767b814cce7ab82e854","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.6.tgz","fileCount":119,"unpackedSize":1313329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenE8nCRA9TVsSAnZWagAANc4P/1ky1CFUDiZ1KqvEG5/j\nAWjf0iawCnBLjDM2/7HED1xPPsj3qjnznsiIywLWxa5thRpvDLmKZXe1X5nh\n9lb5kS+tjgsyniz62+8r5L/9IvBlqd+iHOYcGbFySWGEBNGPG2gVtVLn+j25\nsePAuSKbTZ7WcSfX7vaTVKI6DJAreqogW5XCiAxk+5H6VbXQeOfFJwe7AKAh\nvs8gsv14Raq6mqWqSwz/b5MNc2yUZlN4w6jMFQIS4viKP6Gc/8N1XL4tG2yW\nelfIs4XAUwTtbLATgtAU5LfUY08LzC2N554OGXo5ufsrfVHpwHgUX9hnxIgU\n/UsiBDqNMED3SjxlWF4XHN6t9J2SBQFx1xXzo2d3gu5S/VOxHZ4XQq+fnhmE\nLLGlj+pipMQQ7Kh5ENeq/bWO5T02dsyK3KQnYILElOFIIkN87rGSgZG8jEkz\ngPqteH5kgNMxsJ+7qvBgraNnOYFdkZvXoWQty+URGH5/3BwZpqGO+1x+mvdv\nGgnxDXbuWhaXtKxhvkWVwo1krEAB2pxzMqWu/0uno/RdqjDoyOqhXsT84bBN\nuTkHK8EjIIz3cud+G+f9i2llMh1TUx7t/dS/gjyl0it3g8gJ/XRuQWWZ+h9H\nRUPCykVcYvyJFfsSBj+W5GOgMKqaN7h53+f/TcLbFIwcWGj6rduhwc1ZJTYo\nIa38\r\n=tbol\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsEt7tBb0BKCVy4CnQZW60zNPvXjDOAUb0Ffo75UhLzwIhAJMe6YVLd8bkWTx/voRhsELz2laA8zl+kPlaMjErIipE"}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.6_1587302183001_0.7548333504455693"},"_hasShrinkwrap":false},"0.4.0-beta.7":{"name":"lnd-grpc","version":"0.4.0-beta.7","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.2","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.0.0","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"7f43e118288406f54c0c35cf54acb158667545b4","_id":"lnd-grpc@0.4.0-beta.7","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-JaU0Wxa30IBifGeoSBETxliG5FBfTHH0SqTdlEsMXyDCajAEMhs7a43XQ1rUik4IWdqd/T5ngbcmOq9k3HcBiQ==","shasum":"3b53f462e0eeabb434f794e58cb3643b8bba0084","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.7.tgz","fileCount":121,"unpackedSize":1330172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeodstCRA9TVsSAnZWagAA8HIP/R3fVAdqoJPuoql7jnMc\n+yCsvhAMmVrq+MTszwvRC46nwcUXTJxzgT1bUe3AQSeVRnVHCD/qxlP3dQ/k\nc45xdp1Iae96zY+oClm+UZqGUeaxXOFh4Cm+lKwRnvfuUuvi/KaclN3P+xRq\nlMqVA6kIU5ES8i+qloUocGrskFoHGRs9Vv6V2GM2TA2V8jSDSL0V1ORj36wd\nZb6DK1CW0zZrn2/IfbbNuoAdSGcu7PvRstawbk89hwdqT8+9n7QMPQVpu4Xy\nth6waSurMV46voog9zXPLxKpkqYGLjQ7k4oc/SvIV5kkZRBHOGAHvv9FCTM2\nSSVX99tbtl54EajcSl5GzIZatqQo9cmrAG9Bt6kBCBVLV1fg4P8XKiC9+cVw\n1DDIMbu/a+msxsWLBTGZufCRdwwmhAGXNbRFsRr1MJJUvQ+pHF5MqG1owbAw\no2rNit2curPfKTFn32vG9wROw6pLeacm2UQIMd6sLqFER2SZ7gAG/WpAzlYx\nIGG2FA6IZkpgYINdnv2L1ebPYOUlUeeWnV+49B3FH5FrP5JMZ6IIu993aRcp\n41kTsCmg/EmRQ0hWpY2yEQ/x4H/UzHAxq6+mpCpIr0Ku3k9WFiY/p0FTJpkS\nXiuFgC46ZXC32UtspNAtI9OAZ25VfZ7VlnmF9j1wuWbw0yZZjGMbm3SM2MJb\nfdRn\r\n=JtLY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3F6wGHptku8NKM6nkiRHuuNg/AnfT1S9YwMXUYaIOXAIgbaIBCK24VX+pNA1mXBcL7VU6v7dgwfter8i3Am4Kcjg="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.7_1587665709082_0.10183867657414236"},"_hasShrinkwrap":false},"0.4.0-beta.8":{"name":"lnd-grpc","version":"0.4.0-beta.8","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.16","split2":"3.1.1","tap-spec":"5.0.0","tape":"^4.13.2","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.3","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.0.0","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"a920232f3a44fb3442142c6e19ca3551bcca1b4f","_id":"lnd-grpc@0.4.0-beta.8","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-t0MC6NtqPCfqhvCHLOyrkelkl0Hjy7gI7LgQjI3T4wPPtqNUwD1b0c2wIOjVNdUM1DkZ9+hMJrMkAX25yLsTBA==","shasum":"0252e34e0f7f7210025e6e0357b445156fdf7dc4","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0-beta.8.tgz","fileCount":121,"unpackedSize":1331194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepYD2CRA9TVsSAnZWagAALBYQAJR9kAehYt3Wzk+EBQGb\n8Xy9DTZNklwntAcQnj2QyMVIcd6fRqDr3lQZtHzQcHFIufV+B3ievxZmX6Bf\ncP2mWSjPM5J7WZprmgV5AqtowNqyNU0rVuJEXl2v7b1sE8kJaRNAXbplm9O/\nzCKwZA04aq3d2Ij9kmzeGtC4G6CguqIjjPiF+NQoBRUppjyPV48T/kzzB6Y2\nKsLfsY+HiqhJw+HwoJtIc3/jGOn7fDvc6/2ILZA3q3koyzzQ6eqI/sG1iuDK\ngzGCknZZDD2K2TeprwLmpHOvUbwnm38cHeQ22hb4MtQmAwo2Cvlq83+W88t5\nheAvIYm322oqCg6rZa/53Bv+31cfkX9WWH30JbxDPXMTX0yGbkphSvMrc0Ri\nWG9WXCykRZQa7beLVayoVxhGadCEE2HYA0sZS3YUBldZhSfGHXvzUgu3ap6p\nnQVYqewKRZxtIffG7DjpPBh2IfCG0JyI51eqtSv6iDoyPC2cx/sQqSETyFIA\nKzdkOCD1sdhDwtp9mBx5BEfX8ZiIBGQuCJBg5GjAkdRka9rn723JPJvh/FdA\n757I3sj0Y7beJk7TMTTDs/akrps/rekhVy9VQP8UNjMUVwePBdmti2Qbj4Cn\n4tIPPl4wjheuxnLvsV+VCQ3i3vRkkPxpMjP2YMHSN1TiA+G5fw4DCMOpRSt+\nZlJt\r\n=KVhw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxkWY2Oj00wBHzGUsmGrVm2RgwveKGS+1LomTm2ImbVwIgPXWsyWIK4WGw8IaqC0DgGx9Mv3FhmfjoyJl6oERGJhQ="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0-beta.8_1587904757435_0.8276043684696053"},"_hasShrinkwrap":false},"0.4.0":{"name":"lnd-grpc","version":"0.4.0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"0.3.15","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.3","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"64e0bf14552e3c7642970fbfc07356103b81ace5","_id":"lnd-grpc@0.4.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wtQ1EP6mHvjGuB4+cSyx7SgaiHA5/kAPBmO/I3JfKLQtEKUheJrvQAA1EEPAQTtNQp+Tx4G56UuzI5kBVjfeKQ==","shasum":"b549e3686413447574b7892421ef0fb18644c6f1","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.0.tgz","fileCount":121,"unpackedSize":1333223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerrlFCRA9TVsSAnZWagAAd8gP/1eNiPCi/L6r10CLy3Vp\nR4jGLpyT3kt/1xIt1qeExwz1OQowpVu4xDtLd4OJ/jvRgojqAPIVmoj5+b4T\n2XkAc23X6xFs71/+bnmkiqSp5lGgM4+2ykSXTfQhCRes7VSFryYC6ZuacnNA\nH47LBIkfip3YFzXTlZV5xDlIE95PhYCSYdbkWNUU+XEa9AcQ9nLFVCAYRgjH\n7XGDNejdX7EgkEeh3m8wtGUEcQAKzgs8/rR+q9BuPOn+ZGOrEqKSZbwbbQps\nud+Ma2ihyt1jWpOIt6T+I59pbS0WAkznUfXe/CcJQHirePHfqApJREn52GBf\nN8vNAB64Qs3FwQsu3hCh+79VXObVNjUbIlgVqx5WXWxW+WCMyrdoKcoVVB+u\nOd0NrmPSL0J9xVX+zkj3NKhcwUlj5nNec2I6UyOqxRXydnbsZK15BK7MH40i\n1ylcu5aKyOe7PPt5Yqp76/pJA/naGc2tN+RaTNzZdUKpuZBvFBvVFv12q7Dz\n/ZIu9bji9TvTNbTHAfIjXTkJbLNVlSeb6zQgWG/AxpsXv4nuWIH/k/I9K+6J\ne7kJGde+ngbzw+KhBOYG1vOz3dUOnEYtic8xGKod2V05yfMF0fwSKxyapafT\n0e4j+qE6vP7r4zVnRez3KCqYeEKzmi14cbkUumbG12odloa2wez0R1I7VJD6\n3aXw\r\n=wntT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVuYYjmAMyfBRPiZ9QL45YxsbnlAsYYJ7JF29Napl/lAiAxoBqGrAofqykuRF8Yb72ebe5RLrWhG0MRd16ikZFppg=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.0_1588508997022_0.5707521188357212"},"_hasShrinkwrap":false},"0.4.1":{"name":"lnd-grpc","version":"0.4.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"^0.3.16","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.3","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"e967b7afdc0f5d2264270be3d14f2a26c80f1f88","_id":"lnd-grpc@0.4.1","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-1XGPpAc0jFJeAeFp7pZg31Y3G1AAQJWidSdh855xzNYgKbkioG+U5Kk3KMyRk/VSl2hGi9o11zgAhv2sC8Xe7A==","shasum":"29ca51c01ce0f8447cfe7f2d6cf157e453f7f130","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.1.tgz","fileCount":121,"unpackedSize":1334043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJertf2CRA9TVsSAnZWagAA45UP+QHhjREij7kVeSidGk6Q\n/fWiP39G56UWBjudjhoXE4CgHoVpz95olCJXXQU1zGu1T5zvcfu3GVRaise0\ntPlqMW2pLA8bfbVy31zaFHCPF0G36pHx593rPkFH6lCfHawtHrLNeZFydlLx\nf9ZFDMsoFRUC+wXIMUILSjISAPunrVp97g7EDgFrnlk8zapsLuak9ZqoaGx+\nzy03/lH14gjgFG8yuzljd1fCh1TJsnO9Tc2p9wVwyQ/HxJQr9Dg40TiXrvtG\nB4i9uPaCItmz9GtTk2Pt+p7NUY4cHxb2QejPEgKQtijTZC3cawrOAje51Etn\n7RycFbH252zFLiF7oBnJl0viW1qP4iPKsbLQ4QVZ9LuPb4VrSFTC2G7kjv38\n8xL8h3ZfaQrT59h2ANlMhwhvQhU4nkh2x4NDGXLRxGYFM1tedy2uWcYhoBIh\nlsqt9eAt0sraR5G+qe/fzO09iG1qQuemP0IK8QUcG6ibZTjqSV3MgRu83Io1\naIzkLgZEjx4zvCSLwS2Tp7JPG0i1IWhMcFZF90Cweuh06678kq/nAQAIEVjJ\njj0WhwrKWz7ctO5S93g1Mv8F4O41ecu37YvnHF5eF0Eo8lSyRmVa5HgmjuAH\nHpLVsz84qepb3N5UrIzC5EtPkgCf6YPUUApoj7bgZFK27ZK+6mdWewwCdB9W\n2HYw\r\n=pl/F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4S5KMwY+hWLq1DU07UeKRYBJK8I/FONMyTGcOLSCqxAIgZ9zVOyx41mNqO4omWilD6zHO+M9EEmAGcYta8lvn/S4="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.1_1588516854153_0.9967111080689133"},"_hasShrinkwrap":false},"0.4.2":{"name":"lnd-grpc","version":"0.4.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"^0.3.16","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.4","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"9c101c702aafc604ee039b57d777e282a9d52708","_id":"lnd-grpc@0.4.2","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-7KSzBUm7DoUFtrsr3/dbdfTCqxvXAZj6vnCFPzVd6r5mhUgTybAZV0YBPRwgNi7P9I1xshNfM/uB8q0VlZV7Iw==","shasum":"13ac1af9cdabba91f0fa21e6b91260c2ddba9706","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.2.tgz","fileCount":121,"unpackedSize":1334043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyDwWCRA9TVsSAnZWagAA6roP/0nW4+KzO/bVCVILisvW\npR9S/135VWw/P7jm2nG9WpE741ZPpWgxvxiBaovH4KMZub4OyrHj06XjdaeL\n8aVy7VVbSvBvZyKpZuZ2hj615jPdy6MjdGIXg2EGo32U2Ktwdn/fH+SBcYwh\nFbtgQyI7uSctnOl8EAd01UO6WhU8q7BimMoF4weeNeSOqXPMKVdkvhm3dNIP\npRNgarknTxKiKw9NL17bWeNuP65kiPNp8BuDLCQkaKB8tGg+sUDoUNaMoKvi\nAiKLi6u1RU8QEzmL6vmKFrlA7lHYaLjjyCFFPAnI//nD1jyS9SkoaJ+9EEVH\nzuwn/u+ews+ALO6BYUnmoJvTURPeJHtmPURIhX7KZj39d0oRY9+aWsHL/dQa\nZdFClnpsWLWfLTc3ljA5tnpKYTE6Omfo8hixUyJV9vvE7PvtwPo81bs0P4nx\ntLQzEADcq+YodC0/dtwL0Sf0Ll6oJvTAu2pC1JeDOS1nG8w9CDjU2KATXiZp\nERZDl4BWGm+bSXpErl5AhSw9E+9fKXsj4zjRJmUPg00N4p0N36Aotz0hjjJG\ngg0CZt/NFBn1YtPnQysMx/En77YVNI29WX2WSHJeVPZFiUE0D7ydNaWLuC8+\n8/YlkthnnGwm7sMm0xMeD6r4vLawjHilvZ/aAiMia4BnrKOthkqbOraRuZ4q\no6fz\r\n=Bkrp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGh83afRyhQk491Cs03qaoxB0fLvXusvirNOMXmAadoVAiAxJm66VdX6vKv8Tqde9AgvN/tQJUEmzWMxqllzR3cPGQ=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.2_1590180885862_0.8914911807410622"},"_hasShrinkwrap":false},"0.4.3":{"name":"lnd-grpc","version":"0.4.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"^0.3.16","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.4","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"3fc6de280cc083842b2e9c4323eee72246f2b26f","_id":"lnd-grpc@0.4.3","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cByIjaCV0OiJU1jIh/iOOOUTACcSIMDHzoXK6rmmhSBKeY9vjRw6W4oL639THEiBkbqFGjT9GYyHZLPe75Q/kw==","shasum":"9b20fb158dc3e28548c9a4e1984febee719042b9","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.3.tgz","fileCount":123,"unpackedSize":1336642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyEW6CRA9TVsSAnZWagAAwwsP/0HqRUSJd+jWo7Z5IBGf\nopfUdfRdNpU8CjdcdUZCi9kgMhXGaHqEl7Nx0L9kYDiFFFii1Zs2ZqNOSDUO\nkyp0BNx4LBAyvw4hKWotE3X9RNuuaWpE9erNl/wwiifan6gumvyV7wVGLTAH\ntFWEqDkEWHLx0R5VR8lNX4RXllF6QBM4N8+NsAYqmXG3gbA9DuSET86nRCGZ\ne6/1GEiFS7ysH1yCboMZ/Efi2dDcytWEcuCK0vIi+CZHcDS+sL1u8eJ6p7dh\nZkn44o4tQGPmJe1woAXLY9lcG91Xl5XHvVMiw4aShsslPOztZNVAtMhMfFZl\n+B7FpzeQ6g2bK3cTcpXGr1dT0KZod0BQgJk6GOx97/+hpBrUd6WdTLyXyH61\naRsdQq0k6eJXaXvOiJ0gNLagtdiGUINJGT/eXWVbtIs+pW9/J1uhYJgrmyWY\nM7vAAfqKYtnJwpMBEZLhk2gQN3NKqNzPUdly/jer4Ux7FBH2LEEl+UYLAibP\nXcJEraiPRPE4d6KOBN9I13/NG+vFC3UQj1kl3i764iBIq4Kam4s0Q+I57o3R\n+KfVACf0WnNZaT/NvkWQdwumqx06Tpyiul5gfFrEp2WwgxdkE3YcXXo0LlXR\npraRrFv7Gv+fnqe9nPPVX3WRS55fiot0IOkm0dgPMtVo2aPcPABbugpbE9gd\nqSik\r\n=zS+k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSfoYudlA3MOOmqciT03qmT0VoH9Oqz3x3gtY75wS6FAiEAhlWQzTZ4baw3Dr12bN1ssBlI40820KLiFpkfrPtzGVA="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.3_1590183352102_0.1643131594369418"},"_hasShrinkwrap":false},"0.4.4":{"name":"lnd-grpc","version":"0.4.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"^0.3.17","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.0.5","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"24c4d0bf399ce9f436414206de1351e649886fd5","_id":"lnd-grpc@0.4.4","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-wTBO/jvR7TaeIM3T+bZeiBW5rQ6I8+Uy22qUL69Wcy9qxpxvimeOZSTCcYwtldVKm0ic0xKuhibns1hUtaqbzQ==","shasum":"1111ebb0ec45967fefe9b021805d44364944d653","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.4.tgz","fileCount":134,"unpackedSize":1502894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2NKvCRA9TVsSAnZWagAAgUAP/iRZCe/I7qEVvt74Mbf+\nFbv7oLVsyiInsC9zdZRVWPSfxmmYxL4OazgubShDlUDCJXUuAOcoO8UQaf1l\n4m+DOAS6voM6WPIe9ffQC2n6aTDrZOO9A6e/nP5lh5BHgdwJk5jMn/6prWOR\n1AF+ggNPV6MfiWY05K2YaLzxj9cGkFF6Oxl3rG8/s36BIFOlZh6W6XVyEh3H\nNnxf9D/nUitHFQsrbK8mU6nG9gJYyrWEJd653JCNnDJkgmMuimBQMt2JyYco\nHGCgbSGaIX0ie33EJQr+mo5y4QfVVXSgzuxHb4OUSwgB13slnXtFp1KflJGq\njQVaIbApcNA/NmQoXQLlHBR4Ibfz66grStmih6Y9KhzoYV6DKUumYDimSK8U\nlpS4hn9Z0dYdCRUjgqAM3LfJg+RRluQdnc22IhkNO6Z21RtRvQrmpRYEXvMc\nSpD69Vlp8/u7Ty2p8K0wtIxR2V5qi4/CpPfCajth4wX2UdwpprL46EI9Lc0Q\nFtGmgx2O9b5lUqmCAXN6z5CpCIDQSXE9LQx2G5PG9h+6ucpKC+NhFAZJCfmp\ngq23yHryApBVuXu262/a4ybEXdh1mklLZpFo39QMtI4/ZF/kmxGfZmCxJSMG\nZ3WexTc2SRYNQZpqxVW7YMCnsUizECGqQsccosqvAn3OUbu79uaR2+9GklO5\nrvwM\r\n=6aV/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZ4xmcHM5xNqCpjNjhZ/AG1QSrMgBag7ACUaHLQcXEAAiEAm9n4LssF2a2pMhjA/caws4S60g65VPoPlEc8V6i+9Pw="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.4_1591268014673_0.03812993240695284"},"_hasShrinkwrap":false},"0.4.5":{"name":"lnd-grpc","version":"0.4.5","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.8.4","@babel/plugin-proposal-export-default-from":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/preset-env":"^7.9.0","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"1.0.2","babel-plugin-source-map-support":"2.1.1","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","lnd-binary":"^0.3.18","prettier":"1.18.2","prettier-eslint":"^9.0.1","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.0.1","source-map-support":"0.5.19","split2":"3.1.1","tap-spec":"5.0.0","tape":"^5.0.0","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^1.1.7","@ln-zap/proto-loader":"0.5.4","debug":"4.1.1","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.0.0"},"gitHead":"3f40a6c5a3bda64e8191eec994d6b2aabcc4beda","_id":"lnd-grpc@0.4.5","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-KIWjIW/5QS0LAISjFap9keD2H7Cbx6NfKsxpqDh7gZbj2pCzKQMNhwMRwAS79RUnY4KmPRbyv7PXkFVJtFLO/Q==","shasum":"46a962b7273b63f499a9fe9cf0f848060bba9935","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.5.tgz","fileCount":146,"unpackedSize":1679528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZJ0xCRA9TVsSAnZWagAAavMP/0ei1cNmtJFBZ3gPnFJL\niFSsXoYPIgJLZhAK+SI/JewNFGqGxtCMAE2cd7d20gZSqkyM8DkrZGuP2JWw\nwb6NfEQQxnPThXuYZJCZiU6WmYkVuEFAdDvQTd4NWPiUJj7H9i4Kck3gO4QZ\nXjWxEY0BluM6Ljkc21IL5TuUpJT3N6q+6Z+BjDED801H64zQqyXxwmJAZHuC\nffXpWo5+S151U4NQ9X10JkY+/2dfNaP8Nuj/c321jgBdtS+W27txZCiiR3O6\nl75uLh2qoyWNUBSCoHYo+QiUTdXvMMeEC8N9PyyQdVp341kd95KdltOhiSb6\n03sURuICPb1ZEXA3NYrk1i75vsOPAhXjrY1Hts4I0+RstnyRtgChtPE+ZD2y\nwHRiQOlWBAN3XtKhJ1P5zoAQsicVxUfHoh5VW+hbgjHkWbA+O0sCQFXEiJMq\nXi7E1RWuXC/LxRviCCdx9ci73GHx48kemSLa4NnnMkq92kjoEn1vjaN3eVen\n5tpZlL3qGcmhmIvab67NERD0C2bB1i8Z1xzvjALgrmY90VmrFIXjsm6/yPb7\nPaN2F+ELJVGuR3vK/dZsY2qfnfvgt2mVsopttKnpNU//R2rx6VOuceO/FgLM\nKmS0GHTEsPmDB3zQRKbYXYg+4gS4/6bkFZrHqCVRo2coBLRzwGub/kKnAVIL\nFmVs\r\n=FDAR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGhDuUvTb1LzXsoOEOtqDOOQkBsZpY9hJ+GMPx4U1zVJAiAQ1wf550IPg48O8AD8LbbxsZdOuxfGZcJsHOa968RHzA=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.5_1600429360838_0.8180907698713042"},"_hasShrinkwrap":false},"0.4.6":{"name":"lnd-grpc","version":"0.4.6","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.11.6","@babel/plugin-proposal-export-default-from":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/preset-env":"^7.11.5","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"^1.0.4","babel-plugin-source-map-support":"^2.1.3","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","lnd-binary":"^0.3.18","prettier":"^2.1.2","prettier-eslint":"^11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.1.0","source-map-support":"0.5.19","split2":"^3.2.2","tap-spec":"5.0.0","tape":"^5.0.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^1.1.7","@ln-zap/proto-loader":"0.5.4","debug":"^4.2.0","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.1.17"},"gitHead":"5a9c063c2144bfd3364a213fd094760189116ddc","_id":"lnd-grpc@0.4.6","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-dzHpS9lLyJE6xzGrqs/nCFkBOT3edqFibK+nL1ibCx9fuG5PXs7QBFrhwYgu4vbWva44xrxkz/JSHifPEBUH7A==","shasum":"5ef3e6429531a3f814a5ec4cfadc5d5c2dd7d4a0","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.6.tgz","fileCount":158,"unpackedSize":1857175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfedY7CRA9TVsSAnZWagAA81gQAILZh8zSbS/WPYi5MOoG\nL0eCwY1DABZDhOPIWXaSdEiD43wzo42cw3VRHTp+NeJErwfad2S8Fxzem9Ca\n7skAPue7xu1qoPYaZ6MJ1MmPihJhm6y9wtIe22RXDiqz/9rmW1fq/W0zkX18\nRLuZAGJVe2fF3wL28N8Uy57qcjexgVBPulUlQ/g4QW/ycSwpJyQ8BnRDOh34\nlo+A1B3zemWMlWBdjEuzN9E9pKpp9GlpayTRTB4tmBkKm5fXKS78EVMvplta\neEmpDJyez3W/dnA5M/9MTbloB3eH2js2Jh40VoFvcjP/aUtY1lmJ2BKu6nok\npkJ+cDViZonywZPnhDFpa+WPOMAotuh8arzI/kKIIDpok5r6+aCd00OUW4d6\nTT2OT94d0B6JiK2AIsV1mk6of1YiJSvlWZoKqPzwaf7NblfW58a3Cc7hXYIg\nHn/VsLWaun1jeITEz5DAgyd1gYjLpEXD7MR02DfNp6aEI6Dq3EHGDXJj36IX\nOPjBZDdj8vhFdwjqM4Oi3diESgw/PUDvZ7hgPeNOgdfC3Wv3O/DVZgM+m9Lk\nsBrWloc7tc2HiVjfTm+xRWYfD9CLzgpAFLiWK2x8HliJNQR7LdbjbZXZsASZ\n5vdE69HdSH2L/N/xZWRklAf5xgqvvB7Fy7jR6iKXFlXa/MQzWMInhtWWJI3W\nKHyt\r\n=44Rl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAs1CO0/IPtUrrPUt1B4AjXFBjjui11taflBHGjtWf9JAiAE8xx1EiBnELZ/r00xJqETnXOfPby4X7XAW+UcaQGo2Q=="}]},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.6_1601820218547_0.3853670927691617"},"_hasShrinkwrap":false},"0.4.7-beta.1":{"name":"lnd-grpc","version":"0.4.7-beta.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.11.6","@babel/plugin-proposal-export-default-from":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/preset-env":"^7.11.5","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"^1.0.4","babel-plugin-source-map-support":"^2.1.3","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","lnd-binary":"^0.3.18","prettier":"^2.1.2","prettier-eslint":"^11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.1.0","source-map-support":"0.5.19","split2":"^3.2.2","tap-spec":"5.0.0","tape":"^5.0.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"^1.2.0","@grpc/proto-loader":"^0.5.5","debug":"^4.2.0","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"^7.1.3","untildify":"4.0.0","validator":"^13.1.17"},"readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md","gitHead":"5cea30098fd3ad265956c34b69dd759d443fddb4","_id":"lnd-grpc@0.4.7-beta.1","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-8xMge64IwYHIrYiN/3zYp86aK05uN60v09fC7ORyqLBMSgVLuLYcGpKVWjnL6bP9QYCXuaYa+YyZ+N4YyVUr6Q==","shasum":"a897e5911f69cdb68d69f083f7bd60b379294717","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.7-beta.1.tgz","fileCount":170,"unpackedSize":2053088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3mToCRA9TVsSAnZWagAAHRQP/i9LCLRckGuWRTNgjjv0\n23C3o716peGu25l5TbyzYH5jvpzNSwzaMqqRkzxZKMQWgZ/zv2Nt/djijjB1\ncXLtHrp0n9lAgSpxf7XaMRB2xK0AN6cAMA4/RFlh19YaPF/PIhdNGU55sqIN\nhlJCTYIxbAa30YBzGf5w22+iogJ0NsSjUlU8o/aei7WLUvBeeUaJmOufgzNP\nQ9Jaft1laV37jZYm1dPgMasOl7qPwkwYXe1RowDtTFb8LJOC0jmu8vEhPWk1\nDl4KcU75Ylb6N4+yLtRjY4S+UI+eJO2SA3TL+codxl61ou0GmKHY4cAnGxQ5\nXoWPlGJTJ51kv9btmCvJiI4sQ3PQ+JnGWOzdnbdJCBLgXpC/KZy+253NG6QS\n9+nSB0SnxvXprVsSzhrQP7Q0kwZXcI6bpUH0hnfc0SkCIIQkIBncdyJpLXqm\nEyRBj8KHUVFZFCG3hoDcFvSrDdiXL4jl545EcK+pZffO/Vh8sOYYuD6M/Bh0\ngC0OchIAaaIa9pCY/wCNRp8RsdP6CEDLpj+UTkJqEEKa6+naHYNIXYJ6p6VQ\nn/G05XE/4IcEWr17hHJgRNt+kQ1SXg0baKjp/NeE7vQAMqqalbOjrR6cueEb\nzGy+jMevLLdr3csxuSH5sdP/3EPx6o33pPef3jhmZj6y4sQynuVCyx5AcukX\niJbp\r\n=eXf/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWBy1CjwLDNM1frBMneMbHvwyZi2KMk1JjoWPsPh9MjAiAoH6quEZ7xcm03lgyfJMLDGGlEEZyqUi2ZbJKppRm2Ug=="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.7-beta.1_1608410343566_0.5299759572147067"},"_hasShrinkwrap":false},"0.4.7":{"name":"lnd-grpc","version":"0.4.7","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.11.6","@babel/plugin-proposal-export-default-from":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/preset-env":"^7.11.5","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"^1.0.4","babel-plugin-source-map-support":"^2.1.3","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","lnd-binary":"^0.3.19","prettier":"^2.1.2","prettier-eslint":"^11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.1.0","source-map-support":"0.5.19","split2":"^3.2.2","tap-spec":"5.0.0","tape":"^5.0.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.2.5","@grpc/proto-loader":"0.5.6","debug":"4.2.0","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"7.1.3","untildify":"4.0.0","validator":"13.1.17"},"gitHead":"8de548391e9d38b8c2dedf755c7a7288cedf4859","_id":"lnd-grpc@0.4.7","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-/hzdQr5eDwjHAZ5Tcqt5VzzT5loHFZyVWbu9GtqXrBA6BuSN6YNtiaOy0rlLH0+8zEVQcUJPUfFhvAndB0o3QA==","shasum":"a69de1d0a9238c3baf14cedc1e9f1896db1e081d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.7.tgz","fileCount":170,"unpackedSize":2053441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEqlpCRA9TVsSAnZWagAA85EP/iRX2GoWzDtP6aZ735dj\nFk2NF/qzn8WWVXDS6hO19ktntKDAET/EswcRWEqnjTvVRrhPkZMsnXR2mm09\nP8W4u5gO32US2ZYgWGoI/8Zdu0F9meJC9bBhFxbR2pr2pkV2JzZQMSbrEXXR\nhuS1vezTih1pAGvVIF9UTGPMbhInKlvwC7xbg8eoccK4CTgqaneMOw/9tFX+\n9ne4aGETZoUr+NLrUOAElawbeMSZOjvJVsH0so9IdzZ9mL8z2YfV1Xz6OLLJ\nscO7TWhW1CfIwjBgHWrZpIad3Xjo1fJnXdlyL8uvbeLx9zbgA5rD5Q/GZK1m\n94q3/OPBdCdxZQHx0YqaUcctvbxFt1t+TPKJWQ9R/Gi+N2IpAYiZYiqjmp+t\nbfXYQ0EOuhyxzQkZZ0gAQYVXlTFne4VZe43uK40h4sLvE5umRq+mcZVPnAfb\nSMxP/LhixIxAtzS0jiVeUvWzYRxCbbMJYTnmhDSDRoa0ghzTihd3kdcyDEvE\ngThmHSC4c94qC4cadpqYMI82ivgSlmcxNg5pabGOkfW2q6HNobPM3Emi+SzP\n44eQYOirLQ157+7s746GbP0q5fMLnnEB4U9SRu3xtDofaoI3TepgAxwGIv92\nqJL1NAQT5fLMlEbu3bDbvOzFjlj68smNJa/WUpvqmGyWXmSVFMmKZovQtzWt\ndYRF\r\n=RNdJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs2SGyGFzRHVz4kDI2NH2Sfa79qTNFBo5XTXl2EMPg6AIgLHfc0q4ZkoIcuNL7ZF3+SOCp/tFT+T6OFtxb7acdQ2w="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.7_1611835753238_0.16267958760262613"},"_hasShrinkwrap":false},"0.4.8":{"name":"lnd-grpc","version":"0.4.8","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"^7.11.6","@babel/plugin-proposal-export-default-from":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/preset-env":"^7.11.5","babel-eslint":"^10.1.0","babel-plugin-add-module-exports":"^1.0.4","babel-plugin-source-map-support":"^2.1.3","babel-tape-runner":"3.0.0","core-js":"^3.6.4","cross-env":"^7.0.2","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","lnd-binary":"^0.3.19","prettier":"^2.1.2","prettier-eslint":"^11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"^3.0.2","sinon":"^9.1.0","source-map-support":"0.5.19","split2":"^3.2.2","tap-spec":"5.0.0","tape":"^5.0.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.2.5","@grpc/proto-loader":"0.5.6","debug":"4.2.0","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"7.1.3","untildify":"4.0.0","validator":"13.1.17"},"gitHead":"06bafc8b0e5aa89b56b063b3ecbda03875da758f","_id":"lnd-grpc@0.4.8","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-wu10CB+ANiXysXOCLrvpm7PLdsHAepgcxa7HTPcMYVRoU8I8aH8oLaxUvIWJQMBiHfS2vdOrfWTx1Cj/qGc6gQ==","shasum":"84e079f127682e157071dfae25695223da97a9cd","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.4.8.tgz","fileCount":170,"unpackedSize":2053869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgErilCRA9TVsSAnZWagAAhmoP/0zBFIK8Wk22o5P87Ia9\n0SiSXO4L625m5S0kkfBpIjY/Y4KS9bNhmYi11U0d3reap7qB4Gi2XUAYQu2i\nhVQdX6DiVXUxB9AGUmBd7XCuCsAgUw6mzft7laoPCgNLmsjOaAFSgA4oE8cG\nHuDhs2sYlN39C+YkhgvYynujkzFnn7cdgzOdgI2YwY+8nEasvpBSklMv2oxO\nA+FACFUOwzAa2OotOoP8WsCx+b1HHqKwrCw7Z+YLeTQW/uBwAeLibWBAq+zU\nqKZ/ZzYittgfq/+NNe9EIxLuhHRWKQSX7hr8hnzgOulmHtqb5w7ftF8djI2p\nvgkoN4oNHV3bhYzn/haaQzq6jmSA87K9TeDJSMvdFvs0HBtuVSWRVeE9D+gS\nL8jkPA0ggsoWt79mStEqWnN192y/83nZ9Yt8xGMAf5e49J7Q2M+2FHLG6xBt\niSIHniX4z6hJ0vIrvhD5b/82K6xYwu+YVw00AjneY/DRYlBOy2xgW8UsQMVp\n9GgiVeRfe0zYejGRq54jCdoz6WSRkR2cslZ0QF7ivdMKE78f9GKKRQ/+k7+a\nAquAD8wRPTxt5TFkfq01iUlIoASx/PV0LP63L8kjYQwwuRWSexGqsh5zHy2O\nZhOhEYGX/OGkOv3x/qvrUOruA9B+8iy2ebf1rWYxwcwl31x7Tvyc/WWLplT7\nsm0e\r\n=jHBw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3MUR78wNdP+h7x2TU9Um9krns8WJFWqEFxmtX1qSWogIhALco8KaSYflCqbvhu5H0AoqJSGceo26aW+fsevjrO8fF"}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.4.8_1611839653458_0.9750557008497984"},"_hasShrinkwrap":false},"0.5.0":{"name":"lnd-grpc","version":"0.5.0","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.14.8","@babel/plugin-proposal-export-default-from":"7.14.5","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/preset-env":"7.15.0","babel-eslint":"10.1.0","babel-plugin-add-module-exports":"1.0.4","babel-plugin-source-map-support":"2.1.3","babel-tape-runner":"3.0.0","core-js":"3.16.1","cross-env":"7.0.3","eslint":"7.32.0","eslint-config-prettier":"6.12.0","lnd-binary":"0.3.22","prettier":"2.3.2","prettier-eslint":"11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.2","sinon":"9.2.4","source-map-support":"0.5.19","split2":"3.2.2","tap-spec":"5.0.0","tape":"5.3.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.3.7","@grpc/proto-loader":"0.6.4","debug":"4.3.2","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.defaultsdeep":"4.6.1","semver":"7.3.5","untildify":"4.0.0","validator":"13.6.0"},"gitHead":"1da471926458303b73fde483f21b1b39b0c61eaa","_id":"lnd-grpc@0.5.0","_nodeVersion":"12.19.0","_npmVersion":"7.13.0","dist":{"integrity":"sha512-FXWAA7uN6ImJM2IFojrfYiBkt0FT4q56/+NtvAilKJpsh6FXtY02O+BWY7nTISKDdRzzKlr6WdCvEnqa1HWF+A==","shasum":"b1547f4ea86d3e7419d9cc56c0dc0a176287834d","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.5.0.tgz","fileCount":198,"unpackedSize":2490178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF/sNCRA9TVsSAnZWagAA8qQQAIFB5WEjcxduNISuiJPU\n83xMAWyy03/P6Lceo/SiCVKjLe7zI8ebND/VXqnOmb5ZMsTXcBVYGb1B/ZOY\nwbThPNB+41SN5a4SUMaEMFE9+6GlyLqGlUm0yV1PnhvGlOV9wwl77E9dbCXH\nSDv1Ru5Q9OWKOaM1/+1TufMS7cICqTQqulWWVpu6xzcm6pnKrjfAVvoqzO2W\nCFkOrrlY85NdqEef9Nf75IJJMwDogF3sRbFhPHCA3AmtkRtutqbHqYdvLFOS\nGNrWOB9WvbIc+VMNZFzdanLpnlTXLBal4fOhGGxI1Gm7fR504rCERsicB2Qg\nu82dBRc86H+a7mw5T7IZEvaoHVXtKAILvum8POiBROJ03biM+aWsnGxwVf05\nKRjxQCtfLt7NYB6m5u+kZgC77qbDhmgBE8EbyHSy5gck4EPouo2+vtUD9elv\n/dIM+2m7pNtYYVnrt/ppGssWy6achdVOXRAJMsSik4wep7xeoJ11yGYpUNkD\nV97+7FfPLARfNAGIogZnPyr3dGr3KnJsyO26XKug1uzM3XoU6tyc+6mLp8Qb\nItgluzJSbMCJ8vQrMesU/znjtvtrlIz8fKzWdXS0z/IDVbHJmhWv9Q+p79PQ\nGX3vpFPrZjlXkPXhOZhMpfdgx9chFhr21CuTT5PQybZ4C0USTrsQiAm4KYWc\nvU6i\r\n=LJSv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDerdJhb3FPncxf9iJrJbsN30sNbklIccYerInQgtWeiAiAQ2T4T9et/XcoB3OGydMFNDpl1o2FEdFblqPlnO0BX7w=="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.5.0_1628961549663_0.3414484016358532"},"_hasShrinkwrap":false},"0.5.1":{"name":"lnd-grpc","version":"0.5.1","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.14.8","@babel/plugin-proposal-export-default-from":"7.14.5","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/preset-env":"7.15.0","babel-eslint":"10.1.0","babel-plugin-add-module-exports":"1.0.4","babel-plugin-source-map-support":"2.1.3","babel-tape-runner":"3.0.0","core-js":"3.16.1","cross-env":"7.0.3","eslint":"7.32.0","eslint-config-prettier":"6.12.0","lnd-binary":"0.3.23","prettier":"2.3.2","prettier-eslint":"11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.2","sinon":"9.2.4","source-map-support":"0.5.19","split2":"3.2.2","tap-spec":"5.0.0","tape":"5.3.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.3.7","@grpc/proto-loader":"0.6.4","debug":"4.3.2","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.clonedeep":"4.5.0","lodash.defaultsdeep":"4.6.1","semver":"7.3.5","untildify":"4.0.0","validator":"13.6.0"},"gitHead":"99aa28e747a9cecc85d2cc6142f76c31b8c35279","_id":"lnd-grpc@0.5.1","_nodeVersion":"12.19.0","_npmVersion":"7.13.0","dist":{"integrity":"sha512-sDZ5uNXKTBKSb0V+y8c7PZvxOZJq+hi6dED9pnBPOnnA/CsNXuL9f14AJjUhgPS/3W4XWqVj/CJI2sWMULLOrA==","shasum":"b189f4b100229b0b29c831affd9f26a254184ac8","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.5.1.tgz","fileCount":211,"unpackedSize":2726038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnMFNCRA9TVsSAnZWagAAOasQAJ+2eKbP99P2D/AZyKJN\nyor7coy3ygqEdikNfvGDC9R0xMl8iGB9zrMhKZFRxR1iW3uOmo44DGranU0/\nFFPu/6PvUTmcYuJLIb8SjIp7BKe4TrbdUae6q/9H3gx63WEuSrvqc2p/6Ir+\nMzwLGkli5aYcWXWq2I+X0/nJMEY4dOS/I7oV2EahYbr21QFEd22sTf9kGXrV\nieA2ud+wt4VZKDFVFE+LOvZbLpKRC0qVQxN4foZq62Bdt0DcFJFrfIp+EF4W\nmU8an8gMPeE2v3fqzbhTMZLJOo7n67zn1PozSrwuR2EDU5fCNUD+t18jcX3G\nishDtfKGrl7k9XC6V7M2hAox9uNmH7rR69J6kjuuYiuGmsGGpsUvavr3ItcB\ndrZoKlaEG+78NpcDtnIyw9vpoyujvoFxPcrjP1fn4ePciz27r4U8lllt8jOR\nRv2qNLd8TrKtuLGqiKMEGLCvA22hEeMjAn7pfXp2vVzstROn6WPK+csgypMF\nl4ALBvxkvSW9V8YTKSSTuRe9QF5bEyO+lgOhrclbZeFnIXJwAc3f1LoXE/tM\naQwBecR1F9YkPIRvbsyGU6PHKKk8WRqVxG0dYPjpdrgJSWAZ8Glq+zMAcObW\n8HE87Y2BHYDgM1L4eiLnxaspRsVfKFPDQ0QWW4GiLk89oUbkrleZmEAW552A\n4sng\r\n=6fDk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJAkksrY4z0OS5o5HQKw6PfqjPhwxOvhINeXHTTGYLZwIgQV/iscF3P0uzlVWBWCp0BKWP4VCXiZiYqQsiik+bKek="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.5.1_1637663053717_0.7944262550892656"},"_hasShrinkwrap":false},"0.5.2":{"name":"lnd-grpc","version":"0.5.2","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.14.8","@babel/plugin-proposal-export-default-from":"7.14.5","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/preset-env":"7.15.0","babel-eslint":"10.1.0","babel-plugin-add-module-exports":"1.0.4","babel-plugin-source-map-support":"2.1.3","babel-tape-runner":"3.0.0","core-js":"3.16.1","cross-env":"7.0.3","eslint":"7.32.0","eslint-config-prettier":"6.12.0","lnd-binary":"0.3.24","prettier":"2.3.2","prettier-eslint":"11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.2","sinon":"9.2.4","source-map-support":"0.5.19","split2":"3.2.2","tap-spec":"5.0.0","tape":"5.3.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.3.7","@grpc/proto-loader":"0.6.4","debug":"4.3.2","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.clonedeep":"4.5.0","lodash.defaultsdeep":"4.6.1","semver":"7.3.5","untildify":"4.0.0","validator":"13.6.0"},"gitHead":"df6b429ce57c7e26f666073a24f282d7de574e31","_id":"lnd-grpc@0.5.2","_nodeVersion":"12.19.0","_npmVersion":"7.13.0","dist":{"integrity":"sha512-es7fuR4dZBdVMGxCfmnyWFVQWRlyt/4My4aVIvK3nBxFG5+I4dwK185sttWsChskUdoMsblE4rkrduznYgEYng==","shasum":"4c0f32b062b0329fb3c272c6163057430fc64841","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.5.2.tgz","fileCount":224,"unpackedSize":2959851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtcf3CRA9TVsSAnZWagAAF0wQAIeVjkbSTYWGZ284sD7q\ng+vqjbJC+4SoEPvOSTM32RfZQwKCDdsmo6rUmEdhBouFgTAtSjW97zSo3dDs\nGuvyZMLtu6TePN1UAvm9wKIlNY/+zEQc3fSiiIlC6eGfBjxY0Ay7I6WIxlEP\nQuqymWs31DUSxjbcYenNCbUyyNkm9V4bsj2uvAg7oCrLddoKkXqrR55zlqYP\n11Z3qarlklx4JhOblHztGwR+nxHBeM4jofC4TR0/RSxHykxelanzL8+cPhMp\n/e3nGNh8fqmFLWSKk1pyP0ewaKuDYjBVliB2bd5MBpUhFsqQyUNFgYvqLzG7\n5kmKRC5+n0Km9RxSRh2vyGYeb6V8tvPfj+1oRKeE+bzQnHVOlz6zP6pL4TuX\ntVeZGB4+jLwQV5WaSsy/Ho71pZ2yN67jyV6rZqW+C5ulfbbnM2zhYUR/z02F\nVyLOrUcvC2UMpxPdxSSVEPr4V6fWXH2woWdhkuRxHM2Cn+NMd43JoyHpbyP5\nFFeqZPuwgCm4bslujMz6FMpLzL3BlVhHjRkxRr1SASsHIhh5KRb6uCORSxQv\nE7ZjCA0IY+6Rx8YqM20Cc5cKCReQ2xa0+Su0jvTR837i2Fu8kqerav+sM0p0\n2IwkoD6EEG7ePljaRr4veKRGNNGiu5GLRgLQFiT1B1+JXi/w73PXLXE+mVaC\nsjj0\r\n=a0RI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXaFXrJNieUKJWdR9YqvbKO6RWT3XpuQu1/NWHrxtmmAIgA3Lyfr5X4vPbzrAgkS4JqzYs6QsZt4BcTjKPntFZnw8="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.5.2_1639303159321_0.15502897028053853"},"_hasShrinkwrap":false},"0.5.3":{"name":"lnd-grpc","version":"0.5.3","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf -r ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.14.8","@babel/plugin-proposal-export-default-from":"7.14.5","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/preset-env":"7.15.0","babel-eslint":"10.1.0","babel-plugin-add-module-exports":"1.0.4","babel-plugin-source-map-support":"2.1.3","babel-tape-runner":"3.0.0","core-js":"3.16.1","cross-env":"7.0.3","eslint":"7.32.0","eslint-config-prettier":"6.12.0","lnd-binary":"0.3.24","prettier":"2.3.2","prettier-eslint":"11.0.0","prettier-eslint-cli":"5.0.0","rimraf":"3.0.2","sinon":"9.2.4","source-map-support":"0.5.19","split2":"3.2.2","tap-spec":"5.0.0","tape":"5.3.1","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.3.7","@grpc/proto-loader":"0.6.4","debug":"4.3.2","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.clonedeep":"4.5.0","lodash.defaultsdeep":"4.6.1","semver":"7.3.5","untildify":"4.0.0","validator":"13.6.0"},"gitHead":"28a245004f9f4324ae52e58382c730b42c52cd2f","_id":"lnd-grpc@0.5.3","_nodeVersion":"12.19.0","_npmVersion":"7.13.0","dist":{"integrity":"sha512-LGC+swl9XWoNegQANvwE1sX479e4yV9XQGunb4gTzDNQN5EkrkI+cvqtzUpDnrlGkpw1sZ8f5HGReEgBnelAQw==","shasum":"712f02bb8df61c640c102600746c0f8607a5e4d5","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.5.3.tgz","fileCount":224,"unpackedSize":2960121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3WroCRA9TVsSAnZWagAA7kIP/Ag3oCdknzD6slu/UUap\nV7DOup5Q5G3ffkgyooCx/jGNbBjOi2jz5Ed/DUoVfgrtlRQTsYv/mWZh1iXW\nJsHtxpyrK2jesjGeYm5Z81Q0yqP1K/qgYLMz8djnAEXwuJ4/8MwsNOQeapU8\nclfhzBrklwHGhqeu7GwMD/Y/b9VgHn5yXE+Rn1FK1Y7+UHXp+z/nwu1UYrbb\nYQYQrFIogQ0Z8Jx0lN0ygeUwuCpCuLFC4SPEmdWYn91J5tB/VOTPuMjHzvLo\nOaO9qCLmY5xmAqMw204v5RSgO+4zrsEEqsYw60bEGgWTMLGUa6ZWZGQ+6Iza\nJ/d1A2oMuEW7IWYbu+l3CklILkZS9952nG0VapTHqR5zdpIWfe0TN1jpI2la\nBexTai8BFEGPyZTwK/y6Bc+CNISP63icIq9bMgH48GoWKiKPtaB7hqLZKb/J\npqbSxBHSuJv25N5qYaKMap8zJx36KE3uhIGTfLUCPkOSXYFQVZX3woRTgy3I\nglGns8YFDYZljlWoP/yhKA3gOvdNfDFAVLokvZDrk78nTxUbDAkkzAi+UCQB\npEKuJX/MRXRWGaODSPtbQBB7iwcWJfMTTpsLVPBjkAI8Nn0xsYzJzGnEHFr5\n5K0mgMmk8hWT4y9IXHXS8aZer+LCfU94KnifgUpliQJn0QlFs2C/+gZcOAUg\ndPKc\r\n=dZa7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAD4f3szd2Rc6bVM73PAXWgZ3WJ9eAnF8B9gW/b5scNRAiA/IMulv65Rd7GFx+a9Cj0ngcknmp9toWiFSSCJt9/Grw=="}]},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.5.3_1641900776189_0.7579442178554592"},"_hasShrinkwrap":false},"0.5.4":{"name":"lnd-grpc","version":"0.5.4","description":"Repository of lnd rpc protocol files and utilities for working with them","main":"./dist/index.js","engines":{"node":">=6.0.0","npm":">=4.0.0"},"scripts":{"test":"DEBUG=lnrpc* babel-tape-runner test/*.js | tap-spec","test-tor":"DEBUG=lnrpc* TOR=true babel-tape-runner test/grpc.test.js | tap-spec","lint":"prettier-eslint --write \"$PWD/**/*.{js,json,md}\"","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir dist","clean":"rimraf ./dist","preversion":"npm test","prepack":"npm run build"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"keywords":["bitcoin","lightning-network","lnd","grpc"],"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"license":"MIT","bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"homepage":"https://github.com/LN-Zap/node-lnd-grpc","devDependencies":{"@babel/cli":"7.20.7","@babel/plugin-proposal-export-default-from":"7.18.10","@babel/plugin-proposal-object-rest-spread":"7.20.7","@babel/preset-env":"7.20.2","babel-eslint":"10.1.0","babel-plugin-add-module-exports":"1.0.4","babel-plugin-source-map-support":"2.2.0","babel-tape-runner":"3.0.0","core-js":"3.28.0","cross-env":"7.0.3","eslint":"8.34.0","eslint-config-prettier":"8.6.0","lnd-binary":"0.3.26","prettier":"2.8.4","prettier-eslint":"15.0.1","prettier-eslint-cli":"7.1.0","rimraf":"4.1.2","sinon":"15.0.1","source-map-support":"0.5.21","split2":"4.1.0","tap-spec":"5.0.0","tape":"5.6.3","tape-promise":"4.0.0"},"dependencies":{"@grpc/grpc-js":"1.3.7","@grpc/proto-loader":"0.6.4","debug":"4.3.4","get-port":"5.1.1","javascript-state-machine":"3.1.0","lndconnect":"0.2.10","lodash.clonedeep":"4.5.0","lodash.defaultsdeep":"4.6.1","semver":"7.3.8","untildify":"4.0.0","validator":"13.9.0"},"gitHead":"5a1b74ea02cf5201c951373d4c7db8c6fa54954d","_id":"lnd-grpc@0.5.4","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-wZ6t1WJ17vtA/8FqOxIWdits/Qxs21LRqHfNIxNxSCOLyi+qDQVxH4Hu7pTpV8Yg/FowA7Zytw6dbO6nPKTgew==","shasum":"38830a296d8194c5f1c7d3232c717084a8fdbe93","tarball":"https://registry.npmjs.org/lnd-grpc/-/lnd-grpc-0.5.4.tgz","fileCount":263,"unpackedSize":3676111,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6Sj5T4VrYVep1EF2a6cichXu9e2a9YBS6B8uJUIsDMQIhAL3cCYTWum1sz6uSz/DhKWuj+ni3IwoW/r2O6G2exnjY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7rMzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWMA/9H4LuFaUE7ycgl6VCGuxpvDfrCYivr5REBfcskrSPi/rSOVFu\r\nJDHiJvJN8Wrat6dhs/4q9G3aPTc8Uv54MLvL789pB49n4yWaXBp5PoxBCDI8\r\ntvpLbm1kvbT4ZlXtwDNzo7hhvPJMPZV/zqHRRq1HG8xSY28CEmvj8xxHtURV\r\nTV7yXXEgqb/+h/bc2RqqBw6ktHO2YIYkdPQrycY4MhDwm+GMXHqoXRxbjHa5\r\nhoEB2I3WQoymhdaOLyqkcP0ILeidEJojIbHyc5JyMJDqye/Y0Bu/VNmpzmZJ\r\nmetaMJYTi4FL4LUAjYqTzgfNhX5UbUfJbLc3SPsSteK+KjPCSEkz6Qd3Sx40\r\nZbiL1GL4xIB688Mg9HIcTOIl5ZX+PCbjCeluSYLW5JTSA87oZVdcyOtReyDt\r\nk74y62rr5gFhd69HkZzd23bPjXwLiK8DIgJcUOQxWkYoOvBqJfgzuR2U/FEp\r\npREW+X5sNauYyipfiOsUg+D01RysCcTRxJROXyOspii8/dmv3lBMehxIciHK\r\nWK7Y4WiRojIV+EppcNTzkBNIHSIBPzyFqH2l89G7/oeCjCq8m4QdBvsrKp1w\r\n6AKtSzsDdNFaauipFOplLt/hKDVO1pNoraD8OQRV3gABgimyRmKVi0pxxnLu\r\nrSCvnyBGTZ1ir1w9tm/g4t0JZ0Idyrnal44=\r\n=u34W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"},"directories":{},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lnd-grpc_0.5.4_1676587827391_0.32147850772930076"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-31T13:18:21.720Z","0.1.0":"2019-01-31T13:18:21.812Z","modified":"2023-02-16T22:50:27.785Z","0.1.1":"2019-01-31T13:26:40.371Z","0.1.2":"2019-01-31T13:32:12.629Z","0.1.3":"2019-01-31T19:53:31.050Z","0.1.4":"2019-02-03T22:37:02.082Z","0.1.5":"2019-02-07T01:27:27.809Z","0.1.6":"2019-02-07T09:55:49.050Z","0.1.7":"2019-02-25T11:52:49.658Z","0.1.8":"2019-03-11T14:05:33.403Z","0.1.9":"2019-03-14T07:24:12.428Z","0.1.10":"2019-03-17T17:18:34.173Z","0.1.11":"2019-03-18T20:20:45.058Z","0.1.12":"2019-03-21T15:25:16.959Z","0.1.13":"2019-03-21T16:44:18.079Z","0.1.14":"2019-03-21T19:15:27.078Z","0.1.15":"2019-03-21T19:23:51.284Z","0.1.16":"2019-03-21T22:46:12.022Z","0.1.17":"2019-03-22T15:27:10.438Z","0.1.18":"2019-03-22T15:42:06.657Z","0.1.19":"2019-03-22T15:48:25.370Z","0.1.20":"2019-04-05T12:34:34.011Z","0.1.21":"2019-04-05T13:10:33.492Z","0.1.22":"2019-04-12T12:04:37.379Z","0.2.0-beta":"2019-05-02T08:34:13.800Z","0.2.0-beta.2":"2019-05-02T08:39:10.609Z","0.2.0-beta.3":"2019-05-02T09:46:55.996Z","0.2.0-beta.4":"2019-05-02T10:21:16.406Z","0.2.0":"2019-05-02T17:42:40.268Z","0.2.1":"2019-05-03T08:23:16.030Z","0.2.2":"2019-05-03T20:33:57.281Z","0.2.3":"2019-05-03T21:13:42.598Z","0.2.4":"2019-05-06T07:26:04.370Z","0.2.5":"2019-05-08T22:22:45.428Z","0.2.6":"2019-05-15T12:47:24.237Z","0.2.7":"2019-05-17T18:33:11.290Z","0.2.8":"2019-05-20T20:37:12.327Z","0.2.9":"2019-05-21T15:29:20.429Z","0.2.10":"2019-06-12T08:32:51.679Z","0.3.0-0":"2019-06-24T13:07:12.008Z","0.3.0-1":"2019-06-24T13:14:06.738Z","0.3.0-2":"2019-06-25T19:23:57.635Z","0.2.11":"2019-06-27T13:14:32.041Z","0.3.0-3":"2019-06-27T13:20:46.879Z","0.3.0-3.1":"2019-07-05T18:11:47.978Z","0.2.12":"2019-07-08T09:08:58.190Z","0.3.0-4":"2019-07-08T13:49:02.664Z","0.2.13":"2019-07-08T13:50:58.273Z","0.2.14":"2019-07-25T22:39:32.596Z","0.3.0-beta.1":"2019-07-26T07:59:01.413Z","0.3.0-beta.2":"2019-07-26T14:25:37.740Z","0.3.0-beta.3":"2019-07-26T15:18:08.163Z","0.2.15":"2019-08-02T08:44:07.540Z","0.2.16":"2019-08-02T21:36:38.722Z","0.3.0-beta.4":"2019-08-08T08:29:38.693Z","0.3.0-beta.5":"2019-08-14T10:41:19.991Z","0.2.17":"2019-09-07T11:33:04.293Z","0.3.0":"2019-09-07T11:39:22.033Z","0.3.1-alpha-zap.1":"2019-10-01T08:17:06.103Z","0.3.1-alpha-zap.2":"2019-10-01T10:00:19.265Z","0.3.1":"2019-10-10T15:17:14.248Z","0.3.2":"2019-10-10T15:53:09.929Z","0.3.3":"2019-10-11T07:37:23.728Z","0.3.4-beta.1":"2019-10-18T08:28:44.322Z","0.3.4-beta.2":"2019-10-18T20:47:43.079Z","0.3.4-beta.3":"2019-10-18T20:53:41.522Z","0.4.0-beta.1":"2019-10-25T09:29:56.434Z","0.3.4":"2020-02-04T13:33:50.111Z","0.4.0-beta.2":"2020-04-01T07:48:17.777Z","0.4.0-beta.3":"2020-04-07T15:57:11.121Z","0.4.0-beta.4":"2020-04-19T11:34:16.764Z","0.4.0-beta.5":"2020-04-19T12:44:52.580Z","0.4.0-beta.6":"2020-04-19T13:16:23.227Z","0.4.0-beta.7":"2020-04-23T18:15:09.251Z","0.4.0-beta.8":"2020-04-26T12:39:17.623Z","0.4.0":"2020-05-03T12:29:57.137Z","0.4.1":"2020-05-03T14:40:54.406Z","0.4.2":"2020-05-22T20:54:46.021Z","0.4.3":"2020-05-22T21:35:52.269Z","0.4.4":"2020-06-04T10:53:34.859Z","0.4.5":"2020-09-18T11:42:40.987Z","0.4.6":"2020-10-04T14:03:38.741Z","0.4.7-beta.1":"2020-12-19T20:39:03.752Z","0.4.7":"2021-01-28T12:09:13.670Z","0.4.8":"2021-01-28T13:14:13.593Z","0.5.0":"2021-08-14T17:19:09.849Z","0.5.1":"2021-11-23T10:24:13.876Z","0.5.2":"2021-12-12T09:59:19.477Z","0.5.3":"2022-01-11T11:32:56.500Z","0.5.4":"2023-02-16T22:50:27.631Z"},"maintainers":[{"name":"mrfelton","email":"tkp@kirkdesigns.co.uk"}],"description":"Repository of lnd rpc protocol files and utilities for working with them","homepage":"https://github.com/LN-Zap/node-lnd-grpc","keywords":["bitcoin","lightning-network","lnd","grpc"],"repository":{"type":"git","url":"git+https://github.com/LN-Zap/node-lnd-grpc.git"},"author":{"name":"Tom Kirkpatrick","email":"tkp@kirkdesigns.co.uk","url":"http://www.kirkdesigns.co.uk/"},"bugs":{"url":"https://github.com/LN-Zap/node-lnd-grpc/issues"},"license":"MIT","readme":"# lnd-grpc\n\n[![](https://img.shields.io/badge/project-LND-blue.svg?style=flat-square)](https://github.com/lightningnetwork/lnd)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Dependency Status](https://david-dm.org/LN-Zap/node-lnd-grpc.svg?style=flat-square)](https://david-dm.org/LN-Zap/node-lnd-grpc)\n[![Build Status](https://travis-ci.org/LN-Zap/node-lnd-grpc.svg?branch=master)](https://travis-ci.org/LN-Zap/node-lnd-grpc)\n\n> Easy to use gRPC wrapper for lnd. ⚡️\n\nThis package provides and easy to use gRPC wrapper for lnd.\n\n- Supports all lnd versions\n- Supports all lnd gRPC sub services\n- Automatic async/promise support\n- Automatic lnd version detection\n- [lndconnect](https://github.com/LN-Zap/node-lndconnect) support\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nnpm install lnd-grpc --save\n```\n\nThen import in your code:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n```\n\n## Usage\n\n### Initialize\n\nCreate a new instance of the service using the `LndGrpc` constructor:\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc(options)\n```\n\nThe constructor accepts the following options:\n\n- **lndconnectUri** {[string]}:  \n  An [lndconnect uri](https://github.com/LN-Zap/node-lndconnect) that encodes the lnd connection details (host, cert, and macaroon). If `lndconnectUri` is set it will override the `host`, `cert`, and `macaroon` properties (below)\n\n- **host** {[string]}:  \n  Hostname and port of lnd gRPC. (extracted from `lndconnectUri` if provided)\n\n- **cert** {[string]}:  \n  TLS certificate of the lnd node. This can be a path to the TLS cert or PEM ended cert data. (extracted from `lndconnectUri` if provided)\n\n- **macaroon** {[string]}:  \n  Macaroon for the lnd node. This can be a path to the macaroon file or hex encoded macaroon data. (extracted from `lndconnectUri` if provided)\n\n- **waitForCert** {[boolean|number]}:  \n  Time (ms) to wait for TLS certificate before aborting connection attempt.\n\n  This is useful in the case where you can not guarantee that the TLS certificate exists at the time when you attempt to establish the connection.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **waitForMacaroon** {[boolean|number]}:  \n  Time (ms) to wait for macaroon before aborting connection attempt.\n\n  This is useful in the case where you are connecting to a local node where a wallet does not already exist. After calling lnd's `initWallet` method to create a new wallet, it can take some time for lnd to initialize and create the wallet's macaroons.\n\n  Set to `true` to use the default of 10 seconds.\n\n- **version** {[string]}:  \n  If you know which version of lnd you are connecting to in advance you can specify that here.\n\n  By default, we use the latest proto files available when connecting to lnd. As soon as the wallet is unlocked, we call lnd's `getInfo` method in order to determine which version of lnd is running. If needed, we will reconnect using a more appropriate proto version.\n\n- **protoDir** {[string]}:  \n  Custom path to rpc proto files. [advanced](#advanced-settings)\n\n- **grpcOptions** {[Object]}:  \n  Custom gRPC options. [advanced](#advanced-settings)\n\n**Minimal example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n})\n```\n\n**Complete example:**\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  version: '0.6.0-beta',\n  waitForMacaroon: 30 * 1000, // 30 seconds\n  waitForCert: true,\n  protoDir: '~/path/to/proto/files', // useful when running in electron environment, for example\n})\n```\n\n### Connect\n\nAfter initializing a new `LndGrpc` instance, call its `connect` method to establish a connection to lnd.\n\n```js\nconst grpc = new LndGrpc({ host, cert, macaroon })\nawait grpc.connect()\n\nconsole.log(grpc.state) // active|locked\n```\n\nAfter establishing a connection you can access all available lnd gRPC interfaces under the `services` property.\n\n### Unlock & Activate\n\nIf the wallet state was determined to be `locked` when the connection was established you must first unlock the wallet and then activate the Lightning service in order to access methods on the Lightnig service or any other grpc subservice that requires the node to be unlocked.\n\n```js\nconst { WalletUnlocker } = grpc.services\nif (grpc.state === 'locked') {\n  await WalletUnlocker.unlockWallet({ wallet_password: Buffer.from('your wallet password') })\n  await grpc.activateLightning()\n\n  console.log(grpc.state) // active\n}\n```\n\n### Disconnect\n\nDisconnect from all gRPC services. It's important to disconnect from the lnd node once you have finished using it. This will free up any open handles that could prevent your application from properly closing.\n\n```js\nawait grpc.disconnect()\n```\n\n### Complete Example\n\n```js\nimport LndGrpc from 'lnd-grpc'\n\nconst grpc = new LndGrpc({\n  host: 'localhost:10009',\n  cert: '~/.lnd/tls.cert',\n  macaroon: '~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon',\n  waitForCert: true,\n  waitForMacaroon: true,\n})\n\n// Establish a connection.\nawait grpc.connect()\n\n// Do something cool if we detect that the wallet is locked.\ngrpc.on(`locked`, () => console.log('wallet locked!'))\n\n// Do something cool when the wallet gets unlocked.\ngrpc.on(`active`, () => console.log('wallet unlocked!'))\n\n// Do something cool when the connection gets disconnected.\ngrpc.on(`disconnected`, () => console.log('disconnected from lnd!'))\n\n// Check if the wallet is locked and unlock if needed.\nif (grpc.state === 'locked') {\n  const { WalletUnlocker } = grpc.services\n  await WalletUnlocker.unlockWallet({\n    wallet_password: Buffer.from('mypassword'),\n  })\n  // After unlocking the wallet, activate the Lightning service and all of it's subservices.\n  await WalletUnlocker.activateLightning()\n}\n\n// Make some api calls...\nconst { Lightning, Autopilot, Invoices } = grpc.services\n// Fetch current balance.\nconst balance = await Lightning.walletBalance()\n// Enable autopilot.\nconst modifyStatusRes = await Autopilot.modifyStatus({ enable: true })\n// Cancel an invoice.\nconst cancelInvoiceRes = await Invoices.cancelInvoice({\n  payment_hash: '3bba3a6cdbd601dbf096784115f45d314c0f51ffb69ae6d338e229cb825afbe1',\n})\n\n// Disconnect from all services.\nawait grpc.disconnect()\n```\n\n### States\n\nThe grpc service will be in one of the following states at all times.\n\n**ready**\n\nThe `ready` state is the initial state of all new lnd-grpc service instances and indicates that a connection has not yet been established.\n\n**locked**\n\nThe `locked` state indicates that a connection has been established and the node was last known to be in a locked state.\n\n**active**\n\nThe `active` state indicates that a connection has been established and the node was last known to be in an active (unlocked) state.\n\n### Events\n\n**locked**\n\nThe `locked` event is emitted when it has been determined that the wallet is locked and the `WalletUnlocker` interface is active.\n\n**active**\n\nThe `active` event is emitted when it has been determined that the wallet is unlocked and the `Lightning` interface is active.\n\n**disconnected**\n\nThe `disconnected` event is emitted after calling `disconnect`, once the connection has been fully closed.\n\n### Helpers\n\n**is**\n\nChecks wether the service is in a given state.\n\nExample:\n\n```js\nassert(grpc.is('active')) // test wether the service state is active.\n```\n\n**can**\n\nChecks wether the service can carry out a given state transition.\n\nExample:\n\n```js\nassert(grpc.can('activateLightning')) // test wether the service can activate the lightning service\n```\n\n**waitForState**\n\nWait for the service to enter a particular state.\n\nExample:\n\n```js\nawait grpc.waitForState('active')\nconsole.log(grpc.state) // active\n```\n\n### Advanced settings\n\n**gRPC Options**\nx\nUnder the hood we use the [`grpc-js`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) library for the gRPC handling. By default we use the following options to control its behaviour.\n\n```js\n{\n  keepCase: true,\n  longs: Number,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n}\n```\n\n(Note: when dealing with channel IDs and other fields that can exceed JavaScript's Number.MAX_SAFE_INTEGER, loss of precision can occur. This can be avoided by using `longs: String` on the above gRPC options and dealing with `String`s instead of `Number`s.)\n\nThese settings can be overridden by passing `grpcOptions` to the constructor. Custom settings will be merged in with the above defaults.\n\n```js\nnew LndGrpc({\n  host: 'localhost:10009',\n  grpcOptions: {\n    keepCase: false,\n  },\n})\n```\n\n**gRPC Proto Files**\n\nThis repository hosts a copy of the lnd gRPC proto files for all official lnd releases. We attempt to select the most appropriate version of these files when connecting by calling lnd's `getInfo` method and parsing the version string.\n\nIn some situations you may want to load these files from an alternate location - such as in an Electron environment where you may need to bundle up the proto files as additional package resources for distribution. You can tell us to read the proto files from an alternate location by passing the `protoDir` option to the constructor.\n\n### Testing\n\nRun the tests suite:\n\n```bash\n  npm test\n```\n\nRun with debugging output on:\n\n```bash\nDEBUG=lnrpc* npm test\n```\n\n## Maintainers\n\n[@Tom Kirkpatrick (mrfelton)](https://github.com/mrfelton).\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/LN-Zap/node-lnd-grpc/issues/new) or submit PRs.\n\nlnd-grpc follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.\n\n## License\n\n[MIT](LICENSE) © Tom Kirkpatrick\n","readmeFilename":"README.md"}