diff --git a/Cargo.lock b/Cargo.lock index 31dca23e..913ebbe7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,6 +71,224 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-json-abi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c5aecfe87e06da0e760840974c6e3cc19d4247be17a3172825fbbe759c8e60" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4b6fb2b432ff223d513db7f908937f63c252bee0af9b82bfd25b0a5dd1eb0d8" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-providers" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-network", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-trace-types", + "alloy-rpc-types", + "alloy-transport", + "alloy-transport-http", + "async-trait", + "auto_impl", + "reqwest", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-trace-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b0b5ab0cb07c21adf9d72e988b34e8200ce648c2bba8d009183bb1c50fb1216" +dependencies = [ + "const-hex", + "dunce", + "heck", + "indexmap 2.1.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.38", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd124ec0a456ec5e9dcca5b6e8b011bc723cc410d4d9a66bf032770feaeef4b" +dependencies = [ + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c08f62ded7ce03513bfb60ef5cad4fff5d4f67eac6feb4df80426b7b9ffb06e" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-json-rpc", + "base64 0.21.5", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=e6f98e1#e6f98e15efac4bb2c598570580296925cc590dd3" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "url", +] + [[package]] name = "analytics" version = "0.1.0" @@ -110,6 +328,136 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -161,6 +509,17 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -551,7 +910,7 @@ dependencies = [ "aws-smithy-http", "aws-smithy-types", "http 0.2.9", - "rustc_version", + "rustc_version 0.4.0", "tracing", ] @@ -674,6 +1033,21 @@ 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" @@ -689,6 +1063,18 @@ dependencies = [ "serde", ] +[[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" @@ -738,7 +1124,7 @@ dependencies = [ "git2", "glob", "pretty_assertions", - "rustc_version", + "rustc_version 0.4.0", "serde_json", "zstd", ] @@ -751,7 +1137,7 @@ checksum = "8209c0c2b13da7e5f7202e591b6d41b46c8f0e78d031dedf5cff71cc8c6ec773" dependencies = [ "chrono", "derive_more", - "semver", + "semver 1.0.20", "serde", ] @@ -782,6 +1168,12 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + [[package]] name = "byteorder" version = "1.5.0" @@ -793,6 +1185,9 @@ name = "bytes" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] [[package]] name = "bytes-utils" @@ -830,7 +1225,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -930,6 +1325,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-hex" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -1008,7 +1416,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" dependencies = [ - "rustc_version", + "rustc_version 0.4.0", ] [[package]] @@ -1103,7 +1511,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle", "zeroize", ] @@ -1185,9 +1593,20 @@ dependencies = [ name = "deranged" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "powerfmt", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -1199,7 +1618,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -1255,6 +1674,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "ecdsa" version = "0.16.8" @@ -1409,6 +1834,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "ff" version = "0.13.0" @@ -1431,6 +1867,18 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + [[package]] name = "flate2" version = "1.0.28" @@ -1492,6 +1940,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "future" version = "0.1.0" @@ -1801,6 +2255,15 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" @@ -1993,6 +2456,26 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" +[[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-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 = "indexmap" version = "1.9.3" @@ -2067,6 +2550,15 @@ dependencies = [ "serde", ] +[[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" @@ -2076,6 +2568,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -2137,6 +2638,16 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -2391,7 +2902,7 @@ dependencies = [ "hkdf", "hyper", "ipnet", - "itertools", + "itertools 0.11.0", "jsonwebtoken", "k256", "lazy_static", @@ -2690,6 +3201,32 @@ 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", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking" version = "2.2.0" @@ -2778,6 +3315,17 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +[[package]] +name = "pest" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "pin-project" version = "1.1.3" @@ -2908,6 +3456,27 @@ dependencies = [ "yansi", ] +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2956,12 +3525,38 @@ dependencies = [ "thiserror", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "protobuf" version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" version = "1.0.33" @@ -2971,6 +3566,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.7.3" @@ -3042,6 +3643,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "redis" version = "0.23.3" @@ -3118,7 +3728,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "relay_client" version = "0.1.0" -source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.24.0#d2a772f2a23e6ed8219d2f16af7f88878097388a" +source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.26.0#7a205511a98011e4fc0cffb7a3652d435b191cd7" dependencies = [ "chrono", "futures-channel", @@ -3141,8 +3751,16 @@ dependencies = [ [[package]] name = "relay_rpc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.24.0#d2a772f2a23e6ed8219d2f16af7f88878097388a" -dependencies = [ +source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.26.0#7a205511a98011e4fc0cffb7a3652d435b191cd7" +dependencies = [ + "alloy-json-abi", + "alloy-json-rpc", + "alloy-primitives", + "alloy-providers", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", "bs58", "chrono", "data-encoding", @@ -3153,12 +3771,14 @@ dependencies = [ "once_cell", "rand 0.7.3", "regex", + "reqwest", "serde", "serde-aux", "serde_json", "sha2 0.10.8", "sha3", "thiserror", + "url", ] [[package]] @@ -3244,6 +3864,16 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rmp" version = "0.8.12" @@ -3286,6 +3916,36 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -3298,13 +3958,28 @@ 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.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.20", ] [[package]] @@ -3369,6 +4044,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "ryu" version = "1.0.15" @@ -3437,6 +4124,15 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.20" @@ -3446,6 +4142,15 @@ dependencies = [ "serde", ] +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "seq-macro" version = "0.3.5" @@ -3601,6 +4306,16 @@ dependencies = [ "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" +dependencies = [ + "cc", + "cfg-if", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -3713,7 +4428,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ - "itertools", + "itertools 0.11.0", "nom", "unicode_categories", ] @@ -3969,6 +4684,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63bef2e2c735acbc06874eca3a8506f02a3c4700e6e748afc92cc2e4220e8a03" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -4266,6 +4993,23 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[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 = "tower" version = "0.4.13" @@ -4420,6 +5164,30 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[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.13" @@ -4575,6 +5343,15 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "waker-fn" version = "1.1.1" @@ -4795,6 +5572,15 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "winnow" +version = "0.5.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -4827,6 +5613,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "x25519-dalek" version = "2.0.0" diff --git a/Cargo.toml b/Cargo.toml index 6bc465c2..6859ab39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,8 +75,8 @@ futures = "0.3.26" futures-util = "0.3" dashmap = "5.4.0" -relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.24.0", features = ["cacao"] } -relay_client = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.24.0" } +relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.0", features = ["cacao"] } +relay_client = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.26.0" } x25519-dalek = { version = "2.0.0", features = ["static_secrets"] } hkdf = "0.12.3" sha2 = "0.10.6" diff --git a/deny.toml b/deny.toml index a295713a..dd791995 100644 --- a/deny.toml +++ b/deny.toml @@ -7,7 +7,8 @@ allow = [ "Unlicense", "BSD-3-Clause", "0BSD", - "ISC" + "ISC", + "CC0-1.0" ] exceptions = [{ name = "unicode-ident", allow = ["Unicode-DFS-2016"] }] diff --git a/src/auth.rs b/src/auth.rs index ee2c7164..04c0ee08 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -7,6 +7,7 @@ use { types::{AccountId, AccountIdParseError}, }, registry::storage::{redis::Redis, KeyValueStorage}, + BlockchainApiProvider, }, base64::{DecodeError, Engine}, chrono::{DateTime, Duration as CDuration, Utc}, @@ -665,6 +666,7 @@ pub async fn verify_identity( ksu: &str, sub: &str, redis: Option<&Arc>, + provider: &BlockchainApiProvider, metrics: Option<&Metrics>, ) -> Result { let mut url = Url::parse(ksu)?.join(KEYS_SERVER_IDENTITY_ENDPOINT)?; @@ -680,7 +682,10 @@ pub async fn verify_identity( let account = AccountId::from_did_pkh(&cacao.p.iss).map_err(AuthError::CacaoIssNotDidPkh)?; - let always_true = cacao.verify().map_err(AuthError::CacaoValidation)?; + let always_true = cacao + .verify(provider) + .await + .map_err(AuthError::CacaoValidation)?; assert!(always_true); // TODO verify `cacao.p.aud`. Blocked by at least https://github.com/WalletConnect/walletconnect-utils/issues/128 diff --git a/src/lib.rs b/src/lib.rs index cdba0da2..49e2185e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,9 @@ use { aws_sdk_s3::{config::Region, Client as S3Client}, error::NotifyServerError, rand::prelude::*, - relay_rpc::auth::ed25519_dalek::Keypair, + relay_rpc::auth::{ + cacao::signature::eip1271::blockchain_api::BlockchainApiProvider, ed25519_dalek::Keypair, + }, sqlx::postgres::PgPoolOptions, std::sync::Arc, tokio::{select, sync::broadcast}, @@ -116,6 +118,7 @@ pub async fn bootstrap( redis, registry, config.clock, + BlockchainApiProvider::new(config.project_id), )?); let private_http_server = diff --git a/src/services/websocket_server/handlers/notify_delete.rs b/src/services/websocket_server/handlers/notify_delete.rs index 1d8252bf..2f0b4aea 100644 --- a/src/services/websocket_server/handlers/notify_delete.rs +++ b/src/services/websocket_server/handlers/notify_delete.rs @@ -115,6 +115,7 @@ pub async fn handle( &request_auth.ksu, &request_auth.sub, state.redis.as_ref(), + &state.provider, state.metrics.as_ref(), ) .await diff --git a/src/services/websocket_server/handlers/notify_get_notifications.rs b/src/services/websocket_server/handlers/notify_get_notifications.rs index 64925084..e6034932 100644 --- a/src/services/websocket_server/handlers/notify_get_notifications.rs +++ b/src/services/websocket_server/handlers/notify_get_notifications.rs @@ -109,6 +109,7 @@ pub async fn handle(msg: PublishedMessage, state: &AppState) -> Result<(), Relay &request_auth.ksu, &request_auth.sub, state.redis.as_ref(), + &state.provider, state.metrics.as_ref(), ) .await diff --git a/src/services/websocket_server/handlers/notify_subscribe.rs b/src/services/websocket_server/handlers/notify_subscribe.rs index 2a597f29..520aefaf 100644 --- a/src/services/websocket_server/handlers/notify_subscribe.rs +++ b/src/services/websocket_server/handlers/notify_subscribe.rs @@ -130,6 +130,7 @@ pub async fn handle(msg: PublishedMessage, state: &AppState) -> Result<(), Relay &request_auth.ksu, &request_auth.sub, state.redis.as_ref(), + &state.provider, state.metrics.as_ref(), ) .await diff --git a/src/services/websocket_server/handlers/notify_update.rs b/src/services/websocket_server/handlers/notify_update.rs index 979531c0..904d7164 100644 --- a/src/services/websocket_server/handlers/notify_update.rs +++ b/src/services/websocket_server/handlers/notify_update.rs @@ -108,6 +108,7 @@ pub async fn handle(msg: PublishedMessage, state: &AppState) -> Result<(), Relay &request_auth.ksu, &request_auth.sub, state.redis.as_ref(), + &state.provider, state.metrics.as_ref(), ) .await diff --git a/src/services/websocket_server/handlers/notify_watch_subscriptions.rs b/src/services/websocket_server/handlers/notify_watch_subscriptions.rs index 0f62bef1..ebfcb758 100644 --- a/src/services/websocket_server/handlers/notify_watch_subscriptions.rs +++ b/src/services/websocket_server/handlers/notify_watch_subscriptions.rs @@ -103,6 +103,7 @@ pub async fn handle(msg: PublishedMessage, state: &AppState) -> Result<(), Relay &request_auth.ksu, &request_auth.sub, state.redis.as_ref(), + &state.provider, state.metrics.as_ref(), ) .await diff --git a/src/state.rs b/src/state.rs index b7339fef..1e38d227 100644 --- a/src/state.rs +++ b/src/state.rs @@ -9,7 +9,9 @@ use { Configuration, }, build_info::BuildInfo, - relay_rpc::auth::ed25519_dalek::Keypair, + relay_rpc::auth::{ + cacao::signature::eip1271::blockchain_api::BlockchainApiProvider, ed25519_dalek::Keypair, + }, serde::{Deserialize, Serialize}, sqlx::PgPool, std::{fmt, sync::Arc}, @@ -29,6 +31,7 @@ pub struct AppState { pub registry: Arc, pub notify_keys: NotifyKeys, pub clock: Clock, + pub provider: BlockchainApiProvider, } build_info::build_info!(fn build_info); @@ -47,6 +50,7 @@ impl AppState { redis: Option>, registry: Arc, clock: Clock, + provider: BlockchainApiProvider, ) -> Result { let build_info: &BuildInfo = build_info(); @@ -65,6 +69,7 @@ impl AppState { registry, notify_keys, clock, + provider, }) } diff --git a/tests/deployment.rs b/tests/deployment.rs index 847cc659..cd5df56e 100644 --- a/tests/deployment.rs +++ b/tests/deployment.rs @@ -1,7 +1,7 @@ use { crate::utils::{ - encode_auth, generate_account, verify_jwt, UnregisterIdentityRequestAuth, JWT_LEEWAY, - RELAY_MESSAGE_DELIVERY_TIMEOUT, + encode_auth, generate_account, verify_jwt, MockGetRpcUrl, UnregisterIdentityRequestAuth, + JWT_LEEWAY, RELAY_MESSAGE_DELIVERY_TIMEOUT, }, base64::Engine, chacha20poly1305::{ @@ -50,7 +50,7 @@ use { rand::{rngs::StdRng, SeedableRng}, relay_rpc::{ auth::{ - cacao::{self, signature::Eip191}, + cacao::{self, signature::eip191::eip191_bytes}, ed25519_dalek::Keypair, }, domain::{DecodedClientId, ProjectId}, @@ -411,14 +411,14 @@ async fn run_test(statement: String, watch_subscriptions_all_domains: bool) { }, }; let (signature, recovery): (k256::ecdsa::Signature, _) = account_signing_key - .sign_digest_recoverable(Keccak256::new_with_prefix( - Eip191.eip191_bytes(&cacao.siwe_message().unwrap()), - )) + .sign_digest_recoverable(Keccak256::new_with_prefix(eip191_bytes( + &cacao.siwe_message().unwrap(), + ))) .unwrap(); let cacao_signature = [&signature.to_bytes()[..], &[recovery.to_byte()]].concat(); cacao.s.t = "eip191".to_owned(); cacao.s.s = hex::encode(cacao_signature); - cacao.verify().unwrap(); + cacao.verify(&MockGetRpcUrl).await.unwrap(); let response = reqwest::Client::builder() .build() diff --git a/tests/integration.rs b/tests/integration.rs index 3330dd1d..ff14be83 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -105,7 +105,7 @@ use { cacao::{ self, header::EIP4361, - signature::{Eip191, EIP191}, + signature::eip191::{eip191_bytes, EIP191}, Cacao, }, ed25519_dalek::Keypair, @@ -139,7 +139,7 @@ use { }, tracing_subscriber::fmt::format::FmtSpan, url::Url, - utils::generate_account, + utils::{generate_account, MockGetRpcUrl}, uuid::Uuid, wiremock::{ http::Method, @@ -3616,7 +3616,7 @@ fn generate_identity_key() -> (SigningKey, DecodedClientId) { (signing_key, client_id) } -fn sign_cacao( +async fn sign_cacao( app_domain: &DidWeb, account: &AccountId, statement: String, @@ -3647,14 +3647,14 @@ fn sign_cacao( }, }; let (signature, recovery): (k256::ecdsa::Signature, _) = account_signing_key - .sign_digest_recoverable(Keccak256::new_with_prefix( - Eip191.eip191_bytes(&cacao.siwe_message().unwrap()), - )) + .sign_digest_recoverable(Keccak256::new_with_prefix(eip191_bytes( + &cacao.siwe_message().unwrap(), + ))) .unwrap(); let cacao_signature = [&signature.to_bytes()[..], &[recovery.to_byte()]].concat(); cacao.s.t = EIP191.to_owned(); cacao.s.s = hex::encode(cacao_signature); - cacao.verify().unwrap(); + cacao.verify(&MockGetRpcUrl).await.unwrap(); cacao } @@ -3750,7 +3750,8 @@ async fn update_subscription(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -3881,7 +3882,8 @@ async fn sends_noop(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -3998,7 +4000,8 @@ async fn delete_subscription(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -4190,7 +4193,8 @@ async fn all_domains_works(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -4338,7 +4342,8 @@ async fn this_domain_only(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -4460,7 +4465,8 @@ async fn works_with_staging_keys_server(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, }) .send() .await @@ -4533,7 +4539,8 @@ async fn setup_project_and_watch( identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -6394,7 +6401,8 @@ async fn delete_and_resubscribe(notify_server: &NotifyServerContext) { identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -6646,7 +6654,8 @@ async fn watch_subscriptions_multiple_clients_mjv_v0(notify_server: &NotifyServe identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -6674,7 +6683,8 @@ async fn watch_subscriptions_multiple_clients_mjv_v0(notify_server: &NotifyServe identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -6844,7 +6854,8 @@ async fn watch_subscriptions_multiple_clients_mjv_v1(notify_server: &NotifyServe identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -6872,7 +6883,8 @@ async fn watch_subscriptions_multiple_clients_mjv_v1(notify_server: &NotifyServe identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7160,7 +7172,8 @@ async fn same_address_different_chain_modify_subscription(notify_server: &Notify identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7180,7 +7193,8 @@ async fn same_address_different_chain_modify_subscription(notify_server: &Notify identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7287,7 +7301,8 @@ async fn same_address_different_chain_watch_subscriptions(notify_server: &Notify identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7307,7 +7322,8 @@ async fn same_address_different_chain_watch_subscriptions(notify_server: &Notify identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7452,7 +7468,8 @@ async fn watch_subscriptions_response_chain_agnostic(notify_server: &NotifyServe identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7472,7 +7489,8 @@ async fn watch_subscriptions_response_chain_agnostic(notify_server: &NotifyServe identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7556,7 +7574,8 @@ async fn no_watcher_gives_only_chains_for_subscription(notify_server: &NotifySer identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7576,7 +7595,8 @@ async fn no_watcher_gives_only_chains_for_subscription(notify_server: &NotifySer identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7652,7 +7672,8 @@ async fn subscribe_response_chain_agnostic(notify_server: &NotifyServerContext) identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7672,7 +7693,8 @@ async fn subscribe_response_chain_agnostic(notify_server: &NotifyServerContext) identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7778,7 +7800,8 @@ async fn update_response_chain_agnostic(notify_server: &NotifyServerContext) { identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7798,7 +7821,8 @@ async fn update_response_chain_agnostic(notify_server: &NotifyServerContext) { identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7940,7 +7964,8 @@ async fn delete_response_chain_agnostic(notify_server: &NotifyServerContext) { identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -7960,7 +7985,8 @@ async fn delete_response_chain_agnostic(notify_server: &NotifyServerContext) { identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -8192,7 +8218,8 @@ async fn no_watcher_returns_only_app_subscriptions(notify_server: &NotifyServerC identity_public_key.clone(), identity_key_details.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -8274,7 +8301,8 @@ async fn different_account_subscribe_results_one_subscription(notify_server: &No identity_public_key1.clone(), identity_key_details1.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; @@ -8294,7 +8322,8 @@ async fn different_account_subscribe_results_one_subscription(notify_server: &No identity_public_key2.clone(), identity_key_details2.keys_server_url.to_string(), &account_signing_key, - ), + ) + .await, ) .await; diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index 4f9cd019..af8ec142 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -14,7 +14,7 @@ use { rand_core::SeedableRng, relay_client::http::Client, relay_rpc::{ - auth::ed25519_dalek::Keypair, + auth::{cacao::signature::eip1271::get_rpc_url::GetRpcUrl, ed25519_dalek::Keypair}, domain::{ProjectId, Topic}, jwt::{JwtHeader, JWT_HEADER_ALG, JWT_HEADER_TYP}, rpc::SubscriptionData, @@ -247,3 +247,10 @@ impl GetSharedClaims for UnregisterIdentityRequestAuth { &self.shared_claims } } + +pub struct MockGetRpcUrl; +impl GetRpcUrl for MockGetRpcUrl { + fn get_rpc_url(&self, _: String) -> Option { + None + } +}