diff --git a/Cargo.lock b/Cargo.lock index 0ec1e39..232f4a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arrayvec" @@ -150,7 +150,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -172,7 +172,7 @@ checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130" [[package]] name = "byte-slice-cast" @@ -384,11 +384,10 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" dependencies = [ - "jobserver", "libc", ] @@ -409,7 +408,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -424,9 +423,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.0" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", "clap_derive", @@ -434,9 +433,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.0" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", @@ -453,7 +452,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -648,7 +647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1008,7 +1007,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.48", + "syn 2.0.50", "toml", "walkdir", ] @@ -1026,7 +1025,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1052,7 +1051,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn 2.0.48", + "syn 2.0.50", "tempfile", "thiserror", "tiny-keccak", @@ -1363,7 +1362,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1380,9 +1379,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" dependencies = [ "gloo-timers", "send_wrapper 0.4.0", @@ -1548,9 +1547,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -1800,15 +1799,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.68" @@ -1820,30 +1810,16 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" -dependencies = [ - "jsonrpsee-core 0.21.0", - "jsonrpsee-proc-macros 0.21.0", - "jsonrpsee-server 0.21.0", - "jsonrpsee-types 0.21.0", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a95f7cc23d5fab0cdeeaf6bad8c8f5e7a3aa7f0d211957ea78232b327ab27b0" +checksum = "16fcc9dd231e72d22993f1643d5f7f0db785737dbe3c3d7ca222916ab4280795" dependencies = [ "jsonrpsee-client-transport", - "jsonrpsee-core 0.22.0", + "jsonrpsee-core", "jsonrpsee-http-client", - "jsonrpsee-proc-macros 0.22.0", - "jsonrpsee-server 0.22.0", - "jsonrpsee-types 0.22.0", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tokio", @@ -1852,15 +1828,15 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1736cfa3845fd9f8f43751f2b8e0e83f7b6081e754502f7d63b6587692cc83" +checksum = "0476c96eb741b40d39dcb39d0124e3b9be9840ec77653c42a0996563ae2a53f7" dependencies = [ "futures-channel", "futures-util", "gloo-net", "http", - "jsonrpsee-core 0.22.0", + "jsonrpsee-core", "pin-project", "rustls-native-certs 0.7.0", "rustls-pki-types", @@ -1876,31 +1852,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" -dependencies = [ - "anyhow", - "async-trait", - "beef", - "futures-util", - "hyper", - "jsonrpsee-types 0.21.0", - "parking_lot", - "rand", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82030d038658974732103e623ba2e0abec03bbbe175b39c0a2fafbada60c5868" +checksum = "b974d8f6139efbe8425f32cb33302aba6d5e049556b5bfc067874e7a0da54a2e" dependencies = [ "anyhow", "async-lock", @@ -1909,7 +1863,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.22.0", + "jsonrpsee-types", "parking_lot", "pin-project", "rand", @@ -1925,15 +1879,15 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a06ef0de060005fddf772d54597bb6a8b0413da47dcffd304b0306147b9678" +checksum = "19dc795a277cff37f27173b3ca790d042afcc0372c34a7ca068d2e76de2cb6d1" dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core 0.22.0", - "jsonrpsee-types 0.22.0", + "jsonrpsee-core", + "jsonrpsee-types", "serde", "serde_json", "thiserror", @@ -1945,22 +1899,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" -dependencies = [ - "heck", - "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fc56131589f82e57805f7338b87023db4aafef813555708b159787e34ad6bc" +checksum = "68e79a7109506831bf0cbeaad08729cdf0e592300c00f626bccd6d479974221e" dependencies = [ "heck", "proc-macro-crate 3.1.0", @@ -1971,15 +1912,15 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7c6d1a2c58f6135810284a390d9f823d0f508db74cd914d8237802de80f98" +checksum = "344440ccd8492c1ca65f1391c5aa03f91189db38d602d189b9266a1a5c6a4d22" dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core 0.21.0", - "jsonrpsee-types 0.21.0", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "route-recognizer", "serde", @@ -1993,48 +1934,11 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-server" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85be77fe5b2a94589e3164fb780017f7aff7d646b49278c0d0346af16975c8e" -dependencies = [ - "futures-util", - "http", - "hyper", - "jsonrpsee-core 0.22.0", - "jsonrpsee-types 0.22.0", - "pin-project", - "route-recognizer", - "serde", - "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 = "jsonrpsee-types" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a48fdc1202eafc51c63e00406575e59493284ace8b8b61aa16f3a6db5d64f1a" +checksum = "b13dac43c1a9fc2648b37f306b0a5b0e29b2a6e1c36a33b95c1948da2494e9c5" dependencies = [ "anyhow", "beef", @@ -2045,25 +1949,25 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36eb0e312840c69af0e5c6624fe959864d2e8b80bec194d2e20a39839ceef31" +checksum = "30593c401de5940c0267a3c5e9c7eb76d8a1b80590d6ccaa59d910ea688b4d5e" dependencies = [ "jsonrpsee-client-transport", - "jsonrpsee-core 0.22.0", - "jsonrpsee-types 0.22.0", + "jsonrpsee-core", + "jsonrpsee-types", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ce25d70a8e4d3cc574bbc3cad0137c326ad64b194793d5e7bbdd3fa4504181" +checksum = "b1bbaaf4ce912654081d997ade417c3155727db106c617c0612e85f504c2f744" dependencies = [ "http", "jsonrpsee-client-transport", - "jsonrpsee-core 0.22.0", - "jsonrpsee-types 0.22.0", + "jsonrpsee-core", + "jsonrpsee-types", "url", ] @@ -2141,7 +2045,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=main#dd724ed9fcf18b464e57bcccfd44d8b6a7475dec" +source = "git+https://github.com/xmtp/didethresolver?branch=main#f5053c1f0c0e23d62755518898605e69745b5620" dependencies = [ "async-trait", "base64 0.21.7", @@ -2149,7 +2053,7 @@ dependencies = [ "chrono", "ethers", "hex", - "jsonrpsee 0.21.0", + "jsonrpsee", "log", "peg", "percent-encoding", @@ -2174,7 +2078,7 @@ dependencies = [ "ethers", "futures", "hex", - "jsonrpsee 0.22.0", + "jsonrpsee", "lib-didethresolver", "log", "messaging", @@ -2403,7 +2307,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2656,7 +2560,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2694,7 +2598,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2721,9 +2625,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "powerfmt" @@ -2750,7 +2654,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3049,16 +2953,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3145,7 +3050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] @@ -3157,7 +3062,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.2", "subtle", @@ -3183,7 +3088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" dependencies = [ "openssl-probe", - "rustls-pemfile 2.0.0", + "rustls-pemfile 2.1.0", "rustls-pki-types", "schannel", "security-framework", @@ -3200,9 +3105,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +checksum = "3c333bb734fcdedcea57de1602543590f545f127dc8b533324318fd492c5c70b" dependencies = [ "base64 0.21.7", "rustls-pki-types", @@ -3210,9 +3115,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" +checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" [[package]] name = "rustls-webpki" @@ -3220,7 +3125,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -3230,7 +3135,7 @@ version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", ] @@ -3243,9 +3148,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "salsa20" @@ -3322,7 +3227,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -3365,9 +3270,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -3386,29 +3291,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -3541,7 +3446,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3650,7 +3555,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3692,9 +3597,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" dependencies = [ "proc-macro2", "quote", @@ -3774,14 +3679,14 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -3867,7 +3772,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3942,7 +3847,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.4", + "toml_edit 0.22.6", ] [[package]] @@ -3962,7 +3867,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -3973,7 +3878,7 @@ checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -3984,20 +3889,20 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.4" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.2", ] [[package]] @@ -4047,7 +3952,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4163,9 +4068,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -4280,7 +4185,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-shared", ] @@ -4314,7 +4219,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4387,7 +4292,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -4405,7 +4310,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -4425,17 +4330,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" 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", + "windows_aarch64_gnullvm 0.52.3", + "windows_aarch64_msvc 0.52.3", + "windows_i686_gnu 0.52.3", + "windows_i686_msvc 0.52.3", + "windows_x86_64_gnu 0.52.3", + "windows_x86_64_gnullvm 0.52.3", + "windows_x86_64_msvc 0.52.3", ] [[package]] @@ -4446,9 +4351,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" [[package]] name = "windows_aarch64_msvc" @@ -4458,9 +4363,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" [[package]] name = "windows_i686_gnu" @@ -4470,9 +4375,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" [[package]] name = "windows_i686_msvc" @@ -4482,9 +4387,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" [[package]] name = "windows_x86_64_gnu" @@ -4494,9 +4399,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" [[package]] name = "windows_x86_64_gnullvm" @@ -4506,9 +4411,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" [[package]] name = "windows_x86_64_msvc" @@ -4518,15 +4423,24 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "winnow" -version = "0.5.39" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29" +checksum = "7a4191c47f15cc3ec71fcb4913cb83d58def65dd3787610213c649283b5ce178" dependencies = [ "memchr", ] @@ -4584,7 +4498,7 @@ name = "xps-types" version = "0.1.0" dependencies = [ "ethers", - "jsonrpsee 0.22.0", + "jsonrpsee", "lib-didethresolver", "serde", "thiserror", diff --git a/lib-xps/src/rpc/api.rs b/lib-xps/src/rpc/api.rs index 711a05e..ad51643 100644 --- a/lib-xps/src/rpc/api.rs +++ b/lib-xps/src/rpc/api.rs @@ -6,7 +6,7 @@ use jsonrpsee::{proc_macros::rpc, types::ErrorObjectOwned}; use lib_didethresolver::types::XmtpAttribute; use xps_types::{ - GrantInstallationResult, KeyPackageResult, Message, SendMessageResult, WalletBalance, + GrantInstallationResult, IdentityResult, Message, SendMessageResult, WalletBalance, }; /// XPS JSON-RPC Interface Methods @@ -346,21 +346,21 @@ pub trait Xps { /// #### Request: /// /// - **Method:** `POST` - /// - **URL:** `/rpc/v1/fetchKeyPackages` + /// - **URL:** `/rpc/v1/getIdentityUpdates` /// - **Headers:** /// - `Content-Type: application/json` /// - **Body:** /// - **JSON Object:** /// - `jsonrpc`: `"2.0"` - /// - `method`: `"fetchKeyPackages"` + /// - `method`: `"getIdentityUpdates"` /// - `params`: Array (optional parameters as required) /// - `id`: Request identifier (integer or string) /// - /// ### Endpoint: `fetchKeyPackages` + /// ### Endpoint: `getIdentityUpdates` /// /// #### Description /// - /// The `fetchKeyPackages` endpoint is responsible for retrieving the contact bundle for the XMTP device installations. The request must be made to a valid did with an XMTP profile. + /// The `getIdentityUpdates` endpoint is responsible for retrieving the contact bundle for the XMTP device installations. The request must be made to a valid did with an XMTP profile. /// /// #### Request /// @@ -375,7 +375,7 @@ pub trait Xps { /// ```json /// { /// "jsonrpc": "2.0", - /// "method": "fetchKeyPackages", + /// "method": "getIdentityUpdates", /// "params": { /// "did": "12345" /// }, @@ -426,8 +426,8 @@ pub trait Xps { /// "id": 1 /// } /// ``` - #[method(name = "fetchKeyPackages")] - async fn fetch_key_packages(&self, did: String) -> Result; + #[method(name = "getIdentityUpdates")] + async fn get_identity_updates(&self, did: String, start_time_ns: i64) -> Result; /// # Documentation for JSON RPC Endpoint: `status` diff --git a/lib-xps/src/rpc/methods.rs b/lib-xps/src/rpc/methods.rs index a34d64b..a3a1cf6 100644 --- a/lib-xps/src/rpc/methods.rs +++ b/lib-xps/src/rpc/methods.rs @@ -16,7 +16,7 @@ use messaging::MessagingOperations; use std::sync::Arc; use thiserror::Error; use xps_types::{ - GrantInstallationResult, KeyPackageResult, Message, SendMessageResult, Unit, WalletBalance, + GrantInstallationResult, IdentityResult, Message, SendMessageResult, Unit, WalletBalance, }; use messaging::error::MessagingOperationError; @@ -136,11 +136,11 @@ impl XpsServer for XpsMethods

{ }) } - async fn fetch_key_packages(&self, did: String) -> Result { - log::debug!("xps_fetchKeyPackages called"); + async fn get_identity_updates(&self, did: String, start_time_ns: i64) -> Result { + log::debug!("xps_getIdentityUpdates called"); let result = self .contact_operations - .fetch_key_packages(did) + .get_identity_updates(did, start_time_ns) .await .map_err(RpcError::from)?; Ok(result) diff --git a/lib-xps/tests/integration_test.rs b/lib-xps/tests/integration_test.rs index 7716293..37fa207 100644 --- a/lib-xps/tests/integration_test.rs +++ b/lib-xps/tests/integration_test.rs @@ -426,7 +426,7 @@ async fn test_balance() -> Result<(), Error> { } #[tokio::test] -async fn test_fetch_key_packages() -> Result<(), Error> { +async fn test_get_identity_updates() -> Result<(), Error> { with_xps_client(None, None, |client, context, _, anvil| async move { let me: LocalWallet = anvil.keys()[3].clone().into(); let name = *b"xmtp/installation/hex "; @@ -437,13 +437,13 @@ async fn test_fetch_key_packages() -> Result<(), Error> { set_attribute(name, value.to_vec(), &me, &context.registry).await?; let res = client - .fetch_key_packages(format!("0x{}", hex::encode(me.address()))) + .get_identity_updates(format!("0x{}", hex::encode(me.address())), 0) .await?; assert_eq!(res.status, Status::Success); assert_eq!(&res.message, "Key packages retrieved"); assert_eq!( - res.installation, + res.installations, vec![ hex::decode(b"000000000000000000000000000000000000000000000000000000000000000000") .unwrap(), @@ -457,7 +457,7 @@ async fn test_fetch_key_packages() -> Result<(), Error> { } #[tokio::test] -async fn test_fetch_key_packages_revoke() -> Result<(), Error> { +async fn test_get_identity_updates_revoke() -> Result<(), Error> { with_xps_client(None, None, |client, context, _, anvil| async move { let me: LocalWallet = anvil.keys()[3].clone().into(); let name = *b"xmtp/installation/hex "; @@ -481,13 +481,13 @@ async fn test_fetch_key_packages_revoke() -> Result<(), Error> { .await?; let res = client - .fetch_key_packages(format!("0x{}", hex::encode(me.address()))) + .get_identity_updates(format!("0x{}", hex::encode(me.address())), 0) .await?; assert_eq!(res.status, Status::Success); assert_eq!(&res.message, "Key packages retrieved"); assert_eq!( - res.installation, + res.installations, vec![hex::decode( b"000000000000000000000000000000000000000000000000000000000000000000" ) @@ -500,7 +500,7 @@ async fn test_fetch_key_packages_revoke() -> Result<(), Error> { } #[tokio::test] -async fn test_fetch_key_packages_client() -> Result<(), Error> { +async fn test_get_identity_updates_client() -> Result<(), Error> { with_xps_client(None, None, |client, context, _, anvil| async move { let me: LocalWallet = anvil.keys()[3].clone().into(); let attribute = XmtpAttribute { @@ -524,13 +524,13 @@ async fn test_fetch_key_packages_client() -> Result<(), Error> { ) .await?; let res = client - .fetch_key_packages(format!("0x{}", hex::encode(me.address()))) + .get_identity_updates(format!("0x{}", hex::encode(me.address())), 0) .await?; assert_eq!(res.status, Status::Success); assert_eq!(&res.message, "Key packages retrieved"); assert_eq!( - res.installation, + res.installations, vec![hex::decode( b"000000000000000000000000000000000000000000000000000000000000000000" ) @@ -563,7 +563,7 @@ async fn test_did_deactivation() -> Result<(), Error> { .await?; let res = client - .fetch_key_packages(format!("0x{}", hex::encode(me.address()))) + .get_identity_updates(format!("0x{}", hex::encode(me.address())), 0) .await .unwrap_err(); diff --git a/registry/src/lib.rs b/registry/src/lib.rs index 5f0ffb6..88897a2 100644 --- a/registry/src/lib.rs +++ b/registry/src/lib.rs @@ -11,10 +11,10 @@ use ethers::{ }; use lib_didethresolver::{ did_registry::DIDRegistry, - types::{VerificationMethodProperties, XmtpAttribute}, + types::XmtpAttribute, Resolver, }; -use xps_types::{GrantInstallationResult, KeyPackageResult, Status}; +use xps_types::{GrantInstallationResult, IdentityResult, InstallationId, Status}; pub struct ContactOperations { registry: DIDRegistry, @@ -41,10 +41,11 @@ where } /// Fetches key packages for a given DID using [`Resolver::resolve_did`] - pub async fn fetch_key_packages( + pub async fn get_identity_updates( &self, did: String, - ) -> Result> { + start_time_ns: i64 + ) -> Result> { let address = Address::from_str(&did)?; let resolution = self @@ -59,7 +60,7 @@ where let document = resolution.document; - let properties = document + let installations = document .verification_method .into_iter() .filter(|method| { @@ -72,16 +73,27 @@ where .id .contains_query("meta".into(), "installation".into()) }) - .filter_map(|method| method.verification_properties) - .collect::>(); + .filter_map(|method| { + Some(InstallationId { + id: method.verification_properties?.try_into().ok()?, + timestamp_ns: method + .id + .get_query_value("timestamp")? + .parse::() + .ok()?, + }) + }) + .collect::>(); - Ok(KeyPackageResult { + Ok(IdentityResult { status: Status::Success, - message: "Key packages retrieved".to_string(), - installation: properties + message: "Identities retrieved".to_string(), + installations: installations .into_iter() - .map(TryFrom::try_from) - .collect::>()?, + // the only way an i64 cannot fit into a u64 if it's negative, so we can safely set + // to 0 + .filter(|i| i.timestamp_ns > start_time_ns.try_into().unwrap_or(0)) + .collect(), }) } diff --git a/xps-types/src/lib.rs b/xps-types/src/lib.rs index d78fc8a..3a558fd 100644 --- a/xps-types/src/lib.rs +++ b/xps-types/src/lib.rs @@ -101,13 +101,22 @@ pub struct SendMessageResult { } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -pub struct KeyPackageResult { +pub struct IdentityResult { /// Status of the operation pub status: Status, /// A message relating to the operation pub message: String, /// A list of key packages - pub installation: Vec, + pub installations: Vec, +} + +/// A single InstallationID +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] +pub struct InstallationId { + // installation id + pub id: Bytes, + /// Timestamp in nanoseconds of the block which the operation took place + pub timestamp_ns: u64, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]