diff --git a/Cargo.lock b/Cargo.lock index 6e15915..498c87f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1821,13 +1821,27 @@ name = "jsonrpsee" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" +dependencies = [ + "jsonrpsee-core 0.21.0", + "jsonrpsee-proc-macros 0.21.0", + "jsonrpsee-server 0.21.0", + "jsonrpsee-types 0.21.0", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a95f7cc23d5fab0cdeeaf6bad8c8f5e7a3aa7f0d211957ea78232b327ab27b0" dependencies = [ "jsonrpsee-client-transport", - "jsonrpsee-core", + "jsonrpsee-core 0.22.0", "jsonrpsee-http-client", - "jsonrpsee-proc-macros", - "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-proc-macros 0.22.0", + "jsonrpsee-server 0.22.0", + "jsonrpsee-types 0.22.0", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tokio", @@ -1836,15 +1850,15 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9f9ed46590a8d5681975f126e22531698211b926129a40a2db47cbca429220" +checksum = "6b1736cfa3845fd9f8f43751f2b8e0e83f7b6081e754502f7d63b6587692cc83" dependencies = [ "futures-channel", "futures-util", "gloo-net", "http", - "jsonrpsee-core", + "jsonrpsee-core 0.22.0", "pin-project", "rustls-native-certs 0.7.0", "rustls-pki-types", @@ -1863,6 +1877,28 @@ name = "jsonrpsee-core" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" +dependencies = [ + "anyhow", + "async-trait", + "beef", + "futures-util", + "hyper", + "jsonrpsee-types 0.21.0", + "parking_lot", + "rand", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82030d038658974732103e623ba2e0abec03bbbe175b39c0a2fafbada60c5868" dependencies = [ "anyhow", "async-lock", @@ -1871,7 +1907,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.22.0", "parking_lot", "pin-project", "rand", @@ -1887,15 +1923,15 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b7de9f3219d95985eb77fd03194d7c1b56c19bce1abfcc9d07462574b15572" +checksum = "36a06ef0de060005fddf772d54597bb6a8b0413da47dcffd304b0306147b9678" dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.22.0", + "jsonrpsee-types 0.22.0", "serde", "serde_json", "thiserror", @@ -1912,7 +1948,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" dependencies = [ "heck", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fc56131589f82e57805f7338b87023db4aafef813555708b159787e34ad6bc" +dependencies = [ + "heck", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -1927,8 +1976,32 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.21.0", + "jsonrpsee-types 0.21.0", + "pin-project", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85be77fe5b2a94589e3164fb780017f7aff7d646b49278c0d0346af16975c8e" +dependencies = [ + "futures-util", + "http", + "hyper", + "jsonrpsee-core 0.22.0", + "jsonrpsee-types 0.22.0", "pin-project", "route-recognizer", "serde", @@ -1955,27 +2028,40 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-types" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a48fdc1202eafc51c63e00406575e59493284ace8b8b61aa16f3a6db5d64f1a" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee-wasm-client" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30f36d27503d0efc0355c1630b74ecfb367050847bf7241a0ed75fab6dfa96c0" +checksum = "d36eb0e312840c69af0e5c6624fe959864d2e8b80bec194d2e20a39839ceef31" dependencies = [ "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.22.0", + "jsonrpsee-types 0.22.0", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "073c077471e89c4b511fa88b3df9a0f0abdf4a0a2e6683dd2ab36893af87bb2d" +checksum = "c5ce25d70a8e4d3cc574bbc3cad0137c326ad64b194793d5e7bbdd3fa4504181" dependencies = [ "http", "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.22.0", + "jsonrpsee-types 0.22.0", "url", ] @@ -2053,7 +2139,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=main#64b6ca722622324aba59735c6dcd48db70b13c92" +source = "git+https://github.com/xmtp/didethresolver?branch=main#02a0e915755430cc7c47470f48dd581bca7bda4a" dependencies = [ "async-trait", "base64 0.21.7", @@ -2061,7 +2147,7 @@ dependencies = [ "chrono", "ethers", "hex", - "jsonrpsee", + "jsonrpsee 0.21.0", "log", "peg", "percent-encoding", @@ -2248,7 +2334,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -2338,7 +2424,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -2627,14 +2713,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro2" version = "1.0.78" @@ -3730,6 +3824,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -3776,9 +3871,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -3807,6 +3902,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -4388,7 +4494,7 @@ dependencies = [ "futures", "gateway-types", "hex", - "jsonrpsee", + "jsonrpsee 0.22.0", "lib-didethresolver", "log", "rand", diff --git a/Cargo.toml b/Cargo.toml index 22de6b5..3fc3be0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,13 +22,12 @@ serde = "1.0" serde_json = "1.0" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } async-trait = "0.1" -jsonrpsee = { version = "0.21", features = ["macros", "server", "client-core"] } +jsonrpsee = { version = "0.22", features = ["macros", "server", "client-core"] } anyhow = "1.0" thiserror = "1.0" ethers = { version = "2.0.11", features = ["abigen"] } ctor = "0.2" lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "main" } -# lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "main" } gateway-types = { path = "./gateway-types" } rustc-hex = "2.1" hex = "0.4" diff --git a/gateway-types/src/lib.rs b/gateway-types/src/lib.rs index 7c64ec2..f05d21f 100644 --- a/gateway-types/src/lib.rs +++ b/gateway-types/src/lib.rs @@ -70,3 +70,14 @@ impl fmt::Display for Status { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_status_display() { + assert_eq!(format!("{}", Status::Completed), "completed"); + assert_eq!(format!("{}", Status::Failed), "failed"); + } +}