astra-lightning 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1085) hide show
  1. package/.gitattributes +2 -0
  2. package/.tm_properties +1 -0
  3. package/.yarn/cache/@babel-code-frame-npm-7.25.7-40a9f53f43-f235cdf9c5.zip +0 -0
  4. package/.yarn/cache/@babel-helper-validator-identifier-npm-7.25.7-1c758f0472-062f55208d.zip +0 -0
  5. package/.yarn/cache/@babel-highlight-npm-7.25.7-308b20da71-b6aa45c5bf.zip +0 -0
  6. package/.yarn/cache/@grpc-grpc-js-npm-1.12.2-733ec8eabe-ee51317f92.zip +0 -0
  7. package/.yarn/cache/@grpc-proto-loader-npm-0.7.13-be5b6af1c1-399c1b8a46.zip +0 -0
  8. package/.yarn/cache/@jest-schemas-npm-29.6.3-292730e442-910040425f.zip +0 -0
  9. package/.yarn/cache/@js-sdsl-ordered-map-npm-4.4.2-158f6c6b74-a927ae4ff8.zip +0 -0
  10. package/.yarn/cache/@noble-hashes-npm-1.5.0-87c768d742-9cc031d5c8.zip +0 -0
  11. package/.yarn/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-a970d595bd.zip +0 -0
  12. package/.yarn/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-012480b5ca.zip +0 -0
  13. package/.yarn/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-190c643f15.zip +0 -0
  14. package/.yarn/cache/@protobufjs-aspromise-npm-1.1.2-71d00b938f-011fe7ef08.zip +0 -0
  15. package/.yarn/cache/@protobufjs-base64-npm-1.1.2-cd8ca6814a-67173ac34d.zip +0 -0
  16. package/.yarn/cache/@protobufjs-codegen-npm-2.0.4-36e188bbe6-59240c850b.zip +0 -0
  17. package/.yarn/cache/@protobufjs-eventemitter-npm-1.1.0-029cc7d431-0369163a3d.zip +0 -0
  18. package/.yarn/cache/@protobufjs-fetch-npm-1.1.0-ca857b7df4-3fce7e09eb.zip +0 -0
  19. package/.yarn/cache/@protobufjs-float-npm-1.0.2-5678f64d08-5781e12412.zip +0 -0
  20. package/.yarn/cache/@protobufjs-inquire-npm-1.1.0-3c7759e9ce-ca06f02eaf.zip +0 -0
  21. package/.yarn/cache/@protobufjs-path-npm-1.1.2-641d08de76-856eeb532b.zip +0 -0
  22. package/.yarn/cache/@protobufjs-pool-npm-1.1.0-47a76f96a1-d6a34fbbd2.zip +0 -0
  23. package/.yarn/cache/@protobufjs-utf8-npm-1.1.0-02c590807c-f9bf3163d1.zip +0 -0
  24. package/.yarn/cache/@sinclair-typebox-npm-0.27.8-23e206d653-00bd7362a3.zip +0 -0
  25. package/.yarn/cache/@tsd-typescript-npm-5.4.5-31c3b104b3-86498d5e15.zip +0 -0
  26. package/.yarn/cache/@types-caseless-npm-0.12.5-d7dbdab81c-f6a3628add.zip +0 -0
  27. package/.yarn/cache/@types-eslint-npm-7.29.0-46534a7300-df13991c55.zip +0 -0
  28. package/.yarn/cache/@types-estree-npm-1.0.6-b5e23f2ea2-8825d6e729.zip +0 -0
  29. package/.yarn/cache/@types-json-schema-npm-7.0.15-fd16381786-97ed0cb44d.zip +0 -0
  30. package/.yarn/cache/@types-minimist-npm-1.2.5-c85664a9d8-477047b606.zip +0 -0
  31. package/.yarn/cache/@types-node-npm-22.7.5-0428b60a8c-1a8bbb504e.zip +0 -0
  32. package/.yarn/cache/@types-node-npm-22.7.6-cbb64e0ad4-6afe2a1bd7.zip +0 -0
  33. package/.yarn/cache/@types-normalize-package-data-npm-2.4.4-676a8ba353-65dff72b54.zip +0 -0
  34. package/.yarn/cache/@types-request-npm-2.48.12-d921ef35cb-20dfad0a46.zip +0 -0
  35. package/.yarn/cache/@types-tough-cookie-npm-4.0.5-8c5e2162e1-f19409d019.zip +0 -0
  36. package/.yarn/cache/@types-ws-npm-8.5.12-90c42288cf-ddefb6ad16.zip +0 -0
  37. package/.yarn/cache/ansi-escapes-npm-4.3.2-3ad173702f-93111c4218.zip +0 -0
  38. package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
  39. package/.yarn/cache/ansi-styles-npm-3.2.1-8cb8107983-d85ade01c1.zip +0 -0
  40. package/.yarn/cache/ansi-styles-npm-4.3.0-245c7d42c7-513b44c3b2.zip +0 -0
  41. package/.yarn/cache/ansi-styles-npm-5.2.0-72fc7003e3-d7f4e97ce0.zip +0 -0
  42. package/.yarn/cache/array-union-npm-2.1.0-4e4852b221-5bee12395c.zip +0 -0
  43. package/.yarn/cache/arrify-npm-1.0.1-affafba9fe-745075dd4a.zip +0 -0
  44. package/.yarn/cache/async-npm-3.2.4-aba13508f9-43d07459a4.zip +0 -0
  45. package/.yarn/cache/async-npm-3.2.6-aa4f5aa081-ee6eb8cd8a.zip +0 -0
  46. package/.yarn/cache/asyncjs-util-npm-1.2.12-f1ef4c2905-55ff005a7f.zip +0 -0
  47. package/.yarn/cache/asynckit-npm-0.4.0-c718858525-7b78c451df.zip +0 -0
  48. package/.yarn/cache/base-x-npm-3.0.10-2d05c06792-5230773955.zip +0 -0
  49. package/.yarn/cache/base-x-npm-4.0.0-64a1f6fa5e-b25db9e07e.zip +0 -0
  50. package/.yarn/cache/bech32-npm-2.0.0-ad98b7dd79-fa15acb270.zip +0 -0
  51. package/.yarn/cache/bip174-npm-2.1.1-d9fcaf36f9-bc5b99e7d1.zip +0 -0
  52. package/.yarn/cache/bip66-npm-1.1.5-e1d2ea7768-956cff6e51.zip +0 -0
  53. package/.yarn/cache/bitcoin-ops-npm-1.4.1-e1e62763b3-3daa3303d6.zip +0 -0
  54. package/.yarn/cache/bitcoinjs-lib-npm-6.1.3-8b823f7e69-b1d9ffd999.zip +0 -0
  55. package/.yarn/cache/bitcoinjs-lib-npm-6.1.6-d063b5a8ff-04370cf699.zip +0 -0
  56. package/.yarn/cache/bn.js-npm-5.2.1-dc952b1965-3dd8c8d380.zip +0 -0
  57. package/.yarn/cache/bolt07-npm-1.8.4-297a4ac40d-58cdf15aba.zip +0 -0
  58. package/.yarn/cache/bolt07-npm-1.9.4-6f74865601-d18efc5f83.zip +0 -0
  59. package/.yarn/cache/bolt09-npm-1.0.0-b3d5b54cf9-09d53b86f2.zip +0 -0
  60. package/.yarn/cache/bolt09-npm-2.1.0-1fc0cfcef2-629cd3bdd4.zip +0 -0
  61. package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
  62. package/.yarn/cache/bs58-npm-4.0.1-8d2a7822b1-b3c5365bb9.zip +0 -0
  63. package/.yarn/cache/bs58-npm-5.0.0-da02537b92-2475cb0684.zip +0 -0
  64. package/.yarn/cache/bs58check-npm-2.1.2-4e87e40195-43bdf08a5d.zip +0 -0
  65. package/.yarn/cache/bs58check-npm-3.0.1-be32851e5e-dbbecc7a09.zip +0 -0
  66. package/.yarn/cache/camelcase-keys-npm-6.2.2-d13777ec12-43c9af1adf.zip +0 -0
  67. package/.yarn/cache/camelcase-npm-5.3.1-5db8af62c5-e6effce26b.zip +0 -0
  68. package/.yarn/cache/chalk-npm-2.4.2-3ea16dd91e-ec3661d38f.zip +0 -0
  69. package/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-fe75c9d5c7.zip +0 -0
  70. package/.yarn/cache/cipher-base-npm-1.0.4-2e98b97140-47d3568dbc.zip +0 -0
  71. package/.yarn/cache/cliui-npm-8.0.1-3b029092cf-79648b3b00.zip +0 -0
  72. package/.yarn/cache/color-convert-npm-1.9.3-1fe690075e-fd7a64a17c.zip +0 -0
  73. package/.yarn/cache/color-convert-npm-2.0.1-79730e935b-79e6bdb9fd.zip +0 -0
  74. package/.yarn/cache/color-name-npm-1.1.3-728b7b5d39-09c5d3e33d.zip +0 -0
  75. package/.yarn/cache/color-name-npm-1.1.4-025792b0ea-b044585952.zip +0 -0
  76. package/.yarn/cache/combined-stream-npm-1.0.8-dc14d4a63a-49fa4aeb49.zip +0 -0
  77. package/.yarn/cache/create-hash-npm-1.2.0-afd048e1ce-02a6ae3bb9.zip +0 -0
  78. package/.yarn/cache/decamelize-keys-npm-1.1.1-4cfa36ed4b-fc645fe20b.zip +0 -0
  79. package/.yarn/cache/decamelize-npm-1.2.0-c5a2fdc622-ad8c51a7e7.zip +0 -0
  80. package/.yarn/cache/delayed-stream-npm-1.0.0-c5a4c4cc02-46fe6e83e2.zip +0 -0
  81. package/.yarn/cache/diff-sequences-npm-29.6.3-18ab2c9949-f4914158e1.zip +0 -0
  82. package/.yarn/cache/dir-glob-npm-3.0.1-1aea628b1b-fa05e18324.zip +0 -0
  83. package/.yarn/cache/ecpair-npm-2.1.0-d034fc21e2-924a776808.zip +0 -0
  84. package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
  85. package/.yarn/cache/error-ex-npm-1.3.2-5654f80c0f-c1c2b8b65f.zip +0 -0
  86. package/.yarn/cache/escalade-npm-3.2.0-19b50dd48f-47b029c83d.zip +0 -0
  87. package/.yarn/cache/escape-string-regexp-npm-1.0.5-3284de402f-6092fda75c.zip +0 -0
  88. package/.yarn/cache/eslint-formatter-pretty-npm-4.1.0-30790f28b4-e8e0cd3843.zip +0 -0
  89. package/.yarn/cache/eslint-rule-docs-npm-1.1.235-64d33df34f-b163596f9a.zip +0 -0
  90. package/.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip +0 -0
  91. package/.yarn/cache/fastq-npm-1.17.1-56d4554993-a8c5b26788.zip +0 -0
  92. package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
  93. package/.yarn/cache/find-up-npm-4.1.0-c3ccf8d855-4c172680e8.zip +0 -0
  94. package/.yarn/cache/form-data-npm-2.5.2-f40bcd738c-89ed3d9623.zip +0 -0
  95. package/.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-2b0ff4ce70.zip +0 -0
  96. package/.yarn/cache/get-caller-file-npm-2.0.5-80e8a86305-b9769a836d.zip +0 -0
  97. package/.yarn/cache/glob-parent-npm-5.1.2-021ab32634-f4f2bfe242.zip +0 -0
  98. package/.yarn/cache/globby-npm-11.1.0-bdcdf20c71-b4be8885e0.zip +0 -0
  99. package/.yarn/cache/hard-rejection-npm-2.1.0-a80f2a977d-7baaf80a0c.zip +0 -0
  100. package/.yarn/cache/has-flag-npm-3.0.0-16ac11fe05-4a15638b45.zip +0 -0
  101. package/.yarn/cache/has-flag-npm-4.0.0-32af9f0536-261a135703.zip +0 -0
  102. package/.yarn/cache/hash-base-npm-3.1.0-26fc5711dd-26b7e97ac3.zip +0 -0
  103. package/.yarn/cache/hasown-npm-2.0.2-80fe6c9901-e8516f776a.zip +0 -0
  104. package/.yarn/cache/hosted-git-info-npm-2.8.9-62c44fa93f-c955394bda.zip +0 -0
  105. package/.yarn/cache/hosted-git-info-npm-4.1.0-4efcdf8fd3-c3f87b3c2f.zip +0 -0
  106. package/.yarn/cache/ignore-npm-5.3.2-346d3ba017-2acfd32a57.zip +0 -0
  107. package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
  108. package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
  109. package/.yarn/cache/invoices-npm-3.0.0-123907e565-27119b1449.zip +0 -0
  110. package/.yarn/cache/irregular-plurals-npm-3.5.0-2415613615-5b663091dc.zip +0 -0
  111. package/.yarn/cache/is-arrayish-npm-0.2.1-23927dfb15-eef4417e3c.zip +0 -0
  112. package/.yarn/cache/is-core-module-npm-2.15.1-34c73a6cbd-df134c1681.zip +0 -0
  113. package/.yarn/cache/is-extglob-npm-2.1.1-0870ea68b5-df033653d0.zip +0 -0
  114. package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
  115. package/.yarn/cache/is-glob-npm-4.0.3-cb87bf1bdb-d381c1319f.zip +0 -0
  116. package/.yarn/cache/is-number-npm-7.0.0-060086935c-456ac6f8e0.zip +0 -0
  117. package/.yarn/cache/is-plain-obj-npm-1.1.0-1046f64c0b-0ee0480779.zip +0 -0
  118. package/.yarn/cache/is-unicode-supported-npm-0.1.0-0833e1bbfb-a2aab86ee7.zip +0 -0
  119. package/.yarn/cache/jest-diff-npm-29.7.0-0149e01930-08e24a9dd4.zip +0 -0
  120. package/.yarn/cache/jest-get-type-npm-29.6.3-500477292e-88ac9102d4.zip +0 -0
  121. package/.yarn/cache/js-tokens-npm-4.0.0-0ac852e9e2-8a95213a5a.zip +0 -0
  122. package/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip +0 -0
  123. package/.yarn/cache/kind-of-npm-6.0.3-ab15f36220-3ab01e7b1d.zip +0 -0
  124. package/.yarn/cache/lines-and-columns-npm-1.2.4-d6c7cc5799-0c37f9f7fa.zip +0 -0
  125. package/.yarn/cache/locate-path-npm-5.0.0-46580c43e4-83e51725e6.zip +0 -0
  126. package/.yarn/cache/lodash.camelcase-npm-4.3.0-bf268e3bf0-cb9227612f.zip +0 -0
  127. package/.yarn/cache/log-symbols-npm-4.1.0-0a13492d8b-fce1497b31.zip +0 -0
  128. package/.yarn/cache/long-npm-5.2.3-61dddb7586-885ede7c3d.zip +0 -0
  129. package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
  130. package/.yarn/cache/map-obj-npm-1.0.1-fa55100fac-9949e7baec.zip +0 -0
  131. package/.yarn/cache/map-obj-npm-4.3.0-d53e32935d-fbc554934d.zip +0 -0
  132. package/.yarn/cache/md5.js-npm-1.3.5-130901125a-098494d885.zip +0 -0
  133. package/.yarn/cache/meow-npm-9.0.0-8b2707248e-99799c4724.zip +0 -0
  134. package/.yarn/cache/merge2-npm-1.4.1-a2507bd06c-7268db63ed.zip +0 -0
  135. package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
  136. package/.yarn/cache/mime-db-npm-1.52.0-b5371d6fd2-0d99a03585.zip +0 -0
  137. package/.yarn/cache/mime-types-npm-2.1.35-dd9ea9f3e2-89a5b7f1de.zip +0 -0
  138. package/.yarn/cache/min-indent-npm-1.0.1-77031f50e1-bfc6dd03c5.zip +0 -0
  139. package/.yarn/cache/minimist-options-npm-4.1.0-64ca250fc1-8c040b3068.zip +0 -0
  140. package/.yarn/cache/normalize-package-data-npm-2.5.0-af0345deed-7999112efc.zip +0 -0
  141. package/.yarn/cache/normalize-package-data-npm-3.0.3-1a49056685-bbcee00339.zip +0 -0
  142. package/.yarn/cache/p-limit-npm-2.3.0-94a0310039-84ff17f1a3.zip +0 -0
  143. package/.yarn/cache/p-locate-npm-4.1.0-eec6872537-513bd14a45.zip +0 -0
  144. package/.yarn/cache/p-try-npm-2.2.0-e0390dbaf8-f8a8e9a769.zip +0 -0
  145. package/.yarn/cache/parse-json-npm-5.2.0-00a63b1199-62085b17d6.zip +0 -0
  146. package/.yarn/cache/path-exists-npm-4.0.0-e9e4f63eb0-505807199d.zip +0 -0
  147. package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
  148. package/.yarn/cache/path-type-npm-4.0.0-10d47fc86a-5b1e2daa24.zip +0 -0
  149. package/.yarn/cache/picocolors-npm-1.1.1-4fede47cf1-e1cf46bf84.zip +0 -0
  150. package/.yarn/cache/picomatch-npm-2.3.1-c782cfd986-050c865ce8.zip +0 -0
  151. package/.yarn/cache/plur-npm-4.0.0-96f2a49c24-fea2e903ef.zip +0 -0
  152. package/.yarn/cache/pretty-format-npm-29.7.0-7d330b2ea2-032c160238.zip +0 -0
  153. package/.yarn/cache/protobufjs-npm-7.4.0-12c56a3adc-ba0e6b6054.zip +0 -0
  154. package/.yarn/cache/psbt-npm-3.0.0-7f3e8059ba-1dddca470a.zip +0 -0
  155. package/.yarn/cache/pushdata-bitcoin-npm-1.0.1-959a90bb14-8452106d4b.zip +0 -0
  156. package/.yarn/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-b676f8c040.zip +0 -0
  157. package/.yarn/cache/quick-lru-npm-4.0.1-ef8aa17c9c-bea46e1abf.zip +0 -0
  158. package/.yarn/cache/randombytes-npm-2.1.0-e3da76bccf-d779499376.zip +0 -0
  159. package/.yarn/cache/react-is-npm-18.3.1-370a81e1e9-e20fe84c86.zip +0 -0
  160. package/.yarn/cache/read-pkg-npm-5.2.0-50426bd8dc-eb696e6052.zip +0 -0
  161. package/.yarn/cache/read-pkg-up-npm-7.0.1-11895bed9a-e4e93ce70e.zip +0 -0
  162. package/.yarn/cache/readable-stream-npm-3.6.2-d2a6069158-bdcbe6c22e.zip +0 -0
  163. package/.yarn/cache/redent-npm-3.0.0-31892f4906-fa1ef20404.zip +0 -0
  164. package/.yarn/cache/require-directory-npm-2.1.1-8608aee50b-fb47e70bf0.zip +0 -0
  165. package/.yarn/cache/resolve-npm-1.22.8-098f379dfe-f8a26958aa.zip +0 -0
  166. package/.yarn/cache/resolve-patch-f6b5304cab-5479b7d431.zip +0 -0
  167. package/.yarn/cache/reusify-npm-1.0.4-95ac4aec11-c3076ebcc2.zip +0 -0
  168. package/.yarn/cache/ripemd160-npm-2.0.2-7b1fb8dc76-006accc405.zip +0 -0
  169. package/.yarn/cache/run-parallel-npm-1.2.0-3f47ff2034-cb4f97ad25.zip +0 -0
  170. package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
  171. package/.yarn/cache/semver-npm-5.7.2-938ee91eaa-fb4ab5e0dd.zip +0 -0
  172. package/.yarn/cache/semver-npm-7.6.3-57e82c14d5-4110ec5d01.zip +0 -0
  173. package/.yarn/cache/sha.js-npm-2.4.11-14868df4ca-ebd3f59d4b.zip +0 -0
  174. package/.yarn/cache/slash-npm-3.0.0-b87de2279a-94a93fff61.zip +0 -0
  175. package/.yarn/cache/spdx-correct-npm-3.2.0-ffae008484-e9ae98d22f.zip +0 -0
  176. package/.yarn/cache/spdx-exceptions-npm-2.5.0-718ed4b7d6-bb127d6e25.zip +0 -0
  177. package/.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip +0 -0
  178. package/.yarn/cache/spdx-license-ids-npm-3.0.20-f08e1eabc0-0c57750bed.zip +0 -0
  179. package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
  180. package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
  181. package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
  182. package/.yarn/cache/strip-indent-npm-3.0.0-519e75a28d-18f045d57d.zip +0 -0
  183. package/.yarn/cache/supports-color-npm-5.5.0-183ac537bc-95f6f4ba5a.zip +0 -0
  184. package/.yarn/cache/supports-color-npm-7.2.0-606bfcf7da-3dda818de0.zip +0 -0
  185. package/.yarn/cache/supports-hyperlinks-npm-2.3.0-d19176eba2-9ee0de3c8c.zip +0 -0
  186. package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
  187. package/.yarn/cache/tiny-secp256k1-npm-2.2.2-54168b74b6-2b38491186.zip +0 -0
  188. package/.yarn/cache/tiny-secp256k1-npm-2.2.3-8c5163b5d1-f7a74a1fce.zip +0 -0
  189. package/.yarn/cache/to-regex-range-npm-5.0.1-f1e8263b00-f76fa01b3d.zip +0 -0
  190. package/.yarn/cache/trim-newlines-npm-3.0.1-22f1f216de-b530f3fadf.zip +0 -0
  191. package/.yarn/cache/tsd-npm-0.31.2-07f84c93d0-23bb84f8ba.zip +0 -0
  192. package/.yarn/cache/type-fest-npm-0.18.1-47b079775d-e96dcee18a.zip +0 -0
  193. package/.yarn/cache/type-fest-npm-0.21.3-5ff2a9c6fd-e6b32a3b38.zip +0 -0
  194. package/.yarn/cache/type-fest-npm-0.6.0-76b229965b-b2188e6e4b.zip +0 -0
  195. package/.yarn/cache/type-fest-npm-0.8.1-351ad028fe-d61c4b2eba.zip +0 -0
  196. package/.yarn/cache/type-fest-npm-4.26.1-274c31182d-7188db3bca.zip +0 -0
  197. package/.yarn/cache/typeforce-npm-1.18.0-372e34e2a2-e3b21e27e7.zip +0 -0
  198. package/.yarn/cache/typescript-npm-5.6.3-cc9b3687b0-ba302f8822.zip +0 -0
  199. package/.yarn/cache/typescript-patch-be88537122-ade87bce23.zip +0 -0
  200. package/.yarn/cache/uint8array-tools-npm-0.0.7-96ca58a124-6ffc45c7d2.zip +0 -0
  201. package/.yarn/cache/undici-types-npm-6.19.8-9f12285b7a-de51f1b447.zip +0 -0
  202. package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
  203. package/.yarn/cache/validate-npm-package-license-npm-3.0.4-7af8adc7a8-35703ac889.zip +0 -0
  204. package/.yarn/cache/varuint-bitcoin-npm-1.1.2-83f928c112-1c900bf08f.zip +0 -0
  205. package/.yarn/cache/wif-npm-2.0.6-f351bf025a-8c3147ef98.zip +0 -0
  206. package/.yarn/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-a790b846fd.zip +0 -0
  207. package/.yarn/cache/y18n-npm-5.0.8-5f3a0a7e62-54f0fb9562.zip +0 -0
  208. package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
  209. package/.yarn/cache/yargs-npm-17.7.2-80b62638e1-73b572e863.zip +0 -0
  210. package/.yarn/cache/yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip +0 -0
  211. package/.yarn/cache/yargs-parser-npm-21.1.1-8fdc003314-ed2d96a616.zip +0 -0
  212. package/.yarn/install-state.gz +0 -0
  213. package/CHANGELOG.md +817 -0
  214. package/LICENSE +21 -0
  215. package/README.md +393 -0
  216. package/arrays/index.js +3 -0
  217. package/arrays/sort_by.js +44 -0
  218. package/bolt00/index.js +5 -0
  219. package/bolt00/mtokens_amount.js +44 -0
  220. package/bolt00/payment_amounts.js +89 -0
  221. package/bolt00/safe_tokens.js +31 -0
  222. package/bolt02/chain_id.js +27 -0
  223. package/bolt02/ids.json +11 -0
  224. package/bolt02/index.js +3 -0
  225. package/grpc/emit_subscription_error.js +28 -0
  226. package/grpc/grpc_services.json +63 -0
  227. package/grpc/handle_remove_listener.js +25 -0
  228. package/grpc/index.js +25 -0
  229. package/grpc/protos/autopilot.proto +98 -0
  230. package/grpc/protos/chainkit.proto +74 -0
  231. package/grpc/protos/chainnotifier.proto +200 -0
  232. package/grpc/protos/invoices.proto +245 -0
  233. package/grpc/protos/lightning.proto +5111 -0
  234. package/grpc/protos/peers.proto +94 -0
  235. package/grpc/protos/rfqrpc/rfq.proto +309 -0
  236. package/grpc/protos/router.proto +1023 -0
  237. package/grpc/protos/routerrpc/router.proto +1077 -0
  238. package/grpc/protos/signer.proto +709 -0
  239. package/grpc/protos/stateservice.proto +73 -0
  240. package/grpc/protos/taprootassetchannels.proto +169 -0
  241. package/grpc/protos/verrpc.proto +47 -0
  242. package/grpc/protos/walletkit.proto +1506 -0
  243. package/grpc/protos/walletunlocker.proto +338 -0
  244. package/grpc/protos/watchtower.proto +30 -0
  245. package/grpc/protos/wtclient.proto +293 -0
  246. package/index.d.ts +3 -0
  247. package/index.js +321 -0
  248. package/lnd_grpc/api_for_proto.js +21 -0
  249. package/lnd_grpc/authenticated_lnd_grpc.d.ts +30 -0
  250. package/lnd_grpc/authenticated_lnd_grpc.js +84 -0
  251. package/lnd_grpc/decode_serialized.js +25 -0
  252. package/lnd_grpc/grpc_credentials.js +50 -0
  253. package/lnd_grpc/grpc_options.js +7 -0
  254. package/lnd_grpc/grpc_ssl.js +20 -0
  255. package/lnd_grpc/index.d.ts +2 -0
  256. package/lnd_grpc/index.js +5 -0
  257. package/lnd_grpc/is_lnd.js +14 -0
  258. package/lnd_grpc/make_metadata.js +21 -0
  259. package/lnd_grpc/unauthenticated_lnd_grpc.d.ts +19 -0
  260. package/lnd_grpc/unauthenticated_lnd_grpc.js +68 -0
  261. package/lnd_messages/close_channel_request.js +38 -0
  262. package/lnd_messages/index.js +5 -0
  263. package/lnd_messages/open_channel_request.js +66 -0
  264. package/lnd_messages/pay_via_route_request.js +61 -0
  265. package/lnd_methods/address/address_formats.json +8 -0
  266. package/lnd_methods/address/create_chain_address.d.ts +26 -0
  267. package/lnd_methods/address/create_chain_address.js +117 -0
  268. package/lnd_methods/address/get_public_key.d.ts +32 -0
  269. package/lnd_methods/address/get_public_key.js +84 -0
  270. package/lnd_methods/address/index.d.ts +2 -0
  271. package/lnd_methods/address/index.js +4 -0
  272. package/lnd_methods/generic/get_height.d.ts +21 -0
  273. package/lnd_methods/generic/get_height.js +75 -0
  274. package/lnd_methods/generic/get_route_confidence.d.ts +33 -0
  275. package/lnd_methods/generic/get_route_confidence.js +167 -0
  276. package/lnd_methods/generic/index.d.ts +2 -0
  277. package/lnd_methods/generic/index.js +4 -0
  278. package/lnd_methods/index.d.ts +11 -0
  279. package/lnd_methods/index.js +319 -0
  280. package/lnd_methods/info/constants.json +65 -0
  281. package/lnd_methods/info/get_autopilot.d.ts +43 -0
  282. package/lnd_methods/info/get_autopilot.js +192 -0
  283. package/lnd_methods/info/get_channel.d.ts +53 -0
  284. package/lnd_methods/info/get_channel.js +120 -0
  285. package/lnd_methods/info/get_configuration.d.ts +30 -0
  286. package/lnd_methods/info/get_configuration.js +84 -0
  287. package/lnd_methods/info/get_identity.d.ts +19 -0
  288. package/lnd_methods/info/get_identity.js +68 -0
  289. package/lnd_methods/info/get_methods.d.ts +23 -0
  290. package/lnd_methods/info/get_methods.js +91 -0
  291. package/lnd_methods/info/get_network_centrality.d.ts +25 -0
  292. package/lnd_methods/info/get_network_centrality.js +79 -0
  293. package/lnd_methods/info/get_network_graph.d.ts +53 -0
  294. package/lnd_methods/info/get_network_graph.js +149 -0
  295. package/lnd_methods/info/get_network_info.d.ts +31 -0
  296. package/lnd_methods/info/get_network_info.js +59 -0
  297. package/lnd_methods/info/get_node.d.ts +61 -0
  298. package/lnd_methods/info/get_node.js +155 -0
  299. package/lnd_methods/info/get_route_to_destination.d.ts +122 -0
  300. package/lnd_methods/info/get_route_to_destination.js +357 -0
  301. package/lnd_methods/info/get_tower_server_info.d.ts +30 -0
  302. package/lnd_methods/info/get_tower_server_info.js +89 -0
  303. package/lnd_methods/info/get_wallet_info.d.ts +53 -0
  304. package/lnd_methods/info/get_wallet_info.js +94 -0
  305. package/lnd_methods/info/get_wallet_version.d.ts +37 -0
  306. package/lnd_methods/info/get_wallet_version.js +101 -0
  307. package/lnd_methods/info/index.d.ts +15 -0
  308. package/lnd_methods/info/index.js +33 -0
  309. package/lnd_methods/info/stop_daemon.d.ts +8 -0
  310. package/lnd_methods/info/stop_daemon.js +70 -0
  311. package/lnd_methods/info/subscribe_to_graph.d.ts +79 -0
  312. package/lnd_methods/info/subscribe_to_graph.js +205 -0
  313. package/lnd_methods/invoices/cancel_hodl_invoice.d.ts +20 -0
  314. package/lnd_methods/invoices/cancel_hodl_invoice.js +55 -0
  315. package/lnd_methods/invoices/create_hodl_invoice.d.ts +62 -0
  316. package/lnd_methods/invoices/create_hodl_invoice.js +206 -0
  317. package/lnd_methods/invoices/create_invoice.d.ts +71 -0
  318. package/lnd_methods/invoices/create_invoice.js +347 -0
  319. package/lnd_methods/invoices/get_invoice.d.ts +109 -0
  320. package/lnd_methods/invoices/get_invoice.js +107 -0
  321. package/lnd_methods/invoices/get_invoices.d.ts +110 -0
  322. package/lnd_methods/invoices/get_invoices.js +195 -0
  323. package/lnd_methods/invoices/index.d.ts +8 -0
  324. package/lnd_methods/invoices/index.js +19 -0
  325. package/lnd_methods/invoices/settle_hodl_invoice.d.ts +18 -0
  326. package/lnd_methods/invoices/settle_hodl_invoice.js +65 -0
  327. package/lnd_methods/invoices/subscribe_to_invoice.d.ts +115 -0
  328. package/lnd_methods/invoices/subscribe_to_invoice.js +131 -0
  329. package/lnd_methods/invoices/subscribe_to_invoices.d.ts +107 -0
  330. package/lnd_methods/invoices/subscribe_to_invoices.js +177 -0
  331. package/lnd_methods/macaroon/accept_rpc_request.js +44 -0
  332. package/lnd_methods/macaroon/get_access_ids.d.ts +19 -0
  333. package/lnd_methods/macaroon/get_access_ids.js +67 -0
  334. package/lnd_methods/macaroon/grant_access.d.ts +75 -0
  335. package/lnd_methods/macaroon/grant_access.js +146 -0
  336. package/lnd_methods/macaroon/handle_rpc_request_update.js +151 -0
  337. package/lnd_methods/macaroon/index.d.ts +5 -0
  338. package/lnd_methods/macaroon/index.js +13 -0
  339. package/lnd_methods/macaroon/methods.json +624 -0
  340. package/lnd_methods/macaroon/permissions.json +21 -0
  341. package/lnd_methods/macaroon/reject_rpc_request.js +52 -0
  342. package/lnd_methods/macaroon/revoke_access.d.ts +18 -0
  343. package/lnd_methods/macaroon/revoke_access.js +65 -0
  344. package/lnd_methods/macaroon/subscribe_to_rpc_requests.d.ts +155 -0
  345. package/lnd_methods/macaroon/subscribe_to_rpc_requests.js +228 -0
  346. package/lnd_methods/macaroon/uris_for_method.js +52 -0
  347. package/lnd_methods/macaroon/verify_access.d.ts +28 -0
  348. package/lnd_methods/macaroon/verify_access.js +85 -0
  349. package/lnd_methods/message/index.d.ts +2 -0
  350. package/lnd_methods/message/index.js +4 -0
  351. package/lnd_methods/message/sign_message.d.ts +24 -0
  352. package/lnd_methods/message/sign_message.js +61 -0
  353. package/lnd_methods/message/verify_message.d.ts +26 -0
  354. package/lnd_methods/message/verify_message.js +68 -0
  355. package/lnd_methods/offchain/attempt_route.d.ts +58 -0
  356. package/lnd_methods/offchain/attempt_route.js +118 -0
  357. package/lnd_methods/offchain/connect_watchtower.d.ts +20 -0
  358. package/lnd_methods/offchain/connect_watchtower.js +66 -0
  359. package/lnd_methods/offchain/decode_payment_request.d.ts +56 -0
  360. package/lnd_methods/offchain/decode_payment_request.js +86 -0
  361. package/lnd_methods/offchain/delete_failed_pay_attempts.d.ts +10 -0
  362. package/lnd_methods/offchain/delete_failed_pay_attempts.js +67 -0
  363. package/lnd_methods/offchain/delete_failed_payments.d.ts +10 -0
  364. package/lnd_methods/offchain/delete_failed_payments.js +46 -0
  365. package/lnd_methods/offchain/delete_forwarding_reputations.d.ts +8 -0
  366. package/lnd_methods/offchain/delete_forwarding_reputations.js +44 -0
  367. package/lnd_methods/offchain/delete_payment.d.ts +18 -0
  368. package/lnd_methods/offchain/delete_payment.js +58 -0
  369. package/lnd_methods/offchain/delete_payments.d.ts +8 -0
  370. package/lnd_methods/offchain/delete_payments.js +44 -0
  371. package/lnd_methods/offchain/delete_pending_channel.d.ts +21 -0
  372. package/lnd_methods/offchain/delete_pending_channel.js +114 -0
  373. package/lnd_methods/offchain/disable_channel.d.ts +20 -0
  374. package/lnd_methods/offchain/disable_channel.js +72 -0
  375. package/lnd_methods/offchain/disconnect_watchtower.d.ts +18 -0
  376. package/lnd_methods/offchain/disconnect_watchtower.js +66 -0
  377. package/lnd_methods/offchain/emit_payment.d.ts +21 -0
  378. package/lnd_methods/offchain/emit_payment.js +58 -0
  379. package/lnd_methods/offchain/enable_channel.d.ts +24 -0
  380. package/lnd_methods/offchain/enable_channel.js +99 -0
  381. package/lnd_methods/offchain/finished_payment.d.ts +178 -0
  382. package/lnd_methods/offchain/finished_payment.js +163 -0
  383. package/lnd_methods/offchain/get_backup.d.ts +26 -0
  384. package/lnd_methods/offchain/get_backup.js +76 -0
  385. package/lnd_methods/offchain/get_backups.d.ts +25 -0
  386. package/lnd_methods/offchain/get_backups.js +57 -0
  387. package/lnd_methods/offchain/get_channel_balance.d.ts +41 -0
  388. package/lnd_methods/offchain/get_channel_balance.js +171 -0
  389. package/lnd_methods/offchain/get_channels.d.ts +137 -0
  390. package/lnd_methods/offchain/get_channels.js +142 -0
  391. package/lnd_methods/offchain/get_closed_channels.d.ts +100 -0
  392. package/lnd_methods/offchain/get_closed_channels.js +239 -0
  393. package/lnd_methods/offchain/get_connected_watchtowers.d.ts +64 -0
  394. package/lnd_methods/offchain/get_connected_watchtowers.js +218 -0
  395. package/lnd_methods/offchain/get_ephemeral_channel_ids.d.ts +27 -0
  396. package/lnd_methods/offchain/get_ephemeral_channel_ids.js +86 -0
  397. package/lnd_methods/offchain/get_failed_payments.d.ts +139 -0
  398. package/lnd_methods/offchain/get_failed_payments.js +128 -0
  399. package/lnd_methods/offchain/get_fee_rates.d.ts +41 -0
  400. package/lnd_methods/offchain/get_fee_rates.js +77 -0
  401. package/lnd_methods/offchain/get_forwarding_confidence.d.ts +26 -0
  402. package/lnd_methods/offchain/get_forwarding_confidence.js +89 -0
  403. package/lnd_methods/offchain/get_forwarding_reputations.d.ts +31 -0
  404. package/lnd_methods/offchain/get_forwarding_reputations.js +130 -0
  405. package/lnd_methods/offchain/get_forwards.d.ts +49 -0
  406. package/lnd_methods/offchain/get_forwards.js +136 -0
  407. package/lnd_methods/offchain/get_pathfinding_settings.d.ts +27 -0
  408. package/lnd_methods/offchain/get_pathfinding_settings.js +88 -0
  409. package/lnd_methods/offchain/get_payment.d.ts +172 -0
  410. package/lnd_methods/offchain/get_payment.js +144 -0
  411. package/lnd_methods/offchain/get_payments.d.ts +149 -0
  412. package/lnd_methods/offchain/get_payments.js +133 -0
  413. package/lnd_methods/offchain/get_pending_channels.d.ts +86 -0
  414. package/lnd_methods/offchain/get_pending_channels.js +103 -0
  415. package/lnd_methods/offchain/get_pending_payments.d.ts +139 -0
  416. package/lnd_methods/offchain/get_pending_payments.js +128 -0
  417. package/lnd_methods/offchain/get_route_through_hops.d.ts +94 -0
  418. package/lnd_methods/offchain/get_route_through_hops.js +141 -0
  419. package/lnd_methods/offchain/get_settlement_status.d.ts +32 -0
  420. package/lnd_methods/offchain/get_settlement_status.js +98 -0
  421. package/lnd_methods/offchain/index.d.ts +57 -0
  422. package/lnd_methods/offchain/index.js +117 -0
  423. package/lnd_methods/offchain/is_destination_payable.d.ts +54 -0
  424. package/lnd_methods/offchain/is_destination_payable.js +95 -0
  425. package/lnd_methods/offchain/list_payments.js +218 -0
  426. package/lnd_methods/offchain/pay.d.ts +132 -0
  427. package/lnd_methods/offchain/pay.js +192 -0
  428. package/lnd_methods/offchain/pay_via_payment_details.d.ts +137 -0
  429. package/lnd_methods/offchain/pay_via_payment_details.js +159 -0
  430. package/lnd_methods/offchain/pay_via_payment_request.d.ts +113 -0
  431. package/lnd_methods/offchain/pay_via_payment_request.js +134 -0
  432. package/lnd_methods/offchain/pay_via_routes.d.ts +104 -0
  433. package/lnd_methods/offchain/pay_via_routes.js +187 -0
  434. package/lnd_methods/offchain/payment_states.json +17 -0
  435. package/lnd_methods/offchain/probe_for_route.d.ts +133 -0
  436. package/lnd_methods/offchain/probe_for_route.js +165 -0
  437. package/lnd_methods/offchain/recover_funds_from_channel.d.ts +16 -0
  438. package/lnd_methods/offchain/recover_funds_from_channel.js +66 -0
  439. package/lnd_methods/offchain/recover_funds_from_channels.d.ts +16 -0
  440. package/lnd_methods/offchain/recover_funds_from_channels.js +54 -0
  441. package/lnd_methods/offchain/route_failure_keys.d.ts +25 -0
  442. package/lnd_methods/offchain/route_failure_keys.js +49 -0
  443. package/lnd_methods/offchain/send_message_to_peer.d.ts +28 -0
  444. package/lnd_methods/offchain/send_message_to_peer.js +70 -0
  445. package/lnd_methods/offchain/subscribe_to_backups.d.ts +21 -0
  446. package/lnd_methods/offchain/subscribe_to_backups.js +84 -0
  447. package/lnd_methods/offchain/subscribe_to_channels.d.ts +150 -0
  448. package/lnd_methods/offchain/subscribe_to_channels.js +229 -0
  449. package/lnd_methods/offchain/subscribe_to_forward_requests.d.ts +49 -0
  450. package/lnd_methods/offchain/subscribe_to_forward_requests.js +120 -0
  451. package/lnd_methods/offchain/subscribe_to_forwards.d.ts +45 -0
  452. package/lnd_methods/offchain/subscribe_to_forwards.js +145 -0
  453. package/lnd_methods/offchain/subscribe_to_open_requests.d.ts +75 -0
  454. package/lnd_methods/offchain/subscribe_to_open_requests.js +156 -0
  455. package/lnd_methods/offchain/subscribe_to_past_payment.d.ts +129 -0
  456. package/lnd_methods/offchain/subscribe_to_past_payment.js +156 -0
  457. package/lnd_methods/offchain/subscribe_to_past_payments.d.ts +75 -0
  458. package/lnd_methods/offchain/subscribe_to_past_payments.js +126 -0
  459. package/lnd_methods/offchain/subscribe_to_pay.d.ts +299 -0
  460. package/lnd_methods/offchain/subscribe_to_pay.js +463 -0
  461. package/lnd_methods/offchain/subscribe_to_pay_via_details.d.ts +40 -0
  462. package/lnd_methods/offchain/subscribe_to_pay_via_details.js +218 -0
  463. package/lnd_methods/offchain/subscribe_to_pay_via_request.d.ts +39 -0
  464. package/lnd_methods/offchain/subscribe_to_pay_via_request.js +193 -0
  465. package/lnd_methods/offchain/subscribe_to_pay_via_routes.d.ts +274 -0
  466. package/lnd_methods/offchain/subscribe_to_pay_via_routes.js +432 -0
  467. package/lnd_methods/offchain/subscribe_to_payments.d.ts +157 -0
  468. package/lnd_methods/offchain/subscribe_to_payments.js +121 -0
  469. package/lnd_methods/offchain/subscribe_to_peer_messages.d.ts +18 -0
  470. package/lnd_methods/offchain/subscribe_to_peer_messages.js +63 -0
  471. package/lnd_methods/offchain/subscribe_to_probe_for_route.d.ts +254 -0
  472. package/lnd_methods/offchain/subscribe_to_probe_for_route.js +405 -0
  473. package/lnd_methods/offchain/update_connected_watchtower.d.ts +30 -0
  474. package/lnd_methods/offchain/update_connected_watchtower.js +91 -0
  475. package/lnd_methods/offchain/update_pathfinding_settings.d.ts +24 -0
  476. package/lnd_methods/offchain/update_pathfinding_settings.js +175 -0
  477. package/lnd_methods/offchain/update_routing_fees.d.ts +81 -0
  478. package/lnd_methods/offchain/update_routing_fees.js +167 -0
  479. package/lnd_methods/offchain/verify_backup.d.ts +26 -0
  480. package/lnd_methods/offchain/verify_backup.js +60 -0
  481. package/lnd_methods/offchain/verify_backups.d.ts +28 -0
  482. package/lnd_methods/offchain/verify_backups.js +78 -0
  483. package/lnd_methods/onchain/broadcast_chain_transaction.d.ts +28 -0
  484. package/lnd_methods/onchain/broadcast_chain_transaction.js +86 -0
  485. package/lnd_methods/onchain/cancel_pending_channel.d.ts +14 -0
  486. package/lnd_methods/onchain/cancel_pending_channel.js +50 -0
  487. package/lnd_methods/onchain/close_channel.d.ts +86 -0
  488. package/lnd_methods/onchain/close_channel.js +211 -0
  489. package/lnd_methods/onchain/create_funded_psbt.d.ts +62 -0
  490. package/lnd_methods/onchain/create_funded_psbt.js +176 -0
  491. package/lnd_methods/onchain/delete_chain_transaction.d.ts +19 -0
  492. package/lnd_methods/onchain/delete_chain_transaction.js +66 -0
  493. package/lnd_methods/onchain/fund_pending_channels.d.ts +18 -0
  494. package/lnd_methods/onchain/fund_pending_channels.js +107 -0
  495. package/lnd_methods/onchain/fund_psbt.d.ts +89 -0
  496. package/lnd_methods/onchain/fund_psbt.js +288 -0
  497. package/lnd_methods/onchain/get_block.d.ts +37 -0
  498. package/lnd_methods/onchain/get_block.js +149 -0
  499. package/lnd_methods/onchain/get_block_header.d.ts +37 -0
  500. package/lnd_methods/onchain/get_block_header.js +149 -0
  501. package/lnd_methods/onchain/get_chain_addresses.d.ts +29 -0
  502. package/lnd_methods/onchain/get_chain_addresses.js +83 -0
  503. package/lnd_methods/onchain/get_chain_balance.d.ts +21 -0
  504. package/lnd_methods/onchain/get_chain_balance.js +55 -0
  505. package/lnd_methods/onchain/get_chain_fee_estimate.d.ts +39 -0
  506. package/lnd_methods/onchain/get_chain_fee_estimate.js +105 -0
  507. package/lnd_methods/onchain/get_chain_fee_rate.d.ts +26 -0
  508. package/lnd_methods/onchain/get_chain_fee_rate.js +67 -0
  509. package/lnd_methods/onchain/get_chain_transaction.d.ts +24 -0
  510. package/lnd_methods/onchain/get_chain_transaction.js +81 -0
  511. package/lnd_methods/onchain/get_chain_transactions.d.ts +62 -0
  512. package/lnd_methods/onchain/get_chain_transactions.js +90 -0
  513. package/lnd_methods/onchain/get_locked_utxos.d.ts +40 -0
  514. package/lnd_methods/onchain/get_locked_utxos.js +95 -0
  515. package/lnd_methods/onchain/get_master_public_keys.d.ts +28 -0
  516. package/lnd_methods/onchain/get_master_public_keys.js +83 -0
  517. package/lnd_methods/onchain/get_minimum_relay_fee.d.ts +25 -0
  518. package/lnd_methods/onchain/get_minimum_relay_fee.js +66 -0
  519. package/lnd_methods/onchain/get_pending_chain_balance.d.ts +23 -0
  520. package/lnd_methods/onchain/get_pending_chain_balance.js +58 -0
  521. package/lnd_methods/onchain/get_pending_sweeps.d.ts +47 -0
  522. package/lnd_methods/onchain/get_pending_sweeps.js +81 -0
  523. package/lnd_methods/onchain/get_sweep_transactions.d.ts +58 -0
  524. package/lnd_methods/onchain/get_sweep_transactions.js +158 -0
  525. package/lnd_methods/onchain/get_utxos.d.ts +40 -0
  526. package/lnd_methods/onchain/get_utxos.js +109 -0
  527. package/lnd_methods/onchain/index.d.ts +43 -0
  528. package/lnd_methods/onchain/index.js +89 -0
  529. package/lnd_methods/onchain/lock_utxo.d.ts +32 -0
  530. package/lnd_methods/onchain/lock_utxo.js +109 -0
  531. package/lnd_methods/onchain/open_channel.d.ts +87 -0
  532. package/lnd_methods/onchain/open_channel.js +293 -0
  533. package/lnd_methods/onchain/open_channels.d.ts +67 -0
  534. package/lnd_methods/onchain/open_channels.js +239 -0
  535. package/lnd_methods/onchain/partially_sign_psbt.d.ts +28 -0
  536. package/lnd_methods/onchain/partially_sign_psbt.js +79 -0
  537. package/lnd_methods/onchain/prepare_for_channel_proposal.d.ts +37 -0
  538. package/lnd_methods/onchain/prepare_for_channel_proposal.js +112 -0
  539. package/lnd_methods/onchain/propose_channel.d.ts +43 -0
  540. package/lnd_methods/onchain/propose_channel.js +162 -0
  541. package/lnd_methods/onchain/request_batched_fee_increase.d.ts +26 -0
  542. package/lnd_methods/onchain/request_batched_fee_increase.js +108 -0
  543. package/lnd_methods/onchain/request_chain_fee_increase.d.ts +32 -0
  544. package/lnd_methods/onchain/request_chain_fee_increase.js +94 -0
  545. package/lnd_methods/onchain/script_from_chain_address.d.ts +30 -0
  546. package/lnd_methods/onchain/script_from_chain_address.js +69 -0
  547. package/lnd_methods/onchain/send_to_chain_address.d.ts +73 -0
  548. package/lnd_methods/onchain/send_to_chain_address.js +162 -0
  549. package/lnd_methods/onchain/send_to_chain_addresses.d.ts +66 -0
  550. package/lnd_methods/onchain/send_to_chain_addresses.js +148 -0
  551. package/lnd_methods/onchain/send_to_chain_output_scripts.d.ts +52 -0
  552. package/lnd_methods/onchain/send_to_chain_output_scripts.js +115 -0
  553. package/lnd_methods/onchain/set_autopilot.d.ts +40 -0
  554. package/lnd_methods/onchain/set_autopilot.js +125 -0
  555. package/lnd_methods/onchain/sign_chain_address_message.d.ts +30 -0
  556. package/lnd_methods/onchain/sign_chain_address_message.js +80 -0
  557. package/lnd_methods/onchain/sign_psbt.d.ts +30 -0
  558. package/lnd_methods/onchain/sign_psbt.js +80 -0
  559. package/lnd_methods/onchain/subscribe_to_blocks.d.ts +19 -0
  560. package/lnd_methods/onchain/subscribe_to_blocks.js +96 -0
  561. package/lnd_methods/onchain/subscribe_to_chain_address.d.ts +47 -0
  562. package/lnd_methods/onchain/subscribe_to_chain_address.js +134 -0
  563. package/lnd_methods/onchain/subscribe_to_chain_spend.d.ts +47 -0
  564. package/lnd_methods/onchain/subscribe_to_chain_spend.js +159 -0
  565. package/lnd_methods/onchain/subscribe_to_transactions.d.ts +16 -0
  566. package/lnd_methods/onchain/subscribe_to_transactions.js +97 -0
  567. package/lnd_methods/onchain/unlock_utxo.d.ts +22 -0
  568. package/lnd_methods/onchain/unlock_utxo.js +72 -0
  569. package/lnd_methods/onchain/update_chain_transaction.d.ts +20 -0
  570. package/lnd_methods/onchain/update_chain_transaction.js +72 -0
  571. package/lnd_methods/onchain/verify_chain_address_message.d.ts +32 -0
  572. package/lnd_methods/onchain/verify_chain_address_message.js +93 -0
  573. package/lnd_methods/peers/add_advertised_feature.d.ts +20 -0
  574. package/lnd_methods/peers/add_advertised_feature.js +62 -0
  575. package/lnd_methods/peers/add_external_socket.d.ts +20 -0
  576. package/lnd_methods/peers/add_external_socket.js +62 -0
  577. package/lnd_methods/peers/add_peer.d.ts +28 -0
  578. package/lnd_methods/peers/add_peer.js +109 -0
  579. package/lnd_methods/peers/get_peers.d.ts +51 -0
  580. package/lnd_methods/peers/get_peers.js +89 -0
  581. package/lnd_methods/peers/index.d.ts +9 -0
  582. package/lnd_methods/peers/index.js +23 -0
  583. package/lnd_methods/peers/remove_advertised_feature.d.ts +20 -0
  584. package/lnd_methods/peers/remove_advertised_feature.js +62 -0
  585. package/lnd_methods/peers/remove_external_socket.d.ts +20 -0
  586. package/lnd_methods/peers/remove_external_socket.js +62 -0
  587. package/lnd_methods/peers/remove_peer.d.ts +16 -0
  588. package/lnd_methods/peers/remove_peer.js +50 -0
  589. package/lnd_methods/peers/subscribe_to_peers.d.ts +18 -0
  590. package/lnd_methods/peers/subscribe_to_peers.js +96 -0
  591. package/lnd_methods/peers/update_alias.d.ts +11 -0
  592. package/lnd_methods/peers/update_alias.js +58 -0
  593. package/lnd_methods/peers/update_color.d.ts +11 -0
  594. package/lnd_methods/peers/update_color.js +58 -0
  595. package/lnd_methods/signer/begin_group_signing_session.d.ts +33 -0
  596. package/lnd_methods/signer/begin_group_signing_session.js +195 -0
  597. package/lnd_methods/signer/diffie_hellman_compute_secret.d.ts +32 -0
  598. package/lnd_methods/signer/diffie_hellman_compute_secret.js +86 -0
  599. package/lnd_methods/signer/end_group_signing_session.d.ts +21 -0
  600. package/lnd_methods/signer/end_group_signing_session.js +102 -0
  601. package/lnd_methods/signer/index.d.ts +7 -0
  602. package/lnd_methods/signer/index.js +17 -0
  603. package/lnd_methods/signer/input_signing_method.js +42 -0
  604. package/lnd_methods/signer/sign_bytes.d.ts +34 -0
  605. package/lnd_methods/signer/sign_bytes.js +105 -0
  606. package/lnd_methods/signer/sign_transaction.d.ts +52 -0
  607. package/lnd_methods/signer/sign_transaction.js +140 -0
  608. package/lnd_methods/signer/update_group_signing_session.d.ts +23 -0
  609. package/lnd_methods/signer/update_group_signing_session.js +110 -0
  610. package/lnd_methods/signer/verify_bytes_signature.d.ts +30 -0
  611. package/lnd_methods/signer/verify_bytes_signature.js +87 -0
  612. package/lnd_methods/unauthenticated/change_password.d.ts +18 -0
  613. package/lnd_methods/unauthenticated/change_password.js +59 -0
  614. package/lnd_methods/unauthenticated/create_seed.d.ts +24 -0
  615. package/lnd_methods/unauthenticated/create_seed.js +70 -0
  616. package/lnd_methods/unauthenticated/create_wallet.d.ts +28 -0
  617. package/lnd_methods/unauthenticated/create_wallet.js +74 -0
  618. package/lnd_methods/unauthenticated/get_wallet_status.d.ts +34 -0
  619. package/lnd_methods/unauthenticated/get_wallet_status.js +70 -0
  620. package/lnd_methods/unauthenticated/index.d.ts +6 -0
  621. package/lnd_methods/unauthenticated/index.js +15 -0
  622. package/lnd_methods/unauthenticated/subscribe_to_wallet_status.d.ts +30 -0
  623. package/lnd_methods/unauthenticated/subscribe_to_wallet_status.js +122 -0
  624. package/lnd_methods/unauthenticated/unlock_wallet.d.ts +14 -0
  625. package/lnd_methods/unauthenticated/unlock_wallet.js +56 -0
  626. package/lnd_requests/destination_custom_records.js +30 -0
  627. package/lnd_requests/ignore_as_ignored_nodes.js +43 -0
  628. package/lnd_requests/ignore_as_ignored_pairs.js +43 -0
  629. package/lnd_requests/index.js +15 -0
  630. package/lnd_requests/is_lnd.js +14 -0
  631. package/lnd_requests/route_hint_from_route.js +49 -0
  632. package/lnd_requests/rpc_hop_from_hop.js +79 -0
  633. package/lnd_requests/rpc_route_from_route.js +107 -0
  634. package/lnd_responses/backups_from_snapshot.js +106 -0
  635. package/lnd_responses/channel_accept_as_open_request.js +138 -0
  636. package/lnd_responses/channel_edge_as_channel.js +115 -0
  637. package/lnd_responses/channel_policy_as_policy.js +89 -0
  638. package/lnd_responses/confirmed_from_payment.d.ts +164 -0
  639. package/lnd_responses/confirmed_from_payment.js +173 -0
  640. package/lnd_responses/confirmed_from_payment_status.js +176 -0
  641. package/lnd_responses/constants.json +90 -0
  642. package/lnd_responses/event_type_from_htlc_event.js +70 -0
  643. package/lnd_responses/failure_from_payment.d.ts +63 -0
  644. package/lnd_responses/failure_from_payment.js +40 -0
  645. package/lnd_responses/forward_from_htlc_event.js +218 -0
  646. package/lnd_responses/htlc_as_payment.js +117 -0
  647. package/lnd_responses/index.d.ts +2 -0
  648. package/lnd_responses/index.js +91 -0
  649. package/lnd_responses/info_as_wallet_info.js +117 -0
  650. package/lnd_responses/node_info_as_node.js +123 -0
  651. package/lnd_responses/parse_thaw_height.js +32 -0
  652. package/lnd_responses/payment_failure.js +182 -0
  653. package/lnd_responses/payment_request_details.js +147 -0
  654. package/lnd_responses/pending_as_pending_channels.js +333 -0
  655. package/lnd_responses/pending_from_payment.js +146 -0
  656. package/lnd_responses/policy_from_channel_update.js +86 -0
  657. package/lnd_responses/route_from_route_hint.js +80 -0
  658. package/lnd_responses/routes_from_query_routes.js +154 -0
  659. package/lnd_responses/routing_failure_from_htlc.js +105 -0
  660. package/lnd_responses/rpc_addresses_as_addresses.js +62 -0
  661. package/lnd_responses/rpc_attempt_htlc_as_attempt.js +147 -0
  662. package/lnd_responses/rpc_channel_as_channel.js +279 -0
  663. package/lnd_responses/rpc_channel_as_old_rpc_channel.js +28 -0
  664. package/lnd_responses/rpc_channel_closed_as_closed.js +79 -0
  665. package/lnd_responses/rpc_channel_update_as_update.js +143 -0
  666. package/lnd_responses/rpc_closed_channel_as_closed.js +193 -0
  667. package/lnd_responses/rpc_conf_as_confirmation.js +62 -0
  668. package/lnd_responses/rpc_failed_policy_as_fail.js +55 -0
  669. package/lnd_responses/rpc_fees_as_channel_fees.js +75 -0
  670. package/lnd_responses/rpc_forward_as_forward.js +92 -0
  671. package/lnd_responses/rpc_forward_as_forward_request.js +133 -0
  672. package/lnd_responses/rpc_group_session_as_session.js +51 -0
  673. package/lnd_responses/rpc_hop_as_hop.js +90 -0
  674. package/lnd_responses/rpc_htlc_as_payment.js +83 -0
  675. package/lnd_responses/rpc_invoice_as_invoice.js +218 -0
  676. package/lnd_responses/rpc_network_as_network_info.js +79 -0
  677. package/lnd_responses/rpc_node_as_node.js +114 -0
  678. package/lnd_responses/rpc_outpoint_as_update.js +40 -0
  679. package/lnd_responses/rpc_payment_as_payment.js +277 -0
  680. package/lnd_responses/rpc_peer_as_peer.js +135 -0
  681. package/lnd_responses/rpc_peer_message_as_message.js +44 -0
  682. package/lnd_responses/rpc_request_update_as_event.js +131 -0
  683. package/lnd_responses/rpc_resolution_as_resolution.js +122 -0
  684. package/lnd_responses/rpc_route_as_route.js +85 -0
  685. package/lnd_responses/rpc_sweep_as_sweep.js +96 -0
  686. package/lnd_responses/rpc_tx_as_transaction.js +145 -0
  687. package/lnd_responses/rpc_utxo_as_utxo.js +86 -0
  688. package/lnd_responses/rpc_wallet_state_as_state.js +55 -0
  689. package/package.json +56 -0
  690. package/test/arrays/test_sort_by.js +47 -0
  691. package/test/bolt00/test_mtokens_amount.js +57 -0
  692. package/test/bolt00/test_payment_amounts.js +85 -0
  693. package/test/bolt00/test_safe_tokens.js +38 -0
  694. package/test/bolt02/test_chain_id.js +25 -0
  695. package/test/grpc/test_emit_subscription_error.js +78 -0
  696. package/test/grpc/test_handle_remove_listener.js +34 -0
  697. package/test/lnd_grpc/test_authenticated_lnd_grpc.js +50 -0
  698. package/test/lnd_grpc/test_decode_serialized.js +45 -0
  699. package/test/lnd_grpc/test_grpc_credentials.js +25 -0
  700. package/test/lnd_grpc/test_grpc_ssl.js +29 -0
  701. package/test/lnd_grpc/test_is_lnd.js +42 -0
  702. package/test/lnd_grpc/test_unauthenticated_lnd_grpc.js +37 -0
  703. package/test/lnd_messages/test_close_channel_request.js +75 -0
  704. package/test/lnd_messages/test_open_channel_request.js +93 -0
  705. package/test/lnd_messages/test_pay_via_route_request.js +81 -0
  706. package/test/lnd_methods/address/test_create_chain_address.js +191 -0
  707. package/test/lnd_methods/address/test_get_public_key.js +127 -0
  708. package/test/lnd_methods/fixtures/get_info_response.json +16 -0
  709. package/test/lnd_methods/fixtures/get_status_response.json +3 -0
  710. package/test/lnd_methods/fixtures/index.js +6 -0
  711. package/test/lnd_methods/fixtures/lookup_invoice_response.js +86 -0
  712. package/test/lnd_methods/fixtures/query_routes_response.json +19 -0
  713. package/test/lnd_methods/generic/test_get_height.js +82 -0
  714. package/test/lnd_methods/generic/test_get_route_confidence.js +143 -0
  715. package/test/lnd_methods/info/test_get_autopilot.js +292 -0
  716. package/test/lnd_methods/info/test_get_channel.js +257 -0
  717. package/test/lnd_methods/info/test_get_configuration.js +81 -0
  718. package/test/lnd_methods/info/test_get_identity.js +60 -0
  719. package/test/lnd_methods/info/test_get_methods.js +81 -0
  720. package/test/lnd_methods/info/test_get_network_centrality.js +66 -0
  721. package/test/lnd_methods/info/test_get_network_graph.js +172 -0
  722. package/test/lnd_methods/info/test_get_network_info.js +64 -0
  723. package/test/lnd_methods/info/test_get_node.js +189 -0
  724. package/test/lnd_methods/info/test_get_route_to_destination.js +236 -0
  725. package/test/lnd_methods/info/test_get_tower_server_info.js +101 -0
  726. package/test/lnd_methods/info/test_get_wallet_info.js +107 -0
  727. package/test/lnd_methods/info/test_get_wallet_version.js +99 -0
  728. package/test/lnd_methods/info/test_stop_daemon.js +57 -0
  729. package/test/lnd_methods/info/test_subscribe_to_graph.js +553 -0
  730. package/test/lnd_methods/invoices/test_cancel_hodl_invoice.js +47 -0
  731. package/test/lnd_methods/invoices/test_create_hodl_invoice.js +146 -0
  732. package/test/lnd_methods/invoices/test_create_invoice.js +179 -0
  733. package/test/lnd_methods/invoices/test_get_invoice.js +59 -0
  734. package/test/lnd_methods/invoices/test_get_invoices.js +168 -0
  735. package/test/lnd_methods/invoices/test_settle_hodl_invoice.js +64 -0
  736. package/test/lnd_methods/invoices/test_subscribe_to_invoice.js +147 -0
  737. package/test/lnd_methods/invoices/test_subscribe_to_invoices.js +142 -0
  738. package/test/lnd_methods/macaroon/test_accept_rpc_request.js +38 -0
  739. package/test/lnd_methods/macaroon/test_get_access_ids.js +75 -0
  740. package/test/lnd_methods/macaroon/test_grant_access.js +130 -0
  741. package/test/lnd_methods/macaroon/test_handle_rpc_request_update.js +249 -0
  742. package/test/lnd_methods/macaroon/test_reject_rpc_request.js +42 -0
  743. package/test/lnd_methods/macaroon/test_revoke_access.js +82 -0
  744. package/test/lnd_methods/macaroon/test_subscribe_to_rpc_requests.js +250 -0
  745. package/test/lnd_methods/macaroon/test_uris_for_method.js +46 -0
  746. package/test/lnd_methods/macaroon/test_verify_access.js +103 -0
  747. package/test/lnd_methods/message/test_sign_message.js +62 -0
  748. package/test/lnd_methods/message/test_verify_message.js +74 -0
  749. package/test/lnd_methods/offchain/test_connect_watchtower.js +68 -0
  750. package/test/lnd_methods/offchain/test_decode_payment_request.js +95 -0
  751. package/test/lnd_methods/offchain/test_delete_failed_pay_attempts.js +51 -0
  752. package/test/lnd_methods/offchain/test_delete_failed_payments.js +33 -0
  753. package/test/lnd_methods/offchain/test_delete_forwarding_reputations.js +33 -0
  754. package/test/lnd_methods/offchain/test_delete_payment.js +52 -0
  755. package/test/lnd_methods/offchain/test_delete_payments.js +33 -0
  756. package/test/lnd_methods/offchain/test_delete_pending_channel.js +100 -0
  757. package/test/lnd_methods/offchain/test_disable_channel.js +66 -0
  758. package/test/lnd_methods/offchain/test_disconnect_watchtower.js +66 -0
  759. package/test/lnd_methods/offchain/test_enable_channel.js +84 -0
  760. package/test/lnd_methods/offchain/test_finished_payment.js +145 -0
  761. package/test/lnd_methods/offchain/test_get_backup.js +82 -0
  762. package/test/lnd_methods/offchain/test_get_backups.js +74 -0
  763. package/test/lnd_methods/offchain/test_get_channel_balance.js +168 -0
  764. package/test/lnd_methods/offchain/test_get_channels.js +306 -0
  765. package/test/lnd_methods/offchain/test_get_closed_channels.js +334 -0
  766. package/test/lnd_methods/offchain/test_get_connected_watchtowers.js +298 -0
  767. package/test/lnd_methods/offchain/test_get_ephemeral_channel_ids.js +70 -0
  768. package/test/lnd_methods/offchain/test_get_failed_payments.js +162 -0
  769. package/test/lnd_methods/offchain/test_get_fee_rates.js +80 -0
  770. package/test/lnd_methods/offchain/test_get_forwarding_confidence.js +105 -0
  771. package/test/lnd_methods/offchain/test_get_forwarding_reputations.js +151 -0
  772. package/test/lnd_methods/offchain/test_get_forwards.js +125 -0
  773. package/test/lnd_methods/offchain/test_get_pathfinding_settings.js +98 -0
  774. package/test/lnd_methods/offchain/test_get_payment.js +245 -0
  775. package/test/lnd_methods/offchain/test_get_payments.js +219 -0
  776. package/test/lnd_methods/offchain/test_get_pending_channels.js +57 -0
  777. package/test/lnd_methods/offchain/test_get_pending_payments.js +162 -0
  778. package/test/lnd_methods/offchain/test_get_route_through_hops.js +257 -0
  779. package/test/lnd_methods/offchain/test_get_settlement_status.js +103 -0
  780. package/test/lnd_methods/offchain/test_is_destination_payable.js +276 -0
  781. package/test/lnd_methods/offchain/test_list_payments.js +47 -0
  782. package/test/lnd_methods/offchain/test_pay.js +202 -0
  783. package/test/lnd_methods/offchain/test_pay_via_payment_details.js +326 -0
  784. package/test/lnd_methods/offchain/test_pay_via_payment_request.js +233 -0
  785. package/test/lnd_methods/offchain/test_pay_via_routes.js +429 -0
  786. package/test/lnd_methods/offchain/test_recover_funds_from_channel.js +86 -0
  787. package/test/lnd_methods/offchain/test_recover_funds_from_channels.js +52 -0
  788. package/test/lnd_methods/offchain/test_route_failure_keys.js +56 -0
  789. package/test/lnd_methods/offchain/test_send_message_to_peer.js +64 -0
  790. package/test/lnd_methods/offchain/test_subscribe_to_backups.js +117 -0
  791. package/test/lnd_methods/offchain/test_subscribe_to_channels.js +333 -0
  792. package/test/lnd_methods/offchain/test_subscribe_to_forwards.js +104 -0
  793. package/test/lnd_methods/offchain/test_subscribe_to_open_requests.js +144 -0
  794. package/test/lnd_methods/offchain/test_subscribe_to_past_payment.js +29 -0
  795. package/test/lnd_methods/offchain/test_subscribe_to_past_payments.js +279 -0
  796. package/test/lnd_methods/offchain/test_subscribe_to_pay.js +50 -0
  797. package/test/lnd_methods/offchain/test_subscribe_to_pay_via_routes.js +415 -0
  798. package/test/lnd_methods/offchain/test_subscribe_to_payments.js +169 -0
  799. package/test/lnd_methods/offchain/test_subscribe_to_peer_messages.js +133 -0
  800. package/test/lnd_methods/offchain/test_subscribe_to_probe_for_route.js +303 -0
  801. package/test/lnd_methods/offchain/test_update_connected_watchtower.js +90 -0
  802. package/test/lnd_methods/offchain/test_update_pathfinding_settings.js +135 -0
  803. package/test/lnd_methods/offchain/test_update_routing_fees.js +194 -0
  804. package/test/lnd_methods/offchain/test_verify_backup.js +48 -0
  805. package/test/lnd_methods/offchain/test_verify_backups.js +85 -0
  806. package/test/lnd_methods/onchain/test_broadcast_chain_transaction.js +97 -0
  807. package/test/lnd_methods/onchain/test_cancel_pending_channel.js +40 -0
  808. package/test/lnd_methods/onchain/test_close_channel.js +214 -0
  809. package/test/lnd_methods/onchain/test_create_funded_psbt.js +135 -0
  810. package/test/lnd_methods/onchain/test_delete_chain_transaction.js +85 -0
  811. package/test/lnd_methods/onchain/test_fund_pending_channels.js +121 -0
  812. package/test/lnd_methods/onchain/test_fund_psbt.js +196 -0
  813. package/test/lnd_methods/onchain/test_get_block.js +233 -0
  814. package/test/lnd_methods/onchain/test_get_block_header.js +243 -0
  815. package/test/lnd_methods/onchain/test_get_chain_addresses.js +77 -0
  816. package/test/lnd_methods/onchain/test_get_chain_balance.js +53 -0
  817. package/test/lnd_methods/onchain/test_get_chain_fee_estimate.js +107 -0
  818. package/test/lnd_methods/onchain/test_get_chain_fee_rate.js +67 -0
  819. package/test/lnd_methods/onchain/test_get_chain_transaction.js +124 -0
  820. package/test/lnd_methods/onchain/test_get_chain_transactions.js +181 -0
  821. package/test/lnd_methods/onchain/test_get_locked_utxos.js +106 -0
  822. package/test/lnd_methods/onchain/test_get_master_public_keys.js +96 -0
  823. package/test/lnd_methods/onchain/test_get_minimum_relay_fee.js +71 -0
  824. package/test/lnd_methods/onchain/test_get_pending_chain_balance.js +55 -0
  825. package/test/lnd_methods/onchain/test_get_pending_sweeps.js +92 -0
  826. package/test/lnd_methods/onchain/test_get_sweep_transactions.js +126 -0
  827. package/test/lnd_methods/onchain/test_get_utxos.js +150 -0
  828. package/test/lnd_methods/onchain/test_lock_utxo.js +95 -0
  829. package/test/lnd_methods/onchain/test_open_channel.js +229 -0
  830. package/test/lnd_methods/onchain/test_open_channels.js +203 -0
  831. package/test/lnd_methods/onchain/test_partially_sign_psbt.js +102 -0
  832. package/test/lnd_methods/onchain/test_prepare_for_channel_proposal.js +97 -0
  833. package/test/lnd_methods/onchain/test_propose_channel.js +191 -0
  834. package/test/lnd_methods/onchain/test_request_batched_fee_increase.js +111 -0
  835. package/test/lnd_methods/onchain/test_request_chain_fee_increase.js +89 -0
  836. package/test/lnd_methods/onchain/test_script_from_chain_address.js +74 -0
  837. package/test/lnd_methods/onchain/test_send_to_chain_address.js +157 -0
  838. package/test/lnd_methods/onchain/test_send_to_chain_addresses.js +141 -0
  839. package/test/lnd_methods/onchain/test_send_to_chain_output_scripts.js +90 -0
  840. package/test/lnd_methods/onchain/test_set_autopilot.js +200 -0
  841. package/test/lnd_methods/onchain/test_sign_chain_address_message.js +88 -0
  842. package/test/lnd_methods/onchain/test_sign_psbt.js +96 -0
  843. package/test/lnd_methods/onchain/test_subscribe_to_blocks.js +104 -0
  844. package/test/lnd_methods/onchain/test_subscribe_to_chain_address.js +88 -0
  845. package/test/lnd_methods/onchain/test_subscribe_to_chain_spend.js +74 -0
  846. package/test/lnd_methods/onchain/test_subscribe_to_transactions.js +147 -0
  847. package/test/lnd_methods/onchain/test_unlock_utxo.js +63 -0
  848. package/test/lnd_methods/onchain/test_update_chain_transaction.js +81 -0
  849. package/test/lnd_methods/onchain/test_verify_chain_address_message.js +112 -0
  850. package/test/lnd_methods/peers/test_add_advertised_feature.js +57 -0
  851. package/test/lnd_methods/peers/test_add_external_socket.js +57 -0
  852. package/test/lnd_methods/peers/test_add_peer.js +144 -0
  853. package/test/lnd_methods/peers/test_get_peers.js +57 -0
  854. package/test/lnd_methods/peers/test_remove_advertised_feature.js +57 -0
  855. package/test/lnd_methods/peers/test_remove_external_socket.js +57 -0
  856. package/test/lnd_methods/peers/test_remove_peer.js +47 -0
  857. package/test/lnd_methods/peers/test_subscribe_to_peers.js +146 -0
  858. package/test/lnd_methods/peers/test_update_alias.js +57 -0
  859. package/test/lnd_methods/peers/test_update_color.js +57 -0
  860. package/test/lnd_methods/signer/test_begin_group_signing_session.js +283 -0
  861. package/test/lnd_methods/signer/test_diffie_hellman_compute_secret.js +99 -0
  862. package/test/lnd_methods/signer/test_end_group_signing_session.js +95 -0
  863. package/test/lnd_methods/signer/test_input_signing_method.js +54 -0
  864. package/test/lnd_methods/signer/test_sign_bytes.js +113 -0
  865. package/test/lnd_methods/signer/test_sign_transaction.js +116 -0
  866. package/test/lnd_methods/signer/test_update_group_signing_session.js +110 -0
  867. package/test/lnd_methods/signer/test_verify_bytes_signature.js +90 -0
  868. package/test/lnd_methods/unauthenticated/test_change_password.js +55 -0
  869. package/test/lnd_methods/unauthenticated/test_create_seed.js +84 -0
  870. package/test/lnd_methods/unauthenticated/test_create_wallet.js +78 -0
  871. package/test/lnd_methods/unauthenticated/test_get_wallet_status.js +55 -0
  872. package/test/lnd_methods/unauthenticated/test_subscribe_to_wallet_status.js +145 -0
  873. package/test/lnd_methods/unauthenticated/test_unlock_wallet.js +54 -0
  874. package/test/lnd_requests/test_destination_custom_records.js +27 -0
  875. package/test/lnd_requests/test_ignore_as_ignored_nodes.js +57 -0
  876. package/test/lnd_requests/test_ignore_as_ignored_pairs.js +56 -0
  877. package/test/lnd_requests/test_route_hint_from_route.js +74 -0
  878. package/test/lnd_requests/test_rpc_hop_from_hop.js +85 -0
  879. package/test/lnd_requests/test_rpc_route_from_route.js +133 -0
  880. package/test/lnd_responses/test_backups_from_snapshot.js +154 -0
  881. package/test/lnd_responses/test_channel_accept_as_open_request.js +145 -0
  882. package/test/lnd_responses/test_channel_edge_as_channel.js +155 -0
  883. package/test/lnd_responses/test_channel_policy_as_policy.js +153 -0
  884. package/test/lnd_responses/test_confirmed_from_payment.js +161 -0
  885. package/test/lnd_responses/test_confirmed_from_payment_status.js +165 -0
  886. package/test/lnd_responses/test_failure_from_payment.js +82 -0
  887. package/test/lnd_responses/test_forward_from_htlc_event.js +330 -0
  888. package/test/lnd_responses/test_htlc_as_payment.js +145 -0
  889. package/test/lnd_responses/test_info_as_wallet_info.js +169 -0
  890. package/test/lnd_responses/test_node_info_as_node.js +211 -0
  891. package/test/lnd_responses/test_payment_failure.js +268 -0
  892. package/test/lnd_responses/test_payment_request_details.js +170 -0
  893. package/test/lnd_responses/test_pending_as_pending_channels.js +453 -0
  894. package/test/lnd_responses/test_pending_from_payment.js +146 -0
  895. package/test/lnd_responses/test_policy_from_channel_update.js +110 -0
  896. package/test/lnd_responses/test_route_from_route_hint.js +144 -0
  897. package/test/lnd_responses/test_routes_from_query_routes.js +150 -0
  898. package/test/lnd_responses/test_routing_failure_from_htlc.js +139 -0
  899. package/test/lnd_responses/test_rpc_addresses_as_addresses.js +84 -0
  900. package/test/lnd_responses/test_rpc_attempt_htlc_as_attempt.js +129 -0
  901. package/test/lnd_responses/test_rpc_channel_as_channel.js +310 -0
  902. package/test/lnd_responses/test_rpc_channel_closed_as_closed.js +113 -0
  903. package/test/lnd_responses/test_rpc_channel_update_as_update.js +208 -0
  904. package/test/lnd_responses/test_rpc_closed_channel_as_closed.js +191 -0
  905. package/test/lnd_responses/test_rpc_conf_as_confirmation.js +77 -0
  906. package/test/lnd_responses/test_rpc_failed_policy_as_fail.js +69 -0
  907. package/test/lnd_responses/test_rpc_fees_as_channel_fees.js +106 -0
  908. package/test/lnd_responses/test_rpc_forward_as_forward.js +143 -0
  909. package/test/lnd_responses/test_rpc_forward_as_forward_request.js +142 -0
  910. package/test/lnd_responses/test_rpc_group_session_as_session.js +81 -0
  911. package/test/lnd_responses/test_rpc_hop_as_hop.js +119 -0
  912. package/test/lnd_responses/test_rpc_htlc_as_payment.js +122 -0
  913. package/test/lnd_responses/test_rpc_invoice_as_invoice.js +266 -0
  914. package/test/lnd_responses/test_rpc_network_as_network_info.js +95 -0
  915. package/test/lnd_responses/test_rpc_node_as_node.js +125 -0
  916. package/test/lnd_responses/test_rpc_outpoint_as_update.js +58 -0
  917. package/test/lnd_responses/test_rpc_payment_as_payment.js +350 -0
  918. package/test/lnd_responses/test_rpc_peer_as_peer.js +159 -0
  919. package/test/lnd_responses/test_rpc_peer_message_as_message.js +69 -0
  920. package/test/lnd_responses/test_rpc_request_update_as_event.js +138 -0
  921. package/test/lnd_responses/test_rpc_resolution_as_resolution.js +152 -0
  922. package/test/lnd_responses/test_rpc_route_as_route.js +101 -0
  923. package/test/lnd_responses/test_rpc_sweep_as_sweep.js +135 -0
  924. package/test/lnd_responses/test_rpc_tx_as_transaction.js +183 -0
  925. package/test/lnd_responses/test_rpc_utxo_as_utxo.js +103 -0
  926. package/test/lnd_responses/test_rpc_wallet_state_as_state.js +72 -0
  927. package/test/typescript/add_external_socket.test-d.ts +14 -0
  928. package/test/typescript/add_peer.test-d.ts +15 -0
  929. package/test/typescript/attempt_route.test-d.ts +62 -0
  930. package/test/typescript/authenticated_lightning_method.test-d.ts +18 -0
  931. package/test/typescript/authenticated_lnd_grpc.test-d.ts +23 -0
  932. package/test/typescript/begin_group_signing_session.test-d.ts +60 -0
  933. package/test/typescript/broadcast_chain_transaction.test-d.ts +38 -0
  934. package/test/typescript/cancel_hodl_invoice.test-d.ts +14 -0
  935. package/test/typescript/cancel_pending_channel.test-d.ts +15 -0
  936. package/test/typescript/change_password.test-d.ts +22 -0
  937. package/test/typescript/close_channel.test-d.ts +275 -0
  938. package/test/typescript/confirmed_from_payment.test-d.ts +60 -0
  939. package/test/typescript/connect_watchtower.test-d.ts +19 -0
  940. package/test/typescript/create_chain_address.test-d.ts +35 -0
  941. package/test/typescript/create_hodl_invoice.test-d.ts +67 -0
  942. package/test/typescript/create_invoice.test-d.ts +67 -0
  943. package/test/typescript/create_seed.test-d.ts +17 -0
  944. package/test/typescript/create_wallet.test-d.ts +33 -0
  945. package/test/typescript/decode_payment_request.test-d.ts +24 -0
  946. package/test/typescript/delete_failed_pay_attempts.test-d.ts +11 -0
  947. package/test/typescript/delete_failed_payments.test-d.ts +11 -0
  948. package/test/typescript/delete_forwarding_reputations.test-d.ts +12 -0
  949. package/test/typescript/delete_payment.test-d.ts +15 -0
  950. package/test/typescript/delete_payments.test-d.ts +12 -0
  951. package/test/typescript/delete_pending_channel.test-d.ts +43 -0
  952. package/test/typescript/diffie_hellman_compute_secret.test-d.ts +74 -0
  953. package/test/typescript/disable_channel.test-d.ts +21 -0
  954. package/test/typescript/disconnect_watchtower.test-d.ts +16 -0
  955. package/test/typescript/emit_payment.test-d.ts +18 -0
  956. package/test/typescript/enable_channel.test-d.ts +35 -0
  957. package/test/typescript/end_group_signing_session.test-d.ts +32 -0
  958. package/test/typescript/failure_from_payment.test-d.ts +49 -0
  959. package/test/typescript/finished_payment.test-d.ts +67 -0
  960. package/test/typescript/fund_pending_channels.test-d.ts +21 -0
  961. package/test/typescript/fund_psbt.test-d.ts +33 -0
  962. package/test/typescript/get_access_ids.test-d.ts +16 -0
  963. package/test/typescript/get_autopilot.test-d.ts +23 -0
  964. package/test/typescript/get_backup.test-d.ts +25 -0
  965. package/test/typescript/get_backups.test-d.ts +16 -0
  966. package/test/typescript/get_block.test-d.ts +26 -0
  967. package/test/typescript/get_block_header.test-d.ts +26 -0
  968. package/test/typescript/get_chain_addresses.test-d.ts +16 -0
  969. package/test/typescript/get_chain_balance.test-d.ts +16 -0
  970. package/test/typescript/get_chain_fee_estimate.test-d.ts +34 -0
  971. package/test/typescript/get_chain_fee_rate.test-d.ts +26 -0
  972. package/test/typescript/get_chain_transactions.test-d.ts +30 -0
  973. package/test/typescript/get_channel.test-d.ts +25 -0
  974. package/test/typescript/get_channel_balance.test-d.ts +16 -0
  975. package/test/typescript/get_channels.test-d.ts +39 -0
  976. package/test/typescript/get_closed_channels.test-d.ts +46 -0
  977. package/test/typescript/get_connected_watchtowers.test-d.ts +38 -0
  978. package/test/typescript/get_failed_payments.test-d.ts +31 -0
  979. package/test/typescript/get_fee_rates.test-d.ts +16 -0
  980. package/test/typescript/get_forwarding_confidence.test-d.ts +38 -0
  981. package/test/typescript/get_forwarding_reputations.test-d.ts +21 -0
  982. package/test/typescript/get_forwards.test-d.ts +33 -0
  983. package/test/typescript/get_height.test-d.ts +16 -0
  984. package/test/typescript/get_identity.test-d.ts +16 -0
  985. package/test/typescript/get_invoice.test-d.ts +19 -0
  986. package/test/typescript/get_invoices.test-d.ts +45 -0
  987. package/test/typescript/get_locked_utxos.test-d.ts +16 -0
  988. package/test/typescript/get_master_public_keys.test-d.ts +19 -0
  989. package/test/typescript/get_methods.test-d.ts +16 -0
  990. package/test/typescript/get_network_centrality.ts +19 -0
  991. package/test/typescript/get_network_graph.test-d.ts +16 -0
  992. package/test/typescript/get_network_info.test-d.ts +16 -0
  993. package/test/typescript/get_node.test-d.ts +30 -0
  994. package/test/typescript/get_pathfinding_settings.test-d.ts +19 -0
  995. package/test/typescript/get_payment.test-d.ts +19 -0
  996. package/test/typescript/get_payments.test-d.ts +31 -0
  997. package/test/typescript/get_peers.test-d.ts +14 -0
  998. package/test/typescript/get_pending_chain_balance.test-d.ts +19 -0
  999. package/test/typescript/get_pending_channels.test-d.ts +16 -0
  1000. package/test/typescript/get_pending_payments.test-d.ts +31 -0
  1001. package/test/typescript/get_public_key.test-d.ts +26 -0
  1002. package/test/typescript/get_route_confidence.test-d.ts +36 -0
  1003. package/test/typescript/get_route_through_hops.test-d.ts +43 -0
  1004. package/test/typescript/get_route_to_destination.test-d.ts +61 -0
  1005. package/test/typescript/get_settlement_status.test-d.ts +26 -0
  1006. package/test/typescript/get_sweep_transactions.test-d.ts +19 -0
  1007. package/test/typescript/get_tower_server_info.test-d.ts +16 -0
  1008. package/test/typescript/get_utxos.test-d.ts +27 -0
  1009. package/test/typescript/get_wallet_info.test-d.ts +16 -0
  1010. package/test/typescript/get_wallet_status.test-d.ts +16 -0
  1011. package/test/typescript/get_wallet_version.test-d.ts +16 -0
  1012. package/test/typescript/grant_access.test-d.ts +19 -0
  1013. package/test/typescript/is_destination_payable.test-d.ts +24 -0
  1014. package/test/typescript/lock_utxo.test-d.ts +30 -0
  1015. package/test/typescript/open_channel.test-d.ts +61 -0
  1016. package/test/typescript/open_channels.test-d.ts +50 -0
  1017. package/test/typescript/partially_sign_psbt.test-d.ts +18 -0
  1018. package/test/typescript/pay.test-d.ts +54 -0
  1019. package/test/typescript/pay_via_payment_details.test-d.ts +72 -0
  1020. package/test/typescript/pay_via_payment_request.test-d.ts +25 -0
  1021. package/test/typescript/pay_via_routes.test-d.ts +39 -0
  1022. package/test/typescript/prepare_for_channel_proposal.test-d.ts +65 -0
  1023. package/test/typescript/probe_for_route.test-d.ts +39 -0
  1024. package/test/typescript/propose_channel.test-d.ts +44 -0
  1025. package/test/typescript/recover_funds_from_channel.test-d.ts +15 -0
  1026. package/test/typescript/recover_funds_from_channels.test-d.ts +17 -0
  1027. package/test/typescript/remove_external_socket.test-d.ts +14 -0
  1028. package/test/typescript/remove_peer.test-d.ts +12 -0
  1029. package/test/typescript/request_chain_fee_increase.test-d.ts +45 -0
  1030. package/test/typescript/revoke_access.test-d.ts +15 -0
  1031. package/test/typescript/route_failure_keys.test-d.ts +20 -0
  1032. package/test/typescript/script_from_chain_address.test-d.ts +30 -0
  1033. package/test/typescript/send_message_to_peer.test-d.ts +24 -0
  1034. package/test/typescript/send_to_chain_address.test-d.ts +64 -0
  1035. package/test/typescript/send_to_chain_addresses.test-d.ts +57 -0
  1036. package/test/typescript/send_to_chain_output_scripts.test-d.ts +46 -0
  1037. package/test/typescript/set_autopilot.test-d.ts +33 -0
  1038. package/test/typescript/settle_hodl_invoice.test-d.ts +15 -0
  1039. package/test/typescript/sign_bytes.test-d.ts +40 -0
  1040. package/test/typescript/sign_chain_address_message.test-d.ts +27 -0
  1041. package/test/typescript/sign_message.test-d.ts +19 -0
  1042. package/test/typescript/sign_psbt.test-d.ts +19 -0
  1043. package/test/typescript/sign_transaction.test-d.ts +58 -0
  1044. package/test/typescript/stop_daemon.test-d.ts +12 -0
  1045. package/test/typescript/subscribe_to_backups.test-d.ts +11 -0
  1046. package/test/typescript/subscribe_to_blocks.test-d.ts +11 -0
  1047. package/test/typescript/subscribe_to_chain_address.test-d.ts +53 -0
  1048. package/test/typescript/subscribe_to_chain_spend.test-d.ts +51 -0
  1049. package/test/typescript/subscribe_to_channels.test-d.ts +11 -0
  1050. package/test/typescript/subscribe_to_forward_requests.test-d.ts +11 -0
  1051. package/test/typescript/subscribe_to_forwards.test-d.ts +11 -0
  1052. package/test/typescript/subscribe_to_graph.test-d.ts +11 -0
  1053. package/test/typescript/subscribe_to_invoice.test-d.ts +14 -0
  1054. package/test/typescript/subscribe_to_invoices.test-d.ts +17 -0
  1055. package/test/typescript/subscribe_to_open_requests.test-d.ts +11 -0
  1056. package/test/typescript/subscribe_to_past_payment.test-d.ts +14 -0
  1057. package/test/typescript/subscribe_to_past_payments.test-d.ts +11 -0
  1058. package/test/typescript/subscribe_to_pay.test-d.ts +19 -0
  1059. package/test/typescript/subscribe_to_pay_via_details.test-d.ts +14 -0
  1060. package/test/typescript/subscribe_to_pay_via_request.test-d.ts +14 -0
  1061. package/test/typescript/subscribe_to_pay_via_routes.test-d.ts +39 -0
  1062. package/test/typescript/subscribe_to_peer_messages.test-d.ts +11 -0
  1063. package/test/typescript/subscribe_to_peers.test-d.ts +11 -0
  1064. package/test/typescript/subscribe_to_probe_for_route.test-d.ts +14 -0
  1065. package/test/typescript/subscribe_to_rpc_requests.test-d.ts +46 -0
  1066. package/test/typescript/subscribe_to_transactions.test-d.ts +11 -0
  1067. package/test/typescript/subscribe_to_wallet_status.test-d.ts +11 -0
  1068. package/test/typescript/unauthenticated_lnd_grpc.test-d.ts +11 -0
  1069. package/test/typescript/unlock_utxo.test-d.ts +19 -0
  1070. package/test/typescript/unlock_wallet.test-d.ts +16 -0
  1071. package/test/typescript/update_alias.test-d.ts +14 -0
  1072. package/test/typescript/update_chain_transaction.test-d.ts +19 -0
  1073. package/test/typescript/update_color.test-d.ts +14 -0
  1074. package/test/typescript/update_connected_watchtower.test-d.ts +36 -0
  1075. package/test/typescript/update_group_signing_session.test-d.ts +29 -0
  1076. package/test/typescript/update_pathfinding_settings.test-d.ts +38 -0
  1077. package/test/typescript/update_routing_fees.test-d.ts +35 -0
  1078. package/test/typescript/verify_access.test-d.ts +23 -0
  1079. package/test/typescript/verify_backup.test-d.ts +19 -0
  1080. package/test/typescript/verify_backups.test-d.ts +29 -0
  1081. package/test/typescript/verify_bytes_signature.test-d.ts +46 -0
  1082. package/test/typescript/verify_chain_address_message.test-d.ts +32 -0
  1083. package/test/typescript/verify_message.test-d.ts +24 -0
  1084. package/typescript/index.d.ts +1 -0
  1085. package/typescript/shared.d.ts +153 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019-2024 Alex Bosworth
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,393 @@
1
+ # Lightning
2
+
3
+ [![npm version](https://badge.fury.io/js/lightning.svg)](https://badge.fury.io/js/lightning)
4
+
5
+ Methods for working with the Lightning Network
6
+
7
+ ## Selected Projects using Lightning
8
+
9
+ - [bitpay.com crypto-rpc](https://bitpay.com/) -
10
+ https://github.com/bitpay/crypto-rpc
11
+ - [channel.ninja](https://channel.ninja/) -
12
+ https://github.com/channelninja/channel.ninja
13
+ - [coinos.io](https://coinos.io/) - https://github.com/coinos/coinos-server
14
+ - [Galoy](https://galoy.io/) - https://github.com/GaloyMoney/galoy
15
+ - [Lightning Poker](https://lightning-poker.com/) -
16
+ https://github.com/igreshev/lightning-poker
17
+ - [Lightning Roulette](https://lightning-roulette.com/) -
18
+ https://github.com/igreshev/lightning-roulette
19
+ - [Lightning Shell](https://lightningshell.app/) -
20
+ https://github.com/ibz/lightning-shell
21
+ - [LNMarkets](https://twitter.com/lnmarkets) -
22
+ https://github.com/lnmarkets/umbrel
23
+ - [LNPingBot](https://github.com/swissrouting/lnpingbot) -
24
+ https://github.com/swissrouting/lnpingbot
25
+ - [MutinyWallet faucet](https://github.com/MutinyWallet/mutinynet-faucet) -
26
+ https://www.mutinywallet.com/
27
+ - [p2plnbot](https://telegram.me/lnp2pbot) - https://github.com/grunch/p2plnbot
28
+ - [rekr](https://rekr.app/) - https://github.com/ryan-lingle/rekr
29
+ - [stackernews](https://stacker.news/) -
30
+ https://github.com/stackernews/stacker.news
31
+ - [Suredbits API](https://suredbits.com/) -
32
+ https://github.com/Suredbits/sb-api-lnd
33
+ - [Synonym Blocktank server](https://synonym.to) -
34
+ https://github.com/synonymdev/blocktank-server/
35
+ - [Tarnhelm](https://www.tarnhelm.app/) - https://github.com/bkiac/tarnhelm
36
+ - [tbtcswaps](https://tbtcswaps.com/) -
37
+ https://github.com/keep-community/tbtcswaps
38
+ - [Thunderhub](https://www.thunderhub.io/) -
39
+ https://github.com/apotdevin/thunderhub
40
+
41
+ ## LND Authentication
42
+
43
+ To connect to an LND node, authentication details are required.
44
+
45
+ Export credentials via CLI:
46
+ [balanceofsatoshis](https://github.com/alexbosworth/balanceofsatoshis):
47
+ `npm install -g balanceofsatoshis` and export via `bos credentials --cleartext`
48
+
49
+ Or export them manually:
50
+
51
+ Run `base64` on the tls.cert and admin.macaroon files to get the encoded
52
+ authentication data to create the LND connection. You can find these files in
53
+ the LND directory. (~/.lnd or ~/Library/Application Support/Lnd)
54
+
55
+ base64 -w0 ~/.lnd/tls.cert
56
+ base64 -w0 ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
57
+
58
+ You can then use these to interact with your LND node directly:
59
+
60
+ ```node
61
+ const {authenticatedLndGrpc} = require('lightning');
62
+
63
+ const {lnd} = authenticatedLndGrpc({
64
+ cert: 'base64 encoded tls.cert file',
65
+ macaroon: 'base64 encoded admin.macaroon file',
66
+ socket: '127.0.0.1:10009',
67
+ });
68
+ ```
69
+
70
+ To access unauthenticated methods like the wallet unlocker, use
71
+ `unauthenticatedLndGrpc` instead.
72
+
73
+ ## Debugging
74
+
75
+ If you encounter any issues connecting and wish to view detailed information
76
+ about the underlying grpc calls, you can run Node with these environment
77
+ variables set:
78
+
79
+ GRPC_VERBOSITY=DEBUG GRPC_TRACE=all node YOURSCRIPTNAME.js
80
+
81
+ ## Methods
82
+
83
+ - [addAdvertisedFeature](https://github.com/alexbosworth/ln-service#addadvertisedfeature):
84
+ Add a new supported feature to the graph node announcement
85
+ - [addExternalSocket](https://github.com/alexbosworth/ln-service#addexternalsocket):
86
+ Add a new LN p2p network socket to node advertisement
87
+ - [addPeer](https://github.com/alexbosworth/ln-service#addpeer): Connect to a new peer
88
+ - [authenticatedLndGrpc](https://github.com/alexbosworth/ln-service#authenticatedlndgrpc):
89
+ Instantiate connection to authenticated lnd methods.
90
+ - [beginGroupSigningSession](https://github.com/alexbosworth/ln-service#begingroupsigningsession):
91
+ Start a new MuSig2 signing session
92
+ - [broadcastChainTransaction](https://github.com/alexbosworth/ln-service#broadcastchaintransaction):
93
+ Publish an on-chain transaction to the network.
94
+ - [cancelHodlInvoice](https://github.com/alexbosworth/ln-service#cancelhodlinvoice): Cancel an
95
+ open invoice.
96
+ - [cancelPendingChannel](https://github.com/alexbosworth/ln-service#cancelpendingchannel):
97
+ Cancel a pending channel.
98
+ - [closeChannel](https://github.com/alexbosworth/ln-service#closechannel): Close a channel out to
99
+ the chain.
100
+ - [changePassword](https://github.com/alexbosworth/ln-service#changepassword): Update the
101
+ wallet encryption passphrase.
102
+ - [connectWatchtower](https://github.com/alexbosworth/ln-service#connectwatchtower): Connect a
103
+ new watchtower.
104
+ - [createChainAddress](https://github.com/alexbosworth/ln-service#createchainaddress): Generate
105
+ a chain address to receive on-chain funds.
106
+ - [createFundedPsbt](https://github.com/alexbosworth/ln-service#createfundedpsbt):
107
+ Create a funded PSBT given inputs and outputs
108
+ - [createHodlInvoice](https://github.com/alexbosworth/ln-service#createhodlinvoice): Make a new
109
+ off-chain invoice that will not automatically accept payment.
110
+ - [createInvoice](https://github.com/alexbosworth/ln-service#createinvoice): Make a new off-chain
111
+ invoice.
112
+ - [createSeed](https://github.com/alexbosworth/ln-service#createseed): Generate a random wallet
113
+ HD seed.
114
+ - [createWallet](https://github.com/alexbosworth/ln-service#createwallet): Make a new wallet.
115
+ - [decodePaymentRequest](https://github.com/alexbosworth/ln-service#decodepaymentrequest):
116
+ Get parsed details for a payment request.
117
+ - [deleteChainTransaction](https://github.com/alexbosworth/ln-service#deletechaintransaction)
118
+ Delete a broadcast chain transaction
119
+ - [deleteFailedPayAttempts](https://github.com/alexbosworth/ln-service#deletefailedpayattempts)
120
+ Remove failed payment paths from database.
121
+ - [deleteFailedPayments](https://github.com/alexbosworth/ln-service#deletefailedpayments)
122
+ Remove failed payments from the database.
123
+ - [deleteForwardingReputations](https://github.com/alexbosworth/ln-service#deleteforwardingreputations)
124
+ Clear pathfinding reputations of routing nodes and channels.
125
+ - [deletePayment](https://github.com/alexbosworth/ln-service#deletepayment): Remove a
126
+ past payment record.
127
+ - [deletePayments](https://github.com/alexbosworth/ln-service#deletepayments): Remove all
128
+ past payment records.
129
+ - [diffieHellmanComputeSecret](https://github.com/alexbosworth/ln-service#diffiehellmancomputesecret):
130
+ Calculate a shared secret to enable symmetric encryption of data to another node.
131
+ - [disableChannel](https://github.com/alexbosworth/ln-service#disablechannel): Signal disabled
132
+ forwarding to a peer
133
+ - [disconnectWatchtower](https://github.com/alexbosworth/ln-service#disconnectwatchtower):
134
+ Remove a connected watchtower
135
+ - [enableChannel](https://github.com/alexbosworth/ln-service#enablechannel): Signal forwarding
136
+ enabled towards a peer.
137
+ - [endGroupSigningSession](https://github.com/alexbosworth/ln-service#endgroupsigningsession):
138
+ End a MuSig2 signing session
139
+ - [fundPendingChannels](https://github.com/alexbosworth/ln-service#fundpendingchannels):
140
+ Provide a signed funding source for opening channels.
141
+ - [fundPsbt](https://github.com/alexbosworth/ln-service#fundpsbt): Make a PSBT with funds and
142
+ change to setup a future on-chain spend.
143
+ - [getAccessIds](https://github.com/alexbosworth/ln-service#getaccessids): List the access tokens
144
+ granted permission to access the node.
145
+ - [getAutopilot](https://github.com/alexbosworth/ln-service#getautopilot): Retrieve channel open
146
+ autopilot configuration.
147
+ - [getBackup](https://github.com/alexbosworth/ln-service#getbackup): Get recovery details for a
148
+ specific channel.
149
+ - [getBackups](https://github.com/alexbosworth/ln-service#getbackups): Get recovery details for
150
+ all channels.
151
+ - [getBlock](https://github.com/alexbosworth/ln-service#getblock): Get a block
152
+ - [getBlockHeader](https://github.com/alexbosworth/ln-service#getblockheader):
153
+ Get a block header
154
+ - [getChainAddresses](https://github.com/alexbosworth/ln-service#getchainaddresses):
155
+ Get a list of created chain addresses
156
+ - [getChainBalance](https://github.com/alexbosworth/ln-service#getchainbalance): Get the amount
157
+ of on-chain funds.
158
+ - [getChainFeeEstimate](https://github.com/alexbosworth/ln-service#getchainfeeestimate):
159
+ Estimate a chain fee to send funds to an address.
160
+ - [getChainFeeRate](https://github.com/alexbosworth/ln-service#getchainfeerate): Get an estimate
161
+ for an on-chain fee rate.
162
+ - [getChainTransaction](https://github.com/alexbosworth/ln-service#getchaintransaction):
163
+ Get a wallet on-chain transaction.
164
+ - [getChainTransactions](https://github.com/alexbosworth/ln-service#getchaintransactions): List
165
+ past on-chain transactions.
166
+ - [getChannel](https://github.com/alexbosworth/ln-service#getchannel): Lookup network graph
167
+ details about a channel.
168
+ - [getChannelBalance](https://github.com/alexbosworth/ln-service#getchannelbalance): Calculate
169
+ the total off-chain balance on the node.
170
+ - [getChannels](https://github.com/alexbosworth/ln-service#getchannels): List open channels on
171
+ the node.
172
+ - [getClosedChannels](https://github.com/alexbosworth/ln-service#getclosedchannels): List closed
173
+ channels on the node.
174
+ - [getConfiguration](https://github.com/alexbosworth/ln-service#getconfiguration):
175
+ Get the configuration file settings for the node and the log.
176
+ - [getConnectedWatchtowers](https://github.com/alexbosworth/ln-service#getconnectedwatchtowers):
177
+ List watchtowers that were added
178
+ - [getEphemeralChannelIds](https://github.com/alexbosworth/ln-service#getephemeralchannelids):
179
+ List other channel ids for channels
180
+ - [getFailedPayments](https://github.com/alexbosworth/ln-service#getfailedpayments): List out
181
+ past payments that failed.
182
+ - [getFeeRates](https://github.com/alexbosworth/ln-service#getfeerates): List routing fee rates
183
+ and routing policies of channels on the node.
184
+ - [getForwardingConfidence](https://github.com/alexbosworth/ln-service#getforwardingconfidence):
185
+ Calculate the pathfinding confidence score for routing a payment.
186
+ - [getForwardingReputations](https://github.com/alexbosworth/ln-service#getforwardingreputations):
187
+ List the pathfinding reputations for payment routing.
188
+ - [getForwards](https://github.com/alexbosworth/ln-service#getforwards): List past forwards routed
189
+ through the node.
190
+ - [getHeight](https://github.com/alexbosworth/ln-service#getheight): Lookup the current best chain
191
+ height.
192
+ - [getIdentity](https://github.com/alexbosworth/ln-service#getidentity): Derive the identity public
193
+ key of the node.
194
+ - [getInvoice](https://github.com/alexbosworth/ln-service#getinvoice): Lookup the status of an
195
+ invoice.
196
+ - [getInvoices](https://github.com/alexbosworth/ln-service#getinvoices): List details of all past
197
+ open invoices and received payments.
198
+ - [getLockedUtxos](https://github.com/alexbosworth/ln-service#getlockedutxos): List the UTXOs
199
+ that are currently reserved and unavailable to coin selection.
200
+ - [getMasterPublicKeys](https://github.com/alexbosworth/ln-service#getmasterpublickeys):
201
+ List out master seed derived extended public keys and derivation paths.
202
+ - [getMethods](https://github.com/alexbosworth/ln-service#getmethods): List RPC methods and
203
+ permissions required to use them.
204
+ - [getMinimumRelayFee](https://github.com/alexbosworth/ln-service#getminimumrelayfee):
205
+ Get the minimum relayable fee for publishing a chain transaction
206
+ - [getNetworkCentrality](https://github.com/alexbosworth/ln-service#getnetworkcentrality):
207
+ Calculate the graph centrality score of a node.
208
+ - [getNetworkGraph](https://github.com/alexbosworth/ln-service#getnetworkgraph): List all graph
209
+ routing nodes and all channels.
210
+ - [getNetworkInfo](https://github.com/alexbosworth/ln-service#getnetworkinfo): Calculate network
211
+ graph statistics.
212
+ - [getNode](https://github.com/alexbosworth/ln-service#getnode): Retrieve graph details for a
213
+ node and optionally list its channels.
214
+ - [getPathfindingSettings](https://github.com/alexbosworth/ln-service#getpathfindingsettings):
215
+ List out configuration options set for routing.
216
+ - [getPayment](https://github.com/alexbosworth/ln-service#getpayment): Lookup details about a
217
+ past payment.
218
+ - [getPayments](https://github.com/alexbosworth/ln-service#getpayments): List details about past
219
+ payment attempts and paid payment requests.
220
+ - [getPeers](https://github.com/alexbosworth/ln-service#getpeers): List details of connected nodes.
221
+ - [getPendingChainBalance](https://github.com/alexbosworth/ln-service#getpendingchainbalance):
222
+ Calculate the unconfirmed on-chain balance.
223
+ - [getPendingChannels](https://github.com/alexbosworth/ln-service#getpendingchannels): List
224
+ details of opening or closing channels.
225
+ - [getPendingPayments](https://github.com/alexbosworth/ln-service#getpendingpayments): List out
226
+ past pending payments.
227
+ - [getPendingSweeps](https://github.com/alexbosworth/ln-service#getpendingsweeps):
228
+ List out queued outpoints that are being swept
229
+ - [getPublicKey](https://github.com/alexbosworth/ln-service#getpublickey): Derive a public key at
230
+ a given index.
231
+ - [getRouteConfidence](https://github.com/alexbosworth/ln-service#getrouteconfidence): Check a
232
+ route to see the pathfinding confidence score that a payment would succeed.
233
+ - [getRouteThroughHops](https://github.com/alexbosworth/ln-service#getroutethroughhops):
234
+ Calculate a route through specified nodes.
235
+ - [getRouteToDestination](https://github.com/alexbosworth/ln-service#getroutetodestination):
236
+ Calculate a route through the graph to a destination.
237
+ - [getSettlementStatus](https://github.com/alexbosworth/ln-service#getsettlementstatus):
238
+ Lookup the status of a received payment output
239
+ - [getSweepTransactions](https://github.com/alexbosworth/ln-service#getsweeptransactions): List
240
+ transactions that are sweeping funds on-chain.
241
+ - [getTowerServerInfo](https://github.com/alexbosworth/ln-service#gettowerserverinfo): General
242
+ information about a watchtower server running.
243
+ - [getUtxos](https://github.com/alexbosworth/ln-service#getutxos): List unspent transaction outputs
244
+ in the on-chain wallet.
245
+ - [getWalletInfo](https://github.com/alexbosworth/ln-service#getwalletinfo): Lookup general details
246
+ about the node.
247
+ - [getWalletStatus](https://github.com/alexbosworth/ln-service#getwalletstatus): Fetch the current
248
+ state of the wallet.
249
+ - [getWalletVersion](https://github.com/alexbosworth/ln-service#getwalletversion): Retrieve the
250
+ version and build tags of the node.
251
+ - [grantAccess](https://github.com/alexbosworth/ln-service#grantaccess): Create an access
252
+ credential macaroon to access the API.
253
+ - [isDestinationPayable](https://github.com/alexbosworth/ln-service#isdestinationpayable): Check
254
+ if a destination can be paid
255
+ - [lockUtxo](https://github.com/alexbosworth/ln-service#lockutxo): Lease a UTXO so it cannot be
256
+ chosen to be spent.
257
+ - [openChannel](https://github.com/alexbosworth/ln-service#openchannel): Create a new channel
258
+ to another node.
259
+ - [openChannels](https://github.com/alexbosworth/ln-service#openchannels): Open
260
+ multiple channels in a single on-chain transaction batch.
261
+ - [partiallySignPsbt](https://github.com/alexbosworth/ln-service#partiallysignpsbt):
262
+ Add a partial signature to a PSBT
263
+ - [pay](https://github.com/alexbosworth/ln-service#pay): Make an off-chain payment.
264
+ - [payViaPaymentDetails](https://github.com/alexbosworth/ln-service#payviapaymentdetails): Pay
265
+ off-chain using details about a destination invoice.
266
+ - [payViaPaymentRequest](https://github.com/alexbosworth/ln-service#payviapaymentrequest):
267
+ Pay a payment request off-chain.
268
+ - [payViaRoutes](https://github.com/alexbosworth/ln-service#payviaroutes): Pay to a destination
269
+ using a specified route or routes.
270
+ - [prepareForChannelProposal](https://github.com/alexbosworth/ln-service#prepareforchannelproposal):
271
+ Prepare to receive a custom channel proposal.
272
+ - [probeForRoute](https://github.com/alexbosworth/ln-service#probeforroute): Run a probe to find a
273
+ route to pay to a destination.
274
+ - [proposeChannel](https://github.com/alexbosworth/ln-service#proposechannel): Propose a new
275
+ channel to a peer who has prepared for the channel proposal.
276
+ - [recoverFundsFromChannel](https://github.com/alexbosworth/ln-service#recoverfundsfromchannel):
277
+ Attempt to recover channel funds from a specific channel backup.
278
+ - [recoverFundsFromChannels](https://github.com/alexbosworth/ln-service#recoverfundsfromchannels):
279
+ Attempt to recover funds from multiple channels using a multiple channel backup.
280
+ - [removeAdvertisedFeature](https://github.com/alexbosworth/ln-service#removeadvertisedfeature):
281
+ Remove a supported feature from the graph node announcement
282
+ - [removeExternalSocket](https://github.com/alexbosworth/ln-service#removeexternalsocket):
283
+ Remove a LN p2p network socket from the node advertisement
284
+ - [removePeer](https://github.com/alexbosworth/ln-service#removepeer): Disconnect from a
285
+ connected peer.
286
+ - [requestBatchedFeeIncrease](https://github.com/alexbosworth/ln-service#requestbatchedfeeincrease):
287
+ Ask for a batched CPFP chain fee rate increase on a pending confirm UTXO
288
+ - [requestChainFeeIncrease](https://github.com/alexbosworth/ln-service#requestchainfeeincrease):
289
+ Ask for a CPFP chain fee rate increase on a pending confirm UTXO.
290
+ - [revokeAccess](https://github.com/alexbosworth/ln-service#revokeaccess): Remove the access
291
+ privileges of a previously issued access token macaroon credential.
292
+ - [sendMessageToPeer](https://github.com/alexbosworth/ln-service#sendmessagetopeer): Send
293
+ message to a connected peer.
294
+ - [sendToChainAddress](https://github.com/alexbosworth/ln-service#sendtochainaddress): Send
295
+ funds on-chain to an address.
296
+ - [sendToChainAddresses](https://github.com/alexbosworth/ln-service#sendtochainaddresses):
297
+ Send funds on-chain to multiple chain addresses.
298
+ - [sendToChainOutputScripts](https://github.com/alexbosworth/ln-service#sendtochainoutputscripts):
299
+ Send funds on-chain to multiple chain destinations, specifying outputs scripts, not addresses.
300
+ - [setAutopilot](https://github.com/alexbosworth/ln-service#setautopilot): Set the open channel
301
+ autopilot configuration settings.
302
+ - [settleHodlInvoice](https://github.com/alexbosworth/ln-service#settlehodlinvoice): Take incoming
303
+ off-chain funds when an invoice has held funds from an incoming payment.
304
+ - [signBytes](https://github.com/alexbosworth/ln-service#signbytes): Use node keys to sign over an
305
+ arbitrary set of bytes.
306
+ - [signChainAddressMessage](https://github.com/alexbosworth/ln-service#signchainaddressmessage):
307
+ Sign a message using the public key behind a chain address with ECDSA
308
+ - [signMessage](https://github.com/alexbosworth/ln-service#signmessage): Use the node identity
309
+ key to generate a signed message that represents the public graph node identity.
310
+ - [signPsbt](https://github.com/alexbosworth/ln-service#signpsbt): Sign inputs and finalize a
311
+ partially signed transaction in the PSBT format to prepare it for broadcast.
312
+ - [signTransaction](https://github.com/alexbosworth/ln-service#signtransaction): Generate
313
+ signatures required for inputs on a transaction.
314
+ - [stopDaemon](https://github.com/alexbosworth/ln-service#stopdaemon): Send a shutdown
315
+ request to cleanly kill the daemon.
316
+ - [subscribeToBackups](https://github.com/alexbosworth/ln-service#subscribetobackups): Get
317
+ notified on channel funds recovery backup file updates.
318
+ - [subscribeToBlocks](https://github.com/alexbosworth/ln-service#subscribetoblocks): Get notified
319
+ when the Blockchain is updated.
320
+ - [subscribeToChainAddress](https://github.com/alexbosworth/ln-service#subscribetochainaddress):
321
+ Get notified when funds are sent to an on-chain address.
322
+ - [subscribeToChainSpend](https://github.com/alexbosworth/ln-service#subscribetochainspend):
323
+ Get notified when a UTXO is spent.
324
+ - [subscribeToChannels](https://github.com/alexbosworth/ln-service#subscribetochannels): Get
325
+ notified when the set of active channels is updated.
326
+ - [subscribeToForwardRequests](https://github.com/alexbosworth/ln-service#subscribetoforwardrequests):
327
+ Get notified on requests to begin forward flows and interactively accept or reject or settle them.
328
+ - [subscribeToForwards](https://github.com/alexbosworth/ln-service#subscribetoforwards): Get
329
+ notified on off-chain routed payment events.
330
+ - [subscribeToGraph](https://github.com/alexbosworth/ln-service#subscribetograph): Get notified
331
+ of changes to the public routing graph nodes and channels.
332
+ - [subscribeToInvoice](https://github.com/alexbosworth/ln-service#subscribetoinvoice): Get notified
333
+ of status updates for incoming payments.
334
+ - [subscribeToInvoices](https://github.com/alexbosworth/ln-service#subscribetoinvoices): Get
335
+ notified of status updates on past created invoices.
336
+ - [subscribeToOpenRequests](https://github.com/alexbosworth/ln-service#subscribetoopenrequests):
337
+ Get notified on requests to open an inbound channel and interactively accept or reject them.
338
+ - [subscribeToPastPayment](https://github.com/alexbosworth/ln-service#subscribetopastpayment):
339
+ Get notified of the current and ongoing status of a past off-chain payment.
340
+ - [subscribeToPastPayments](https://github.com/alexbosworth/ln-service#subscribetopastpayments):
341
+ Get notified of successful outgoing payments.
342
+ - [subscribeToPayViaDetails](https://github.com/alexbosworth/ln-service#subscribetopayviadetails):
343
+ Make an off-chain payment using payment details and subscribe to the status of that payment.
344
+ - [subscribeToPayViaRequest](https://github.com/alexbosworth/ln-service#subscribetopayviarequest):
345
+ Make an off-chain payment using a payment request and subscribe to the payment status.
346
+ - [subscribeToPayViaRoutes](https://github.com/alexbosworth/ln-service#subscribetopayviaroutes):
347
+ Start an off-chain payment using specific payment routes and subscribe to the payment result.
348
+ - [subscribeToPayments](https://github.com/alexbosworth/ln-service#subscribetopayments):
349
+ Subscribe to off-chain payments going out and being resolved
350
+ - [subscribeToPeerMessages](https://github.com/alexbosworth/ln-service#subscribetopeermessages):
351
+ Listen for incoming peer messages.
352
+ - [subscribeToPeers](https://github.com/alexbosworth/ln-service#subscribetopeers): Listen to peer
353
+ disconnect and connect events.
354
+ - [subscribeToProbeForRoute](https://github.com/alexbosworth/ln-service#subscribetoprobeforroute):
355
+ Start an off-chain probe to find a payable route and get notified on the status of the probe.
356
+ - [subscribeToRpcRequests](https://github.com/alexbosworth/ln-service#subscribetorpcrequests):
357
+ Intercept all incoming and outgoing traffic to the RPC
358
+ - [subscribeToTransactions](https://github.com/alexbosworth/ln-service#subscribetotransactions):
359
+ Get notified on on-chain transaction activity.
360
+ - [subscribeToWalletStatus](https://github.com/alexbosworth/ln-service#subscribetowalletstatus):
361
+ Listen to updates to wallet state
362
+ - [unauthenticatedLndGrpc](https://github.com/alexbosworth/ln-service#unauthenticatedlndgrpc):
363
+ Create an lnd object for use with methods that do not require authentication credentials.
364
+ - [unlockUtxo](https://github.com/alexbosworth/ln-service#unlockutxo): Release a lease on a wallet
365
+ UTXO to allow it to be selected for spending again.
366
+ - [unlockWallet](https://github.com/alexbosworth/ln-service#unlockwallet): Decrypt the wallet and
367
+ start the daemon
368
+ - [updateAlias](https://github.com/alexbosworth/ln-service#updatealias):
369
+ Update the advertised node alias
370
+ - [updateChainTransaction](https://github.com/alexbosworth/ln-service#updatechaintransaction):
371
+ Edit the metadata of an on-chain transaction record.
372
+ - [updateColor](https://github.com/alexbosworth/ln-service#updatecolor):
373
+ Update the advertised node color
374
+ - [updateConnectedWatchtower](https://github.com/alexbosworth/ln-service#updateconnectedwatchtower):
375
+ Edit the settings on an added watchtower
376
+ - [updateGroupSigningSession](https://github.com/alexbosworth/ln-service#updategroupsigningsession):
377
+ Update a MuSig2 signing session with nonces and get a partial signature
378
+ - [updatePathfindingSettings](https://github.com/alexbosworth/ln-service#updatepathfindingsettings):
379
+ Edit the configuration for routing calculations
380
+ - [updateRoutingFees](https://github.com/alexbosworth/ln-service#updateroutingfees): Set the
381
+ forwarding fees or other routing policies for a channel or all channels.
382
+ - [verifyAccess](https://github.com/alexbosworth/ln-service#verifyaccess): Confirm a macaroon
383
+ has permission to access a given resource.
384
+ - [verifyBackup](https://github.com/alexbosworth/ln-service#verifybackup): Check if a channel fund
385
+ recovery backup file is valid.
386
+ - [verifyBackups](https://github.com/alexbosworth/ln-service#verifybackups): Check if multiple
387
+ channel fund recovery backups are valid.
388
+ - [verifyBytesSignature](https://github.com/alexbosworth/ln-service#verifybytessignature): Check
389
+ that a signature over arbitrary bytes is valid.
390
+ - [verifyChainAddressMessage](https://github.com/alexbosworth/ln-service#verifychainaddressmessage):
391
+ Verify that a chain address message has a valid ECDSA signature
392
+ - [verifyMessage](https://github.com/alexbosworth/ln-service#verifymessage): Check that a
393
+ message from a node in the graph has a valid signature.
@@ -0,0 +1,3 @@
1
+ const sortBy = require('./sort_by');
2
+
3
+ module.exports = {sortBy};
@@ -0,0 +1,44 @@
1
+ const {isArray} = Array;
2
+
3
+ const equalTo = 0;
4
+ const greaterThan = 1;
5
+ const lessThan = -1;
6
+
7
+ /** Sort array by attribute, lowest to highest
8
+
9
+ {
10
+ array: [<Array Element Object>]
11
+ attribute: <Attribute String>
12
+ }
13
+
14
+ @throws
15
+ <Error>
16
+
17
+ @returns
18
+ {
19
+ sorted: [<Sorted Element Object>]
20
+ }
21
+ */
22
+ module.exports = ({array, attribute}) => {
23
+ if (!isArray(array)) {
24
+ throw new Error('ExpectedArrayToSortByAttribute');
25
+ }
26
+
27
+ if (!attribute) {
28
+ throw new Error('ExpectedAttributeToSortArrayBy');
29
+ }
30
+
31
+ const sorted = array.slice().sort((a, b) => {
32
+ if (a[attribute] > b[attribute]) {
33
+ return greaterThan;
34
+ }
35
+
36
+ if (b[attribute] > a[attribute]) {
37
+ return lessThan;
38
+ }
39
+
40
+ return equalTo;
41
+ });
42
+
43
+ return {sorted};
44
+ };
@@ -0,0 +1,5 @@
1
+ const mtokensAmount = require('./mtokens_amount');
2
+ const paymentAmounts = require('./payment_amounts');
3
+ const safeTokens = require('./safe_tokens');
4
+
5
+ module.exports = {mtokensAmount, paymentAmounts, safeTokens};
@@ -0,0 +1,44 @@
1
+ const isNumber = n => !isNaN(n);
2
+ const tokensAsMtokens = tokens => (BigInt(tokens) * BigInt(1e3)).toString();
3
+
4
+ /** Derive millitokens from tokens and mtokens
5
+
6
+ {
7
+ [mtokens]: <Millitokens String>
8
+ [tokens]: <Tokens Number>
9
+ }
10
+
11
+ @throws <Error>
12
+
13
+ @returns
14
+ {
15
+ [mtokens]: <Millitokens String>
16
+ }
17
+ */
18
+ module.exports = ({mtokens, tokens}) => {
19
+ // Exit early when no tokens are specified
20
+ if (!mtokens && tokens === undefined) {
21
+ return {};
22
+ }
23
+
24
+ if (!mtokens && !isNumber(tokens)) {
25
+ throw new Error('ExpectedEitherTokensNumberOrMtokensStringForAmountValue');
26
+ }
27
+
28
+ // Exit early when there is only tokens set
29
+ if (!mtokens) {
30
+ return {mtokens: tokensAsMtokens(tokens)};
31
+ }
32
+
33
+ // Exit early when there is only mtokens set
34
+ if (tokens === undefined) {
35
+ return {mtokens};
36
+ }
37
+
38
+ // Exit early when the mtokens and tokens don't agree
39
+ if (mtokens !== tokensAsMtokens(tokens)) {
40
+ throw new Error('ExpectedEqualValuesForTokensAndMtokens');
41
+ }
42
+
43
+ return {mtokens};
44
+ };
@@ -0,0 +1,89 @@
1
+ const isString = n => typeof n === 'string';
2
+ const {MAX_SAFE_INTEGER} = Number;
3
+ const mtokPerTok = BigInt(1e3);
4
+
5
+ /** Determine the amounts to use for payments
6
+
7
+ Either mtokens or tokens are required
8
+
9
+ Specifying both mtokens and tokens is not supported unless they are equal
10
+
11
+ Specifying differing max_fee and max_fee_mtokens is not supported
12
+
13
+ {
14
+ [max_fee]: <Maximum Tokens Fee Number>
15
+ [max_fee_mtokens]: <Maximum Millitokens Fee String>
16
+ [mtokens]: <Millitokens String>
17
+ [request]: <BOLT 11 Request String>
18
+ [tokens]: <Tokens Number>
19
+ }
20
+
21
+ @throws
22
+ <Error>
23
+
24
+ @returns
25
+ {
26
+ [max_fee]: <Max Fee Tokens Number>
27
+ [max_fee_mtokens]: <Max Fee Millitokens String>
28
+ [mtokens]: <Millitokens String<
29
+ [tokens]: <Tokens Number>
30
+ }
31
+ */
32
+ module.exports = args => {
33
+ const amounts = {};
34
+
35
+ const hasMaxFeeMtokens = !!args.max_fee_mtokens;
36
+ const hasMaxFeeTokens = args.max_fee !== undefined;
37
+ const hasMtokens = !!args.mtokens;
38
+ const hasTokens = args.tokens !== undefined;
39
+
40
+ if (args.max_fee_mtokens !== undefined && !isString(args.max_fee_mtokens)) {
41
+ throw new Error('ExpectedMaxFeeMtokensValueAsString');
42
+ }
43
+
44
+ if (!args.request && !hasMtokens && !hasTokens) {
45
+ throw new Error('ExpectedAmountFromRequestOrMillitokensOrTokens');
46
+ }
47
+
48
+ if (hasMaxFeeTokens && hasMaxFeeMtokens) {
49
+ const maxFeeAsMtokens = (BigInt(args.max_fee) * mtokPerTok).toString();
50
+
51
+ // Cannot specify both max fee millitokens and also tokens if they differ
52
+ if (maxFeeAsMtokens !== args.max_fee_mtokens) {
53
+ throw new Error('UnexpectedDifferingMaxFeeAndMaxFeeMtokens');
54
+ }
55
+
56
+ // Since the millitokens and tokens are set, use the default max_fee
57
+ amounts.max_fee = args.max_fee;
58
+ } else if (hasMaxFeeTokens) {
59
+ amounts.max_fee = args.max_fee;
60
+ } else if (hasMaxFeeMtokens) {
61
+ amounts.max_fee_mtokens = args.max_fee_mtokens;
62
+ } else {
63
+ amounts.max_fee = MAX_SAFE_INTEGER;
64
+ }
65
+
66
+ if (hasTokens && hasMtokens) {
67
+ const tokensAsMtokens = (BigInt(args.tokens) * mtokPerTok).toString();
68
+
69
+ // Cannot specify both millitokens and also tokens if they differ
70
+ if (tokensAsMtokens !== args.mtokens) {
71
+ throw new Error('UnexpectedDifferingMtokensAndTokens');
72
+ }
73
+
74
+ amounts.tokens = args.tokens;
75
+ } else if (hasTokens) {
76
+ amounts.tokens = args.tokens;
77
+ } else if (!args.request) {
78
+ amounts.mtokens = args.mtokens;
79
+ } else if (hasMtokens) {
80
+ amounts.mtokens = args.mtokens;
81
+ }
82
+
83
+ return {
84
+ max_fee: amounts.max_fee,
85
+ max_fee_mtokens: amounts.max_fee_mtokens,
86
+ mtokens: amounts.mtokens,
87
+ tokens: amounts.tokens,
88
+ };
89
+ };
@@ -0,0 +1,31 @@
1
+ const mtokensPerToken = BigInt(1e3);
2
+
3
+ /** Get a safe token number for paid tokens.
4
+
5
+ This means it is rounded up from millitokens. It's not safe to consider
6
+ tokens rounded down in the case that you are reducing a corresponding balance
7
+
8
+ {
9
+ mtokens: <Millitokens String>
10
+ }
11
+
12
+ {
13
+ safe: <Tokens Rounded Down Number>
14
+ tokens: <Tokens Rounded Up Number>
15
+ }
16
+ */
17
+ module.exports = ({mtokens}) => {
18
+ // Get a normalized number of mtokens, rounded down
19
+ const tokens = Number(BigInt(mtokens) / mtokensPerToken);
20
+
21
+ // Convert tokens to their mtokens equivalent
22
+ const tokensAsMtokens = BigInt(tokens) * mtokensPerToken;
23
+
24
+ // Exit early when there is no fractional difference
25
+ if (tokensAsMtokens === BigInt(mtokens)) {
26
+ return {tokens, safe: tokens};
27
+ }
28
+
29
+ // Safe tokens are rounded up and regular tokens are rounded down
30
+ return {tokens, safe: tokens + [tokens].length};
31
+ };
@@ -0,0 +1,27 @@
1
+ const {chains} = require('./ids');
2
+
3
+ /** Chain id for chain
4
+
5
+ {
6
+ chain: <Chain Name String>
7
+ network: <Network Type String>
8
+ }
9
+
10
+ @returns
11
+ {
12
+ [chain]: <Chain Id Hex String>
13
+ }
14
+ */
15
+ module.exports = ({chain, network}) => {
16
+ if (!chain || !network) {
17
+ return {};
18
+ }
19
+
20
+ const id = chains[`${chain}${network}`];
21
+
22
+ if (!id) {
23
+ return {};
24
+ }
25
+
26
+ return {chain: Buffer.from(id, 'hex').reverse().toString('hex')};
27
+ };