From 53c0a9208db0d3a907ba97812dbd7e595994a326 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Fri, 19 Jan 2024 14:03:40 -0500 Subject: [PATCH 01/18] revoke installation --- Cargo.lock | 3638 +++++++++++++++++++++++++--- Cargo.toml | 25 +- gateway-types/Cargo.toml | 10 + gateway-types/src/lib.rs | 45 + inbox/src/lib.rs | 13 - registry/Cargo.toml | 9 + registry/src/contact_operations.rs | 48 + registry/src/error.rs | 15 + registry/src/lib.rs | 13 +- xps-gateway/Cargo.toml | 25 +- xps-gateway/src/lib.rs | 6 +- xps-gateway/src/rpc/api.rs | 20 +- xps-gateway/src/rpc/methods.rs | 53 +- xps-gateway/src/types.rs | 44 +- 14 files changed, 3520 insertions(+), 444 deletions(-) create mode 100644 gateway-types/Cargo.toml create mode 100644 gateway-types/src/lib.rs create mode 100644 registry/src/contact_operations.rs create mode 100644 registry/src/error.rs diff --git a/Cargo.lock b/Cargo.lock index 19bbccd..3d2ab2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addr2line" version = "0.21.0" @@ -17,6 +27,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "aho-corasick" version = "1.1.2" @@ -26,12 +47,42 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "async-trait" version = "0.1.74" @@ -43,6 +94,29 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + +[[package]] +name = "auto_impl" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -64,12 +138,36 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "beef" version = "0.5.2" @@ -79,12 +177,45 @@ dependencies = [ "serde", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -95,538 +226,2082 @@ dependencies = [ ] [[package]] -name = "bytes" -version = "1.5.0" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] [[package]] -name = "cc" -version = "1.0.83" +name = "bs58" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "libc", + "sha2", + "tinyvec", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "bumpalo" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] -name = "cpufeatures" -version = "0.2.11" +name = "byte-slice-cast" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] -name = "ctor" -version = "0.2.6" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ - "quote", - "syn 2.0.39", + "serde", ] [[package]] -name = "digest" -version = "0.9.0" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "generic-array", + "bzip2-sys", + "libc", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] -name = "fnv" -version = "1.0.7" +name = "camino" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] [[package]] -name = "futures" -version = "0.3.29" +name = "cargo-platform" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "serde", ] [[package]] -name = "futures-channel" -version = "0.3.29" +name = "cargo_metadata" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ - "futures-core", - "futures-sink", + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "futures-core" -version = "0.3.29" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] [[package]] -name = "futures-io" -version = "0.3.29" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "futures-macro" -version = "0.3.29" +name = "chrono" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.48.5", ] [[package]] -name = "futures-sink" -version = "0.3.29" +name = "cipher" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] [[package]] -name = "futures-task" -version = "0.3.29" +name = "coins-bip32" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] [[package]] -name = "futures-util" -version = "0.3.29" +name = "coins-bip39" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand", + "sha2", + "thiserror", ] [[package]] -name = "gateway" -version = "0.1.0" +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "anyhow", - "async-trait", - "ctor", - "jsonrpsee", - "log", + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", "serde", + "serde_derive", + "sha2", + "sha3", "thiserror", - "tokio", - "tokio-stream", - "tracing", - "tracing-subscriber", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "const-hex" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" dependencies = [ - "typenum", - "version_check", + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", ] [[package]] -name = "getrandom" -version = "0.2.11" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "gimli" -version = "0.28.0" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "h2" -version = "0.3.21" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", + "core-foundation-sys", + "libc", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "core-foundation-sys" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "hashbrown" -version = "0.14.2" +name = "cpufeatures" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] [[package]] -name = "hermit-abi" -version = "0.3.3" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] [[package]] -name = "http" -version = "0.2.9" +name = "crossbeam-deque" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "bytes", - "fnv", - "itoa", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "http-body" -version = "0.4.5" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "crossbeam-utils", ] [[package]] -name = "httparse" -version = "1.8.0" +name = "crossbeam-utils" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] -name = "httpdate" -version = "1.0.3" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "hyper" -version = "0.14.27" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "tokio", - "tower-service", - "tracing", - "want", + "generic-array", + "rand_core", + "subtle", + "zeroize", ] [[package]] -name = "inbox" -version = "0.1.0" +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] [[package]] -name = "indexmap" -version = "1.9.3" +name = "ctor" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "quote", + "syn 2.0.39", ] [[package]] -name = "indexmap" -version = "2.1.0" +name = "ctr" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "equivalent", - "hashbrown 0.14.2", + "cipher", ] [[package]] -name = "itoa" -version = "1.0.9" +name = "data-encoding" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] -name = "jsonrpsee" -version = "0.21.0" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "jsonrpsee-core", - "jsonrpsee-proc-macros", - "jsonrpsee-server", - "jsonrpsee-types", - "tokio", - "tracing", + "const-oid", + "zeroize", ] [[package]] -name = "jsonrpsee-core" -version = "0.21.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "anyhow", - "async-trait", - "beef", - "futures-util", - "hyper", - "jsonrpsee-types", - "parking_lot", - "rand", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", + "powerfmt", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.21.0" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "heck", - "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "jsonrpsee-server" -version = "0.21.0" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7c6d1a2c58f6135810284a390d9f823d0f508db74cd914d8237802de80f98" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "futures-util", - "http", - "hyper", - "jsonrpsee-core", - "jsonrpsee-types", - "pin-project", - "route-recognizer", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", + "generic-array", ] [[package]] -name = "jsonrpsee-types" -version = "0.21.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3266dfb045c9174b24c77c2dfe0084914bb23a6b2597d70c9dc6018392e1cd1b" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] [[package]] -name = "libc" -version = "0.2.150" +name = "dirs-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] [[package]] -name = "lock_api" -version = "0.4.11" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ - "autocfg", - "scopeguard", + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", ] [[package]] -name = "log" -version = "0.4.20" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] [[package]] -name = "matchers" -version = "0.1.0" +name = "dunce" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "regex-automata 0.1.10", + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] -name = "memchr" -version = "2.6.4" +name = "either" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] -name = "messaging" -version = "0.1.0" +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] [[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "ena" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" dependencies = [ - "adler", + "log", ] [[package]] -name = "mio" -version = "0.8.9" +name = "encoding_rs" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "libc", - "wasi", - "windows-sys", + "cfg-if", ] [[package]] -name = "nu-ansi-term" -version = "0.46.0" +name = "enr" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "overload", - "winapi", + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand", + "rlp", + "serde", + "sha3", + "zeroize", ] [[package]] -name = "num_cpus" -version = "1.16.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "hermit-abi", "libc", + "windows-sys 0.52.0", ] [[package]] -name = "object" -version = "0.32.1" +name = "eth-keystore" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "memchr", + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "ethabi" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "ethbloom" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] [[package]] -name = "overload" -version = "0.1.1" +name = "ethereum-types" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "ethers" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "1a5344eea9b20effb5efeaad29418215c4d27017639fd1f908260f59cbbd226e" dependencies = [ - "lock_api", - "parking_lot_core", + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" +name = "ethers-addressbook" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "9bf35eb7d2e2092ad41f584951e08ec7c077b142dba29c4f1b8f52d2efddc49c" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0111ead599d17a7bff6985fd5756f39ca7033edc79a31b23026a8d5d64fa95cd" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbdfb952aafd385b31d316ed80d7b76215ce09743c172966d840e96924427e0c" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.39", + "toml", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7465c814a2ecd0de0442160da13584205d1cdc08f4717a6511cad455bd5d7dc4" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.39", +] + +[[package]] +name = "ethers-core" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918b1a9ba585ea61022647def2f27c29ba19f6d2a4a4c8f68a9ae97fd5769737" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.39", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "facabf8551b4d1a3c08cb935e7fca187804b6c2525cc0dafb8e5a6dd453a24de" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681ece6eb1d10f7cf4f873059a77c04ff1de4f35c63dd7bccde8f438374fcb93" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-channel", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb1b714e227bbd2d8c53528adb580b203009728b17d0d0e4119353aa9bc5532" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2e46e3ec8ef0c986145901fa9864205dc4dcee701f9846be2d56112d34bdea" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "eyre" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gateway" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "ctor", + "ethers", + "gateway-types", + "jsonrpsee", + "lib-didethresolver", + "log", + "rand", + "registry", + "serde", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "gateway-types" +version = "0.1.0" +dependencies = [ + "lib-didethresolver", + "serde", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "inbox" +version = "0.1.0" + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpsee" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" +dependencies = [ + "jsonrpsee-core", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "tokio", + "tracing", +] + +[[package]] +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", + "parking_lot", + "rand", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" +dependencies = [ + "heck", + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc7c6d1a2c58f6135810284a390d9f823d0f508db74cd914d8237802de80f98" +dependencies = [ + "futures-util", + "http", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3266dfb045c9174b24c77c2dfe0084914bb23a6b2597d70c9dc6018392e1cd1b" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools 0.10.5", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.7.5", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lib-didethresolver" +version = "0.1.0" +source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#c6fce586b1478d5b6c42a89fc110034ca9190d47" +dependencies = [ + "async-trait", + "base64 0.21.7", + "bs58", + "chrono", + "ethers", + "hex", + "jsonrpsee", + "log", + "peg", + "percent-encoding", + "rand", + "rustc-hex", + "serde", + "sha3", + "smart-default", + "thiserror", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "libc" +version = "0.2.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.2", + "libc", + "redox_syscall", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "messaging" +version = "0.1.0" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parity-scale-codec" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peg" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "400bcab7d219c38abf8bd7cc2054eb9bbbd4312d66f6a5557d572a203f646f61" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e61cce859b76d19090f62da50a9fe92bab7c2a5f09e183763559a2ac392c90" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36bae92c60fa2398ce4678b98b2c4b5a7c61099961ca1fa305aec04a9ad28922" + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", ] [[package]] @@ -639,33 +2314,95 @@ dependencies = [ ] [[package]] -name = "pin-project-internal" -version = "1.1.3" +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "quote", "syn 2.0.39", ] [[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" +name = "primitive-types" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "proc-macro-crate" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] [[package]] name = "proc-macro-crate" @@ -674,7 +2411,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ "toml_datetime", - "toml_edit", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", ] [[package]] @@ -686,6 +2447,22 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bitflags 2.4.2", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.2", + "unarray", +] + [[package]] name = "quote" version = "1.0.33" @@ -695,6 +2472,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -720,97 +2503,428 @@ dependencies = [ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "registry" +version = "0.1.0" +dependencies = [ + "async-trait", + "ethers", + "gateway-types", + "lib-didethresolver", + "log", + "rustc-hex", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "getrandom", + "base64 0.21.7", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "bitflags", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] -name = "regex" -version = "1.10.2" +name = "rustversion" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", + "cipher", ] [[package]] -name = "regex-automata" -version = "0.1.10" +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "regex-syntax 0.6.29", + "winapi-util", ] [[package]] -name = "regex-automata" -version = "0.4.3" +name = "scale-info" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", ] [[package]] -name = "regex-syntax" -version = "0.6.29" +name = "scale-info-derive" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "registry" -version = "0.1.0" +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] [[package]] -name = "route-recognizer" -version = "0.3.1" +name = "sct" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] [[package]] -name = "rustc-demangle" -version = "0.1.23" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "semver" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +dependencies = [ + "serde", +] [[package]] -name = "ryu" -version = "1.0.16" +name = "send_wrapper" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] -name = "scopeguard" -version = "1.2.0" +name = "send_wrapper" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" @@ -843,19 +2957,72 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "sha-1" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -865,6 +3032,34 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" version = "0.4.9" @@ -880,6 +3075,27 @@ version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +[[package]] +name = "smart-default" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "socket2" version = "0.5.5" @@ -887,7 +3103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -896,7 +3112,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64", + "base64 0.13.1", "bytes", "futures", "http", @@ -906,6 +3122,109 @@ dependencies = [ "sha-1", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.39", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "svm-rs" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20689c7d03b6461b502d0b95d6c24874c7d24dea2688af80486a130a06af3b07" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -928,6 +3247,57 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "thiserror" version = "1.0.51" @@ -952,17 +3322,70 @@ dependencies = [ name = "thread_local" version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "cfg-if", - "once_cell", + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" -version = "1.33.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -970,22 +3393,32 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", "syn 2.0.39", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -997,6 +3430,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -1012,11 +3460,37 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] [[package]] name = "toml_edit" @@ -1025,6 +3499,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.1.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -1085,6 +3561,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -1120,18 +3606,117 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", + "serde", +] + [[package]] name = "valuable" version = "0.1.0" @@ -1144,6 +3729,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -1159,6 +3754,88 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" + +[[package]] +name = "web-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "winapi" version = "0.3.9" @@ -1175,19 +3852,46 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -1196,13 +3900,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -1211,42 +3930,84 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.5.30" @@ -1255,3 +4016,102 @@ checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" dependencies = [ "memchr", ] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index dae845e..03c27c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,11 @@ [workspace] members = [ -"xps-gateway", -"messaging", -"inbox", -"registry", + "xps-gateway", + "messaging", + "inbox", + "registry", + "gateway-types", ] exclude = [ ] @@ -12,3 +13,19 @@ exclude = [ ] # Make the feature resolver explicit. # See https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html#details resolver = "2" + +[workspace.dependencies] +log = "0.4" +tracing = "0.1" +tracing-subscriber = { version = "0.3.18", features = ["fmt", "env-filter"] } +serde = "1" +tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +async-trait = "0.1" +jsonrpsee = { version = "0.21", features = ["macros", "server", "client-core"] } +anyhow = "1.0" +thiserror = "1.0" +ethers = { version = "2", features = ["abigen"] } +ctor = "0.2" +lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "insipx/revoke-installation", package = "lib-didethresolver" } +gateway-types = { path = "./gateway-types" } +rustc-hex = "2.1" diff --git a/gateway-types/Cargo.toml b/gateway-types/Cargo.toml new file mode 100644 index 0000000..5aea0be --- /dev/null +++ b/gateway-types/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "gateway-types" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +serde.workspace = true +lib-didethresolver.workspace = true diff --git a/gateway-types/src/lib.rs b/gateway-types/src/lib.rs new file mode 100644 index 0000000..f202c08 --- /dev/null +++ b/gateway-types/src/lib.rs @@ -0,0 +1,45 @@ +use lib_didethresolver::types::{Attribute, KeyEncoding, KeyPurpose, KeyType, PublicKey}; +use serde::{Deserialize, Serialize}; + +/// Address of the did:ethr Registry on Sepolia +pub const DID_ETH_REGISTRY: &str = "0xd1D374DDE031075157fDb64536eF5cC13Ae75000"; + +/// A message sent to a conversation +#[derive(Serialize, Deserialize)] +pub struct Message { + // Unique identifier for a conversation + #[serde(rename = "groupId")] + group_id: Vec, + /// message content in bytes + payload: Vec, + signature: Signature, +} + +/// A Signature containing V, R S +#[derive(Serialize, Deserialize)] +pub struct Signature { + /// Signature of V + pub v: u8, + /// Signature of R + pub r: [u8; 32], + /// Signature of S + pub s: [u8; 32], +} + +/// The XMTP-specific attribute type +#[derive(Serialize, Deserialize)] +pub enum XmtpAttributeType { + InstallationKey, +} + +impl From for Attribute { + fn from(attribute: XmtpAttributeType) -> Self { + match attribute { + XmtpAttributeType::InstallationKey => Attribute::PublicKey(PublicKey { + key_type: KeyType::Ed25519VerificationKey2020, + purpose: KeyPurpose::Xmtp, + encoding: KeyEncoding::Hex, + }), + } + } +} diff --git a/inbox/src/lib.rs b/inbox/src/lib.rs index 7d12d9a..8b13789 100644 --- a/inbox/src/lib.rs +++ b/inbox/src/lib.rs @@ -1,14 +1 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} diff --git a/registry/Cargo.toml b/registry/Cargo.toml index 89c58fc..0fe1573 100644 --- a/registry/Cargo.toml +++ b/registry/Cargo.toml @@ -6,3 +6,12 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log.workspace = true +tracing.workspace = true +tokio.workspace = true +async-trait.workspace = true +ethers = { workspace = true, features = ["ws"] } +gateway-types.workspace = true +lib-didethresolver.workspace = true +rustc-hex.workspace = true +thiserror.workspace = true diff --git a/registry/src/contact_operations.rs b/registry/src/contact_operations.rs new file mode 100644 index 0000000..f00a68c --- /dev/null +++ b/registry/src/contact_operations.rs @@ -0,0 +1,48 @@ +//! Contact Operations + +use std::str::FromStr; + +use ethers::{providers::Middleware, types::Address}; +use gateway_types::{Signature, XmtpAttributeType}; +use lib_didethresolver::{did_registry::DIDRegistry, types::Attribute}; + +use crate::error::ContactOperationError; + +pub struct ContactOperations { + registry: DIDRegistry, +} + +impl ContactOperations +where + M: Middleware + 'static, +{ + /// Creates a new ContactOperations instance + pub fn new(registry: DIDRegistry) -> Self { + Self { registry } + } + + pub async fn revoke_installation( + &self, + did: String, + name: XmtpAttributeType, + value: Vec, + signature: Signature, + ) -> Result<(), ContactOperationError> { + // for now, we will just assume the DID is a valid ethereum wallet address + // TODO: Parse or resolve the actual DID + let address = Address::from_str(&did)?; + self.registry + .revoke_attribute_signed( + address, + signature.v, + signature.r, + signature.s, + Attribute::from(name).into(), + value.into(), + ) + .send() + .await? + .await?; + Ok(()) + } +} diff --git a/registry/src/error.rs b/registry/src/error.rs new file mode 100644 index 0000000..f7a8ac4 --- /dev/null +++ b/registry/src/error.rs @@ -0,0 +1,15 @@ +use ethers::{ + contract::ContractError, + providers::{Middleware, ProviderError}, +}; +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum ContactOperationError { + #[error("Invalid address {0}")] + BadAddress(#[from] rustc_hex::FromHexError), + #[error(transparent)] + ContractError(#[from] ContractError), + #[error(transparent)] + ProviderError(#[from] ProviderError), +} diff --git a/registry/src/lib.rs b/registry/src/lib.rs index 7d12d9a..256d1d4 100644 --- a/registry/src/lib.rs +++ b/registry/src/lib.rs @@ -1,14 +1,9 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} +mod contact_operations; +pub mod error; + +pub use contact_operations::*; #[cfg(test)] mod tests { use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } } diff --git a/xps-gateway/Cargo.toml b/xps-gateway/Cargo.toml index 4a4b801..3a7a9be 100644 --- a/xps-gateway/Cargo.toml +++ b/xps-gateway/Cargo.toml @@ -7,14 +7,19 @@ resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -log = "0.4" -tracing = "0.1" -tracing-subscriber = { version = "0.3.18", features = ["fmt", "env-filter"] } -serde = "1" -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +log.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +serde.workspace = true +tokio.workspace = true +async-trait.workspace = true +jsonrpsee.workspace = true +anyhow.workspace = true +thiserror.workspace = true +ethers = { workspace = true, features = ["ws"] } +ctor.workspace = true +lib-didethresolver.workspace = true +gateway-types.workspace = true +rand = "0.8" tokio-stream = { version = "0.1", features = ["net"] } -async-trait = "0.1" -jsonrpsee = { version = "0.21", features = ["macros", "server", "client-core"] } -anyhow = "1" -thiserror = "1" -ctor = "0.2" +registry = { path = "../registry" } diff --git a/xps-gateway/src/lib.rs b/xps-gateway/src/lib.rs index 2e430c4..8bd3c3c 100644 --- a/xps-gateway/src/lib.rs +++ b/xps-gateway/src/lib.rs @@ -6,6 +6,7 @@ use anyhow::Result; use jsonrpsee::server::Server; pub use crate::rpc::{XpsMethods, XpsServer}; +use crate::types::GatewayContext; /// Entrypoint for the xps Gateway pub async fn run() -> Result<()> { @@ -14,7 +15,10 @@ pub async fn run() -> Result<()> { // a port of 0 allows the OS to choose an open port let server = Server::builder().build("127.0.0.1:0").await?; let addr = server.local_addr()?; - let handle = server.start(rpc::XpsMethods.into_rpc()); + + let context = GatewayContext::new("wss://ethereum-sepolia.publicnode.com").await?; + let xps_methods = rpc::XpsMethods::new(&context); + let handle = server.start(xps_methods.into_rpc()); log::info!("Server Started at {addr}"); handle.stopped().await; diff --git a/xps-gateway/src/rpc/api.rs b/xps-gateway/src/rpc/api.rs index c1ec944..bfbb6e8 100644 --- a/xps-gateway/src/rpc/api.rs +++ b/xps-gateway/src/rpc/api.rs @@ -2,7 +2,7 @@ use jsonrpsee::{proc_macros::rpc, types::ErrorObjectOwned}; -use crate::types::Message; +use gateway_types::{Message, Signature, XmtpAttributeType}; /// XPS JSON-RPC Interface Methods #[rpc(server, client, namespace = "xps")] @@ -10,4 +10,22 @@ pub trait Xps { // Placeholder for send_message, see [the discussion](https://github.com/xmtp/xps-gateway/discussions/11) #[method(name = "sendMessage")] async fn send_message(&self, _message: Message) -> Result<(), ErrorObjectOwned>; + + /// removes the contact bundle for the XMTP device installation. Request must be made to a + /// valid DID with an XMTP profile. + /// + /// # Arguments + /// + /// * `did` - the DID of the XMTP device installation + /// * `name` - the name of the contact bundle + /// * `value` - the value of the contact bundle + /// * `signature` - the signature of the contact bundle + #[method(name = "revokeInstallation")] + async fn revoke_installation( + &self, + did: String, + name: XmtpAttributeType, + value: Vec, + signature: Signature, + ) -> Result<(), ErrorObjectOwned>; } diff --git a/xps-gateway/src/rpc/methods.rs b/xps-gateway/src/rpc/methods.rs index 6dc1556..df7eaf9 100644 --- a/xps-gateway/src/rpc/methods.rs +++ b/xps-gateway/src/rpc/methods.rs @@ -1,14 +1,29 @@ //! Interface Implementations for XPS JSON-RPC +use crate::types::{GatewayContext, GatewaySigner}; + use super::api::*; use async_trait::async_trait; +use ethers::providers::Middleware; use jsonrpsee::types::ErrorObjectOwned; +use thiserror::Error; -use crate::types::Message; +use gateway_types::{Message, Signature, XmtpAttributeType}; +use registry::{error::ContactOperationError, ContactOperations}; /// Gateway Methods for XPS -pub struct XpsMethods; +pub struct XpsMethods { + contact_operations: ContactOperations, +} + +impl XpsMethods { + pub fn new(context: &GatewayContext) -> Self { + Self { + contact_operations: ContactOperations::new(context.registry.clone()), + } + } +} #[async_trait] impl XpsServer for XpsMethods { @@ -17,4 +32,38 @@ impl XpsServer for XpsMethods { log::debug!("xps_sendMessage called"); todo!(); } + + async fn revoke_installation( + &self, + did: String, + name: XmtpAttributeType, + value: Vec, + signature: Signature, + ) -> Result<(), ErrorObjectOwned> { + log::debug!("xps_revokeInstallation called"); + self.contact_operations + .revoke_installation(did, name, value, signature) + .await + .map_err(RpcError::from)?; + + Ok(()) + } +} + +/// Error types for DID Registry JSON-RPC +#[derive(Debug, Error)] +enum RpcError { + /// A public key parameter was invalid + #[error(transparent)] + ContactOperation(#[from] ContactOperationError), +} + +impl From> for ErrorObjectOwned { + fn from(error: RpcError) -> Self { + match error { + RpcError::ContactOperation(c) => { + ErrorObjectOwned::owned(-31999, c.to_string(), None::<()>) + } + } + } } diff --git a/xps-gateway/src/types.rs b/xps-gateway/src/types.rs index c734427..13d09db 100644 --- a/xps-gateway/src/types.rs +++ b/xps-gateway/src/types.rs @@ -1,17 +1,31 @@ -use serde::{Deserialize, Serialize}; +use std::{str::FromStr, sync::Arc}; -/// A message sent to a conversation -#[derive(Serialize, Deserialize)] -pub struct Message { - // Unique identifier for a conversation - #[serde(rename = "groupId")] - group_id: Vec, - /// message content in bytes - payload: Vec, - /// Signature of V - v: Vec, - /// Signature of R - r: Vec, - /// Signature of S - s: Vec, +use anyhow::Error; +use ethers::{ + middleware::SignerMiddleware, + providers::{Provider, Ws}, + signers::LocalWallet, + types::Address, +}; +use gateway_types::DID_ETH_REGISTRY; +use lib_didethresolver::did_registry::DIDRegistry; +use rand::{rngs::StdRng, SeedableRng}; + +pub type GatewaySigner = SignerMiddleware, LocalWallet>; + +pub struct GatewayContext { + pub registry: DIDRegistry, + pub signer: Arc, +} + +impl GatewayContext { + pub async fn new>(provider_endpoint: Endpoint) -> Result { + let registry = Address::from_str(DID_ETH_REGISTRY)?; + let wallet = LocalWallet::new(&mut StdRng::from_entropy()); + let provider = Provider::::connect(provider_endpoint).await?; + let signer = + Arc::new(SignerMiddleware::new_with_provider_chain(provider, wallet.clone()).await?); + let registry = DIDRegistry::new(registry, signer.clone()); + Ok(Self { registry, signer }) + } } From fbc885dfe390873ee9e5c4d2b0e39abb98e93d6e Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Fri, 19 Jan 2024 17:30:14 -0500 Subject: [PATCH 02/18] integration testing --- Cargo.lock | 4 +- Cargo.toml | 4 +- gateway-types/src/lib.rs | 23 +++-- registry/src/contact_operations.rs | 11 +-- xps-gateway/Cargo.toml | 5 +- xps-gateway/src/rpc/api.rs | 3 +- xps-gateway/src/rpc/methods.rs | 17 +--- xps-gateway/tests/integration_test.rs | 117 ++++++++++++++++++++++++-- 8 files changed, 140 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77df38b..f4e155f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1976,7 +1976,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#c6fce586b1478d5b6c42a89fc110034ca9190d47" +source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#616e28cdb9e50153945ef3cac842ba7109d5a135" dependencies = [ "async-trait", "base64 0.21.7", @@ -4331,12 +4331,14 @@ dependencies = [ "ethers", "futures", "gateway-types", + "hex", "jsonrpsee", "lib-didethresolver", "log", "rand", "registry", "serde", + "serde_json", "thiserror", "tokio", "tokio-stream", diff --git a/Cargo.toml b/Cargo.toml index 03c27c9..de02075 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,8 @@ resolver = "2" log = "0.4" tracing = "0.1" tracing-subscriber = { version = "0.3.18", features = ["fmt", "env-filter"] } -serde = "1" +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"] } @@ -29,3 +30,4 @@ ctor = "0.2" lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "insipx/revoke-installation", package = "lib-didethresolver" } 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 f202c08..714a556 100644 --- a/gateway-types/src/lib.rs +++ b/gateway-types/src/lib.rs @@ -1,4 +1,6 @@ -use lib_didethresolver::types::{Attribute, KeyEncoding, KeyPurpose, KeyType, PublicKey}; +use lib_didethresolver::types::{ + Attribute, KeyEncoding, KeyMetadata, KeyPurpose, KeyType, PublicKey, +}; use serde::{Deserialize, Serialize}; /// Address of the did:ethr Registry on Sepolia @@ -8,22 +10,16 @@ pub const DID_ETH_REGISTRY: &str = "0xd1D374DDE031075157fDb64536eF5cC13Ae75000"; #[derive(Serialize, Deserialize)] pub struct Message { // Unique identifier for a conversation - #[serde(rename = "groupId")] - group_id: Vec, + #[serde(rename = "conversationId")] + pub conversation_id: Vec, /// message content in bytes - payload: Vec, - signature: Signature, -} - -/// A Signature containing V, R S -#[derive(Serialize, Deserialize)] -pub struct Signature { + pub payload: Vec, /// Signature of V - pub v: u8, + pub v: Vec, /// Signature of R - pub r: [u8; 32], + pub r: Vec, /// Signature of S - pub s: [u8; 32], + pub s: Vec, } /// The XMTP-specific attribute type @@ -39,6 +35,7 @@ impl From for Attribute { key_type: KeyType::Ed25519VerificationKey2020, purpose: KeyPurpose::Xmtp, encoding: KeyEncoding::Hex, + metadata: Some(KeyMetadata::Installation), }), } } diff --git a/registry/src/contact_operations.rs b/registry/src/contact_operations.rs index f00a68c..15d3ff0 100644 --- a/registry/src/contact_operations.rs +++ b/registry/src/contact_operations.rs @@ -2,8 +2,8 @@ use std::str::FromStr; -use ethers::{providers::Middleware, types::Address}; -use gateway_types::{Signature, XmtpAttributeType}; +use ethers::{core::types::Signature, providers::Middleware, types::Address}; +use gateway_types::XmtpAttributeType; use lib_didethresolver::{did_registry::DIDRegistry, types::Attribute}; use crate::error::ContactOperationError; @@ -30,13 +30,14 @@ where ) -> Result<(), ContactOperationError> { // for now, we will just assume the DID is a valid ethereum wallet address // TODO: Parse or resolve the actual DID + // TODO: Remove unwraps let address = Address::from_str(&did)?; self.registry .revoke_attribute_signed( address, - signature.v, - signature.r, - signature.s, + signature.v.try_into().unwrap(), + signature.r.try_into().unwrap(), + signature.s.try_into().unwrap(), Attribute::from(name).into(), value.into(), ) diff --git a/xps-gateway/Cargo.toml b/xps-gateway/Cargo.toml index a4d2bcf..443b4b5 100644 --- a/xps-gateway/Cargo.toml +++ b/xps-gateway/Cargo.toml @@ -23,8 +23,11 @@ gateway-types.workspace = true rand = "0.8" tokio-stream = { version = "0.1", features = ["net"] } registry = { path = "../registry" } +hex.workspace = true [dev-dependencies] -jsonrpsee = { workspacve = true, features = ["macros", "server", "client"]} +jsonrpsee = { workspace = true, features = ["macros", "server", "client"]} tokio = { workspace = true, features = ["macros", "rt", "time"]} futures = "0.3" +serde_json.workspace = true + diff --git a/xps-gateway/src/rpc/api.rs b/xps-gateway/src/rpc/api.rs index f10d3d2..69deb4c 100644 --- a/xps-gateway/src/rpc/api.rs +++ b/xps-gateway/src/rpc/api.rs @@ -1,8 +1,9 @@ //! Trait Interface Definitions for XPS JSON-RPC +use ethers::core::types::Signature; use jsonrpsee::{proc_macros::rpc, types::ErrorObjectOwned}; -use gateway_types::{Message, Signature, XmtpAttributeType}; +use gateway_types::{Message, XmtpAttributeType}; /// XPS JSON-RPC Interface Methods #[rpc(server, client, namespace = "xps")] diff --git a/xps-gateway/src/rpc/methods.rs b/xps-gateway/src/rpc/methods.rs index 0e18dc3..a0ca841 100644 --- a/xps-gateway/src/rpc/methods.rs +++ b/xps-gateway/src/rpc/methods.rs @@ -6,11 +6,11 @@ use super::api::*; use jsonrpsee::types::error::ErrorCode; use async_trait::async_trait; -use ethers::providers::Middleware; +use ethers::{core::types::Signature, providers::Middleware}; use jsonrpsee::types::ErrorObjectOwned; use thiserror::Error; -use gateway_types::{Message, Signature, XmtpAttributeType}; +use gateway_types::{Message, XmtpAttributeType}; use registry::{error::ContactOperationError, ContactOperations}; /// Gateway Methods for XPS @@ -26,19 +26,6 @@ impl XpsMethods { } } -impl XpsMethods { - /// Create a new instance of the XpsMethods struct - pub fn new() -> Self { - Self {} - } -} - -impl Default for XpsMethods { - fn default() -> Self { - Self::new() - } -} - #[async_trait] impl XpsServer for XpsMethods { async fn send_message(&self, _message: Message) -> Result<(), ErrorObjectOwned> { diff --git a/xps-gateway/tests/integration_test.rs b/xps-gateway/tests/integration_test.rs index 217bdb3..b33abfb 100644 --- a/xps-gateway/tests/integration_test.rs +++ b/xps-gateway/tests/integration_test.rs @@ -4,21 +4,38 @@ use jsonrpsee::{ ws_client::{WsClient, WsClientBuilder}, }; +use ethers::{ + abi::Address, + core::utils::Anvil, + middleware::Middleware, + middleware::SignerMiddleware, + providers::{Provider, Ws}, + signers::{LocalWallet, Signer as _}, + utils::AnvilInstance, +}; use futures::future::FutureExt; -use std::{future::Future, time::Duration}; +use lib_didethresolver::{did_registry::DIDRegistry, Resolver}; +use std::{future::Future, sync::Arc, time::Duration}; use tokio::time::timeout as timeout_tokio; -use xps_gateway::{rpc::XpsClient, types::Message, XpsMethods, XpsServer, SERVER_HOST}; +use xps_gateway::{ + rpc::XpsClient, + types::{GatewayContext, GatewaySigner}, + XpsMethods, XpsServer, SERVER_HOST, +}; const TEST_TIMEOUT: Duration = Duration::from_secs(10); #[cfg(test)] mod it { + use ethers::{abi::Bytes, types::U256}; + use gateway_types::{Message, XmtpAttributeType}; + use super::*; #[tokio::test] async fn test_say_hello() -> Result<(), Error> { - with_xps_client(None, |client| async move { + with_xps_client(None, |client, _, _, _| async move { let result = client.status().await?; assert_eq!(result, "OK"); Ok(()) @@ -28,7 +45,7 @@ mod it { #[tokio::test] async fn test_fail_send_message() -> Result<(), Error> { - with_xps_client(None, |client| async move { + with_xps_client(None, |client, _, _, _| async move { let message = Message { conversation_id: b"abcdefg".iter().map(|c| *c as u8).collect(), payload: b"Hello World".iter().map(|c| *c as u8).collect(), @@ -42,21 +59,79 @@ mod it { }) .await } + + #[tokio::test] + async fn test_revoke_installation() -> Result<(), Error> { + with_xps_client(None, |client, context, resolver, _| async move { + let me = context.signer.address(); + let name = *b"did/pub/xmtp/ed25519/inst/hex "; + let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; + let validity = U256::from(604_800); + let tx = context + .registry + .set_attribute(me, name, value.into(), validity) + .tx; + let signature = context.signer.sign_transaction(&tx, me).await.unwrap(); + let attr = context.registry.set_attribute_signed( + me, + signature.v.try_into().unwrap(), + signature.r.try_into().unwrap(), + signature.s.try_into().unwrap(), + name, + value.into(), + validity, + ); + attr.send().await?.await?; + + let tx = context.registry.revoke_attribute(me, name, value.into()).tx; + let signature = context.signer.sign_transaction(&tx, me).await.unwrap(); + client + .revoke_installation( + format!("0x{}", hex::encode(me)), + XmtpAttributeType::InstallationKey, + value.to_vec(), + signature, + ) + .await?; + + let doc = resolver.resolve_did(me, None).await.unwrap().document; + println!("{}", serde_json::to_string_pretty(&doc).unwrap()); + Ok(()) + }) + .await + } } async fn with_xps_client(timeout: Option, f: F) -> Result where - F: FnOnce(WsClient) -> R + 'static + Send, + F: FnOnce(WsClient, GatewayContext, Resolver>, &AnvilInstance) -> R + + 'static + + Send, R: Future> + FutureExt + Send + 'static, { + let anvil = Anvil::new().args(vec!["--base-fee", "100"]).spawn(); + log::debug!("Anvil spawned at {}", anvil.ws_endpoint()); + let registry_address = deploy_to_anvil(&anvil).await; + log::debug!("Contract deployed at {}", registry_address); + let server = Server::builder().build(SERVER_HOST).await.unwrap(); let addr = server.local_addr().unwrap(); - let handle = server.start(XpsMethods::new().into_rpc()); + let context = GatewayContext::new(anvil.ws_endpoint()).await?; + let resolver = Resolver::new(context.signer.clone(), registry_address) + .await + .unwrap(); + + let handle = server.start(XpsMethods::new(&context).into_rpc()); let client = WsClientBuilder::default() .build(&format!("ws://{addr}")) .await .unwrap(); - let result = timeout_tokio(timeout.unwrap_or(TEST_TIMEOUT), f(client)).await; + + let result = timeout_tokio( + timeout.unwrap_or(TEST_TIMEOUT), + f(client, context, resolver, &anvil), + ) + .await; handle.stop().unwrap(); handle.stopped().await; @@ -66,3 +141,31 @@ where Err(_) => panic!("Test timed out"), } } + +async fn deploy_to_anvil(anvil: &AnvilInstance) -> Address { + let wallet: LocalWallet = anvil.keys()[0].clone().into(); + let client = client(&anvil, wallet).await; + + let registry = DIDRegistry::deploy(client.clone(), ()) + .unwrap() + .gas_price(100) + .send() + .await + .unwrap(); + + registry.address() +} + +async fn client( + anvil: &AnvilInstance, + wallet: LocalWallet, +) -> Arc, LocalWallet>> { + let provider = Provider::::connect(anvil.ws_endpoint()) + .await + .unwrap() + .interval(std::time::Duration::from_millis(10u64)); + Arc::new(SignerMiddleware::new( + provider, + wallet.with_chain_id(anvil.chain_id()), + )) +} From b2162daf4c78fa1006b03f6e6f06be460a414231 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Mon, 22 Jan 2024 12:02:14 -0500 Subject: [PATCH 03/18] fmt --- Cargo.lock | 2 +- xps-gateway/tests/integration_test.rs | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4e155f..13abd0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1976,7 +1976,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#616e28cdb9e50153945ef3cac842ba7109d5a135" +source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#5836996e3c8069f82e81dcbf56fee49d3c96ff7a" dependencies = [ "async-trait", "base64 0.21.7", diff --git a/xps-gateway/tests/integration_test.rs b/xps-gateway/tests/integration_test.rs index b33abfb..5d4fd8c 100644 --- a/xps-gateway/tests/integration_test.rs +++ b/xps-gateway/tests/integration_test.rs @@ -28,7 +28,7 @@ const TEST_TIMEOUT: Duration = Duration::from_secs(10); #[cfg(test)] mod it { - use ethers::{abi::Bytes, types::U256}; + use ethers::types::U256; use gateway_types::{Message, XmtpAttributeType}; use super::*; @@ -67,11 +67,18 @@ mod it { let name = *b"did/pub/xmtp/ed25519/inst/hex "; let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; let validity = U256::from(604_800); - let tx = context - .registry - .set_attribute(me, name, value.into(), validity) - .tx; - let signature = context.signer.sign_transaction(&tx, me).await.unwrap(); + + let signature = context + .signer + .signer() + .sign_attribute( + context.signer.signer().clone(), + name, + value.to_vec(), + validity, + ) + .await?; + let attr = context.registry.set_attribute_signed( me, signature.v.try_into().unwrap(), From 3a12d32901093b320017b4711ebbfb5ee3df10ae Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Tue, 23 Jan 2024 11:51:23 -0500 Subject: [PATCH 04/18] a version of signing which works --- Cargo.lock | 2 +- Cargo.toml | 2 +- registry/src/contact_operations.rs | 4 +- xps-gateway/src/lib.rs | 7 +- xps-gateway/src/types.rs | 9 +- xps-gateway/tests/integration_test.rs | 124 +++++++++++++++++++------- 6 files changed, 109 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13abd0c..248aa3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1976,7 +1976,6 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#5836996e3c8069f82e81dcbf56fee49d3c96ff7a" dependencies = [ "async-trait", "base64 0.21.7", @@ -1994,6 +1993,7 @@ dependencies = [ "sha3", "smart-default", "thiserror", + "tiny-keccak", "tokio", "tracing", "url", diff --git a/Cargo.toml b/Cargo.toml index de02075..a5e97b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ anyhow = "1.0" thiserror = "1.0" ethers = { version = "2", features = ["abigen"] } ctor = "0.2" -lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", branch = "insipx/revoke-installation", package = "lib-didethresolver" } +lib-didethresolver = { path = "../../../workspace-didethresolver/insipx/revoke-installation/lib" } gateway-types = { path = "./gateway-types" } rustc-hex = "2.1" hex = "0.4" diff --git a/registry/src/contact_operations.rs b/registry/src/contact_operations.rs index 15d3ff0..65366fb 100644 --- a/registry/src/contact_operations.rs +++ b/registry/src/contact_operations.rs @@ -32,13 +32,15 @@ where // TODO: Parse or resolve the actual DID // TODO: Remove unwraps let address = Address::from_str(&did)?; + let attribute = Attribute::from(name); + log::debug!("Revoking attribute {:#?}", attribute); self.registry .revoke_attribute_signed( address, signature.v.try_into().unwrap(), signature.r.try_into().unwrap(), signature.s.try_into().unwrap(), - Attribute::from(name).into(), + attribute.into(), value.into(), ) .send() diff --git a/xps-gateway/src/lib.rs b/xps-gateway/src/lib.rs index d34d01e..05b2a01 100644 --- a/xps-gateway/src/lib.rs +++ b/xps-gateway/src/lib.rs @@ -3,7 +3,10 @@ pub mod types; mod util; use anyhow::Result; +use ethers::abi::Address; +use gateway_types::DID_ETH_REGISTRY; use jsonrpsee::server::Server; +use std::str::FromStr; pub use crate::rpc::{XpsMethods, XpsServer}; use crate::types::GatewayContext; @@ -18,7 +21,9 @@ pub async fn run() -> Result<()> { let server = Server::builder().build(SERVER_HOST).await?; let addr = server.local_addr()?; - let context = GatewayContext::new("wss://ethereum-sepolia.publicnode.com").await?; + let registry_contract = Address::from_str(DID_ETH_REGISTRY)?; + let context = + GatewayContext::new(registry_contract, "wss://ethereum-sepolia.publicnode.com").await?; let xps_methods = rpc::XpsMethods::new(&context); let handle = server.start(xps_methods.into_rpc()); diff --git a/xps-gateway/src/types.rs b/xps-gateway/src/types.rs index 13d09db..94aba9d 100644 --- a/xps-gateway/src/types.rs +++ b/xps-gateway/src/types.rs @@ -1,4 +1,4 @@ -use std::{str::FromStr, sync::Arc}; +use std::sync::Arc; use anyhow::Error; use ethers::{ @@ -7,7 +7,6 @@ use ethers::{ signers::LocalWallet, types::Address, }; -use gateway_types::DID_ETH_REGISTRY; use lib_didethresolver::did_registry::DIDRegistry; use rand::{rngs::StdRng, SeedableRng}; @@ -19,8 +18,10 @@ pub struct GatewayContext { } impl GatewayContext { - pub async fn new>(provider_endpoint: Endpoint) -> Result { - let registry = Address::from_str(DID_ETH_REGISTRY)?; + pub async fn new>( + registry: Address, + provider_endpoint: Endpoint, + ) -> Result { let wallet = LocalWallet::new(&mut StdRng::from_entropy()); let provider = Provider::::connect(provider_endpoint).await?; let signer = diff --git a/xps-gateway/tests/integration_test.rs b/xps-gateway/tests/integration_test.rs index 5d4fd8c..b83406a 100644 --- a/xps-gateway/tests/integration_test.rs +++ b/xps-gateway/tests/integration_test.rs @@ -5,8 +5,9 @@ use jsonrpsee::{ }; use ethers::{ + abi::AbiDecode, abi::Address, - core::utils::Anvil, + core::{types::TransactionRequest, utils::Anvil}, middleware::Middleware, middleware::SignerMiddleware, providers::{Provider, Ws}, @@ -14,9 +15,17 @@ use ethers::{ utils::AnvilInstance, }; use futures::future::FutureExt; -use lib_didethresolver::{did_registry::DIDRegistry, Resolver}; -use std::{future::Future, sync::Arc, time::Duration}; +use lib_didethresolver::{ + did_registry::{DIDRegistry, RegistrySignerExt}, + Resolver, +}; +use std::{ + future::Future, + sync::{Arc, Once}, + time::Duration, +}; use tokio::time::timeout as timeout_tokio; +use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry}; use xps_gateway::{ rpc::XpsClient, @@ -24,7 +33,7 @@ use xps_gateway::{ XpsMethods, XpsServer, SERVER_HOST, }; -const TEST_TIMEOUT: Duration = Duration::from_secs(10); +const TEST_TIMEOUT: Duration = Duration::from_secs(20); #[cfg(test)] mod it { @@ -62,25 +71,22 @@ mod it { #[tokio::test] async fn test_revoke_installation() -> Result<(), Error> { - with_xps_client(None, |client, context, resolver, _| async move { - let me = context.signer.address(); - let name = *b"did/pub/xmtp/ed25519/inst/hex "; + with_xps_client(None, |client, context, resolver, anvil| async move { + let wallet: LocalWallet = anvil.keys()[3].clone().into(); + let me = get_user(&anvil, 3).await; + let name = *b"did/pub/ed25519/veriKey/hex "; let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; let validity = U256::from(604_800); - - let signature = context - .signer - .signer() - .sign_attribute( - context.signer.signer().clone(), - name, - value.to_vec(), - validity, - ) + let signature = wallet + .sign_attribute(&context.registry, name, value.to_vec(), validity) .await?; + log::debug!("Me: {}", hex::encode(me.address())); + log::debug!("Wallet {}", hex::encode(wallet.address())); + log::debug!("Registry: {}", hex::encode(context.registry.address())); + log::debug!("Signer: {}", hex::encode(context.signer.address())); let attr = context.registry.set_attribute_signed( - me, + me.address(), signature.v.try_into().unwrap(), signature.r.try_into().unwrap(), signature.s.try_into().unwrap(), @@ -88,21 +94,40 @@ mod it { value.into(), validity, ); - attr.send().await?.await?; - - let tx = context.registry.revoke_attribute(me, name, value.into()).tx; - let signature = context.signer.sign_transaction(&tx, me).await.unwrap(); + let res = attr.send().await; + if let Err(e) = res { + let rev = e.decode_revert::(); + // let rev_bytes = e.as_revert().map(|b| hex::encode(b)).unwrap(); + // let rev = BadSignature::decode_hex(rev_bytes); + println!("{:?}", rev); + } else { + println!("IT WORKED???"); + } + + let doc = resolver + .resolve_did(me.address(), None) + .await + .unwrap() + .document; + + log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); + /* client .revoke_installation( - format!("0x{}", hex::encode(me)), + format!("0x{}", hex::encode(me.address())), XmtpAttributeType::InstallationKey, value.to_vec(), signature, ) .await?; - let doc = resolver.resolve_did(me, None).await.unwrap().document; - println!("{}", serde_json::to_string_pretty(&doc).unwrap()); + let doc = resolver + .resolve_did(me.address(), None) + .await + .unwrap() + .document; + log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); + */ Ok(()) }) .await @@ -111,32 +136,47 @@ mod it { async fn with_xps_client(timeout: Option, f: F) -> Result where - F: FnOnce(WsClient, GatewayContext, Resolver>, &AnvilInstance) -> R + F: FnOnce(WsClient, GatewayContext, Resolver>, Arc) -> R + 'static + Send, R: Future> + FutureExt + Send + 'static, { + init_test_logging(); let anvil = Anvil::new().args(vec!["--base-fee", "100"]).spawn(); log::debug!("Anvil spawned at {}", anvil.ws_endpoint()); let registry_address = deploy_to_anvil(&anvil).await; log::debug!("Contract deployed at {}", registry_address); - let server = Server::builder().build(SERVER_HOST).await.unwrap(); - let addr = server.local_addr().unwrap(); - let context = GatewayContext::new(anvil.ws_endpoint()).await?; + let context = GatewayContext::new(registry_address, anvil.ws_endpoint()).await?; + + let accounts = context.signer.get_accounts().await?; + let from = accounts[0]; + let tx = TransactionRequest::new() + .to(context.signer.address()) + .value(5_000_000_000_000_000_000_000_u128) + .from(from); + context.signer.send_transaction(tx, None).await?.await?; + let balance = context + .signer + .get_balance(context.signer.address(), None) + .await?; + log::debug!("Gateway Balance is {}", balance); + let resolver = Resolver::new(context.signer.clone(), registry_address) .await .unwrap(); + let server = Server::builder().build(SERVER_HOST).await.unwrap(); + let addr = server.local_addr().unwrap(); let handle = server.start(XpsMethods::new(&context).into_rpc()); let client = WsClientBuilder::default() .build(&format!("ws://{addr}")) .await .unwrap(); - + let anvil = Arc::new(anvil); let result = timeout_tokio( timeout.unwrap_or(TEST_TIMEOUT), - f(client, context, resolver, &anvil), + f(client, context, resolver, anvil.clone()), ) .await; @@ -176,3 +216,25 @@ async fn client( wallet.with_chain_id(anvil.chain_id()), )) } + +async fn get_user( + anvil: &AnvilInstance, + index: usize, +) -> Arc, LocalWallet>> { + let wallet: LocalWallet = anvil.keys()[index].clone().into(); + client(&anvil, wallet).await +} + +#[cfg(test)] +static INIT: Once = Once::new(); + +#[cfg(test)] +fn init_test_logging() { + INIT.call_once(|| { + let fmt = fmt::layer().compact(); + Registry::default() + .with(EnvFilter::from_default_env()) + .with(fmt) + .init() + }) +} From a83e204e959437ba90772afe4dec35b4b849b2be Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Tue, 23 Jan 2024 16:23:07 -0500 Subject: [PATCH 05/18] docs --- registry/src/contact_operations.rs | 19 +++--- registry/src/error.rs | 6 ++ xps-gateway/src/rpc/api.rs | 95 ++++++++++++++++++++++++++- xps-gateway/tests/integration_test.rs | 48 ++++++++------ 4 files changed, 139 insertions(+), 29 deletions(-) diff --git a/registry/src/contact_operations.rs b/registry/src/contact_operations.rs index 65366fb..1224944 100644 --- a/registry/src/contact_operations.rs +++ b/registry/src/contact_operations.rs @@ -4,7 +4,7 @@ use std::str::FromStr; use ethers::{core::types::Signature, providers::Middleware, types::Address}; use gateway_types::XmtpAttributeType; -use lib_didethresolver::{did_registry::DIDRegistry, types::Attribute}; +use lib_didethresolver::{did_registry::DIDRegistry, types::Attribute, Resolver}; use crate::error::ContactOperationError; @@ -30,22 +30,25 @@ where ) -> Result<(), ContactOperationError> { // for now, we will just assume the DID is a valid ethereum wallet address // TODO: Parse or resolve the actual DID - // TODO: Remove unwraps let address = Address::from_str(&did)?; - let attribute = Attribute::from(name); - log::debug!("Revoking attribute {:#?}", attribute); + let attribute: [u8; 32] = Attribute::from(name).into(); + log::debug!( + "Revoking attribute {:#?}", + String::from_utf8_lossy(&attribute) + ); self.registry .revoke_attribute_signed( address, - signature.v.try_into().unwrap(), - signature.r.try_into().unwrap(), - signature.s.try_into().unwrap(), - attribute.into(), + signature.v.try_into()?, + signature.r.into(), + signature.s.into(), + attribute, value.into(), ) .send() .await? .await?; + Ok(()) } } diff --git a/registry/src/error.rs b/registry/src/error.rs index f7a8ac4..5d19b2b 100644 --- a/registry/src/error.rs +++ b/registry/src/error.rs @@ -1,3 +1,7 @@ +//! Error variants for Registry + +use std::num::TryFromIntError; + use ethers::{ contract::ContractError, providers::{Middleware, ProviderError}, @@ -12,4 +16,6 @@ pub enum ContactOperationError { ContractError(#[from] ContractError), #[error(transparent)] ProviderError(#[from] ProviderError), + #[error("Error converting from int: {0}")] + IntConversion(#[from] TryFromIntError), } diff --git a/xps-gateway/src/rpc/api.rs b/xps-gateway/src/rpc/api.rs index 69deb4c..ee25601 100644 --- a/xps-gateway/src/rpc/api.rs +++ b/xps-gateway/src/rpc/api.rs @@ -12,13 +12,105 @@ pub trait Xps { #[method(name = "sendMessage")] async fn send_message(&self, _message: Message) -> Result<(), ErrorObjectOwned>; + /// # Documentation for JSON RPC Endpoint: `revoke_installation` + /// + /// ## JSON RPC Endpoint Specification + /// + /// #### Request: + /// + /// - **Method:** `POST` + /// - **URL:** `/rpc/v1/revokeInstallation` + /// - **Headers:** + /// - `Content-Type: application/json` + /// - **Body:** + /// - **JSON Object:** + /// - `jsonrpc`: `"2.0"` + /// - `method`: `"revokeInstallation"` + /// - `params`: Array (optional parameters as required) + /// - `id`: Request identifier (integer or string) + /// + /// ### Endpoint: `revokeInstallation` + /// + /// #### Description + /// The `revokeInstallation` endpoint is responsible for removing the contact bundle for the XMTP device installation. The request must be made to a valid did with an XMTP profile. + /// + /// #### Request + /// The request for this endpoint should contain the necessary information to authenticate and validate the installation request including the wallet signed payload + /// + /// ##### Parameters: + /// - `DID` (string): Unique XMTP identifier for the user requesting the revocation. + /// - `name` (string): Unique identifier naming bundled contents variant. + /// - `value` (bytes): Installation bundle bytes payload + /// - `V` (int): signature V + /// - `R` (bytes): signature R + /// - `S` (bytes): signature S + /// + /// ##### Example Request: + /// ```json + /// { + /// "jsonrpc": "2.0", + /// "method": "revokeInstallation", + /// "params": { + /// "did": "12345", + /// "name": "xmtp/contact_installation", + /// "value": "#######", + /// "signature": { + /// "V": "12345", + /// "R": "valueR", + /// "S": "valueS" + /// } + /// }, + /// "id": 1 + /// } + /// ``` + /// + /// #### Response + /// The response will indicate whether the installation is revoked and may include additional information or instructions. + /// + /// ##### Result Fields: + /// - `status` (string): The status of the request, e.g., 'completed'. + /// - `message` (string, optional): Additional information or reason for the decision. + /// - `tx` (string, optional): transaction receipt + /// + /// ##### Example Response: + /// ```json + /// { + /// "jsonrpc": "2.0", + /// "result": { + /// "status": "completed", + /// "message": "Installation revoked.", + /// "tx": "" + /// }, + /// "id": 1 + /// } + /// ``` + /// + /// #### Error Handling + /// In case of an error, the response will include an error object with details. + /// + /// ##### Error Object Fields: + /// - `code` (integer): Numeric code representing the error type. + /// - `message` (string): Description of the error. + /// + /// ##### Example Error Response: + /// ```json + /// { + /// "jsonrpc": "2.0", + /// "error": { + /// "code": 403, + /// "message": "User not authorized for installation." + /// }, + /// "id": 1 + /// } + /// ``` + /// removes the contact bundle for the XMTP device installation. Request must be made to a /// valid DID with an XMTP profile. /// /// # Arguments /// /// * `did` - the DID of the XMTP device installation - /// * `name` - the name of the contact bundle + /// * `name` - the name of the contact bundle variant /// * `value` - the value of the contact bundle /// * `signature` - the signature of the contact bundle #[method(name = "revokeInstallation")] @@ -29,6 +121,7 @@ pub trait Xps { value: Vec, signature: Signature, ) -> Result<(), ErrorObjectOwned>; + /// # Documentation for JSON RPC Endpoint: `status` /// ## Overview diff --git a/xps-gateway/tests/integration_test.rs b/xps-gateway/tests/integration_test.rs index b83406a..84c174d 100644 --- a/xps-gateway/tests/integration_test.rs +++ b/xps-gateway/tests/integration_test.rs @@ -5,7 +5,6 @@ use jsonrpsee::{ }; use ethers::{ - abi::AbiDecode, abi::Address, core::{types::TransactionRequest, utils::Anvil}, middleware::Middleware, @@ -17,6 +16,7 @@ use ethers::{ use futures::future::FutureExt; use lib_didethresolver::{ did_registry::{DIDRegistry, RegistrySignerExt}, + types::DidUrl, Resolver, }; use std::{ @@ -74,44 +74,41 @@ mod it { with_xps_client(None, |client, context, resolver, anvil| async move { let wallet: LocalWallet = anvil.keys()[3].clone().into(); let me = get_user(&anvil, 3).await; - let name = *b"did/pub/ed25519/veriKey/hex "; + let name = *b"did/pub/Ed25519/xmtp/inst/hex "; let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; let validity = U256::from(604_800); let signature = wallet .sign_attribute(&context.registry, name, value.to_vec(), validity) .await?; - log::debug!("Me: {}", hex::encode(me.address())); - log::debug!("Wallet {}", hex::encode(wallet.address())); - log::debug!("Registry: {}", hex::encode(context.registry.address())); - log::debug!("Signer: {}", hex::encode(context.signer.address())); let attr = context.registry.set_attribute_signed( me.address(), signature.v.try_into().unwrap(), - signature.r.try_into().unwrap(), - signature.s.try_into().unwrap(), + signature.r.into(), + signature.s.into(), name, value.into(), validity, ); - let res = attr.send().await; - if let Err(e) = res { - let rev = e.decode_revert::(); - // let rev_bytes = e.as_revert().map(|b| hex::encode(b)).unwrap(); - // let rev = BadSignature::decode_hex(rev_bytes); - println!("{:?}", rev); - } else { - println!("IT WORKED???"); - } + attr.send().await?.await?; let doc = resolver .resolve_did(me.address(), None) .await .unwrap() .document; + assert_eq!( + doc.verification_method[1].id, + DidUrl::parse(format!( + "did:ethr:0x{}/xmtp?meta=installation_key#delegate-0", + hex::encode(me.address()) + )) + .unwrap() + ); - log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); - /* + let signature = wallet + .sign_revoke_attribute(&context.registry, name, value.to_vec()) + .await?; client .revoke_installation( format!("0x{}", hex::encode(me.address())), @@ -126,8 +123,19 @@ mod it { .await .unwrap() .document; + log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); - */ + + assert_eq!( + doc.verification_method[0].id, + DidUrl::parse(format!( + "did:ethr:0x{}#controller", + hex::encode(me.address()) + )) + .unwrap() + ); + assert_eq!(doc.verification_method.len(), 1); + Ok(()) }) .await From 7fcd629b7a929c67693446d4f52b5e19cd5f908a Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Wed, 24 Jan 2024 17:04:16 -0500 Subject: [PATCH 06/18] update for new didethresolver format --- gateway-types/src/lib.rs | 22 -- registry/src/contact_operations.rs | 9 +- xps-gateway/src/rpc/api.rs | 5 +- xps-gateway/src/rpc/methods.rs | 5 +- xps-gateway/tests/integration_test.rs | 342 +++++++--------------- xps-gateway/tests/integration_util/mod.rs | 136 +++++++++ 6 files changed, 255 insertions(+), 264 deletions(-) create mode 100644 xps-gateway/tests/integration_util/mod.rs diff --git a/gateway-types/src/lib.rs b/gateway-types/src/lib.rs index 714a556..e1b40e5 100644 --- a/gateway-types/src/lib.rs +++ b/gateway-types/src/lib.rs @@ -1,6 +1,3 @@ -use lib_didethresolver::types::{ - Attribute, KeyEncoding, KeyMetadata, KeyPurpose, KeyType, PublicKey, -}; use serde::{Deserialize, Serialize}; /// Address of the did:ethr Registry on Sepolia @@ -21,22 +18,3 @@ pub struct Message { /// Signature of S pub s: Vec, } - -/// The XMTP-specific attribute type -#[derive(Serialize, Deserialize)] -pub enum XmtpAttributeType { - InstallationKey, -} - -impl From for Attribute { - fn from(attribute: XmtpAttributeType) -> Self { - match attribute { - XmtpAttributeType::InstallationKey => Attribute::PublicKey(PublicKey { - key_type: KeyType::Ed25519VerificationKey2020, - purpose: KeyPurpose::Xmtp, - encoding: KeyEncoding::Hex, - metadata: Some(KeyMetadata::Installation), - }), - } - } -} diff --git a/registry/src/contact_operations.rs b/registry/src/contact_operations.rs index 1224944..e89c4d0 100644 --- a/registry/src/contact_operations.rs +++ b/registry/src/contact_operations.rs @@ -3,8 +3,11 @@ use std::str::FromStr; use ethers::{core::types::Signature, providers::Middleware, types::Address}; -use gateway_types::XmtpAttributeType; -use lib_didethresolver::{did_registry::DIDRegistry, types::Attribute, Resolver}; +use lib_didethresolver::{ + did_registry::DIDRegistry, + types::{Attribute, XmtpAttribute}, + Resolver, +}; use crate::error::ContactOperationError; @@ -24,7 +27,7 @@ where pub async fn revoke_installation( &self, did: String, - name: XmtpAttributeType, + name: XmtpAttribute, value: Vec, signature: Signature, ) -> Result<(), ContactOperationError> { diff --git a/xps-gateway/src/rpc/api.rs b/xps-gateway/src/rpc/api.rs index ee25601..40d72d1 100644 --- a/xps-gateway/src/rpc/api.rs +++ b/xps-gateway/src/rpc/api.rs @@ -3,7 +3,8 @@ use ethers::core::types::Signature; use jsonrpsee::{proc_macros::rpc, types::ErrorObjectOwned}; -use gateway_types::{Message, XmtpAttributeType}; +use gateway_types::Message; +use lib_didethresolver::types::XmtpAttribute; /// XPS JSON-RPC Interface Methods #[rpc(server, client, namespace = "xps")] @@ -117,7 +118,7 @@ pub trait Xps { async fn revoke_installation( &self, did: String, - name: XmtpAttributeType, + name: XmtpAttribute, value: Vec, signature: Signature, ) -> Result<(), ErrorObjectOwned>; diff --git a/xps-gateway/src/rpc/methods.rs b/xps-gateway/src/rpc/methods.rs index a0ca841..9c50e0a 100644 --- a/xps-gateway/src/rpc/methods.rs +++ b/xps-gateway/src/rpc/methods.rs @@ -8,9 +8,10 @@ use jsonrpsee::types::error::ErrorCode; use async_trait::async_trait; use ethers::{core::types::Signature, providers::Middleware}; use jsonrpsee::types::ErrorObjectOwned; +use lib_didethresolver::types::XmtpAttribute; use thiserror::Error; -use gateway_types::{Message, XmtpAttributeType}; +use gateway_types::Message; use registry::{error::ContactOperationError, ContactOperations}; /// Gateway Methods for XPS @@ -42,7 +43,7 @@ impl XpsServer for XpsMethods { async fn revoke_installation( &self, did: String, - name: XmtpAttributeType, + name: XmtpAttribute, value: Vec, signature: Signature, ) -> Result<(), ErrorObjectOwned> { diff --git a/xps-gateway/tests/integration_test.rs b/xps-gateway/tests/integration_test.rs index 84c174d..07a30c2 100644 --- a/xps-gateway/tests/integration_test.rs +++ b/xps-gateway/tests/integration_test.rs @@ -1,248 +1,120 @@ +mod integration_util; + use anyhow::Error; -use jsonrpsee::{ - server::Server, - ws_client::{WsClient, WsClientBuilder}, -}; -use ethers::{ - abi::Address, - core::{types::TransactionRequest, utils::Anvil}, - middleware::Middleware, - middleware::SignerMiddleware, - providers::{Provider, Ws}, - signers::{LocalWallet, Signer as _}, - utils::AnvilInstance, -}; -use futures::future::FutureExt; +use ethers::signers::LocalWallet; use lib_didethresolver::{ - did_registry::{DIDRegistry, RegistrySignerExt}, - types::DidUrl, - Resolver, -}; -use std::{ - future::Future, - sync::{Arc, Once}, - time::Duration, + did_registry::RegistrySignerExt, + types::{DidUrl, KeyEncoding, XmtpAttribute, XmtpKeyPurpose}, }; -use tokio::time::timeout as timeout_tokio; -use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry}; - -use xps_gateway::{ - rpc::XpsClient, - types::{GatewayContext, GatewaySigner}, - XpsMethods, XpsServer, SERVER_HOST, -}; - -const TEST_TIMEOUT: Duration = Duration::from_secs(20); - -#[cfg(test)] -mod it { - use ethers::types::U256; - use gateway_types::{Message, XmtpAttributeType}; - - use super::*; - - #[tokio::test] - async fn test_say_hello() -> Result<(), Error> { - with_xps_client(None, |client, _, _, _| async move { - let result = client.status().await?; - assert_eq!(result, "OK"); - Ok(()) - }) - .await - } - - #[tokio::test] - async fn test_fail_send_message() -> Result<(), Error> { - with_xps_client(None, |client, _, _, _| async move { - let message = Message { - conversation_id: b"abcdefg".iter().map(|c| *c as u8).collect(), - payload: b"Hello World".iter().map(|c| *c as u8).collect(), - v: vec![], - r: vec![], - s: vec![], - }; - let result = client.send_message(message).await; - assert!(result.is_err()); - Ok(()) - }) - .await - } - - #[tokio::test] - async fn test_revoke_installation() -> Result<(), Error> { - with_xps_client(None, |client, context, resolver, anvil| async move { - let wallet: LocalWallet = anvil.keys()[3].clone().into(); - let me = get_user(&anvil, 3).await; - let name = *b"did/pub/Ed25519/xmtp/inst/hex "; - let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; - let validity = U256::from(604_800); - let signature = wallet - .sign_attribute(&context.registry, name, value.to_vec(), validity) - .await?; - - let attr = context.registry.set_attribute_signed( - me.address(), - signature.v.try_into().unwrap(), - signature.r.into(), - signature.s.into(), - name, - value.into(), - validity, - ); - attr.send().await?.await?; - - let doc = resolver - .resolve_did(me.address(), None) - .await - .unwrap() - .document; - assert_eq!( - doc.verification_method[1].id, - DidUrl::parse(format!( - "did:ethr:0x{}/xmtp?meta=installation_key#delegate-0", - hex::encode(me.address()) - )) - .unwrap() - ); - - let signature = wallet - .sign_revoke_attribute(&context.registry, name, value.to_vec()) - .await?; - client - .revoke_installation( - format!("0x{}", hex::encode(me.address())), - XmtpAttributeType::InstallationKey, - value.to_vec(), - signature, - ) - .await?; - - let doc = resolver - .resolve_did(me.address(), None) - .await - .unwrap() - .document; - - log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); - - assert_eq!( - doc.verification_method[0].id, - DidUrl::parse(format!( - "did:ethr:0x{}#controller", - hex::encode(me.address()) - )) - .unwrap() - ); - assert_eq!(doc.verification_method.len(), 1); - - Ok(()) - }) - .await - } -} - -async fn with_xps_client(timeout: Option, f: F) -> Result -where - F: FnOnce(WsClient, GatewayContext, Resolver>, Arc) -> R - + 'static - + Send, - R: Future> + FutureExt + Send + 'static, -{ - init_test_logging(); - let anvil = Anvil::new().args(vec!["--base-fee", "100"]).spawn(); - log::debug!("Anvil spawned at {}", anvil.ws_endpoint()); - let registry_address = deploy_to_anvil(&anvil).await; - log::debug!("Contract deployed at {}", registry_address); - - let context = GatewayContext::new(registry_address, anvil.ws_endpoint()).await?; - - let accounts = context.signer.get_accounts().await?; - let from = accounts[0]; - let tx = TransactionRequest::new() - .to(context.signer.address()) - .value(5_000_000_000_000_000_000_000_u128) - .from(from); - context.signer.send_transaction(tx, None).await?.await?; - let balance = context - .signer - .get_balance(context.signer.address(), None) - .await?; - log::debug!("Gateway Balance is {}", balance); - - let resolver = Resolver::new(context.signer.clone(), registry_address) - .await - .unwrap(); - - let server = Server::builder().build(SERVER_HOST).await.unwrap(); - let addr = server.local_addr().unwrap(); - let handle = server.start(XpsMethods::new(&context).into_rpc()); - let client = WsClientBuilder::default() - .build(&format!("ws://{addr}")) - .await - .unwrap(); - let anvil = Arc::new(anvil); - let result = timeout_tokio( - timeout.unwrap_or(TEST_TIMEOUT), - f(client, context, resolver, anvil.clone()), - ) - .await; - - handle.stop().unwrap(); - handle.stopped().await; - - match result { - Ok(v) => v, - Err(_) => panic!("Test timed out"), - } -} +use xps_gateway::rpc::XpsClient; -async fn deploy_to_anvil(anvil: &AnvilInstance) -> Address { - let wallet: LocalWallet = anvil.keys()[0].clone().into(); - let client = client(&anvil, wallet).await; +use ethers::types::U256; +use gateway_types::Message; - let registry = DIDRegistry::deploy(client.clone(), ()) - .unwrap() - .gas_price(100) - .send() - .await - .unwrap(); +use integration_util::*; - registry.address() -} - -async fn client( - anvil: &AnvilInstance, - wallet: LocalWallet, -) -> Arc, LocalWallet>> { - let provider = Provider::::connect(anvil.ws_endpoint()) - .await - .unwrap() - .interval(std::time::Duration::from_millis(10u64)); - Arc::new(SignerMiddleware::new( - provider, - wallet.with_chain_id(anvil.chain_id()), - )) +#[tokio::test] +async fn test_say_hello() -> Result<(), Error> { + with_xps_client(None, |client, _, _, _| async move { + let result = client.status().await?; + assert_eq!(result, "OK"); + Ok(()) + }) + .await } -async fn get_user( - anvil: &AnvilInstance, - index: usize, -) -> Arc, LocalWallet>> { - let wallet: LocalWallet = anvil.keys()[index].clone().into(); - client(&anvil, wallet).await +#[tokio::test] +async fn test_fail_send_message() -> Result<(), Error> { + with_xps_client(None, |client, _, _, _| async move { + let message = Message { + conversation_id: b"abcdefg".iter().map(|c| *c as u8).collect(), + payload: b"Hello World".iter().map(|c| *c as u8).collect(), + v: vec![], + r: vec![], + s: vec![], + }; + let result = client.send_message(message).await; + assert!(result.is_err()); + Ok(()) + }) + .await } -#[cfg(test)] -static INIT: Once = Once::new(); - -#[cfg(test)] -fn init_test_logging() { - INIT.call_once(|| { - let fmt = fmt::layer().compact(); - Registry::default() - .with(EnvFilter::from_default_env()) - .with(fmt) - .init() +#[tokio::test] +async fn test_revoke_installation() -> Result<(), Error> { + with_xps_client(None, |client, context, resolver, anvil| async move { + let wallet: LocalWallet = anvil.keys()[3].clone().into(); + let me = get_user(&anvil, 3).await; + let name = *b"xmtp/installation/hex "; + let value = b"02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"; + let validity = U256::from(604_800); + let signature = wallet + .sign_attribute(&context.registry, name, value.to_vec(), validity) + .await?; + + let attr = context.registry.set_attribute_signed( + me.address(), + signature.v.try_into().unwrap(), + signature.r.into(), + signature.s.into(), + name, + value.into(), + validity, + ); + attr.send().await?.await?; + + let doc = resolver + .resolve_did(me.address(), None) + .await + .unwrap() + .document; + assert_eq!( + doc.verification_method[1].id, + DidUrl::parse(format!( + "did:ethr:0x{}?meta=installation#xmtp-0", + hex::encode(me.address()) + )) + .unwrap() + ); + + let signature = wallet + .sign_revoke_attribute(&context.registry, name, value.to_vec()) + .await?; + + let attribute = XmtpAttribute { + purpose: XmtpKeyPurpose::Installation, + encoding: KeyEncoding::Hex, + }; + + client + .revoke_installation( + format!("0x{}", hex::encode(me.address())), + attribute, + value.to_vec(), + signature, + ) + .await?; + + let doc = resolver + .resolve_did(me.address(), None) + .await + .unwrap() + .document; + + log::debug!("{}", serde_json::to_string_pretty(&doc).unwrap()); + + assert_eq!( + doc.verification_method[0].id, + DidUrl::parse(format!( + "did:ethr:0x{}#controller", + hex::encode(me.address()) + )) + .unwrap() + ); + assert_eq!(doc.verification_method.len(), 1); + + Ok(()) }) + .await } diff --git a/xps-gateway/tests/integration_util/mod.rs b/xps-gateway/tests/integration_util/mod.rs new file mode 100644 index 0000000..a9b7c6d --- /dev/null +++ b/xps-gateway/tests/integration_util/mod.rs @@ -0,0 +1,136 @@ +use anyhow::Error; +use jsonrpsee::{ + server::Server, + ws_client::{WsClient, WsClientBuilder}, +}; + +use ethers::{ + abi::Address, + core::{types::TransactionRequest, utils::Anvil}, + middleware::Middleware, + middleware::SignerMiddleware, + providers::{Provider, Ws}, + signers::{LocalWallet, Signer as _}, + utils::AnvilInstance, +}; +use futures::future::FutureExt; +use lib_didethresolver::{did_registry::DIDRegistry, Resolver}; +use std::{ + future::Future, + sync::{Arc, Once}, + time::Duration, +}; +use tokio::time::timeout as timeout_tokio; +use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry}; + +use xps_gateway::{ + types::{GatewayContext, GatewaySigner}, + XpsMethods, XpsServer, SERVER_HOST, +}; + +const TEST_TIMEOUT: Duration = Duration::from_secs(20); + +pub async fn with_xps_client(timeout: Option, f: F) -> Result +where + F: FnOnce(WsClient, GatewayContext, Resolver>, Arc) -> R + + 'static + + Send, + R: Future> + FutureExt + Send + 'static, +{ + init_test_logging(); + let anvil = Anvil::new().args(vec!["--base-fee", "100"]).spawn(); + log::debug!("Anvil spawned at {}", anvil.ws_endpoint()); + let registry_address = deploy_to_anvil(&anvil).await; + log::debug!("Contract deployed at {}", registry_address); + + let context = GatewayContext::new(registry_address, anvil.ws_endpoint()).await?; + + let accounts = context.signer.get_accounts().await?; + let from = accounts[0]; + let tx = TransactionRequest::new() + .to(context.signer.address()) + .value(5_000_000_000_000_000_000_000_u128) + .from(from); + context.signer.send_transaction(tx, None).await?.await?; + let balance = context + .signer + .get_balance(context.signer.address(), None) + .await?; + log::debug!("Gateway Balance is {}", balance); + + let resolver = Resolver::new(context.signer.clone(), registry_address) + .await + .unwrap(); + + let server = Server::builder().build(SERVER_HOST).await.unwrap(); + let addr = server.local_addr().unwrap(); + let handle = server.start(XpsMethods::new(&context).into_rpc()); + let client = WsClientBuilder::default() + .build(&format!("ws://{addr}")) + .await + .unwrap(); + let anvil = Arc::new(anvil); + let result = timeout_tokio( + timeout.unwrap_or(TEST_TIMEOUT), + f(client, context, resolver, anvil.clone()), + ) + .await; + + handle.stop().unwrap(); + handle.stopped().await; + + match result { + Ok(v) => v, + Err(_) => panic!("Test timed out"), + } +} + +async fn deploy_to_anvil(anvil: &AnvilInstance) -> Address { + let wallet: LocalWallet = anvil.keys()[0].clone().into(); + let client = client(&anvil, wallet).await; + + let registry = DIDRegistry::deploy(client.clone(), ()) + .unwrap() + .gas_price(100) + .send() + .await + .unwrap(); + + registry.address() +} + +async fn client( + anvil: &AnvilInstance, + wallet: LocalWallet, +) -> Arc, LocalWallet>> { + let provider = Provider::::connect(anvil.ws_endpoint()) + .await + .unwrap() + .interval(std::time::Duration::from_millis(10u64)); + Arc::new(SignerMiddleware::new( + provider, + wallet.with_chain_id(anvil.chain_id()), + )) +} + +pub async fn get_user( + anvil: &AnvilInstance, + index: usize, +) -> Arc, LocalWallet>> { + let wallet: LocalWallet = anvil.keys()[index].clone().into(); + client(&anvil, wallet).await +} + +#[cfg(test)] +static INIT: Once = Once::new(); + +#[cfg(test)] +fn init_test_logging() { + INIT.call_once(|| { + let fmt = fmt::layer().compact(); + Registry::default() + .with(EnvFilter::from_default_env()) + .with(fmt) + .init() + }) +} From 93703b1a5feba33b49a0ba5242583ba53c1a2b8f Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 11:00:12 -0500 Subject: [PATCH 07/18] change back to git repo --- Cargo.toml | 2 +- xps-gateway/tests/integration_util/mod.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5e97b8..af6dd1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ anyhow = "1.0" thiserror = "1.0" ethers = { version = "2", features = ["abigen"] } ctor = "0.2" -lib-didethresolver = { path = "../../../workspace-didethresolver/insipx/revoke-installation/lib" } +lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", package = "lib_didethresolver" } gateway-types = { path = "./gateway-types" } rustc-hex = "2.1" hex = "0.4" diff --git a/xps-gateway/tests/integration_util/mod.rs b/xps-gateway/tests/integration_util/mod.rs index 971b971..d8bcdb8 100644 --- a/xps-gateway/tests/integration_util/mod.rs +++ b/xps-gateway/tests/integration_util/mod.rs @@ -125,10 +125,8 @@ pub async fn get_user( client(&anvil, wallet).await } -#[cfg(test)] static INIT: Once = Once::new(); -#[cfg(test)] fn init_test_logging() { INIT.call_once(|| { let fmt = fmt::layer().compact(); From d6317c91bf42f3e4857a21f7d2335301a25f11b6 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 11:05:56 -0500 Subject: [PATCH 08/18] typo --- Cargo.lock | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 485dea2..25fb832 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2070,6 +2070,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" +source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#371052af2c78c77bef10f5d8df006af65f1ec2a1" dependencies = [ "async-trait", "base64 0.21.7", diff --git a/Cargo.toml b/Cargo.toml index af6dd1f..a24e2ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ anyhow = "1.0" thiserror = "1.0" ethers = { version = "2", features = ["abigen"] } ctor = "0.2" -lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", package = "lib_didethresolver" } +lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", package = "lib-didethresolver", branch = "insipx/revoke-installation" } gateway-types = { path = "./gateway-types" } rustc-hex = "2.1" hex = "0.4" From fae231961081f5e22809cd4edc129e8b2841ce8f Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 11:17:28 -0500 Subject: [PATCH 09/18] include anvil in Dockerfile; do not run integration tests in github pages workflow --- .github/workflows/github-pages.yml | 15 +++------------ Dockerfile | 2 ++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index d4cb3c9..3236bd2 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -1,22 +1,18 @@ name: GitHub Pages - on: push: branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write - # Allow one concurrent deployment concurrency: group: "github-pages" cancel-in-progress: true - jobs: build: runs-on: ubuntu-latest @@ -25,25 +21,22 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - - name: Setup Pages uses: actions/configure-pages@v2 - uses: actions/setup-python@v2 - - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - - name: Run tests env: - CARGO_INCREMENTAL: 0 + CARGO_INCREMENTAL: 0 run: | - cargo test + cargo test --docs + cargo test --lib id: test - - name: Invoke cargo doc run: | rm -rf ./_site @@ -55,10 +48,8 @@ jobs: echo "Taking care of pedantic permissions requirements required by GitHub Pages" chmod -R +rX _site id: docgen - - name: Upload artifact uses: actions/upload-pages-artifact@v2 - # Deployment job deploy: environment: diff --git a/Dockerfile b/Dockerfile index 1491053..c3d8717 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ USER xmtp RUN sudo apt update && sudo apt install -y pkg-config openssl libssl-dev +COPY --from=ghcr.io/xmtp/foundry:latest /usr/local/bin/anvil /usr/local/bin/anvil + ARG PROJECT=xps-gateway WORKDIR /workspaces/${PROJECT} COPY --chown=xmtp:xmtp . . From 1ff759ba2d805291d57e1775c96f4f744b3974ea Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 11:32:35 -0500 Subject: [PATCH 10/18] anvil in coverage --- .github/workflows/coverage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 67bdb2a..60b458e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,6 +7,12 @@ jobs: - uses: actions/checkout@v2 - name: Install Rust run: rustup toolchain install nightly --component llvm-tools-preview + - name: Install anvil + uses: baptiste0928/cargo-install@v2 + with: + crate: anvil + git: https://github.com/foundry-rs/foundry + commit: nightly - name: Install cargo-llvm-cov run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Generate code coverage From 85ac24e28143c2904265fcafad083ef29db658cc Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 12:46:48 -0500 Subject: [PATCH 11/18] add test for Gateway Constructor --- xps-gateway/src/lib.rs | 12 ++++-- xps-gateway/src/rpc/methods.rs | 15 +++++--- xps-gateway/src/types.rs | 45 ++++++++++++++++------- xps-gateway/tests/integration_util/mod.rs | 13 ++++++- 4 files changed, 60 insertions(+), 25 deletions(-) diff --git a/xps-gateway/src/lib.rs b/xps-gateway/src/lib.rs index 9998e43..c6b3e8a 100644 --- a/xps-gateway/src/lib.rs +++ b/xps-gateway/src/lib.rs @@ -3,7 +3,10 @@ pub mod types; mod util; use anyhow::Result; -use ethers::abi::Address; +use ethers::{ + abi::Address, + providers::{Provider, Ws}, +}; use gateway_types::DID_ETH_REGISTRY; use jsonrpsee::server::Server; use std::str::FromStr; @@ -22,8 +25,11 @@ pub async fn run(host: String, port: u16) -> Result<()> { let addr = server.local_addr()?; let registry_contract = Address::from_str(DID_ETH_REGISTRY)?; - let context = - GatewayContext::new(registry_contract, "wss://ethereum-sepolia.publicnode.com").await?; + let provider = Provider::::connect("wss://ethereum-sepolia.publicnode.com") + .await + .unwrap(); + + let context = GatewayContext::new(registry_contract, provider).await?; let xps_methods = rpc::XpsMethods::new(&context); let handle = server.start(xps_methods.into_rpc()); diff --git a/xps-gateway/src/rpc/methods.rs b/xps-gateway/src/rpc/methods.rs index 9c50e0a..e7547ab 100644 --- a/xps-gateway/src/rpc/methods.rs +++ b/xps-gateway/src/rpc/methods.rs @@ -6,7 +6,10 @@ use super::api::*; use jsonrpsee::types::error::ErrorCode; use async_trait::async_trait; -use ethers::{core::types::Signature, providers::Middleware}; +use ethers::{ + core::types::Signature, + providers::{Middleware, Provider, Ws}, +}; use jsonrpsee::types::ErrorObjectOwned; use lib_didethresolver::types::XmtpAttribute; use thiserror::Error; @@ -15,12 +18,12 @@ use gateway_types::Message; use registry::{error::ContactOperationError, ContactOperations}; /// Gateway Methods for XPS -pub struct XpsMethods { - contact_operations: ContactOperations, +pub struct XpsMethods { + contact_operations: ContactOperations>, } -impl XpsMethods { - pub fn new(context: &GatewayContext) -> Self { +impl XpsMethods

{ + pub fn new(context: &GatewayContext

) -> Self { Self { contact_operations: ContactOperations::new(context.registry.clone()), } @@ -28,7 +31,7 @@ impl XpsMethods { } #[async_trait] -impl XpsServer for XpsMethods { +impl XpsServer for XpsMethods

{ async fn send_message(&self, _message: Message) -> Result<(), ErrorObjectOwned> { //TODO: Stub for sendMessage, ref: [discussion](https://github.com/xmtp/xps-gateway/discussions/11) log::debug!("xps_sendMessage called"); diff --git a/xps-gateway/src/types.rs b/xps-gateway/src/types.rs index 94aba9d..7d8eac2 100644 --- a/xps-gateway/src/types.rs +++ b/xps-gateway/src/types.rs @@ -2,31 +2,48 @@ use std::sync::Arc; use anyhow::Error; use ethers::{ - middleware::SignerMiddleware, - providers::{Provider, Ws}, - signers::LocalWallet, - types::Address, + middleware::SignerMiddleware, providers::Middleware, signers::LocalWallet, types::Address, }; use lib_didethresolver::did_registry::DIDRegistry; use rand::{rngs::StdRng, SeedableRng}; -pub type GatewaySigner = SignerMiddleware, LocalWallet>; +pub type GatewaySigner

= SignerMiddleware; -pub struct GatewayContext { - pub registry: DIDRegistry, - pub signer: Arc, +pub struct GatewayContext { + pub registry: DIDRegistry>, + pub signer: Arc>, } -impl GatewayContext { - pub async fn new>( - registry: Address, - provider_endpoint: Endpoint, - ) -> Result { +impl GatewayContext

{ + pub async fn new(registry: Address, provider: P) -> Result { let wallet = LocalWallet::new(&mut StdRng::from_entropy()); - let provider = Provider::::connect(provider_endpoint).await?; let signer = Arc::new(SignerMiddleware::new_with_provider_chain(provider, wallet.clone()).await?); let registry = DIDRegistry::new(registry, signer.clone()); Ok(Self { registry, signer }) } } + +#[cfg(test)] +mod tests { + use ethers::{providers::Provider, types::U64}; + use std::str::FromStr; + + use super::*; + + #[tokio::test] + async fn test_gateway_constructor() { + let (provider, mock) = Provider::mocked(); + mock.push(U64::from(2)).unwrap(); + + let gateway = GatewayContext::new( + Address::from_str("0x0000000000000000000000000000000000000000").unwrap(), + provider, + ) + .await + .unwrap(); + + assert!(gateway.registry.address().is_zero()); + assert!(gateway.signer.is_signer().await); + } +} diff --git a/xps-gateway/tests/integration_util/mod.rs b/xps-gateway/tests/integration_util/mod.rs index d8bcdb8..492be3f 100644 --- a/xps-gateway/tests/integration_util/mod.rs +++ b/xps-gateway/tests/integration_util/mod.rs @@ -33,7 +33,12 @@ pub const SERVER_HOST: &str = "127.0.0.1"; pub async fn with_xps_client(timeout: Option, f: F) -> Result where - F: FnOnce(WsClient, GatewayContext, Resolver>, Arc) -> R + F: FnOnce( + WsClient, + GatewayContext>, + Resolver>>>, + Arc, + ) -> R + 'static + Send, R: Future> + FutureExt + Send + 'static, @@ -43,8 +48,12 @@ where log::debug!("Anvil spawned at {}", anvil.ws_endpoint()); let registry_address = deploy_to_anvil(&anvil).await; log::debug!("Contract deployed at {}", registry_address); + let provider = Provider::::connect(anvil.ws_endpoint()) + .await + .unwrap() + .interval(std::time::Duration::from_millis(10u64)); - let context = GatewayContext::new(registry_address, anvil.ws_endpoint()).await?; + let context = GatewayContext::new(registry_address, provider).await?; let accounts = context.signer.get_accounts().await?; let from = accounts[0]; From 85f5e920c34a4e110d66792b48b259d87a9044bd Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 14:06:41 -0500 Subject: [PATCH 12/18] add test for Gateway Constructor --- registry/src/lib.rs | 26 ++++++++++++++------------ xps-gateway/src/rpc/methods.rs | 5 +---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/registry/src/lib.rs b/registry/src/lib.rs index edae9e6..0bd752a 100644 --- a/registry/src/lib.rs +++ b/registry/src/lib.rs @@ -38,18 +38,20 @@ where "Revoking attribute {:#?}", String::from_utf8_lossy(&attribute) ); - self.registry - .revoke_attribute_signed( - address, - signature.v.try_into()?, - signature.r.into(), - signature.s.into(), - attribute, - value.into(), - ) - .send() - .await? - .await?; + let res = self.registry.revoke_attribute_signed( + address, + signature.v.try_into()?, + signature.r.into(), + signature.s.into(), + attribute, + value.into(), + ); + + let res = res.send().await; + if let Err(ref e) = res { + println!("{}", e); + } + res?.await?; Ok(()) } diff --git a/xps-gateway/src/rpc/methods.rs b/xps-gateway/src/rpc/methods.rs index e7547ab..ab268d6 100644 --- a/xps-gateway/src/rpc/methods.rs +++ b/xps-gateway/src/rpc/methods.rs @@ -6,10 +6,7 @@ use super::api::*; use jsonrpsee::types::error::ErrorCode; use async_trait::async_trait; -use ethers::{ - core::types::Signature, - providers::{Middleware, Provider, Ws}, -}; +use ethers::{core::types::Signature, providers::Middleware}; use jsonrpsee::types::ErrorObjectOwned; use lib_didethresolver::types::XmtpAttribute; use thiserror::Error; From 66d59f3398cc6e0b0109eb9d3f6c327a4acf8890 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 14:17:48 -0500 Subject: [PATCH 13/18] fix debugging logic --- registry/src/lib.rs | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/registry/src/lib.rs b/registry/src/lib.rs index 0bd752a..a3f0587 100644 --- a/registry/src/lib.rs +++ b/registry/src/lib.rs @@ -38,20 +38,19 @@ where "Revoking attribute {:#?}", String::from_utf8_lossy(&attribute) ); - let res = self.registry.revoke_attribute_signed( - address, - signature.v.try_into()?, - signature.r.into(), - signature.s.into(), - attribute, - value.into(), - ); - - let res = res.send().await; - if let Err(ref e) = res { - println!("{}", e); - } - res?.await?; + let res = self + .registry + .revoke_attribute_signed( + address, + signature.v.try_into()?, + signature.r.into(), + signature.s.into(), + attribute, + value.into(), + ) + .send() + .await? + .await?; Ok(()) } From 275758c138bea2c3db4972ab45f806806481dd5b Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 14:17:48 -0500 Subject: [PATCH 14/18] fix debugging logic --- registry/src/lib.rs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/registry/src/lib.rs b/registry/src/lib.rs index 0bd752a..edae9e6 100644 --- a/registry/src/lib.rs +++ b/registry/src/lib.rs @@ -38,20 +38,18 @@ where "Revoking attribute {:#?}", String::from_utf8_lossy(&attribute) ); - let res = self.registry.revoke_attribute_signed( - address, - signature.v.try_into()?, - signature.r.into(), - signature.s.into(), - attribute, - value.into(), - ); - - let res = res.send().await; - if let Err(ref e) = res { - println!("{}", e); - } - res?.await?; + self.registry + .revoke_attribute_signed( + address, + signature.v.try_into()?, + signature.r.into(), + signature.s.into(), + attribute, + value.into(), + ) + .send() + .await? + .await?; Ok(()) } From 72d3ba7a7c22c65a5e9b425f1bf541f768d7ead8 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 16:04:35 -0500 Subject: [PATCH 15/18] re-run coverage From d6ba48bd56c789a4d74deac5bbaa5f02adb6fcab Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 16:14:43 -0500 Subject: [PATCH 16/18] change didethresolver branch to main --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a24e2ff..756e93c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ anyhow = "1.0" thiserror = "1.0" ethers = { version = "2", features = ["abigen"] } ctor = "0.2" -lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", package = "lib-didethresolver", branch = "insipx/revoke-installation" } +lib-didethresolver = { git = "https://github.com/xmtp/didethresolver", package = "lib-didethresolver", branch = "main" } gateway-types = { path = "./gateway-types" } rustc-hex = "2.1" hex = "0.4" From 4fc2bf540d0e03d63a8bfabc25bd92362229691a Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 25 Jan 2024 16:15:32 -0500 Subject: [PATCH 17/18] coverage verbosity to info --- .github/workflows/coverage.yml | 2 +- Cargo.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 60b458e..f777cb6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -16,7 +16,7 @@ jobs: - name: Install cargo-llvm-cov run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Generate code coverage - run: RUST_LOG=xps_gateway=trace,registry=trace,inbox=trace,messaging=trace,gateway_types=trace cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + run: RUST_LOG=xps_gateway=info,registry=info,inbox=info,messaging=info,gateway_types=info cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/Cargo.lock b/Cargo.lock index fa7781d..9f65520 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2054,7 +2054,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=insipx/revoke-installation#241527531ed65f9029f27dd7b2928c02297ade4d" +source = "git+https://github.com/xmtp/didethresolver?branch=main#4bf3d4b539b6090fdd46367d3a76863f3c449e7f" dependencies = [ "async-trait", "base64 0.21.7", From 1536bf5c94ef02d09827cb7fc4a2664172b03ccc Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Fri, 26 Jan 2024 16:51:35 -0500 Subject: [PATCH 18/18] re-add anvil to coverage --- .github/workflows/coverage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 55b0025..d47249e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,6 +7,12 @@ jobs: - uses: actions/checkout@v2 - name: Install Rust run: rustup toolchain install nightly --component llvm-tools-preview + - name: Install anvil + uses: baptiste0928/cargo-install@v2 + with: + crate: anvil + git: https://github.com/foundry-rs/foundry + commit: nightly - name: Install cargo-llvm-cov run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Generate code coverage