diff --git a/Cargo.toml b/Cargo.toml index d6c3fce..21576bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,39 +1,26 @@ [workspace] +exclude = ["broker", "tester"] +members = ["factory", "sphinx-key"] resolver = "2" -members = [ - "factory", - "sphinx-key", -] - -exclude = [ - "broker", - "persister", - "tester", -] - -[workspace.package] -edition = "2021" -rust-version = "1.66" - [workspace.dependencies] -esp-idf-sys = { version = "0.33.1", features = ["binstart"] } -esp-idf-svc = { version = "0.46.0", features = ["experimental", "alloc"] } -esp-idf-hal = "0.41.1" -embedded-svc = "0.25.0" +anyhow = { version = "1", features = ["backtrace"] } +bitflags = "1.3.2" embedded-hal = "=1.0.0-alpha.10" -anyhow = { version = "1", features = ["backtrace"]} -log = "0.4.17" -bitflags = "1.3.2" -embuild = "0.31.2" +embedded-svc = "0.25.0" +embuild = "0.31.2" +esp-idf-hal = "0.41.1" +esp-idf-svc = { version = "0.46.0", features = ["experimental", "alloc"] } +esp-idf-sys = { version = "0.33.1", features = ["binstart"] } +log = "0.4.17" [profile.release] -strip = true # Automatically strip symbols from the binary. -opt-level = "z" # Optimize for size. -lto = true codegen-units = 1 -panic = "abort" +lto = true +opt-level = "z" # Optimize for size. +panic = "abort" +strip = true # Automatically strip symbols from the binary. [profile.dev] -debug = true # Symbols are nice and they don't increase the size on Flash +debug = true # Symbols are nice and they don't increase the size on Flash opt-level = "z" diff --git a/broker/Cargo.toml b/broker/Cargo.toml index a47f6f1..eb453a5 100644 --- a/broker/Cargo.toml +++ b/broker/Cargo.toml @@ -1,42 +1,45 @@ [package] -name = "sphinx-key-broker" -version = "0.1.0" -edition = "2021" default-run = "sphinx-key-broker" +edition = "2021" +name = "sphinx-key-broker" +version = "0.1.0" [profile.release] strip = "debuginfo" [dependencies] -sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs" } -lss-connector = { git = "https://github.com/stakwork/sphinx-rs" } -# lss-connector = { path = "../../sphinx-rs/lss-connector" } -vls-protocol = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } -vls-proxy = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } -vls-frontend = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } -vls-protocol-client = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } -rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "sphinx-2" } +anyhow = { version = "1", features = ["backtrace"] } +async-trait = "0.1" +bitcoin = "0.29.0" +chrono = "0.4" +clap = "3.2" +clap_derive = "3.2" +confy = "0.4.0" +fern = { version = "0.6", features = ["colored"] } +hex = "0.4.3" +log = "0.4" +once_cell = "1.12.0" pretty_env_logger = "0.4.0" -confy = "0.4.0" -secp256k1 = { version = "0.24.0", features = ["rand-std", "bitcoin_hashes"] } -anyhow = {version = "1", features = ["backtrace"]} -log = "0.4" -fern = { version = "0.6", features = ["colored"] } -rumqttc = "0.12.0" -clap = "3.2" -clap_derive = "3.2" -chrono = "0.4" -once_cell = "1.12.0" -bitcoin = "0.29.0" -async-trait = "0.1" -url = { version = "2.2" } -toml = "0.5.9" -rocket = {version = "0.5.0-rc.2", features = ["json"]} -thiserror = "1.0.31" -hex = "0.4.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +rocket = { version = "0.5.0-rc.2", features = ["json"] } +rumqttc = "0.12.0" +rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "sphinx-2" } +secp256k1 = { version = "0.24.0", features = ["rand-std", "bitcoin_hashes"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +thiserror = "1.0.31" +toml = "0.5.9" +url = { version = "2.2" } + +vls-frontend = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } +vls-protocol = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } +vls-protocol-client = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } +vls-proxy = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git", rev = "b355d2235b4ff0a223820e16889ba9cf939c0752" } + +lss-connector = { git = "https://github.com/stakwork/sphinx-rs" } +sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs" } +# lss-connector = { path = "../../sphinx-rs/lss-connector" } +# sphinx-signer = { path = "../../sphinx-rs/signer" } [features] default = ["std"] -std = ["vls-protocol/std"] +std = ["vls-protocol/std"] diff --git a/factory/.cargo/config.toml b/factory/.cargo/config.toml index 7820407..b2278c2 100644 --- a/factory/.cargo/config.toml +++ b/factory/.cargo/config.toml @@ -2,14 +2,14 @@ target = "riscv32imc-esp-espidf" [target.riscv32imc-esp-espidf] -linker = "ldproxy" -# runner = "espflash --monitor" # Select this runner for espflash v1.x.x -runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x +linker = "ldproxy" +runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"] [unstable] build-std = ["std", "panic_abort"] [env] -ESP_IDF_VERSION = "tag:v5.0.2" -MCU = { value = "esp32c3" } +ESP_IDF_SDKCONFIG_DEFAULTS = "factory/sdkconfig.defaults" +ESP_IDF_VERSION = "tag:v5.0.2" +MCU = { value = "esp32c3" } diff --git a/factory/Cargo.toml b/factory/Cargo.toml index b98d700..64c7816 100644 --- a/factory/Cargo.toml +++ b/factory/Cargo.toml @@ -1,19 +1,19 @@ [package] -name = "sphinx-key-factory" -version = "0.1.0" -authors = ["decentclock "] -edition.workspace = true -rust-version.workspace = true +authors = ["decentclock "] +edition = "2021" +name = "sphinx-key-factory" +rust-version = "1.66" +version = "0.1.0" [dependencies] -esp-idf-sys.workspace = true -esp-idf-svc.workspace = true -esp-idf-hal.workspace = true -embedded-svc.workspace = true +anyhow.workspace = true +bitflags.workspace = true embedded-hal.workspace = true -anyhow.workspace = true -log.workspace = true -bitflags.workspace = true +embedded-svc.workspace = true +esp-idf-hal.workspace = true +esp-idf-svc.workspace = true +esp-idf-sys.workspace = true +log.workspace = true [build-dependencies] embuild.workspace = true diff --git a/sphinx-key/.cargo/config.toml b/sphinx-key/.cargo/config.toml index 7885c16..355b4b8 100644 --- a/sphinx-key/.cargo/config.toml +++ b/sphinx-key/.cargo/config.toml @@ -2,16 +2,16 @@ target = "riscv32imc-esp-espidf" [target.riscv32imc-esp-espidf] -linker = "ldproxy" -# runner = "espflash --monitor" # Select this runner for espflash v1.x.x -runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x +linker = "ldproxy" +runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"] [unstable] build-std = ["std", "panic_abort"] [env] -ESP_IDF_VERSION = "tag:v5.0.2" -MCU = { value = "esp32c3" } -CC = { value = "../.embuild/espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc", relative = true } -CFLAGS = { value = "-fno-pic" } +CC = { value = "../.embuild/espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc", relative = true } +CFLAGS = { value = "-fno-pic" } +ESP_IDF_SDKCONFIG_DEFAULTS = "sphinx-key/sdkconfig.defaults" +ESP_IDF_VERSION = "tag:v5.0.2" +MCU = { value = "esp32c3" } diff --git a/sphinx-key/Cargo.toml b/sphinx-key/Cargo.toml index 93886c5..b92d39a 100644 --- a/sphinx-key/Cargo.toml +++ b/sphinx-key/Cargo.toml @@ -1,37 +1,38 @@ [package] -name = "sphinx-key" -version = "0.1.0" -authors = ["Evan Feenstra "] -edition.workspace = true -rust-version.workspace = true +authors = ["Evan Feenstra "] +edition = "2021" +name = "sphinx-key" +rust-version = "1.66" +version = "0.1.0" [features] -default = ["std"] -std = ["sphinx-signer"] -pingpong = [] +default = ["std"] no_persist = [] +pingpong = [] +std = ["sphinx-signer"] [dependencies] -# sphinx-signer = { path = "../../sphinx-rs/signer", optional = true } -sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs.git", optional = true } -# lss-connector = { path = "../../sphinx-rs/lss-connector", default-features = false } -lss-connector = { git = "https://github.com/stakwork/sphinx-rs.git", default-features = false } -sphinx-crypter = { git = "https://github.com/stakwork/sphinx-rs.git" } -url = "2" +hex = "0.4.3" +rmp-serde = "1.1.0" +serde = { version = "1.0.137", default-features = false } +serde_json = { version = "1.0.81", default-features = false } serde_urlencoded = "0.7.1" -serde = { version = "1.0.137", default-features = false } -serde_json = { version = "1.0.81", default-features = false } -hex = "0.4.3" -rmp-serde = "1.1.0" +url = "2" -bitflags.workspace = true -esp-idf-sys.workspace = true -embedded-svc.workspace = true -esp-idf-svc.workspace = true -esp-idf-hal.workspace = true +lss-connector = { git = "https://github.com/stakwork/sphinx-rs.git", default-features = false } +# lss-connector = { path = "../../sphinx-rs/lss-connector", default-features = false } +sphinx-crypter = { git = "https://github.com/stakwork/sphinx-rs.git" } +sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs.git", optional = true } +# sphinx-signer = { path = "../../sphinx-rs/signer", optional = true } + +anyhow.workspace = true +bitflags.workspace = true embedded-hal.workspace = true -anyhow.workspace = true -log.workspace = true +embedded-svc.workspace = true +esp-idf-hal.workspace = true +esp-idf-svc.workspace = true +esp-idf-sys.workspace = true +log.workspace = true [build-dependencies] embuild.workspace = true diff --git a/tester/Cargo.toml b/tester/Cargo.toml index 15e1425..9400bd2 100644 --- a/tester/Cargo.toml +++ b/tester/Cargo.toml @@ -1,32 +1,33 @@ [package] -name = "sphinx-key-tester" -version = "0.1.0" authors = ["Evan Feenstra "] edition = "2018" +name = "sphinx-key-tester" +version = "0.1.0" [dependencies] +anyhow = { version = "1", features = ["backtrace"] } +chrono = "0.4" +clap = "=3.0.0-beta.2" +clap_derive = "=3.0.0-beta.5" +dotenv = "0.15.0" +fern = { version = "0.6", features = ["colored"] } +hex = "0.4.3" +log = "0.4" +pretty_env_logger = "0.4.0" +rand = "0.8" +reqwest = { version = "0.11.11", features = ["json"] } +rmp-serde = "1.1.0" +rocket = "0.5.0-rc.2" +rumqttc = "0.12.0" +serde = { version = "1.0.101", features = ["derive"] } +serde_json = "1.0" +tokio = { version = "1.4.0", features = ["rt", "rt-multi-thread", "macros"] } +urlencoding = "2.1.0" + sphinx-signer = { git = "https://github.com/stakwork/sphinx-rs.git" } # sphinx-signer = { path = "../../sphinx-rs/signer" } sphinx-crypter = { git = "https://github.com/stakwork/sphinx-rs.git" } # sphinx-crypter = { path = "../../sphinx-rs/crypter" } -anyhow = {version = "1", features = ["backtrace"]} -log = "0.4" -rumqttc = "0.12.0" -tokio = { version = "1.4.0", features = ["rt", "rt-multi-thread", "macros"] } -pretty_env_logger = "0.4.0" -clap = "=3.0.0-beta.2" -clap_derive = "=3.0.0-beta.5" -fern = { version = "0.6", features = ["colored"] } -chrono = "0.4" -rand = "0.8" -reqwest = { version = "0.11.11", features = ["json"] } -hex = "0.4.3" -serde = { version = "1.0.101", features = ["derive"] } -serde_json = "1.0" -urlencoding = "2.1.0" -dotenv = "0.15.0" -rocket = "0.5.0-rc.2" -rmp-serde = "1.1.0" [[bin]] name = "config"