mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-18 15:54:31 +01:00
Merge pull request #76 from stakwork/23-03-update
update serial comm, chain tracker, clap args
This commit is contained in:
334
broker/Cargo.lock
generated
334
broker/Cargo.lock
generated
@@ -58,6 +58,12 @@ dependencies = [
|
|||||||
"subtle",
|
"subtle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ahash"
|
||||||
|
version = "0.3.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ahash"
|
name = "ahash"
|
||||||
version = "0.7.6"
|
version = "0.7.6"
|
||||||
@@ -312,6 +318,8 @@ checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bech32",
|
"bech32",
|
||||||
"bitcoin_hashes 0.11.0",
|
"bitcoin_hashes 0.11.0",
|
||||||
|
"core2",
|
||||||
|
"hashbrown 0.8.2",
|
||||||
"secp256k1",
|
"secp256k1",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@@ -328,25 +336,10 @@ version = "0.11.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
|
checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"core2",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bitcoind-client"
|
|
||||||
version = "0.1.0-5"
|
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
|
||||||
dependencies = [
|
|
||||||
"async-trait",
|
|
||||||
"jsonrpc-async",
|
|
||||||
"log",
|
|
||||||
"reqwest",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tokio",
|
|
||||||
"url",
|
|
||||||
"vls-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.3.2"
|
version = "1.3.2"
|
||||||
@@ -377,7 +370,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "bolt-derive"
|
name = "bolt-derive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -488,21 +481,19 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "3.0.0-beta.2"
|
version = "3.2.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142"
|
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"clap_derive 3.0.0-beta.5",
|
"clap_derive 3.2.18",
|
||||||
|
"clap_lex 0.2.4",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"lazy_static",
|
"once_cell",
|
||||||
"os_str_bytes 2.4.0",
|
|
||||||
"strsim",
|
"strsim",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"textwrap",
|
"textwrap",
|
||||||
"unicode-width",
|
|
||||||
"vec_map",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -513,7 +504,7 @@ checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"clap_derive 4.1.0",
|
"clap_derive 4.1.0",
|
||||||
"clap_lex",
|
"clap_lex 0.3.1",
|
||||||
"is-terminal",
|
"is-terminal",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"strsim",
|
"strsim",
|
||||||
@@ -522,11 +513,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_derive"
|
name = "clap_derive"
|
||||||
version = "3.0.0-beta.5"
|
version = "3.2.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3"
|
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.3.3",
|
"heck",
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -539,20 +530,29 @@ version = "4.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
|
checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.4.0",
|
"heck",
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "clap_lex"
|
||||||
|
version = "0.2.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
|
||||||
|
dependencies = [
|
||||||
|
"os_str_bytes",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_lex"
|
name = "clap_lex"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
|
checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"os_str_bytes 6.4.1",
|
"os_str_bytes",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -639,6 +639,15 @@ version = "0.8.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
|
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "core2"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "239fa3ae9b63c2dc74bd3fa852d4792b8b305ae64eeede946265b6af62f1fff3"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
@@ -666,7 +675,7 @@ dependencies = [
|
|||||||
"autocfg",
|
"autocfg",
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"memoffset 0.7.1",
|
"memoffset",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -701,12 +710,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ctrlc"
|
name = "ctrlc"
|
||||||
version = "3.2.3"
|
version = "3.2.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"
|
checksum = "bbcf33c2a618cbe41ee43ae6e9f2e48368cd9f9db2896f10167d8d762679f639"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nix 0.25.1",
|
"nix",
|
||||||
"winapi",
|
"windows-sys 0.45.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1286,11 +1295,12 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.11.2"
|
version = "0.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash 0.3.8",
|
||||||
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1299,16 +1309,7 @@ version = "0.12.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash 0.7.6",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "heck"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-segmentation",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1653,16 +1654,18 @@ checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lightning"
|
name = "lightning"
|
||||||
version = "0.0.112"
|
version = "0.0.114"
|
||||||
source = "git+https://github.com/lightningdevkit/rust-lightning.git?rev=af7c2920e1e5ae4ba3f522730e5cce99bedacc8c#af7c2920e1e5ae4ba3f522730e5cce99bedacc8c"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "800ec68a160529ba3ca12c5db629867c4a8de2df272792c1246602966a5b789b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lightning-invoice"
|
name = "lightning-invoice"
|
||||||
version = "0.20.0"
|
version = "0.22.0"
|
||||||
source = "git+https://github.com/lightningdevkit/rust-lightning.git?rev=af7c2920e1e5ae4ba3f522730e5cce99bedacc8c#af7c2920e1e5ae4ba3f522730e5cce99bedacc8c"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "adfb59c6d13e130aece30fc72a7c17d74b201aed0ffb201b740f36e07aaece32"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bech32",
|
"bech32",
|
||||||
"bitcoin_hashes 0.11.0",
|
"bitcoin_hashes 0.11.0",
|
||||||
@@ -1673,14 +1676,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lightning-storage-server"
|
name = "lightning-storage-server"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bitcoin_hashes 0.11.0",
|
"bitcoin_hashes 0.11.0",
|
||||||
"clap 3.0.0-beta.2",
|
"clap 3.2.23",
|
||||||
"clap_derive 3.0.0-beta.5",
|
|
||||||
"ctrlc",
|
"ctrlc",
|
||||||
"dirs",
|
"dirs",
|
||||||
"fern",
|
"fern",
|
||||||
@@ -1799,15 +1801,6 @@ version = "2.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memoffset"
|
|
||||||
version = "0.6.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@@ -1823,7 +1816,7 @@ version = "0.20.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849"
|
checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash 0.7.6",
|
||||||
"metrics-macros",
|
"metrics-macros",
|
||||||
"portable-atomic",
|
"portable-atomic",
|
||||||
]
|
]
|
||||||
@@ -1973,27 +1966,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.22.3"
|
version = "0.26.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf"
|
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
|
||||||
"cc",
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"libc",
|
|
||||||
"memoffset 0.6.5",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nix"
|
|
||||||
version = "0.25.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"libc",
|
"libc",
|
||||||
|
"memoffset",
|
||||||
|
"pin-utils",
|
||||||
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2118,12 +2100,6 @@ dependencies = [
|
|||||||
"hashbrown 0.12.3",
|
"hashbrown 0.12.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "os_str_bytes"
|
|
||||||
version = "2.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "os_str_bytes"
|
name = "os_str_bytes"
|
||||||
version = "6.4.1"
|
version = "6.4.1"
|
||||||
@@ -2424,7 +2400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "e330bf1316db56b12c2bcfa399e8edddd4821965ea25ddb2c134b610b1c1c604"
|
checksum = "e330bf1316db56b12c2bcfa399e8edddd4821965ea25ddb2c134b610b1c1c604"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"heck 0.4.0",
|
"heck",
|
||||||
"itertools",
|
"itertools",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
@@ -2847,7 +2823,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"slab",
|
"slab",
|
||||||
"sphinx-auther",
|
"sphinx-auther 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
@@ -3003,10 +2979,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_bolt"
|
name = "serde_bolt"
|
||||||
version = "0.2.0"
|
version = "0.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "704720009634ab092146c0b01eb578ae8b9d88eef028398752965fd766eb38bd"
|
checksum = "fd5fb14792b8d139f641e6d0e1a19eb0e3c47ec8629a2dc4e75fcbd7d77f46a8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"hex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
@@ -3082,6 +3059,19 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_yaml"
|
||||||
|
version = "0.9.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f82e6c8c047aa50a7328632d067bcae6ef38772a79e28daf32f735e0e4f3dd10"
|
||||||
|
dependencies = [
|
||||||
|
"indexmap",
|
||||||
|
"itoa",
|
||||||
|
"ryu",
|
||||||
|
"serde",
|
||||||
|
"unsafe-libyaml",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sha1"
|
name = "sha1"
|
||||||
version = "0.10.5"
|
version = "0.10.5"
|
||||||
@@ -3192,16 +3182,28 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sphinx-glyph"
|
name = "sphinx-auther"
|
||||||
version = "0.1.2"
|
version = "0.1.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/stakwork/sphinx-rs#29f63185842ee530703cfa6889697ad4007bf28f"
|
||||||
checksum = "62fadd6d488d0e5d824acfc3e8a74599429836c9422503c2dfc84418a19bae24"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"base64",
|
||||||
|
"hex",
|
||||||
|
"log",
|
||||||
|
"secp256k1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sphinx-glyph"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "git+https://github.com/stakwork/sphinx-rs#29f63185842ee530703cfa6889697ad4007bf28f"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"hex",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sphinx-auther",
|
"sphinx-auther 0.1.12 (git+https://github.com/stakwork/sphinx-rs)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3212,8 +3214,8 @@ dependencies = [
|
|||||||
"async-trait",
|
"async-trait",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap 3.0.0-beta.2",
|
"clap 3.2.23",
|
||||||
"clap_derive 3.0.0-beta.5",
|
"clap_derive 3.2.18",
|
||||||
"confy",
|
"confy",
|
||||||
"fern",
|
"fern",
|
||||||
"hex",
|
"hex",
|
||||||
@@ -3237,7 +3239,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sphinx-signer"
|
name = "sphinx-signer"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/stakwork/sphinx-rs#d66360da1aaa8b161366d6a4217129b9402f0ab7"
|
source = "git+https://github.com/stakwork/sphinx-rs#29f63185842ee530703cfa6889697ad4007bf28f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bip39",
|
"bip39",
|
||||||
@@ -3351,12 +3353,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "textwrap"
|
name = "textwrap"
|
||||||
version = "0.12.1"
|
version = "0.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789"
|
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
|
||||||
dependencies = [
|
|
||||||
"unicode-width",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
@@ -3450,22 +3449,22 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.17.0"
|
version = "1.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
|
checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
"bytes",
|
"bytes",
|
||||||
"libc",
|
"libc",
|
||||||
"memchr",
|
"memchr",
|
||||||
"mio",
|
"mio",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"once_cell",
|
|
||||||
"parking_lot 0.12.1",
|
"parking_lot 0.12.1",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"signal-hook-registry",
|
"signal-hook-registry",
|
||||||
"socket2",
|
"socket2",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
"winapi",
|
"windows-sys 0.45.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3726,6 +3725,37 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "txoo"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "09c71b228077155d24c30be72d7941c90f3a69acdfabf8b5e3166606f1334999"
|
||||||
|
dependencies = [
|
||||||
|
"bitcoin",
|
||||||
|
"core2",
|
||||||
|
"log",
|
||||||
|
"serde",
|
||||||
|
"serde_yaml",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "txoo-bitcoind-client"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "be487581ff10fc300238a9be763dc5e63f196a3d322f348d23556cf6912f9093"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"bitcoin",
|
||||||
|
"jsonrpc-async",
|
||||||
|
"log",
|
||||||
|
"reqwest",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tokio",
|
||||||
|
"txoo",
|
||||||
|
"url",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
@@ -3787,12 +3817,6 @@ dependencies = [
|
|||||||
"smallvec 0.6.14",
|
"smallvec 0.6.14",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-segmentation"
|
|
||||||
version = "1.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-width"
|
name = "unicode-width"
|
||||||
version = "0.1.10"
|
version = "0.1.10"
|
||||||
@@ -3815,6 +3839,12 @@ dependencies = [
|
|||||||
"subtle",
|
"subtle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unsafe-libyaml"
|
||||||
|
version = "0.2.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ad2024452afd3874bf539695e04af6732ba06517424dbf958fdb16a01f3bef6c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "untrusted"
|
name = "untrusted"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@@ -3838,12 +3868,6 @@ version = "0.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "vec_map"
|
|
||||||
version = "0.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "version_check"
|
name = "version_check"
|
||||||
version = "0.9.4"
|
version = "0.9.4"
|
||||||
@@ -3852,38 +3876,45 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-core"
|
name = "vls-core"
|
||||||
version = "0.1.0-5"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
|
"bolt-derive",
|
||||||
"env_logger 0.9.3",
|
"env_logger 0.9.3",
|
||||||
"hashbrown 0.11.2",
|
"hashbrown 0.8.2",
|
||||||
|
"hex",
|
||||||
"itertools",
|
"itertools",
|
||||||
"lightning",
|
"lightning",
|
||||||
"lightning-invoice",
|
"lightning-invoice",
|
||||||
"log",
|
"log",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
|
"serde",
|
||||||
|
"serde_bolt",
|
||||||
|
"serde_derive",
|
||||||
|
"serde_with",
|
||||||
|
"txoo",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-frontend"
|
name = "vls-frontend"
|
||||||
version = "0.1.0-5"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bitcoind-client",
|
|
||||||
"log",
|
"log",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"txoo-bitcoind-client",
|
||||||
"url",
|
"url",
|
||||||
"vls-core",
|
"vls-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-persist"
|
name = "vls-persist"
|
||||||
version = "0.1.0"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex",
|
"hex",
|
||||||
"kv",
|
"kv",
|
||||||
@@ -3896,11 +3927,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-protocol"
|
name = "vls-protocol"
|
||||||
version = "0.1.0"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as-any",
|
"as-any",
|
||||||
"bolt-derive",
|
"bolt-derive",
|
||||||
|
"hex",
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_bolt",
|
"serde_bolt",
|
||||||
@@ -3909,8 +3941,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-protocol-client"
|
name = "vls-protocol-client"
|
||||||
version = "0.1.0"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -3919,12 +3951,13 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"vls-core",
|
"vls-core",
|
||||||
"vls-protocol",
|
"vls-protocol",
|
||||||
|
"vls-protocol-signer",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-protocol-signer"
|
name = "vls-protocol-signer"
|
||||||
version = "0.1.0"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bit-vec",
|
"bit-vec",
|
||||||
"log",
|
"log",
|
||||||
@@ -3935,16 +3968,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vls-proxy"
|
name = "vls-proxy"
|
||||||
version = "0.1.0"
|
version = "0.2.0-rc.2"
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git?rev=dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625#dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"as-any",
|
"as-any",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bitcoind-client",
|
"clap 3.2.23",
|
||||||
"clap 3.0.0-beta.2",
|
|
||||||
"clap_derive 3.0.0-beta.5",
|
|
||||||
"ctrlc",
|
"ctrlc",
|
||||||
"fern",
|
"fern",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -3953,38 +3984,25 @@ dependencies = [
|
|||||||
"hyper",
|
"hyper",
|
||||||
"lightning-storage-server",
|
"lightning-storage-server",
|
||||||
"log",
|
"log",
|
||||||
"nix 0.22.3",
|
"nix",
|
||||||
"prost",
|
"prost",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"time 0.3.17",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
|
"toml",
|
||||||
"tonic",
|
"tonic",
|
||||||
"tonic-build",
|
"tonic-build",
|
||||||
"triggered",
|
"triggered",
|
||||||
|
"txoo-bitcoind-client",
|
||||||
"url",
|
"url",
|
||||||
"vls-core",
|
"vls-core",
|
||||||
"vls-frontend",
|
"vls-frontend",
|
||||||
|
"vls-persist",
|
||||||
"vls-protocol",
|
"vls-protocol",
|
||||||
"vls-protocol-client",
|
"vls-protocol-client",
|
||||||
"vls-protocol-signer",
|
"vls-protocol-signer",
|
||||||
"vls-server",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "vls-server"
|
|
||||||
version = "0.1.0-5"
|
|
||||||
source = "git+https://gitlab.com/lightning-signer/validating-lightning-signer.git#b00faf17288b4c08411175e5d32c0fa4ba159389"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"async-trait",
|
|
||||||
"hex",
|
|
||||||
"log",
|
|
||||||
"time 0.3.17",
|
|
||||||
"tonic-build",
|
|
||||||
"vls-core",
|
|
||||||
"vls-frontend",
|
|
||||||
"vls-persist",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ strip = "debuginfo"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs" }
|
sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs" }
|
||||||
# sphinx-key-parser = { path = "../parser" }
|
# sphinx-key-parser = { path = "../parser" }
|
||||||
vls-protocol = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git" }
|
vls-protocol = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625" }
|
||||||
vls-proxy = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git" }
|
vls-proxy = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625" }
|
||||||
vls-frontend = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git" }
|
vls-frontend = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625" }
|
||||||
vls-protocol-client = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git" }
|
vls-protocol-client = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "dcd8628893b5504b3ac2d3eb8cc5ed36f36d7625" }
|
||||||
rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "sphinx" }
|
rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "sphinx" }
|
||||||
pretty_env_logger = "0.4.0"
|
pretty_env_logger = "0.4.0"
|
||||||
confy = "0.4.0"
|
confy = "0.4.0"
|
||||||
@@ -22,8 +22,8 @@ anyhow = {version = "1", features = ["backtrace"]}
|
|||||||
log = "0.4"
|
log = "0.4"
|
||||||
fern = { version = "0.6", features = ["colored"] }
|
fern = { version = "0.6", features = ["colored"] }
|
||||||
rumqttc = "0.12.0"
|
rumqttc = "0.12.0"
|
||||||
clap = "=3.0.0-beta.2"
|
clap = "3.2"
|
||||||
clap_derive = "=3.0.0-beta.5"
|
clap_derive = "3.2"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
once_cell = "1.12.0"
|
once_cell = "1.12.0"
|
||||||
bitcoin = "0.29.0"
|
bitcoin = "0.29.0"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use async_trait::async_trait;
|
|||||||
use rocket::tokio::sync::{mpsc, oneshot};
|
use rocket::tokio::sync::{mpsc, oneshot};
|
||||||
use sphinx_signer::sphinx_glyph::topics;
|
use sphinx_signer::sphinx_glyph::topics;
|
||||||
use vls_protocol::{Error, Result};
|
use vls_protocol::{Error, Result};
|
||||||
use vls_protocol_client::SignerPort;
|
use vls_protocol_client::{ClientResult, SignerPort};
|
||||||
|
|
||||||
pub struct MqttSignerPort {
|
pub struct MqttSignerPort {
|
||||||
sender: mpsc::Sender<ChannelRequest>,
|
sender: mpsc::Sender<ChannelRequest>,
|
||||||
@@ -11,7 +11,7 @@ pub struct MqttSignerPort {
|
|||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl SignerPort for MqttSignerPort {
|
impl SignerPort for MqttSignerPort {
|
||||||
async fn handle_message(&self, message: Vec<u8>) -> Result<Vec<u8>> {
|
async fn handle_message(&self, message: Vec<u8>) -> ClientResult<Vec<u8>> {
|
||||||
let reply_rx = self.send_request(message).await?;
|
let reply_rx = self.send_request(message).await?;
|
||||||
self.get_reply(reply_rx).await
|
self.get_reply(reply_rx).await
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ impl MqttSignerPort {
|
|||||||
Ok(reply_rx)
|
Ok(reply_rx)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_reply(&self, reply_rx: oneshot::Receiver<ChannelReply>) -> Result<Vec<u8>> {
|
async fn get_reply(&self, reply_rx: oneshot::Receiver<ChannelReply>) -> ClientResult<Vec<u8>> {
|
||||||
let reply = reply_rx.await.map_err(|_| Error::Eof)?;
|
let reply = reply_rx.await.map_err(|_| Error::Eof)?;
|
||||||
Ok(reply.reply)
|
Ok(reply.reply)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use crate::chain_tracker::MqttSignerPort;
|
|||||||
use crate::mqtt::start_broker;
|
use crate::mqtt::start_broker;
|
||||||
use crate::unix_fd::SignerLoop;
|
use crate::unix_fd::SignerLoop;
|
||||||
use crate::util::read_broker_config;
|
use crate::util::read_broker_config;
|
||||||
use clap::{App, AppSettings, Arg};
|
use clap::{arg, App};
|
||||||
use rocket::tokio::{
|
use rocket::tokio::{
|
||||||
self,
|
self,
|
||||||
sync::{broadcast, mpsc, oneshot},
|
sync::{broadcast, mpsc, oneshot},
|
||||||
@@ -19,10 +19,11 @@ use rocket::tokio::{
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use vls_frontend::Frontend;
|
use vls_frontend::{frontend::SourceFactory, Frontend};
|
||||||
use vls_proxy::client::UnixClient;
|
use vls_proxy::client::UnixClient;
|
||||||
use vls_proxy::connection::{open_parent_fd, UnixConnection};
|
use vls_proxy::connection::{open_parent_fd, UnixConnection};
|
||||||
use vls_proxy::portfront::SignerPortFront;
|
use vls_proxy::portfront::SignerPortFront;
|
||||||
|
use vls_proxy::util::{add_hsmd_args, handle_hsmd_version};
|
||||||
|
|
||||||
pub struct Channel {
|
pub struct Channel {
|
||||||
pub sequence: u16,
|
pub sequence: u16,
|
||||||
@@ -62,20 +63,15 @@ async fn rocket() -> _ {
|
|||||||
let parent_fd = open_parent_fd();
|
let parent_fd = open_parent_fd();
|
||||||
|
|
||||||
util::setup_logging("hsmd ", "info");
|
util::setup_logging("hsmd ", "info");
|
||||||
let app = App::new("signer")
|
let app = make_clap_app();
|
||||||
.setting(AppSettings::NoAutoVersion)
|
|
||||||
.about("CLN:mqtt - connects to an embedded VLS over a MQTT connection")
|
|
||||||
.arg(
|
|
||||||
Arg::new("--dev-disconnect")
|
|
||||||
.about("ignored dev flag")
|
|
||||||
.long("dev-disconnect")
|
|
||||||
.takes_value(true),
|
|
||||||
)
|
|
||||||
.arg(Arg::from("--log-io ignored dev flag"))
|
|
||||||
.arg(Arg::from("--version show a dummy version"))
|
|
||||||
.arg(Arg::from("--test run a test against the embedded device"));
|
|
||||||
|
|
||||||
let matches = app.get_matches();
|
let matches = app.get_matches();
|
||||||
|
if matches.is_present("git-desc") {
|
||||||
|
println!("remote_hsmd_socket git_desc={}", vls_proxy::GIT_DESC);
|
||||||
|
panic!("end")
|
||||||
|
}
|
||||||
|
if handle_hsmd_version(&matches) {
|
||||||
|
panic!("end")
|
||||||
|
}
|
||||||
|
|
||||||
if matches.is_present("version") {
|
if matches.is_present("version") {
|
||||||
// Pretend to be the right version, given to us by an env var
|
// Pretend to be the right version, given to us by an env var
|
||||||
@@ -92,6 +88,13 @@ async fn rocket() -> _ {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn make_clap_app() -> App<'static> {
|
||||||
|
let app = App::new("signer")
|
||||||
|
.about("CLN:mqtt - connects to a remote signer via MQTT")
|
||||||
|
.arg(arg!(--test "run a test against the embedded device"));
|
||||||
|
add_hsmd_args(app)
|
||||||
|
}
|
||||||
|
|
||||||
async fn run_main(parent_fd: i32) -> rocket::Rocket<rocket::Build> {
|
async fn run_main(parent_fd: i32) -> rocket::Rocket<rocket::Build> {
|
||||||
let settings = read_broker_config(BROKER_CONFIG_PATH);
|
let settings = read_broker_config(BROKER_CONFIG_PATH);
|
||||||
|
|
||||||
@@ -111,11 +114,13 @@ async fn run_main(parent_fd: i32) -> rocket::Rocket<rocket::Build> {
|
|||||||
|
|
||||||
if let Ok(btc_url) = env::var("BITCOIND_RPC_URL") {
|
if let Ok(btc_url) = env::var("BITCOIND_RPC_URL") {
|
||||||
let signer_port = MqttSignerPort::new(tx.clone());
|
let signer_port = MqttSignerPort::new(tx.clone());
|
||||||
|
let source_factory = Arc::new(SourceFactory::new(".", settings.network));
|
||||||
let frontend = Frontend::new(
|
let frontend = Frontend::new(
|
||||||
Arc::new(SignerPortFront {
|
Arc::new(SignerPortFront::new(
|
||||||
signer_port: Box::new(signer_port),
|
Box::new(signer_port),
|
||||||
network: settings.network,
|
settings.network,
|
||||||
}),
|
)),
|
||||||
|
source_factory,
|
||||||
Url::parse(&btc_url).expect("malformed btc rpc url"),
|
Url::parse(&btc_url).expect("malformed btc rpc url"),
|
||||||
);
|
);
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ pub async fn iteration(
|
|||||||
id,
|
id,
|
||||||
message: WireString("ping".as_bytes().to_vec()),
|
message: WireString("ping".as_bytes().to_vec()),
|
||||||
};
|
};
|
||||||
let ping_bytes = parser::request_from_msg(ping, sequence, 0)?;
|
let peer_id = [0u8; 33];
|
||||||
|
let ping_bytes = parser::request_from_msg(ping, sequence, peer_id, 0)?;
|
||||||
// Send a request to the MQTT handler to send to signer
|
// Send a request to the MQTT handler to send to signer
|
||||||
let (request, reply_rx) = ChannelRequest::new(topics::VLS, ping_bytes);
|
let (request, reply_rx) = ChannelRequest::new(topics::VLS, ping_bytes);
|
||||||
tx.send(request).await?;
|
tx.send(request).await?;
|
||||||
|
|||||||
@@ -116,7 +116,12 @@ impl<C: 'static + Client> SignerLoop<C> {
|
|||||||
|
|
||||||
fn handle_message(&mut self, message: Vec<u8>) -> Result<Vec<u8>> {
|
fn handle_message(&mut self, message: Vec<u8>) -> Result<Vec<u8>> {
|
||||||
let dbid = self.client_id.as_ref().map(|c| c.dbid).unwrap_or(0);
|
let dbid = self.client_id.as_ref().map(|c| c.dbid).unwrap_or(0);
|
||||||
let md = parser::raw_request_from_bytes(message, self.chan.sequence, dbid)?;
|
let peer_id = self
|
||||||
|
.client_id
|
||||||
|
.as_ref()
|
||||||
|
.map(|c| c.peer_id.serialize())
|
||||||
|
.unwrap_or([0u8; 33]);
|
||||||
|
let md = parser::raw_request_from_bytes(message, self.chan.sequence, peer_id, dbid)?;
|
||||||
let reply_rx = self.send_request(md)?;
|
let reply_rx = self.send_request(md)?;
|
||||||
let res = self.get_reply(reply_rx)?;
|
let res = self.get_reply(reply_rx)?;
|
||||||
let reply = parser::raw_response_from_bytes(res, self.chan.sequence)?;
|
let reply = parser::raw_response_from_bytes(res, self.chan.sequence)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user