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.
- package/.gitattributes +2 -0
- package/.tm_properties +1 -0
- package/.yarn/cache/@babel-code-frame-npm-7.25.7-40a9f53f43-f235cdf9c5.zip +0 -0
- package/.yarn/cache/@babel-helper-validator-identifier-npm-7.25.7-1c758f0472-062f55208d.zip +0 -0
- package/.yarn/cache/@babel-highlight-npm-7.25.7-308b20da71-b6aa45c5bf.zip +0 -0
- package/.yarn/cache/@grpc-grpc-js-npm-1.12.2-733ec8eabe-ee51317f92.zip +0 -0
- package/.yarn/cache/@grpc-proto-loader-npm-0.7.13-be5b6af1c1-399c1b8a46.zip +0 -0
- package/.yarn/cache/@jest-schemas-npm-29.6.3-292730e442-910040425f.zip +0 -0
- package/.yarn/cache/@js-sdsl-ordered-map-npm-4.4.2-158f6c6b74-a927ae4ff8.zip +0 -0
- package/.yarn/cache/@noble-hashes-npm-1.5.0-87c768d742-9cc031d5c8.zip +0 -0
- package/.yarn/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-a970d595bd.zip +0 -0
- package/.yarn/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-012480b5ca.zip +0 -0
- package/.yarn/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-190c643f15.zip +0 -0
- package/.yarn/cache/@protobufjs-aspromise-npm-1.1.2-71d00b938f-011fe7ef08.zip +0 -0
- package/.yarn/cache/@protobufjs-base64-npm-1.1.2-cd8ca6814a-67173ac34d.zip +0 -0
- package/.yarn/cache/@protobufjs-codegen-npm-2.0.4-36e188bbe6-59240c850b.zip +0 -0
- package/.yarn/cache/@protobufjs-eventemitter-npm-1.1.0-029cc7d431-0369163a3d.zip +0 -0
- package/.yarn/cache/@protobufjs-fetch-npm-1.1.0-ca857b7df4-3fce7e09eb.zip +0 -0
- package/.yarn/cache/@protobufjs-float-npm-1.0.2-5678f64d08-5781e12412.zip +0 -0
- package/.yarn/cache/@protobufjs-inquire-npm-1.1.0-3c7759e9ce-ca06f02eaf.zip +0 -0
- package/.yarn/cache/@protobufjs-path-npm-1.1.2-641d08de76-856eeb532b.zip +0 -0
- package/.yarn/cache/@protobufjs-pool-npm-1.1.0-47a76f96a1-d6a34fbbd2.zip +0 -0
- package/.yarn/cache/@protobufjs-utf8-npm-1.1.0-02c590807c-f9bf3163d1.zip +0 -0
- package/.yarn/cache/@sinclair-typebox-npm-0.27.8-23e206d653-00bd7362a3.zip +0 -0
- package/.yarn/cache/@tsd-typescript-npm-5.4.5-31c3b104b3-86498d5e15.zip +0 -0
- package/.yarn/cache/@types-caseless-npm-0.12.5-d7dbdab81c-f6a3628add.zip +0 -0
- package/.yarn/cache/@types-eslint-npm-7.29.0-46534a7300-df13991c55.zip +0 -0
- package/.yarn/cache/@types-estree-npm-1.0.6-b5e23f2ea2-8825d6e729.zip +0 -0
- package/.yarn/cache/@types-json-schema-npm-7.0.15-fd16381786-97ed0cb44d.zip +0 -0
- package/.yarn/cache/@types-minimist-npm-1.2.5-c85664a9d8-477047b606.zip +0 -0
- package/.yarn/cache/@types-node-npm-22.7.5-0428b60a8c-1a8bbb504e.zip +0 -0
- package/.yarn/cache/@types-node-npm-22.7.6-cbb64e0ad4-6afe2a1bd7.zip +0 -0
- package/.yarn/cache/@types-normalize-package-data-npm-2.4.4-676a8ba353-65dff72b54.zip +0 -0
- package/.yarn/cache/@types-request-npm-2.48.12-d921ef35cb-20dfad0a46.zip +0 -0
- package/.yarn/cache/@types-tough-cookie-npm-4.0.5-8c5e2162e1-f19409d019.zip +0 -0
- package/.yarn/cache/@types-ws-npm-8.5.12-90c42288cf-ddefb6ad16.zip +0 -0
- package/.yarn/cache/ansi-escapes-npm-4.3.2-3ad173702f-93111c4218.zip +0 -0
- package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
- package/.yarn/cache/ansi-styles-npm-3.2.1-8cb8107983-d85ade01c1.zip +0 -0
- package/.yarn/cache/ansi-styles-npm-4.3.0-245c7d42c7-513b44c3b2.zip +0 -0
- package/.yarn/cache/ansi-styles-npm-5.2.0-72fc7003e3-d7f4e97ce0.zip +0 -0
- package/.yarn/cache/array-union-npm-2.1.0-4e4852b221-5bee12395c.zip +0 -0
- package/.yarn/cache/arrify-npm-1.0.1-affafba9fe-745075dd4a.zip +0 -0
- package/.yarn/cache/async-npm-3.2.4-aba13508f9-43d07459a4.zip +0 -0
- package/.yarn/cache/async-npm-3.2.6-aa4f5aa081-ee6eb8cd8a.zip +0 -0
- package/.yarn/cache/asyncjs-util-npm-1.2.12-f1ef4c2905-55ff005a7f.zip +0 -0
- package/.yarn/cache/asynckit-npm-0.4.0-c718858525-7b78c451df.zip +0 -0
- package/.yarn/cache/base-x-npm-3.0.10-2d05c06792-5230773955.zip +0 -0
- package/.yarn/cache/base-x-npm-4.0.0-64a1f6fa5e-b25db9e07e.zip +0 -0
- package/.yarn/cache/bech32-npm-2.0.0-ad98b7dd79-fa15acb270.zip +0 -0
- package/.yarn/cache/bip174-npm-2.1.1-d9fcaf36f9-bc5b99e7d1.zip +0 -0
- package/.yarn/cache/bip66-npm-1.1.5-e1d2ea7768-956cff6e51.zip +0 -0
- package/.yarn/cache/bitcoin-ops-npm-1.4.1-e1e62763b3-3daa3303d6.zip +0 -0
- package/.yarn/cache/bitcoinjs-lib-npm-6.1.3-8b823f7e69-b1d9ffd999.zip +0 -0
- package/.yarn/cache/bitcoinjs-lib-npm-6.1.6-d063b5a8ff-04370cf699.zip +0 -0
- package/.yarn/cache/bn.js-npm-5.2.1-dc952b1965-3dd8c8d380.zip +0 -0
- package/.yarn/cache/bolt07-npm-1.8.4-297a4ac40d-58cdf15aba.zip +0 -0
- package/.yarn/cache/bolt07-npm-1.9.4-6f74865601-d18efc5f83.zip +0 -0
- package/.yarn/cache/bolt09-npm-1.0.0-b3d5b54cf9-09d53b86f2.zip +0 -0
- package/.yarn/cache/bolt09-npm-2.1.0-1fc0cfcef2-629cd3bdd4.zip +0 -0
- package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
- package/.yarn/cache/bs58-npm-4.0.1-8d2a7822b1-b3c5365bb9.zip +0 -0
- package/.yarn/cache/bs58-npm-5.0.0-da02537b92-2475cb0684.zip +0 -0
- package/.yarn/cache/bs58check-npm-2.1.2-4e87e40195-43bdf08a5d.zip +0 -0
- package/.yarn/cache/bs58check-npm-3.0.1-be32851e5e-dbbecc7a09.zip +0 -0
- package/.yarn/cache/camelcase-keys-npm-6.2.2-d13777ec12-43c9af1adf.zip +0 -0
- package/.yarn/cache/camelcase-npm-5.3.1-5db8af62c5-e6effce26b.zip +0 -0
- package/.yarn/cache/chalk-npm-2.4.2-3ea16dd91e-ec3661d38f.zip +0 -0
- package/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-fe75c9d5c7.zip +0 -0
- package/.yarn/cache/cipher-base-npm-1.0.4-2e98b97140-47d3568dbc.zip +0 -0
- package/.yarn/cache/cliui-npm-8.0.1-3b029092cf-79648b3b00.zip +0 -0
- package/.yarn/cache/color-convert-npm-1.9.3-1fe690075e-fd7a64a17c.zip +0 -0
- package/.yarn/cache/color-convert-npm-2.0.1-79730e935b-79e6bdb9fd.zip +0 -0
- package/.yarn/cache/color-name-npm-1.1.3-728b7b5d39-09c5d3e33d.zip +0 -0
- package/.yarn/cache/color-name-npm-1.1.4-025792b0ea-b044585952.zip +0 -0
- package/.yarn/cache/combined-stream-npm-1.0.8-dc14d4a63a-49fa4aeb49.zip +0 -0
- package/.yarn/cache/create-hash-npm-1.2.0-afd048e1ce-02a6ae3bb9.zip +0 -0
- package/.yarn/cache/decamelize-keys-npm-1.1.1-4cfa36ed4b-fc645fe20b.zip +0 -0
- package/.yarn/cache/decamelize-npm-1.2.0-c5a2fdc622-ad8c51a7e7.zip +0 -0
- package/.yarn/cache/delayed-stream-npm-1.0.0-c5a4c4cc02-46fe6e83e2.zip +0 -0
- package/.yarn/cache/diff-sequences-npm-29.6.3-18ab2c9949-f4914158e1.zip +0 -0
- package/.yarn/cache/dir-glob-npm-3.0.1-1aea628b1b-fa05e18324.zip +0 -0
- package/.yarn/cache/ecpair-npm-2.1.0-d034fc21e2-924a776808.zip +0 -0
- package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
- package/.yarn/cache/error-ex-npm-1.3.2-5654f80c0f-c1c2b8b65f.zip +0 -0
- package/.yarn/cache/escalade-npm-3.2.0-19b50dd48f-47b029c83d.zip +0 -0
- package/.yarn/cache/escape-string-regexp-npm-1.0.5-3284de402f-6092fda75c.zip +0 -0
- package/.yarn/cache/eslint-formatter-pretty-npm-4.1.0-30790f28b4-e8e0cd3843.zip +0 -0
- package/.yarn/cache/eslint-rule-docs-npm-1.1.235-64d33df34f-b163596f9a.zip +0 -0
- package/.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip +0 -0
- package/.yarn/cache/fastq-npm-1.17.1-56d4554993-a8c5b26788.zip +0 -0
- package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
- package/.yarn/cache/find-up-npm-4.1.0-c3ccf8d855-4c172680e8.zip +0 -0
- package/.yarn/cache/form-data-npm-2.5.2-f40bcd738c-89ed3d9623.zip +0 -0
- package/.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-2b0ff4ce70.zip +0 -0
- package/.yarn/cache/get-caller-file-npm-2.0.5-80e8a86305-b9769a836d.zip +0 -0
- package/.yarn/cache/glob-parent-npm-5.1.2-021ab32634-f4f2bfe242.zip +0 -0
- package/.yarn/cache/globby-npm-11.1.0-bdcdf20c71-b4be8885e0.zip +0 -0
- package/.yarn/cache/hard-rejection-npm-2.1.0-a80f2a977d-7baaf80a0c.zip +0 -0
- package/.yarn/cache/has-flag-npm-3.0.0-16ac11fe05-4a15638b45.zip +0 -0
- package/.yarn/cache/has-flag-npm-4.0.0-32af9f0536-261a135703.zip +0 -0
- package/.yarn/cache/hash-base-npm-3.1.0-26fc5711dd-26b7e97ac3.zip +0 -0
- package/.yarn/cache/hasown-npm-2.0.2-80fe6c9901-e8516f776a.zip +0 -0
- package/.yarn/cache/hosted-git-info-npm-2.8.9-62c44fa93f-c955394bda.zip +0 -0
- package/.yarn/cache/hosted-git-info-npm-4.1.0-4efcdf8fd3-c3f87b3c2f.zip +0 -0
- package/.yarn/cache/ignore-npm-5.3.2-346d3ba017-2acfd32a57.zip +0 -0
- package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
- package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
- package/.yarn/cache/invoices-npm-3.0.0-123907e565-27119b1449.zip +0 -0
- package/.yarn/cache/irregular-plurals-npm-3.5.0-2415613615-5b663091dc.zip +0 -0
- package/.yarn/cache/is-arrayish-npm-0.2.1-23927dfb15-eef4417e3c.zip +0 -0
- package/.yarn/cache/is-core-module-npm-2.15.1-34c73a6cbd-df134c1681.zip +0 -0
- package/.yarn/cache/is-extglob-npm-2.1.1-0870ea68b5-df033653d0.zip +0 -0
- package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
- package/.yarn/cache/is-glob-npm-4.0.3-cb87bf1bdb-d381c1319f.zip +0 -0
- package/.yarn/cache/is-number-npm-7.0.0-060086935c-456ac6f8e0.zip +0 -0
- package/.yarn/cache/is-plain-obj-npm-1.1.0-1046f64c0b-0ee0480779.zip +0 -0
- package/.yarn/cache/is-unicode-supported-npm-0.1.0-0833e1bbfb-a2aab86ee7.zip +0 -0
- package/.yarn/cache/jest-diff-npm-29.7.0-0149e01930-08e24a9dd4.zip +0 -0
- package/.yarn/cache/jest-get-type-npm-29.6.3-500477292e-88ac9102d4.zip +0 -0
- package/.yarn/cache/js-tokens-npm-4.0.0-0ac852e9e2-8a95213a5a.zip +0 -0
- package/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip +0 -0
- package/.yarn/cache/kind-of-npm-6.0.3-ab15f36220-3ab01e7b1d.zip +0 -0
- package/.yarn/cache/lines-and-columns-npm-1.2.4-d6c7cc5799-0c37f9f7fa.zip +0 -0
- package/.yarn/cache/locate-path-npm-5.0.0-46580c43e4-83e51725e6.zip +0 -0
- package/.yarn/cache/lodash.camelcase-npm-4.3.0-bf268e3bf0-cb9227612f.zip +0 -0
- package/.yarn/cache/log-symbols-npm-4.1.0-0a13492d8b-fce1497b31.zip +0 -0
- package/.yarn/cache/long-npm-5.2.3-61dddb7586-885ede7c3d.zip +0 -0
- package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
- package/.yarn/cache/map-obj-npm-1.0.1-fa55100fac-9949e7baec.zip +0 -0
- package/.yarn/cache/map-obj-npm-4.3.0-d53e32935d-fbc554934d.zip +0 -0
- package/.yarn/cache/md5.js-npm-1.3.5-130901125a-098494d885.zip +0 -0
- package/.yarn/cache/meow-npm-9.0.0-8b2707248e-99799c4724.zip +0 -0
- package/.yarn/cache/merge2-npm-1.4.1-a2507bd06c-7268db63ed.zip +0 -0
- package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
- package/.yarn/cache/mime-db-npm-1.52.0-b5371d6fd2-0d99a03585.zip +0 -0
- package/.yarn/cache/mime-types-npm-2.1.35-dd9ea9f3e2-89a5b7f1de.zip +0 -0
- package/.yarn/cache/min-indent-npm-1.0.1-77031f50e1-bfc6dd03c5.zip +0 -0
- package/.yarn/cache/minimist-options-npm-4.1.0-64ca250fc1-8c040b3068.zip +0 -0
- package/.yarn/cache/normalize-package-data-npm-2.5.0-af0345deed-7999112efc.zip +0 -0
- package/.yarn/cache/normalize-package-data-npm-3.0.3-1a49056685-bbcee00339.zip +0 -0
- package/.yarn/cache/p-limit-npm-2.3.0-94a0310039-84ff17f1a3.zip +0 -0
- package/.yarn/cache/p-locate-npm-4.1.0-eec6872537-513bd14a45.zip +0 -0
- package/.yarn/cache/p-try-npm-2.2.0-e0390dbaf8-f8a8e9a769.zip +0 -0
- package/.yarn/cache/parse-json-npm-5.2.0-00a63b1199-62085b17d6.zip +0 -0
- package/.yarn/cache/path-exists-npm-4.0.0-e9e4f63eb0-505807199d.zip +0 -0
- package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
- package/.yarn/cache/path-type-npm-4.0.0-10d47fc86a-5b1e2daa24.zip +0 -0
- package/.yarn/cache/picocolors-npm-1.1.1-4fede47cf1-e1cf46bf84.zip +0 -0
- package/.yarn/cache/picomatch-npm-2.3.1-c782cfd986-050c865ce8.zip +0 -0
- package/.yarn/cache/plur-npm-4.0.0-96f2a49c24-fea2e903ef.zip +0 -0
- package/.yarn/cache/pretty-format-npm-29.7.0-7d330b2ea2-032c160238.zip +0 -0
- package/.yarn/cache/protobufjs-npm-7.4.0-12c56a3adc-ba0e6b6054.zip +0 -0
- package/.yarn/cache/psbt-npm-3.0.0-7f3e8059ba-1dddca470a.zip +0 -0
- package/.yarn/cache/pushdata-bitcoin-npm-1.0.1-959a90bb14-8452106d4b.zip +0 -0
- package/.yarn/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-b676f8c040.zip +0 -0
- package/.yarn/cache/quick-lru-npm-4.0.1-ef8aa17c9c-bea46e1abf.zip +0 -0
- package/.yarn/cache/randombytes-npm-2.1.0-e3da76bccf-d779499376.zip +0 -0
- package/.yarn/cache/react-is-npm-18.3.1-370a81e1e9-e20fe84c86.zip +0 -0
- package/.yarn/cache/read-pkg-npm-5.2.0-50426bd8dc-eb696e6052.zip +0 -0
- package/.yarn/cache/read-pkg-up-npm-7.0.1-11895bed9a-e4e93ce70e.zip +0 -0
- package/.yarn/cache/readable-stream-npm-3.6.2-d2a6069158-bdcbe6c22e.zip +0 -0
- package/.yarn/cache/redent-npm-3.0.0-31892f4906-fa1ef20404.zip +0 -0
- package/.yarn/cache/require-directory-npm-2.1.1-8608aee50b-fb47e70bf0.zip +0 -0
- package/.yarn/cache/resolve-npm-1.22.8-098f379dfe-f8a26958aa.zip +0 -0
- package/.yarn/cache/resolve-patch-f6b5304cab-5479b7d431.zip +0 -0
- package/.yarn/cache/reusify-npm-1.0.4-95ac4aec11-c3076ebcc2.zip +0 -0
- package/.yarn/cache/ripemd160-npm-2.0.2-7b1fb8dc76-006accc405.zip +0 -0
- package/.yarn/cache/run-parallel-npm-1.2.0-3f47ff2034-cb4f97ad25.zip +0 -0
- package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
- package/.yarn/cache/semver-npm-5.7.2-938ee91eaa-fb4ab5e0dd.zip +0 -0
- package/.yarn/cache/semver-npm-7.6.3-57e82c14d5-4110ec5d01.zip +0 -0
- package/.yarn/cache/sha.js-npm-2.4.11-14868df4ca-ebd3f59d4b.zip +0 -0
- package/.yarn/cache/slash-npm-3.0.0-b87de2279a-94a93fff61.zip +0 -0
- package/.yarn/cache/spdx-correct-npm-3.2.0-ffae008484-e9ae98d22f.zip +0 -0
- package/.yarn/cache/spdx-exceptions-npm-2.5.0-718ed4b7d6-bb127d6e25.zip +0 -0
- package/.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip +0 -0
- package/.yarn/cache/spdx-license-ids-npm-3.0.20-f08e1eabc0-0c57750bed.zip +0 -0
- package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
- package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
- package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
- package/.yarn/cache/strip-indent-npm-3.0.0-519e75a28d-18f045d57d.zip +0 -0
- package/.yarn/cache/supports-color-npm-5.5.0-183ac537bc-95f6f4ba5a.zip +0 -0
- package/.yarn/cache/supports-color-npm-7.2.0-606bfcf7da-3dda818de0.zip +0 -0
- package/.yarn/cache/supports-hyperlinks-npm-2.3.0-d19176eba2-9ee0de3c8c.zip +0 -0
- package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
- package/.yarn/cache/tiny-secp256k1-npm-2.2.2-54168b74b6-2b38491186.zip +0 -0
- package/.yarn/cache/tiny-secp256k1-npm-2.2.3-8c5163b5d1-f7a74a1fce.zip +0 -0
- package/.yarn/cache/to-regex-range-npm-5.0.1-f1e8263b00-f76fa01b3d.zip +0 -0
- package/.yarn/cache/trim-newlines-npm-3.0.1-22f1f216de-b530f3fadf.zip +0 -0
- package/.yarn/cache/tsd-npm-0.31.2-07f84c93d0-23bb84f8ba.zip +0 -0
- package/.yarn/cache/type-fest-npm-0.18.1-47b079775d-e96dcee18a.zip +0 -0
- package/.yarn/cache/type-fest-npm-0.21.3-5ff2a9c6fd-e6b32a3b38.zip +0 -0
- package/.yarn/cache/type-fest-npm-0.6.0-76b229965b-b2188e6e4b.zip +0 -0
- package/.yarn/cache/type-fest-npm-0.8.1-351ad028fe-d61c4b2eba.zip +0 -0
- package/.yarn/cache/type-fest-npm-4.26.1-274c31182d-7188db3bca.zip +0 -0
- package/.yarn/cache/typeforce-npm-1.18.0-372e34e2a2-e3b21e27e7.zip +0 -0
- package/.yarn/cache/typescript-npm-5.6.3-cc9b3687b0-ba302f8822.zip +0 -0
- package/.yarn/cache/typescript-patch-be88537122-ade87bce23.zip +0 -0
- package/.yarn/cache/uint8array-tools-npm-0.0.7-96ca58a124-6ffc45c7d2.zip +0 -0
- package/.yarn/cache/undici-types-npm-6.19.8-9f12285b7a-de51f1b447.zip +0 -0
- package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
- package/.yarn/cache/validate-npm-package-license-npm-3.0.4-7af8adc7a8-35703ac889.zip +0 -0
- package/.yarn/cache/varuint-bitcoin-npm-1.1.2-83f928c112-1c900bf08f.zip +0 -0
- package/.yarn/cache/wif-npm-2.0.6-f351bf025a-8c3147ef98.zip +0 -0
- package/.yarn/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-a790b846fd.zip +0 -0
- package/.yarn/cache/y18n-npm-5.0.8-5f3a0a7e62-54f0fb9562.zip +0 -0
- package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
- package/.yarn/cache/yargs-npm-17.7.2-80b62638e1-73b572e863.zip +0 -0
- package/.yarn/cache/yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip +0 -0
- package/.yarn/cache/yargs-parser-npm-21.1.1-8fdc003314-ed2d96a616.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +817 -0
- package/LICENSE +21 -0
- package/README.md +393 -0
- package/arrays/index.js +3 -0
- package/arrays/sort_by.js +44 -0
- package/bolt00/index.js +5 -0
- package/bolt00/mtokens_amount.js +44 -0
- package/bolt00/payment_amounts.js +89 -0
- package/bolt00/safe_tokens.js +31 -0
- package/bolt02/chain_id.js +27 -0
- package/bolt02/ids.json +11 -0
- package/bolt02/index.js +3 -0
- package/grpc/emit_subscription_error.js +28 -0
- package/grpc/grpc_services.json +63 -0
- package/grpc/handle_remove_listener.js +25 -0
- package/grpc/index.js +25 -0
- package/grpc/protos/autopilot.proto +98 -0
- package/grpc/protos/chainkit.proto +74 -0
- package/grpc/protos/chainnotifier.proto +200 -0
- package/grpc/protos/invoices.proto +245 -0
- package/grpc/protos/lightning.proto +5111 -0
- package/grpc/protos/peers.proto +94 -0
- package/grpc/protos/rfqrpc/rfq.proto +309 -0
- package/grpc/protos/router.proto +1023 -0
- package/grpc/protos/routerrpc/router.proto +1077 -0
- package/grpc/protos/signer.proto +709 -0
- package/grpc/protos/stateservice.proto +73 -0
- package/grpc/protos/taprootassetchannels.proto +169 -0
- package/grpc/protos/verrpc.proto +47 -0
- package/grpc/protos/walletkit.proto +1506 -0
- package/grpc/protos/walletunlocker.proto +338 -0
- package/grpc/protos/watchtower.proto +30 -0
- package/grpc/protos/wtclient.proto +293 -0
- package/index.d.ts +3 -0
- package/index.js +321 -0
- package/lnd_grpc/api_for_proto.js +21 -0
- package/lnd_grpc/authenticated_lnd_grpc.d.ts +30 -0
- package/lnd_grpc/authenticated_lnd_grpc.js +84 -0
- package/lnd_grpc/decode_serialized.js +25 -0
- package/lnd_grpc/grpc_credentials.js +50 -0
- package/lnd_grpc/grpc_options.js +7 -0
- package/lnd_grpc/grpc_ssl.js +20 -0
- package/lnd_grpc/index.d.ts +2 -0
- package/lnd_grpc/index.js +5 -0
- package/lnd_grpc/is_lnd.js +14 -0
- package/lnd_grpc/make_metadata.js +21 -0
- package/lnd_grpc/unauthenticated_lnd_grpc.d.ts +19 -0
- package/lnd_grpc/unauthenticated_lnd_grpc.js +68 -0
- package/lnd_messages/close_channel_request.js +38 -0
- package/lnd_messages/index.js +5 -0
- package/lnd_messages/open_channel_request.js +66 -0
- package/lnd_messages/pay_via_route_request.js +61 -0
- package/lnd_methods/address/address_formats.json +8 -0
- package/lnd_methods/address/create_chain_address.d.ts +26 -0
- package/lnd_methods/address/create_chain_address.js +117 -0
- package/lnd_methods/address/get_public_key.d.ts +32 -0
- package/lnd_methods/address/get_public_key.js +84 -0
- package/lnd_methods/address/index.d.ts +2 -0
- package/lnd_methods/address/index.js +4 -0
- package/lnd_methods/generic/get_height.d.ts +21 -0
- package/lnd_methods/generic/get_height.js +75 -0
- package/lnd_methods/generic/get_route_confidence.d.ts +33 -0
- package/lnd_methods/generic/get_route_confidence.js +167 -0
- package/lnd_methods/generic/index.d.ts +2 -0
- package/lnd_methods/generic/index.js +4 -0
- package/lnd_methods/index.d.ts +11 -0
- package/lnd_methods/index.js +319 -0
- package/lnd_methods/info/constants.json +65 -0
- package/lnd_methods/info/get_autopilot.d.ts +43 -0
- package/lnd_methods/info/get_autopilot.js +192 -0
- package/lnd_methods/info/get_channel.d.ts +53 -0
- package/lnd_methods/info/get_channel.js +120 -0
- package/lnd_methods/info/get_configuration.d.ts +30 -0
- package/lnd_methods/info/get_configuration.js +84 -0
- package/lnd_methods/info/get_identity.d.ts +19 -0
- package/lnd_methods/info/get_identity.js +68 -0
- package/lnd_methods/info/get_methods.d.ts +23 -0
- package/lnd_methods/info/get_methods.js +91 -0
- package/lnd_methods/info/get_network_centrality.d.ts +25 -0
- package/lnd_methods/info/get_network_centrality.js +79 -0
- package/lnd_methods/info/get_network_graph.d.ts +53 -0
- package/lnd_methods/info/get_network_graph.js +149 -0
- package/lnd_methods/info/get_network_info.d.ts +31 -0
- package/lnd_methods/info/get_network_info.js +59 -0
- package/lnd_methods/info/get_node.d.ts +61 -0
- package/lnd_methods/info/get_node.js +155 -0
- package/lnd_methods/info/get_route_to_destination.d.ts +122 -0
- package/lnd_methods/info/get_route_to_destination.js +357 -0
- package/lnd_methods/info/get_tower_server_info.d.ts +30 -0
- package/lnd_methods/info/get_tower_server_info.js +89 -0
- package/lnd_methods/info/get_wallet_info.d.ts +53 -0
- package/lnd_methods/info/get_wallet_info.js +94 -0
- package/lnd_methods/info/get_wallet_version.d.ts +37 -0
- package/lnd_methods/info/get_wallet_version.js +101 -0
- package/lnd_methods/info/index.d.ts +15 -0
- package/lnd_methods/info/index.js +33 -0
- package/lnd_methods/info/stop_daemon.d.ts +8 -0
- package/lnd_methods/info/stop_daemon.js +70 -0
- package/lnd_methods/info/subscribe_to_graph.d.ts +79 -0
- package/lnd_methods/info/subscribe_to_graph.js +205 -0
- package/lnd_methods/invoices/cancel_hodl_invoice.d.ts +20 -0
- package/lnd_methods/invoices/cancel_hodl_invoice.js +55 -0
- package/lnd_methods/invoices/create_hodl_invoice.d.ts +62 -0
- package/lnd_methods/invoices/create_hodl_invoice.js +206 -0
- package/lnd_methods/invoices/create_invoice.d.ts +71 -0
- package/lnd_methods/invoices/create_invoice.js +347 -0
- package/lnd_methods/invoices/get_invoice.d.ts +109 -0
- package/lnd_methods/invoices/get_invoice.js +107 -0
- package/lnd_methods/invoices/get_invoices.d.ts +110 -0
- package/lnd_methods/invoices/get_invoices.js +195 -0
- package/lnd_methods/invoices/index.d.ts +8 -0
- package/lnd_methods/invoices/index.js +19 -0
- package/lnd_methods/invoices/settle_hodl_invoice.d.ts +18 -0
- package/lnd_methods/invoices/settle_hodl_invoice.js +65 -0
- package/lnd_methods/invoices/subscribe_to_invoice.d.ts +115 -0
- package/lnd_methods/invoices/subscribe_to_invoice.js +131 -0
- package/lnd_methods/invoices/subscribe_to_invoices.d.ts +107 -0
- package/lnd_methods/invoices/subscribe_to_invoices.js +177 -0
- package/lnd_methods/macaroon/accept_rpc_request.js +44 -0
- package/lnd_methods/macaroon/get_access_ids.d.ts +19 -0
- package/lnd_methods/macaroon/get_access_ids.js +67 -0
- package/lnd_methods/macaroon/grant_access.d.ts +75 -0
- package/lnd_methods/macaroon/grant_access.js +146 -0
- package/lnd_methods/macaroon/handle_rpc_request_update.js +151 -0
- package/lnd_methods/macaroon/index.d.ts +5 -0
- package/lnd_methods/macaroon/index.js +13 -0
- package/lnd_methods/macaroon/methods.json +624 -0
- package/lnd_methods/macaroon/permissions.json +21 -0
- package/lnd_methods/macaroon/reject_rpc_request.js +52 -0
- package/lnd_methods/macaroon/revoke_access.d.ts +18 -0
- package/lnd_methods/macaroon/revoke_access.js +65 -0
- package/lnd_methods/macaroon/subscribe_to_rpc_requests.d.ts +155 -0
- package/lnd_methods/macaroon/subscribe_to_rpc_requests.js +228 -0
- package/lnd_methods/macaroon/uris_for_method.js +52 -0
- package/lnd_methods/macaroon/verify_access.d.ts +28 -0
- package/lnd_methods/macaroon/verify_access.js +85 -0
- package/lnd_methods/message/index.d.ts +2 -0
- package/lnd_methods/message/index.js +4 -0
- package/lnd_methods/message/sign_message.d.ts +24 -0
- package/lnd_methods/message/sign_message.js +61 -0
- package/lnd_methods/message/verify_message.d.ts +26 -0
- package/lnd_methods/message/verify_message.js +68 -0
- package/lnd_methods/offchain/attempt_route.d.ts +58 -0
- package/lnd_methods/offchain/attempt_route.js +118 -0
- package/lnd_methods/offchain/connect_watchtower.d.ts +20 -0
- package/lnd_methods/offchain/connect_watchtower.js +66 -0
- package/lnd_methods/offchain/decode_payment_request.d.ts +56 -0
- package/lnd_methods/offchain/decode_payment_request.js +86 -0
- package/lnd_methods/offchain/delete_failed_pay_attempts.d.ts +10 -0
- package/lnd_methods/offchain/delete_failed_pay_attempts.js +67 -0
- package/lnd_methods/offchain/delete_failed_payments.d.ts +10 -0
- package/lnd_methods/offchain/delete_failed_payments.js +46 -0
- package/lnd_methods/offchain/delete_forwarding_reputations.d.ts +8 -0
- package/lnd_methods/offchain/delete_forwarding_reputations.js +44 -0
- package/lnd_methods/offchain/delete_payment.d.ts +18 -0
- package/lnd_methods/offchain/delete_payment.js +58 -0
- package/lnd_methods/offchain/delete_payments.d.ts +8 -0
- package/lnd_methods/offchain/delete_payments.js +44 -0
- package/lnd_methods/offchain/delete_pending_channel.d.ts +21 -0
- package/lnd_methods/offchain/delete_pending_channel.js +114 -0
- package/lnd_methods/offchain/disable_channel.d.ts +20 -0
- package/lnd_methods/offchain/disable_channel.js +72 -0
- package/lnd_methods/offchain/disconnect_watchtower.d.ts +18 -0
- package/lnd_methods/offchain/disconnect_watchtower.js +66 -0
- package/lnd_methods/offchain/emit_payment.d.ts +21 -0
- package/lnd_methods/offchain/emit_payment.js +58 -0
- package/lnd_methods/offchain/enable_channel.d.ts +24 -0
- package/lnd_methods/offchain/enable_channel.js +99 -0
- package/lnd_methods/offchain/finished_payment.d.ts +178 -0
- package/lnd_methods/offchain/finished_payment.js +163 -0
- package/lnd_methods/offchain/get_backup.d.ts +26 -0
- package/lnd_methods/offchain/get_backup.js +76 -0
- package/lnd_methods/offchain/get_backups.d.ts +25 -0
- package/lnd_methods/offchain/get_backups.js +57 -0
- package/lnd_methods/offchain/get_channel_balance.d.ts +41 -0
- package/lnd_methods/offchain/get_channel_balance.js +171 -0
- package/lnd_methods/offchain/get_channels.d.ts +137 -0
- package/lnd_methods/offchain/get_channels.js +142 -0
- package/lnd_methods/offchain/get_closed_channels.d.ts +100 -0
- package/lnd_methods/offchain/get_closed_channels.js +239 -0
- package/lnd_methods/offchain/get_connected_watchtowers.d.ts +64 -0
- package/lnd_methods/offchain/get_connected_watchtowers.js +218 -0
- package/lnd_methods/offchain/get_ephemeral_channel_ids.d.ts +27 -0
- package/lnd_methods/offchain/get_ephemeral_channel_ids.js +86 -0
- package/lnd_methods/offchain/get_failed_payments.d.ts +139 -0
- package/lnd_methods/offchain/get_failed_payments.js +128 -0
- package/lnd_methods/offchain/get_fee_rates.d.ts +41 -0
- package/lnd_methods/offchain/get_fee_rates.js +77 -0
- package/lnd_methods/offchain/get_forwarding_confidence.d.ts +26 -0
- package/lnd_methods/offchain/get_forwarding_confidence.js +89 -0
- package/lnd_methods/offchain/get_forwarding_reputations.d.ts +31 -0
- package/lnd_methods/offchain/get_forwarding_reputations.js +130 -0
- package/lnd_methods/offchain/get_forwards.d.ts +49 -0
- package/lnd_methods/offchain/get_forwards.js +136 -0
- package/lnd_methods/offchain/get_pathfinding_settings.d.ts +27 -0
- package/lnd_methods/offchain/get_pathfinding_settings.js +88 -0
- package/lnd_methods/offchain/get_payment.d.ts +172 -0
- package/lnd_methods/offchain/get_payment.js +144 -0
- package/lnd_methods/offchain/get_payments.d.ts +149 -0
- package/lnd_methods/offchain/get_payments.js +133 -0
- package/lnd_methods/offchain/get_pending_channels.d.ts +86 -0
- package/lnd_methods/offchain/get_pending_channels.js +103 -0
- package/lnd_methods/offchain/get_pending_payments.d.ts +139 -0
- package/lnd_methods/offchain/get_pending_payments.js +128 -0
- package/lnd_methods/offchain/get_route_through_hops.d.ts +94 -0
- package/lnd_methods/offchain/get_route_through_hops.js +141 -0
- package/lnd_methods/offchain/get_settlement_status.d.ts +32 -0
- package/lnd_methods/offchain/get_settlement_status.js +98 -0
- package/lnd_methods/offchain/index.d.ts +57 -0
- package/lnd_methods/offchain/index.js +117 -0
- package/lnd_methods/offchain/is_destination_payable.d.ts +54 -0
- package/lnd_methods/offchain/is_destination_payable.js +95 -0
- package/lnd_methods/offchain/list_payments.js +218 -0
- package/lnd_methods/offchain/pay.d.ts +132 -0
- package/lnd_methods/offchain/pay.js +192 -0
- package/lnd_methods/offchain/pay_via_payment_details.d.ts +137 -0
- package/lnd_methods/offchain/pay_via_payment_details.js +159 -0
- package/lnd_methods/offchain/pay_via_payment_request.d.ts +113 -0
- package/lnd_methods/offchain/pay_via_payment_request.js +134 -0
- package/lnd_methods/offchain/pay_via_routes.d.ts +104 -0
- package/lnd_methods/offchain/pay_via_routes.js +187 -0
- package/lnd_methods/offchain/payment_states.json +17 -0
- package/lnd_methods/offchain/probe_for_route.d.ts +133 -0
- package/lnd_methods/offchain/probe_for_route.js +165 -0
- package/lnd_methods/offchain/recover_funds_from_channel.d.ts +16 -0
- package/lnd_methods/offchain/recover_funds_from_channel.js +66 -0
- package/lnd_methods/offchain/recover_funds_from_channels.d.ts +16 -0
- package/lnd_methods/offchain/recover_funds_from_channels.js +54 -0
- package/lnd_methods/offchain/route_failure_keys.d.ts +25 -0
- package/lnd_methods/offchain/route_failure_keys.js +49 -0
- package/lnd_methods/offchain/send_message_to_peer.d.ts +28 -0
- package/lnd_methods/offchain/send_message_to_peer.js +70 -0
- package/lnd_methods/offchain/subscribe_to_backups.d.ts +21 -0
- package/lnd_methods/offchain/subscribe_to_backups.js +84 -0
- package/lnd_methods/offchain/subscribe_to_channels.d.ts +150 -0
- package/lnd_methods/offchain/subscribe_to_channels.js +229 -0
- package/lnd_methods/offchain/subscribe_to_forward_requests.d.ts +49 -0
- package/lnd_methods/offchain/subscribe_to_forward_requests.js +120 -0
- package/lnd_methods/offchain/subscribe_to_forwards.d.ts +45 -0
- package/lnd_methods/offchain/subscribe_to_forwards.js +145 -0
- package/lnd_methods/offchain/subscribe_to_open_requests.d.ts +75 -0
- package/lnd_methods/offchain/subscribe_to_open_requests.js +156 -0
- package/lnd_methods/offchain/subscribe_to_past_payment.d.ts +129 -0
- package/lnd_methods/offchain/subscribe_to_past_payment.js +156 -0
- package/lnd_methods/offchain/subscribe_to_past_payments.d.ts +75 -0
- package/lnd_methods/offchain/subscribe_to_past_payments.js +126 -0
- package/lnd_methods/offchain/subscribe_to_pay.d.ts +299 -0
- package/lnd_methods/offchain/subscribe_to_pay.js +463 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_details.d.ts +40 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_details.js +218 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_request.d.ts +39 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_request.js +193 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_routes.d.ts +274 -0
- package/lnd_methods/offchain/subscribe_to_pay_via_routes.js +432 -0
- package/lnd_methods/offchain/subscribe_to_payments.d.ts +157 -0
- package/lnd_methods/offchain/subscribe_to_payments.js +121 -0
- package/lnd_methods/offchain/subscribe_to_peer_messages.d.ts +18 -0
- package/lnd_methods/offchain/subscribe_to_peer_messages.js +63 -0
- package/lnd_methods/offchain/subscribe_to_probe_for_route.d.ts +254 -0
- package/lnd_methods/offchain/subscribe_to_probe_for_route.js +405 -0
- package/lnd_methods/offchain/update_connected_watchtower.d.ts +30 -0
- package/lnd_methods/offchain/update_connected_watchtower.js +91 -0
- package/lnd_methods/offchain/update_pathfinding_settings.d.ts +24 -0
- package/lnd_methods/offchain/update_pathfinding_settings.js +175 -0
- package/lnd_methods/offchain/update_routing_fees.d.ts +81 -0
- package/lnd_methods/offchain/update_routing_fees.js +167 -0
- package/lnd_methods/offchain/verify_backup.d.ts +26 -0
- package/lnd_methods/offchain/verify_backup.js +60 -0
- package/lnd_methods/offchain/verify_backups.d.ts +28 -0
- package/lnd_methods/offchain/verify_backups.js +78 -0
- package/lnd_methods/onchain/broadcast_chain_transaction.d.ts +28 -0
- package/lnd_methods/onchain/broadcast_chain_transaction.js +86 -0
- package/lnd_methods/onchain/cancel_pending_channel.d.ts +14 -0
- package/lnd_methods/onchain/cancel_pending_channel.js +50 -0
- package/lnd_methods/onchain/close_channel.d.ts +86 -0
- package/lnd_methods/onchain/close_channel.js +211 -0
- package/lnd_methods/onchain/create_funded_psbt.d.ts +62 -0
- package/lnd_methods/onchain/create_funded_psbt.js +176 -0
- package/lnd_methods/onchain/delete_chain_transaction.d.ts +19 -0
- package/lnd_methods/onchain/delete_chain_transaction.js +66 -0
- package/lnd_methods/onchain/fund_pending_channels.d.ts +18 -0
- package/lnd_methods/onchain/fund_pending_channels.js +107 -0
- package/lnd_methods/onchain/fund_psbt.d.ts +89 -0
- package/lnd_methods/onchain/fund_psbt.js +288 -0
- package/lnd_methods/onchain/get_block.d.ts +37 -0
- package/lnd_methods/onchain/get_block.js +149 -0
- package/lnd_methods/onchain/get_block_header.d.ts +37 -0
- package/lnd_methods/onchain/get_block_header.js +149 -0
- package/lnd_methods/onchain/get_chain_addresses.d.ts +29 -0
- package/lnd_methods/onchain/get_chain_addresses.js +83 -0
- package/lnd_methods/onchain/get_chain_balance.d.ts +21 -0
- package/lnd_methods/onchain/get_chain_balance.js +55 -0
- package/lnd_methods/onchain/get_chain_fee_estimate.d.ts +39 -0
- package/lnd_methods/onchain/get_chain_fee_estimate.js +105 -0
- package/lnd_methods/onchain/get_chain_fee_rate.d.ts +26 -0
- package/lnd_methods/onchain/get_chain_fee_rate.js +67 -0
- package/lnd_methods/onchain/get_chain_transaction.d.ts +24 -0
- package/lnd_methods/onchain/get_chain_transaction.js +81 -0
- package/lnd_methods/onchain/get_chain_transactions.d.ts +62 -0
- package/lnd_methods/onchain/get_chain_transactions.js +90 -0
- package/lnd_methods/onchain/get_locked_utxos.d.ts +40 -0
- package/lnd_methods/onchain/get_locked_utxos.js +95 -0
- package/lnd_methods/onchain/get_master_public_keys.d.ts +28 -0
- package/lnd_methods/onchain/get_master_public_keys.js +83 -0
- package/lnd_methods/onchain/get_minimum_relay_fee.d.ts +25 -0
- package/lnd_methods/onchain/get_minimum_relay_fee.js +66 -0
- package/lnd_methods/onchain/get_pending_chain_balance.d.ts +23 -0
- package/lnd_methods/onchain/get_pending_chain_balance.js +58 -0
- package/lnd_methods/onchain/get_pending_sweeps.d.ts +47 -0
- package/lnd_methods/onchain/get_pending_sweeps.js +81 -0
- package/lnd_methods/onchain/get_sweep_transactions.d.ts +58 -0
- package/lnd_methods/onchain/get_sweep_transactions.js +158 -0
- package/lnd_methods/onchain/get_utxos.d.ts +40 -0
- package/lnd_methods/onchain/get_utxos.js +109 -0
- package/lnd_methods/onchain/index.d.ts +43 -0
- package/lnd_methods/onchain/index.js +89 -0
- package/lnd_methods/onchain/lock_utxo.d.ts +32 -0
- package/lnd_methods/onchain/lock_utxo.js +109 -0
- package/lnd_methods/onchain/open_channel.d.ts +87 -0
- package/lnd_methods/onchain/open_channel.js +293 -0
- package/lnd_methods/onchain/open_channels.d.ts +67 -0
- package/lnd_methods/onchain/open_channels.js +239 -0
- package/lnd_methods/onchain/partially_sign_psbt.d.ts +28 -0
- package/lnd_methods/onchain/partially_sign_psbt.js +79 -0
- package/lnd_methods/onchain/prepare_for_channel_proposal.d.ts +37 -0
- package/lnd_methods/onchain/prepare_for_channel_proposal.js +112 -0
- package/lnd_methods/onchain/propose_channel.d.ts +43 -0
- package/lnd_methods/onchain/propose_channel.js +162 -0
- package/lnd_methods/onchain/request_batched_fee_increase.d.ts +26 -0
- package/lnd_methods/onchain/request_batched_fee_increase.js +108 -0
- package/lnd_methods/onchain/request_chain_fee_increase.d.ts +32 -0
- package/lnd_methods/onchain/request_chain_fee_increase.js +94 -0
- package/lnd_methods/onchain/script_from_chain_address.d.ts +30 -0
- package/lnd_methods/onchain/script_from_chain_address.js +69 -0
- package/lnd_methods/onchain/send_to_chain_address.d.ts +73 -0
- package/lnd_methods/onchain/send_to_chain_address.js +162 -0
- package/lnd_methods/onchain/send_to_chain_addresses.d.ts +66 -0
- package/lnd_methods/onchain/send_to_chain_addresses.js +148 -0
- package/lnd_methods/onchain/send_to_chain_output_scripts.d.ts +52 -0
- package/lnd_methods/onchain/send_to_chain_output_scripts.js +115 -0
- package/lnd_methods/onchain/set_autopilot.d.ts +40 -0
- package/lnd_methods/onchain/set_autopilot.js +125 -0
- package/lnd_methods/onchain/sign_chain_address_message.d.ts +30 -0
- package/lnd_methods/onchain/sign_chain_address_message.js +80 -0
- package/lnd_methods/onchain/sign_psbt.d.ts +30 -0
- package/lnd_methods/onchain/sign_psbt.js +80 -0
- package/lnd_methods/onchain/subscribe_to_blocks.d.ts +19 -0
- package/lnd_methods/onchain/subscribe_to_blocks.js +96 -0
- package/lnd_methods/onchain/subscribe_to_chain_address.d.ts +47 -0
- package/lnd_methods/onchain/subscribe_to_chain_address.js +134 -0
- package/lnd_methods/onchain/subscribe_to_chain_spend.d.ts +47 -0
- package/lnd_methods/onchain/subscribe_to_chain_spend.js +159 -0
- package/lnd_methods/onchain/subscribe_to_transactions.d.ts +16 -0
- package/lnd_methods/onchain/subscribe_to_transactions.js +97 -0
- package/lnd_methods/onchain/unlock_utxo.d.ts +22 -0
- package/lnd_methods/onchain/unlock_utxo.js +72 -0
- package/lnd_methods/onchain/update_chain_transaction.d.ts +20 -0
- package/lnd_methods/onchain/update_chain_transaction.js +72 -0
- package/lnd_methods/onchain/verify_chain_address_message.d.ts +32 -0
- package/lnd_methods/onchain/verify_chain_address_message.js +93 -0
- package/lnd_methods/peers/add_advertised_feature.d.ts +20 -0
- package/lnd_methods/peers/add_advertised_feature.js +62 -0
- package/lnd_methods/peers/add_external_socket.d.ts +20 -0
- package/lnd_methods/peers/add_external_socket.js +62 -0
- package/lnd_methods/peers/add_peer.d.ts +28 -0
- package/lnd_methods/peers/add_peer.js +109 -0
- package/lnd_methods/peers/get_peers.d.ts +51 -0
- package/lnd_methods/peers/get_peers.js +89 -0
- package/lnd_methods/peers/index.d.ts +9 -0
- package/lnd_methods/peers/index.js +23 -0
- package/lnd_methods/peers/remove_advertised_feature.d.ts +20 -0
- package/lnd_methods/peers/remove_advertised_feature.js +62 -0
- package/lnd_methods/peers/remove_external_socket.d.ts +20 -0
- package/lnd_methods/peers/remove_external_socket.js +62 -0
- package/lnd_methods/peers/remove_peer.d.ts +16 -0
- package/lnd_methods/peers/remove_peer.js +50 -0
- package/lnd_methods/peers/subscribe_to_peers.d.ts +18 -0
- package/lnd_methods/peers/subscribe_to_peers.js +96 -0
- package/lnd_methods/peers/update_alias.d.ts +11 -0
- package/lnd_methods/peers/update_alias.js +58 -0
- package/lnd_methods/peers/update_color.d.ts +11 -0
- package/lnd_methods/peers/update_color.js +58 -0
- package/lnd_methods/signer/begin_group_signing_session.d.ts +33 -0
- package/lnd_methods/signer/begin_group_signing_session.js +195 -0
- package/lnd_methods/signer/diffie_hellman_compute_secret.d.ts +32 -0
- package/lnd_methods/signer/diffie_hellman_compute_secret.js +86 -0
- package/lnd_methods/signer/end_group_signing_session.d.ts +21 -0
- package/lnd_methods/signer/end_group_signing_session.js +102 -0
- package/lnd_methods/signer/index.d.ts +7 -0
- package/lnd_methods/signer/index.js +17 -0
- package/lnd_methods/signer/input_signing_method.js +42 -0
- package/lnd_methods/signer/sign_bytes.d.ts +34 -0
- package/lnd_methods/signer/sign_bytes.js +105 -0
- package/lnd_methods/signer/sign_transaction.d.ts +52 -0
- package/lnd_methods/signer/sign_transaction.js +140 -0
- package/lnd_methods/signer/update_group_signing_session.d.ts +23 -0
- package/lnd_methods/signer/update_group_signing_session.js +110 -0
- package/lnd_methods/signer/verify_bytes_signature.d.ts +30 -0
- package/lnd_methods/signer/verify_bytes_signature.js +87 -0
- package/lnd_methods/unauthenticated/change_password.d.ts +18 -0
- package/lnd_methods/unauthenticated/change_password.js +59 -0
- package/lnd_methods/unauthenticated/create_seed.d.ts +24 -0
- package/lnd_methods/unauthenticated/create_seed.js +70 -0
- package/lnd_methods/unauthenticated/create_wallet.d.ts +28 -0
- package/lnd_methods/unauthenticated/create_wallet.js +74 -0
- package/lnd_methods/unauthenticated/get_wallet_status.d.ts +34 -0
- package/lnd_methods/unauthenticated/get_wallet_status.js +70 -0
- package/lnd_methods/unauthenticated/index.d.ts +6 -0
- package/lnd_methods/unauthenticated/index.js +15 -0
- package/lnd_methods/unauthenticated/subscribe_to_wallet_status.d.ts +30 -0
- package/lnd_methods/unauthenticated/subscribe_to_wallet_status.js +122 -0
- package/lnd_methods/unauthenticated/unlock_wallet.d.ts +14 -0
- package/lnd_methods/unauthenticated/unlock_wallet.js +56 -0
- package/lnd_requests/destination_custom_records.js +30 -0
- package/lnd_requests/ignore_as_ignored_nodes.js +43 -0
- package/lnd_requests/ignore_as_ignored_pairs.js +43 -0
- package/lnd_requests/index.js +15 -0
- package/lnd_requests/is_lnd.js +14 -0
- package/lnd_requests/route_hint_from_route.js +49 -0
- package/lnd_requests/rpc_hop_from_hop.js +79 -0
- package/lnd_requests/rpc_route_from_route.js +107 -0
- package/lnd_responses/backups_from_snapshot.js +106 -0
- package/lnd_responses/channel_accept_as_open_request.js +138 -0
- package/lnd_responses/channel_edge_as_channel.js +115 -0
- package/lnd_responses/channel_policy_as_policy.js +89 -0
- package/lnd_responses/confirmed_from_payment.d.ts +164 -0
- package/lnd_responses/confirmed_from_payment.js +173 -0
- package/lnd_responses/confirmed_from_payment_status.js +176 -0
- package/lnd_responses/constants.json +90 -0
- package/lnd_responses/event_type_from_htlc_event.js +70 -0
- package/lnd_responses/failure_from_payment.d.ts +63 -0
- package/lnd_responses/failure_from_payment.js +40 -0
- package/lnd_responses/forward_from_htlc_event.js +218 -0
- package/lnd_responses/htlc_as_payment.js +117 -0
- package/lnd_responses/index.d.ts +2 -0
- package/lnd_responses/index.js +91 -0
- package/lnd_responses/info_as_wallet_info.js +117 -0
- package/lnd_responses/node_info_as_node.js +123 -0
- package/lnd_responses/parse_thaw_height.js +32 -0
- package/lnd_responses/payment_failure.js +182 -0
- package/lnd_responses/payment_request_details.js +147 -0
- package/lnd_responses/pending_as_pending_channels.js +333 -0
- package/lnd_responses/pending_from_payment.js +146 -0
- package/lnd_responses/policy_from_channel_update.js +86 -0
- package/lnd_responses/route_from_route_hint.js +80 -0
- package/lnd_responses/routes_from_query_routes.js +154 -0
- package/lnd_responses/routing_failure_from_htlc.js +105 -0
- package/lnd_responses/rpc_addresses_as_addresses.js +62 -0
- package/lnd_responses/rpc_attempt_htlc_as_attempt.js +147 -0
- package/lnd_responses/rpc_channel_as_channel.js +279 -0
- package/lnd_responses/rpc_channel_as_old_rpc_channel.js +28 -0
- package/lnd_responses/rpc_channel_closed_as_closed.js +79 -0
- package/lnd_responses/rpc_channel_update_as_update.js +143 -0
- package/lnd_responses/rpc_closed_channel_as_closed.js +193 -0
- package/lnd_responses/rpc_conf_as_confirmation.js +62 -0
- package/lnd_responses/rpc_failed_policy_as_fail.js +55 -0
- package/lnd_responses/rpc_fees_as_channel_fees.js +75 -0
- package/lnd_responses/rpc_forward_as_forward.js +92 -0
- package/lnd_responses/rpc_forward_as_forward_request.js +133 -0
- package/lnd_responses/rpc_group_session_as_session.js +51 -0
- package/lnd_responses/rpc_hop_as_hop.js +90 -0
- package/lnd_responses/rpc_htlc_as_payment.js +83 -0
- package/lnd_responses/rpc_invoice_as_invoice.js +218 -0
- package/lnd_responses/rpc_network_as_network_info.js +79 -0
- package/lnd_responses/rpc_node_as_node.js +114 -0
- package/lnd_responses/rpc_outpoint_as_update.js +40 -0
- package/lnd_responses/rpc_payment_as_payment.js +277 -0
- package/lnd_responses/rpc_peer_as_peer.js +135 -0
- package/lnd_responses/rpc_peer_message_as_message.js +44 -0
- package/lnd_responses/rpc_request_update_as_event.js +131 -0
- package/lnd_responses/rpc_resolution_as_resolution.js +122 -0
- package/lnd_responses/rpc_route_as_route.js +85 -0
- package/lnd_responses/rpc_sweep_as_sweep.js +96 -0
- package/lnd_responses/rpc_tx_as_transaction.js +145 -0
- package/lnd_responses/rpc_utxo_as_utxo.js +86 -0
- package/lnd_responses/rpc_wallet_state_as_state.js +55 -0
- package/package.json +56 -0
- package/test/arrays/test_sort_by.js +47 -0
- package/test/bolt00/test_mtokens_amount.js +57 -0
- package/test/bolt00/test_payment_amounts.js +85 -0
- package/test/bolt00/test_safe_tokens.js +38 -0
- package/test/bolt02/test_chain_id.js +25 -0
- package/test/grpc/test_emit_subscription_error.js +78 -0
- package/test/grpc/test_handle_remove_listener.js +34 -0
- package/test/lnd_grpc/test_authenticated_lnd_grpc.js +50 -0
- package/test/lnd_grpc/test_decode_serialized.js +45 -0
- package/test/lnd_grpc/test_grpc_credentials.js +25 -0
- package/test/lnd_grpc/test_grpc_ssl.js +29 -0
- package/test/lnd_grpc/test_is_lnd.js +42 -0
- package/test/lnd_grpc/test_unauthenticated_lnd_grpc.js +37 -0
- package/test/lnd_messages/test_close_channel_request.js +75 -0
- package/test/lnd_messages/test_open_channel_request.js +93 -0
- package/test/lnd_messages/test_pay_via_route_request.js +81 -0
- package/test/lnd_methods/address/test_create_chain_address.js +191 -0
- package/test/lnd_methods/address/test_get_public_key.js +127 -0
- package/test/lnd_methods/fixtures/get_info_response.json +16 -0
- package/test/lnd_methods/fixtures/get_status_response.json +3 -0
- package/test/lnd_methods/fixtures/index.js +6 -0
- package/test/lnd_methods/fixtures/lookup_invoice_response.js +86 -0
- package/test/lnd_methods/fixtures/query_routes_response.json +19 -0
- package/test/lnd_methods/generic/test_get_height.js +82 -0
- package/test/lnd_methods/generic/test_get_route_confidence.js +143 -0
- package/test/lnd_methods/info/test_get_autopilot.js +292 -0
- package/test/lnd_methods/info/test_get_channel.js +257 -0
- package/test/lnd_methods/info/test_get_configuration.js +81 -0
- package/test/lnd_methods/info/test_get_identity.js +60 -0
- package/test/lnd_methods/info/test_get_methods.js +81 -0
- package/test/lnd_methods/info/test_get_network_centrality.js +66 -0
- package/test/lnd_methods/info/test_get_network_graph.js +172 -0
- package/test/lnd_methods/info/test_get_network_info.js +64 -0
- package/test/lnd_methods/info/test_get_node.js +189 -0
- package/test/lnd_methods/info/test_get_route_to_destination.js +236 -0
- package/test/lnd_methods/info/test_get_tower_server_info.js +101 -0
- package/test/lnd_methods/info/test_get_wallet_info.js +107 -0
- package/test/lnd_methods/info/test_get_wallet_version.js +99 -0
- package/test/lnd_methods/info/test_stop_daemon.js +57 -0
- package/test/lnd_methods/info/test_subscribe_to_graph.js +553 -0
- package/test/lnd_methods/invoices/test_cancel_hodl_invoice.js +47 -0
- package/test/lnd_methods/invoices/test_create_hodl_invoice.js +146 -0
- package/test/lnd_methods/invoices/test_create_invoice.js +179 -0
- package/test/lnd_methods/invoices/test_get_invoice.js +59 -0
- package/test/lnd_methods/invoices/test_get_invoices.js +168 -0
- package/test/lnd_methods/invoices/test_settle_hodl_invoice.js +64 -0
- package/test/lnd_methods/invoices/test_subscribe_to_invoice.js +147 -0
- package/test/lnd_methods/invoices/test_subscribe_to_invoices.js +142 -0
- package/test/lnd_methods/macaroon/test_accept_rpc_request.js +38 -0
- package/test/lnd_methods/macaroon/test_get_access_ids.js +75 -0
- package/test/lnd_methods/macaroon/test_grant_access.js +130 -0
- package/test/lnd_methods/macaroon/test_handle_rpc_request_update.js +249 -0
- package/test/lnd_methods/macaroon/test_reject_rpc_request.js +42 -0
- package/test/lnd_methods/macaroon/test_revoke_access.js +82 -0
- package/test/lnd_methods/macaroon/test_subscribe_to_rpc_requests.js +250 -0
- package/test/lnd_methods/macaroon/test_uris_for_method.js +46 -0
- package/test/lnd_methods/macaroon/test_verify_access.js +103 -0
- package/test/lnd_methods/message/test_sign_message.js +62 -0
- package/test/lnd_methods/message/test_verify_message.js +74 -0
- package/test/lnd_methods/offchain/test_connect_watchtower.js +68 -0
- package/test/lnd_methods/offchain/test_decode_payment_request.js +95 -0
- package/test/lnd_methods/offchain/test_delete_failed_pay_attempts.js +51 -0
- package/test/lnd_methods/offchain/test_delete_failed_payments.js +33 -0
- package/test/lnd_methods/offchain/test_delete_forwarding_reputations.js +33 -0
- package/test/lnd_methods/offchain/test_delete_payment.js +52 -0
- package/test/lnd_methods/offchain/test_delete_payments.js +33 -0
- package/test/lnd_methods/offchain/test_delete_pending_channel.js +100 -0
- package/test/lnd_methods/offchain/test_disable_channel.js +66 -0
- package/test/lnd_methods/offchain/test_disconnect_watchtower.js +66 -0
- package/test/lnd_methods/offchain/test_enable_channel.js +84 -0
- package/test/lnd_methods/offchain/test_finished_payment.js +145 -0
- package/test/lnd_methods/offchain/test_get_backup.js +82 -0
- package/test/lnd_methods/offchain/test_get_backups.js +74 -0
- package/test/lnd_methods/offchain/test_get_channel_balance.js +168 -0
- package/test/lnd_methods/offchain/test_get_channels.js +306 -0
- package/test/lnd_methods/offchain/test_get_closed_channels.js +334 -0
- package/test/lnd_methods/offchain/test_get_connected_watchtowers.js +298 -0
- package/test/lnd_methods/offchain/test_get_ephemeral_channel_ids.js +70 -0
- package/test/lnd_methods/offchain/test_get_failed_payments.js +162 -0
- package/test/lnd_methods/offchain/test_get_fee_rates.js +80 -0
- package/test/lnd_methods/offchain/test_get_forwarding_confidence.js +105 -0
- package/test/lnd_methods/offchain/test_get_forwarding_reputations.js +151 -0
- package/test/lnd_methods/offchain/test_get_forwards.js +125 -0
- package/test/lnd_methods/offchain/test_get_pathfinding_settings.js +98 -0
- package/test/lnd_methods/offchain/test_get_payment.js +245 -0
- package/test/lnd_methods/offchain/test_get_payments.js +219 -0
- package/test/lnd_methods/offchain/test_get_pending_channels.js +57 -0
- package/test/lnd_methods/offchain/test_get_pending_payments.js +162 -0
- package/test/lnd_methods/offchain/test_get_route_through_hops.js +257 -0
- package/test/lnd_methods/offchain/test_get_settlement_status.js +103 -0
- package/test/lnd_methods/offchain/test_is_destination_payable.js +276 -0
- package/test/lnd_methods/offchain/test_list_payments.js +47 -0
- package/test/lnd_methods/offchain/test_pay.js +202 -0
- package/test/lnd_methods/offchain/test_pay_via_payment_details.js +326 -0
- package/test/lnd_methods/offchain/test_pay_via_payment_request.js +233 -0
- package/test/lnd_methods/offchain/test_pay_via_routes.js +429 -0
- package/test/lnd_methods/offchain/test_recover_funds_from_channel.js +86 -0
- package/test/lnd_methods/offchain/test_recover_funds_from_channels.js +52 -0
- package/test/lnd_methods/offchain/test_route_failure_keys.js +56 -0
- package/test/lnd_methods/offchain/test_send_message_to_peer.js +64 -0
- package/test/lnd_methods/offchain/test_subscribe_to_backups.js +117 -0
- package/test/lnd_methods/offchain/test_subscribe_to_channels.js +333 -0
- package/test/lnd_methods/offchain/test_subscribe_to_forwards.js +104 -0
- package/test/lnd_methods/offchain/test_subscribe_to_open_requests.js +144 -0
- package/test/lnd_methods/offchain/test_subscribe_to_past_payment.js +29 -0
- package/test/lnd_methods/offchain/test_subscribe_to_past_payments.js +279 -0
- package/test/lnd_methods/offchain/test_subscribe_to_pay.js +50 -0
- package/test/lnd_methods/offchain/test_subscribe_to_pay_via_routes.js +415 -0
- package/test/lnd_methods/offchain/test_subscribe_to_payments.js +169 -0
- package/test/lnd_methods/offchain/test_subscribe_to_peer_messages.js +133 -0
- package/test/lnd_methods/offchain/test_subscribe_to_probe_for_route.js +303 -0
- package/test/lnd_methods/offchain/test_update_connected_watchtower.js +90 -0
- package/test/lnd_methods/offchain/test_update_pathfinding_settings.js +135 -0
- package/test/lnd_methods/offchain/test_update_routing_fees.js +194 -0
- package/test/lnd_methods/offchain/test_verify_backup.js +48 -0
- package/test/lnd_methods/offchain/test_verify_backups.js +85 -0
- package/test/lnd_methods/onchain/test_broadcast_chain_transaction.js +97 -0
- package/test/lnd_methods/onchain/test_cancel_pending_channel.js +40 -0
- package/test/lnd_methods/onchain/test_close_channel.js +214 -0
- package/test/lnd_methods/onchain/test_create_funded_psbt.js +135 -0
- package/test/lnd_methods/onchain/test_delete_chain_transaction.js +85 -0
- package/test/lnd_methods/onchain/test_fund_pending_channels.js +121 -0
- package/test/lnd_methods/onchain/test_fund_psbt.js +196 -0
- package/test/lnd_methods/onchain/test_get_block.js +233 -0
- package/test/lnd_methods/onchain/test_get_block_header.js +243 -0
- package/test/lnd_methods/onchain/test_get_chain_addresses.js +77 -0
- package/test/lnd_methods/onchain/test_get_chain_balance.js +53 -0
- package/test/lnd_methods/onchain/test_get_chain_fee_estimate.js +107 -0
- package/test/lnd_methods/onchain/test_get_chain_fee_rate.js +67 -0
- package/test/lnd_methods/onchain/test_get_chain_transaction.js +124 -0
- package/test/lnd_methods/onchain/test_get_chain_transactions.js +181 -0
- package/test/lnd_methods/onchain/test_get_locked_utxos.js +106 -0
- package/test/lnd_methods/onchain/test_get_master_public_keys.js +96 -0
- package/test/lnd_methods/onchain/test_get_minimum_relay_fee.js +71 -0
- package/test/lnd_methods/onchain/test_get_pending_chain_balance.js +55 -0
- package/test/lnd_methods/onchain/test_get_pending_sweeps.js +92 -0
- package/test/lnd_methods/onchain/test_get_sweep_transactions.js +126 -0
- package/test/lnd_methods/onchain/test_get_utxos.js +150 -0
- package/test/lnd_methods/onchain/test_lock_utxo.js +95 -0
- package/test/lnd_methods/onchain/test_open_channel.js +229 -0
- package/test/lnd_methods/onchain/test_open_channels.js +203 -0
- package/test/lnd_methods/onchain/test_partially_sign_psbt.js +102 -0
- package/test/lnd_methods/onchain/test_prepare_for_channel_proposal.js +97 -0
- package/test/lnd_methods/onchain/test_propose_channel.js +191 -0
- package/test/lnd_methods/onchain/test_request_batched_fee_increase.js +111 -0
- package/test/lnd_methods/onchain/test_request_chain_fee_increase.js +89 -0
- package/test/lnd_methods/onchain/test_script_from_chain_address.js +74 -0
- package/test/lnd_methods/onchain/test_send_to_chain_address.js +157 -0
- package/test/lnd_methods/onchain/test_send_to_chain_addresses.js +141 -0
- package/test/lnd_methods/onchain/test_send_to_chain_output_scripts.js +90 -0
- package/test/lnd_methods/onchain/test_set_autopilot.js +200 -0
- package/test/lnd_methods/onchain/test_sign_chain_address_message.js +88 -0
- package/test/lnd_methods/onchain/test_sign_psbt.js +96 -0
- package/test/lnd_methods/onchain/test_subscribe_to_blocks.js +104 -0
- package/test/lnd_methods/onchain/test_subscribe_to_chain_address.js +88 -0
- package/test/lnd_methods/onchain/test_subscribe_to_chain_spend.js +74 -0
- package/test/lnd_methods/onchain/test_subscribe_to_transactions.js +147 -0
- package/test/lnd_methods/onchain/test_unlock_utxo.js +63 -0
- package/test/lnd_methods/onchain/test_update_chain_transaction.js +81 -0
- package/test/lnd_methods/onchain/test_verify_chain_address_message.js +112 -0
- package/test/lnd_methods/peers/test_add_advertised_feature.js +57 -0
- package/test/lnd_methods/peers/test_add_external_socket.js +57 -0
- package/test/lnd_methods/peers/test_add_peer.js +144 -0
- package/test/lnd_methods/peers/test_get_peers.js +57 -0
- package/test/lnd_methods/peers/test_remove_advertised_feature.js +57 -0
- package/test/lnd_methods/peers/test_remove_external_socket.js +57 -0
- package/test/lnd_methods/peers/test_remove_peer.js +47 -0
- package/test/lnd_methods/peers/test_subscribe_to_peers.js +146 -0
- package/test/lnd_methods/peers/test_update_alias.js +57 -0
- package/test/lnd_methods/peers/test_update_color.js +57 -0
- package/test/lnd_methods/signer/test_begin_group_signing_session.js +283 -0
- package/test/lnd_methods/signer/test_diffie_hellman_compute_secret.js +99 -0
- package/test/lnd_methods/signer/test_end_group_signing_session.js +95 -0
- package/test/lnd_methods/signer/test_input_signing_method.js +54 -0
- package/test/lnd_methods/signer/test_sign_bytes.js +113 -0
- package/test/lnd_methods/signer/test_sign_transaction.js +116 -0
- package/test/lnd_methods/signer/test_update_group_signing_session.js +110 -0
- package/test/lnd_methods/signer/test_verify_bytes_signature.js +90 -0
- package/test/lnd_methods/unauthenticated/test_change_password.js +55 -0
- package/test/lnd_methods/unauthenticated/test_create_seed.js +84 -0
- package/test/lnd_methods/unauthenticated/test_create_wallet.js +78 -0
- package/test/lnd_methods/unauthenticated/test_get_wallet_status.js +55 -0
- package/test/lnd_methods/unauthenticated/test_subscribe_to_wallet_status.js +145 -0
- package/test/lnd_methods/unauthenticated/test_unlock_wallet.js +54 -0
- package/test/lnd_requests/test_destination_custom_records.js +27 -0
- package/test/lnd_requests/test_ignore_as_ignored_nodes.js +57 -0
- package/test/lnd_requests/test_ignore_as_ignored_pairs.js +56 -0
- package/test/lnd_requests/test_route_hint_from_route.js +74 -0
- package/test/lnd_requests/test_rpc_hop_from_hop.js +85 -0
- package/test/lnd_requests/test_rpc_route_from_route.js +133 -0
- package/test/lnd_responses/test_backups_from_snapshot.js +154 -0
- package/test/lnd_responses/test_channel_accept_as_open_request.js +145 -0
- package/test/lnd_responses/test_channel_edge_as_channel.js +155 -0
- package/test/lnd_responses/test_channel_policy_as_policy.js +153 -0
- package/test/lnd_responses/test_confirmed_from_payment.js +161 -0
- package/test/lnd_responses/test_confirmed_from_payment_status.js +165 -0
- package/test/lnd_responses/test_failure_from_payment.js +82 -0
- package/test/lnd_responses/test_forward_from_htlc_event.js +330 -0
- package/test/lnd_responses/test_htlc_as_payment.js +145 -0
- package/test/lnd_responses/test_info_as_wallet_info.js +169 -0
- package/test/lnd_responses/test_node_info_as_node.js +211 -0
- package/test/lnd_responses/test_payment_failure.js +268 -0
- package/test/lnd_responses/test_payment_request_details.js +170 -0
- package/test/lnd_responses/test_pending_as_pending_channels.js +453 -0
- package/test/lnd_responses/test_pending_from_payment.js +146 -0
- package/test/lnd_responses/test_policy_from_channel_update.js +110 -0
- package/test/lnd_responses/test_route_from_route_hint.js +144 -0
- package/test/lnd_responses/test_routes_from_query_routes.js +150 -0
- package/test/lnd_responses/test_routing_failure_from_htlc.js +139 -0
- package/test/lnd_responses/test_rpc_addresses_as_addresses.js +84 -0
- package/test/lnd_responses/test_rpc_attempt_htlc_as_attempt.js +129 -0
- package/test/lnd_responses/test_rpc_channel_as_channel.js +310 -0
- package/test/lnd_responses/test_rpc_channel_closed_as_closed.js +113 -0
- package/test/lnd_responses/test_rpc_channel_update_as_update.js +208 -0
- package/test/lnd_responses/test_rpc_closed_channel_as_closed.js +191 -0
- package/test/lnd_responses/test_rpc_conf_as_confirmation.js +77 -0
- package/test/lnd_responses/test_rpc_failed_policy_as_fail.js +69 -0
- package/test/lnd_responses/test_rpc_fees_as_channel_fees.js +106 -0
- package/test/lnd_responses/test_rpc_forward_as_forward.js +143 -0
- package/test/lnd_responses/test_rpc_forward_as_forward_request.js +142 -0
- package/test/lnd_responses/test_rpc_group_session_as_session.js +81 -0
- package/test/lnd_responses/test_rpc_hop_as_hop.js +119 -0
- package/test/lnd_responses/test_rpc_htlc_as_payment.js +122 -0
- package/test/lnd_responses/test_rpc_invoice_as_invoice.js +266 -0
- package/test/lnd_responses/test_rpc_network_as_network_info.js +95 -0
- package/test/lnd_responses/test_rpc_node_as_node.js +125 -0
- package/test/lnd_responses/test_rpc_outpoint_as_update.js +58 -0
- package/test/lnd_responses/test_rpc_payment_as_payment.js +350 -0
- package/test/lnd_responses/test_rpc_peer_as_peer.js +159 -0
- package/test/lnd_responses/test_rpc_peer_message_as_message.js +69 -0
- package/test/lnd_responses/test_rpc_request_update_as_event.js +138 -0
- package/test/lnd_responses/test_rpc_resolution_as_resolution.js +152 -0
- package/test/lnd_responses/test_rpc_route_as_route.js +101 -0
- package/test/lnd_responses/test_rpc_sweep_as_sweep.js +135 -0
- package/test/lnd_responses/test_rpc_tx_as_transaction.js +183 -0
- package/test/lnd_responses/test_rpc_utxo_as_utxo.js +103 -0
- package/test/lnd_responses/test_rpc_wallet_state_as_state.js +72 -0
- package/test/typescript/add_external_socket.test-d.ts +14 -0
- package/test/typescript/add_peer.test-d.ts +15 -0
- package/test/typescript/attempt_route.test-d.ts +62 -0
- package/test/typescript/authenticated_lightning_method.test-d.ts +18 -0
- package/test/typescript/authenticated_lnd_grpc.test-d.ts +23 -0
- package/test/typescript/begin_group_signing_session.test-d.ts +60 -0
- package/test/typescript/broadcast_chain_transaction.test-d.ts +38 -0
- package/test/typescript/cancel_hodl_invoice.test-d.ts +14 -0
- package/test/typescript/cancel_pending_channel.test-d.ts +15 -0
- package/test/typescript/change_password.test-d.ts +22 -0
- package/test/typescript/close_channel.test-d.ts +275 -0
- package/test/typescript/confirmed_from_payment.test-d.ts +60 -0
- package/test/typescript/connect_watchtower.test-d.ts +19 -0
- package/test/typescript/create_chain_address.test-d.ts +35 -0
- package/test/typescript/create_hodl_invoice.test-d.ts +67 -0
- package/test/typescript/create_invoice.test-d.ts +67 -0
- package/test/typescript/create_seed.test-d.ts +17 -0
- package/test/typescript/create_wallet.test-d.ts +33 -0
- package/test/typescript/decode_payment_request.test-d.ts +24 -0
- package/test/typescript/delete_failed_pay_attempts.test-d.ts +11 -0
- package/test/typescript/delete_failed_payments.test-d.ts +11 -0
- package/test/typescript/delete_forwarding_reputations.test-d.ts +12 -0
- package/test/typescript/delete_payment.test-d.ts +15 -0
- package/test/typescript/delete_payments.test-d.ts +12 -0
- package/test/typescript/delete_pending_channel.test-d.ts +43 -0
- package/test/typescript/diffie_hellman_compute_secret.test-d.ts +74 -0
- package/test/typescript/disable_channel.test-d.ts +21 -0
- package/test/typescript/disconnect_watchtower.test-d.ts +16 -0
- package/test/typescript/emit_payment.test-d.ts +18 -0
- package/test/typescript/enable_channel.test-d.ts +35 -0
- package/test/typescript/end_group_signing_session.test-d.ts +32 -0
- package/test/typescript/failure_from_payment.test-d.ts +49 -0
- package/test/typescript/finished_payment.test-d.ts +67 -0
- package/test/typescript/fund_pending_channels.test-d.ts +21 -0
- package/test/typescript/fund_psbt.test-d.ts +33 -0
- package/test/typescript/get_access_ids.test-d.ts +16 -0
- package/test/typescript/get_autopilot.test-d.ts +23 -0
- package/test/typescript/get_backup.test-d.ts +25 -0
- package/test/typescript/get_backups.test-d.ts +16 -0
- package/test/typescript/get_block.test-d.ts +26 -0
- package/test/typescript/get_block_header.test-d.ts +26 -0
- package/test/typescript/get_chain_addresses.test-d.ts +16 -0
- package/test/typescript/get_chain_balance.test-d.ts +16 -0
- package/test/typescript/get_chain_fee_estimate.test-d.ts +34 -0
- package/test/typescript/get_chain_fee_rate.test-d.ts +26 -0
- package/test/typescript/get_chain_transactions.test-d.ts +30 -0
- package/test/typescript/get_channel.test-d.ts +25 -0
- package/test/typescript/get_channel_balance.test-d.ts +16 -0
- package/test/typescript/get_channels.test-d.ts +39 -0
- package/test/typescript/get_closed_channels.test-d.ts +46 -0
- package/test/typescript/get_connected_watchtowers.test-d.ts +38 -0
- package/test/typescript/get_failed_payments.test-d.ts +31 -0
- package/test/typescript/get_fee_rates.test-d.ts +16 -0
- package/test/typescript/get_forwarding_confidence.test-d.ts +38 -0
- package/test/typescript/get_forwarding_reputations.test-d.ts +21 -0
- package/test/typescript/get_forwards.test-d.ts +33 -0
- package/test/typescript/get_height.test-d.ts +16 -0
- package/test/typescript/get_identity.test-d.ts +16 -0
- package/test/typescript/get_invoice.test-d.ts +19 -0
- package/test/typescript/get_invoices.test-d.ts +45 -0
- package/test/typescript/get_locked_utxos.test-d.ts +16 -0
- package/test/typescript/get_master_public_keys.test-d.ts +19 -0
- package/test/typescript/get_methods.test-d.ts +16 -0
- package/test/typescript/get_network_centrality.ts +19 -0
- package/test/typescript/get_network_graph.test-d.ts +16 -0
- package/test/typescript/get_network_info.test-d.ts +16 -0
- package/test/typescript/get_node.test-d.ts +30 -0
- package/test/typescript/get_pathfinding_settings.test-d.ts +19 -0
- package/test/typescript/get_payment.test-d.ts +19 -0
- package/test/typescript/get_payments.test-d.ts +31 -0
- package/test/typescript/get_peers.test-d.ts +14 -0
- package/test/typescript/get_pending_chain_balance.test-d.ts +19 -0
- package/test/typescript/get_pending_channels.test-d.ts +16 -0
- package/test/typescript/get_pending_payments.test-d.ts +31 -0
- package/test/typescript/get_public_key.test-d.ts +26 -0
- package/test/typescript/get_route_confidence.test-d.ts +36 -0
- package/test/typescript/get_route_through_hops.test-d.ts +43 -0
- package/test/typescript/get_route_to_destination.test-d.ts +61 -0
- package/test/typescript/get_settlement_status.test-d.ts +26 -0
- package/test/typescript/get_sweep_transactions.test-d.ts +19 -0
- package/test/typescript/get_tower_server_info.test-d.ts +16 -0
- package/test/typescript/get_utxos.test-d.ts +27 -0
- package/test/typescript/get_wallet_info.test-d.ts +16 -0
- package/test/typescript/get_wallet_status.test-d.ts +16 -0
- package/test/typescript/get_wallet_version.test-d.ts +16 -0
- package/test/typescript/grant_access.test-d.ts +19 -0
- package/test/typescript/is_destination_payable.test-d.ts +24 -0
- package/test/typescript/lock_utxo.test-d.ts +30 -0
- package/test/typescript/open_channel.test-d.ts +61 -0
- package/test/typescript/open_channels.test-d.ts +50 -0
- package/test/typescript/partially_sign_psbt.test-d.ts +18 -0
- package/test/typescript/pay.test-d.ts +54 -0
- package/test/typescript/pay_via_payment_details.test-d.ts +72 -0
- package/test/typescript/pay_via_payment_request.test-d.ts +25 -0
- package/test/typescript/pay_via_routes.test-d.ts +39 -0
- package/test/typescript/prepare_for_channel_proposal.test-d.ts +65 -0
- package/test/typescript/probe_for_route.test-d.ts +39 -0
- package/test/typescript/propose_channel.test-d.ts +44 -0
- package/test/typescript/recover_funds_from_channel.test-d.ts +15 -0
- package/test/typescript/recover_funds_from_channels.test-d.ts +17 -0
- package/test/typescript/remove_external_socket.test-d.ts +14 -0
- package/test/typescript/remove_peer.test-d.ts +12 -0
- package/test/typescript/request_chain_fee_increase.test-d.ts +45 -0
- package/test/typescript/revoke_access.test-d.ts +15 -0
- package/test/typescript/route_failure_keys.test-d.ts +20 -0
- package/test/typescript/script_from_chain_address.test-d.ts +30 -0
- package/test/typescript/send_message_to_peer.test-d.ts +24 -0
- package/test/typescript/send_to_chain_address.test-d.ts +64 -0
- package/test/typescript/send_to_chain_addresses.test-d.ts +57 -0
- package/test/typescript/send_to_chain_output_scripts.test-d.ts +46 -0
- package/test/typescript/set_autopilot.test-d.ts +33 -0
- package/test/typescript/settle_hodl_invoice.test-d.ts +15 -0
- package/test/typescript/sign_bytes.test-d.ts +40 -0
- package/test/typescript/sign_chain_address_message.test-d.ts +27 -0
- package/test/typescript/sign_message.test-d.ts +19 -0
- package/test/typescript/sign_psbt.test-d.ts +19 -0
- package/test/typescript/sign_transaction.test-d.ts +58 -0
- package/test/typescript/stop_daemon.test-d.ts +12 -0
- package/test/typescript/subscribe_to_backups.test-d.ts +11 -0
- package/test/typescript/subscribe_to_blocks.test-d.ts +11 -0
- package/test/typescript/subscribe_to_chain_address.test-d.ts +53 -0
- package/test/typescript/subscribe_to_chain_spend.test-d.ts +51 -0
- package/test/typescript/subscribe_to_channels.test-d.ts +11 -0
- package/test/typescript/subscribe_to_forward_requests.test-d.ts +11 -0
- package/test/typescript/subscribe_to_forwards.test-d.ts +11 -0
- package/test/typescript/subscribe_to_graph.test-d.ts +11 -0
- package/test/typescript/subscribe_to_invoice.test-d.ts +14 -0
- package/test/typescript/subscribe_to_invoices.test-d.ts +17 -0
- package/test/typescript/subscribe_to_open_requests.test-d.ts +11 -0
- package/test/typescript/subscribe_to_past_payment.test-d.ts +14 -0
- package/test/typescript/subscribe_to_past_payments.test-d.ts +11 -0
- package/test/typescript/subscribe_to_pay.test-d.ts +19 -0
- package/test/typescript/subscribe_to_pay_via_details.test-d.ts +14 -0
- package/test/typescript/subscribe_to_pay_via_request.test-d.ts +14 -0
- package/test/typescript/subscribe_to_pay_via_routes.test-d.ts +39 -0
- package/test/typescript/subscribe_to_peer_messages.test-d.ts +11 -0
- package/test/typescript/subscribe_to_peers.test-d.ts +11 -0
- package/test/typescript/subscribe_to_probe_for_route.test-d.ts +14 -0
- package/test/typescript/subscribe_to_rpc_requests.test-d.ts +46 -0
- package/test/typescript/subscribe_to_transactions.test-d.ts +11 -0
- package/test/typescript/subscribe_to_wallet_status.test-d.ts +11 -0
- package/test/typescript/unauthenticated_lnd_grpc.test-d.ts +11 -0
- package/test/typescript/unlock_utxo.test-d.ts +19 -0
- package/test/typescript/unlock_wallet.test-d.ts +16 -0
- package/test/typescript/update_alias.test-d.ts +14 -0
- package/test/typescript/update_chain_transaction.test-d.ts +19 -0
- package/test/typescript/update_color.test-d.ts +14 -0
- package/test/typescript/update_connected_watchtower.test-d.ts +36 -0
- package/test/typescript/update_group_signing_session.test-d.ts +29 -0
- package/test/typescript/update_pathfinding_settings.test-d.ts +38 -0
- package/test/typescript/update_routing_fees.test-d.ts +35 -0
- package/test/typescript/verify_access.test-d.ts +23 -0
- package/test/typescript/verify_backup.test-d.ts +19 -0
- package/test/typescript/verify_backups.test-d.ts +29 -0
- package/test/typescript/verify_bytes_signature.test-d.ts +46 -0
- package/test/typescript/verify_chain_address_message.test-d.ts +32 -0
- package/test/typescript/verify_message.test-d.ts +24 -0
- package/typescript/index.d.ts +1 -0
- package/typescript/shared.d.ts +153 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {FailureReason} from '../typescript';
|
|
2
|
+
|
|
3
|
+
export type FailureFromPaymentArgs = {
|
|
4
|
+
payment_hash: string;
|
|
5
|
+
failure_reason: FailureReason;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type FailureFromPaymentResult = {
|
|
9
|
+
/** Payment Hash Hex String */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Payment Failed Due to Insufficient Balance Bool */
|
|
12
|
+
is_insufficient_balance: boolean;
|
|
13
|
+
/** Payment Failed Due to Invalid Details Rejection Bool */
|
|
14
|
+
is_invalid_payment: boolean;
|
|
15
|
+
/** Failure Due To Pathfinding Timeout Failure Bool */
|
|
16
|
+
is_pathfinding_timeout: boolean;
|
|
17
|
+
/** Failure Due to No Route To Destination Found Bool */
|
|
18
|
+
is_route_not_found: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function failureFromPayment(payment: {
|
|
22
|
+
payment_hash: string,
|
|
23
|
+
failure_reason: 'FAILURE_REASON_INSUFFICIENT_BALANCE';
|
|
24
|
+
}): {
|
|
25
|
+
id: string,
|
|
26
|
+
is_insufficient_balance: true;
|
|
27
|
+
is_invalid_payment: false;
|
|
28
|
+
is_pathfinding_timeout: false;
|
|
29
|
+
is_route_not_found: false;
|
|
30
|
+
};
|
|
31
|
+
export function failureFromPayment(payment: {
|
|
32
|
+
payment_hash: string,
|
|
33
|
+
failure_reason: 'FAILURE_REASON_INCORRECT_PAYMENT_DETAILS';
|
|
34
|
+
}): {
|
|
35
|
+
id: string,
|
|
36
|
+
is_insufficient_balance: false;
|
|
37
|
+
is_invalid_payment: true;
|
|
38
|
+
is_pathfinding_timeout: false;
|
|
39
|
+
is_route_not_found: false;
|
|
40
|
+
};
|
|
41
|
+
export function failureFromPayment(payment: {
|
|
42
|
+
payment_hash: string,
|
|
43
|
+
failure_reason: 'FAILURE_REASON_TIMEOUT';
|
|
44
|
+
}): {
|
|
45
|
+
id: string,
|
|
46
|
+
is_insufficient_balance: false;
|
|
47
|
+
is_invalid_payment: false;
|
|
48
|
+
is_pathfinding_timeout: true;
|
|
49
|
+
is_route_not_found: false;
|
|
50
|
+
};
|
|
51
|
+
export function failureFromPayment(payment: {
|
|
52
|
+
payment_hash: string,
|
|
53
|
+
failure_reason: 'FAILURE_REASON_NO_ROUTE';
|
|
54
|
+
}): {
|
|
55
|
+
id: string,
|
|
56
|
+
is_insufficient_balance: false;
|
|
57
|
+
is_invalid_payment: false;
|
|
58
|
+
is_pathfinding_timeout: false;
|
|
59
|
+
is_route_not_found: true;
|
|
60
|
+
};
|
|
61
|
+
export function failureFromPayment(
|
|
62
|
+
payment: FailureFromPaymentArgs
|
|
63
|
+
): FailureFromPaymentResult;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const {failureReason} = require('./constants');
|
|
2
|
+
|
|
3
|
+
const is256Hex = n => !!n && /^[0-9A-F]{64}$/i.test(n);
|
|
4
|
+
|
|
5
|
+
/** Derive failure status from payment
|
|
6
|
+
|
|
7
|
+
{
|
|
8
|
+
failure_reason: <Payment Failure Reason String>
|
|
9
|
+
payment_hash: <Payment SHA256 Hash Hex String>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@throws
|
|
13
|
+
<Error>
|
|
14
|
+
|
|
15
|
+
@returns
|
|
16
|
+
{
|
|
17
|
+
id: <Payment Hash Hex String>
|
|
18
|
+
is_canceled: <Payment Was Canceled Bool>
|
|
19
|
+
is_insufficient_balance: <Payment Failed Due to Insufficient Balance Bool>
|
|
20
|
+
is_invalid_payment: <Payment Failed Due to Invalid Details Rejection Bool>
|
|
21
|
+
is_pathfinding_timeout: <Failure Due To Pathfinding Timeout Failure Bool>
|
|
22
|
+
is_route_not_found: <Failure Due to No Route To Destination Found Bool>
|
|
23
|
+
}
|
|
24
|
+
*/
|
|
25
|
+
module.exports = payment => {
|
|
26
|
+
const state = payment.failure_reason;
|
|
27
|
+
|
|
28
|
+
if (!is256Hex(payment.payment_hash)) {
|
|
29
|
+
throw new Error('ExpectedPaymentHashForPaymentAsFailedPayment');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
id: payment.payment_hash,
|
|
34
|
+
is_canceled: state === failureReason.canceled,
|
|
35
|
+
is_insufficient_balance: state === failureReason.insufficient_balance,
|
|
36
|
+
is_invalid_payment: state === failureReason.invalid_payment,
|
|
37
|
+
is_pathfinding_timeout: state === failureReason.pathfinding_timeout_failed,
|
|
38
|
+
is_route_not_found: state === failureReason.pathfinding_routes_failed,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
const { chanFormat } = require("bolt07");
|
|
2
|
+
|
|
3
|
+
const { htlcTypes } = require("./constants");
|
|
4
|
+
const { safeTokens } = require("../bolt00");
|
|
5
|
+
|
|
6
|
+
const bufferAsHex = (buffer) => buffer.toString("hex");
|
|
7
|
+
const nsPerMs = BigInt(1e6);
|
|
8
|
+
|
|
9
|
+
/** Get RPC HTLC Event as a forward event
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
event_type: <Event Type String>
|
|
13
|
+
[forward_event]: {
|
|
14
|
+
info: {
|
|
15
|
+
incoming_amt_msat: <Incoming Channel HTLC Millitokens String>
|
|
16
|
+
incoming_timelock: <Incoming Channel CLTV Block Height Number>
|
|
17
|
+
outgoing_amt_msat: <Outgoing Channel HTLC Millitokens String>
|
|
18
|
+
outgoing_timelock: <Outgoing Channel CLTV Block Height Number>
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
[forward_fail_event]: <Forward Failure Event Object>
|
|
22
|
+
incoming_channel_id: <Inbound Channel Numeric Id String>
|
|
23
|
+
incoming_htlc_id: <Inbound Channel Historic Index Number>
|
|
24
|
+
[link_fail_event]: {
|
|
25
|
+
failure_detail: <Failure Code String>
|
|
26
|
+
failure_string: <Failure Description String>
|
|
27
|
+
info: {
|
|
28
|
+
incoming_amt_msat: <Incoming Channel HTLC Millitokens String>
|
|
29
|
+
incoming_timelock: <Incoming Channel CLTV Block Height Number>
|
|
30
|
+
outgoing_amt_msat: <Outgoing Channel HTLC Millitokens String>
|
|
31
|
+
outgoing_timelock: <Outgoing Channel CLTV Block Height Number>
|
|
32
|
+
}
|
|
33
|
+
wire_failure: <Wire Code String>
|
|
34
|
+
}
|
|
35
|
+
outgoing_channel_id: <Outbound Channel Numeric Id String>
|
|
36
|
+
outgoing_htlc_id: <Outbound Channel Historic Index Number>
|
|
37
|
+
[settle_event]: {
|
|
38
|
+
preimage: <HTLC Preimage Buffer Object>
|
|
39
|
+
}
|
|
40
|
+
timestamp_ns: <Timestamp Nanoseconds String>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@throws
|
|
44
|
+
<Error>
|
|
45
|
+
|
|
46
|
+
@returns
|
|
47
|
+
{
|
|
48
|
+
at: <Forward Update At ISO 8601 Date String>
|
|
49
|
+
[cltv_delta]: <CLTV Delta Number>
|
|
50
|
+
[external_failure]: <Public Failure Reason String>
|
|
51
|
+
[fee]: <Fee Tokens Charged Number>
|
|
52
|
+
[fee_mtokens]: <Fee Millitokens Charged String>
|
|
53
|
+
[in_channel]: <Inbound Standard Format Channel Id String>
|
|
54
|
+
[in_payment]: <Inbound Channel Payment Id Number>
|
|
55
|
+
[internal_failure]: <Private Failure Reason String>
|
|
56
|
+
is_confirmed: <Forward Is Confirmed Bool>
|
|
57
|
+
is_failed: <Forward Is Failed Bool>
|
|
58
|
+
is_receive: <Is Receive Bool>
|
|
59
|
+
is_send: <Is Send Bool>
|
|
60
|
+
[mtokens]: <Sending Millitokens String>
|
|
61
|
+
[out_channel]: <Outgoing Standard Format Channel Id String>
|
|
62
|
+
[out_payment]: <Outgoing Channel Payment Id Number>
|
|
63
|
+
[secret]: <Settled Preimage Hex String>
|
|
64
|
+
[timeout]: <Forward Timeout at Height Number>
|
|
65
|
+
[tokens]: <Sending Tokens Number>
|
|
66
|
+
}
|
|
67
|
+
*/
|
|
68
|
+
module.exports = (htlc) => {
|
|
69
|
+
if (!htlc.event_type) {
|
|
70
|
+
throw new Error("ExpectedHtlcEventTypeToDeriveForwardFromHtlcEvent");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!!htlc.forward_event) {
|
|
74
|
+
if (!htlc.forward_event.info) {
|
|
75
|
+
throw new Error("ExpectedHtlcInfoInForwardEvent");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!htlc.forward_event.info.incoming_amt_msat) {
|
|
79
|
+
throw new Error("ExpectedForwardEventIncomingAmountMsatToDeriveForward");
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (htlc.forward_event.info.incoming_timelock === undefined) {
|
|
83
|
+
throw new Error("ExpectedForwardEventIncomingTimelockToDeriveForward");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!htlc.forward_event.info.outgoing_amt_msat) {
|
|
87
|
+
throw new Error("ExpectedForwardEventOutgoingAmountMsatToDeriveForward");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (htlc.forward_event.info.outgoing_timelock === undefined) {
|
|
91
|
+
throw new Error("ExpectedForwardEventOutgoingTimelockToDeriveForward");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (!htlc.incoming_channel_id) {
|
|
96
|
+
throw new Error("ExpectedIncomingChannelIdToDeriveForward");
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!htlc.incoming_htlc_id) {
|
|
100
|
+
throw new Error("ExpectedIncomingHtlcIdToDeriveForward");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (!!htlc.link_fail_event) {
|
|
104
|
+
if (!htlc.link_fail_event.failure_detail) {
|
|
105
|
+
throw new Error("ExpectedLinkFailureDetailInLinkFailureEvent");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!htlc.link_fail_event.failure_string) {
|
|
109
|
+
throw new Error("ExpectedLinkFailureStringInLinkFailureEvent");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (!htlc.link_fail_event.info) {
|
|
113
|
+
throw new Error("ExpectedHtlcInfoInLinkFailEvent");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!htlc.link_fail_event.info.incoming_amt_msat) {
|
|
117
|
+
throw new Error("ExpectedLinkFailEventIncomingMsatToDeriveForward");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (htlc.link_fail_event.info.incoming_timelock === undefined) {
|
|
121
|
+
throw new Error("ExpectedLinkFailEventIncomingTimelockToDeriveForward");
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (!htlc.link_fail_event.info.outgoing_amt_msat) {
|
|
125
|
+
throw new Error("ExpectedLinkFailEventOutgoingMsatToDeriveForward");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (htlc.link_fail_event.info.outgoing_timelock === undefined) {
|
|
129
|
+
throw new Error("ExpectedForwardEventOutgoingTimelockToDeriveForward");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (!htlc.outgoing_channel_id) {
|
|
134
|
+
throw new Error("ExpectedOutgoingChannelIdToDeriveForward");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (!htlc.outgoing_htlc_id) {
|
|
138
|
+
throw new Error("ExpectedOutgoingHtlcIdToDeriveForward");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!!htlc.settle_event && !Buffer.isBuffer(htlc.settle_event.preimage)) {
|
|
142
|
+
throw new Error("ExpectedHtlcPreimageInForwardedSettleEvent");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (!htlc.timestamp_ns) {
|
|
146
|
+
throw new Error("ExpectedHtlcTimestampToDeriveForward");
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const createdAt = new Date(Number(BigInt(htlc.timestamp_ns) / nsPerMs));
|
|
150
|
+
const incoming = chanFormat({ number: htlc.incoming_channel_id });
|
|
151
|
+
const incomingId = Number(htlc.incoming_htlc_id);
|
|
152
|
+
const isFailure = !!htlc.forward_fail_event || !!htlc.link_fail_event;
|
|
153
|
+
const isForward = htlc.event_type === htlcTypes.forward;
|
|
154
|
+
const isReceive = htlc.event_type === htlcTypes.receive;
|
|
155
|
+
const isSend = htlc.event_type === htlcTypes.send;
|
|
156
|
+
const outgoing = chanFormat({ number: htlc.outgoing_channel_id });
|
|
157
|
+
const outgoingId = Number(htlc.outgoing_htlc_id);
|
|
158
|
+
const settleEvent = htlc.settle_event || { preimage: Buffer.alloc(Number()) };
|
|
159
|
+
|
|
160
|
+
// Exit early when there is no extended info, for failed forwards and settles
|
|
161
|
+
if (!!htlc.forward_fail_event || !!htlc.settle_event) {
|
|
162
|
+
return {
|
|
163
|
+
at: createdAt.toISOString(),
|
|
164
|
+
cltv_delta: undefined,
|
|
165
|
+
external_failure: undefined,
|
|
166
|
+
fee: undefined,
|
|
167
|
+
fee_mtokens: undefined,
|
|
168
|
+
in_channel: !!isSend ? undefined : incoming.channel,
|
|
169
|
+
in_payment: !!isSend ? undefined : incomingId,
|
|
170
|
+
internal_failure: undefined,
|
|
171
|
+
is_confirmed: !!htlc.settle_event,
|
|
172
|
+
is_failed: isFailure,
|
|
173
|
+
is_receive: isReceive,
|
|
174
|
+
is_send: isSend,
|
|
175
|
+
mtokens: undefined,
|
|
176
|
+
out_channel: !!isReceive ? undefined : outgoing.channel,
|
|
177
|
+
out_payment: !!isReceive ? undefined : outgoingId,
|
|
178
|
+
secret: bufferAsHex(settleEvent.preimage) || undefined,
|
|
179
|
+
timeout: undefined,
|
|
180
|
+
tokens: undefined,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (!htlc.forward_event && !htlc.link_fail_event) {
|
|
185
|
+
throw new Error("ExpectedForwardEventOrLinkFailEventInHtlcEvent");
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const { info } = htlc.forward_event || htlc.link_fail_event;
|
|
189
|
+
|
|
190
|
+
const outgoingAmount = BigInt(info.outgoing_amt_msat);
|
|
191
|
+
const outgoingCltvHeight = Number(info.outgoing_timelock);
|
|
192
|
+
|
|
193
|
+
const cltvDelta = Number(info.incoming_timelock) - outgoingCltvHeight;
|
|
194
|
+
const feeMtok = (BigInt(info.incoming_amt_msat) - outgoingAmount).toString();
|
|
195
|
+
|
|
196
|
+
const { tokens } = safeTokens({ mtokens: info.outgoing_amt_msat });
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
at: createdAt.toISOString(),
|
|
200
|
+
cltv_delta: !isForward ? undefined : cltvDelta,
|
|
201
|
+
external_failure: (htlc.link_fail_event || {}).wire_failure,
|
|
202
|
+
fee: !isForward ? undefined : safeTokens({ mtokens: feeMtok }).tokens,
|
|
203
|
+
fee_mtokens: !isForward ? undefined : feeMtok,
|
|
204
|
+
in_channel: !!isSend ? undefined : incoming.channel,
|
|
205
|
+
in_payment: !!isSend ? undefined : incomingId,
|
|
206
|
+
internal_failure: (htlc.link_fail_event || {}).failure_detail,
|
|
207
|
+
is_confirmed: false,
|
|
208
|
+
is_failed: !!htlc.link_fail_event,
|
|
209
|
+
is_receive: isReceive,
|
|
210
|
+
is_send: isSend,
|
|
211
|
+
mtokens: !!isReceive ? undefined : info.outgoing_amt_msat,
|
|
212
|
+
out_channel: !!isReceive ? undefined : outgoing.channel,
|
|
213
|
+
out_payment: !!isReceive ? undefined : outgoingId,
|
|
214
|
+
secret: bufferAsHex(settleEvent.preimage) || undefined,
|
|
215
|
+
timeout: !!isReceive ? undefined : outgoingCltvHeight,
|
|
216
|
+
tokens: !!isReceive ? undefined : tokens,
|
|
217
|
+
};
|
|
218
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const BN = require('bn.js');
|
|
2
|
+
const {chanFormat} = require('bolt07');
|
|
3
|
+
|
|
4
|
+
const {htlcStates} = require('./constants');
|
|
5
|
+
|
|
6
|
+
const dateFrom = seconds => new Date(1e3 * seconds).toISOString();
|
|
7
|
+
const endian = 'le';
|
|
8
|
+
const {keys} = Object;
|
|
9
|
+
const mtokensPerToken = BigInt(1e3);
|
|
10
|
+
|
|
11
|
+
/** Convert raw API HTLC response to payment attributes
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
accept_height: <HTLC Held Since Height Number>
|
|
15
|
+
accept_time: <HTLC Held Since Epoch Time Number String>
|
|
16
|
+
amt_msat: <HTLC Amount Millitokens String>
|
|
17
|
+
chan_id: <Numeric Channel Id String>
|
|
18
|
+
custom_records: {
|
|
19
|
+
<UInt64 String>: <Record Data Buffer>
|
|
20
|
+
}
|
|
21
|
+
expiry_height: <HTLC CLTV Expiration Height Number>
|
|
22
|
+
htlc_index: <Channel HTLC Index Number String>
|
|
23
|
+
mpp_total_amt_msat: <Total Payment Millitokens String>
|
|
24
|
+
resolve_time: <HTLC Removed At Epoch Time Number String>
|
|
25
|
+
state: <HTLC Lifecycle State String>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@throws
|
|
29
|
+
<Error>
|
|
30
|
+
|
|
31
|
+
@returns
|
|
32
|
+
{
|
|
33
|
+
[canceled_at]: <Payment Canceled At ISO 8601 Date String>
|
|
34
|
+
[confirmed_at]: <Payment Settled At ISO 8601 Date String>
|
|
35
|
+
created_at: <Payment Held Since ISO 860 Date String>
|
|
36
|
+
created_height: <Payment Held Since Block Height Number>
|
|
37
|
+
in_channel: <Incoming Payment Through Channel Id String>
|
|
38
|
+
is_canceled: <Payment is Canceled Bool>
|
|
39
|
+
is_confirmed: <Payment is Confirmed Bool>
|
|
40
|
+
is_held: <Payment is Held Bool>
|
|
41
|
+
messages: [{
|
|
42
|
+
type: <Message Type Number String>
|
|
43
|
+
value: <Raw Value Hex String>
|
|
44
|
+
}]
|
|
45
|
+
mtokens: <Incoming Payment Millitokens String>
|
|
46
|
+
[pending_index]: <Pending Payment Channel HTLC Index Number>
|
|
47
|
+
timeout: <HTLC CLTV Timeout Height Number>
|
|
48
|
+
tokens: <Payment Tokens Number>
|
|
49
|
+
[total_mtokens]: <Total Millitokens String>
|
|
50
|
+
}
|
|
51
|
+
*/
|
|
52
|
+
module.exports = args => {
|
|
53
|
+
if (!args.accept_height) {
|
|
54
|
+
throw new Error('ExpectedAcceptHeightInResponseHtlc');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!args.accept_time) {
|
|
58
|
+
throw new Error('ExpectedAcceptTimeInResponseHtlc');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!args.amt_msat) {
|
|
62
|
+
throw new Error('ExpectedPaymentAmountInResponseHtlc');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!args.chan_id) {
|
|
66
|
+
throw new Error('ExpectedChannelIdInResponseHtlc');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!args.custom_records) {
|
|
70
|
+
throw new Error('ExpectedCustomRecordsInResponseHtlc');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!args.expiry_height) {
|
|
74
|
+
throw new Error('ExpectedHtlcExpiryHeightInResponseHtlc');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!args.htlc_index) {
|
|
78
|
+
throw new Error('ExpectedHtlcIndexInResponseHtlc');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (args.resolve_time === undefined) {
|
|
82
|
+
throw new Error('ExpectedResolveTimeInResponseHtlc');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (!args.state) {
|
|
86
|
+
throw new Error('ExpectedHtlcStateInResponseHtlc');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const isAccepted = args.state === htlcStates.accepted;
|
|
90
|
+
const isCanceled = args.state === htlcStates.canceled;
|
|
91
|
+
const isReceived = args.state === htlcStates.received;
|
|
92
|
+
const totalMtokens = args.mpp_total_amt_msat;
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
canceled_at: !isCanceled ? undefined : dateFrom(args.resolve_time),
|
|
96
|
+
confirmed_at: !isReceived ? undefined : dateFrom(args.resolve_time),
|
|
97
|
+
created_at: dateFrom(args.accept_time),
|
|
98
|
+
created_height: args.accept_height,
|
|
99
|
+
in_channel: chanFormat({number: args.chan_id}).channel,
|
|
100
|
+
is_canceled: isCanceled,
|
|
101
|
+
is_confirmed: isReceived,
|
|
102
|
+
is_held: isAccepted,
|
|
103
|
+
messages: keys(args.custom_records).map(type => {
|
|
104
|
+
const rawType = Buffer.from(type, 'ascii').reverse();
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
type: new BN(rawType).toString(),
|
|
108
|
+
value: args.custom_records[type].toString('hex'),
|
|
109
|
+
};
|
|
110
|
+
}),
|
|
111
|
+
mtokens: args.amt_msat,
|
|
112
|
+
pending_index: isAccepted ? Number(args.htlc_index) : undefined,
|
|
113
|
+
timeout: args.expiry_height,
|
|
114
|
+
tokens: Number(BigInt(args.amt_msat) / mtokensPerToken),
|
|
115
|
+
total_mtokens: totalMtokens === '0' ? undefined : totalMtokens,
|
|
116
|
+
};
|
|
117
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const backupsFromSnapshot = require('./backups_from_snapshot');
|
|
2
|
+
const channelAcceptAsOpenRequest = require('./channel_accept_as_open_request');
|
|
3
|
+
const channelEdgeAsChannel = require('./channel_edge_as_channel');
|
|
4
|
+
const confirmedFromPayment = require('./confirmed_from_payment');
|
|
5
|
+
const confirmedFromPaymentStatus = require('./confirmed_from_payment_status');
|
|
6
|
+
const failureFromPayment = require('./failure_from_payment');
|
|
7
|
+
const forwardFromHtlcEvent = require('./forward_from_htlc_event');
|
|
8
|
+
const htlcAsPayment = require('./htlc_as_payment');
|
|
9
|
+
const infoAsWalletInfo = require('./info_as_wallet_info');
|
|
10
|
+
const nodeInfoAsNode = require('./node_info_as_node');
|
|
11
|
+
const paymentFailure = require('./payment_failure');
|
|
12
|
+
const paymentRequestDetails = require('./payment_request_details');
|
|
13
|
+
const pendingAsPendingChannels = require('./pending_as_pending_channels');
|
|
14
|
+
const pendingFromPayment = require('./pending_from_payment');
|
|
15
|
+
const policyFromChannelUpdate = require('./policy_from_channel_update');
|
|
16
|
+
const routesFromQueryRoutes = require('./routes_from_query_routes');
|
|
17
|
+
const routingFailureFromHtlc = require('./routing_failure_from_htlc');
|
|
18
|
+
const rpcAddressesAsAddresses = require('./rpc_addresses_as_addresses');
|
|
19
|
+
const rpcAttemptHtlcAsAttempt = require('./rpc_attempt_htlc_as_attempt');
|
|
20
|
+
const rpcChannelAsChannel = require('./rpc_channel_as_channel');
|
|
21
|
+
const rpcChannelClosedAsClosed = require('./rpc_channel_closed_as_closed');
|
|
22
|
+
const rpcChannelUpdateAsUpdate = require('./rpc_channel_update_as_update');
|
|
23
|
+
const rpcClosedChannelAsClosed = require('./rpc_closed_channel_as_closed');
|
|
24
|
+
const rpcConfAsConfirmation = require('./rpc_conf_as_confirmation');
|
|
25
|
+
const rpcFailedPolicyAsFail = require('./rpc_failed_policy_as_fail');
|
|
26
|
+
const rpcFeesAsChannelFees = require('./rpc_fees_as_channel_fees');
|
|
27
|
+
const rpcForwardAsForward = require('./rpc_forward_as_forward');
|
|
28
|
+
const rpcForwardAsForwardRequest = require('./rpc_forward_as_forward_request');
|
|
29
|
+
const rpcGroupSessionAsSession = require('./rpc_group_session_as_session');
|
|
30
|
+
const rpcHopAsHop = require('./rpc_hop_as_hop');
|
|
31
|
+
const rpcInvoiceAsInvoice = require('./rpc_invoice_as_invoice');
|
|
32
|
+
const rpcNetworkAsNetworkInfo = require('./rpc_network_as_network_info');
|
|
33
|
+
const rpcNodeAsNode = require('./rpc_node_as_node');
|
|
34
|
+
const rpcOutpointAsUpdate = require('./rpc_outpoint_as_update');
|
|
35
|
+
const rpcPaymentAsPayment = require('./rpc_payment_as_payment');
|
|
36
|
+
const rpcPeerAsPeer = require('./rpc_peer_as_peer');
|
|
37
|
+
const rpcPeerMessageAsMessage = require('./rpc_peer_message_as_message');
|
|
38
|
+
const rpcRequestUpdateAsEvent = require('./rpc_request_update_as_event');
|
|
39
|
+
const rpcResolutionAsResolution = require('./rpc_resolution_as_resolution');
|
|
40
|
+
const rpcRouteAsRoute = require('./rpc_route_as_route');
|
|
41
|
+
const rpcSweepAsSweep = require('./rpc_sweep_as_sweep');
|
|
42
|
+
const rpcTxAsTransaction = require('./rpc_tx_as_transaction');
|
|
43
|
+
const rpcUtxoAsUtxo = require('./rpc_utxo_as_utxo');
|
|
44
|
+
const rpcWalletStateAsState = require('./rpc_wallet_state_as_state');
|
|
45
|
+
|
|
46
|
+
module.exports = {
|
|
47
|
+
backupsFromSnapshot,
|
|
48
|
+
channelAcceptAsOpenRequest,
|
|
49
|
+
channelEdgeAsChannel,
|
|
50
|
+
confirmedFromPayment,
|
|
51
|
+
confirmedFromPaymentStatus,
|
|
52
|
+
failureFromPayment,
|
|
53
|
+
forwardFromHtlcEvent,
|
|
54
|
+
htlcAsPayment,
|
|
55
|
+
infoAsWalletInfo,
|
|
56
|
+
nodeInfoAsNode,
|
|
57
|
+
paymentFailure,
|
|
58
|
+
paymentRequestDetails,
|
|
59
|
+
pendingAsPendingChannels,
|
|
60
|
+
pendingFromPayment,
|
|
61
|
+
policyFromChannelUpdate,
|
|
62
|
+
routesFromQueryRoutes,
|
|
63
|
+
routingFailureFromHtlc,
|
|
64
|
+
rpcAddressesAsAddresses,
|
|
65
|
+
rpcAttemptHtlcAsAttempt,
|
|
66
|
+
rpcChannelAsChannel,
|
|
67
|
+
rpcChannelClosedAsClosed,
|
|
68
|
+
rpcChannelUpdateAsUpdate,
|
|
69
|
+
rpcClosedChannelAsClosed,
|
|
70
|
+
rpcConfAsConfirmation,
|
|
71
|
+
rpcFailedPolicyAsFail,
|
|
72
|
+
rpcFeesAsChannelFees,
|
|
73
|
+
rpcForwardAsForward,
|
|
74
|
+
rpcForwardAsForwardRequest,
|
|
75
|
+
rpcGroupSessionAsSession,
|
|
76
|
+
rpcHopAsHop,
|
|
77
|
+
rpcInvoiceAsInvoice,
|
|
78
|
+
rpcNetworkAsNetworkInfo,
|
|
79
|
+
rpcNodeAsNode,
|
|
80
|
+
rpcOutpointAsUpdate,
|
|
81
|
+
rpcPaymentAsPayment,
|
|
82
|
+
rpcPeerAsPeer,
|
|
83
|
+
rpcPeerMessageAsMessage,
|
|
84
|
+
rpcRequestUpdateAsEvent,
|
|
85
|
+
rpcResolutionAsResolution,
|
|
86
|
+
rpcRouteAsRoute,
|
|
87
|
+
rpcSweepAsSweep,
|
|
88
|
+
rpcTxAsTransaction,
|
|
89
|
+
rpcUtxoAsUtxo,
|
|
90
|
+
rpcWalletStateAsState,
|
|
91
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const { chainId } = require("../bolt02");
|
|
2
|
+
const { featureFlagDetails } = require("bolt09");
|
|
3
|
+
|
|
4
|
+
const dateFromEpoch = (epoch) => new Date(epoch * 1e3);
|
|
5
|
+
const { isArray } = Array;
|
|
6
|
+
const isBoolean = (n) => n === false || n === true;
|
|
7
|
+
const isNumber = (n) => !isNaN(n);
|
|
8
|
+
const isString = (n) => typeof n === "string";
|
|
9
|
+
const { keys } = Object;
|
|
10
|
+
|
|
11
|
+
/** Interpret info as wallet info
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
alias: <Alias String>
|
|
15
|
+
best_header_timestamp: <Best Header Timestamp Epoch Seconds Number>
|
|
16
|
+
block_hash: <Best Block Hash Hex String>
|
|
17
|
+
block_height: <Best Block Height Number>
|
|
18
|
+
chains: [{
|
|
19
|
+
chain: <Chain Name String>
|
|
20
|
+
network: <Network Type String>
|
|
21
|
+
}]
|
|
22
|
+
color: <HEX Color String>
|
|
23
|
+
identity_pubkey: <Node Public Key Hex String>
|
|
24
|
+
num_active_channels: <Active Channels Count Number>
|
|
25
|
+
num_peers: <Total Peers Number>
|
|
26
|
+
num_pending_channels: <Total Pending Channels Number>
|
|
27
|
+
synced_to_chain: <Node Is Synced To Chain Bool>
|
|
28
|
+
uris: [<Node URI String>]
|
|
29
|
+
version: <Node Version String>
|
|
30
|
+
}
|
|
31
|
+
*/
|
|
32
|
+
module.exports = (args) => {
|
|
33
|
+
if (!args) {
|
|
34
|
+
throw new Error("ExpectedWalletResponse");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!isString(args.alias)) {
|
|
38
|
+
throw new Error("ExpectedWalletAlias");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!args.best_header_timestamp) {
|
|
42
|
+
throw new Error("ExpectedBestHeaderTimestampInInfoResponse");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (!isString(args.block_hash)) {
|
|
46
|
+
throw new Error("ExpectedCurrentBlockHash");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!isNumber(args.block_height)) {
|
|
50
|
+
throw new Error("ExpectedBlockHeight");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!isArray(args.chains)) {
|
|
54
|
+
throw new Error("ExpectedChainsAssociatedWithWallet");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!args.color) {
|
|
58
|
+
throw new Error("ExpectedWalletColorInWalletInfoResponse");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!args.features) {
|
|
62
|
+
throw new Error("ExpectedFeaturesMapInWalletInfoResponse");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!args.identity_pubkey) {
|
|
66
|
+
throw new Error("ExpectedIdentityPubkey");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!isNumber(args.num_active_channels)) {
|
|
70
|
+
throw new Error("ExpectedNumActiveChannels");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!isNumber(args.num_peers)) {
|
|
74
|
+
throw new Error("ExpectedNumPeers");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!isNumber(args.num_pending_channels)) {
|
|
78
|
+
throw new Error("ExpectedNumPendingChannels");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!isBoolean(args.synced_to_chain)) {
|
|
82
|
+
throw new Error("ExpectedSyncedToChainStatus");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (!isArray(args.uris)) {
|
|
86
|
+
throw new Error("ExpectedArrayOfUrisInWalletInfoResponse");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!isString(args.version)) {
|
|
90
|
+
throw new Error("ExpectedWalletLndVersion");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
chains: args.chains
|
|
95
|
+
.map(({ chain, network }) => chainId({ chain, network }).chain)
|
|
96
|
+
.filter((n) => !!n),
|
|
97
|
+
color: args.color,
|
|
98
|
+
active_channels_count: args.num_active_channels,
|
|
99
|
+
alias: args.alias,
|
|
100
|
+
current_block_hash: args.block_hash,
|
|
101
|
+
current_block_height: args.block_height,
|
|
102
|
+
features: keys(args.features).map((bit) => ({
|
|
103
|
+
bit: Number(bit),
|
|
104
|
+
is_known: args.features[bit].is_known,
|
|
105
|
+
is_required: args.features[bit].is_required,
|
|
106
|
+
type: featureFlagDetails({ bit: Number(bit) }).type,
|
|
107
|
+
})),
|
|
108
|
+
is_synced_to_chain: args.synced_to_chain,
|
|
109
|
+
is_synced_to_graph: !args.synced_to_graph ? undefined : true,
|
|
110
|
+
latest_block_at: dateFromEpoch(args.best_header_timestamp).toISOString(),
|
|
111
|
+
peers_count: args.num_peers,
|
|
112
|
+
pending_channels_count: args.num_pending_channels,
|
|
113
|
+
public_key: args.identity_pubkey,
|
|
114
|
+
uris: args.uris,
|
|
115
|
+
version: args.version,
|
|
116
|
+
};
|
|
117
|
+
};
|