From 073ee34beda49003870bf7eab50b24f87541a403 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 8 Feb 2024 16:51:47 -0500 Subject: [PATCH] last fixes --- Cargo.lock | 61 +++++++++++++++------------ Cargo.toml | 2 +- lib-xps/Cargo.toml | 2 +- lib-xps/tests/integration_test.rs | 2 +- lib-xps/tests/integration_util/mod.rs | 2 +- xps-types/Cargo.toml | 2 +- xps/Cargo.toml | 3 +- 7 files changed, 42 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 498c87f..ee49a85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1405,14 +1405,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "gateway-types" -version = "0.1.0" -dependencies = [ - "lib-didethresolver", - "serde", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2162,6 +2154,31 @@ dependencies = [ "url", ] +[[package]] +name = "lib-xps" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "ctor", + "ethers", + "futures", + "hex", + "jsonrpsee 0.22.0", + "lib-didethresolver", + "log", + "rand", + "registry", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber", + "xps-types", +] + [[package]] name = "libc" version = "0.2.152" @@ -2904,13 +2921,13 @@ version = "0.1.0" dependencies = [ "async-trait", "ethers", - "gateway-types", "lib-didethresolver", "log", "rustc-hex", "thiserror", "tokio", "tracing", + "xps-types", ] [[package]] @@ -4483,29 +4500,21 @@ dependencies = [ ] [[package]] -name = "xps_gateway" +name = "xps" version = "0.1.0" dependencies = [ "anyhow", - "async-trait", "clap", - "ctor", - "ethers", - "futures", - "gateway-types", - "hex", - "jsonrpsee 0.22.0", + "lib-xps", + "tokio", +] + +[[package]] +name = "xps-types" +version = "0.1.0" +dependencies = [ "lib-didethresolver", - "log", - "rand", - "registry", "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "tracing-subscriber", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index cdbca06..18f2f86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,6 @@ thiserror = "1.0" ethers = { version = "2.0.11", features = ["abigen"] } ctor = "0.2" lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "main" } -gateway-types = { path = "./gateway-types" } +xps-types = { path = "./xps-types" } rustc-hex = "2.1" hex = "0.4" diff --git a/lib-xps/Cargo.toml b/lib-xps/Cargo.toml index d0220ec..d3dde6b 100644 --- a/lib-xps/Cargo.toml +++ b/lib-xps/Cargo.toml @@ -19,7 +19,7 @@ thiserror.workspace = true ethers = { workspace = true, features = ["ws"] } ctor.workspace = true lib-didethresolver.workspace = true -gateway-types.workspace = true +xps-types.workspace = true hex.workspace = true rand = "0.8.5" tokio-stream = { version = "0.1", features = ["net"] } diff --git a/lib-xps/tests/integration_test.rs b/lib-xps/tests/integration_test.rs index 5c4de6e..4d35281 100644 --- a/lib-xps/tests/integration_test.rs +++ b/lib-xps/tests/integration_test.rs @@ -10,7 +10,7 @@ use lib_didethresolver::{ did_registry::RegistrySignerExt, types::{DidUrl, KeyEncoding, XmtpAttribute, XmtpKeyPurpose, NULL_ADDRESS}, }; -use xps_gateway::rpc::*; +use lib_xps::rpc::*; use ethers::types::{Address, U256}; use xps_types::{Message, Status}; diff --git a/lib-xps/tests/integration_util/mod.rs b/lib-xps/tests/integration_util/mod.rs index 25a6232..307f5d3 100644 --- a/lib-xps/tests/integration_util/mod.rs +++ b/lib-xps/tests/integration_util/mod.rs @@ -27,7 +27,7 @@ use std::{ use tokio::time::timeout as timeout_tokio; use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry}; -use xps_gateway::{ +use lib_xps::{ types::{GatewayContext, GatewaySigner}, XpsMethods, XpsServer, }; diff --git a/xps-types/Cargo.toml b/xps-types/Cargo.toml index 5aea0be..431b609 100644 --- a/xps-types/Cargo.toml +++ b/xps-types/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gateway-types" +name = "xps-types" version = "0.1.0" edition = "2021" diff --git a/xps/Cargo.toml b/xps/Cargo.toml index a690904..5d3a1d9 100644 --- a/xps/Cargo.toml +++ b/xps/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -lib-xps = { path = "../lib-xps" } anyhow.workspace = true +tokio.workspace = true +lib-xps = { path = "../lib-xps" } clap = { version = "4.4.18", features = ["derive"] }