diff --git a/Cargo.lock b/Cargo.lock index 558dfa58..ef6274cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aes" version = "0.8.4" @@ -89,9 +95,9 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -101,9 +107,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -171,6 +177,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-native-tls" version = "0.5.0" @@ -185,13 +202,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -232,7 +249,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -253,8 +270,8 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -266,7 +283,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tower", "tower-layer", @@ -283,7 +300,7 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -311,7 +328,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -433,8 +450,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "arrayvec 0.7.6", + "constant_time_eq 0.3.1", ] [[package]] @@ -455,20 +472,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bls12_381" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" -dependencies = [ - "digest 0.9.0", - "ff 0.12.1", - "group 0.12.1", - "pairing 0.22.0", - "rand_core", - "subtle", -] - [[package]] name = "bs58" version = "0.5.1" @@ -499,9 +502,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -529,9 +532,9 @@ dependencies = [ [[package]] name = "cached" -version = "0.46.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c8c50262271cdf5abc979a5f76515c234e764fa025d1ba4862c0f0bcda0e95" +checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" dependencies = [ "ahash", "hashbrown 0.14.5", @@ -542,50 +545,46 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "candid" -version = "0.9.11" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c1ce01d8089ee5b49ba20d3a9da15a28bba64c35cdff2aa256d37e319625d" +checksum = "6c30ee7f886f296b6422c0ff017e89dd4f831521dfdcc76f3f71aae1ce817222" dependencies = [ "anyhow", "binread", "byteorder", "candid_derive", - "codespan-reporting", - "crc32fast", - "data-encoding", "hex", + "ic_principal", "leb128", "num-bigint", "num-traits", - "num_enum 0.6.1", "paste", "pretty", "serde", "serde_bytes", - "sha2 0.10.8", "stacker", "thiserror", ] [[package]] name = "candid_derive" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201ea498d901add0822653ac94cb0f8a92f9b1758a5273f4dafbb6673c9a5020" +checksum = "3de398570c386726e7a59d9887b68763c481477f9a043fb998a2e09d428df1a9" dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -613,13 +612,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.2" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47de7e88bbbd467951ae7f5a6f34f70d1b4d9cfce53d5fd70f74ebe118b3db56" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -630,8 +629,8 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfdkim" -version = "0.3.0" -source = "git+https://github.com/SoraSuegami/dkim.git#93829027f03a7442392a37b4635471d8b7f49e6b" +version = "0.3.3" +source = "git+https://github.com/zkemail/dkim.git#3b1cfd75e2afad12fbc1e8ece50e93e51415118b" dependencies = [ "base64 0.21.7", "chrono", @@ -668,11 +667,11 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "charset" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" +checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "encoding_rs", ] @@ -707,16 +706,6 @@ dependencies = [ "inout", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "coins-bip32" version = "0.8.7" @@ -838,9 +827,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -854,15 +843,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -995,7 +984,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -1045,7 +1034,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -1125,9 +1114,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecdsa" @@ -1200,9 +1189,9 @@ dependencies = [ "base16ct", "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array", - "group 0.13.0", + "group", "pem-rfc7468", "pkcs8", "rand_core", @@ -1223,9 +1212,9 @@ dependencies = [ [[package]] name = "email_address" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1019fa28f600f5b581b7a603d515c3f1635da041ca211b5055804788673abfe" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" [[package]] name = "ena" @@ -1435,10 +1424,10 @@ dependencies = [ "proc-macro2", "quote", "regex", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "syn 2.0.71", + "syn 2.0.77", "toml", "walkdir", ] @@ -1456,7 +1445,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -1465,7 +1454,7 @@ version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bytes", "cargo_metadata", "chrono", @@ -1474,15 +1463,15 @@ dependencies = [ "ethabi", "generic-array", "k256", - "num_enum 0.7.2", + "num_enum", "once_cell", "open-fastrlp", "rand", "rlp", "serde", "serde_json", - "strum 0.26.3", - "syn 2.0.71", + "strum", + "syn 2.0.77", "tempfile", "thiserror", "tiny-keccak", @@ -1497,7 +1486,7 @@ checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" dependencies = [ "chrono", "ethers-core", - "reqwest", + "reqwest 0.11.27", "semver 1.0.23", "serde", "serde_json", @@ -1522,7 +1511,7 @@ dependencies = [ "futures-locks", "futures-util", "instant", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "thiserror", @@ -1554,7 +1543,7 @@ dependencies = [ "jsonwebtoken", "once_cell", "pin-project", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "thiserror", @@ -1659,12 +1648,13 @@ dependencies = [ [[package]] name = "fancy-regex" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex", + "regex-automata", + "regex-syntax", ] [[package]] @@ -1678,19 +1668,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "ff" -version = "0.12.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core", - "subtle", -] +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" @@ -1739,12 +1719,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1798,21 +1778,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "function_name" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ab577a896d09940b5fe12ec5ae71f9d8211fff62c919c03a3750a9901e98a7" -dependencies = [ - "function_name-proc-macro", -] - -[[package]] -name = "function_name-proc-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673464e1e314dd67a0fd9544abc99e8eb28d0c7e3b69b033bcff9b2d00b87333" - [[package]] name = "funty" version = "2.0.0" @@ -1896,7 +1861,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -2022,7 +1987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cdf7b487d864c2939b23902291a5041bc4a84418268f25fda1c8d4e15ad8fa" dependencies = [ "graphql_query_derive", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", ] @@ -2055,24 +2020,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core", "subtle", ] @@ -2089,7 +2043,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2104,40 +2058,19 @@ checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "halo2curves" -version = "0.4.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git?rev=81a078254518a7a4b7c69fab120621deaace9389#81a078254518a7a4b7c69fab120621deaace9389" -dependencies = [ - "blake2b_simd", - "ff 0.13.0", - "group 0.13.0", - "lazy_static", - "maybe-rayon", - "num-bigint", - "num-traits", - "pairing 0.23.0", - "pasta_curves", - "paste", - "rand", - "rand_core", - "static_assertions", - "subtle", -] - -[[package]] -name = "halo2curves" -version = "0.6.1" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git#d34e9e46f7daacd194739455de3b356ca6c03206" +version = "0.7.0" +source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git#b753a832e92d5c86c5c997327a9cf9de86a18851" dependencies = [ "blake2", "digest 0.10.7", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "halo2derive", "lazy_static", "num-bigint", "num-integer", "num-traits", - "pairing 0.23.0", + "pairing", "pasta_curves", "paste", "rand", @@ -2152,7 +2085,7 @@ dependencies = [ [[package]] name = "halo2derive" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git#d34e9e46f7daacd194739455de3b356ca6c03206" +source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git#b753a832e92d5c86c5c997327a9cf9de86a18851" dependencies = [ "num-bigint", "num-integer", @@ -2231,6 +2164,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2255,6 +2194,11 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "hmac-sha256" +version = "1.1.7" +source = "git+https://github.com/zkemail/rust-hmac-sha256.git#e98ae695d2600c98b57de4b1ad1e0bfb7895f458" + [[package]] name = "home" version = "0.5.9" @@ -2308,6 +2252,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "httparse" version = "1.9.4" @@ -2332,7 +2299,7 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -2344,6 +2311,25 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2352,10 +2338,28 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper", - "rustls", + "hyper 0.14.30", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls 0.23.12", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", + "tower-service", + "webpki-roots 0.26.5", ] [[package]] @@ -2365,12 +2369,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -2396,30 +2420,32 @@ dependencies = [ [[package]] name = "ic-agent" -version = "0.30.2" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "263d5c7b295ba69eac0692e6f6b35a01ca323889d10612c0f8c8fd223b0bfec5" +checksum = "3fd3fdf5e5c4f4a9fe5ca612f0febd22dcb161d2f2b75b0142326732be5e4978" dependencies = [ + "async-lock", "backoff", "cached", "candid", "ed25519-consensus", "futures-util", "hex", - "http 0.2.12", - "http-body", + "http 1.1.0", + "http-body 1.0.1", "ic-certification", "ic-transport-types", "ic-verify-bls-signature", "k256", "leb128", - "pem 2.0.1", + "p256", + "pem 3.0.4", "pkcs8", "rand", "rangemap", - "reqwest", - "ring 0.16.20", - "rustls-webpki", + "reqwest 0.12.7", + "ring 0.17.8", + "rustls-webpki 0.102.7", "sec1", "serde", "serde_bytes", @@ -2435,9 +2461,9 @@ dependencies = [ [[package]] name = "ic-certification" -version = "1.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c04340437a32c8b9c80d36f09715909c1e0a755327503a2e2906dcd662ba4e" +checksum = "e64ee3d8b6e81b51f245716d3e0badb63c283c00f3c9fb5d5219afc30b5bf821" dependencies = [ "hex", "serde", @@ -2447,9 +2473,9 @@ dependencies = [ [[package]] name = "ic-transport-types" -version = "0.30.2" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2be3fc4f0641a8c3967fbc8ab52b08bc6d13bf65fb2460b090710374be49b1" +checksum = "875dc4704780383112e8e8b5063a1b98de114321d0c7d3e7f635dcf360a57fba" dependencies = [ "candid", "hex", @@ -2464,33 +2490,65 @@ dependencies = [ [[package]] name = "ic-utils" -version = "0.30.2" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd6fac62c95df9f963c8a941431d86308c864ba1e9001da75843d79a355fb68" +checksum = "2fa832296800758c9c921dd1704985ded6b3e6fbc3aee409727eb1f00d69a595" dependencies = [ "async-trait", "candid", + "futures-util", "ic-agent", "once_cell", "semver 1.0.23", "serde", "serde_bytes", - "strum 0.24.1", - "strum_macros 0.24.3", + "sha2 0.10.8", + "strum", + "strum_macros", "thiserror", "time", + "tokio", ] [[package]] name = "ic-verify-bls-signature" -version = "0.1.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583b1c03380cf86059160cc6c91dcbf56c7b5f141bf3a4f06bc79762d775fac4" +checksum = "d420b25c0091059f6c3c23a21427a81915e6e0aca3b79e0d403ed767f286a3b9" dependencies = [ - "bls12_381", + "hex", + "ic_bls12_381", "lazy_static", - "pairing 0.22.0", - "sha2 0.9.9", + "pairing", + "rand", + "sha2 0.10.8", +] + +[[package]] +name = "ic_bls12_381" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22c65787944f32af084dffd0c68c1e544237b76e215654ddea8cd9f527dd8b69" +dependencies = [ + "digest 0.10.7", + "ff", + "group", + "pairing", + "rand_core", + "subtle", +] + +[[package]] +name = "ic_principal" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" +dependencies = [ + "crc32fast", + "data-encoding", + "serde", + "sha2 0.10.8", + "thiserror", ] [[package]] @@ -2589,9 +2647,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2635,11 +2693,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2662,6 +2720,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -2692,18 +2759,18 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2818,9 +2885,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -2898,13 +2965,13 @@ dependencies = [ [[package]] name = "mailparse" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757" +checksum = "3da03d5980411a724e8aaf7b61a7b5e386ec55a7fb49ee3d0ff79efc7e5e7c7e" dependencies = [ "charset", "data-encoding", - "quoted_printable 0.5.0", + "quoted_printable 0.5.1", ] [[package]] @@ -2934,16 +3001,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", - "rayon", -] - [[package]] name = "md-5" version = "0.10.6" @@ -2966,6 +3023,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minicov" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +dependencies = [ + "cc", + "walkdir", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2981,15 +3048,25 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3156,50 +3233,29 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" -version = "0.6.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive", ] [[package]] -name = "num_enum" -version = "0.7.2" +name = "num_enum_derive" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "num_enum_derive 0.7.2", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[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 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.71", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] @@ -3213,7 +3269,7 @@ dependencies = [ "getrandom", "http 0.2.12", "rand", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "serde_path_to_error", @@ -3233,9 +3289,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.1" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3258,7 +3314,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "auto_impl", "bytes", "ethereum-types", @@ -3279,9 +3335,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3300,7 +3356,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -3311,9 +3367,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -3328,12 +3384,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "pairing" -version = "0.22.0" +name = "p256" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "group 0.12.1", + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", ] [[package]] @@ -3342,7 +3401,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group 0.13.0", + "group", ] [[package]] @@ -3351,7 +3410,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", @@ -3365,7 +3424,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -3420,7 +3479,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec", "windows-targets 0.52.6", ] @@ -3443,8 +3502,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "blake2b_simd", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "lazy_static", "rand", "static_assertions", @@ -3496,11 +3555,11 @@ dependencies = [ [[package]] name = "pem" -version = "2.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "serde", ] @@ -3550,7 +3609,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -3571,7 +3630,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.5.0", ] [[package]] @@ -3614,7 +3673,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -3652,7 +3711,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -3696,11 +3755,11 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "poseidon-rs" -version = "0.0.10" -source = "git+https://github.com/SoraSuegami/poseidon-rs.git?branch=master#15aa98d045e531806e39e48ba5a0b999f5de5d8d" +version = "1.0.0" +source = "git+https://github.com/zkemail/poseidon-rs.git#fe5ce2634c27326219d4faf75beb73b40a0beb7d" dependencies = [ "getrandom", - "halo2curves 0.6.1", + "halo2curves", "once_cell", "serde", "thiserror", @@ -3714,9 +3773,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -3737,12 +3799,21 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.71", + "syn 2.0.77", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", ] [[package]] @@ -3761,21 +3832,11 @@ dependencies = [ [[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 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -3805,9 +3866,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "3b1f9bf148c15500d44581654fb9260bc9d82970f3ef777a79a40534f6aa784f" dependencies = [ "cc", ] @@ -3824,11 +3885,59 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.12", + "socket2 0.5.7", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand", + "ring 0.17.8", + "rustc-hash", + "rustls 0.23.12", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2 0.5.7", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3841,9 +3950,9 @@ checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "quoted_printable" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ec282e887b434b68c18fe5c121d38e72a5cf35119b59e54ec5b992ea9c8eb0" +checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73" [[package]] name = "radium" @@ -3933,27 +4042,18 @@ dependencies = [ [[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_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -3962,9 +4062,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -4003,9 +4103,8 @@ dependencies = [ "chrono", "dotenv", "ethers", - "ff 0.13.0", + "ff", "file-rotate", - "function_name", "futures", "graphql_client", "handlebars", @@ -4021,7 +4120,7 @@ dependencies = [ "rand", "regex", "relayer-utils", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "sled", @@ -4039,17 +4138,17 @@ dependencies = [ [[package]] name = "relayer-utils" -version = "0.1.0" -source = "git+https://github.com/zkemail/relayer-utils?rev=2c3e9b8#2c3e9b80ae043cd038cd5c55279c60b1578587f7" +version = "0.3.7" +source = "git+https://github.com/zkemail/relayer-utils.git#c9371a327fecb422f5e0f015ebca9199a06b658f" dependencies = [ "anyhow", "base64 0.21.7", "cfdkim", "ethers", - "fancy-regex", "file-rotate", - "halo2curves 0.4.0", + "halo2curves", "hex", + "hmac-sha256", "itertools 0.10.5", "lazy_static", "neon", @@ -4058,11 +4157,10 @@ dependencies = [ "once_cell", "poseidon-rs", "rand_core", + "regex", "rsa", "serde", "serde_json", - "serde_regex", - "sha2 0.10.8", "slog", "slog-async", "slog-json", @@ -4084,9 +4182,9 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", - "hyper", - "hyper-rustls", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-rustls 0.24.2", "hyper-tls", "ipnet", "js-sys", @@ -4096,16 +4194,59 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.2", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.12", + "rustls-pemfile 2.1.3", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-rustls 0.26.0", "tokio-util", "tower-service", "url", @@ -4113,8 +4254,8 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", - "winreg", + "webpki-roots 0.26.5", + "windows-registry", ] [[package]] @@ -4226,6 +4367,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -4234,18 +4381,18 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -4262,10 +4409,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "once_cell", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.7", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4275,6 +4436,22 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -4285,6 +4462,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -4333,7 +4521,7 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -4398,9 +4586,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -4411,9 +4599,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -4463,9 +4651,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -4502,22 +4690,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -4532,16 +4721,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_regex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" -dependencies = [ - "regex", - "serde", -] - [[package]] name = "serde_repr" version = "0.1.19" @@ -4550,14 +4729,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4630,6 +4809,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4845,7 +5030,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.5.0", "log", "memchr", "once_cell", @@ -5009,15 +5194,15 @@ dependencies = [ [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5062,32 +5247,13 @@ dependencies = [ "unicode-properties", ] -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - [[package]] name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.4", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", + "strum_macros", ] [[package]] @@ -5100,7 +5266,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -5125,7 +5291,7 @@ dependencies = [ "fs2", "hex", "once_cell", - "reqwest", + "reqwest 0.11.27", "semver 1.0.23", "serde", "serde_json", @@ -5148,9 +5314,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -5174,6 +5340,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -5209,14 +5384,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.1.0", + "fastrand 2.1.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5230,33 +5406,24 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -5338,32 +5505,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -5382,7 +5548,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.12", + "rustls-pki-types", "tokio", ] @@ -5405,11 +5582,11 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.21.12", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tungstenite", - "webpki-roots", + "webpki-roots 0.25.4", ] [[package]] @@ -5427,58 +5604,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.15", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" -dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow", ] [[package]] @@ -5507,7 +5662,7 @@ dependencies = [ "futures-core", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "pin-project-lite", "tower-layer", "tower-service", @@ -5515,15 +5670,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5545,7 +5700,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -5631,7 +5786,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls", + "rustls 0.21.12", "sha1", "thiserror", "url", @@ -5697,9 +5852,9 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" [[package]] name = "unicode-segmentation" @@ -5715,9 +5870,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unicode_categories" @@ -5804,9 +5959,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "void" @@ -5847,11 +6002,12 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "serde", "serde_json", "wasm-bindgen-macro", @@ -5859,24 +6015,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5886,9 +6042,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5896,31 +6052,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-bindgen-test" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" +checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" dependencies = [ "console_error_panic_hook", "js-sys", + "minicov", "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", @@ -5929,13 +6086,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" +checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -5953,9 +6110,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5984,13 +6141,22 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "0.26.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall 0.5.3", "wasite", ] @@ -6018,11 +6184,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6040,6 +6206,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -6067,6 +6263,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -6247,18 +6452,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -6313,6 +6509,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -6324,7 +6521,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.77", ] [[package]] @@ -6355,11 +6552,11 @@ dependencies = [ [[package]] name = "zk-regex-apis" -version = "2.1.0" -source = "git+https://github.com/zkemail/zk-regex.git?branch=main#279d77f774623b4ca50cf4322985f51f60c5a603" +version = "2.1.1" +source = "git+https://github.com/zkemail/zk-regex.git#3b626316b07081378ffdca0d36ed2bec6df5b55a" dependencies = [ "fancy-regex", - "itertools 0.10.5", + "itertools 0.13.0", "js-sys", "serde", "serde-wasm-bindgen", @@ -6390,9 +6587,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/kubernetes/cronjob.yml b/kubernetes/cronjob.yml new file mode 100644 index 00000000..94af6abd --- /dev/null +++ b/kubernetes/cronjob.yml @@ -0,0 +1,51 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cronjob-service-account + namespace: ar-base-sepolia +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: ar-base-sepolia + name: deployment-restart-role +rules: + - apiGroups: ["apps", "extensions"] + resources: ["deployments"] + verbs: ["get", "list", "watch", "update", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: deployment-restart-rolebinding + namespace: ar-base-sepolia +subjects: + - kind: ServiceAccount + name: cronjob-service-account + namespace: ar-base-sepolia +roleRef: + kind: Role + name: deployment-restart-role + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: restart-deployment + namespace: ar-base-sepolia +spec: + schedule: "0 * * * *" + jobTemplate: + spec: + template: + spec: + serviceAccountName: cronjob-service-account + containers: + - name: kubectl + image: bitnami/kubectl:latest + command: + - /bin/sh + - -c + - | + kubectl rollout restart deployment relayer-email-auth --namespace ar-base-sepolia + restartPolicy: OnFailure diff --git a/kubernetes/relayer.yml b/kubernetes/relayer.yml index 4a5b6448..e815f95b 100644 --- a/kubernetes/relayer.yml +++ b/kubernetes/relayer.yml @@ -17,6 +17,7 @@ data: IC_REPLICA_URL: "" JSON_LOGGER: "" PEM_PATH: "" + SMTP_SERVER: "" --- apiVersion: v1 @@ -30,12 +31,6 @@ type: Opaque data: PRIVATE_KEY: DATABASE_URL: - IMAP_DOMAIN_NAME: - IMAP_PORT: - AUTH_TYPE: - SMTP_DOMAIN_NAME: - LOGIN_ID: - LOGIN_PASSWORD: PROVER_ADDRESS: ICPEM: @@ -94,14 +89,14 @@ spec: spec: containers: - name: relayer-container - image: bisht13/relayer-new-0:latest + image: bisht13/ar-relayer-base-1:latest ports: - containerPort: 4500 envFrom: - configMapRef: - name: relayer-config + name: relayer-config-email-auth - secretRef: - name: relayer-secret + name: relayer-secret-email-auth livenessProbe: httpGet: path: /api/echo @@ -131,12 +126,6 @@ spec: - secretRef: name: relayer-imap-secret volumes: - - name: pem-volume - secret: - secretName: relayer-secret - items: - - key: ICPEM - path: ".ic.pem" - name: pem-volume secret: secretName: relayer-secret-email-auth diff --git a/packages/circuits/helpers/email_auth.ts b/packages/circuits/helpers/email_auth.ts index 55db6762..4103af76 100644 --- a/packages/circuits/helpers/email_auth.ts +++ b/packages/circuits/helpers/email_auth.ts @@ -2,22 +2,38 @@ import fs from "fs"; import { promisify } from "util"; const relayerUtils = require("@zk-email/relayer-utils"); -export async function genEmailAuthInput( - emailFilePath: string, - accountCode: string +export async function genEmailCircuitInput( + emailFilePath: string, + accountCode: string, + options?: { + shaPrecomputeSelector?: string; + maxHeaderLength?: number; + maxBodyLength?: number; + ignoreBodyHashCheck?: boolean; + } ): Promise<{ - padded_header: string[]; - public_key: string[]; - signature: string[]; - padded_header_len: string; - account_code: string; - from_addr_idx: number; - subject_idx: number; - domain_idx: number; - timestamp_idx: number; - code_idx: number; + padded_header: string[]; + public_key: string[]; + signature: string[]; + padded_header_len: string; + account_code: string; + from_addr_idx: number; + subject_idx: number; + domain_idx: number; + timestamp_idx: number; + code_idx: number; + body_hash_idx: number; + precomputed_sha: string[]; + padded_body: string[]; + padded_body_len: string; + command_idx: number; + padded_cleaned_body: string[]; }> { - const emailRaw = await promisify(fs.readFile)(emailFilePath, "utf8"); - const jsonStr = await relayerUtils.genEmailAuthInput(emailRaw, accountCode); - return JSON.parse(jsonStr); + const emailRaw = await promisify(fs.readFile)(emailFilePath, "utf8"); + const jsonStr = await relayerUtils.genEmailCircuitInput( + emailRaw, + accountCode, + options + ); + return JSON.parse(jsonStr); } diff --git a/packages/circuits/package.json b/packages/circuits/package.json index 6cb8ec4a..964439a1 100644 --- a/packages/circuits/package.json +++ b/packages/circuits/package.json @@ -4,15 +4,16 @@ "version": "1.0.0", "scripts": { "build": "mkdir -p build && circom src/email_auth.circom --r1cs --wasm --sym -l ../../node_modules -o ./build", - "dev-setup": "NODE_OPTIONS=--max_old_space_size=8192 npx ts-node scripts/dev-setup.ts --output ./build", + "build-body": "mkdir -p build && circom src/email_auth_with_body_parsing_with_qp_encoding.circom --r1cs --wasm --sym -l ../../node_modules -o ./build", + "dev-setup": "NODE_OPTIONS=--max_old_space_size=16384 npx ts-node scripts/dev-setup.ts --output ./build", "gen-input": "NODE_OPTIONS=--max_old_space_size=8192 npx ts-node scripts/gen_input.ts", "verify-proofs": "NODE_OPTIONS=--max_old_space_size=8192 npx ts-node scripts/verify_proofs.ts", "test": "NODE_OPTIONS=--max_old_space_size=8192 jest" }, "dependencies": { - "@zk-email/circuits": "^6.1.1", + "@zk-email/circuits": "^6.1.5", "@zk-email/zk-regex-circom": "^2.1.0", - "@zk-email/relayer-utils": "^0.2.4", + "@zk-email/relayer-utils": "^0.3.7", "commander": "^11.0.0", "snarkjs": "^0.7.0" }, @@ -41,4 +42,4 @@ ] ] } -} \ No newline at end of file +} diff --git a/packages/circuits/scripts/dev-setup.ts b/packages/circuits/scripts/dev-setup.ts index e8466c31..de0c7175 100644 --- a/packages/circuits/scripts/dev-setup.ts +++ b/packages/circuits/scripts/dev-setup.ts @@ -20,7 +20,8 @@ program "--output ", "Path to the directory storing output files" ) - .option("--silent", "No console logs"); + .option("--silent", "No console logs") + .option("--body", "Enable body parsing"); program.parse(); const args = program.opts(); @@ -40,8 +41,12 @@ if (ZKEY_BEACON == null) { ZKEY_BEACON = "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; } -const phase1Url = +let phase1Url = "https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_22.ptau"; +if (args.body) { + phase1Url = + "https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_23.ptau"; +} // const buildDir = path.join(__dirname, "../build"); // const phase1Path = path.join(buildDir, "powersOfTau28_hez_final_21.ptau"); // const r1cPath = path.join(buildDir, "wallet.r1cs"); @@ -135,19 +140,34 @@ async function generateKeys( async function exec() { const buildDir = args.output; - const phase1Path = path.join(buildDir, "powersOfTau28_hez_final_22.ptau"); - await downloadPhase1(phase1Path); - log("✓ Phase 1:", phase1Path); - const emailAuthR1csPath = path.join(buildDir, "email_auth.r1cs"); - if (!fs.existsSync(emailAuthR1csPath)) { - throw new Error(`${emailAuthR1csPath} does not exist.`); + if (!args.body) { + const phase1Path = path.join(buildDir, "powersOfTau28_hez_final_22.ptau"); + + await downloadPhase1(phase1Path); + log("✓ Phase 1:", phase1Path); + + const emailAuthR1csPath = path.join(buildDir, "email_auth.r1cs"); + if (!fs.existsSync(emailAuthR1csPath)) { + throw new Error(`${emailAuthR1csPath} does not exist.`); + } + await generateKeys(phase1Path, emailAuthR1csPath, path.join(buildDir, "email_auth.zkey"), path.join(buildDir, "email_auth.vkey"), path.join(buildDir, "Groth16Verifier.sol")); + log("✓ Keys for email auth circuit generated"); + } else { + const phase1Path = path.join(buildDir, "powersOfTau28_hez_final_23.ptau"); + + await downloadPhase1(phase1Path); + log("✓ Phase 1:", phase1Path); + + const emailAuthR1csPath = path.join(buildDir, "email_auth_with_body_parsing_with_qp_encoding.r1cs"); + if (!fs.existsSync(emailAuthR1csPath)) { + throw new Error(`${emailAuthR1csPath} does not exist.`); + } + await generateKeys(phase1Path, emailAuthR1csPath, path.join(buildDir, "email_auth_with_body_parsing_with_qp_encoding.zkey"), path.join(buildDir, "email_auth_with_body_parsing_with_qp_encoding.vkey"), path.join(buildDir, "Groth16BodyParsingVerifier.sol")); + log("✓ Keys for email auth with body parsing circuit generated"); } - await generateKeys(phase1Path, emailAuthR1csPath, path.join(buildDir, "email_auth.zkey"), path.join(buildDir, "email_auth.vkey"), path.join(buildDir, "Groth16Verifier.sol")); - log("✓ Keys for email auth circuit generated"); - } diff --git a/packages/circuits/scripts/gen_input.ts b/packages/circuits/scripts/gen_input.ts index 899ea05d..66350409 100644 --- a/packages/circuits/scripts/gen_input.ts +++ b/packages/circuits/scripts/gen_input.ts @@ -8,7 +8,7 @@ import { program } from "commander"; import fs from "fs"; import { promisify } from "util"; -import { genEmailAuthInput } from "../helpers/email_auth"; +import { genEmailCircuitInput } from "../helpers/email_auth"; import path from "path"; const snarkjs = require("snarkjs"); @@ -26,6 +26,7 @@ program "Path of a json file to write the generated input" ) .option("--silent", "No console logs") + .option("--body", "Enable body parsing") .option("--prove", "Also generate proof"); program.parse(); @@ -42,21 +43,49 @@ async function generate() { throw new Error("--input file path arg must end with .json"); } - log("Generating Inputs for:", args); + if (!args.body) { + log("Generating Inputs for:", args); - const circuitInputs = await genEmailAuthInput(args.emailFile, args.accountCode); - log("\n\nGenerated Inputs:", circuitInputs, "\n\n"); + const circuitInputs = await genEmailCircuitInput(args.emailFile, args.accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true + }); + log("\n\nGenerated Inputs:", circuitInputs, "\n\n"); - await promisify(fs.writeFile)(args.inputFile, JSON.stringify(circuitInputs, null, 2)); + await promisify(fs.writeFile)(args.inputFile, JSON.stringify(circuitInputs, null, 2)); - log("Inputs written to", args.inputFile); + log("Inputs written to", args.inputFile); - if (args.prove) { - const dir = path.dirname(args.inputFile); - const { proof, publicSignals } = await snarkjs.groth16.fullProve(circuitInputs, path.join(dir, "email_auth.wasm"), path.join(dir, "email_auth.zkey"), console); - await promisify(fs.writeFile)(path.join(dir, "email_auth_proof.json"), JSON.stringify(proof, null, 2)); - await promisify(fs.writeFile)(path.join(dir, "email_auth_public.json"), JSON.stringify(publicSignals, null, 2)); - log("✓ Proof for email auth circuit generated"); + if (args.prove) { + const dir = path.dirname(args.inputFile); + const { proof, publicSignals } = await snarkjs.groth16.fullProve(circuitInputs, path.join(dir, "email_auth.wasm"), path.join(dir, "email_auth.zkey"), console); + await promisify(fs.writeFile)(path.join(dir, "email_auth_proof.json"), JSON.stringify(proof, null, 2)); + await promisify(fs.writeFile)(path.join(dir, "email_auth_public.json"), JSON.stringify(publicSignals, null, 2)); + log("✓ Proof for email auth circuit generated"); + } + } else { + log("Generating Inputs for:", args); + + const { subject_idx, ...circuitInputs } = await genEmailCircuitInput(args.emailFile, args.accountCode, { + maxHeaderLength: 1024, + maxBodyLength: 1024, + ignoreBodyHashCheck: false, + shaPrecomputeSelector: '(
]*>)' + }); + console.log(circuitInputs.padded_body.length); + log("\n\nGenerated Inputs:", circuitInputs, "\n\n"); + + await promisify(fs.writeFile)(args.inputFile, JSON.stringify(circuitInputs, null, 2)); + + log("Inputs written to", args.inputFile); + + if (args.prove) { + const dir = path.dirname(args.inputFile); + const { proof, publicSignals } = await snarkjs.groth16.fullProve(circuitInputs, path.join(dir, "email_auth_with_body_parsing_with_qp_encoding.wasm"), path.join(dir, "email_auth_with_body_parsing_with_qp_encoding.zkey"), console); + await promisify(fs.writeFile)(path.join(dir, "email_auth_with_body_parsing_with_qp_encoding_proof.json"), JSON.stringify(proof, null, 2)); + await promisify(fs.writeFile)(path.join(dir, "email_auth_with_body_parsing_with_qp_encoding_public.json"), JSON.stringify(publicSignals, null, 2)); + log("✓ Proof for email auth circuit generated"); + } } process.exit(0); } diff --git a/packages/circuits/src/email_auth_template.circom b/packages/circuits/src/email_auth_template.circom index 1e61deb8..547e30df 100644 --- a/packages/circuits/src/email_auth_template.circom +++ b/packages/circuits/src/email_auth_template.circom @@ -5,6 +5,7 @@ include "circomlib/circuits/comparators.circom"; include "circomlib/circuits/poseidon.circom"; include "@zk-email/circuits/email-verifier.circom"; include "@zk-email/circuits/utils/regex.circom"; +include "@zk-email/circuits/utils/array.circom"; include "./utils/constants.circom"; include "./utils/account_salt.circom"; include "./utils/hash_sign.circom"; @@ -15,6 +16,7 @@ include "./utils/hex2int.circom"; include "./utils/email_addr_commit.circom"; include "./regexes/invitation_code_with_prefix_regex.circom"; include "./regexes/invitation_code_regex.circom"; +include "./regexes/command_regex.circom"; include "@zk-email/zk-regex-circom/circuits/common/from_addr_regex.circom"; include "@zk-email/zk-regex-circom/circuits/common/email_addr_regex.circom"; include "@zk-email/zk-regex-circom/circuits/common/email_domain_regex.circom"; @@ -33,7 +35,6 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal input public_key[k]; // RSA public key (modulus), k parts of n bits each. signal input signature[k]; // RSA signature, k parts of n bits each. signal input padded_header_len; // length of in email data including the padding - // signal input sender_relayer_rand; // Private randomness of the relayer signal input account_code; signal input from_addr_idx; // Index of the from email address (= sender email address) in the email header signal input subject_idx; // Index of the subject in the header @@ -45,7 +46,7 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) var email_max_bytes = email_max_bytes_const(); var subject_field_len = compute_ints_size(max_subject_bytes); var domain_len = domain_len_const(); - var domain_filed_len = compute_ints_size(domain_len); + var domain_field_len = compute_ints_size(domain_len); var k2_chunked_size = k >> 1; if(k % 2 == 1) { k2_chunked_size += 1; @@ -54,7 +55,7 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) var code_len = invitation_code_len_const(); - signal output domain_name[domain_filed_len]; + signal output domain_name[domain_field_len]; signal output public_key_hash; signal output email_nullifier; signal output timestamp; @@ -63,12 +64,11 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal output is_code_exist; // Verify Email Signature - component email_verifier = EmailVerifier(max_header_bytes, 0, n, k, 1); + component email_verifier = EmailVerifier(max_header_bytes, 0, n, k, 1, 0, 0); email_verifier.emailHeader <== padded_header; email_verifier.pubkey <== public_key; email_verifier.signature <== signature; email_verifier.emailHeaderLength <== padded_header_len; - signal header_hash[256] <== email_verifier.sha; public_key_hash <== email_verifier.pubkeyHash; // FROM HEADER REGEX @@ -168,7 +168,7 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) cm_rand_input[k2_chunked_size] <== 1; signal cm_rand <== Poseidon(k2_chunked_size+1)(cm_rand_input); signal replaced_email_addr_regex_reveal[max_subject_bytes]; - for(var i=0; i 2048) +// * max_header_bytes - max number of bytes in the email header +// * max_body_bytes - max number of bytes in the email body +// * max_command_bytes - max number of bytes in the command +// * recipient_enabled - whether the email address commitment of the recipient = email address in the subject is exposed +// * is_qp_encoded - whether the email body is qp encoded +template EmailAuthWithBodyParsing(n, k, max_header_bytes, max_body_bytes, max_command_bytes, recipient_enabled, is_qp_encoded) { + signal input padded_header[max_header_bytes]; // email data (only header part) + signal input padded_header_len; // length of in email data including the padding + signal input public_key[k]; // RSA public key (modulus), k parts of n bits each. + signal input signature[k]; // RSA signature, k parts of n bits each. + signal input body_hash_idx; // index of the bodyhash in the header + signal input precomputed_sha[32]; // precomputed sha256 of the email body + signal input padded_body[max_body_bytes]; // email data (only body part) + signal input padded_body_len; // length of in email data including the padding + signal input account_code; + signal input from_addr_idx; // Index of the from email address (= sender email address) in the email header + signal input domain_idx; // Index of the domain name in the from email address + signal input timestamp_idx; // Index of the timestamp in the header + signal input code_idx; // index of the invitation code in the header + signal input command_idx; // index of the command in the body + /// Note: padded_cleaned_body is only used for qp encoded email body, + /// for non-qp encoded email body, it should be equal to padded_body + signal input padded_cleaned_body[max_body_bytes]; // cleaned email body + + var email_max_bytes = email_max_bytes_const(); + var command_field_len = compute_ints_size(max_command_bytes); + var domain_len = domain_len_const(); + var domain_field_len = compute_ints_size(domain_len); + var k2_chunked_size = k >> 1; + if(k % 2 == 1) { + k2_chunked_size += 1; + } + var timestamp_len = timestamp_len_const(); + var code_len = invitation_code_len_const(); + + signal output domain_name[domain_field_len]; + signal output public_key_hash; + signal output email_nullifier; + signal output timestamp; + signal output masked_command[command_field_len]; + signal output account_salt; + signal output is_code_exist; + + // Verify Email Signature + component email_verifier = EmailVerifier(max_header_bytes, max_body_bytes, n, k, 0, is_qp_encoded, 0); + email_verifier.emailHeader <== padded_header; + email_verifier.emailHeaderLength <== padded_header_len; + email_verifier.pubkey <== public_key; + email_verifier.signature <== signature; + email_verifier.bodyHashIndex <== body_hash_idx; + email_verifier.precomputedSHA <== precomputed_sha; + email_verifier.emailBody <== padded_body; + email_verifier.emailBodyLength <== padded_body_len; + if (is_qp_encoded == 1) { + email_verifier.decodedEmailBodyIn <== padded_cleaned_body; + } + public_key_hash <== email_verifier.pubkeyHash; + + // FROM HEADER REGEX + signal from_regex_out, from_regex_reveal[max_header_bytes]; + (from_regex_out, from_regex_reveal) <== FromAddrRegex(max_header_bytes)(padded_header); + from_regex_out === 1; + signal from_email_addr[email_max_bytes]; + from_email_addr <== SelectRegexReveal(max_header_bytes, email_max_bytes)(from_regex_reveal, from_addr_idx); + + // DOMAIN NAME HEADER REGEX + signal domain_regex_out, domain_regex_reveal[email_max_bytes]; + (domain_regex_out, domain_regex_reveal) <== EmailDomainRegex(email_max_bytes)(from_email_addr); + domain_regex_out === 1; + signal domain_name_bytes[domain_len]; + domain_name_bytes <== SelectRegexReveal(email_max_bytes, domain_len)(domain_regex_reveal, domain_idx); + domain_name <== Bytes2Ints(domain_len)(domain_name_bytes); + + signal sign_hash; + signal sign_ints[k2_chunked_size]; + (sign_hash, sign_ints) <== HashSign(n,k)(signature); + email_nullifier <== EmailNullifier()(sign_hash); + + // Timestamp regex + convert to decimal format + signal timestamp_regex_out, timestamp_regex_reveal[max_header_bytes]; + (timestamp_regex_out, timestamp_regex_reveal) <== TimestampRegex(max_header_bytes)(padded_header); + signal timestamp_str[timestamp_len]; + timestamp_str <== SelectRegexReveal(max_header_bytes, timestamp_len)(timestamp_regex_reveal, timestamp_idx); + signal raw_timestamp <== Digit2Int(timestamp_len)(timestamp_str); + timestamp <== timestamp_regex_out * raw_timestamp; + + // Extract the command from the body + signal command_regex_out, command_regex_reveal[max_body_bytes]; + if (is_qp_encoded != 1) { + (command_regex_out, command_regex_reveal) <== CommandRegex(max_body_bytes)(padded_body); + } else { + (command_regex_out, command_regex_reveal) <== CommandRegex(max_body_bytes)(padded_cleaned_body); + } + command_regex_out === 1; + signal command_all[max_command_bytes]; + command_all <== SelectRegexReveal(max_body_bytes, max_command_bytes)(command_regex_reveal, command_idx); + + signal prefixed_code_regex_out, prefixed_code_regex_reveal[max_command_bytes]; + (prefixed_code_regex_out, prefixed_code_regex_reveal) <== InvitationCodeWithPrefixRegex(max_command_bytes)(command_all); + is_code_exist <== IsZero()(prefixed_code_regex_out-1); + signal removed_code[max_command_bytes]; + for(var i = 0; i < max_command_bytes; i++) { + removed_code[i] <== is_code_exist * prefixed_code_regex_reveal[i]; + } + signal command_email_addr_regex_out, command_email_addr_regex_reveal[max_command_bytes]; + (command_email_addr_regex_out, command_email_addr_regex_reveal) <== EmailAddrRegex(max_command_bytes)(command_all); + signal is_command_email_addr_exist <== IsZero()(command_email_addr_regex_out-1); + signal removed_command_email_addr[max_command_bytes]; + for(var i = 0; i < max_command_bytes; i++) { + removed_command_email_addr[i] <== is_command_email_addr_exist * command_email_addr_regex_reveal[i]; + } + signal masked_command_bytes[max_command_bytes]; + for(var i = 0; i < max_command_bytes; i++) { + masked_command_bytes[i] <== command_all[i] - removed_code[i] - removed_command_email_addr[i]; + } + masked_command <== Bytes2Ints(max_command_bytes)(masked_command_bytes); + + // INVITATION CODE REGEX + signal code_regex_out, code_regex_reveal[max_body_bytes]; + if (is_qp_encoded != 1) { + (code_regex_out, code_regex_reveal) <== InvitationCodeRegex(max_body_bytes)(padded_body); + } else { + (code_regex_out, code_regex_reveal) <== InvitationCodeRegex(max_body_bytes)(padded_cleaned_body); + } + signal code_consistency <== IsZero()(is_code_exist * (1 - code_regex_out)); + code_consistency === 1; + signal replaced_code_regex_reveal[max_body_bytes]; + for(var i=0; i]*>)" + }, + { + "is_public": true, + "regex_def": "[^<>/]+" + }, + { + "is_public": false, + "regex_def": "
" + } + ] +} diff --git a/packages/circuits/src/regexes/command_regex.circom b/packages/circuits/src/regexes/command_regex.circom new file mode 100644 index 00000000..3c4de75f --- /dev/null +++ b/packages/circuits/src/regexes/command_regex.circom @@ -0,0 +1,1365 @@ +pragma circom 2.1.5; + +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; + +// regex: (
]*>)[^<>/]+
+template CommandRegex(msg_bytes) { + signal input msg[msg_bytes]; + signal output out; + + var num_bytes = msg_bytes+1; + signal in[num_bytes]; + in[0]<==255; + for (var i = 0; i < msg_bytes; i++) { + in[i+1] <== msg[i]; + } + + component eq[82][num_bytes]; + component lt[38][num_bytes]; + component and[167][num_bytes]; + component multi_or[36][num_bytes]; + signal states[num_bytes+1][56]; + signal states_tmp[num_bytes+1][56]; + signal from_zero_enabled[num_bytes+1]; + from_zero_enabled[num_bytes] <== 0; + component state_changed[num_bytes]; + + for (var i = 1; i < 56; i++) { + states[0][i] <== 0; + } + + for (var i = 0; i < num_bytes; i++) { + state_changed[i] = MultiOR(55); + states[i][0] <== 1; + eq[0][i] = IsEqual(); + eq[0][i].in[0] <== in[i]; + eq[0][i].in[1] <== 60; + and[0][i] = AND(); + and[0][i].a <== states[i][0]; + and[0][i].b <== eq[0][i].out; + states_tmp[i+1][1] <== 0; + eq[1][i] = IsEqual(); + eq[1][i].in[0] <== in[i]; + eq[1][i].in[1] <== 100; + and[1][i] = AND(); + and[1][i].a <== states[i][1]; + and[1][i].b <== eq[1][i].out; + states[i+1][2] <== and[1][i].out; + eq[2][i] = IsEqual(); + eq[2][i].in[0] <== in[i]; + eq[2][i].in[1] <== 105; + and[2][i] = AND(); + and[2][i].a <== states[i][2]; + and[2][i].b <== eq[2][i].out; + states[i+1][3] <== and[2][i].out; + eq[3][i] = IsEqual(); + eq[3][i].in[0] <== in[i]; + eq[3][i].in[1] <== 118; + and[3][i] = AND(); + and[3][i].a <== states[i][3]; + and[3][i].b <== eq[3][i].out; + states[i+1][4] <== and[3][i].out; + eq[4][i] = IsEqual(); + eq[4][i].in[0] <== in[i]; + eq[4][i].in[1] <== 32; + and[4][i] = AND(); + and[4][i].a <== states[i][4]; + and[4][i].b <== eq[4][i].out; + states[i+1][5] <== and[4][i].out; + and[5][i] = AND(); + and[5][i].a <== states[i][5]; + and[5][i].b <== eq[2][i].out; + states[i+1][6] <== and[5][i].out; + and[6][i] = AND(); + and[6][i].a <== states[i][6]; + and[6][i].b <== eq[1][i].out; + states[i+1][7] <== and[6][i].out; + eq[5][i] = IsEqual(); + eq[5][i].in[0] <== in[i]; + eq[5][i].in[1] <== 61; + and[7][i] = AND(); + and[7][i].a <== states[i][7]; + and[7][i].b <== eq[5][i].out; + states[i+1][8] <== and[7][i].out; + eq[6][i] = IsEqual(); + eq[6][i].in[0] <== in[i]; + eq[6][i].in[1] <== 51; + and[8][i] = AND(); + and[8][i].a <== states[i][8]; + and[8][i].b <== eq[6][i].out; + states[i+1][9] <== and[8][i].out; + eq[7][i] = IsEqual(); + eq[7][i].in[0] <== in[i]; + eq[7][i].in[1] <== 68; + and[9][i] = AND(); + and[9][i].a <== states[i][9]; + and[9][i].b <== eq[7][i].out; + states[i+1][10] <== and[9][i].out; + eq[8][i] = IsEqual(); + eq[8][i].in[0] <== in[i]; + eq[8][i].in[1] <== 34; + and[10][i] = AND(); + and[10][i].a <== states[i][10]; + and[10][i].b <== eq[8][i].out; + lt[0][i] = LessEqThan(8); + lt[0][i].in[0] <== 1; + lt[0][i].in[1] <== in[i]; + lt[1][i] = LessEqThan(8); + lt[1][i].in[0] <== in[i]; + lt[1][i].in[1] <== 33; + and[11][i] = AND(); + and[11][i].a <== lt[0][i].out; + and[11][i].b <== lt[1][i].out; + lt[2][i] = LessEqThan(8); + lt[2][i].in[0] <== 35; + lt[2][i].in[1] <== in[i]; + lt[3][i] = LessEqThan(8); + lt[3][i].in[0] <== in[i]; + lt[3][i].in[1] <== 121; + and[12][i] = AND(); + and[12][i].a <== lt[2][i].out; + and[12][i].b <== lt[3][i].out; + eq[9][i] = IsEqual(); + eq[9][i].in[0] <== in[i]; + eq[9][i].in[1] <== 123; + eq[10][i] = IsEqual(); + eq[10][i].in[0] <== in[i]; + eq[10][i].in[1] <== 124; + eq[11][i] = IsEqual(); + eq[11][i].in[0] <== in[i]; + eq[11][i].in[1] <== 125; + eq[12][i] = IsEqual(); + eq[12][i].in[0] <== in[i]; + eq[12][i].in[1] <== 126; + eq[13][i] = IsEqual(); + eq[13][i].in[0] <== in[i]; + eq[13][i].in[1] <== 127; + and[13][i] = AND(); + and[13][i].a <== states[i][11]; + multi_or[0][i] = MultiOR(7); + multi_or[0][i].in[0] <== and[11][i].out; + multi_or[0][i].in[1] <== and[12][i].out; + multi_or[0][i].in[2] <== eq[9][i].out; + multi_or[0][i].in[3] <== eq[10][i].out; + multi_or[0][i].in[4] <== eq[11][i].out; + multi_or[0][i].in[5] <== eq[12][i].out; + multi_or[0][i].in[6] <== eq[13][i].out; + and[13][i].b <== multi_or[0][i].out; + lt[4][i] = LessEqThan(8); + lt[4][i].in[0] <== 128; + lt[4][i].in[1] <== in[i]; + lt[5][i] = LessEqThan(8); + lt[5][i].in[0] <== in[i]; + lt[5][i].in[1] <== 191; + and[14][i] = AND(); + and[14][i].a <== lt[4][i].out; + and[14][i].b <== lt[5][i].out; + and[15][i] = AND(); + and[15][i].a <== states[i][12]; + and[15][i].b <== and[14][i].out; + lt[6][i] = LessEqThan(8); + lt[6][i].in[0] <== 35; + lt[6][i].in[1] <== in[i]; + lt[7][i] = LessEqThan(8); + lt[7][i].in[0] <== in[i]; + lt[7][i].in[1] <== 106; + and[16][i] = AND(); + and[16][i].a <== lt[6][i].out; + and[16][i].b <== lt[7][i].out; + eq[14][i] = IsEqual(); + eq[14][i].in[0] <== in[i]; + eq[14][i].in[1] <== 108; + eq[15][i] = IsEqual(); + eq[15][i].in[0] <== in[i]; + eq[15][i].in[1] <== 109; + eq[16][i] = IsEqual(); + eq[16][i].in[0] <== in[i]; + eq[16][i].in[1] <== 110; + eq[17][i] = IsEqual(); + eq[17][i].in[0] <== in[i]; + eq[17][i].in[1] <== 111; + eq[18][i] = IsEqual(); + eq[18][i].in[0] <== in[i]; + eq[18][i].in[1] <== 112; + eq[19][i] = IsEqual(); + eq[19][i].in[0] <== in[i]; + eq[19][i].in[1] <== 113; + eq[20][i] = IsEqual(); + eq[20][i].in[0] <== in[i]; + eq[20][i].in[1] <== 114; + eq[21][i] = IsEqual(); + eq[21][i].in[0] <== in[i]; + eq[21][i].in[1] <== 115; + eq[22][i] = IsEqual(); + eq[22][i].in[0] <== in[i]; + eq[22][i].in[1] <== 116; + eq[23][i] = IsEqual(); + eq[23][i].in[0] <== in[i]; + eq[23][i].in[1] <== 117; + eq[24][i] = IsEqual(); + eq[24][i].in[0] <== in[i]; + eq[24][i].in[1] <== 119; + eq[25][i] = IsEqual(); + eq[25][i].in[0] <== in[i]; + eq[25][i].in[1] <== 120; + eq[26][i] = IsEqual(); + eq[26][i].in[0] <== in[i]; + eq[26][i].in[1] <== 121; + and[17][i] = AND(); + and[17][i].a <== states[i][19]; + multi_or[1][i] = MultiOR(21); + multi_or[1][i].in[0] <== and[11][i].out; + multi_or[1][i].in[1] <== and[16][i].out; + multi_or[1][i].in[2] <== eq[14][i].out; + multi_or[1][i].in[3] <== eq[15][i].out; + multi_or[1][i].in[4] <== eq[16][i].out; + multi_or[1][i].in[5] <== eq[17][i].out; + multi_or[1][i].in[6] <== eq[18][i].out; + multi_or[1][i].in[7] <== eq[19][i].out; + multi_or[1][i].in[8] <== eq[20][i].out; + multi_or[1][i].in[9] <== eq[21][i].out; + multi_or[1][i].in[10] <== eq[22][i].out; + multi_or[1][i].in[11] <== eq[23][i].out; + multi_or[1][i].in[12] <== eq[3][i].out; + multi_or[1][i].in[13] <== eq[24][i].out; + multi_or[1][i].in[14] <== eq[25][i].out; + multi_or[1][i].in[15] <== eq[26][i].out; + multi_or[1][i].in[16] <== eq[9][i].out; + multi_or[1][i].in[17] <== eq[10][i].out; + multi_or[1][i].in[18] <== eq[11][i].out; + multi_or[1][i].in[19] <== eq[12][i].out; + multi_or[1][i].in[20] <== eq[13][i].out; + and[17][i].b <== multi_or[1][i].out; + lt[8][i] = LessEqThan(8); + lt[8][i].in[0] <== 35; + lt[8][i].in[1] <== in[i]; + lt[9][i] = LessEqThan(8); + lt[9][i].in[0] <== in[i]; + lt[9][i].in[1] <== 100; + and[18][i] = AND(); + and[18][i].a <== lt[8][i].out; + and[18][i].b <== lt[9][i].out; + lt[10][i] = LessEqThan(8); + lt[10][i].in[0] <== 102; + lt[10][i].in[1] <== in[i]; + lt[11][i] = LessEqThan(8); + lt[11][i].in[0] <== in[i]; + lt[11][i].in[1] <== 121; + and[19][i] = AND(); + and[19][i].a <== lt[10][i].out; + and[19][i].b <== lt[11][i].out; + and[20][i] = AND(); + and[20][i].a <== states[i][20]; + multi_or[2][i] = MultiOR(8); + multi_or[2][i].in[0] <== and[11][i].out; + multi_or[2][i].in[1] <== and[18][i].out; + multi_or[2][i].in[2] <== and[19][i].out; + multi_or[2][i].in[3] <== eq[9][i].out; + multi_or[2][i].in[4] <== eq[10][i].out; + multi_or[2][i].in[5] <== eq[11][i].out; + multi_or[2][i].in[6] <== eq[12][i].out; + multi_or[2][i].in[7] <== eq[13][i].out; + and[20][i].b <== multi_or[2][i].out; + lt[12][i] = LessEqThan(8); + lt[12][i].in[0] <== 35; + lt[12][i].in[1] <== in[i]; + lt[13][i] = LessEqThan(8); + lt[13][i].in[0] <== in[i]; + lt[13][i].in[1] <== 108; + and[21][i] = AND(); + and[21][i].a <== lt[12][i].out; + and[21][i].b <== lt[13][i].out; + and[22][i] = AND(); + and[22][i].a <== states[i][21]; + multi_or[3][i] = MultiOR(19); + multi_or[3][i].in[0] <== and[11][i].out; + multi_or[3][i].in[1] <== and[21][i].out; + multi_or[3][i].in[2] <== eq[16][i].out; + multi_or[3][i].in[3] <== eq[17][i].out; + multi_or[3][i].in[4] <== eq[18][i].out; + multi_or[3][i].in[5] <== eq[19][i].out; + multi_or[3][i].in[6] <== eq[20][i].out; + multi_or[3][i].in[7] <== eq[21][i].out; + multi_or[3][i].in[8] <== eq[22][i].out; + multi_or[3][i].in[9] <== eq[23][i].out; + multi_or[3][i].in[10] <== eq[3][i].out; + multi_or[3][i].in[11] <== eq[24][i].out; + multi_or[3][i].in[12] <== eq[25][i].out; + multi_or[3][i].in[13] <== eq[26][i].out; + multi_or[3][i].in[14] <== eq[9][i].out; + multi_or[3][i].in[15] <== eq[10][i].out; + multi_or[3][i].in[16] <== eq[11][i].out; + multi_or[3][i].in[17] <== eq[12][i].out; + multi_or[3][i].in[18] <== eq[13][i].out; + and[22][i].b <== multi_or[3][i].out; + lt[14][i] = LessEqThan(8); + lt[14][i].in[0] <== 35; + lt[14][i].in[1] <== in[i]; + lt[15][i] = LessEqThan(8); + lt[15][i].in[0] <== in[i]; + lt[15][i].in[1] <== 96; + and[23][i] = AND(); + and[23][i].a <== lt[14][i].out; + and[23][i].b <== lt[15][i].out; + lt[16][i] = LessEqThan(8); + lt[16][i].in[0] <== 98; + lt[16][i].in[1] <== in[i]; + lt[17][i] = LessEqThan(8); + lt[17][i].in[0] <== in[i]; + lt[17][i].in[1] <== 121; + and[24][i] = AND(); + and[24][i].a <== lt[16][i].out; + and[24][i].b <== lt[17][i].out; + and[25][i] = AND(); + and[25][i].a <== states[i][22]; + multi_or[4][i] = MultiOR(8); + multi_or[4][i].in[0] <== and[11][i].out; + multi_or[4][i].in[1] <== and[23][i].out; + multi_or[4][i].in[2] <== and[24][i].out; + multi_or[4][i].in[3] <== eq[9][i].out; + multi_or[4][i].in[4] <== eq[10][i].out; + multi_or[4][i].in[5] <== eq[11][i].out; + multi_or[4][i].in[6] <== eq[12][i].out; + multi_or[4][i].in[7] <== eq[13][i].out; + and[25][i].b <== multi_or[4][i].out; + lt[18][i] = LessEqThan(8); + lt[18][i].in[0] <== 35; + lt[18][i].in[1] <== in[i]; + lt[19][i] = LessEqThan(8); + lt[19][i].in[0] <== in[i]; + lt[19][i].in[1] <== 104; + and[26][i] = AND(); + and[26][i].a <== lt[18][i].out; + and[26][i].b <== lt[19][i].out; + eq[27][i] = IsEqual(); + eq[27][i].in[0] <== in[i]; + eq[27][i].in[1] <== 106; + eq[28][i] = IsEqual(); + eq[28][i].in[0] <== in[i]; + eq[28][i].in[1] <== 107; + and[27][i] = AND(); + and[27][i].a <== states[i][23]; + multi_or[5][i] = MultiOR(23); + multi_or[5][i].in[0] <== and[11][i].out; + multi_or[5][i].in[1] <== and[26][i].out; + multi_or[5][i].in[2] <== eq[27][i].out; + multi_or[5][i].in[3] <== eq[28][i].out; + multi_or[5][i].in[4] <== eq[14][i].out; + multi_or[5][i].in[5] <== eq[15][i].out; + multi_or[5][i].in[6] <== eq[16][i].out; + multi_or[5][i].in[7] <== eq[17][i].out; + multi_or[5][i].in[8] <== eq[18][i].out; + multi_or[5][i].in[9] <== eq[19][i].out; + multi_or[5][i].in[10] <== eq[20][i].out; + multi_or[5][i].in[11] <== eq[21][i].out; + multi_or[5][i].in[12] <== eq[22][i].out; + multi_or[5][i].in[13] <== eq[23][i].out; + multi_or[5][i].in[14] <== eq[3][i].out; + multi_or[5][i].in[15] <== eq[24][i].out; + multi_or[5][i].in[16] <== eq[25][i].out; + multi_or[5][i].in[17] <== eq[26][i].out; + multi_or[5][i].in[18] <== eq[9][i].out; + multi_or[5][i].in[19] <== eq[10][i].out; + multi_or[5][i].in[20] <== eq[11][i].out; + multi_or[5][i].in[21] <== eq[12][i].out; + multi_or[5][i].in[22] <== eq[13][i].out; + and[27][i].b <== multi_or[5][i].out; + lt[20][i] = LessEqThan(8); + lt[20][i].in[0] <== 35; + lt[20][i].in[1] <== in[i]; + lt[21][i] = LessEqThan(8); + lt[21][i].in[0] <== in[i]; + lt[21][i].in[1] <== 107; + and[28][i] = AND(); + and[28][i].a <== lt[20][i].out; + and[28][i].b <== lt[21][i].out; + and[29][i] = AND(); + and[29][i].a <== states[i][24]; + multi_or[6][i] = MultiOR(20); + multi_or[6][i].in[0] <== and[11][i].out; + multi_or[6][i].in[1] <== and[28][i].out; + multi_or[6][i].in[2] <== eq[15][i].out; + multi_or[6][i].in[3] <== eq[16][i].out; + multi_or[6][i].in[4] <== eq[17][i].out; + multi_or[6][i].in[5] <== eq[18][i].out; + multi_or[6][i].in[6] <== eq[19][i].out; + multi_or[6][i].in[7] <== eq[20][i].out; + multi_or[6][i].in[8] <== eq[21][i].out; + multi_or[6][i].in[9] <== eq[22][i].out; + multi_or[6][i].in[10] <== eq[23][i].out; + multi_or[6][i].in[11] <== eq[3][i].out; + multi_or[6][i].in[12] <== eq[24][i].out; + multi_or[6][i].in[13] <== eq[25][i].out; + multi_or[6][i].in[14] <== eq[26][i].out; + multi_or[6][i].in[15] <== eq[9][i].out; + multi_or[6][i].in[16] <== eq[10][i].out; + multi_or[6][i].in[17] <== eq[11][i].out; + multi_or[6][i].in[18] <== eq[12][i].out; + multi_or[6][i].in[19] <== eq[13][i].out; + and[29][i].b <== multi_or[6][i].out; + multi_or[7][i] = MultiOR(9); + multi_or[7][i].in[0] <== and[10][i].out; + multi_or[7][i].in[1] <== and[13][i].out; + multi_or[7][i].in[2] <== and[15][i].out; + multi_or[7][i].in[3] <== and[17][i].out; + multi_or[7][i].in[4] <== and[20][i].out; + multi_or[7][i].in[5] <== and[22][i].out; + multi_or[7][i].in[6] <== and[25][i].out; + multi_or[7][i].in[7] <== and[27][i].out; + multi_or[7][i].in[8] <== and[29][i].out; + states[i+1][11] <== multi_or[7][i].out; + lt[22][i] = LessEqThan(8); + lt[22][i].in[0] <== 194; + lt[22][i].in[1] <== in[i]; + lt[23][i] = LessEqThan(8); + lt[23][i].in[0] <== in[i]; + lt[23][i].in[1] <== 223; + and[30][i] = AND(); + and[30][i].a <== lt[22][i].out; + and[30][i].b <== lt[23][i].out; + and[31][i] = AND(); + and[31][i].a <== states[i][11]; + and[31][i].b <== and[30][i].out; + lt[24][i] = LessEqThan(8); + lt[24][i].in[0] <== 160; + lt[24][i].in[1] <== in[i]; + lt[25][i] = LessEqThan(8); + lt[25][i].in[0] <== in[i]; + lt[25][i].in[1] <== 191; + and[32][i] = AND(); + and[32][i].a <== lt[24][i].out; + and[32][i].b <== lt[25][i].out; + and[33][i] = AND(); + and[33][i].a <== states[i][13]; + and[33][i].b <== and[32][i].out; + and[34][i] = AND(); + and[34][i].a <== states[i][14]; + and[34][i].b <== and[14][i].out; + lt[26][i] = LessEqThan(8); + lt[26][i].in[0] <== 128; + lt[26][i].in[1] <== in[i]; + lt[27][i] = LessEqThan(8); + lt[27][i].in[0] <== in[i]; + lt[27][i].in[1] <== 159; + and[35][i] = AND(); + and[35][i].a <== lt[26][i].out; + and[35][i].b <== lt[27][i].out; + and[36][i] = AND(); + and[36][i].a <== states[i][15]; + and[36][i].b <== and[35][i].out; + and[37][i] = AND(); + and[37][i].a <== states[i][19]; + and[37][i].b <== and[30][i].out; + and[38][i] = AND(); + and[38][i].a <== states[i][20]; + and[38][i].b <== and[30][i].out; + and[39][i] = AND(); + and[39][i].a <== states[i][21]; + and[39][i].b <== and[30][i].out; + and[40][i] = AND(); + and[40][i].a <== states[i][22]; + and[40][i].b <== and[30][i].out; + and[41][i] = AND(); + and[41][i].a <== states[i][23]; + and[41][i].b <== and[30][i].out; + and[42][i] = AND(); + and[42][i].a <== states[i][24]; + and[42][i].b <== and[30][i].out; + multi_or[8][i] = MultiOR(10); + multi_or[8][i].in[0] <== and[31][i].out; + multi_or[8][i].in[1] <== and[33][i].out; + multi_or[8][i].in[2] <== and[34][i].out; + multi_or[8][i].in[3] <== and[36][i].out; + multi_or[8][i].in[4] <== and[37][i].out; + multi_or[8][i].in[5] <== and[38][i].out; + multi_or[8][i].in[6] <== and[39][i].out; + multi_or[8][i].in[7] <== and[40][i].out; + multi_or[8][i].in[8] <== and[41][i].out; + multi_or[8][i].in[9] <== and[42][i].out; + states[i+1][12] <== multi_or[8][i].out; + eq[29][i] = IsEqual(); + eq[29][i].in[0] <== in[i]; + eq[29][i].in[1] <== 224; + and[43][i] = AND(); + and[43][i].a <== states[i][11]; + and[43][i].b <== eq[29][i].out; + and[44][i] = AND(); + and[44][i].a <== states[i][19]; + and[44][i].b <== eq[29][i].out; + and[45][i] = AND(); + and[45][i].a <== states[i][20]; + and[45][i].b <== eq[29][i].out; + and[46][i] = AND(); + and[46][i].a <== states[i][21]; + and[46][i].b <== eq[29][i].out; + and[47][i] = AND(); + and[47][i].a <== states[i][22]; + and[47][i].b <== eq[29][i].out; + and[48][i] = AND(); + and[48][i].a <== states[i][23]; + and[48][i].b <== eq[29][i].out; + and[49][i] = AND(); + and[49][i].a <== states[i][24]; + and[49][i].b <== eq[29][i].out; + multi_or[9][i] = MultiOR(7); + multi_or[9][i].in[0] <== and[43][i].out; + multi_or[9][i].in[1] <== and[44][i].out; + multi_or[9][i].in[2] <== and[45][i].out; + multi_or[9][i].in[3] <== and[46][i].out; + multi_or[9][i].in[4] <== and[47][i].out; + multi_or[9][i].in[5] <== and[48][i].out; + multi_or[9][i].in[6] <== and[49][i].out; + states[i+1][13] <== multi_or[9][i].out; + eq[30][i] = IsEqual(); + eq[30][i].in[0] <== in[i]; + eq[30][i].in[1] <== 225; + eq[31][i] = IsEqual(); + eq[31][i].in[0] <== in[i]; + eq[31][i].in[1] <== 226; + eq[32][i] = IsEqual(); + eq[32][i].in[0] <== in[i]; + eq[32][i].in[1] <== 227; + eq[33][i] = IsEqual(); + eq[33][i].in[0] <== in[i]; + eq[33][i].in[1] <== 228; + eq[34][i] = IsEqual(); + eq[34][i].in[0] <== in[i]; + eq[34][i].in[1] <== 229; + eq[35][i] = IsEqual(); + eq[35][i].in[0] <== in[i]; + eq[35][i].in[1] <== 230; + eq[36][i] = IsEqual(); + eq[36][i].in[0] <== in[i]; + eq[36][i].in[1] <== 231; + eq[37][i] = IsEqual(); + eq[37][i].in[0] <== in[i]; + eq[37][i].in[1] <== 232; + eq[38][i] = IsEqual(); + eq[38][i].in[0] <== in[i]; + eq[38][i].in[1] <== 233; + eq[39][i] = IsEqual(); + eq[39][i].in[0] <== in[i]; + eq[39][i].in[1] <== 234; + eq[40][i] = IsEqual(); + eq[40][i].in[0] <== in[i]; + eq[40][i].in[1] <== 235; + eq[41][i] = IsEqual(); + eq[41][i].in[0] <== in[i]; + eq[41][i].in[1] <== 236; + eq[42][i] = IsEqual(); + eq[42][i].in[0] <== in[i]; + eq[42][i].in[1] <== 238; + eq[43][i] = IsEqual(); + eq[43][i].in[0] <== in[i]; + eq[43][i].in[1] <== 239; + and[50][i] = AND(); + and[50][i].a <== states[i][11]; + multi_or[10][i] = MultiOR(14); + multi_or[10][i].in[0] <== eq[30][i].out; + multi_or[10][i].in[1] <== eq[31][i].out; + multi_or[10][i].in[2] <== eq[32][i].out; + multi_or[10][i].in[3] <== eq[33][i].out; + multi_or[10][i].in[4] <== eq[34][i].out; + multi_or[10][i].in[5] <== eq[35][i].out; + multi_or[10][i].in[6] <== eq[36][i].out; + multi_or[10][i].in[7] <== eq[37][i].out; + multi_or[10][i].in[8] <== eq[38][i].out; + multi_or[10][i].in[9] <== eq[39][i].out; + multi_or[10][i].in[10] <== eq[40][i].out; + multi_or[10][i].in[11] <== eq[41][i].out; + multi_or[10][i].in[12] <== eq[42][i].out; + multi_or[10][i].in[13] <== eq[43][i].out; + and[50][i].b <== multi_or[10][i].out; + lt[28][i] = LessEqThan(8); + lt[28][i].in[0] <== 144; + lt[28][i].in[1] <== in[i]; + lt[29][i] = LessEqThan(8); + lt[29][i].in[0] <== in[i]; + lt[29][i].in[1] <== 191; + and[51][i] = AND(); + and[51][i].a <== lt[28][i].out; + and[51][i].b <== lt[29][i].out; + and[52][i] = AND(); + and[52][i].a <== states[i][16]; + and[52][i].b <== and[51][i].out; + and[53][i] = AND(); + and[53][i].a <== states[i][17]; + and[53][i].b <== and[14][i].out; + eq[44][i] = IsEqual(); + eq[44][i].in[0] <== in[i]; + eq[44][i].in[1] <== 128; + eq[45][i] = IsEqual(); + eq[45][i].in[0] <== in[i]; + eq[45][i].in[1] <== 129; + eq[46][i] = IsEqual(); + eq[46][i].in[0] <== in[i]; + eq[46][i].in[1] <== 130; + eq[47][i] = IsEqual(); + eq[47][i].in[0] <== in[i]; + eq[47][i].in[1] <== 131; + eq[48][i] = IsEqual(); + eq[48][i].in[0] <== in[i]; + eq[48][i].in[1] <== 132; + eq[49][i] = IsEqual(); + eq[49][i].in[0] <== in[i]; + eq[49][i].in[1] <== 133; + eq[50][i] = IsEqual(); + eq[50][i].in[0] <== in[i]; + eq[50][i].in[1] <== 134; + eq[51][i] = IsEqual(); + eq[51][i].in[0] <== in[i]; + eq[51][i].in[1] <== 135; + eq[52][i] = IsEqual(); + eq[52][i].in[0] <== in[i]; + eq[52][i].in[1] <== 136; + eq[53][i] = IsEqual(); + eq[53][i].in[0] <== in[i]; + eq[53][i].in[1] <== 137; + eq[54][i] = IsEqual(); + eq[54][i].in[0] <== in[i]; + eq[54][i].in[1] <== 138; + eq[55][i] = IsEqual(); + eq[55][i].in[0] <== in[i]; + eq[55][i].in[1] <== 139; + eq[56][i] = IsEqual(); + eq[56][i].in[0] <== in[i]; + eq[56][i].in[1] <== 140; + eq[57][i] = IsEqual(); + eq[57][i].in[0] <== in[i]; + eq[57][i].in[1] <== 141; + eq[58][i] = IsEqual(); + eq[58][i].in[0] <== in[i]; + eq[58][i].in[1] <== 142; + eq[59][i] = IsEqual(); + eq[59][i].in[0] <== in[i]; + eq[59][i].in[1] <== 143; + and[54][i] = AND(); + and[54][i].a <== states[i][18]; + multi_or[11][i] = MultiOR(16); + multi_or[11][i].in[0] <== eq[44][i].out; + multi_or[11][i].in[1] <== eq[45][i].out; + multi_or[11][i].in[2] <== eq[46][i].out; + multi_or[11][i].in[3] <== eq[47][i].out; + multi_or[11][i].in[4] <== eq[48][i].out; + multi_or[11][i].in[5] <== eq[49][i].out; + multi_or[11][i].in[6] <== eq[50][i].out; + multi_or[11][i].in[7] <== eq[51][i].out; + multi_or[11][i].in[8] <== eq[52][i].out; + multi_or[11][i].in[9] <== eq[53][i].out; + multi_or[11][i].in[10] <== eq[54][i].out; + multi_or[11][i].in[11] <== eq[55][i].out; + multi_or[11][i].in[12] <== eq[56][i].out; + multi_or[11][i].in[13] <== eq[57][i].out; + multi_or[11][i].in[14] <== eq[58][i].out; + multi_or[11][i].in[15] <== eq[59][i].out; + and[54][i].b <== multi_or[11][i].out; + and[55][i] = AND(); + and[55][i].a <== states[i][19]; + and[55][i].b <== multi_or[10][i].out; + and[56][i] = AND(); + and[56][i].a <== states[i][20]; + and[56][i].b <== multi_or[10][i].out; + and[57][i] = AND(); + and[57][i].a <== states[i][21]; + and[57][i].b <== multi_or[10][i].out; + and[58][i] = AND(); + and[58][i].a <== states[i][22]; + and[58][i].b <== multi_or[10][i].out; + and[59][i] = AND(); + and[59][i].a <== states[i][23]; + and[59][i].b <== multi_or[10][i].out; + and[60][i] = AND(); + and[60][i].a <== states[i][24]; + and[60][i].b <== multi_or[10][i].out; + multi_or[12][i] = MultiOR(10); + multi_or[12][i].in[0] <== and[50][i].out; + multi_or[12][i].in[1] <== and[52][i].out; + multi_or[12][i].in[2] <== and[53][i].out; + multi_or[12][i].in[3] <== and[54][i].out; + multi_or[12][i].in[4] <== and[55][i].out; + multi_or[12][i].in[5] <== and[56][i].out; + multi_or[12][i].in[6] <== and[57][i].out; + multi_or[12][i].in[7] <== and[58][i].out; + multi_or[12][i].in[8] <== and[59][i].out; + multi_or[12][i].in[9] <== and[60][i].out; + states[i+1][14] <== multi_or[12][i].out; + eq[60][i] = IsEqual(); + eq[60][i].in[0] <== in[i]; + eq[60][i].in[1] <== 237; + and[61][i] = AND(); + and[61][i].a <== states[i][11]; + and[61][i].b <== eq[60][i].out; + and[62][i] = AND(); + and[62][i].a <== states[i][19]; + and[62][i].b <== eq[60][i].out; + and[63][i] = AND(); + and[63][i].a <== states[i][20]; + and[63][i].b <== eq[60][i].out; + and[64][i] = AND(); + and[64][i].a <== states[i][21]; + and[64][i].b <== eq[60][i].out; + and[65][i] = AND(); + and[65][i].a <== states[i][22]; + and[65][i].b <== eq[60][i].out; + and[66][i] = AND(); + and[66][i].a <== states[i][23]; + and[66][i].b <== eq[60][i].out; + and[67][i] = AND(); + and[67][i].a <== states[i][24]; + and[67][i].b <== eq[60][i].out; + multi_or[13][i] = MultiOR(7); + multi_or[13][i].in[0] <== and[61][i].out; + multi_or[13][i].in[1] <== and[62][i].out; + multi_or[13][i].in[2] <== and[63][i].out; + multi_or[13][i].in[3] <== and[64][i].out; + multi_or[13][i].in[4] <== and[65][i].out; + multi_or[13][i].in[5] <== and[66][i].out; + multi_or[13][i].in[6] <== and[67][i].out; + states[i+1][15] <== multi_or[13][i].out; + eq[61][i] = IsEqual(); + eq[61][i].in[0] <== in[i]; + eq[61][i].in[1] <== 240; + and[68][i] = AND(); + and[68][i].a <== states[i][11]; + and[68][i].b <== eq[61][i].out; + and[69][i] = AND(); + and[69][i].a <== states[i][19]; + and[69][i].b <== eq[61][i].out; + and[70][i] = AND(); + and[70][i].a <== states[i][20]; + and[70][i].b <== eq[61][i].out; + and[71][i] = AND(); + and[71][i].a <== states[i][21]; + and[71][i].b <== eq[61][i].out; + and[72][i] = AND(); + and[72][i].a <== states[i][22]; + and[72][i].b <== eq[61][i].out; + and[73][i] = AND(); + and[73][i].a <== states[i][23]; + and[73][i].b <== eq[61][i].out; + and[74][i] = AND(); + and[74][i].a <== states[i][24]; + and[74][i].b <== eq[61][i].out; + multi_or[14][i] = MultiOR(7); + multi_or[14][i].in[0] <== and[68][i].out; + multi_or[14][i].in[1] <== and[69][i].out; + multi_or[14][i].in[2] <== and[70][i].out; + multi_or[14][i].in[3] <== and[71][i].out; + multi_or[14][i].in[4] <== and[72][i].out; + multi_or[14][i].in[5] <== and[73][i].out; + multi_or[14][i].in[6] <== and[74][i].out; + states[i+1][16] <== multi_or[14][i].out; + eq[62][i] = IsEqual(); + eq[62][i].in[0] <== in[i]; + eq[62][i].in[1] <== 241; + eq[63][i] = IsEqual(); + eq[63][i].in[0] <== in[i]; + eq[63][i].in[1] <== 242; + eq[64][i] = IsEqual(); + eq[64][i].in[0] <== in[i]; + eq[64][i].in[1] <== 243; + and[75][i] = AND(); + and[75][i].a <== states[i][11]; + multi_or[15][i] = MultiOR(3); + multi_or[15][i].in[0] <== eq[62][i].out; + multi_or[15][i].in[1] <== eq[63][i].out; + multi_or[15][i].in[2] <== eq[64][i].out; + and[75][i].b <== multi_or[15][i].out; + and[76][i] = AND(); + and[76][i].a <== states[i][19]; + and[76][i].b <== multi_or[15][i].out; + and[77][i] = AND(); + and[77][i].a <== states[i][20]; + and[77][i].b <== multi_or[15][i].out; + and[78][i] = AND(); + and[78][i].a <== states[i][21]; + and[78][i].b <== multi_or[15][i].out; + and[79][i] = AND(); + and[79][i].a <== states[i][22]; + and[79][i].b <== multi_or[15][i].out; + and[80][i] = AND(); + and[80][i].a <== states[i][23]; + and[80][i].b <== multi_or[15][i].out; + and[81][i] = AND(); + and[81][i].a <== states[i][24]; + and[81][i].b <== multi_or[15][i].out; + multi_or[16][i] = MultiOR(7); + multi_or[16][i].in[0] <== and[75][i].out; + multi_or[16][i].in[1] <== and[76][i].out; + multi_or[16][i].in[2] <== and[77][i].out; + multi_or[16][i].in[3] <== and[78][i].out; + multi_or[16][i].in[4] <== and[79][i].out; + multi_or[16][i].in[5] <== and[80][i].out; + multi_or[16][i].in[6] <== and[81][i].out; + states[i+1][17] <== multi_or[16][i].out; + eq[65][i] = IsEqual(); + eq[65][i].in[0] <== in[i]; + eq[65][i].in[1] <== 244; + and[82][i] = AND(); + and[82][i].a <== states[i][11]; + and[82][i].b <== eq[65][i].out; + and[83][i] = AND(); + and[83][i].a <== states[i][19]; + and[83][i].b <== eq[65][i].out; + and[84][i] = AND(); + and[84][i].a <== states[i][20]; + and[84][i].b <== eq[65][i].out; + and[85][i] = AND(); + and[85][i].a <== states[i][21]; + and[85][i].b <== eq[65][i].out; + and[86][i] = AND(); + and[86][i].a <== states[i][22]; + and[86][i].b <== eq[65][i].out; + and[87][i] = AND(); + and[87][i].a <== states[i][23]; + and[87][i].b <== eq[65][i].out; + and[88][i] = AND(); + and[88][i].a <== states[i][24]; + and[88][i].b <== eq[65][i].out; + multi_or[17][i] = MultiOR(7); + multi_or[17][i].in[0] <== and[82][i].out; + multi_or[17][i].in[1] <== and[83][i].out; + multi_or[17][i].in[2] <== and[84][i].out; + multi_or[17][i].in[3] <== and[85][i].out; + multi_or[17][i].in[4] <== and[86][i].out; + multi_or[17][i].in[5] <== and[87][i].out; + multi_or[17][i].in[6] <== and[88][i].out; + states[i+1][18] <== multi_or[17][i].out; + eq[66][i] = IsEqual(); + eq[66][i].in[0] <== in[i]; + eq[66][i].in[1] <== 122; + and[89][i] = AND(); + and[89][i].a <== states[i][11]; + and[89][i].b <== eq[66][i].out; + and[90][i] = AND(); + and[90][i].a <== states[i][19]; + and[90][i].b <== eq[66][i].out; + and[91][i] = AND(); + and[91][i].a <== states[i][20]; + and[91][i].b <== eq[66][i].out; + and[92][i] = AND(); + and[92][i].a <== states[i][21]; + and[92][i].b <== eq[66][i].out; + and[93][i] = AND(); + and[93][i].a <== states[i][22]; + and[93][i].b <== eq[66][i].out; + and[94][i] = AND(); + and[94][i].a <== states[i][23]; + and[94][i].b <== eq[66][i].out; + and[95][i] = AND(); + and[95][i].a <== states[i][24]; + and[95][i].b <== eq[66][i].out; + multi_or[18][i] = MultiOR(7); + multi_or[18][i].in[0] <== and[89][i].out; + multi_or[18][i].in[1] <== and[90][i].out; + multi_or[18][i].in[2] <== and[91][i].out; + multi_or[18][i].in[3] <== and[92][i].out; + multi_or[18][i].in[4] <== and[93][i].out; + multi_or[18][i].in[5] <== and[94][i].out; + multi_or[18][i].in[6] <== and[95][i].out; + states[i+1][19] <== multi_or[18][i].out; + and[96][i] = AND(); + and[96][i].a <== states[i][19]; + and[96][i].b <== eq[28][i].out; + states[i+1][20] <== and[96][i].out; + eq[67][i] = IsEqual(); + eq[67][i].in[0] <== in[i]; + eq[67][i].in[1] <== 101; + and[97][i] = AND(); + and[97][i].a <== states[i][20]; + and[97][i].b <== eq[67][i].out; + states[i+1][21] <== and[97][i].out; + and[98][i] = AND(); + and[98][i].a <== states[i][21]; + and[98][i].b <== eq[15][i].out; + states[i+1][22] <== and[98][i].out; + eq[68][i] = IsEqual(); + eq[68][i].in[0] <== in[i]; + eq[68][i].in[1] <== 97; + and[99][i] = AND(); + and[99][i].a <== states[i][22]; + and[99][i].b <== eq[68][i].out; + states[i+1][23] <== and[99][i].out; + and[100][i] = AND(); + and[100][i].a <== states[i][23]; + and[100][i].b <== eq[2][i].out; + states[i+1][24] <== and[100][i].out; + and[101][i] = AND(); + and[101][i].a <== states[i][24]; + and[101][i].b <== eq[14][i].out; + lt[30][i] = LessEqThan(8); + lt[30][i].in[0] <== 35; + lt[30][i].in[1] <== in[i]; + lt[31][i] = LessEqThan(8); + lt[31][i].in[0] <== in[i]; + lt[31][i].in[1] <== 127; + and[102][i] = AND(); + and[102][i].a <== lt[30][i].out; + and[102][i].b <== lt[31][i].out; + and[103][i] = AND(); + and[103][i].a <== states[i][25]; + multi_or[19][i] = MultiOR(2); + multi_or[19][i].in[0] <== and[11][i].out; + multi_or[19][i].in[1] <== and[102][i].out; + and[103][i].b <== multi_or[19][i].out; + and[104][i] = AND(); + and[104][i].a <== states[i][27]; + and[104][i].b <== and[14][i].out; + multi_or[20][i] = MultiOR(3); + multi_or[20][i].in[0] <== and[101][i].out; + multi_or[20][i].in[1] <== and[103][i].out; + multi_or[20][i].in[2] <== and[104][i].out; + states[i+1][25] <== multi_or[20][i].out; + and[105][i] = AND(); + and[105][i].a <== states[i][25]; + and[105][i].b <== eq[8][i].out; + lt[32][i] = LessEqThan(8); + lt[32][i].in[0] <== 1; + lt[32][i].in[1] <== in[i]; + lt[33][i] = LessEqThan(8); + lt[33][i].in[0] <== in[i]; + lt[33][i].in[1] <== 61; + and[106][i] = AND(); + and[106][i].a <== lt[32][i].out; + and[106][i].b <== lt[33][i].out; + lt[34][i] = LessEqThan(8); + lt[34][i].in[0] <== 63; + lt[34][i].in[1] <== in[i]; + lt[35][i] = LessEqThan(8); + lt[35][i].in[0] <== in[i]; + lt[35][i].in[1] <== 127; + and[107][i] = AND(); + and[107][i].a <== lt[34][i].out; + and[107][i].b <== lt[35][i].out; + and[108][i] = AND(); + and[108][i].a <== states[i][26]; + multi_or[21][i] = MultiOR(2); + multi_or[21][i].in[0] <== and[106][i].out; + multi_or[21][i].in[1] <== and[107][i].out; + and[108][i].b <== multi_or[21][i].out; + and[109][i] = AND(); + and[109][i].a <== states[i][35]; + and[109][i].b <== and[14][i].out; + multi_or[22][i] = MultiOR(3); + multi_or[22][i].in[0] <== and[105][i].out; + multi_or[22][i].in[1] <== and[108][i].out; + multi_or[22][i].in[2] <== and[109][i].out; + states[i+1][26] <== multi_or[22][i].out; + and[110][i] = AND(); + and[110][i].a <== states[i][25]; + and[110][i].b <== and[30][i].out; + and[111][i] = AND(); + and[111][i].a <== states[i][28]; + and[111][i].b <== and[32][i].out; + and[112][i] = AND(); + and[112][i].a <== states[i][29]; + and[112][i].b <== and[14][i].out; + and[113][i] = AND(); + and[113][i].a <== states[i][30]; + and[113][i].b <== and[35][i].out; + multi_or[23][i] = MultiOR(4); + multi_or[23][i].in[0] <== and[110][i].out; + multi_or[23][i].in[1] <== and[111][i].out; + multi_or[23][i].in[2] <== and[112][i].out; + multi_or[23][i].in[3] <== and[113][i].out; + states[i+1][27] <== multi_or[23][i].out; + and[114][i] = AND(); + and[114][i].a <== states[i][25]; + and[114][i].b <== eq[29][i].out; + states[i+1][28] <== and[114][i].out; + and[115][i] = AND(); + and[115][i].a <== states[i][25]; + and[115][i].b <== multi_or[10][i].out; + and[116][i] = AND(); + and[116][i].a <== states[i][31]; + and[116][i].b <== and[51][i].out; + and[117][i] = AND(); + and[117][i].a <== states[i][32]; + and[117][i].b <== and[14][i].out; + and[118][i] = AND(); + and[118][i].a <== states[i][33]; + and[118][i].b <== multi_or[11][i].out; + multi_or[24][i] = MultiOR(4); + multi_or[24][i].in[0] <== and[115][i].out; + multi_or[24][i].in[1] <== and[116][i].out; + multi_or[24][i].in[2] <== and[117][i].out; + multi_or[24][i].in[3] <== and[118][i].out; + states[i+1][29] <== multi_or[24][i].out; + and[119][i] = AND(); + and[119][i].a <== states[i][25]; + and[119][i].b <== eq[60][i].out; + states[i+1][30] <== and[119][i].out; + and[120][i] = AND(); + and[120][i].a <== states[i][25]; + and[120][i].b <== eq[61][i].out; + states[i+1][31] <== and[120][i].out; + and[121][i] = AND(); + and[121][i].a <== states[i][25]; + and[121][i].b <== multi_or[15][i].out; + states[i+1][32] <== and[121][i].out; + and[122][i] = AND(); + and[122][i].a <== states[i][25]; + and[122][i].b <== eq[65][i].out; + states[i+1][33] <== and[122][i].out; + eq[69][i] = IsEqual(); + eq[69][i].in[0] <== in[i]; + eq[69][i].in[1] <== 62; + and[123][i] = AND(); + and[123][i].a <== states[i][26]; + and[123][i].b <== eq[69][i].out; + states[i+1][34] <== and[123][i].out; + and[124][i] = AND(); + and[124][i].a <== states[i][26]; + and[124][i].b <== and[30][i].out; + and[125][i] = AND(); + and[125][i].a <== states[i][36]; + and[125][i].b <== and[32][i].out; + and[126][i] = AND(); + and[126][i].a <== states[i][37]; + and[126][i].b <== and[14][i].out; + and[127][i] = AND(); + and[127][i].a <== states[i][38]; + and[127][i].b <== and[35][i].out; + multi_or[25][i] = MultiOR(4); + multi_or[25][i].in[0] <== and[124][i].out; + multi_or[25][i].in[1] <== and[125][i].out; + multi_or[25][i].in[2] <== and[126][i].out; + multi_or[25][i].in[3] <== and[127][i].out; + states[i+1][35] <== multi_or[25][i].out; + and[128][i] = AND(); + and[128][i].a <== states[i][26]; + and[128][i].b <== eq[29][i].out; + states[i+1][36] <== and[128][i].out; + and[129][i] = AND(); + and[129][i].a <== states[i][26]; + and[129][i].b <== multi_or[10][i].out; + and[130][i] = AND(); + and[130][i].a <== states[i][39]; + and[130][i].b <== and[51][i].out; + and[131][i] = AND(); + and[131][i].a <== states[i][40]; + and[131][i].b <== and[14][i].out; + and[132][i] = AND(); + and[132][i].a <== states[i][41]; + and[132][i].b <== multi_or[11][i].out; + multi_or[26][i] = MultiOR(4); + multi_or[26][i].in[0] <== and[129][i].out; + multi_or[26][i].in[1] <== and[130][i].out; + multi_or[26][i].in[2] <== and[131][i].out; + multi_or[26][i].in[3] <== and[132][i].out; + states[i+1][37] <== multi_or[26][i].out; + and[133][i] = AND(); + and[133][i].a <== states[i][26]; + and[133][i].b <== eq[60][i].out; + states[i+1][38] <== and[133][i].out; + and[134][i] = AND(); + and[134][i].a <== states[i][26]; + and[134][i].b <== eq[61][i].out; + states[i+1][39] <== and[134][i].out; + and[135][i] = AND(); + and[135][i].a <== states[i][26]; + and[135][i].b <== multi_or[15][i].out; + states[i+1][40] <== and[135][i].out; + and[136][i] = AND(); + and[136][i].a <== states[i][26]; + and[136][i].b <== eq[65][i].out; + states[i+1][41] <== and[136][i].out; + lt[36][i] = LessEqThan(8); + lt[36][i].in[0] <== 1; + lt[36][i].in[1] <== in[i]; + lt[37][i] = LessEqThan(8); + lt[37][i].in[0] <== in[i]; + lt[37][i].in[1] <== 46; + and[137][i] = AND(); + and[137][i].a <== lt[36][i].out; + and[137][i].b <== lt[37][i].out; + eq[70][i] = IsEqual(); + eq[70][i].in[0] <== in[i]; + eq[70][i].in[1] <== 48; + eq[71][i] = IsEqual(); + eq[71][i].in[0] <== in[i]; + eq[71][i].in[1] <== 49; + eq[72][i] = IsEqual(); + eq[72][i].in[0] <== in[i]; + eq[72][i].in[1] <== 50; + eq[73][i] = IsEqual(); + eq[73][i].in[0] <== in[i]; + eq[73][i].in[1] <== 52; + eq[74][i] = IsEqual(); + eq[74][i].in[0] <== in[i]; + eq[74][i].in[1] <== 53; + eq[75][i] = IsEqual(); + eq[75][i].in[0] <== in[i]; + eq[75][i].in[1] <== 54; + eq[76][i] = IsEqual(); + eq[76][i].in[0] <== in[i]; + eq[76][i].in[1] <== 55; + eq[77][i] = IsEqual(); + eq[77][i].in[0] <== in[i]; + eq[77][i].in[1] <== 56; + eq[78][i] = IsEqual(); + eq[78][i].in[0] <== in[i]; + eq[78][i].in[1] <== 57; + eq[79][i] = IsEqual(); + eq[79][i].in[0] <== in[i]; + eq[79][i].in[1] <== 58; + eq[80][i] = IsEqual(); + eq[80][i].in[0] <== in[i]; + eq[80][i].in[1] <== 59; + and[138][i] = AND(); + and[138][i].a <== states[i][34]; + multi_or[27][i] = MultiOR(15); + multi_or[27][i].in[0] <== and[137][i].out; + multi_or[27][i].in[1] <== and[107][i].out; + multi_or[27][i].in[2] <== eq[70][i].out; + multi_or[27][i].in[3] <== eq[71][i].out; + multi_or[27][i].in[4] <== eq[72][i].out; + multi_or[27][i].in[5] <== eq[6][i].out; + multi_or[27][i].in[6] <== eq[73][i].out; + multi_or[27][i].in[7] <== eq[74][i].out; + multi_or[27][i].in[8] <== eq[75][i].out; + multi_or[27][i].in[9] <== eq[76][i].out; + multi_or[27][i].in[10] <== eq[77][i].out; + multi_or[27][i].in[11] <== eq[78][i].out; + multi_or[27][i].in[12] <== eq[79][i].out; + multi_or[27][i].in[13] <== eq[80][i].out; + multi_or[27][i].in[14] <== eq[5][i].out; + and[138][i].b <== multi_or[27][i].out; + and[139][i] = AND(); + and[139][i].a <== states[i][42]; + and[139][i].b <== multi_or[27][i].out; + and[140][i] = AND(); + and[140][i].a <== states[i][43]; + and[140][i].b <== and[14][i].out; + multi_or[28][i] = MultiOR(3); + multi_or[28][i].in[0] <== and[138][i].out; + multi_or[28][i].in[1] <== and[139][i].out; + multi_or[28][i].in[2] <== and[140][i].out; + states[i+1][42] <== multi_or[28][i].out; + and[141][i] = AND(); + and[141][i].a <== states[i][34]; + and[141][i].b <== and[30][i].out; + and[142][i] = AND(); + and[142][i].a <== states[i][42]; + and[142][i].b <== and[30][i].out; + and[143][i] = AND(); + and[143][i].a <== states[i][44]; + and[143][i].b <== and[32][i].out; + and[144][i] = AND(); + and[144][i].a <== states[i][45]; + and[144][i].b <== and[14][i].out; + and[145][i] = AND(); + and[145][i].a <== states[i][46]; + and[145][i].b <== and[35][i].out; + multi_or[29][i] = MultiOR(5); + multi_or[29][i].in[0] <== and[141][i].out; + multi_or[29][i].in[1] <== and[142][i].out; + multi_or[29][i].in[2] <== and[143][i].out; + multi_or[29][i].in[3] <== and[144][i].out; + multi_or[29][i].in[4] <== and[145][i].out; + states[i+1][43] <== multi_or[29][i].out; + and[146][i] = AND(); + and[146][i].a <== states[i][34]; + and[146][i].b <== eq[29][i].out; + and[147][i] = AND(); + and[147][i].a <== states[i][42]; + and[147][i].b <== eq[29][i].out; + multi_or[30][i] = MultiOR(2); + multi_or[30][i].in[0] <== and[146][i].out; + multi_or[30][i].in[1] <== and[147][i].out; + states[i+1][44] <== multi_or[30][i].out; + and[148][i] = AND(); + and[148][i].a <== states[i][34]; + and[148][i].b <== multi_or[10][i].out; + and[149][i] = AND(); + and[149][i].a <== states[i][42]; + and[149][i].b <== multi_or[10][i].out; + and[150][i] = AND(); + and[150][i].a <== states[i][47]; + and[150][i].b <== and[51][i].out; + and[151][i] = AND(); + and[151][i].a <== states[i][48]; + and[151][i].b <== and[14][i].out; + and[152][i] = AND(); + and[152][i].a <== states[i][49]; + and[152][i].b <== multi_or[11][i].out; + multi_or[31][i] = MultiOR(5); + multi_or[31][i].in[0] <== and[148][i].out; + multi_or[31][i].in[1] <== and[149][i].out; + multi_or[31][i].in[2] <== and[150][i].out; + multi_or[31][i].in[3] <== and[151][i].out; + multi_or[31][i].in[4] <== and[152][i].out; + states[i+1][45] <== multi_or[31][i].out; + and[153][i] = AND(); + and[153][i].a <== states[i][34]; + and[153][i].b <== eq[60][i].out; + and[154][i] = AND(); + and[154][i].a <== states[i][42]; + and[154][i].b <== eq[60][i].out; + multi_or[32][i] = MultiOR(2); + multi_or[32][i].in[0] <== and[153][i].out; + multi_or[32][i].in[1] <== and[154][i].out; + states[i+1][46] <== multi_or[32][i].out; + and[155][i] = AND(); + and[155][i].a <== states[i][34]; + and[155][i].b <== eq[61][i].out; + and[156][i] = AND(); + and[156][i].a <== states[i][42]; + and[156][i].b <== eq[61][i].out; + multi_or[33][i] = MultiOR(2); + multi_or[33][i].in[0] <== and[155][i].out; + multi_or[33][i].in[1] <== and[156][i].out; + states[i+1][47] <== multi_or[33][i].out; + and[157][i] = AND(); + and[157][i].a <== states[i][34]; + and[157][i].b <== multi_or[15][i].out; + and[158][i] = AND(); + and[158][i].a <== states[i][42]; + and[158][i].b <== multi_or[15][i].out; + multi_or[34][i] = MultiOR(2); + multi_or[34][i].in[0] <== and[157][i].out; + multi_or[34][i].in[1] <== and[158][i].out; + states[i+1][48] <== multi_or[34][i].out; + and[159][i] = AND(); + and[159][i].a <== states[i][34]; + and[159][i].b <== eq[65][i].out; + and[160][i] = AND(); + and[160][i].a <== states[i][42]; + and[160][i].b <== eq[65][i].out; + multi_or[35][i] = MultiOR(2); + multi_or[35][i].in[0] <== and[159][i].out; + multi_or[35][i].in[1] <== and[160][i].out; + states[i+1][49] <== multi_or[35][i].out; + and[161][i] = AND(); + and[161][i].a <== states[i][42]; + and[161][i].b <== eq[0][i].out; + states[i+1][50] <== and[161][i].out; + eq[81][i] = IsEqual(); + eq[81][i].in[0] <== in[i]; + eq[81][i].in[1] <== 47; + and[162][i] = AND(); + and[162][i].a <== states[i][50]; + and[162][i].b <== eq[81][i].out; + states[i+1][51] <== and[162][i].out; + and[163][i] = AND(); + and[163][i].a <== states[i][51]; + and[163][i].b <== eq[1][i].out; + states[i+1][52] <== and[163][i].out; + and[164][i] = AND(); + and[164][i].a <== states[i][52]; + and[164][i].b <== eq[2][i].out; + states[i+1][53] <== and[164][i].out; + and[165][i] = AND(); + and[165][i].a <== states[i][53]; + and[165][i].b <== eq[3][i].out; + states[i+1][54] <== and[165][i].out; + and[166][i] = AND(); + and[166][i].a <== states[i][54]; + and[166][i].b <== eq[69][i].out; + states[i+1][55] <== and[166][i].out; + from_zero_enabled[i] <== MultiNOR(55)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20], states[i+1][21], states[i+1][22], states[i+1][23], states[i+1][24], states[i+1][25], states[i+1][26], states[i+1][27], states[i+1][28], states[i+1][29], states[i+1][30], states[i+1][31], states[i+1][32], states[i+1][33], states[i+1][34], states[i+1][35], states[i+1][36], states[i+1][37], states[i+1][38], states[i+1][39], states[i+1][40], states[i+1][41], states[i+1][42], states[i+1][43], states[i+1][44], states[i+1][45], states[i+1][46], states[i+1][47], states[i+1][48], states[i+1][49], states[i+1][50], states[i+1][51], states[i+1][52], states[i+1][53], states[i+1][54], states[i+1][55]]); + states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); + state_changed[i].in[0] <== states[i+1][1]; + state_changed[i].in[1] <== states[i+1][2]; + state_changed[i].in[2] <== states[i+1][3]; + state_changed[i].in[3] <== states[i+1][4]; + state_changed[i].in[4] <== states[i+1][5]; + state_changed[i].in[5] <== states[i+1][6]; + state_changed[i].in[6] <== states[i+1][7]; + state_changed[i].in[7] <== states[i+1][8]; + state_changed[i].in[8] <== states[i+1][9]; + state_changed[i].in[9] <== states[i+1][10]; + state_changed[i].in[10] <== states[i+1][11]; + state_changed[i].in[11] <== states[i+1][12]; + state_changed[i].in[12] <== states[i+1][13]; + state_changed[i].in[13] <== states[i+1][14]; + state_changed[i].in[14] <== states[i+1][15]; + state_changed[i].in[15] <== states[i+1][16]; + state_changed[i].in[16] <== states[i+1][17]; + state_changed[i].in[17] <== states[i+1][18]; + state_changed[i].in[18] <== states[i+1][19]; + state_changed[i].in[19] <== states[i+1][20]; + state_changed[i].in[20] <== states[i+1][21]; + state_changed[i].in[21] <== states[i+1][22]; + state_changed[i].in[22] <== states[i+1][23]; + state_changed[i].in[23] <== states[i+1][24]; + state_changed[i].in[24] <== states[i+1][25]; + state_changed[i].in[25] <== states[i+1][26]; + state_changed[i].in[26] <== states[i+1][27]; + state_changed[i].in[27] <== states[i+1][28]; + state_changed[i].in[28] <== states[i+1][29]; + state_changed[i].in[29] <== states[i+1][30]; + state_changed[i].in[30] <== states[i+1][31]; + state_changed[i].in[31] <== states[i+1][32]; + state_changed[i].in[32] <== states[i+1][33]; + state_changed[i].in[33] <== states[i+1][34]; + state_changed[i].in[34] <== states[i+1][35]; + state_changed[i].in[35] <== states[i+1][36]; + state_changed[i].in[36] <== states[i+1][37]; + state_changed[i].in[37] <== states[i+1][38]; + state_changed[i].in[38] <== states[i+1][39]; + state_changed[i].in[39] <== states[i+1][40]; + state_changed[i].in[40] <== states[i+1][41]; + state_changed[i].in[41] <== states[i+1][42]; + state_changed[i].in[42] <== states[i+1][43]; + state_changed[i].in[43] <== states[i+1][44]; + state_changed[i].in[44] <== states[i+1][45]; + state_changed[i].in[45] <== states[i+1][46]; + state_changed[i].in[46] <== states[i+1][47]; + state_changed[i].in[47] <== states[i+1][48]; + state_changed[i].in[48] <== states[i+1][49]; + state_changed[i].in[49] <== states[i+1][50]; + state_changed[i].in[50] <== states[i+1][51]; + state_changed[i].in[51] <== states[i+1][52]; + state_changed[i].in[52] <== states[i+1][53]; + state_changed[i].in[53] <== states[i+1][54]; + state_changed[i].in[54] <== states[i+1][55]; + } + + component is_accepted = MultiOR(num_bytes+1); + for (var i = 0; i <= num_bytes; i++) { + is_accepted.in[i] <== states[i][55]; + } + out <== is_accepted.out; + signal is_consecutive[msg_bytes+1][3]; + is_consecutive[msg_bytes][2] <== 0; + for (var i = 0; i < msg_bytes; i++) { + is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][55] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; + is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; + is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][55], is_consecutive[msg_bytes-1-i][1]]); + } + // substrings calculated: [{(34, 42), (34, 43), (34, 44), (34, 45), (34, 46), (34, 47), (34, 48), (34, 49), (42, 42), (42, 43), (42, 44), (42, 45), (42, 46), (42, 47), (42, 48), (42, 49), (43, 42), (44, 43), (45, 43), (46, 43), (47, 45), (48, 45), (49, 45)}] + signal prev_states0[23][msg_bytes]; + signal is_substr0[msg_bytes]; + signal is_reveal0[msg_bytes]; + signal output reveal0[msg_bytes]; + for (var i = 0; i < msg_bytes; i++) { + // the 0-th substring transitions: [(34, 42), (34, 43), (34, 44), (34, 45), (34, 46), (34, 47), (34, 48), (34, 49), (42, 42), (42, 43), (42, 44), (42, 45), (42, 46), (42, 47), (42, 48), (42, 49), (43, 42), (44, 43), (45, 43), (46, 43), (47, 45), (48, 45), (49, 45)] + prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][34]; + prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[15][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][42]; + prev_states0[16][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][43]; + prev_states0[17][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][44]; + prev_states0[18][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][45]; + prev_states0[19][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][46]; + prev_states0[20][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][47]; + prev_states0[21][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][48]; + prev_states0[22][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][49]; + is_substr0[i] <== MultiOR(23)([prev_states0[0][i] * states[i+2][42], prev_states0[1][i] * states[i+2][43], prev_states0[2][i] * states[i+2][44], prev_states0[3][i] * states[i+2][45], prev_states0[4][i] * states[i+2][46], prev_states0[5][i] * states[i+2][47], prev_states0[6][i] * states[i+2][48], prev_states0[7][i] * states[i+2][49], prev_states0[8][i] * states[i+2][42], prev_states0[9][i] * states[i+2][43], prev_states0[10][i] * states[i+2][44], prev_states0[11][i] * states[i+2][45], prev_states0[12][i] * states[i+2][46], prev_states0[13][i] * states[i+2][47], prev_states0[14][i] * states[i+2][48], prev_states0[15][i] * states[i+2][49], prev_states0[16][i] * states[i+2][42], prev_states0[17][i] * states[i+2][43], prev_states0[18][i] * states[i+2][43], prev_states0[19][i] * states[i+2][43], prev_states0[20][i] * states[i+2][45], prev_states0[21][i] * states[i+2][45], prev_states0[22][i] * states[i+2][45]]); + is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); + reveal0[i] <== in[i+1] * is_reveal0[i]; + } +} \ No newline at end of file diff --git a/packages/circuits/tests/circuits/test_email_auth_with_body_parsing.circom b/packages/circuits/tests/circuits/test_email_auth_with_body_parsing.circom new file mode 100644 index 00000000..9e38853d --- /dev/null +++ b/packages/circuits/tests/circuits/test_email_auth_with_body_parsing.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.6; + +include "../../src/email_auth_template.circom"; + +component main = EmailAuthWithBodyParsing(121, 17, 640, 768, 605, 0, 1); \ No newline at end of file diff --git a/packages/circuits/tests/email_auth.test.ts b/packages/circuits/tests/email_auth.test.ts index 2bb08705..eb0b45f3 100644 --- a/packages/circuits/tests/email_auth.test.ts +++ b/packages/circuits/tests/email_auth.test.ts @@ -3,317 +3,436 @@ const wasm_tester = circom_tester.wasm; import * as path from "path"; const relayerUtils = require("@zk-email/relayer-utils"); -import { genEmailAuthInput } from "../helpers/email_auth"; +import { genEmailCircuitInput } from "../helpers/email_auth"; import { readFileSync } from "fs"; jest.setTimeout(1440000); describe("Email Auth", () => { - let circuit; - beforeAll(async () => { - const option = { - include: path.join(__dirname, "../../../node_modules"), - }; - circuit = await wasm_tester( - path.join(__dirname, "../src/email_auth.circom"), - option - ); - }); + let circuit; + beforeAll(async () => { + const option = { + include: path.join(__dirname, "../../../node_modules"), + recompile: true, + }; + circuit = await wasm_tester( + path.join(__dirname, "../src/email_auth.circom"), + option + ); + }); - it("Verify a sent email whose subject has an email address", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - console.log(circuitInputs); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1694989812n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 0.1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose subject has an email address", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test1.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + console.log(circuitInputsRelevant); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1694989812n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 0.1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose subject does not have an email address", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test2.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1696964295n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Swap 1 ETH to DAI"; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose subject does not have an email address", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test2.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1696964295n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Swap 1 ETH to DAI"; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose from field has a dummy email address name", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test3.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1696965932n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose from field has a dummy email address name", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test3.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1696965932n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose from field has a non-English name", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test4.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1696967028n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose from field has a non-English name", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test4.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1696967028n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose subject has an email address and an invitation code", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test5.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = - "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1707866192n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 0.12 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose subject has an email address and an invitation code", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test5.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1707866192n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 0.12 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose subject has an invitation code", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test6.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - const accountCode = - "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1711992080n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = - "Re: Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC"; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - }); + it("Verify a sent email whose subject has an invitation code", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test6.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const witness = await circuit.calculateWitness(circuitInputsRelevant); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1711992080n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = + "Re: Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC"; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + }); - it("Verify a sent email whose subject tries to forge the From field", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test7.eml"); - const accountCode = - "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); - circuitInputs.from_addr_idx = circuitInputs.subject_idx; - async function failFn() { - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - } - await expect(failFn).rejects.toThrow(); - }); + it("Verify a sent email whose subject tries to forge the From field", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test7.eml" + ); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...circuitInputsRelevant + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + circuitInputsRelevant.from_addr_idx = circuitInputsRelevant.subject_idx; + async function failFn() { + const witness = await circuit.calculateWitness( + circuitInputsRelevant + ); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); }); diff --git a/packages/circuits/tests/email_auth_with_body_parsing.test.ts b/packages/circuits/tests/email_auth_with_body_parsing.test.ts new file mode 100644 index 00000000..df9a8239 --- /dev/null +++ b/packages/circuits/tests/email_auth_with_body_parsing.test.ts @@ -0,0 +1,481 @@ +const circom_tester = require("circom_tester"); +const wasm_tester = circom_tester.wasm; +import * as path from "path"; +const relayerUtils = require("@zk-email/relayer-utils"); + +import { genEmailCircuitInput } from "../helpers/email_auth"; +import { readFileSync } from "fs"; + +jest.setTimeout(1440000); +describe("Email Auth With Body Parsing", () => { + let circuit; + beforeAll(async () => { + const option = { + include: path.join(__dirname, "../../../node_modules"), + output: path.join(__dirname, "../build"), + recompile: true, + }; + circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_email_auth_with_body_parsing.circom" + ), + option + ); + }); + + // it("Verify a sent email whose from field has a non-English name", async () => { + // const emailFilePath = path.join( + // __dirname, + // "./emails/email_auth_with_body_parsing_test4.eml" + // ); + // const emailRaw = readFileSync(emailFilePath, "utf8"); + // const parsedEmail = await relayerUtils.parseEmail(emailRaw); + // console.log(parsedEmail.canonicalizedHeader); + // const accountCode = await relayerUtils.genAccountCode(); + // const circuitInputs = await genEmailAuthInput( + // emailFilePath, + // accountCode + // ); + // const witness = await circuit.calculateWitness(circuitInputs); + // await circuit.checkConstraints(witness); + // const domainName = "gmail.com"; + // const paddedDomain = relayerUtils.padString(domainName, 255); + // const domainFields = relayerUtils.bytes2Fields(paddedDomain); + // for (let idx = 0; idx < domainFields.length; ++idx) { + // expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + // } + // const expectedPubKeyHash = relayerUtils.publicKeyHash( + // parsedEmail.publicKey + // ); + // expect(BigInt(expectedPubKeyHash)).toEqual( + // witness[1 + domainFields.length] + // ); + // const expectedEmailNullifier = relayerUtils.emailNullifier( + // parsedEmail.signature + // ); + // expect(BigInt(expectedEmailNullifier)).toEqual( + // witness[1 + domainFields.length + 1] + // ); + // const timestamp = 1725334030n; + // expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + // const maskedSubject = "Send 1 ETH to "; + // const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + // const maskedSubjectFields = + // relayerUtils.bytes2Fields(paddedMaskedSubject); + // for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + // expect(BigInt(maskedSubjectFields[idx])).toEqual( + // witness[1 + domainFields.length + 3 + idx] + // ); + // } + // const fromAddr = "suegamisora@gmail.com"; + // const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + // expect(BigInt(accountSalt)).toEqual( + // witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + // ); + // expect(0n).toEqual( + // witness[ + // 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + // ] + // ); + // }); + + it("Verify a sent email whose body has an email address and an invitation code", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test4.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725334030n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = "Send 0.12 ETH to "; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); + + it("Verify a sent email whose body has an invitation code", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test5.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725334056n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = + "Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC"; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); + + it("Verify a sent email whose body has an invitation code with sha precompute string", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test5.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + shaPrecomputeSelector: '(<(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)? (=\r\n)?i(=\r\n)?d(=\r\n)?=3D(=\r\n)?"(=\r\n)?[^"]*(=\r\n)?z(=\r\n)?k(=\r\n)?e(=\r\n)?m(=\r\n)?a(=\r\n)?i(=\r\n)?l(=\r\n)?[^"]*(=\r\n)?"(=\r\n)?[^>]*(=\r\n)?>(=\r\n)?)(=\r\n)?([^<>/]+)(<(=\r\n)?/(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)?>(=\r\n)?)', + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725334056n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = + "Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC"; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); + + it("Verify a sent email whose body has an email address", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test1.eml" + ); + + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = await relayerUtils.genAccountCode(); + + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725333972n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = "Send 0.1 ETH to "; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); + + it("Verify a sent email whose body does not have an email address", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test2.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = await relayerUtils.genAccountCode(); + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725333989n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = "Swap 1 ETH to DAI"; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); + + it("Verify a sent email whose from field has a dummy email address name", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_with_body_parsing_test3.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + + const accountCode = await relayerUtils.genAccountCode(); + + const circuitInputs = + await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 640, + maxBodyLength: 768, + ignoreBodyHashCheck: false, + }); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + + const timestamp = 1725334002n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + + const maskedCommand = "Send 1 ETH to "; + const paddedMaskedCommand = relayerUtils.padString(maskedCommand, 605); + const maskedCommandFields = + relayerUtils.bytes2Fields(paddedMaskedCommand); + for (let idx = 0; idx < maskedCommandFields.length; ++idx) { + expect(BigInt(maskedCommandFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + + const fromAddr = "zkemail.relayer.test@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedCommandFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedCommandFields.length + 1 + ] + ); + }); +}); diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test1.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test1.eml new file mode 100644 index 00000000..acc2a526 --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test1.eml @@ -0,0 +1,99 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2292880pzb; + Mon, 2 Sep 2024 20:26:13 -0700 (PDT) +X-Received: by 2002:a05:6808:150b:b0:3d9:dcf8:3450 with SMTP id 5614622812f47-3df1d6c9fd0mr10834263b6e.33.1725333973230; + Mon, 02 Sep 2024 20:26:13 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725333973; cv=none; + d=google.com; s=arc-20160816; + b=Or2c81F0BxQPujZAycIXjnI4Da1ttYJssstQ8U0SoqyoScfAebQ9Y/bsryIAjabd4G + L3aorv/kCT8M1g7iHiw/NpN5ZHsi8QsLOvFEpHwPcP7OSsw+jqk2Wc3xNPxp7HuQ144Y + BNexXMUdyy/a8HqxQEO1VRiFgmioumOmqq36ZLYEE2ca2737uWPK5xeeh7USLcCCBGNN + Lrs6iXTdorWf23DA5fc5CaGGHSRLNU7uWdc9dl3pOJmOKe2Px7e/YjL76swK7bcugUOh + M45oY5IpQTH+ffl3bGPj7ZAl6mRgmxR0IfqcHMs9T1hh+/PCLYlx2NT2L+XBnnvZrkeV + smHw== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=f9Hc/nL83NGWPdJxrViC0AIkkQ4clr94hybomVgejcc=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=M+pAcWxMY0vGS6StP3u3EAIrXI1s5kJLsnVlg04cneoduJJbKJhzmqn54eTBFPAz3P + p+8JPc5oqEIIJNo9z7XXcUJgPN4JxjL1PRJK3HC9/RJiJzxConHmk2pgQR8yPjCBP4vO + 7aYChPCqFp4sg8Igu2944AXu+HrKZ0fjX7jLjKadZP0oDxEuYa9V6xGCksrlv3SEhjBq + 8qlvUBs8dmE6tbn0d++xLtMi9Nf0EguWrpSMlM6jeQypQqP5d3cCAWytkneXGYMVFnuw + 4wdzLx6ES9kGcMmPocPBxMvTSLleVrtfqc4/htq0hvrL3RTJH+/6t8KJa5Q/TyNv/Wfw + vHJQ==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=O6zda08N; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id 5614622812f47-3e009055345sor978536b6e.8.2024.09.02.20.26.13 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:26:13 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=O6zda08N; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725333972; x=1725938772; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=f9Hc/nL83NGWPdJxrViC0AIkkQ4clr94hybomVgejcc=; + b=O6zda08NR9i+owavm18Nls4qTKfC/Sli2xMUxm/MwOTE08/NnAbVBfb/nW8cjfQvu/ + VUGwolr7JHfQPGfz2cIcmq1thTadajKDvMgdGyHLjBoS7I0IO92DfPnDZ0lnTpxRpJGk + iIEfUbM4Ety4FgWml530KoqxyDcALpjidUntVPDwWTyfpsT32UIFrVsT//a/XT819p1B + j5bTaUuECck34g1Nzrlw0igZbSqcezJxW4zUXdhw0vwRxel+b0MfVIM52kq5/cUO3+ms + 7q9iX6mi6d85vGukaNO1Asg7C4Wg/ZI/MSeJY8I9BaDv+Mnot6V6g/VWPZBuCH5uy7lV + tyRQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725333972; x=1725938772; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=f9Hc/nL83NGWPdJxrViC0AIkkQ4clr94hybomVgejcc=; + b=cZlwazE7t3fMZVLwHra6V3TYQSiNKSTOGtp2oyGU3JBiwbnvvVfCvaXxtfsea75P1o + 3CcbySf7Iz6wRe7oRK4uZ89QDD3jAaLwYyqy5s60rSzdL6l1Sv5SY2LIm8fsJD6opBgM + 2O//IisXbUpVfnZhXSzNjjhoZrXkdtfAU12XL9+kJ3uMFJmQhm9posQEIIJcl9xVrX/S + 9mt9hkx1M8izBRTp0JjUcKxlYzO9QVaTVa95WJelEqJxkE93TQLz3FKvNkxq/7LWfFu+ + kJN+HSUM25t+dROqyzNrq6LdFqoXPl3lkDkOEk0k0rgYgTt2OErnzzUiLYSNUcyzyzTb + m2nw== +X-Gm-Message-State: AOJu0YzE3TCQJvuA6zpdGWCtczTRnhPDrsVF/AJQsqsSCGd+QIN3YfpQ + x9XdxYhPWH22ysCPIBoC4tRHhTmMUYK/0CEuRS536Fj8le64B6xLuc3OIp+0 +X-Google-Smtp-Source: AGHT+IETvU24uvVDYJP0KXKqGWL/iQrzLB72SRXiSG8CdEVht/WSOe6oGBdVMCKC4+FICgx3qCeX5Q== +X-Received: by 2002:a05:6870:56a1:b0:25e:1f67:b3bb with SMTP id 586e51a60fabf-277d0329191mr9496139fac.10.1725333972467; + Mon, 02 Sep 2024 20:26:12 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e56d885fsm7524515b3a.155.2024.09.02.20.26.10 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:26:11 -0700 (PDT) +Message-ID: <66d681d3.050a0220.391c1d.9adc@mx.google.com> +Date: Mon, 02 Sep 2024 20:26:11 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============2959808677043960680==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 1 in Quoted-Printable Encoding + +--===============2959808677043960680== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
Send 0.1 ETH to alice@gmail.com
=20 +

Thank you!

+ + + =20 +--===============2959808677043960680==-- diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test2.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test2.eml new file mode 100644 index 00000000..acbdc814 --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test2.eml @@ -0,0 +1,99 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2292972pzb; + Mon, 2 Sep 2024 20:26:30 -0700 (PDT) +X-Received: by 2002:a05:6a21:33aa:b0:1ce:d418:8ee6 with SMTP id adf61e73a8af0-1ced4188f03mr11873583637.41.1725333989839; + Mon, 02 Sep 2024 20:26:29 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725333989; cv=none; + d=google.com; s=arc-20160816; + b=VkgqqX17BqArmHM9zE1Sv38Sy/WhZlJqc8+fTIlevFZmhTSupOGBBP/PJlU7e7GrKD + ANVk+jaZ8iSrDXRrKz9kl7b8PzwgBjLx6zZS7ukjQCFHhjRLgfHx85S9IpbHWmV3s85A + +fAf8mjJSGIQTfcvAr/CsD7C01/s62Z5cB6Ws42ahzrs3a+jG6g//LVEpt4OxI8MlpD3 + NpLh4JISg/+Qj3WtDc+vGH8geo+K3l84sncA+3ssSbl7obf+paM11oRmQ0HZ6Kxjgl42 + DoatwZc92XdNwyLYRrj1GBP5Wjj4B0Nsl2+gPaZfNeJRjSV5vIcrNQFWQAUVPpABJNOs + MvJA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=kMJCDTrnZkOSpmyPJBDtHkISRN8g4Yz0r8180BggkYs=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=Pe1HohCMTk6Sk+AP6eKP9xNdL1jC7oOuSYn75vUkF4y7U1/aWCFn2qmQnqJGLH3Re3 + vffLCSoyC53egaN3PKUppB/OKplKet5va8JpWpTVktwxn+aWJJi2QZJlruM7pnLQuRNq + iLw9TgrCYsfKE4d9Z4MRH15AfJXgXk2iqjUFDsBlNTQ4GBJ3bP3BG78lGCe44Gg1Zu/c + yBTNFr4sxa/UmcaPxK3jPIdYcWQkNvvellzySbLYZO1jBqKBoLlsSHSSoAoHSJL9jEVu + MLCCZgi4FIq7WYk6kQGCUJOSrbhhrRNNxlUcxp3IjLaVJfBOmC4wePFf+SVPcyiC8xes + R+vw==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=MVtCnZAi; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id d9443c01a7336-2057e0422a7sor20920025ad.10.2024.09.02.20.26.29 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:26:29 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=MVtCnZAi; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725333989; x=1725938789; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=kMJCDTrnZkOSpmyPJBDtHkISRN8g4Yz0r8180BggkYs=; + b=MVtCnZAiJUQcLe90vtckJLx7wZ9v1+/fIznIS8E+MhWrLiTNJnLH6mFO9B9+1MaxvA + Nf/DygEK/RkJdxGVUUKztJbb4dhibFlPosq30puiv8VAz/eQ3byOjs7ttgbg9cTKb0z1 + yOFB0KvGikzizhJ7194FtnB3Gkj6ou+95UhmLwwdhLMjc5l324/3EZkjMtAbQIsJDA+l + uMY1oAQu3STheckLgwfQNX9Nd/RP6dlXDCT+S2RCfhOIGCTtUXCNiWQCqI4W40LhkocT + WNv63OF/yAlVAeujej563hKSS7yez4hXgEUjlaEhuOUk6cIlQZQe8zh0R/24N4DrzhwJ + hzrw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725333989; x=1725938789; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=kMJCDTrnZkOSpmyPJBDtHkISRN8g4Yz0r8180BggkYs=; + b=vj7fWIRsDdLPRuVSHhuxSKSZ6OAP//6i1E8HCoJvaNgXBkQ1kWWb39B3HSyWqbnMyi + KEVfYVhXWB2gSDjZ0ACgVoXm5XwpCpLrX8owtV1w0szJMt61XnhyScLPnIAHyXjoGJJs + 7O0UjtA7xJ+NKcBCa5+VMoTvsS0aYAkn+MqN7krvr5LMJCLkLcVL70cX3CccUyEclU8Y + nU8zPqK58NJh6TX2m797dfklm6C7PkNqfFGaRbkiz7nDnNRWv2/FDqiqgGtKw9Hm7YGP + e8A1fPHCUaBVOr8wqfDCBtdzSdqw91Qv7SNeOUZDOaUYtMNNeAagjLXhGEyoJEd8bzGM + XLLA== +X-Gm-Message-State: AOJu0YzVx0Rb+UU6K7nLWD86jmPMZ/4D4SC788YtnLiBvnEn5FOs3lnK + 1CYLUW2x1KDPn3iCmxZYRhCSr0+9W4h0bAYlti8fLY9mGWDEj0tOiN1FoWf/ +X-Google-Smtp-Source: AGHT+IET6Mh/8Hf1vpOk9aRB4RCcB68oWyYgqDrlXcWvQPb0/3KXubl7we74mTvi+Wv+cIBhzIlcfQ== +X-Received: by 2002:a17:902:d4c4:b0:203:a150:e5f5 with SMTP id d9443c01a7336-2054584f0cemr125616665ad.0.1725333988901; + Mon, 02 Sep 2024 20:26:28 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id d9443c01a7336-205152d6a82sm72589255ad.73.2024.09.02.20.26.27 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:26:28 -0700 (PDT) +Message-ID: <66d681e4.170a0220.3d8a18.8403@mx.google.com> +Date: Mon, 02 Sep 2024 20:26:28 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============0042709324325514954==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 2 in Quoted-Printable Encoding + +--===============0042709324325514954== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
Swap 1 ETH to DAI
=20 +

Thank you!

+ + + =20 +--===============0042709324325514954==-- diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test3.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test3.eml new file mode 100644 index 00000000..73597d3e --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test3.eml @@ -0,0 +1,99 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2293050pzb; + Mon, 2 Sep 2024 20:26:43 -0700 (PDT) +X-Received: by 2002:a17:902:d2c2:b0:202:435b:211a with SMTP id d9443c01a7336-20545e4436bmr97493665ad.12.1725334002979; + Mon, 02 Sep 2024 20:26:42 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725334002; cv=none; + d=google.com; s=arc-20160816; + b=uEiGeXd1Z2Ju6FYVT8BfHRNXS/toJyw+XUs77ZJ8X+mxFccncK8/nGpZz+CPQ700vH + wjzVe1RiTP80fdf2PlxUkklZaqiJijFcTh3AVQRWHqil83JZXwm48YURmmghJuRPxnw9 + jE3Quc8c3NeqmVvkKkSvQs0oU0Esbk5mIzvVwenXuNIEkzrbf7d2pgi/ApR1p4D9kVZM + mf5mnKFUTvehd2sCESq5k+FjpOkhAk1oHD0IFWHqEjy2xc/3ZBdV0lrhrN20OHrXOrRW + HgxXrwa8Uj7Xtah9u5QEqgNju6mgtyK4CIZX0qUoONXzfwBeYKlN3C8Pq5cRYohyyOr8 + wV7g== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=f8710STYOn4HlDHwwdcTMiys25mwsCzNla6ZCLV3yMg=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=Yy9NLuG9CzblzXaTHPu2iZ4TJCgKRcm11vdgSTlSn/yzA5CJEoM8WlCrcGCNIO7vkz + OUkz+FE0vqymKmljTvcMJvMVyjGPPKZqvuiZJshsyGI1y/lFGnl/fbc3jwX+T+Y7MTTO + F6C2ljMd5T6JlANdNZihzy9jPr5otzVj1GJpHNr5m/eoY6PGBtWGlIil8NssHtG3fBUH + zdkVPhjoAiXlxBpZGaoqCSPgE+uEe6atcanA+35qhZuMcEkLpJBtTwVdko38JZKDOMpL + RJF1MW18BIhT+d1D99f6dwzwgGtMDeh4S2f6T0NPoLmuhRvfAHkTjOVP4sQdxeIbI1Zo + ys8w==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=lMQLdMSV; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id d9443c01a7336-2055fc5719dsor28201735ad.15.2024.09.02.20.26.42 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:26:42 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=lMQLdMSV; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725334002; x=1725938802; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=f8710STYOn4HlDHwwdcTMiys25mwsCzNla6ZCLV3yMg=; + b=lMQLdMSVp/7wPg1s5m3PAfMIEHK2b0nlHYjH93u5VgO5NWFd7sfkszh6F6apHN6/kb + +Nra6aolsxToj63IhXfa/GwSD+m+/6iYAdBs65qK6jGz+sn+hlRZMxKhP5aWq56t0z9D + sAEqxBOfZxMIvFrUF35lZYc41wn8skCY09/zM5FBZql+N1Yz+pDaOLqEDYxH+NyfTsUd + DK8OYQBOrnn7jVhdIe+Y4fqKIZc10U8lX2Z1kn+xlUsDlJCvv+zetOkV7MvZWHlCztR6 + /LOQ6qudI5P6I5rpNlG2fSyawLbw6gXIYPG9+DYLd0zNi3ryQyTazlEoARqigG7eNjNf + zwuw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725334002; x=1725938802; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=f8710STYOn4HlDHwwdcTMiys25mwsCzNla6ZCLV3yMg=; + b=FJHUIC0Hqj2rtGf588tbo5RYek/zrNwbhkc27sgxDFt+kZb8rqZ3BJi6DujAWfZONP + tzdwy4tZ7gTaUI7IvikEUO09R3OTweswDdRN2L3yv4vr4AjxkRlb/+CtQESBfAmXMkDg + 6LZoKX60J1zf6qVaN4hQfMwz5O1mw4OEU142USp0K6vbIWDkz+w5mq2bJy+KD9Nvdi9E + 3UUKzIkQY/57frXaXOhTedgrG4g7K5sR1mOHs7fxh3q82oSuww35dV+SvptYhDdQ+4TV + vkIEo7Gw+4oUIz8CDuDvUhYb5ZoYG6Fmn3Xnh3WBGC4oLSjd+i9ygXEJYQEgyf++nC5G + b6Fg== +X-Gm-Message-State: AOJu0Yx6bH5Kl5CcKczaWlA6nWsA7f5NVDm5OTE5pztJ42NJsAAI4QSm + 6udxinC7SPOEtXh7U90cllrGZqxPGzLCL3WyWFbxceq2yV5d3VkzKP5s2oB9 +X-Google-Smtp-Source: AGHT+IEA0HPWgX2q3BOHjthN+1yqjDJ/hMtZK7S/BFHVkPNocQjqX+AjemH6nYu4TyFpk0a1kxhy1g== +X-Received: by 2002:a17:903:2a8f:b0:205:79c:56f5 with SMTP id d9443c01a7336-20546600327mr97857255ad.27.1725334002025; + Mon, 02 Sep 2024 20:26:42 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id d9443c01a7336-2051553444fsm72325535ad.148.2024.09.02.20.26.40 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:26:41 -0700 (PDT) +Message-ID: <66d681f1.170a0220.12d0ca.8356@mx.google.com> +Date: Mon, 02 Sep 2024 20:26:41 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============0987519910738789604==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 3 in Quoted-Printable Encoding + +--===============0987519910738789604== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
Send 1 ETH to bob@example.com
=20 +

Thank you!

+ + + =20 +--===============0987519910738789604==-- diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test4.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test4.eml new file mode 100644 index 00000000..a8ce5724 --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test4.eml @@ -0,0 +1,100 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2293211pzb; + Mon, 2 Sep 2024 20:27:11 -0700 (PDT) +X-Received: by 2002:a17:903:18f:b0:206:8915:1c74 with SMTP id d9443c01a7336-20689151e9bmr33323015ad.21.1725334030783; + Mon, 02 Sep 2024 20:27:10 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725334030; cv=none; + d=google.com; s=arc-20160816; + b=wdNsVOozRFI1hgKVloWZxS53oU61K7xFzzRplY66LZ913+rNgyp5hm7xagL01q7G3f + c5eQzmZJY27rz+/GIcOzCrREyMZ4i3mZO12Na/rDUO0ZOSPvengwE0LUq74Kf8BPHTD8 + W8kYIpcAs2Kj0mVjjOkpNYLTf6CQXVuVXfkO9lbI0tiHChRaMe0HcBDiukLuw1QnSPyw + JHKGL+oraOajrKgQn+9v2Gq1qRgTwtiWPguzzVH8vFiKdnN2EUtsEkYG28ltJ//+tZQZ + zWp8w1QCVgpkgo2oDIRQwSR+vDD/HcLeI6yYggbJFzxH0WfraueH6RKtMo/pJP/2wEWz + eAkw== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=LfVYp25jYyoop0tyJg90MQNaEpNP30xYSQbkPrcxeys=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=jR9YEYcEtB26BsWiy3lo8pWH+cJxY2Th0NhrtW45C/8kTjGM8MnVBH8sx/11pBVynv + Y1VTa6g1uh9Iw0ffRX5mq85uJLr/5YP4KJz50pj3KA00852NQbgQWlOK+fWdGfDmnjXx + b5bFrqrz5K5MGi4aWLvblNx3guKgmxCoTX2gVyZusdVqWKmSkS/iZFOwED8hmhiyAuU+ + 6IbtTS1T0YZfhJf8DSr7Ek+KPUn+obM6o8iFIXfEZ1DmflJ34SLqeEmIP82h2Fp7Fev7 + u28/a7n89aV0LBvxmuFaz6JB24P6anu1bH9yVtUHUTmJPFUMZ5veDSEd+Ujd5AolTJRL + a6zw==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=mXlcPFDH; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id d9443c01a7336-20545567fe2sor26776665ad.0.2024.09.02.20.27.10 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:27:10 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=mXlcPFDH; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725334030; x=1725938830; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=LfVYp25jYyoop0tyJg90MQNaEpNP30xYSQbkPrcxeys=; + b=mXlcPFDHbtf0M1iLCrfdz0EGEXq0vtmRgWXUdg25He3e7bVnd1sKewA94FRBQfgGMi + uKFSoVvwnqkExI42RH2MC+gAJc8Ak0SNc2Ap0xaakYf5H30uCSuojndaO/L36OSBrAGH + T9rUmPsfY5pId/FjVV4TfcJ9TJVs39qmu11K0qxnGDL4ZymsKSZH6muaiEf2IXyhx/Vf + rp4lCci40EAL3pEf9NzAg+rbqN76pgSzH59TQdi8KRpw105ZFRiYDPGz6Rgpi0haOqY3 + KiUdGDlvU2NLWfovy/UsVk7REj3ymTnE2yegxhjL+KV9oDA3YxF6amNg+hGhBoN3sV2U + jr3w== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725334030; x=1725938830; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=LfVYp25jYyoop0tyJg90MQNaEpNP30xYSQbkPrcxeys=; + b=PFlVUrl1wZdTNs5Lp5/XDZYCwOk45oguULZRu0o+IvVUNv7JYzFleGkQ6d5XBDPaOl + B7/geCCSUoVQpFpyzUgX5QTziD7PhCrpdEn1O6M6gQeGxF9iH7BZQ64nbkN7yLiw26/v + 4e/zgCdIRggMtHqCsM+Koub7CUP35PFsSA9P5AioicP9HtyIXYEPdmWZWzY4GjwNRKWY + dFfWX+K70AAbD9p6nT3mxVB46zNS7LOroo4zdh1QHwBeEboJ7rCqJJrn/tcjXK7bNn4J + JclOC9rmZdAWYmQpdHHup1yD8Ib6qCnRd+FUIvMq08Gg/IY2R0B2Q+Ry8GtsBEFgApFU + qN0w== +X-Gm-Message-State: AOJu0YzVMISxzhpu7gC683CLUQ4tB51nEbRKj9ezQBl7fdyysl3tLDPV + ATxZ9i0XiWKUpW4lMcsKUic46EGcwxHGSgudFnvbNBGFGiRtgvG1Kd0iLo7a +X-Google-Smtp-Source: AGHT+IEO/B6vXlNM8Cx+vrJRxH+OX4MczcsA5584OXogSaGEd1OrhLesW7HWj3dnRrjhIeZtctGQmQ== +X-Received: by 2002:a17:903:94d:b0:205:3475:63be with SMTP id d9443c01a7336-20534756a0dmr168375605ad.25.1725334029915; + Mon, 02 Sep 2024 20:27:09 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id d9443c01a7336-20515545d75sm72218255ad.237.2024.09.02.20.27.08 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:27:09 -0700 (PDT) +Message-ID: <66d6820d.170a0220.4ad58.8166@mx.google.com> +Date: Mon, 02 Sep 2024 20:27:09 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============8219893973391566718==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 4 in Quoted-Printable Encoding + +--===============8219893973391566718== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
Send 0.12 ETH to alice@gmail.com code 01eb9b204= +cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76
=20 +

Thank you!

+ + + =20 +--===============8219893973391566718==-- diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test5.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test5.eml new file mode 100644 index 00000000..6c690e76 --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test5.eml @@ -0,0 +1,101 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2293347pzb; + Mon, 2 Sep 2024 20:27:37 -0700 (PDT) +X-Received: by 2002:a05:6a00:cd3:b0:70d:34aa:6d51 with SMTP id d2e1a72fcca58-717457407c2mr7170342b3a.6.1725334056856; + Mon, 02 Sep 2024 20:27:36 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725334056; cv=none; + d=google.com; s=arc-20160816; + b=FF4IN2z9s+3xgu/A4NYxIwC8MEnOyT3+2fcyPO96NqZf5WNUje4/5SGy6+ihT0Iy0m + 9sn/WLazma2OV3egdpx0Wm07Mq3oEY9zYF9gTVGhee65YXsDOhc3jMX19Ff4NUuq8euI + x9rSU8CI3sKUjgg9OcnGTsuTwz1dwUn9EDxIFpFp2sk0vrCKU9ACfU4GOLkQPkCpEHOO + fr5fKNWH6gY72yqOiElwE2wzKo5ewWvO5OBLZw+ba295IFhJ9rBIbejvdXiuXdj8NIqa + qJjr/lWfcEnl3eSyhlIUaUuM0OmALKFjU/V+XkMfRm8EMfBqXwuS2QjDKCyZqQRnuK86 + IsIQ== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=WgHRFiGakPoqy0EgpGEskuPH5Lowb5jxC1QjM/mOplQ=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=MkLaavfotmEo4N1+appKWr23gEdy8YLU6q7Dtm6wNzr6faMtkqdk32/1jnzZWdZ1/N + 0dTqvSu1XrG8BC02MUDRgIMiiJAWxIsg81m3ep0/+/61lz4eQcqTo5Jus6V1aV3N7Laa + pGbHq3OESQQtU9n9OBD53V2uaa8+sP1rMyp/TEvd3xZK5aXHVqvntyShhTu9BRS0COYr + 2FsBf2PkVAeAp/l/J+VtLk7+wIi18sx7UMFM6TyiF1Z8Vr0DUwrUm8Q8pi4a+0R7kKht + IK7fUJ7sNVp99XeP79DVHKJAFXcD5hwrouoZyGBzLLPegoCPECHrE43rWwMUdRuvGcfG + 0aug==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=UxRTsGzj; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id d2e1a72fcca58-715e57a3b0dsor4931608b3a.12.2024.09.02.20.27.36 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:27:36 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=UxRTsGzj; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725334056; x=1725938856; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=WgHRFiGakPoqy0EgpGEskuPH5Lowb5jxC1QjM/mOplQ=; + b=UxRTsGzjDtHkStktw2ZtGu7c10lEGvz7gmyPWVFBtHjg7TTK4+oL11m/8tSHNgmW22 + Ks+aGolMq420DYfhfFDPXoj0Jp6K0/20ffT93MrGTLA2b1a1wdAu0otvphy9gQazHetl + 25Uqk7RSaOaEqqBFBCftXC/cjVOcPz3GdjKhkdcCiXB5VMsBqNIwY+cJkJuiqz7+0tRY + 44jLWDAJnx7maeknXYVBBhhYo7D8MNa6E8d+HcDfGNheCKydVAB4eBpLd5RQSOygZ/RJ + MfdTiBwaqDHiUdF5u7I6c0NPqPRVLQJ7BTEwDWWqZsd8/Gaujd6wV8YROuwUX0/ilUjM + U2rg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725334056; x=1725938856; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=WgHRFiGakPoqy0EgpGEskuPH5Lowb5jxC1QjM/mOplQ=; + b=dWJFooeQ8q+PZZsM5NTndOU7IXeI5McolVtTis3cROJiH/oFW/k1SgToIlTUmNdnhA + YPiZr2ItjzoJsfsCHfVb73AX3BU0mYXT5+Sjt2AAd/JNbyWnfVBB0ZJjd6rlt2S8jmjI + M+/KcwF1Sou4hOHwRjxQDhBs3iKP9viSUVU+9fKPSv+OlMovcHiPNKWfH1RmwcTNDBR1 + RE3d7IU5QlTx+bLikUgLYIryImxLC5lfuHbIko3NlBzxLZrA9Pj6hF76iT9UXFxa+6BK + B3+Y3u0o9enBfJiTsXhjk2RoEG+LcZgnJBQSqwC/YeVaWvh8HxY75F2D2ldxIarM22HN + tJ/g== +X-Gm-Message-State: AOJu0YzKj2b6fLP+w6zuYHVb05MlFmSVhvlQ5FSLE+c3m4KFTG9Ic+pJ + EyS8NK2IxycikeIweP5EWCRqxlBMTbCM4bIfAMDms/Al72Bxr/kotdJ1jDmf +X-Google-Smtp-Source: AGHT+IHD7n5/xZAHlyRK90hV7Q5EOvA71n45FOOpoWYj42EVRljal1jdEFIr5ccEMPl4UR8k+pYOHA== +X-Received: by 2002:a05:6a20:d493:b0:1c2:905c:dc2 with SMTP id adf61e73a8af0-1cce100b43emr14035663637.15.1725334055878; + Mon, 02 Sep 2024 20:27:35 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d8e9a0002esm2525225a91.14.2024.09.02.20.27.34 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:27:35 -0700 (PDT) +Message-ID: <66d68227.170a0220.c88d4.721a@mx.google.com> +Date: Mon, 02 Sep 2024 20:27:35 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============2480312449962561214==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 5 in Quoted-Printable Encoding + +--===============2480312449962561214== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
Accept guardian request for 0x04884491560f38342= +C56E26BDD0fEAbb68E2d2FC code 01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc0= +7763475c135d575b76
=20 +

Thank you!

+ + + =20 +--===============2480312449962561214==-- diff --git a/packages/circuits/tests/emails/email_auth_with_body_parsing_test6.eml b/packages/circuits/tests/emails/email_auth_with_body_parsing_test6.eml new file mode 100644 index 00000000..739cea3b --- /dev/null +++ b/packages/circuits/tests/emails/email_auth_with_body_parsing_test6.eml @@ -0,0 +1,99 @@ +Delivered-To: shryas.londhe@gmail.com +Received: by 2002:a05:6a20:de1b:b0:1c3:edfb:6113 with SMTP id kz27csp2293443pzb; + Mon, 2 Sep 2024 20:27:54 -0700 (PDT) +X-Received: by 2002:a05:6a00:13a6:b0:70b:5394:8cae with SMTP id d2e1a72fcca58-715dfc76152mr18975970b3a.28.1725334074235; + Mon, 02 Sep 2024 20:27:54 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725334074; cv=none; + d=google.com; s=arc-20160816; + b=un5D2W+ZqEo7Jtp7IWmKsUjcrtaX6AduEjry1n1w1X0fEAa8GhlMid0yDTtijYSet9 + 5CFIhMmNDbo4qgL1nhkUdMYb9hUXIDfucyGGcV5uGXRVgH4zKf4BQsJCX5yejGrUJtyL + kShNK4PNlxg9bwlzFzmFxghdEq6hh4XC5CKMqq7PjhpupTwlNd58m+p9DW9De8agKUul + XXqaPLi944hidp8j4pmilewmO9wvMsPsb4nFJ6Y/kkY89oylCkxCF7PLlJPfPpkrr0E/ + 8JIFzzOCGMi8EzJ1XBt05DhDmYCqemD4u/evzNkHvVV4c1uwKcZ0A6Pr1WNNSYy0EbIr + iAmQ== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=pgWkiyvv1a5DWOqSsp+0OWFkqbooRoO1bv8OEpIkz1c=; + fh=QOoFRDdHXpnQH3LJHwmsRKR4EZHwtZQ4a9eIuVllZDs=; + b=DrjGCyEXF+d99x62EfQqgRYgMocvBuyKI619jIwi41axy/jPVfTVdZVLQ4HY91j6hZ + z/pxIsjf24nHbmXSA9LkZYaSHBLpvWdXNXApH23u8s3Z6hbRnvia3Iz+q2KtwGyfxErK + gBQb2ziysfe7ZrJ5FGnrc9Uak3prq9EfRe0s1Qo5xAJgRRUDhKaptJdxNtWQ6Gsy9xtN + X8R6SgvGygR8W5BM6fYMO0ty3qPm55MNbPEdgrJz6pqgDLbgzUeuCKEwcTrQ4EhE6A6O + aYAt8BcNMtLfeHpe/EHswDs9S2rbjMmS1WpUO9UnQKAekn5xfMM3oLhtMCSmP1sDQE8L + wlxw==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=XRK4dsJz; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id d2e1a72fcca58-715e56aa50fsor4396307b3a.8.2024.09.02.20.27.54 + for + (Google Transport Security); + Mon, 02 Sep 2024 20:27:54 -0700 (PDT) +Received-SPF: pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=XRK4dsJz; + spf=pass (google.com: domain of zkemail.relayer.test@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=zkemail.relayer.test@gmail.com; + dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1725334073; x=1725938873; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject + :date:message-id:reply-to; + bh=pgWkiyvv1a5DWOqSsp+0OWFkqbooRoO1bv8OEpIkz1c=; + b=XRK4dsJz4SAP3hRuQEbzNPmHQRuIwN7gC3Toq/u3YEwIhaR6eFMBUwMcqYqB8UkUiz + KhxCfWVqP3Xoa6L5nKgqcyfF9Kd6lbi1sFD11wCWn/Mz9Hf8k73MmjU9E2KYc2s2zNPw + pWCyzNQONb5cepefmjcatBkoiX7NHVB478Skm2V+HSEze0r8F1nRxmWNZrWkVi6nJDbu + KH+KOhbLL0i1gxCjzUhaAoFvEBk24BIcaSGXfosDiIndYN6YcqkLhFCldEyEwume24VL + cPCF8HujrW7XmeRvCuMCn7wD0LWsLMoSscqp0An2StzAqbogLSMRJxz/epssvQTMTMOG + wjxA== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1725334073; x=1725938873; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state + :from:to:cc:subject:date:message-id:reply-to; + bh=pgWkiyvv1a5DWOqSsp+0OWFkqbooRoO1bv8OEpIkz1c=; + b=VO28pSPISSu6qdDmgTw6HbdIQURR5AkXCDB5/dhyh3YPhJqebY0hkU5nN3zD7ZPlVQ + CxhBbyVXrh4ifk5qepS8+BIr6vBC55lFMxVdmR2gi3aThNPF9KZTYZQTtNUdUwNSYshX + WZfJKzCG0TrQU7Z1jLlFtiRHMRbhrPVchpxmllSc4tFCi4j4/MdxA27vVUZzFjSh4jj8 + UNR2DcNXF85BxLL3zlJ3IBqs677PmguMayXh6HOtl+VuD/JMDnus+fUK346cbWhMDshV + Hj21xUAUPyQYWWMc02/NJsjfgELepRF1dx0B8R+ijITBDHw192iXPb6BYhhp3ioSx6PK + CIVw== +X-Gm-Message-State: AOJu0Yxldlkarwj3YGmKOwL3y3z96btfia/hOxJwkNzLLmi2DUUd1OGh + r7OjvZc0Fj5WxPoq7D5Wr1T6sUpex0wgABDkcz01/ObDYySFXCEKFRzB7cId +X-Google-Smtp-Source: AGHT+IFnf20OpV3I1ih3Ui3X6XFnQvdQOp1AaiGnhvoKcgNNJ3AZUIIv3FUXMtd2f48CH66L39S4IQ== +X-Received: by 2002:a05:6a20:d046:b0:1c4:8da5:219a with SMTP id adf61e73a8af0-1cce0ff26c9mr17830838637.8.1725334073459; + Mon, 02 Sep 2024 20:27:53 -0700 (PDT) +Return-Path: +Received: from adityas-macbook-air-4.local ([59.184.57.198]) + by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d8445e877bsm12521498a91.19.2024.09.02.20.27.52 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 02 Sep 2024 20:27:53 -0700 (PDT) +Message-ID: <66d68239.170a0220.15bca8.a4f5@mx.google.com> +Date: Mon, 02 Sep 2024 20:27:53 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============3823408927414188670==" +MIME-Version: 1.0 +From: zkemail.relayer.test@gmail.com +To: shryas.londhe@gmail.com +Subject: Test Email 6 in Quoted-Printable Encoding + +--===============3823408927414188670== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 + + + + +

Hello!

+

This is a test email with a basic HTML body.

+
from:adversary@test.com
=20 +

Thank you!

+ + + =20 +--===============3823408927414188670==-- diff --git a/packages/circuits/tests/invitation_code_regex.test.ts b/packages/circuits/tests/invitation_code_regex.test.ts index 9621c444..7cfbc089 100644 --- a/packages/circuits/tests/invitation_code_regex.test.ts +++ b/packages/circuits/tests/invitation_code_regex.test.ts @@ -3,172 +3,184 @@ const wasm_tester = circom_tester.wasm; import * as path from "path"; const relayerUtils = require("@zk-email/relayer-utils"); const option = { - include: path.join(__dirname, "../../../node_modules"), + include: path.join(__dirname, "../../../node_modules"), }; // const grumpkin = require("circom-grumpkin"); jest.setTimeout(120000); describe("Invitation Code Regex", () => { - it("invitation code", async () => { - const codeStr = "Code 123abc"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_invitation_code_regex.circom"), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("invitation code", async () => { + const codeStr = "Code 123abc"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); - it("invitation code in the subject", async () => { - const codeStr = "Swap 0.1 ETH to DAI code 123abc"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_invitation_code_regex.circom"), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; - // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; - // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("invitation code in the subject", async () => { + const codeStr = "Swap 0.1 ETH to DAI code 123abc"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; + // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; + // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); - it("email address and invitation code in the subject", async () => { - const codeStr = "Send 0.1 ETH to alice@gmail.com code 123abc"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_invitation_code_regex.circom"), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; - // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; - // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("email address and invitation code in the subject", async () => { + const codeStr = "Send 0.1 ETH to alice@gmail.com code 123abc"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; + // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; + // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); - it("invitation code in the email address", async () => { - const codeStr = "sepolia+code123456@sendeth.org"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_invitation_code_regex.circom"), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; - // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; - // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("invitation code in the email address", async () => { + const codeStr = "sepolia+code123456@sendeth.org"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = relayerUtils.extractInvitationCodeIdxes(codeStr)[0]; + // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; + // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); - it("prefix + invitation code in the subject", async () => { - const codeStr = "Swap 0.1 ETH to DAI code 123abc"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join( - __dirname, - "./circuits/test_invitation_code_with_prefix_regex.circom" - ), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = - relayerUtils.extractInvitationCodeWithPrefixIdxes(codeStr)[0]; - // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; - // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("prefix + invitation code in the subject", async () => { + const codeStr = "Swap 0.1 ETH to DAI code 123abc"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_with_prefix_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = + relayerUtils.extractInvitationCodeWithPrefixIdxes(codeStr)[0]; + // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; + // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); - it("prefix + invitation code in the subject 2", async () => { - const codeStr = - "Re: Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const paddedStr = relayerUtils.padString(codeStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const circuit = await wasm_tester( - path.join( - __dirname, - "./circuits/test_invitation_code_with_prefix_regex.circom" - ), - option - ); - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = - relayerUtils.extractInvitationCodeWithPrefixIdxes(codeStr)[0]; - // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; - // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); + it("prefix + invitation code in the subject 2", async () => { + const codeStr = + "Re: Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const paddedStr = relayerUtils.padString(codeStr, 256); + const circuitInputs = { + msg: paddedStr, + }; + const circuit = await wasm_tester( + path.join( + __dirname, + "./circuits/test_invitation_code_with_prefix_regex.circom" + ), + option + ); + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + // console.log(witness); + expect(1n).toEqual(witness[1]); + const prefixIdxes = + relayerUtils.extractInvitationCodeWithPrefixIdxes(codeStr)[0]; + // const revealedStartIdx = emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))[0][0]; + // console.log(emailWalletUtils.extractSubstrIdxes(codeStr, readFileSync(path.join(__dirname, "../src/regexes/invitation_code.json"), "utf8"))); + for (let idx = 0; idx < 256; ++idx) { + if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { + expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); + } else { + expect(0n).toEqual(witness[2 + idx]); + } + } + }); }); diff --git a/packages/circuits/tests/recipient_enabled.test.ts b/packages/circuits/tests/recipient_enabled.test.ts index fa6a2c80..c168d3b6 100644 --- a/packages/circuits/tests/recipient_enabled.test.ts +++ b/packages/circuits/tests/recipient_enabled.test.ts @@ -2,273 +2,357 @@ const circom_tester = require("circom_tester"); const wasm_tester = circom_tester.wasm; import * as path from "path"; const relayerUtils = require("@zk-email/relayer-utils"); -import { genEmailAuthInput } from "../helpers/email_auth"; +import { genEmailCircuitInput } from "../helpers/email_auth"; import { genRecipientInput } from "../helpers/recipient"; import { readFileSync } from "fs"; jest.setTimeout(1440000); describe("Email Auth", () => { - let circuit; - beforeAll(async () => { - const option = { - include: path.join(__dirname, "../../../node_modules"), - }; - circuit = await wasm_tester( - path.join(__dirname, "./circuits/email_auth_with_recipient.circom"), - option - ); - }); + let circuit; + beforeAll(async () => { + const option = { + include: path.join(__dirname, "../../../node_modules"), + }; + circuit = await wasm_tester( + path.join(__dirname, "./circuits/email_auth_with_recipient.circom"), + option + ); + }); - it("Verify a sent email whose subject has an email address", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const emailAuthInput = await genEmailAuthInput(emailFilePath, accountCode); - const recipientInput = await genRecipientInput(emailFilePath); - const circuitInputs = { - ...emailAuthInput, - subject_email_addr_idx: recipientInput.subject_email_addr_idx, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1694989812n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 0.1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 2] - ); - const recipientEmailAddr = "alice@gmail.com"; - const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( - recipientEmailAddr, - parsedEmail.signature - ); - expect(BigInt(emailAddrCommit)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 3] - ); - }); + it("Verify a sent email whose subject has an email address", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test1.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...emailAuthInput + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const recipientInput = await genRecipientInput(emailFilePath); + const circuitInputs = { + ...emailAuthInput, + subject_email_addr_idx: recipientInput.subject_email_addr_idx, + }; + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1694989812n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 0.1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 2 + ] + ); + const recipientEmailAddr = "alice@gmail.com"; + const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( + recipientEmailAddr, + parsedEmail.signature + ); + expect(BigInt(emailAddrCommit)).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 3 + ] + ); + }); - it("Verify a sent email whose from field has a dummy email address name", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test3.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const emailAuthInput = await genEmailAuthInput(emailFilePath, accountCode); - const recipientInput = await genRecipientInput(emailFilePath); - const circuitInputs = { - ...emailAuthInput, - subject_email_addr_idx: recipientInput.subject_email_addr_idx, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1696965932n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 2] - ); - const recipientEmailAddr = "bob@example.com"; - const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( - recipientEmailAddr, - parsedEmail.signature - ); - expect(BigInt(emailAddrCommit)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 3] - ); - }); + it("Verify a sent email whose from field has a dummy email address name", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test3.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...emailAuthInput + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const recipientInput = await genRecipientInput(emailFilePath); + const circuitInputs = { + ...emailAuthInput, + subject_email_addr_idx: recipientInput.subject_email_addr_idx, + }; + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1696965932n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 2 + ] + ); + const recipientEmailAddr = "bob@example.com"; + const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( + recipientEmailAddr, + parsedEmail.signature + ); + expect(BigInt(emailAddrCommit)).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 3 + ] + ); + }); - it("Verify a sent email whose from field has a non-English name", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test4.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = await relayerUtils.genAccountCode(); - const emailAuthInput = await genEmailAuthInput(emailFilePath, accountCode); - const recipientInput = await genRecipientInput(emailFilePath); - const circuitInputs = { - ...emailAuthInput, - subject_email_addr_idx: recipientInput.subject_email_addr_idx, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1696967028n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 1 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(0n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 2] - ); - const recipientEmailAddr = "bob@example.com"; - const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( - recipientEmailAddr, - parsedEmail.signature - ); - expect(BigInt(emailAddrCommit)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 3] - ); - }); + it("Verify a sent email whose from field has a non-English name", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test4.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = await relayerUtils.genAccountCode(); + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...emailAuthInput + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const recipientInput = await genRecipientInput(emailFilePath); + const circuitInputs = { + ...emailAuthInput, + subject_email_addr_idx: recipientInput.subject_email_addr_idx, + }; + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1696967028n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 1 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(0n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 2 + ] + ); + const recipientEmailAddr = "bob@example.com"; + const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( + recipientEmailAddr, + parsedEmail.signature + ); + expect(BigInt(emailAddrCommit)).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 3 + ] + ); + }); - it("Verify a sent email whose subject has an invitation code", async () => { - const emailFilePath = path.join(__dirname, "./emails/email_auth_test5.eml"); - const emailRaw = readFileSync(emailFilePath, "utf8"); - const parsedEmail = await relayerUtils.parseEmail(emailRaw); - console.log(parsedEmail.canonicalizedHeader); - const accountCode = - "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const emailAuthInput = await genEmailAuthInput(emailFilePath, accountCode); - const recipientInput = await genRecipientInput(emailFilePath); - const circuitInputs = { - ...emailAuthInput, - subject_email_addr_idx: recipientInput.subject_email_addr_idx, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - const domainName = "gmail.com"; - const paddedDomain = relayerUtils.padString(domainName, 255); - const domainFields = relayerUtils.bytes2Fields(paddedDomain); - for (let idx = 0; idx < domainFields.length; ++idx) { - expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); - } - const expectedPubKeyHash = relayerUtils.publicKeyHash( - parsedEmail.publicKey - ); - expect(BigInt(expectedPubKeyHash)).toEqual( - witness[1 + domainFields.length] - ); - const expectedEmailNullifier = relayerUtils.emailNullifier( - parsedEmail.signature - ); - expect(BigInt(expectedEmailNullifier)).toEqual( - witness[1 + domainFields.length + 1] - ); - const timestamp = 1707866192n; - expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); - const maskedSubject = "Send 0.12 ETH to "; - const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); - const maskedSubjectFields = relayerUtils.bytes2Fields(paddedMaskedSubject); - for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { - expect(BigInt(maskedSubjectFields[idx])).toEqual( - witness[1 + domainFields.length + 3 + idx] - ); - } - const fromAddr = "suegamisora@gmail.com"; - const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); - expect(BigInt(accountSalt)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 1] - ); - expect(1n).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 2] - ); - const recipientEmailAddr = "alice@gmail.com"; - const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( - recipientEmailAddr, - parsedEmail.signature - ); - expect(BigInt(emailAddrCommit)).toEqual( - witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 3] - ); - }); + it("Verify a sent email whose subject has an invitation code", async () => { + const emailFilePath = path.join( + __dirname, + "./emails/email_auth_test5.eml" + ); + const emailRaw = readFileSync(emailFilePath, "utf8"); + const parsedEmail = await relayerUtils.parseEmail(emailRaw); + console.log(parsedEmail.canonicalizedHeader); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const { + body_hash_idx, + precomputed_sha, + padded_body, + padded_body_len, + command_idx, + padded_cleaned_body, + ...emailAuthInput + } = await genEmailCircuitInput(emailFilePath, accountCode, { + maxHeaderLength: 1024, + ignoreBodyHashCheck: true, + }); + const recipientInput = await genRecipientInput(emailFilePath); + const circuitInputs = { + ...emailAuthInput, + subject_email_addr_idx: recipientInput.subject_email_addr_idx, + }; + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + const domainName = "gmail.com"; + const paddedDomain = relayerUtils.padString(domainName, 255); + const domainFields = relayerUtils.bytes2Fields(paddedDomain); + for (let idx = 0; idx < domainFields.length; ++idx) { + expect(BigInt(domainFields[idx])).toEqual(witness[1 + idx]); + } + const expectedPubKeyHash = relayerUtils.publicKeyHash( + parsedEmail.publicKey + ); + expect(BigInt(expectedPubKeyHash)).toEqual( + witness[1 + domainFields.length] + ); + const expectedEmailNullifier = relayerUtils.emailNullifier( + parsedEmail.signature + ); + expect(BigInt(expectedEmailNullifier)).toEqual( + witness[1 + domainFields.length + 1] + ); + const timestamp = 1707866192n; + expect(timestamp).toEqual(witness[1 + domainFields.length + 2]); + const maskedSubject = "Send 0.12 ETH to "; + const paddedMaskedSubject = relayerUtils.padString(maskedSubject, 605); + const maskedSubjectFields = + relayerUtils.bytes2Fields(paddedMaskedSubject); + for (let idx = 0; idx < maskedSubjectFields.length; ++idx) { + expect(BigInt(maskedSubjectFields[idx])).toEqual( + witness[1 + domainFields.length + 3 + idx] + ); + } + const fromAddr = "suegamisora@gmail.com"; + const accountSalt = relayerUtils.accountSalt(fromAddr, accountCode); + expect(BigInt(accountSalt)).toEqual( + witness[1 + domainFields.length + 3 + maskedSubjectFields.length] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 1 + ] + ); + expect(1n).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 2 + ] + ); + const recipientEmailAddr = "alice@gmail.com"; + const emailAddrCommit = relayerUtils.emailAddrCommitWithSignature( + recipientEmailAddr, + parsedEmail.signature + ); + expect(BigInt(emailAddrCommit)).toEqual( + witness[ + 1 + domainFields.length + 3 + maskedSubjectFields.length + 3 + ] + ); + }); }); diff --git a/packages/contracts/src/EmailAccountRecovery.sol b/packages/contracts/src/EmailAccountRecovery.sol index 5de05919..0fa61497 100644 --- a/packages/contracts/src/EmailAccountRecovery.sol +++ b/packages/contracts/src/EmailAccountRecovery.sol @@ -16,7 +16,8 @@ abstract contract EmailAccountRecovery { address public verifierAddr; address public dkimAddr; address public emailAuthImplementationAddr; - bytes32 public proxyBytecodeHash = 0x0100008338d33e12c716a5b695c6f7f4e526cf162a9378c0713eea5386c09951; + bytes32 public proxyBytecodeHash = + 0x0100008338d33e12c716a5b695c6f7f4e526cf162a9378c0713eea5386c09951; /// @notice Returns the address of the verifier contract. /// @dev This function is virtual and can be overridden by inheriting contracts. @@ -48,53 +49,53 @@ abstract contract EmailAccountRecovery { address recoveredAccount ) public view virtual returns (bool); - /// @notice Returns a two-dimensional array of strings representing the subject templates for an acceptance by a new guardian's. - /// @dev This function is virtual and should be implemented by inheriting contracts to define specific acceptance subject templates. - /// @return string[][] A two-dimensional array of strings, where each inner array represents a set of fixed strings and matchers for a subject template. - function acceptanceSubjectTemplates() + /// @notice Returns a two-dimensional array of strings representing the command templates for an acceptance by a new guardian's. + /// @dev This function is virtual and should be implemented by inheriting contracts to define specific acceptance command templates. + /// @return string[][] A two-dimensional array of strings, where each inner array represents a set of fixed strings and matchers for a command template. + function acceptanceCommandTemplates() public view virtual returns (string[][] memory); - /// @notice Returns a two-dimensional array of strings representing the subject templates for email recovery. - /// @dev This function is virtual and should be implemented by inheriting contracts to define specific recovery subject templates. - /// @return string[][] A two-dimensional array of strings, where each inner array represents a set of fixed strings and matchers for a subject template. - function recoverySubjectTemplates() + /// @notice Returns a two-dimensional array of strings representing the command templates for email recovery. + /// @dev This function is virtual and should be implemented by inheriting contracts to define specific recovery command templates. + /// @return string[][] A two-dimensional array of strings, where each inner array represents a set of fixed strings and matchers for a command template. + function recoveryCommandTemplates() public view virtual returns (string[][] memory); - /// @notice Extracts the account address to be recovered from the subject parameters of an acceptance email. - /// @dev This function is virtual and should be implemented by inheriting contracts to extract the account address from the subject parameters. - /// @param subjectParams The subject parameters of the acceptance email. - /// @param templateIdx The index of the acceptance subject template. - function extractRecoveredAccountFromAcceptanceSubject( - bytes[] memory subjectParams, + /// @notice Extracts the account address to be recovered from the command parameters of an acceptance email. + /// @dev This function is virtual and should be implemented by inheriting contracts to extract the account address from the command parameters. + /// @param commandParams The command parameters of the acceptance email. + /// @param templateIdx The index of the acceptance command template. + function extractRecoveredAccountFromAcceptanceCommand( + bytes[] memory commandParams, uint templateIdx ) public view virtual returns (address); - /// @notice Extracts the account address to be recovered from the subject parameters of a recovery email. - /// @dev This function is virtual and should be implemented by inheriting contracts to extract the account address from the subject parameters. - /// @param subjectParams The subject parameters of the recovery email. - /// @param templateIdx The index of the recovery subject template. - function extractRecoveredAccountFromRecoverySubject( - bytes[] memory subjectParams, + /// @notice Extracts the account address to be recovered from the command parameters of a recovery email. + /// @dev This function is virtual and should be implemented by inheriting contracts to extract the account address from the command parameters. + /// @param commandParams The command parameters of the recovery email. + /// @param templateIdx The index of the recovery command template. + function extractRecoveredAccountFromRecoveryCommand( + bytes[] memory commandParams, uint templateIdx ) public view virtual returns (address); function acceptGuardian( address guardian, uint templateIdx, - bytes[] memory subjectParams, + bytes[] memory commandParams, bytes32 emailNullifier ) internal virtual; function processRecovery( address guardian, uint templateIdx, - bytes[] memory subjectParams, + bytes[] memory commandParams, bytes32 emailNullifier ) internal virtual; @@ -127,9 +128,7 @@ abstract contract EmailAccountRecovery { L2ContractHelper.computeCreate2Address( address(this), accountSalt, - bytes32( - proxyBytecodeHash - ), + bytes32(proxyBytecodeHash), keccak256( abi.encode( emailAuthImplementation(), @@ -164,10 +163,10 @@ abstract contract EmailAccountRecovery { } } - /// @notice Calculates a unique subject template ID for an acceptance subject template using its index. + /// @notice Calculates a unique command template ID for an acceptance command template using its index. /// @dev Encodes the email account recovery version ID, "ACCEPTANCE", and the template index, /// then uses keccak256 to hash these values into a uint ID. - /// @param templateIdx The index of the acceptance subject template. + /// @param templateIdx The index of the acceptance command template. /// @return uint The computed uint ID. function computeAcceptanceTemplateId( uint templateIdx @@ -184,10 +183,10 @@ abstract contract EmailAccountRecovery { ); } - /// @notice Calculates a unique ID for a recovery subject template using its index. + /// @notice Calculates a unique ID for a recovery command template using its index. /// @dev Encodes the email account recovery version ID, "RECOVERY", and the template index, /// then uses keccak256 to hash these values into a uint256 ID. - /// @param templateIdx The index of the recovery subject template. + /// @param templateIdx The index of the recovery command template. /// @return uint The computed uint ID. function computeRecoveryTemplateId( uint templateIdx @@ -206,13 +205,13 @@ abstract contract EmailAccountRecovery { /// @notice Handles an acceptance by a new guardian. /// @dev This function validates the email auth message, deploys a new EmailAuth contract as a proxy if validations pass and initializes the contract. /// @param emailAuthMsg The email auth message for the email send from the guardian. - /// @param templateIdx The index of the subject template for acceptance, which should match with the subject in the given email auth message. + /// @param templateIdx The index of the command template for acceptance, which should match with the command in the given email auth message. function handleAcceptance( EmailAuthMsg memory emailAuthMsg, uint templateIdx ) external { - address recoveredAccount = extractRecoveredAccountFromAcceptanceSubject( - emailAuthMsg.subjectParams, + address recoveredAccount = extractRecoveredAccountFromAcceptanceCommand( + emailAuthMsg.commandParams, templateIdx ); require(recoveredAccount != address(0), "invalid account in email"); @@ -226,67 +225,73 @@ abstract contract EmailAccountRecovery { EmailAuth guardianEmailAuth; if (guardian.code.length == 0) { - // // Deploy proxy of the guardian's EmailAuth contract - // if (block.chainid == 324 || block.chainid == 300) { - // (bool success, bytes memory returnData) = SystemContractsCaller - // .systemCallWithReturndata( - // uint32(gasleft()), - // address(DEPLOYER_SYSTEM_CONTRACT), - // uint128(0), - // abi.encodeCall( - // DEPLOYER_SYSTEM_CONTRACT.create2, - // ( - // emailAuthMsg.proof.accountSalt, - // proxyBytecodeHash, - // abi.encode( - // emailAuthImplementation(), - // abi.encodeCall( - // EmailAuth.initialize, - // ( - // recoveredAccount, - // emailAuthMsg.proof.accountSalt, - // address(this) - // ) - // ) - // ) - // ) - // ) - // ); - // address payable proxyAddress = abi.decode(returnData, (address)); - // ERC1967Proxy proxy = ERC1967Proxy(proxyAddress); - // guardianEmailAuth = EmailAuth(address(proxy)); - // guardianEmailAuth.initialize( - // recoveredAccount, - // emailAuthMsg.proof.accountSalt, - // address(this) - // ); - // } else { - // Deploy proxy of the guardian's EmailAuth contract - ERC1967Proxy proxy = new ERC1967Proxy{salt: emailAuthMsg.proof.accountSalt}( - emailAuthImplementation(), - abi.encodeCall( - EmailAuth.initialize, - (recoveredAccount, emailAuthMsg.proof.accountSalt, address(this)) + // // Deploy proxy of the guardian's EmailAuth contract + // if (block.chainid == 324 || block.chainid == 300) { + // (bool success, bytes memory returnData) = SystemContractsCaller + // .systemCallWithReturndata( + // uint32(gasleft()), + // address(DEPLOYER_SYSTEM_CONTRACT), + // uint128(0), + // abi.encodeCall( + // DEPLOYER_SYSTEM_CONTRACT.create2, + // ( + // emailAuthMsg.proof.accountSalt, + // proxyBytecodeHash, + // abi.encode( + // emailAuthImplementation(), + // abi.encodeCall( + // EmailAuth.initialize, + // ( + // recoveredAccount, + // emailAuthMsg.proof.accountSalt, + // address(this) + // ) + // ) + // ) + // ) + // ) + // ); + // address payable proxyAddress = abi.decode(returnData, (address)); + // ERC1967Proxy proxy = ERC1967Proxy(proxyAddress); + // guardianEmailAuth = EmailAuth(address(proxy)); + // guardianEmailAuth.initialize( + // recoveredAccount, + // emailAuthMsg.proof.accountSalt, + // address(this) + // ); + // } else { + // Deploy proxy of the guardian's EmailAuth contract + ERC1967Proxy proxy = new ERC1967Proxy{ + salt: emailAuthMsg.proof.accountSalt + }( + emailAuthImplementation(), + abi.encodeCall( + EmailAuth.initialize, + ( + recoveredAccount, + emailAuthMsg.proof.accountSalt, + address(this) ) - ); - guardianEmailAuth = EmailAuth(address(proxy)); - // } + ) + ); + guardianEmailAuth = EmailAuth(address(proxy)); + // } guardianEmailAuth.initDKIMRegistry(dkim()); guardianEmailAuth.initVerifier(verifier()); for ( uint idx = 0; - idx < acceptanceSubjectTemplates().length; + idx < acceptanceCommandTemplates().length; idx++ ) { - guardianEmailAuth.insertSubjectTemplate( + guardianEmailAuth.insertCommandTemplate( computeAcceptanceTemplateId(idx), - acceptanceSubjectTemplates()[idx] + acceptanceCommandTemplates()[idx] ); } - for (uint idx = 0; idx < recoverySubjectTemplates().length; idx++) { - guardianEmailAuth.insertSubjectTemplate( + for (uint idx = 0; idx < recoveryCommandTemplates().length; idx++) { + guardianEmailAuth.insertCommandTemplate( computeRecoveryTemplateId(idx), - recoverySubjectTemplates()[idx] + recoveryCommandTemplates()[idx] ); } } else { @@ -303,22 +308,22 @@ abstract contract EmailAccountRecovery { acceptGuardian( guardian, templateIdx, - emailAuthMsg.subjectParams, + emailAuthMsg.commandParams, emailAuthMsg.proof.emailNullifier ); } /// @notice Processes the recovery based on an email from the guardian. - /// @dev Verify the provided email auth message for a deployed guardian's EmailAuth contract and a specific subject template for recovery. + /// @dev Verify the provided email auth message for a deployed guardian's EmailAuth contract and a specific command template for recovery. /// Requires that the guardian is already deployed, and the template ID corresponds to the `templateId` in the given email auth message. Once validated. /// @param emailAuthMsg The email auth message for recovery. - /// @param templateIdx The index of the subject template for recovery, which should match with the subject in the given email auth message. + /// @param templateIdx The index of the command template for recovery, which should match with the command in the given email auth message. function handleRecovery( EmailAuthMsg memory emailAuthMsg, uint templateIdx ) external { - address recoveredAccount = extractRecoveredAccountFromRecoverySubject( - emailAuthMsg.subjectParams, + address recoveredAccount = extractRecoveredAccountFromRecoveryCommand( + emailAuthMsg.commandParams, templateIdx ); require(recoveredAccount != address(0), "invalid account in email"); @@ -348,7 +353,7 @@ abstract contract EmailAccountRecovery { processRecovery( guardian, templateIdx, - emailAuthMsg.subjectParams, + emailAuthMsg.commandParams, emailAuthMsg.proof.emailNullifier ); } diff --git a/packages/contracts/src/EmailAuth.sol b/packages/contracts/src/EmailAuth.sol index ae850d42..b1790d0d 100644 --- a/packages/contracts/src/EmailAuth.sol +++ b/packages/contracts/src/EmailAuth.sol @@ -4,25 +4,23 @@ pragma solidity ^0.8.12; import {EmailProof} from "./utils/Verifier.sol"; import {IDKIMRegistry} from "@zk-email/contracts/DKIMRegistry.sol"; import {Verifier} from "./utils/Verifier.sol"; -import {SubjectUtils} from "./libraries/SubjectUtils.sol"; +import {CommandUtils} from "./libraries/CommandUtils.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /// @notice Struct to hold the email authentication/authorization message. struct EmailAuthMsg { - /// @notice The ID of the subject template that the email subject should satisfy. + /// @notice The ID of the command template that the command in the email body should satisfy. uint templateId; - /// @notice The parameters in the email subject, which should be taken according to the specified subject template. - bytes[] subjectParams; - /// @notice The number of skiiped bytes in the email subject. - uint skipedSubjectPrefix; + /// @notice The parameters in the command of the email body, which should be taken according to the specified command template. + bytes[] commandParams; /// @notice The email proof containing the zk proof and other necessary information for the email verification by the verifier contract. EmailProof proof; } /// @title Email Authentication/Authorization Contract -/// @notice This contract provides functionalities for the authentication of the email sender and the authentication of the message in the email subject using DKIM and custom verification logic. +/// @notice This contract provides functionalities for the authentication of the email sender and the authentication of the message in the command part of the email body using DKIM and custom verification logic. /// @dev Inherits from OwnableUpgradeable and UUPSUpgradeable for upgradeability and ownership management. contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { /// The CREATE2 salt of this contract defined as a hash of an email address and an account code. @@ -31,10 +29,10 @@ contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { IDKIMRegistry internal dkim; /// An instance of the Verifier contract. Verifier internal verifier; - /// An address of a controller contract, defining the subject templates supported by this contract. + /// An address of a controller contract, defining the command templates supported by this contract. address public controller; - /// A mapping of the supported subject templates associated with its ID. - mapping(uint => string[]) public subjectTemplates; + /// A mapping of the supported command templates associated with its ID. + mapping(uint => string[]) public commandTemplates; /// A mapping of the hash of the authorized message associated with its `emailNullifier`. uint public lastTimestamp; /// The latest `timestamp` in the verified `EmailAuthMsg`. @@ -44,9 +42,9 @@ contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { event DKIMRegistryUpdated(address indexed dkimRegistry); event VerifierUpdated(address indexed verifier); - event SubjectTemplateInserted(uint indexed templateId); - event SubjectTemplateUpdated(uint indexed templateId); - event SubjectTemplateDeleted(uint indexed templateId); + event CommandTemplateInserted(uint indexed templateId); + event CommandTemplateUpdated(uint indexed templateId); + event CommandTemplateDeleted(uint indexed templateId); event EmailAuthed( bytes32 indexed emailNullifier, bytes32 indexed accountSalt, @@ -135,70 +133,70 @@ contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { emit VerifierUpdated(_verifierAddr); } - /// @notice Retrieves a subject template by its ID. - /// @param _templateId The ID of the subject template to be retrieved. - /// @return string[] The subject template as an array of strings. - function getSubjectTemplate( + /// @notice Retrieves a command template by its ID. + /// @param _templateId The ID of the command template to be retrieved. + /// @return string[] The command template as an array of strings. + function getCommandTemplate( uint _templateId ) public view returns (string[] memory) { require( - subjectTemplates[_templateId].length > 0, + commandTemplates[_templateId].length > 0, "template id not exists" ); - return subjectTemplates[_templateId]; + return commandTemplates[_templateId]; } - /// @notice Inserts a new subject template. + /// @notice Inserts a new command template. /// @dev This function can only be called by the owner of the contract. - /// @param _templateId The ID for the new subject template. - /// @param _subjectTemplate The subject template as an array of strings. - function insertSubjectTemplate( + /// @param _templateId The ID for the new command template. + /// @param _commandTemplate The command template as an array of strings. + function insertCommandTemplate( uint _templateId, - string[] memory _subjectTemplate + string[] memory _commandTemplate ) public onlyController { - require(_subjectTemplate.length > 0, "subject template is empty"); + require(_commandTemplate.length > 0, "command template is empty"); require( - subjectTemplates[_templateId].length == 0, + commandTemplates[_templateId].length == 0, "template id already exists" ); - subjectTemplates[_templateId] = _subjectTemplate; - emit SubjectTemplateInserted(_templateId); + commandTemplates[_templateId] = _commandTemplate; + emit CommandTemplateInserted(_templateId); } - /// @notice Updates an existing subject template by its ID. + /// @notice Updates an existing command template by its ID. /// @dev This function can only be called by the controller contract. /// @param _templateId The ID of the template to update. - /// @param _subjectTemplate The new subject template as an array of strings. - function updateSubjectTemplate( + /// @param _commandTemplate The new command template as an array of strings. + function updateCommandTemplate( uint _templateId, - string[] memory _subjectTemplate + string[] memory _commandTemplate ) public onlyController { - require(_subjectTemplate.length > 0, "subject template is empty"); + require(_commandTemplate.length > 0, "command template is empty"); require( - subjectTemplates[_templateId].length > 0, + commandTemplates[_templateId].length > 0, "template id not exists" ); - subjectTemplates[_templateId] = _subjectTemplate; - emit SubjectTemplateUpdated(_templateId); + commandTemplates[_templateId] = _commandTemplate; + emit CommandTemplateUpdated(_templateId); } - /// @notice Deletes an existing subject template by its ID. + /// @notice Deletes an existing command template by its ID. /// @dev This function can only be called by the owner of the contract. - /// @param _templateId The ID of the subject template to be deleted. - function deleteSubjectTemplate(uint _templateId) public onlyController { + /// @param _templateId The ID of the command template to be deleted. + function deleteCommandTemplate(uint _templateId) public onlyController { require( - subjectTemplates[_templateId].length > 0, + commandTemplates[_templateId].length > 0, "template id not exists" ); - delete subjectTemplates[_templateId]; - emit SubjectTemplateDeleted(_templateId); + delete commandTemplates[_templateId]; + emit CommandTemplateDeleted(_templateId); } - /// @notice Authenticate the email sender and authorize the message in the email subject based on the provided email auth message. + /// @notice Authenticate the email sender and authorize the message in the email command based on the provided email auth message. /// @dev This function can only be called by the controller contract. /// @param emailAuthMsg The email auth message containing all necessary information for authentication and authorization. function authEmail(EmailAuthMsg memory emailAuthMsg) public onlyController { - string[] memory template = subjectTemplates[emailAuthMsg.templateId]; + string[] memory template = commandTemplates[emailAuthMsg.templateId]; require(template.length > 0, "template id not exists"); require( dkim.isDKIMPublicKeyHashValid( @@ -222,18 +220,14 @@ contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { "invalid timestamp" ); - // Construct an expectedSubject from template and the values of emailAuthMsg.subjectParams. - string memory expectedSubject = SubjectUtils.computeExpectedSubject( - emailAuthMsg.subjectParams, + // Construct an expectedCommand from template and the values of emailAuthMsg.commandParams. + string memory expectedCommand = CommandUtils.computeExpectedCommand( + emailAuthMsg.commandParams, template ); - string memory trimmedMaskedSubject = removePrefix( - emailAuthMsg.proof.maskedSubject, - emailAuthMsg.skipedSubjectPrefix - ); require( - Strings.equal(expectedSubject, trimmedMaskedSubject), - "invalid subject" + Strings.equal(expectedCommand, emailAuthMsg.proof.maskedCommand), + "invalid command" ); require( verifier.verifyEmailProof(emailAuthMsg.proof) == true, diff --git a/packages/contracts/src/libraries/SubjectUtils.sol b/packages/contracts/src/libraries/CommandUtils.sol similarity index 82% rename from packages/contracts/src/libraries/SubjectUtils.sol rename to packages/contracts/src/libraries/CommandUtils.sol index 2364fde7..fb87531e 100644 --- a/packages/contracts/src/libraries/SubjectUtils.sol +++ b/packages/contracts/src/libraries/CommandUtils.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import "./DecimalUtils.sol"; -library SubjectUtils { +library CommandUtils { bytes16 private constant LOWER_HEX_DIGITS = "0123456789abcdef"; bytes16 private constant UPPER_HEX_DIGITS = "0123456789ABCDEF"; string public constant STRING_MATCHER = "{string}"; @@ -75,14 +75,14 @@ library SubjectUtils { return string(hexString); } - /// @notice Calculate the expected subject. - /// @param subjectParams Params to be used in the subject - /// @param template Template to be used for the subject - function computeExpectedSubject( - bytes[] memory subjectParams, + /// @notice Calculate the expected command. + /// @param commandParams Params to be used in the command + /// @param template Template to be used for the command + function computeExpectedCommand( + bytes[] memory commandParams, string[] memory template - ) public pure returns (string memory expectedSubject) { - // Construct an expectedSubject from template and the values of emailAuthMsg.subjectParams. + ) public pure returns (string memory expectedCommand) { + // Construct an expectedCommand from template and the values of commandParams. uint8 nextParamIndex = 0; string memory stringParam; bool isParamExist; @@ -90,31 +90,31 @@ library SubjectUtils { isParamExist = true; if (Strings.equal(template[i], STRING_MATCHER)) { string memory param = abi.decode( - subjectParams[nextParamIndex], + commandParams[nextParamIndex], (string) ); stringParam = param; } else if (Strings.equal(template[i], UINT_MATCHER)) { uint256 param = abi.decode( - subjectParams[nextParamIndex], + commandParams[nextParamIndex], (uint256) ); stringParam = Strings.toString(param); } else if (Strings.equal(template[i], INT_MATCHER)) { int256 param = abi.decode( - subjectParams[nextParamIndex], + commandParams[nextParamIndex], (int256) ); stringParam = Strings.toStringSigned(param); } else if (Strings.equal(template[i], DECIMALS_MATCHER)) { uint256 param = abi.decode( - subjectParams[nextParamIndex], + commandParams[nextParamIndex], (uint256) ); stringParam = DecimalUtils.uintToDecimalString(param); } else if (Strings.equal(template[i], ETH_ADDR_MATCHER)) { address param = abi.decode( - subjectParams[nextParamIndex], + commandParams[nextParamIndex], (address) ); stringParam = addressToChecksumHexString(param); @@ -124,17 +124,17 @@ library SubjectUtils { } if (i > 0) { - expectedSubject = string( - abi.encodePacked(expectedSubject, " ") + expectedCommand = string( + abi.encodePacked(expectedCommand, " ") ); } - expectedSubject = string( - abi.encodePacked(expectedSubject, stringParam) + expectedCommand = string( + abi.encodePacked(expectedCommand, stringParam) ); if (isParamExist) { nextParamIndex++; } } - return expectedSubject; + return expectedCommand; } } diff --git a/packages/contracts/src/utils/Groth16Verifier.sol b/packages/contracts/src/utils/Groth16Verifier.sol index 914d7dfa..84d3ced7 100644 --- a/packages/contracts/src/utils/Groth16Verifier.sol +++ b/packages/contracts/src/utils/Groth16Verifier.sol @@ -37,126 +37,117 @@ contract Groth16Verifier { uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; - uint256 constant deltax1 = 12348375662783824431360707906202475009449369812921990201376235771680861701966; - uint256 constant deltax2 = 1390621091717691233659791897033569945783127756008503250856151404215287127098; - uint256 constant deltay1 = 21545653682963288007472972452138234474169143155774752223643789231933860474340; - uint256 constant deltay2 = 10610549897370405036411988417557836327116891506639515374316821127902275605593; + uint256 constant deltax1 = 520994677997493400810773541476499788644902082984396453075685762761831850120; + uint256 constant deltax2 = 10213897956116323293360574495863850733565743032313310303301962890191828600579; + uint256 constant deltay1 = 7932164237875706492467150825847531456461165832347520966415283522471937964900; + uint256 constant deltay2 = 13933167949481980812622491915190180689983098052228504440538951968850456401091; - uint256 constant IC0x = 5901406458595327327953646561359621442218448144107991955344827840671354857930; - uint256 constant IC0y = 21253883398616811363937453025480398551698716152192802899988370991179418894921; + uint256 constant IC0x = 5535234085311902579901349478459196637795058221120958134445592343488246156733; + uint256 constant IC0y = 5306640240432430234979242614873688760288740315547161616274789884917660992367; - uint256 constant IC1x = 1112924942971302135990579038492068551965379862222416146684206705079782572000; - uint256 constant IC1y = 6845816202276549205403237603547410855545803354942552863847676397548741086071; + uint256 constant IC1x = 10707387490009252629078273089029959904307706408726467155680696001386854048915; + uint256 constant IC1y = 17653533518649258839749460334216534095963029303372459441511113120126665109653; - uint256 constant IC2x = 14146397086704743317768846126489596483634956428235300380826232977310804058751; - uint256 constant IC2y = 19618883007025739156467626277666586024401705866552606313791444982720962403992; + uint256 constant IC2x = 20865571486499188594003814476515099918525806346210086833881258772408663191533; + uint256 constant IC2y = 7888240421702647837386220931474009495401756148617371230939296514314837098271; - uint256 constant IC3x = 3901572409202614942721645284047738923242593674037512752046910139604415193490; - uint256 constant IC3y = 20492449392704526941468738279820790768424887146903635663987211396806301809154; + uint256 constant IC3x = 1912978194609077207430131695891867170745002253126750956906023142956794841865; + uint256 constant IC3y = 17615941814906629303790964184866269246906472609406726939478790210268313990051; - uint256 constant IC4x = 18540181064351079043471661082110994395960833330341135578479476830087776228683; - uint256 constant IC4y = 11176005255132390129621080493002450161350701375862520723126575901394028996036; + uint256 constant IC4x = 15066418251539359853074143581365946179824576559935306245174822608350324474776; + uint256 constant IC4y = 3268372113574542796802111569975146953310662150883456386537997506424333670939; - uint256 constant IC5x = 19561918792572579721654605669351975749853953476158354443105355794367963998057; - uint256 constant IC5y = 8218678694141104830016990002861269810060858478661593498963178088127632633272; + uint256 constant IC5x = 16726903819494555062907147643613770035747444680904544904305313872617709937814; + uint256 constant IC5y = 17101225626470597533777593163737774333478931604126018373298094394038436070638; - uint256 constant IC6x = 9430924798221081020093287735191121193795036835461664479209198319741867653703; - uint256 constant IC6y = 8320455794218847878770580093897658145962468495286236900439725456006531945699; + uint256 constant IC6x = 20641928936490067347238549514729636898746687294162031430805590421560903783440; + uint256 constant IC6y = 67121451455228913817899520547955848577485738949760740559721896890970176103; - uint256 constant IC7x = 5026847283727041400632489144741052290976729570767028644525050581059876916251; - uint256 constant IC7y = 18709603090338372683001965035561848282369713676288357172691730209331905334650; + uint256 constant IC7x = 14545357897180104829942737321629647336974601349904876305377785895976088498628; + uint256 constant IC7y = 16314295394308016823245804523460668622871621620058982289202172672703214642909; - uint256 constant IC8x = 17783950150020738154914534833285662833687830065154708170534593149023190841571; - uint256 constant IC8y = 6711670108831861054349992265875143708175087706665287716580642850559233815182; + uint256 constant IC8x = 21739153088746313904366793933727782582174946747904879487285317254557443015329; + uint256 constant IC8y = 3132175803297520185172383705548796916566539464602625887509031362173771022843; - uint256 constant IC9x = 6456809683101221239825536925658971026995917443342977471616457395354933010826; - uint256 constant IC9y = 2014292748365982904981992383163603273504856743882959093701478470668783800522; + uint256 constant IC9x = 20333233803298528081912583132659619517672056679176472634300802350468027326361; + uint256 constant IC9y = 6238837794343377502421946404928002513039151091738403488064287245988205748593; - uint256 constant IC10x = 6628245325000975286546535223213930648454767286000819266622720989919128655736; - uint256 constant IC10y = 14513751619334179776611945559238333965209884013883320491822197554011245102668; + uint256 constant IC10x = 16418874123357333544592669082833232850459535832174384729993255430764462500486; + uint256 constant IC10y = 21771971202968985066744191573424980335377073332855742387685123535002522571529; - uint256 constant IC11x = 18570424159211943648550772570282559547250130191621494465657111355378707354500; - uint256 constant IC11y = 3142881938352899028782850032628554749777583832256141371247984173352247988131; + uint256 constant IC11x = 19451975215864606845692411747435064359921385769371233821650301822958164252383; + uint256 constant IC11y = 20892514595722901078388943250566322962503399436888984708776669059327181439790; - uint256 constant IC12x = 5223991002378260090449510454796281831282905631623677469960113091483024319301; - uint256 constant IC12y = 9427018011817145184335218137442223127741016816822775509206816206494077869941; + uint256 constant IC12x = 7890932830092388862341624941690789312256479754725115142819338325966740669428; + uint256 constant IC12y = 4418832493543398820840947134519317894746836913806654901909239755962388809991; - uint256 constant IC13x = 17733384847564503082934979078550596341075160377145956961996412508907155849602; - uint256 constant IC13y = 15345500273986785785979010183753446192836470842052033037545791683924216389909; + uint256 constant IC13x = 8199473712814016100135467002253188985688335051507321176911775440880532334952; + uint256 constant IC13y = 15997818842062211202600134971063758566999644777722172606469491329666812258276; - uint256 constant IC14x = 6541603162653988673614876540286498610416711433782997011446804048984497507717; - uint256 constant IC14y = 9471585496716317833911101487553454694761435169521054429602533117895220539092; + uint256 constant IC14x = 12137522381148387733238329761055359894311504591070198713455315089652636842402; + uint256 constant IC14y = 21339188004338495042416918774038965889032101950904198621697204175535425843091; - uint256 constant IC15x = 6574110840837190171512762164893486105535576711656029901056739039814628526912; - uint256 constant IC15y = 12107221022070295505274408663667253928323650746131661962928553805430682213730; + uint256 constant IC15x = 20499263784776697905943622542054972660913496529317877469532325036659142860841; + uint256 constant IC15y = 11428736355199483131940447330380125032711949052439215155046658645463458617674; - uint256 constant IC16x = 2983775925467162306639671044788352921278318217335490557023737802970494396161; - uint256 constant IC16y = 15155657642358487296835454918514213311356981076876734700573166757257484354564; + uint256 constant IC16x = 5754299204496299424940297228286983528858894010778459654161035126221861884425; + uint256 constant IC16y = 184143361306450555375946116665530361251584344793605929804900169497536069657; - uint256 constant IC17x = 8967042914633055089306636825844718647849951037719728238537295360572488150548; - uint256 constant IC17y = 16316365584620447093615538375124020157614277415345119540410103156547686499616; + uint256 constant IC17x = 6863685095405518858940222663610976520118803865048723755871419028593531099958; + uint256 constant IC17y = 18102099448859799403953336894017457656590279241400870825068223761138751757204; - uint256 constant IC18x = 10539075382040152021577786214341262536565753081943101851679620745620126843721; - uint256 constant IC18y = 4734602432159888257161632785059762380496749946015675717019228118945872853040; + uint256 constant IC18x = 11617180898926442769507234462139371394680677212983320064407531026440672878535; + uint256 constant IC18y = 4231987035195694511291113860396316866846277265956849978459149363401736899419; - uint256 constant IC19x = 16904274081002162388173688128412241495718571792446724759784404749590000812400; - uint256 constant IC19y = 10801084318813806801902242112307629808119029411792686266329164737317751231217; + uint256 constant IC19x = 6338405922510297847509581085618085787266710988385331069423772530751893351108; + uint256 constant IC19y = 2369188132617549234166848605509335807620667833570812871717711881712251941471; - uint256 constant IC20x = 15575787937775277998941372228242544347460724933647624890935023166333401850163; - uint256 constant IC20y = 7296638718677056910701470329118855562874930285186351569007798599358833717218; + uint256 constant IC20x = 6534724304493884898998457959752744402731711456639277994605971968266824841921; + uint256 constant IC20y = 3616930696544290755224333216672259977980824937811778199173736509869170686624; - uint256 constant IC21x = 4551313941391400232712859196059035637265126775160423752556164701565012171961; - uint256 constant IC21y = 21401656423982733211718420214626338184514587667446979844631973864641456629261; + uint256 constant IC21x = 18296109485859597664201013922077450611537275721380521453297622562810889903055; + uint256 constant IC21y = 3895545879384074505865915948837152152498358964611960941429309095904181030693; - uint256 constant IC22x = 2935540066773152386094450378156329519379475479888931777862603161088003692041; - uint256 constant IC22y = 3754706265995206762948051647660125270465347882441656302776943004798594006627; + uint256 constant IC22x = 12343813894528681582898501974195928908758133920463632788058140152731464749914; + uint256 constant IC22y = 21505758529614139837798769683411075306857597005036383220173003789253857347751; - uint256 constant IC23x = 14941485327978437375521006241254634444037644973379906367567115351627139641414; - uint256 constant IC23y = 10702407562034274430221897944829443699402512693373259167588271091307663372710; + uint256 constant IC23x = 16230461810715823239242025482008567032302510218301798998030587563164759203923; + uint256 constant IC23y = 1994949152609869198152052650904921912838643069265165983919780834335733459441; - uint256 constant IC24x = 8275896680177260146907953439805305572759478043924598922328323793281943403370; - uint256 constant IC24y = 4247674182996730416195978445155055073549714994568066175487529509583649388873; + uint256 constant IC24x = 373995982353912590050571385234870501485812926774804412495284185340492728591; + uint256 constant IC24y = 4424414072575513799911234230042788376840811362954861538886070866583770853757; - uint256 constant IC25x = 5689003246975774737588871342271076456426408075813318043434367952407244465697; - uint256 constant IC25y = 5331139184498747881817447962895230742876804067387026910085264060106931675015; + uint256 constant IC25x = 73053181031153871276946499443822334078747902352960726679539712950424139587; + uint256 constant IC25y = 1540570167066699022838327597833448980761202822749917678465275227142577692420; - uint256 constant IC26x = 9133389296516422045582607363916275184958302548102626374643142889003044665947; - uint256 constant IC26y = 21212127989644328313744743046359043793974008456261367858588476558007302881330; + uint256 constant IC26x = 19743666564083954842724375605301868007217803605683850153936265256536005058028; + uint256 constant IC26y = 17989815625617579036436769970865806048561975460718195347202285390279820435349; - uint256 constant IC27x = 1846381662521291690941661313906009843371539776920831630929177290350683400816; - uint256 constant IC27y = 14037588365801936321970551415842797526891505906435930017587651178284699267713; + uint256 constant IC27x = 8021544724659208314956854536191758170410161794829262652377062879718582077619; + uint256 constant IC27y = 11242343205078067027061957056593092382351538151124811098324850161004134673555; - uint256 constant IC28x = 9781100104817210330466721014252420484088695894046800561845749556748658092046; - uint256 constant IC28y = 5247283488585909287681175111965979900241094426050812131890410213638115643151; + uint256 constant IC28x = 3078234746564587714000443808454353377587938001919200323959521327347201776344; + uint256 constant IC28y = 2745006783235117142840024866060647109576786923760899534870847030757937709480; - uint256 constant IC29x = 2601884709396729070900092103586635418201773412881087270429648554918650589212; - uint256 constant IC29y = 9908981325212548797939830108274909156521241172863051558205007650971279318517; + uint256 constant IC29x = 5964844476592478242407630507799027172948004079052748175556332403023505609276; + uint256 constant IC29y = 12768841436519508981792953013446512028720534352691237119399120037998541137224; - uint256 constant IC30x = 9939266818987304280716292846681442246091197219658249578844451051169120630547; - uint256 constant IC30y = 2572015044563341438903424542575536095020061887469225890988354903901552937232; + uint256 constant IC30x = 15371609663317589294806761513526368989695520686639615266578243336031459611909; + uint256 constant IC30y = 16994646314587748959724789317702812017993403087486552388242926535433658915883; - uint256 constant IC31x = 13118893670705126645185968274218628155008227884751114852720068135196260630881; - uint256 constant IC31y = 6230722867526865558981774022287077378574474669760549030286133277816703673143; + uint256 constant IC31x = 6683739596768676873248624858087923536398042926812221220245863544486923422711; + uint256 constant IC31y = 12457051898274801033654726559510059327583138828424088437950360209133530872938; - uint256 constant IC32x = 17212407207955414163237618089196466668701707894128397707051726962337098549169; - uint256 constant IC32y = 8404846513505663468605283225980364311579458231305844344066234966448248022846; + uint256 constant IC32x = 12960094561130886505165854876806731618571707898820633243029947918452735526807; + uint256 constant IC32y = 6820833146511263887962056926524443259150994889983748875463240028627107473405; - uint256 constant IC33x = 11738484603497709502459820489878480711987723990943728339865918189223648597498; - uint256 constant IC33y = 4876663067150136827802187921986818211983158246723787276826534383019800886864; + uint256 constant IC33x = 996044632338712992107340240713239518089208404641712342335139731510181571935; + uint256 constant IC33y = 273204942495896233059800495345764298864994985906625498267135262620807809339; + + uint256 constant IC34x = 1813777432174456228797740790983800618055554859202869474902366329763076454717; + uint256 constant IC34y = 18263062241351175416183473322099225631153099284041729083414647404711496873274; - uint256 constant IC34x = 10388736566666345681097260475847864743327046424517259125467497894377198799740; - uint256 constant IC34y = 18058504066267363666256588143336895545386092144245446448007719752461244713629; - - // For zksync mainnet TODO: Current addresses are on zkSync sepolia, - // Please deploy them before you deploy the Groth16Verifier. - address constant ecAddAddrZkSync = 0x4cc3aa31951FADa114cBAd54686E2A082Df6C4fa; - address constant ecMulAddrZkSync = 0x2abE798291c05B054475BDEB017161737A6A1b4F; - address constant ecPairingAddrZkSync = 0x9F7D2961D2E522D5B1407dD1e364A520DdC8a77F; - // For zksync sepolia - address constant ecAddAddrZkSyncSepolia = 0x4cc3aa31951FADa114cBAd54686E2A082Df6C4fa; - address constant ecMulAddrZkSyncSepolia = 0x2abE798291c05B054475BDEB017161737A6A1b4F; - address constant ecPairingAddrZkSyncSepolia = 0x9F7D2961D2E522D5B1407dD1e364A520DdC8a77F; // Memory data uint16 constant pVk = 0; @@ -165,44 +156,24 @@ contract Groth16Verifier { uint16 constant pLastMem = 896; function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[34] calldata _pubSignals) public view returns (bool) { - - uint16 zksync; - if(block.chainid == 300) { - zksync = 2; // zkSync sepolia - } else if(block.chainid == 324) { - zksync = 1; // zkSync mainnet - } else { - zksync = 0; // others - } - assembly { - function checkField(v) { - if iszero(lt(v, q)) { + if iszero(lt(v, r)) { mstore(0, 0) return(0, 0x20) } } // G1 function to multiply a G1 value(x,y) to value in an address - function g1_mulAccC(pR, x, y, s, z) { + function g1_mulAccC(pR, x, y, s) { let success let mIn := mload(0x40) mstore(mIn, x) mstore(add(mIn, 32), y) mstore(add(mIn, 64), s) - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecMulAddrZkSync, mIn, 96, mIn, 64) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecMulAddrZkSyncSepolia, mIn, 96, mIn, 64) - } - default { - success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) - } - + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + if iszero(success) { mstore(0, 0) return(0, 0x20) @@ -211,17 +182,7 @@ contract Groth16Verifier { mstore(add(mIn, 64), mload(pR)) mstore(add(mIn, 96), mload(add(pR, 32))) - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecAddAddrZkSync, mIn, 128, pR, 64) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecAddAddrZkSyncSepolia, mIn, 128, pR, 64) - } - default { - success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) - } - + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) if iszero(success) { mstore(0, 0) @@ -229,7 +190,7 @@ contract Groth16Verifier { } } - function checkPairing(pA, pB, pC, pubSignals, pMem, z) -> isOk { + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { let _pPairing := add(pMem, pPairing) let _pVk := add(pMem, pVk) @@ -238,73 +199,73 @@ contract Groth16Verifier { // Compute the linear combination vk_x - g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0)), z) + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) - g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32)), z) + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) - g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64)), z) + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) - g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96)), z) + g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96))) - g1_mulAccC(_pVk, IC5x, IC5y, calldataload(add(pubSignals, 128)), z) + g1_mulAccC(_pVk, IC5x, IC5y, calldataload(add(pubSignals, 128))) - g1_mulAccC(_pVk, IC6x, IC6y, calldataload(add(pubSignals, 160)), z) + g1_mulAccC(_pVk, IC6x, IC6y, calldataload(add(pubSignals, 160))) - g1_mulAccC(_pVk, IC7x, IC7y, calldataload(add(pubSignals, 192)), z) + g1_mulAccC(_pVk, IC7x, IC7y, calldataload(add(pubSignals, 192))) - g1_mulAccC(_pVk, IC8x, IC8y, calldataload(add(pubSignals, 224)), z) + g1_mulAccC(_pVk, IC8x, IC8y, calldataload(add(pubSignals, 224))) - g1_mulAccC(_pVk, IC9x, IC9y, calldataload(add(pubSignals, 256)), z) + g1_mulAccC(_pVk, IC9x, IC9y, calldataload(add(pubSignals, 256))) - g1_mulAccC(_pVk, IC10x, IC10y, calldataload(add(pubSignals, 288)), z) + g1_mulAccC(_pVk, IC10x, IC10y, calldataload(add(pubSignals, 288))) - g1_mulAccC(_pVk, IC11x, IC11y, calldataload(add(pubSignals, 320)), z) + g1_mulAccC(_pVk, IC11x, IC11y, calldataload(add(pubSignals, 320))) - g1_mulAccC(_pVk, IC12x, IC12y, calldataload(add(pubSignals, 352)), z) + g1_mulAccC(_pVk, IC12x, IC12y, calldataload(add(pubSignals, 352))) - g1_mulAccC(_pVk, IC13x, IC13y, calldataload(add(pubSignals, 384)), z) + g1_mulAccC(_pVk, IC13x, IC13y, calldataload(add(pubSignals, 384))) - g1_mulAccC(_pVk, IC14x, IC14y, calldataload(add(pubSignals, 416)), z) + g1_mulAccC(_pVk, IC14x, IC14y, calldataload(add(pubSignals, 416))) - g1_mulAccC(_pVk, IC15x, IC15y, calldataload(add(pubSignals, 448)), z) + g1_mulAccC(_pVk, IC15x, IC15y, calldataload(add(pubSignals, 448))) - g1_mulAccC(_pVk, IC16x, IC16y, calldataload(add(pubSignals, 480)), z) + g1_mulAccC(_pVk, IC16x, IC16y, calldataload(add(pubSignals, 480))) - g1_mulAccC(_pVk, IC17x, IC17y, calldataload(add(pubSignals, 512)), z) + g1_mulAccC(_pVk, IC17x, IC17y, calldataload(add(pubSignals, 512))) - g1_mulAccC(_pVk, IC18x, IC18y, calldataload(add(pubSignals, 544)), z) + g1_mulAccC(_pVk, IC18x, IC18y, calldataload(add(pubSignals, 544))) - g1_mulAccC(_pVk, IC19x, IC19y, calldataload(add(pubSignals, 576)), z) + g1_mulAccC(_pVk, IC19x, IC19y, calldataload(add(pubSignals, 576))) - g1_mulAccC(_pVk, IC20x, IC20y, calldataload(add(pubSignals, 608)), z) + g1_mulAccC(_pVk, IC20x, IC20y, calldataload(add(pubSignals, 608))) - g1_mulAccC(_pVk, IC21x, IC21y, calldataload(add(pubSignals, 640)), z) + g1_mulAccC(_pVk, IC21x, IC21y, calldataload(add(pubSignals, 640))) - g1_mulAccC(_pVk, IC22x, IC22y, calldataload(add(pubSignals, 672)), z) + g1_mulAccC(_pVk, IC22x, IC22y, calldataload(add(pubSignals, 672))) - g1_mulAccC(_pVk, IC23x, IC23y, calldataload(add(pubSignals, 704)), z) + g1_mulAccC(_pVk, IC23x, IC23y, calldataload(add(pubSignals, 704))) - g1_mulAccC(_pVk, IC24x, IC24y, calldataload(add(pubSignals, 736)), z) + g1_mulAccC(_pVk, IC24x, IC24y, calldataload(add(pubSignals, 736))) - g1_mulAccC(_pVk, IC25x, IC25y, calldataload(add(pubSignals, 768)), z) + g1_mulAccC(_pVk, IC25x, IC25y, calldataload(add(pubSignals, 768))) - g1_mulAccC(_pVk, IC26x, IC26y, calldataload(add(pubSignals, 800)), z) + g1_mulAccC(_pVk, IC26x, IC26y, calldataload(add(pubSignals, 800))) - g1_mulAccC(_pVk, IC27x, IC27y, calldataload(add(pubSignals, 832)), z) + g1_mulAccC(_pVk, IC27x, IC27y, calldataload(add(pubSignals, 832))) - g1_mulAccC(_pVk, IC28x, IC28y, calldataload(add(pubSignals, 864)), z) + g1_mulAccC(_pVk, IC28x, IC28y, calldataload(add(pubSignals, 864))) - g1_mulAccC(_pVk, IC29x, IC29y, calldataload(add(pubSignals, 896)), z) + g1_mulAccC(_pVk, IC29x, IC29y, calldataload(add(pubSignals, 896))) - g1_mulAccC(_pVk, IC30x, IC30y, calldataload(add(pubSignals, 928)), z) + g1_mulAccC(_pVk, IC30x, IC30y, calldataload(add(pubSignals, 928))) - g1_mulAccC(_pVk, IC31x, IC31y, calldataload(add(pubSignals, 960)), z) + g1_mulAccC(_pVk, IC31x, IC31y, calldataload(add(pubSignals, 960))) - g1_mulAccC(_pVk, IC32x, IC32y, calldataload(add(pubSignals, 992)), z) + g1_mulAccC(_pVk, IC32x, IC32y, calldataload(add(pubSignals, 992))) - g1_mulAccC(_pVk, IC33x, IC33y, calldataload(add(pubSignals, 1024)), z) + g1_mulAccC(_pVk, IC33x, IC33y, calldataload(add(pubSignals, 1024))) - g1_mulAccC(_pVk, IC34x, IC34y, calldataload(add(pubSignals, 1056)), z) + g1_mulAccC(_pVk, IC34x, IC34y, calldataload(add(pubSignals, 1056))) // -A @@ -349,17 +310,7 @@ contract Groth16Verifier { mstore(add(_pPairing, 736), deltay2) - let success := false - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecPairingAddrZkSync, _pPairing, 768, _pPairing, 0x20) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecPairingAddrZkSyncSepolia, _pPairing, 768, _pPairing, 0x20) - } - default { - success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) - } + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) isOk := and(success, mload(_pPairing)) } @@ -441,7 +392,7 @@ contract Groth16Verifier { // Validate all evaluations - let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem, zksync) + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) mstore(0, isValid) return(0, 0x20) diff --git a/packages/contracts/src/utils/Verifier.sol b/packages/contracts/src/utils/Verifier.sol index 2ccff85d..85834441 100644 --- a/packages/contracts/src/utils/Verifier.sol +++ b/packages/contracts/src/utils/Verifier.sol @@ -9,7 +9,7 @@ struct EmailProof { string domainName; // Domain name of the sender's email bytes32 publicKeyHash; // Hash of the DKIM public key used in email/proof uint timestamp; // Timestamp of the email - string maskedSubject; // Masked subject of the email + string maskedCommand; // Masked command of the email bytes32 emailNullifier; // Nullifier of the email to prevent its reuse. bytes32 accountSalt; // Create2 salt of the account bool isCodeExist; // Check if the account code is exist @@ -52,7 +52,7 @@ contract Verifier is OwnableUpgradeable, UUPSUpgradeable { pubSignals[DOMAIN_FIELDS + 1] = uint256(proof.emailNullifier); pubSignals[DOMAIN_FIELDS + 2] = uint256(proof.timestamp); stringFields = _packBytes2Fields( - bytes(proof.maskedSubject), + bytes(proof.maskedCommand), SUBJECT_BYTES ); for (uint256 i = 0; i < SUBJECT_FIELDS; i++) { diff --git a/packages/contracts/test/DKIMRegistryUpgrade.t.sol b/packages/contracts/test/DKIMRegistryUpgrade.t.sol index 82342991..c3384571 100644 --- a/packages/contracts/test/DKIMRegistryUpgrade.t.sol +++ b/packages/contracts/test/DKIMRegistryUpgrade.t.sol @@ -43,15 +43,15 @@ contract DKIMRegistryUpgradeTest is StructHelper { assertEq(dkimAddr, address(dkim)); } - function _testInsertSubjectTemplate() private { - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + function _testInsertCommandTemplate() private { + emailAuth.insertCommandTemplate(templateId, commandTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); } function testAuthEmail() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); diff --git a/packages/contracts/test/EmailAccountRecovery.t.sol b/packages/contracts/test/EmailAccountRecovery.t.sol index f5670253..12a27a57 100644 --- a/packages/contracts/test/EmailAccountRecovery.t.sol +++ b/packages/contracts/test/EmailAccountRecovery.t.sol @@ -103,9 +103,9 @@ contract EmailAccountRecoveryTest is StructHelper { vm.stopPrank(); } - function testAcceptanceSubjectTemplates() public { + function testAcceptanceCommandTemplates() public { setUp(); - string[][] memory res = recoveryController.acceptanceSubjectTemplates(); + string[][] memory res = recoveryController.acceptanceCommandTemplates(); assertEq(res[0][0], "Accept"); assertEq(res[0][1], "guardian"); assertEq(res[0][2], "request"); @@ -113,9 +113,9 @@ contract EmailAccountRecoveryTest is StructHelper { assertEq(res[0][4], "{ethAddr}"); } - function testRecoverySubjectTemplates() public { + function testRecoveryCommandTemplates() public { setUp(); - string[][] memory res = recoveryController.recoverySubjectTemplates(); + string[][] memory res = recoveryController.recoveryCommandTemplates(); assertEq(res[0][0], "Set"); assertEq(res[0][1], "the"); assertEq(res[0][2], "new"); @@ -207,9 +207,9 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.commandParams = commandParamsForAcceptance; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -248,9 +248,9 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.commandParams = commandParamsForAcceptance; emailAuthMsg.proof.accountSalt = 0x0; vm.mockCall( @@ -280,9 +280,9 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.commandParams = commandParamsForAcceptance; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -296,7 +296,7 @@ contract EmailAccountRecoveryTest is StructHelper { vm.stopPrank(); } - function testExpectRevertHandleAcceptanceInvalidSubjectParams() public { + function testExpectRevertHandleAcceptanceInvalidCommandParams() public { testRequestGuardian(); require( @@ -311,10 +311,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](2); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - subjectParamsForAcceptance[1] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](2); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + commandParamsForAcceptance[1] = abi.encode(address(simpleWallet)); + emailAuthMsg.commandParams = commandParamsForAcceptance; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -323,7 +323,7 @@ contract EmailAccountRecoveryTest is StructHelper { ); vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid subject params")); + vm.expectRevert(bytes("invalid command params")); recoveryController.handleAcceptance(emailAuthMsg, templateIdx); vm.stopPrank(); } @@ -345,9 +345,9 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(0x0)); + emailAuthMsg.commandParams = commandParamsForAcceptance; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -384,10 +384,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -439,10 +439,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; emailAuthMsg.proof.accountSalt = 0x0; vm.mockCall( @@ -476,10 +476,10 @@ contract EmailAccountRecoveryTest is StructHelper { uint templateIdx = 0; EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -521,10 +521,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; emailAuthMsg.proof.accountSalt = 0x0; // vm.mockCall( @@ -574,10 +574,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -613,11 +613,11 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](3); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - subjectParamsForRecovery[1] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](3); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + commandParamsForRecovery[1] = abi.encode(address(0x0)); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -626,7 +626,7 @@ contract EmailAccountRecoveryTest is StructHelper { ); vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid subject params")); + vm.expectRevert(bytes("invalid command params")); recoveryController.handleRecovery(emailAuthMsg, templateIdx); vm.stopPrank(); } @@ -649,10 +649,10 @@ contract EmailAccountRecoveryTest is StructHelper { // EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); // uint templateId = recoveryController.computeRecoveryTemplateId(templateIdx); // emailAuthMsg.templateId = templateId; - // bytes[] memory subjectParamsForRecovery = new bytes[](2); - // subjectParamsForRecovery[0] = abi.encode(address(0x0)); - // subjectParamsForRecovery[1] = abi.encode(newSigner); - // emailAuthMsg.subjectParams = subjectParamsForRecovery; + // bytes[] memory commandParamsForRecovery = new bytes[](2); + // commandParamsForRecovery[0] = abi.encode(address(0x0)); + // commandParamsForRecovery[1] = abi.encode(newSigner); + // emailAuthMsg.commandParams = commandParamsForRecovery; // vm.mockCall( // address(recoveryController.emailAuthImplementationAddr()), @@ -688,10 +688,10 @@ contract EmailAccountRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(address(0x0)); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), diff --git a/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol b/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol index 7b346fcb..d534a325 100644 --- a/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol +++ b/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol @@ -49,12 +49,12 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { uint templateIdx = 0; EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.commandParams = commandParamsForAcceptance; address recoveredAccount = recoveryController - .extractRecoveredAccountFromAcceptanceSubject( - emailAuthMsg.subjectParams, + .extractRecoveredAccountFromAcceptanceCommand( + emailAuthMsg.commandParams, templateIdx ); address computedGuardian = recoveryController.computeEmailAuthAddress( @@ -107,10 +107,10 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(newSigner); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), @@ -356,10 +356,10 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { templateIdx ); emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForRecovery; + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(simpleWallet); + commandParamsForRecovery[1] = abi.encode(address(0x0)); + emailAuthMsg.commandParams = commandParamsForRecovery; vm.mockCall( address(recoveryController.emailAuthImplementationAddr()), diff --git a/packages/contracts/test/EmailAuth.t.sol b/packages/contracts/test/EmailAuth.t.sol index 220f886b..29c9d3cc 100644 --- a/packages/contracts/test/EmailAuth.t.sol +++ b/packages/contracts/test/EmailAuth.t.sol @@ -117,140 +117,140 @@ contract EmailAuthTest is StructHelper { vm.stopPrank(); } - function testGetSubjectTemplate() public { + function testGetCommandTemplate() public { vm.startPrank(deployer); - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); + emailAuth.insertCommandTemplate(templateId, commandTemplate); vm.stopPrank(); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); } - function testExpectRevertGetSubjectTemplateTemplateIdNotExists() public { + function testExpectRevertGetCommandTemplateTemplateIdNotExists() public { vm.expectRevert(bytes("template id not exists")); - emailAuth.getSubjectTemplate(templateId); + emailAuth.getCommandTemplate(templateId); } - function testInsertSubjectTemplate() public { + function testInsertCommandTemplate() public { vm.startPrank(deployer); vm.expectEmit(true, false, false, false); - emit EmailAuth.SubjectTemplateInserted(templateId); - _testInsertSubjectTemplate(); + emit EmailAuth.CommandTemplateInserted(templateId); + _testInsertCommandTemplate(); vm.stopPrank(); } - function _testInsertSubjectTemplate() private { - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + function _testInsertCommandTemplate() private { + emailAuth.insertCommandTemplate(templateId, commandTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); } - function testExpectRevertInsertSubjectTemplateSubjectTemplateIsEmpty() + function testExpectRevertInsertCommandTemplateCommandTemplateIsEmpty() public { vm.startPrank(deployer); - string[] memory emptySubjectTemplate = new string[](0); - vm.expectRevert(bytes("subject template is empty")); - emailAuth.insertSubjectTemplate(templateId, emptySubjectTemplate); + string[] memory emptyCommandTemplate = new string[](0); + vm.expectRevert(bytes("command template is empty")); + emailAuth.insertCommandTemplate(templateId, emptyCommandTemplate); vm.stopPrank(); } - function testExpectRevertInsertSubjectTemplateTemplateIdAlreadyExists() + function testExpectRevertInsertCommandTemplateTemplateIdAlreadyExists() public { vm.startPrank(deployer); - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + emailAuth.insertCommandTemplate(templateId, commandTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); vm.expectRevert(bytes("template id already exists")); - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); + emailAuth.insertCommandTemplate(templateId, commandTemplate); vm.stopPrank(); } - function testUpdateSubjectTemplate() public { + function testUpdateCommandTemplate() public { vm.expectRevert(bytes("template id not exists")); - string[] memory result = emailAuth.getSubjectTemplate(templateId); + string[] memory result = emailAuth.getCommandTemplate(templateId); vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); vm.stopPrank(); - result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); vm.startPrank(deployer); vm.expectEmit(true, false, false, false); - emit EmailAuth.SubjectTemplateUpdated(templateId); - emailAuth.updateSubjectTemplate(templateId, newSubjectTemplate); + emit EmailAuth.CommandTemplateUpdated(templateId); + emailAuth.updateCommandTemplate(templateId, newCommandTemplate); vm.stopPrank(); - result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, newSubjectTemplate); + result = emailAuth.getCommandTemplate(templateId); + assertEq(result, newCommandTemplate); } - function testExpectRevertUpdateSubjectTemplateCallerIsNotTheModule() + function testExpectRevertUpdateCommandTemplateCallerIsNotTheModule() public { vm.expectRevert("only controller"); - emailAuth.updateSubjectTemplate(templateId, subjectTemplate); + emailAuth.updateCommandTemplate(templateId, commandTemplate); } - function testExpectRevertUpdateSubjectTemplateSubjectTemplateIsEmpty() + function testExpectRevertUpdateCommandTemplateCommandTemplateIsEmpty() public { vm.startPrank(deployer); - string[] memory emptySubjectTemplate = new string[](0); - vm.expectRevert(bytes("subject template is empty")); - emailAuth.updateSubjectTemplate(templateId, emptySubjectTemplate); + string[] memory emptyCommandTemplate = new string[](0); + vm.expectRevert(bytes("command template is empty")); + emailAuth.updateCommandTemplate(templateId, emptyCommandTemplate); vm.stopPrank(); } - function testExpectRevertUpdateSubjectTemplateTemplateIdNotExists() public { + function testExpectRevertUpdateCommandTemplateTemplateIdNotExists() public { vm.startPrank(deployer); vm.expectRevert(bytes("template id not exists")); - emailAuth.updateSubjectTemplate(templateId, subjectTemplate); + emailAuth.updateCommandTemplate(templateId, commandTemplate); vm.stopPrank(); } - function testDeleteSubjectTemplate() public { + function testDeleteCommandTemplate() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); vm.stopPrank(); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); vm.startPrank(deployer); vm.expectEmit(true, false, false, false); - emit EmailAuth.SubjectTemplateDeleted(templateId); - emailAuth.deleteSubjectTemplate(templateId); + emit EmailAuth.CommandTemplateDeleted(templateId); + emailAuth.deleteCommandTemplate(templateId); vm.stopPrank(); vm.expectRevert(bytes("template id not exists")); - emailAuth.getSubjectTemplate(templateId); + emailAuth.getCommandTemplate(templateId); } - function testExpectRevertDeleteSubjectTemplateCallerIsNotTheModule() + function testExpectRevertDeleteCommandTemplateCallerIsNotTheModule() public { vm.expectRevert("only controller"); - emailAuth.deleteSubjectTemplate(templateId); + emailAuth.deleteCommandTemplate(templateId); } - function testExpectRevertDeleteSubjectTemplateTemplateIdNotExists() public { + function testExpectRevertDeleteCommandTemplateTemplateIdNotExists() public { vm.startPrank(deployer); vm.expectRevert(bytes("template id not exists")); - emailAuth.deleteSubjectTemplate(templateId); + emailAuth.deleteCommandTemplate(templateId); vm.stopPrank(); } function testAuthEmail() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); @@ -310,7 +310,7 @@ contract EmailAuthTest is StructHelper { function testExpectRevertAuthEmailInvalidDkimPublicKeyHash() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); @@ -329,7 +329,7 @@ contract EmailAuthTest is StructHelper { function testExpectRevertAuthEmailEmailNullifierAlreadyUsed() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); @@ -348,7 +348,7 @@ contract EmailAuthTest is StructHelper { function testExpectRevertAuthEmailInvalidAccountSalt() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); @@ -367,7 +367,7 @@ contract EmailAuthTest is StructHelper { function testExpectRevertAuthEmailInvalidTimestamp() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); emailAuth.authEmail(emailAuthMsg); vm.stopPrank(); @@ -387,9 +387,9 @@ contract EmailAuthTest is StructHelper { vm.stopPrank(); } - function testExpectRevertAuthEmailInvalidSubject() public { + function testExpectRevertAuthEmailInvalidCommand() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); @@ -400,15 +400,15 @@ contract EmailAuthTest is StructHelper { assertEq(emailAuth.lastTimestamp(), 0); vm.startPrank(deployer); - emailAuthMsg.subjectParams[0] = abi.encode(2 ether); - vm.expectRevert(bytes("invalid subject")); + emailAuthMsg.commandParams[0] = abi.encode(2 ether); + vm.expectRevert(bytes("invalid command")); emailAuth.authEmail(emailAuthMsg); vm.stopPrank(); } function testExpectRevertAuthEmailInvalidEmailProof() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); diff --git a/packages/contracts/test/EmailAuthWithUserOverrideableDkim.t.sol b/packages/contracts/test/EmailAuthWithUserOverrideableDkim.t.sol index 3f55ef7d..26e10597 100644 --- a/packages/contracts/test/EmailAuthWithUserOverrideableDkim.t.sol +++ b/packages/contracts/test/EmailAuthWithUserOverrideableDkim.t.sol @@ -49,15 +49,15 @@ contract EmailAuthWithUserOverrideableDkimTest is StructHelper { ); } - function _testInsertSubjectTemplate() private { - emailAuth.insertSubjectTemplate(templateId, subjectTemplate); - string[] memory result = emailAuth.getSubjectTemplate(templateId); - assertEq(result, subjectTemplate); + function _testInsertCommandTemplate() private { + emailAuth.insertCommandTemplate(templateId, commandTemplate); + string[] memory result = emailAuth.getCommandTemplate(templateId); + assertEq(result, commandTemplate); } function testAuthEmail() public { vm.startPrank(deployer); - _testInsertSubjectTemplate(); + _testInsertCommandTemplate(); EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); vm.stopPrank(); diff --git a/packages/contracts/test/Integration.t.sol b/packages/contracts/test/Integration.t.sol index f02f3a91..628022b3 100644 --- a/packages/contracts/test/Integration.t.sol +++ b/packages/contracts/test/Integration.t.sol @@ -149,7 +149,7 @@ contract IntegrationTest is Test { } else { assertEq( address(simpleWallet), - 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A + 0x0C06688e61C06466E2a5C6fE4E15c359260a33f3 ); } address simpleWalletOwner = simpleWallet.owner(); @@ -172,7 +172,7 @@ contract IntegrationTest is Test { string memory publicInputFile = vm.readFile( string.concat( vm.projectRoot(), - "/test/build_integration/email_auth_public.json" + "/test/build_integration/email_auth_with_body_parsing_with_qp_encoding_public.json" ) ); string[] memory pubSignals = abi.decode( @@ -186,10 +186,10 @@ contract IntegrationTest is Test { emailProof.timestamp = vm.parseUint(pubSignals[11]); if (isZksync) { emailProof - .maskedSubject = "Accept guardian request for 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4"; + .maskedCommand = "Accept guardian request for 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4"; } else { emailProof - .maskedSubject = "Accept guardian request for 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A"; + .maskedCommand = "Accept guardian request for 0x0C06688e61C06466E2a5C6fE4E15c359260a33f3"; } emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32])); @@ -198,7 +198,7 @@ contract IntegrationTest is Test { emailProof.proof = proofToBytes( string.concat( vm.projectRoot(), - "/test/build_integration/email_auth_proof.json" + "/test/build_integration/email_auth_with_body_parsing_with_qp_encoding_proof.json" ) ); @@ -224,14 +224,13 @@ contract IntegrationTest is Test { ); // Call handleAcceptance -> GuardianStatus.ACCEPTED - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + bytes[] memory commandParamsForAcceptance = new bytes[](1); + commandParamsForAcceptance[0] = abi.encode(address(simpleWallet)); EmailAuthMsg memory emailAuthMsg = EmailAuthMsg({ templateId: recoveryController.computeAcceptanceTemplateId( templateIdx ), - subjectParams: subjectParamsForAcceptance, - skipedSubjectPrefix: 0, + commandParams: commandParamsForAcceptance, proof: emailProof }); recoveryController.handleAcceptance(emailAuthMsg, templateIdx); @@ -259,7 +258,7 @@ contract IntegrationTest is Test { publicInputFile = vm.readFile( string.concat( vm.projectRoot(), - "/test/build_integration/email_auth_public.json" + "/test/build_integration/email_auth_with_body_parsing_with_qp_encoding_public.json" ) ); pubSignals = abi.decode(vm.parseJson(publicInputFile), (string[])); @@ -268,14 +267,14 @@ contract IntegrationTest is Test { emailProof.domainName = "gmail.com"; emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9])); emailProof.timestamp = vm.parseUint(pubSignals[11]); - + // 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 is account 9 if (isZksync) { emailProof - .maskedSubject = "Set the new signer of 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; + .maskedCommand = "Set the new signer of 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; } else { emailProof - .maskedSubject = "Set the new signer of 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; + .maskedCommand = "Set the new signer of 0x0C06688e61C06466E2a5C6fE4E15c359260a33f3 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; } emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); @@ -288,7 +287,7 @@ contract IntegrationTest is Test { emailProof.proof = proofToBytes( string.concat( vm.projectRoot(), - "/test/build_integration/email_auth_proof.json" + "/test/build_integration/email_auth_with_body_parsing_with_qp_encoding_proof.json" ) ); @@ -302,17 +301,16 @@ contract IntegrationTest is Test { console.log("is code exist: ", vm.parseUint(pubSignals[33])); // Call handleRecovery -> isRecovering = true; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(address(simpleWallet)); - subjectParamsForRecovery[1] = abi.encode( + bytes[] memory commandParamsForRecovery = new bytes[](2); + commandParamsForRecovery[0] = abi.encode(address(simpleWallet)); + commandParamsForRecovery[1] = abi.encode( address(0xa0Ee7A142d267C1f36714E4a8F75612F20a79720) ); emailAuthMsg = EmailAuthMsg({ templateId: recoveryController.computeRecoveryTemplateId( templateIdx ), - subjectParams: subjectParamsForRecovery, - skipedSubjectPrefix: 0, + commandParams: commandParamsForRecovery, proof: emailProof }); recoveryController.handleRecovery(emailAuthMsg, templateIdx); diff --git a/packages/contracts/test/bin/accept.sh b/packages/contracts/test/bin/accept.sh index a952045a..86792f4e 100755 --- a/packages/contracts/test/bin/accept.sh +++ b/packages/contracts/test/bin/accept.sh @@ -10,5 +10,6 @@ yarn workspace @zk-email/ether-email-auth-circom gen-input \ --email-file $EMAIL_FILE_PATH \ --account-code $ACCOUNT_CODE \ --input-file $INPUT_FILE \ - --prove + --prove \ + --body exit 0 \ No newline at end of file diff --git a/packages/contracts/test/bin/recovery.sh b/packages/contracts/test/bin/recovery.sh index d212762b..fe3eda69 100755 --- a/packages/contracts/test/bin/recovery.sh +++ b/packages/contracts/test/bin/recovery.sh @@ -10,5 +10,6 @@ yarn workspace @zk-email/ether-email-auth-circom gen-input \ --email-file $EMAIL_FILE_PATH \ --account-code $ACCOUNT_CODE \ --input-file $INPUT_FILE \ - --prove + --prove \ + --body exit 0 \ No newline at end of file diff --git a/packages/contracts/test/emails/8453/accept.eml b/packages/contracts/test/emails/8453/accept.eml index b375f312..d0999703 100644 --- a/packages/contracts/test/emails/8453/accept.eml +++ b/packages/contracts/test/emails/8453/accept.eml @@ -1,90 +1,102 @@ -Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1350796ecu; - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) -X-Received: by 2002:a05:6214:5701:b0:6bd:699c:59a with SMTP id 6a1803df08f44-6bf4f77408cmr8835936d6.19.1723476540630; - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723476540; cv=none; +Delivered-To: suegamisora@gmail.com +Received: by 2002:a05:7011:c08e:b0:3e7:b7d5:224d with SMTP id jk14csp176375mdc; + Fri, 6 Sep 2024 06:22:18 -0700 (PDT) +X-Received: by 2002:a05:6a21:e8c:b0:1ce:d125:f8ef with SMTP id adf61e73a8af0-1ced125fa1dmr22928965637.51.1725628938102; + Fri, 06 Sep 2024 06:22:18 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725628938; cv=none; d=google.com; s=arc-20160816; - b=XdhAnSyVPNhLrcDkiFa14s5Ye+7nIVIoAZBrqep75GixiY6xhliTD29zzw41KvPHsQ - I9ZFk4IdAkNtD2PjJQ4urzKkvzU+S42rzKZCU8/91LvIoJbcUHMpQCuySQTGI+v8zDQc - DRsfTo1Gv2QmOkZhjb7kjgLh/ps7hn0BYXKru1JQToe55qfcFQ8HWWQo6CwLphwFhI+0 - 6c6aRCEcXDymNNYFMEOn8C/mKcvhs5gzSSwktfEZISHLYfAjz3mHP1h3sTnrN3TnfjGP - win5ATBLMi+5eVyKl6gN8ZYn0SwoIX86iK3GrfNcbJsO85rHD+MNzXjfvDzjI20Uq+F7 - aeEA== + b=C0Uiaaz8s45V/DXrIf+eFa4AWhHTg5mCaWt9mHGH2ha/Mf9T3mOjAfXQupd3v9o4uZ + nM//fJTtwnrJqSJyy2A9gFRBB/MoT5hglqI8eaQWtb1uXeeXyEBT9JH3N24nN6YO03e4 + Bn+ZI2Z+yLKrQL6Dh6Qswk8FSylsNTIbyKwXof/UorI/izBx20713GSa30Bus45Dm3nn + GqcqjJ5M6JHbfd4qvAZbjNV8DmbFkJ8+qWRuLN44Pd28B4iy3ItexEuM9vRYjeCLhpoG + 3voeOq9PZnAEuDonth7nYHkPWXXGCInenlCpmfetxWa7iKmjiSTn3MkeV9wqI/1e/i8j + ztvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; - h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; - fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=mlpmuieLw84UB2iPZrDZeTHtIjSLX2bFQ7uVjcuSqdCeT0Ra8rKHub22VqEDagz6Hh - iQ0OTqs1Pytijcw0g1sHn0O3fw6sQZRTXDRkqtnct6HH5drcJGkd4jjpr9Pym1CQaxnC - SRL48K32C0g/zTL9uCXAWe+qBRlMYd02xg3JLsqBR3PvG2ADLFCnKLnTVudOTc8QUNAQ - hK8xa7nN47mIPV+2p2kv00aJmusOGc4UmDlfafYP5+t6KqJJ1abySEfEu6UQtsc+9boS - RAzuxHHgc4jiEpSakQciy4BKFA3DGJsua8fcIgEy1pnDCCfdqVfgeDpuoqsXE4YsRGcr - pO/A==; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=U/hETzVqi/RggWbN6N7AaudJ+V7s62JjqcrItueD+SE=; + fh=r9ZW45D/4i7BIl/4UeFGrkYKwbplztqhOVKfbV+WD3I=; + b=RTSYWdGdudJMP0NxrGFgLGVbFLNFjIEL4VPVdyD4hU7Kg25XSPOwMusUrVZLZj1Ci2 + hGyjpt2BlLveWpZCfbgTFr+8HfktTW+sGeyyRD6KaF7sLsxHBowYgyXGKZEz+ivdJtpK + +nXCHVDc3WvWkrsJNk/9JPS/AMusv8ur5gYBwC9e7zxrozaHiuPO9OPU2iGMT8ZJ2T02 + p/HABL627ar6r2jZxYWCXwyidYvhvz6e9NphTM5GMXtKixOH0+qMFXq0TmRdFZtnzOKF + L93aSnigdJIGAuNEIFKqb8C1HFsZhv2mQx4UdFE9Duar/tdJ8R4itvBVC6hH9tEq2cnc + Xd0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kIs11UJs; - spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zn5YD8bw; + spf=pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emaiwallet.alice@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com -Return-Path: +Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 6a1803df08f44-6bd82e687b4sor32101386d6.6.2024.08.12.08.29.00 - for + by mx.google.com with SMTPS id d2e1a72fcca58-718816aabbasor1473227b3a.5.2024.09.06.06.22.17 + for (Google Transport Security); - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) -Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; + Fri, 06 Sep 2024 06:22:18 -0700 (PDT) +Received-SPF: pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kIs11UJs; - spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zn5YD8bw; + spf=pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emaiwallet.alice@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723476540; x=1724081340; dara=google.com; - h=to:subject:message-id:date:from:mime-version:from:to:cc:subject + d=gmail.com; s=20230601; t=1725628937; x=1726233737; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; - b=kIs11UJsGxLHYsxuMHUikbfKz4X+t4+pdLy8iy6luM0zplvFe24BecDYmohTiFPgLd - ydSOkbBiMJrfsCLqSQSL+La690rsmJz3hH2vWpXHCTxtq9IkOn539mD44EPyI0rpY2pX - +B8V5ppvlYb+PYVyEe1oKtdAw/9U3xgwF0FbBZOsXY9pcXlWe3LCkLHJHsnFThJqO4At - ZEmqakxkwBog3szCj+zStNc2TQKHfgTAIJ0IiC1Qcri8xHw9MZ9t7l8N7f2krGxg/i4q - mH+m5LgHwKiymhpRYpPh4pbXViyJt0ZPX+u8hVNYCu9fuTDw91FZ0h62kQCJU1Fo0gqn - CejQ== + bh=U/hETzVqi/RggWbN6N7AaudJ+V7s62JjqcrItueD+SE=; + b=Zn5YD8bwElKAckg4neNi2kXp1b3X7smPAWqq/Oq1xUlLjJpQtb9SE/3wF1X68Rm8Lf + hf5A3ELJ8nPRugtVtSRCSuMf4o8ULe65HNotlQbtsc0INdDXNBlWJNDnDwqbu+27t0uJ + y8sLbEuqgGF4TNnQJZMJ8vUJZ8qVoh0UXOa6ZWQjqmndohpwxNlTJ41hPKfeOw181GqT + Nq4Am6ag4IlZk7lsgAaWvULEbkAsMoQjk4kYX66WuafTbPjQGQ9il/+aPytPWrRX2/eW + gbgyHpCOV9qMovdPAx3NBWWHzW+6XRHdpt2jPLJR0BUIeQHFMaKg3rcguyzETk9qc2Ah + 4MRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723476540; x=1724081340; - h=to:subject:message-id:date:from:mime-version:x-gm-message-state + d=1e100.net; s=20230601; t=1725628937; x=1726233737; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; - b=dCAoi7QTorFaGLllgUbFtLy7SwjjfbmLv2b90AOFzOTDJwxKWuZcuRvIXtn+mNbkxr - R3DSQOVI4kyPn83avG5kJK9rQebgdluW8kRSqTTBGsewDkVoU++XlaH/5Fr4AycL+Jz2 - M4H29ErGv5YwfZVkVNchNrZ1wm9PzNmZDryNWfN8MVBSvCyz5rEzbSZYwfPKJ8jdNSpd - m5I4NQn0yaceCbnOvS+ymdLUfH/xsTUiDb12p5mFH1okiffoIH2kba51TERTFQ1cAXhT - 6x4oGqDLZ48Wa17J+Pebx22E4kc+qoT44rFbzLKx18UK7QvcDVY84a2rvDK/aHdl89nA - MFcA== -X-Gm-Message-State: AOJu0YxdgZ1gX+YYHJudxoob+1wT6ocah5PIbcqwrkCPA/V6E4p26Ebe - G3qU3UnP4g7Rw60WEroicxfHPklu7dQf0EY42VdDJY7ovlqVUmkTCk8otd8Qag0iY+gMCiaP/ab - 5oga2YGGxnm+5Z/FtzkFsnJunAyXQ -X-Google-Smtp-Source: AGHT+IGkhUwt1MpumPRZRv36hsu/nmBtHu3hbsTgn0LxixNgewuPT/XesalvK0ODiL5JhlA73CIktfloJw2rJAZnXDI= -X-Received: by 2002:a05:6214:4906:b0:6b0:6ad8:ebd8 with SMTP id - 6a1803df08f44-6bf4f644182mr6446666d6.7.1723476539846; Mon, 12 Aug 2024 - 08:28:59 -0700 (PDT) + bh=U/hETzVqi/RggWbN6N7AaudJ+V7s62JjqcrItueD+SE=; + b=G6GBE4hN7llTSkiuOBoxhrEngL5wkI4ueW8jdPaDU95H0oZTDM6JLAXnRQImvhtU0w + slkuBX/GeRu8S13I0zb+OoatYgIIKelJc4A2KlT/P4gL+4jIJ6AqKpJJRKLuHyXk/JOH + U5X7HYOff95ZgjNhKU5fGt4hGxmrsFT6YbD4+EqkyOSCqIGcsDK3IuiwY+3pKWJoqGJv + UHuMmHTnttx0bByfrxyEMsSoBtokafkxVyBTeB3pm2/ROEbBf1DbfnQUrkVKaZea49tU + q8XOL8iGQHa2ryJQEIe75FtX80rtIYSrx+fmVuSmkTU/qEzOXyERWsaRovKw2hTyF1+m + i3iQ== +X-Gm-Message-State: AOJu0Yx3lbc0RipKC+OMeuNv8FIPDUwGpfPoIeB6Vr1arRKhB8A4F2M9 + 1MaG/v5US/X9/i66lFjWmRHFRPzh6UPt2UxSj5mvLwuYkGQrmYJEpQS3pg== +X-Google-Smtp-Source: AGHT+IHOoL6WU+9j0Nj9M5rytPIYrSUIFFYhKdyafbbrZrRUrbeYMT+b4sNoZe4+99M+t90YuA2pCw== +X-Received: by 2002:a05:6a20:d80b:b0:1ca:ccd0:1bf6 with SMTP id adf61e73a8af0-1cce0ffe3cemr28636292637.8.1725628937058; + Fri, 06 Sep 2024 06:22:17 -0700 (PDT) +Return-Path: +Received: from SoraMacBook-4.local ([86.48.13.220]) + by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-718295770a4sm1560089b3a.214.2024.09.06.06.22.15 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Fri, 06 Sep 2024 06:22:16 -0700 (PDT) +Message-ID: <66db0208.050a0220.1a717f.5b19@mx.google.com> +Date: Fri, 06 Sep 2024 06:22:16 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============8229076081096717965==" MIME-Version: 1.0 -From: "emailwallet.relayer.2" -Date: Tue, 13 Aug 2024 00:28:48 +0900 -Message-ID: -Subject: Accept guardian request for 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A - Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 -To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="000000000000efbca3061f7e2677" +From: emaiwallet.alice@gmail.com +To: suegamisora@gmail.com +Subject: Email Account Recovery Test1 ---000000000000efbca3061f7e2677 -Content-Type: text/plain; charset="UTF-8" - - - ---000000000000efbca3061f7e2677 -Content-Type: text/html; charset="UTF-8" +--===============8229076081096717965== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 -

---000000000000efbca3061f7e2677-- + + +

Hello!

+

This is a test email with a basic HTML body.

+
+
Accept guardian request for 0x0C06688e61C06466E= +2a5C6fE4E15c359260a33f3 Code 1162ebff40918afe5305e68396f0283eb675901d0387f9= +7d21928d423aaa0b54
+
+ + + =20 +--===============8229076081096717965==-- diff --git a/packages/contracts/test/emails/8453/recovery.eml b/packages/contracts/test/emails/8453/recovery.eml index 863f6dc3..b192a23f 100644 --- a/packages/contracts/test/emails/8453/recovery.eml +++ b/packages/contracts/test/emails/8453/recovery.eml @@ -1,90 +1,101 @@ -Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1352251ecu; - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) -X-Received: by 2002:a05:6830:4408:b0:70c:92ee:5662 with SMTP id 46e09a7af769-70c9387b99amr648568a34.8.1723476687515; - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723476687; cv=none; +Delivered-To: suegamisora@gmail.com +Received: by 2002:a05:7011:c08e:b0:3e7:b7d5:224d with SMTP id jk14csp271764mdc; + Fri, 6 Sep 2024 08:50:39 -0700 (PDT) +X-Received: by 2002:a17:903:32cf:b0:205:68a4:b2d9 with SMTP id d9443c01a7336-206f05afdffmr38516325ad.48.1725637839417; + Fri, 06 Sep 2024 08:50:39 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725637839; cv=none; d=google.com; s=arc-20160816; - b=xyFntJJHcC6779isyMw1J3xYUdUTrZj6/MD+AekQSj09itt/i+0IEe/XFInOCFPtfC - igMeUXTqS8Thl3QFJzG7sxCMmxZy2/0WHllfJIEXBH+sX9lt/yh9eYc8Feqa+7c2fZB7 - qM5Rks4YQgxQY0clMnABdbLtR/tZt491WjLlUCKXn5tzdJjxmUUm/ttQIc6bJ/YwRRH3 - aBSRPeOMk4vbZ2sNpMbqYBWnVWx4t3xV2CREHYYxR69lWgOvGnYu77K55b0UEwxbJfaI - QN1Q1A3ianXG3ueN59RblMwEZ4ZwMtuKcJGXSEEqi1jaFU5DAD2EJ96jO3/XAeH900SA - 8A/w== + b=swnmCCO5fnfNvudit2Hp8Be43saZpYn8oi7H0GNNVB5PqC8YSj2xleA/Pf59nU09lv + 7rDjCoHHeAhJlOtMJicYVv5q6EgBefmVQIpeUfMAQKYGHJjLgy/1rudbeSYF0HoBohJt + q7xboOzgfAftztF3oqtYxmKtT4qTfCARDLWXc3w/dRY+45a+/rYGFXvow54XvFaQV/zo + qT19dc9jytkoROUp8tSnJ55PA5qI2RSR74bBuG74HCG9FsGJGzSudJusFa3CEoi1VBh+ + JxNn2/Pt/3erStuTPK7mRMMBV/FXJ/fPEkY541QFZs/pcwYcrCab/5jkk3yIrifaGnnu + /ZpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; - h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; - fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=vR60Lc7tUDCe6GlR1SaaaWoAOGTdwNgkMnWjgKAGE9WpB74aE3EQtjogiEZ+tRxYub - 9RyptryjBvulXUfCmr6+YyBKUkQl9mGBNSGIP+JsmTeIC9UA/KN3kcrxG6zSHvbCjb5y - 7hXv0VM+ZQStzE8OBcliGaEqZ7NMDVSCBi/WuJ1cHkrGkQ+EcNA4RyzG1mx3iXmTyiro - WKp6c7Wt+t3tSxHM+INFVtu66IZw+Sygh3RE4nxMZlJDufoskGODe3Q2eb2jDEHjXs0k - TOJnmu6jun3rwnSN4BT8s12h/2s8Q+NUQRsWd+jbDxzSPtbrV8ovR2tC/QhcgwfKlPC0 - LfFA==; + h=subject:to:from:mime-version:date:message-id:dkim-signature; + bh=r7rF/jG1IIgCj5l2v1qn74V4v31Wj5mEk1ZeR+AbNFM=; + fh=r9ZW45D/4i7BIl/4UeFGrkYKwbplztqhOVKfbV+WD3I=; + b=O2BjkV3K6AsqDUL1M+z2g2jZxwZHFDn0VR2ocFHjf2dSGTxaWyJJrF4F1J6Ivn0xqu + 6wfXVj2vlm5SqvyJA5zySLuN/fMhqnNwWTtNC07JHVfWIQOurGVD6ADXb02wT3UrdRsX + Gi5Hnx7VWkVTN6tpnv9xUjQMGAcmz9OF2axehZBqYZiyVss31tDWucKgP3e4/zAd2KH3 + ohjL81q8uCWeQqteH87rdDapZpvvuTwddZ0wJIrXeru4qkkNYzf6kcQ3UiQnfpH8yjTA + P1b7JdnX2dZzok/UR10vrTt0Guw7GsesbiUF2TjffIkYl6NLGDy7VTR/nSwTEW34Ipu6 + UURQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=gKy07eeB; - spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y9Hw3mvz; + spf=pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emaiwallet.alice@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com -Return-Path: +Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 46e09a7af769-70c7b81de58sor2626987a34.8.2024.08.12.08.31.27 - for + by mx.google.com with SMTPS id d9443c01a7336-2068b78ea4asor83051425ad.12.2024.09.06.08.50.39 + for (Google Transport Security); - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) -Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; + Fri, 06 Sep 2024 08:50:39 -0700 (PDT) +Received-SPF: pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=gKy07eeB; - spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y9Hw3mvz; + spf=pass (google.com: domain of emaiwallet.alice@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emaiwallet.alice@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723476687; x=1724081487; dara=google.com; - h=to:subject:message-id:date:from:mime-version:from:to:cc:subject + d=gmail.com; s=20230601; t=1725637839; x=1726242639; dara=google.com; + h=subject:to:from:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; - b=gKy07eeB8zGt9GomoXrr52dA1L7KPoEumb8M29aBNkLnOzQUlc0rcNrUvpIn8DJIFu - 1Yu+MHQ5+zvkXRoQ/Ll/oxWJmNWUWraM4dxGzuSN6Bxm34dto33ud2LlrdGYHpbLIofW - WVrs8/FHVxuXPXn3c8MNmNrP92pPLZY/Snt0ZJN7wbEo5dWn/dGcSTwoyRiD35OiGs0+ - HmJvfuXKfTMrU3R+Xkr5HJ/GBWRB/jZ6e9bcxgydHpS86O/NEY5hu8XQqMBrYZ5uldrg - tO1yLvvScJz7mX/90BpgLa1oqxjeKe4x64QHoSi3J8oPO6vs2XLa1ISBJiyaGsrnN+2o - hd+A== + bh=r7rF/jG1IIgCj5l2v1qn74V4v31Wj5mEk1ZeR+AbNFM=; + b=Y9Hw3mvz57NZD2prFl2siJqbw22eRla3tVnCYYP77QkwEjFMOfQOpsfqcWwClSSqJs + 4AHdJY+0CKOmLjKExQ/hYc/syVVfcqA8n4b5oVDbfy06XDdMJpfckOrlRDZ+Cbm08tKU + z4MaFcbBSwZt0NggdYhRHJp6VOP/wkemzlwwUK/CCZ5IYOUInXxwfF2ldwIY55M3bEQI + 687rn5XD+jc7QjtPkjZLA3YAWSkwLMjywWNkl4LExMPEbreQyVxSCXlDriZXTn2qntOD + dwC4cicih5wRfknqNxIIYIshvZDIylhV3Jf7fCqolNLYjYl8DMkBMC2uffrjERfo9eya + FxAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723476687; x=1724081487; - h=to:subject:message-id:date:from:mime-version:x-gm-message-state + d=1e100.net; s=20230601; t=1725637839; x=1726242639; + h=subject:to:from:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; - b=XpgaLQCJ0Q/aSykYyZ3fQKX3arVzLTzTId0UVYrhOxFAomoOZEPlLh+jPONYVoIj5a - PZGZX1KUgKOn/kqLoQ4quqioSTyc2skjXlWr3cXxhF8KBBfAY1Vbc2cU97yvEBQu3YI2 - uZywVvv0hVxoJ5qOG3xaKrR+oR944lJ32LTH+Tw2KrfeKeOJLydGqHboyOeGrk+DXLB8 - Q69OiawyqGPOxw0cMfijOujWODZjCZTV/+RXiWE6vCOaaA2AZ5qMff1NAJqKKNJoBjhS - ggz1gozz7ZlA5xZtlIojvVmua+ewqkU8li8p0gf0nEBI+Z1qMwGN1zKWYsj4v9/kRLS/ - mJ9w== -X-Gm-Message-State: AOJu0YxJZZYzpg/M0lvPwHgVJLl9H9fOiX7CMDHOh7dNC1G9yefXKIIe - MVIVdB1WUtmnClgXm3c6X9F/HVDiTnNzfpCn2onA1oJTyB39TiB850yprfG7nJ8R2F5yC6wETMC - qzZnn0A8tHDNqNDUZQsFSpVd34YhG -X-Google-Smtp-Source: AGHT+IFwR7MEX2BF64JNUYLXAMt0FJw2nC6yUoxcjpx+oLfHvzJ7PGy7PJjinstDbKPuBkbLsnnR0tY91gm8tWzmnLU= -X-Received: by 2002:a05:6830:270b:b0:70b:4408:d3b8 with SMTP id - 46e09a7af769-70c9399c346mr498498a34.33.1723476686792; Mon, 12 Aug 2024 - 08:31:26 -0700 (PDT) + bh=r7rF/jG1IIgCj5l2v1qn74V4v31Wj5mEk1ZeR+AbNFM=; + b=JStPHuR05VmxJ83N4tvsRWcPd4/IyvjM8qzKsk7gg2yIIn9Olqzm5RcmdzleYNItt8 + eScfIq+znAjmEX6sYIV6XzSraNdCRBoznnki0A9deJf8wpWAenU+G+j2kHnqNL0K8ZvH + tsB+g111feWk6j7Pb7+UmZwEhzW+hUPWEn8W1Y0HZA18eDm+KT535aE1Cmsn7a2EIsP4 + S60k4YxLXb6gycUEzB9duvoz/eM7cKcuC44le3Lpr5ThO9kWtYq3kt7TFeGU/B3oPHwY + Dz2A7WJMEHG+OW+XQql3m2BP0WSqrOFQejpn23LqluJ85wlz2MReV6eKATMi7zCiOlPs + b4FQ== +X-Gm-Message-State: AOJu0YxGAo0UMdPPmSJTQYE+xTbAo/8Bn7mhXy4ldHlUCBmJ3d0AWyje + xUKE6H/Ann2vBJmbW8db1ON1EvCpd/JQXnxIhXD92H2v+1eavqiMbbn/vA== +X-Google-Smtp-Source: AGHT+IEp1etgXiS/CaTTDtadiWXBD4axZ2BtEKvIwz2SYeOko6Ts6ncVN2SHuqpZVrBMd2E5CwET6g== +X-Received: by 2002:a17:90b:4b11:b0:2d3:dd48:992c with SMTP id 98e67ed59e1d1-2dad504aa69mr3827499a91.23.1725637838520; + Fri, 06 Sep 2024 08:50:38 -0700 (PDT) +Return-Path: +Received: from SoraMacBook-4.local ([86.48.13.220]) + by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe45fbsm1753107a91.6.2024.09.06.08.50.37 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Fri, 06 Sep 2024 08:50:38 -0700 (PDT) +Message-ID: <66db24ce.170a0220.2673da.5f04@mx.google.com> +Date: Fri, 06 Sep 2024 08:50:38 -0700 (PDT) +Content-Type: multipart/alternative; boundary="===============0012875658589814522==" MIME-Version: 1.0 -From: "emailwallet.relayer.2" -Date: Tue, 13 Aug 2024 00:31:15 +0900 -Message-ID: -Subject: Set the new signer of 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A to - 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 -To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="000000000000b1f747061f7e2f2e" +From: emaiwallet.alice@gmail.com +To: suegamisora@gmail.com +Subject: Email Account Recovery Test2 ---000000000000b1f747061f7e2f2e -Content-Type: text/plain; charset="UTF-8" - - - ---000000000000b1f747061f7e2f2e -Content-Type: text/html; charset="UTF-8" +--===============0012875658589814522== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset=utf-8 -

---000000000000b1f747061f7e2f2e-- + + +

Hello!

+

This is a test email with a basic HTML body.

+
+
Set the new signer of 0x0C06688e61C06466E2a5C6f= +E4E15c359260a33f3 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
+
+ + + =20 +--===============0012875658589814522==-- diff --git a/packages/contracts/test/helpers/DeploymentHelper.sol b/packages/contracts/test/helpers/DeploymentHelper.sol index 3acad108..c3e720fe 100644 --- a/packages/contracts/test/helpers/DeploymentHelper.sol +++ b/packages/contracts/test/helpers/DeploymentHelper.sol @@ -34,8 +34,8 @@ contract DeploymentHelper is Test { bytes32 accountSalt; uint templateId; - string[] subjectTemplate; - string[] newSubjectTemplate; + string[] commandTemplate; + string[] newCommandTemplate; bytes mockProof = abi.encodePacked(bytes1(0x01)); string selector = "12345"; @@ -106,8 +106,8 @@ contract DeploymentHelper is Test { uint templateIdx = 0; templateId = uint256(keccak256(abi.encodePacked("TEST", templateIdx))); - subjectTemplate = ["Send", "{decimals}", "ETH", "to", "{ethAddr}"]; - newSubjectTemplate = ["Send", "{decimals}", "USDC", "to", "{ethAddr}"]; + commandTemplate = ["Send", "{decimals}", "ETH", "to", "{ethAddr}"]; + newCommandTemplate = ["Send", "{decimals}", "USDC", "to", "{ethAddr}"]; // Create RecoveryController as EmailAccountRecovery implementation RecoveryController recoveryControllerImpl = new RecoveryController(); diff --git a/packages/contracts/test/helpers/RecoveryController.sol b/packages/contracts/test/helpers/RecoveryController.sol index 725bca68..a73e5b7e 100644 --- a/packages/contracts/test/helpers/RecoveryController.sol +++ b/packages/contracts/test/helpers/RecoveryController.sol @@ -22,12 +22,6 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { mapping(address => uint) public timelockPeriodOfAccount; mapping(address => uint) public currentTimelockOfAccount; - // modifier onlyNotRecoveringOwner() { - // require(msg.sender == owner(), "only owner"); - // require(!isRecovering, "recovery in progress"); - // _; - // } - constructor() {} function initialize( @@ -48,7 +42,7 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { return isActivatedOfAccount[recoveredAccount]; } - function acceptanceSubjectTemplates() + function acceptanceCommandTemplates() public pure override @@ -64,7 +58,7 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { return templates; } - function recoverySubjectTemplates() + function recoveryCommandTemplates() public pure override @@ -83,22 +77,22 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { return templates; } - function extractRecoveredAccountFromAcceptanceSubject( - bytes[] memory subjectParams, + function extractRecoveredAccountFromAcceptanceCommand( + bytes[] memory commandParams, uint templateIdx ) public pure override returns (address) { require(templateIdx == 0, "invalid template index"); - require(subjectParams.length == 1, "invalid subject params"); - return abi.decode(subjectParams[0], (address)); + require(commandParams.length == 1, "invalid command params"); + return abi.decode(commandParams[0], (address)); } - function extractRecoveredAccountFromRecoverySubject( - bytes[] memory subjectParams, + function extractRecoveredAccountFromRecoveryCommand( + bytes[] memory commandParams, uint templateIdx ) public pure override returns (address) { require(templateIdx == 0, "invalid template index"); - require(subjectParams.length == 2, "invalid subject params"); - return abi.decode(subjectParams[0], (address)); + require(commandParams.length == 2, "invalid command params"); + return abi.decode(commandParams[0], (address)); } function requestGuardian(address guardian) public { @@ -122,10 +116,10 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { function acceptGuardian( address guardian, uint templateIdx, - bytes[] memory subjectParams, + bytes[] memory commandParams, bytes32 ) internal override { - address account = abi.decode(subjectParams[0], (address)); + address account = abi.decode(commandParams[0], (address)); require(!isRecovering[account], "recovery in progress"); require(guardian != address(0), "invalid guardian"); @@ -134,17 +128,17 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { "guardian status must be REQUESTED" ); require(templateIdx == 0, "invalid template index"); - require(subjectParams.length == 1, "invalid subject params"); + require(commandParams.length == 1, "invalid command params"); guardians[guardian] = GuardianStatus.ACCEPTED; } function processRecovery( address guardian, uint templateIdx, - bytes[] memory subjectParams, + bytes[] memory commandParams, bytes32 ) internal override { - address account = abi.decode(subjectParams[0], (address)); + address account = abi.decode(commandParams[0], (address)); require(!isRecovering[account], "recovery in progress"); require(guardian != address(0), "invalid guardian"); require( @@ -152,8 +146,8 @@ contract RecoveryController is OwnableUpgradeable, EmailAccountRecovery { "guardian status must be ACCEPTED" ); require(templateIdx == 0, "invalid template index"); - require(subjectParams.length == 2, "invalid subject params"); - address newSignerInEmail = abi.decode(subjectParams[1], (address)); + require(commandParams.length == 2, "invalid command params"); + address newSignerInEmail = abi.decode(commandParams[1], (address)); require(newSignerInEmail != address(0), "invalid new signer"); isRecovering[account] = true; newSignerCandidateOfAccount[account] = newSignerInEmail; diff --git a/packages/contracts/test/helpers/StructHelper.sol b/packages/contracts/test/helpers/StructHelper.sol index cae1eb2f..a2f3963f 100644 --- a/packages/contracts/test/helpers/StructHelper.sol +++ b/packages/contracts/test/helpers/StructHelper.sol @@ -8,9 +8,9 @@ contract StructHelper is DeploymentHelper { public returns (EmailAuthMsg memory emailAuthMsg) { - bytes[] memory subjectParams = new bytes[](2); - subjectParams[0] = abi.encode(1 ether); - subjectParams[1] = abi.encode( + bytes[] memory commandParams = new bytes[](2); + commandParams[0] = abi.encode(1 ether); + commandParams[1] = abi.encode( "0x0000000000000000000000000000000000000020" ); @@ -18,7 +18,7 @@ contract StructHelper is DeploymentHelper { domainName: "gmail.com", publicKeyHash: publicKeyHash, timestamp: 1694989812, - maskedSubject: "Send 1 ETH to 0x0000000000000000000000000000000000000020", + maskedCommand: "Send 1 ETH to 0x0000000000000000000000000000000000000020", emailNullifier: emailNullifier, accountSalt: accountSalt, isCodeExist: true, @@ -27,8 +27,7 @@ contract StructHelper is DeploymentHelper { emailAuthMsg = EmailAuthMsg({ templateId: templateId, - subjectParams: subjectParams, - skipedSubjectPrefix: 0, + commandParams: commandParams, proof: emailProof }); diff --git a/packages/prover/Dockerfile b/packages/prover/Dockerfile index f0430c2a..4e2428cb 100644 --- a/packages/prover/Dockerfile +++ b/packages/prover/Dockerfile @@ -9,8 +9,7 @@ RUN apt-get update && \ RUN npm install -g n RUN n 18 RUN npm install -g yarn snarkjs - -RUN git clone https://github.com/zkemail/ether-email-auth.git +RUN git clone -b feat/body-parsing-circuit https://github.com/zkemail/ether-email-auth.git WORKDIR /ether-email-auth/packages/prover RUN pip install -r requirements.txt RUN cp ./circom_proofgen.sh /root @@ -24,7 +23,7 @@ RUN ls /root # RUN cp /email-wallet/packages/prover/params/email_sender.wasm /root/params RUN mkdir params WORKDIR /root/params -RUN gdown "https://drive.google.com/uc?id=1TChinAnHr9eV8H_OV9SVReF8Rvu6h1XH" +RUN gdown "https://drive.google.com/uc?id=1LLLTmUxqevSvMAKfQMOiJIdpYxZEPlSf" RUN unzip params.zip RUN mv params/* /root/params WORKDIR /root diff --git a/packages/prover/core.py b/packages/prover/core.py index d182cc81..194fd9f0 100644 --- a/packages/prover/core.py +++ b/packages/prover/core.py @@ -7,7 +7,7 @@ def gen_email_auth_proof(nonce: str, is_local: bool, input: dict) -> dict: - circuit_name = "email_auth" + circuit_name = "email_auth_with_body_parsing_with_qp_encoding" print("Store input") store_input(circuit_name, nonce, input) print("Generate proof") diff --git a/packages/prover/local_setup.sh b/packages/prover/local_setup.sh index 58f35ea3..7fdda877 100755 --- a/packages/prover/local_setup.sh +++ b/packages/prover/local_setup.sh @@ -6,7 +6,7 @@ mkdir -p build npm install -g snarkjs@latest pip install -r requirements.txt mkdir build && cd build -gdown "https://drive.google.com/uc?id=1TChinAnHr9eV8H_OV9SVReF8Rvu6h1XH" +gdown "https://drive.google.com/uc?id=1LLLTmUxqevSvMAKfQMOiJIdpYxZEPlSf" unzip params.zip # curl https://email-wallet-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/emailwallet-account-creation/contributions/emailwallet-account-creation_00019.zkey --output /root/params/account_creation.zkey # curl https://email-wallet-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/emailwallet-account-init/contributions/emailwallet-account-init_00007.zkey --output /root/params/account_init.zkey diff --git a/packages/prover/modal_server.py b/packages/prover/modal_server.py index e7466f92..22c08b33 100644 --- a/packages/prover/modal_server.py +++ b/packages/prover/modal_server.py @@ -5,7 +5,8 @@ from google.cloud.logging_v2.handlers import setup_logging from google.oauth2 import service_account -app = modal.App("email-auth-prover-v1.0.4") + +app = modal.App("email-auth-prover-body-parsing-v1.0.0") image = modal.Image.from_dockerfile("Dockerfile") diff --git a/packages/relayer/.env.example b/packages/relayer/.env.example index fe8fd1be..5b1428cb 100644 --- a/packages/relayer/.env.example +++ b/packages/relayer/.env.example @@ -6,7 +6,7 @@ CHAIN_ID=11155111 # Chain ID of the testnet. SMTP_SERVER= -PROVER_ADDRESS="https://zkemail--email-auth-prover-v1-0-4-flask-app.modal.run" +PROVER_ADDRESS="https://zkemail--email-auth-prover-body-parsing-v1-0-0-flask-app.modal.run" DATABASE_URL= "postgres://test@localhost/emailauth_test" RELAYER_EMAIL_ADDR= diff --git a/packages/relayer/Cargo.toml b/packages/relayer/Cargo.toml index 2ce3120e..7fac6c4e 100644 --- a/packages/relayer/Cargo.toml +++ b/packages/relayer/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "1.0.68" tiny_http = "0.12.0" lettre = { version = "0.10.4", features = ["tokio1", "tokio1-native-tls"] } ethers = { version = "2.0.10", features = ["abigen"] } -relayer-utils = { git = "https://github.com/zkemail/relayer-utils", rev = "2c3e9b8" } +relayer-utils = { version = "0.3.7", git = "https://github.com/zkemail/relayer-utils.git" } futures = "0.3.28" sqlx = { version = "=0.7.3", features = ["postgres", "runtime-tokio"] } regex = "1.10.2" @@ -39,9 +39,6 @@ ff = { version = "0.13.0", default-features = false, features = ["std"] } async-trait = "0.1.36" handlebars = "4.4.0" graphql_client = { version = "0.13.0", features = ["reqwest"] } -ic-utils = { version = "0.30.0" } -ic-agent = { version = "0.30.0", features = ["pem", "reqwest"] } -candid = "0.9.11" lazy_static = "1.4" slog = { version = "2.7.0", features = [ "max_level_trace", @@ -51,10 +48,12 @@ slog-async = "2.8.0" slog-term = "2.9.0" slog-json = "2.6.1" file-rotate = "0.7.5" -function_name = "0.3.0" base64 = "0.21.7" uuid = "1.8.0" http = "1.1.0" +ic-agent = { version = "0.37.1", features = ["pem", "reqwest"] } +ic-utils = "0.37.0" +candid = "0.10.10" [build-dependencies] ethers = "2.0.10" diff --git a/packages/relayer/eml_templates/acceptance_request.html b/packages/relayer/eml_templates/acceptance_request.html index f350817a..da2e4356 100644 --- a/packages/relayer/eml_templates/acceptance_request.html +++ b/packages/relayer/eml_templates/acceptance_request.html @@ -166,8 +166,8 @@ margin-bottom: 15px; " > - You have received an guardian request from the wallet address {{walletAddress}}. - Reply "Confirm" to this email to accept the request. + You have received an guardian request from the wallet address {{walletAddress}}. + Reply "Confirm" to this email to accept the request.
Your request ID is #{{requestId}}.

@@ -414,5 +414,6 @@   +
{{command}}
diff --git a/packages/relayer/eml_templates/credential_not_present.html b/packages/relayer/eml_templates/credential_not_present.html index d823a014..b13ee178 100644 --- a/packages/relayer/eml_templates/credential_not_present.html +++ b/packages/relayer/eml_templates/credential_not_present.html @@ -167,7 +167,7 @@ " > You have received an guardian request from the wallet address {{walletAddress}}. - Add the guardian's account code in the subject and reply to this email. + Reply to this email.
Your request ID is #{{requestId}}.

@@ -414,5 +414,6 @@   +
{{command}}
diff --git a/packages/relayer/eml_templates/recovery_request.html b/packages/relayer/eml_templates/recovery_request.html index efb9d9ae..0081a8a6 100644 --- a/packages/relayer/eml_templates/recovery_request.html +++ b/packages/relayer/eml_templates/recovery_request.html @@ -414,5 +414,6 @@   +
{{command}}
diff --git a/packages/relayer/src/abis/email_account_recovery.rs b/packages/relayer/src/abis/email_account_recovery.rs index dcdb3ae2..b49c5af1 100644 --- a/packages/relayer/src/abis/email_account_recovery.rs +++ b/packages/relayer/src/abis/email_account_recovery.rs @@ -7,7 +7,7 @@ pub use email_account_recovery::*; clippy::upper_case_acronyms, clippy::type_complexity, dead_code, - non_camel_case_types + non_camel_case_types, )] pub mod email_account_recovery { #[allow(deprecated)] @@ -16,448 +16,562 @@ pub mod email_account_recovery { constructor: ::core::option::Option::None, functions: ::core::convert::From::from([ ( - ::std::borrow::ToOwned::to_owned("acceptanceSubjectTemplates"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("acceptanceSubjectTemplates",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Array( + ::std::borrow::ToOwned::to_owned("acceptanceCommandTemplates"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "acceptanceCommandTemplates", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Array( ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::String, + ), + ), ), ), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string[][]"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string[][]"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("completeRecovery"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("completeRecovery"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("completeCalldata"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("completeRecovery"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("completeCalldata"), + kind: ::ethers::core::abi::ethabi::ParamType::Bytes, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes"), + ), + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("computeAcceptanceTemplateId"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("computeAcceptanceTemplateId",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "computeAcceptanceTemplateId", ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("computeEmailAuthAddress"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("computeEmailAuthAddress",), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("accountSalt"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "computeEmailAuthAddress", ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("accountSalt"), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( + 32usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes32"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("computeRecoveryTemplateId"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("computeRecoveryTemplateId",), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "computeRecoveryTemplateId", ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - },], + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("dkim"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("dkim"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dkim"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("dkimAddr"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("dkimAddr"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dkimAddr"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("emailAuthImplementation"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("emailAuthImplementation",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "emailAuthImplementation", ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("emailAuthImplementationAddr"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("emailAuthImplementationAddr",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "emailAuthImplementationAddr", ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned( - "extractRecoveredAccountFromAcceptanceSubject", + "extractRecoveredAccountFromAcceptanceCommand", ), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "extractRecoveredAccountFromAcceptanceSubject", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("subjectParams"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "extractRecoveredAccountFromAcceptanceCommand", ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], - ), - ( - ::std::borrow::ToOwned::to_owned("extractRecoveredAccountFromRecoverySubject"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "extractRecoveredAccountFromRecoverySubject", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("subjectParams"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("commandParams"), + kind: ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes[]"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( - ::std::borrow::ToOwned::to_owned("handleAcceptance"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("handleAcceptance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("emailAuthMsg"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( + ::std::borrow::ToOwned::to_owned( + "extractRecoveredAccountFromRecoveryCommand", + ), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "extractRecoveredAccountFromRecoveryCommand", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("commandParams"), + kind: ::ethers::core::abi::ethabi::ParamType::Array( ::std::boxed::Box::new( ::ethers::core::abi::ethabi::ParamType::Bytes, ), ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct EmailAuthMsg"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes[]"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("handleAcceptance"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("handleAcceptance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("emailAuthMsg"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::Bool, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ], + ), + ], + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct EmailAuthMsg"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("handleRecovery"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("handleRecovery"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("emailAuthMsg"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("handleRecovery"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("emailAuthMsg"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), + ::ethers::core::abi::ethabi::ParamType::Bool, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ], + ), + ], ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize), - ::ethers::core::abi::ethabi::ParamType::Bool, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ],), - ],), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct EmailAuthMsg"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("templateIdx"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - },], + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct EmailAuthMsg"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("templateIdx"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("isActivated"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isActivated"), - inputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("isActivated"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("proxyBytecodeHash"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("proxyBytecodeHash"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("proxyBytecodeHash"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( + 32usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes32"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( - ::std::borrow::ToOwned::to_owned("recoverySubjectTemplates"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("recoverySubjectTemplates",), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Array( + ::std::borrow::ToOwned::to_owned("recoveryCommandTemplates"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "recoveryCommandTemplates", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Array( ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::String, + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::String, + ), + ), ), ), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string[][]"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string[][]"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("verifier"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifier"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("verifier"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ( ::std::borrow::ToOwned::to_owned("verifierAddr"), - ::std::vec![::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("verifierAddr"), - inputs: ::std::vec![], - outputs: ::std::vec![::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - },], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - },], + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("verifierAddr"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], ), ]), events: ::std::collections::BTreeMap::new(), @@ -467,8 +581,9 @@ pub mod email_account_recovery { } } ///The parsed JSON ABI of the contract. - pub static EMAILACCOUNTRECOVERY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = - ::ethers::contract::Lazy::new(__abi); + pub static EMAILACCOUNTRECOVERY_ABI: ::ethers::contract::Lazy< + ::ethers::core::abi::Abi, + > = ::ethers::contract::Lazy::new(__abi); pub struct EmailAccountRecovery(::ethers::contract::Contract); impl ::core::clone::Clone for EmailAccountRecovery { fn clone(&self) -> Self { @@ -500,21 +615,23 @@ pub mod email_account_recovery { address: T, client: ::std::sync::Arc, ) -> Self { - Self(::ethers::contract::Contract::new( - address.into(), - EMAILACCOUNTRECOVERY_ABI.clone(), - client, - )) + Self( + ::ethers::contract::Contract::new( + address.into(), + EMAILACCOUNTRECOVERY_ABI.clone(), + client, + ), + ) } - ///Calls the contract's `acceptanceSubjectTemplates` (0x5bafadda) function - pub fn acceptance_subject_templates( + ///Calls the contract's `acceptanceCommandTemplates` (0x222f6cb5) function + pub fn acceptance_command_templates( &self, ) -> ::ethers::contract::builders::ContractCall< M, ::std::vec::Vec<::std::vec::Vec<::std::string::String>>, > { self.0 - .method_hash([91, 175, 173, 218], ()) + .method_hash([34, 47, 108, 181], ()) .expect("method not found (this should never happen)") } ///Calls the contract's `completeRecovery` (0xc18d09cf) function @@ -541,7 +658,10 @@ pub mod email_account_recovery { &self, recovered_account: ::ethers::core::types::Address, account_salt: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([58, 142, 171, 20], (recovered_account, account_salt)) .expect("method not found (this should never happen)") @@ -558,7 +678,10 @@ pub mod email_account_recovery { ///Calls the contract's `dkim` (0x400ad5ce) function pub fn dkim( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([64, 10, 213, 206], ()) .expect("method not found (this should never happen)") @@ -566,7 +689,10 @@ pub mod email_account_recovery { ///Calls the contract's `dkimAddr` (0x73357f85) function pub fn dkim_addr( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([115, 53, 127, 133], ()) .expect("method not found (this should never happen)") @@ -574,7 +700,10 @@ pub mod email_account_recovery { ///Calls the contract's `emailAuthImplementation` (0xb6201692) function pub fn email_auth_implementation( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([182, 32, 22, 146], ()) .expect("method not found (this should never happen)") @@ -582,49 +711,58 @@ pub mod email_account_recovery { ///Calls the contract's `emailAuthImplementationAddr` (0x1098e02e) function pub fn email_auth_implementation_addr( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([16, 152, 224, 46], ()) .expect("method not found (this should never happen)") } - ///Calls the contract's `extractRecoveredAccountFromAcceptanceSubject` (0xe81dcaf2) function - pub fn extract_recovered_account_from_acceptance_subject( + ///Calls the contract's `extractRecoveredAccountFromAcceptanceCommand` (0x2c4ce129) function + pub fn extract_recovered_account_from_acceptance_command( &self, - subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, + command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, template_idx: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 - .method_hash([232, 29, 202, 242], (subject_params, template_idx)) + .method_hash([44, 76, 225, 41], (command_params, template_idx)) .expect("method not found (this should never happen)") } - ///Calls the contract's `extractRecoveredAccountFromRecoverySubject` (0x30e6a5ab) function - pub fn extract_recovered_account_from_recovery_subject( + ///Calls the contract's `extractRecoveredAccountFromRecoveryCommand` (0xa5e3ee70) function + pub fn extract_recovered_account_from_recovery_command( &self, - subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, + command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, template_idx: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 - .method_hash([48, 230, 165, 171], (subject_params, template_idx)) + .method_hash([165, 227, 238, 112], (command_params, template_idx)) .expect("method not found (this should never happen)") } - ///Calls the contract's `handleAcceptance` (0x0481af67) function + ///Calls the contract's `handleAcceptance` (0xd686b48a) function pub fn handle_acceptance( &self, email_auth_msg: EmailAuthMsg, template_idx: ::ethers::core::types::U256, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([4, 129, 175, 103], (email_auth_msg, template_idx)) + .method_hash([214, 134, 180, 138], (email_auth_msg, template_idx)) .expect("method not found (this should never happen)") } - ///Calls the contract's `handleRecovery` (0xb68126fa) function + ///Calls the contract's `handleRecovery` (0xb684742f) function pub fn handle_recovery( &self, email_auth_msg: EmailAuthMsg, template_idx: ::ethers::core::types::U256, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([182, 129, 38, 250], (email_auth_msg, template_idx)) + .method_hash([182, 132, 116, 47], (email_auth_msg, template_idx)) .expect("method not found (this should never happen)") } ///Calls the contract's `isActivated` (0xc9faa7c5) function @@ -644,21 +782,24 @@ pub mod email_account_recovery { .method_hash([133, 246, 15, 126], ()) .expect("method not found (this should never happen)") } - ///Calls the contract's `recoverySubjectTemplates` (0x3e91cdcd) function - pub fn recovery_subject_templates( + ///Calls the contract's `recoveryCommandTemplates` (0x3ef01b8f) function + pub fn recovery_command_templates( &self, ) -> ::ethers::contract::builders::ContractCall< M, ::std::vec::Vec<::std::vec::Vec<::std::string::String>>, > { self.0 - .method_hash([62, 145, 205, 205], ()) + .method_hash([62, 240, 27, 143], ()) .expect("method not found (this should never happen)") } ///Calls the contract's `verifier` (0x2b7ac3f3) function pub fn verifier( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([43, 122, 195, 243], ()) .expect("method not found (this should never happen)") @@ -666,20 +807,22 @@ pub mod email_account_recovery { ///Calls the contract's `verifierAddr` (0x663ea2e2) function pub fn verifier_addr( &self, - ) -> ::ethers::contract::builders::ContractCall { + ) -> ::ethers::contract::builders::ContractCall< + M, + ::ethers::core::types::Address, + > { self.0 .method_hash([102, 62, 162, 226], ()) .expect("method not found (this should never happen)") } } impl From<::ethers::contract::Contract> - for EmailAccountRecovery - { + for EmailAccountRecovery { fn from(contract: ::ethers::contract::Contract) -> Self { Self::new(contract.address(), contract.client()) } } - ///Container type for all input parameters for the `acceptanceSubjectTemplates` function with signature `acceptanceSubjectTemplates()` and selector `0x5bafadda` + ///Container type for all input parameters for the `acceptanceCommandTemplates` function with signature `acceptanceCommandTemplates()` and selector `0x222f6cb5` #[derive( Clone, ::ethers::contract::EthCall, @@ -688,13 +831,10 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - #[ethcall( - name = "acceptanceSubjectTemplates", - abi = "acceptanceSubjectTemplates()" - )] - pub struct AcceptanceSubjectTemplatesCall; + #[ethcall(name = "acceptanceCommandTemplates", abi = "acceptanceCommandTemplates()")] + pub struct AcceptanceCommandTemplatesCall; ///Container type for all input parameters for the `completeRecovery` function with signature `completeRecovery(address,bytes)` and selector `0xc18d09cf` #[derive( Clone, @@ -704,7 +844,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "completeRecovery", abi = "completeRecovery(address,bytes)")] pub struct CompleteRecoveryCall { @@ -720,7 +860,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "computeAcceptanceTemplateId", @@ -738,7 +878,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "computeEmailAuthAddress", @@ -757,7 +897,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "computeRecoveryTemplateId", @@ -775,7 +915,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "dkim", abi = "dkim()")] pub struct DkimCall; @@ -788,7 +928,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "dkimAddr", abi = "dkimAddr()")] pub struct DkimAddrCall; @@ -801,7 +941,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "emailAuthImplementation", abi = "emailAuthImplementation()")] pub struct EmailAuthImplementationCall; @@ -814,14 +954,14 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "emailAuthImplementationAddr", abi = "emailAuthImplementationAddr()" )] pub struct EmailAuthImplementationAddrCall; - ///Container type for all input parameters for the `extractRecoveredAccountFromAcceptanceSubject` function with signature `extractRecoveredAccountFromAcceptanceSubject(bytes[],uint256)` and selector `0xe81dcaf2` + ///Container type for all input parameters for the `extractRecoveredAccountFromAcceptanceCommand` function with signature `extractRecoveredAccountFromAcceptanceCommand(bytes[],uint256)` and selector `0x2c4ce129` #[derive( Clone, ::ethers::contract::EthCall, @@ -830,17 +970,17 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( - name = "extractRecoveredAccountFromAcceptanceSubject", - abi = "extractRecoveredAccountFromAcceptanceSubject(bytes[],uint256)" + name = "extractRecoveredAccountFromAcceptanceCommand", + abi = "extractRecoveredAccountFromAcceptanceCommand(bytes[],uint256)" )] - pub struct ExtractRecoveredAccountFromAcceptanceSubjectCall { - pub subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, + pub struct ExtractRecoveredAccountFromAcceptanceCommandCall { + pub command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, pub template_idx: ::ethers::core::types::U256, } - ///Container type for all input parameters for the `extractRecoveredAccountFromRecoverySubject` function with signature `extractRecoveredAccountFromRecoverySubject(bytes[],uint256)` and selector `0x30e6a5ab` + ///Container type for all input parameters for the `extractRecoveredAccountFromRecoveryCommand` function with signature `extractRecoveredAccountFromRecoveryCommand(bytes[],uint256)` and selector `0xa5e3ee70` #[derive( Clone, ::ethers::contract::EthCall, @@ -849,17 +989,17 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( - name = "extractRecoveredAccountFromRecoverySubject", - abi = "extractRecoveredAccountFromRecoverySubject(bytes[],uint256)" + name = "extractRecoveredAccountFromRecoveryCommand", + abi = "extractRecoveredAccountFromRecoveryCommand(bytes[],uint256)" )] - pub struct ExtractRecoveredAccountFromRecoverySubjectCall { - pub subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, + pub struct ExtractRecoveredAccountFromRecoveryCommandCall { + pub command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, pub template_idx: ::ethers::core::types::U256, } - ///Container type for all input parameters for the `handleAcceptance` function with signature `handleAcceptance((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)` and selector `0x0481af67` + ///Container type for all input parameters for the `handleAcceptance` function with signature `handleAcceptance((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)` and selector `0xd686b48a` #[derive( Clone, ::ethers::contract::EthCall, @@ -868,17 +1008,17 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "handleAcceptance", - abi = "handleAcceptance((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)" + abi = "handleAcceptance((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)" )] pub struct HandleAcceptanceCall { pub email_auth_msg: EmailAuthMsg, pub template_idx: ::ethers::core::types::U256, } - ///Container type for all input parameters for the `handleRecovery` function with signature `handleRecovery((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)` and selector `0xb68126fa` + ///Container type for all input parameters for the `handleRecovery` function with signature `handleRecovery((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)` and selector `0xb684742f` #[derive( Clone, ::ethers::contract::EthCall, @@ -887,11 +1027,11 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall( name = "handleRecovery", - abi = "handleRecovery((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)" + abi = "handleRecovery((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)),uint256)" )] pub struct HandleRecoveryCall { pub email_auth_msg: EmailAuthMsg, @@ -906,7 +1046,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "isActivated", abi = "isActivated(address)")] pub struct IsActivatedCall { @@ -921,11 +1061,11 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "proxyBytecodeHash", abi = "proxyBytecodeHash()")] pub struct ProxyBytecodeHashCall; - ///Container type for all input parameters for the `recoverySubjectTemplates` function with signature `recoverySubjectTemplates()` and selector `0x3e91cdcd` + ///Container type for all input parameters for the `recoveryCommandTemplates` function with signature `recoveryCommandTemplates()` and selector `0x3ef01b8f` #[derive( Clone, ::ethers::contract::EthCall, @@ -934,10 +1074,10 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - #[ethcall(name = "recoverySubjectTemplates", abi = "recoverySubjectTemplates()")] - pub struct RecoverySubjectTemplatesCall; + #[ethcall(name = "recoveryCommandTemplates", abi = "recoveryCommandTemplates()")] + pub struct RecoveryCommandTemplatesCall; ///Container type for all input parameters for the `verifier` function with signature `verifier()` and selector `0x2b7ac3f3` #[derive( Clone, @@ -947,7 +1087,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "verifier", abi = "verifier()")] pub struct VerifierCall; @@ -960,14 +1100,14 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] #[ethcall(name = "verifierAddr", abi = "verifierAddr()")] pub struct VerifierAddrCall; ///Container type for all of the contract's call #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] pub enum EmailAccountRecoveryCalls { - AcceptanceSubjectTemplates(AcceptanceSubjectTemplatesCall), + AcceptanceCommandTemplates(AcceptanceCommandTemplatesCall), CompleteRecovery(CompleteRecoveryCall), ComputeAcceptanceTemplateId(ComputeAcceptanceTemplateIdCall), ComputeEmailAuthAddress(ComputeEmailAuthAddressCall), @@ -976,15 +1116,17 @@ pub mod email_account_recovery { DkimAddr(DkimAddrCall), EmailAuthImplementation(EmailAuthImplementationCall), EmailAuthImplementationAddr(EmailAuthImplementationAddrCall), - ExtractRecoveredAccountFromAcceptanceSubject( - ExtractRecoveredAccountFromAcceptanceSubjectCall, + ExtractRecoveredAccountFromAcceptanceCommand( + ExtractRecoveredAccountFromAcceptanceCommandCall, + ), + ExtractRecoveredAccountFromRecoveryCommand( + ExtractRecoveredAccountFromRecoveryCommandCall, ), - ExtractRecoveredAccountFromRecoverySubject(ExtractRecoveredAccountFromRecoverySubjectCall), HandleAcceptance(HandleAcceptanceCall), HandleRecovery(HandleRecoveryCall), IsActivated(IsActivatedCall), ProxyBytecodeHash(ProxyBytecodeHashCall), - RecoverySubjectTemplates(RecoverySubjectTemplatesCall), + RecoveryCommandTemplates(RecoveryCommandTemplatesCall), Verifier(VerifierCall), VerifierAddr(VerifierAddrCall), } @@ -993,85 +1135,94 @@ pub mod email_account_recovery { data: impl AsRef<[u8]>, ) -> ::core::result::Result { let data = data.as_ref(); - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::AcceptanceSubjectTemplates(decoded)); + if let Ok(decoded) = ::decode( + data, + ) { + return Ok(Self::AcceptanceCommandTemplates(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::CompleteRecovery(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::ComputeAcceptanceTemplateId(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::ComputeEmailAuthAddress(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::ComputeRecoveryTemplateId(decoded)); } - if let Ok(decoded) = ::decode(data) { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::Dkim(decoded)); } - if let Ok(decoded) = ::decode(data) { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::DkimAddr(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::EmailAuthImplementation(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::EmailAuthImplementationAddr(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::ExtractRecoveredAccountFromAcceptanceSubject(decoded)); + return Ok(Self::ExtractRecoveredAccountFromAcceptanceCommand(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::ExtractRecoveredAccountFromRecoverySubject(decoded)); + return Ok(Self::ExtractRecoveredAccountFromRecoveryCommand(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::HandleAcceptance(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::HandleRecovery(decoded)); } - if let Ok(decoded) = ::decode(data) { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::IsActivated(decoded)); } - if let Ok(decoded) = - ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::ProxyBytecodeHash(decoded)); } - if let Ok(decoded) = - ::decode(data) - { - return Ok(Self::RecoverySubjectTemplates(decoded)); + if let Ok(decoded) = ::decode( + data, + ) { + return Ok(Self::RecoveryCommandTemplates(decoded)); } - if let Ok(decoded) = ::decode(data) { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::Verifier(decoded)); } - if let Ok(decoded) = ::decode(data) - { + if let Ok(decoded) = ::decode( + data, + ) { return Ok(Self::VerifierAddr(decoded)); } Err(::ethers::core::abi::Error::InvalidData.into()) @@ -1080,10 +1231,12 @@ pub mod email_account_recovery { impl ::ethers::core::abi::AbiEncode for EmailAccountRecoveryCalls { fn encode(self) -> Vec { match self { - Self::AcceptanceSubjectTemplates(element) => { + Self::AcceptanceCommandTemplates(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::CompleteRecovery(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::CompleteRecovery(element) => ::ethers::core::abi::AbiEncode::encode(element), Self::ComputeAcceptanceTemplateId(element) => { ::ethers::core::abi::AbiEncode::encode(element) } @@ -1094,62 +1247,91 @@ pub mod email_account_recovery { ::ethers::core::abi::AbiEncode::encode(element) } Self::Dkim(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::DkimAddr(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DkimAddr(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } Self::EmailAuthImplementation(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::EmailAuthImplementationAddr(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::ExtractRecoveredAccountFromAcceptanceSubject(element) => { + Self::ExtractRecoveredAccountFromAcceptanceCommand(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::ExtractRecoveredAccountFromRecoveryCommand(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::HandleAcceptance(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::HandleRecovery(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::IsActivated(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::ProxyBytecodeHash(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } + Self::RecoveryCommandTemplates(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::ExtractRecoveredAccountFromRecoverySubject(element) => { + Self::Verifier(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::HandleAcceptance(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::HandleRecovery(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::IsActivated(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ProxyBytecodeHash(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::RecoverySubjectTemplates(element) => { + Self::VerifierAddr(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::Verifier(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::VerifierAddr(element) => ::ethers::core::abi::AbiEncode::encode(element), } } } impl ::core::fmt::Display for EmailAccountRecoveryCalls { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Self::AcceptanceSubjectTemplates(element) => ::core::fmt::Display::fmt(element, f), + Self::AcceptanceCommandTemplates(element) => { + ::core::fmt::Display::fmt(element, f) + } Self::CompleteRecovery(element) => ::core::fmt::Display::fmt(element, f), - Self::ComputeAcceptanceTemplateId(element) => ::core::fmt::Display::fmt(element, f), - Self::ComputeEmailAuthAddress(element) => ::core::fmt::Display::fmt(element, f), - Self::ComputeRecoveryTemplateId(element) => ::core::fmt::Display::fmt(element, f), + Self::ComputeAcceptanceTemplateId(element) => { + ::core::fmt::Display::fmt(element, f) + } + Self::ComputeEmailAuthAddress(element) => { + ::core::fmt::Display::fmt(element, f) + } + Self::ComputeRecoveryTemplateId(element) => { + ::core::fmt::Display::fmt(element, f) + } Self::Dkim(element) => ::core::fmt::Display::fmt(element, f), Self::DkimAddr(element) => ::core::fmt::Display::fmt(element, f), - Self::EmailAuthImplementation(element) => ::core::fmt::Display::fmt(element, f), - Self::EmailAuthImplementationAddr(element) => ::core::fmt::Display::fmt(element, f), - Self::ExtractRecoveredAccountFromAcceptanceSubject(element) => { + Self::EmailAuthImplementation(element) => { + ::core::fmt::Display::fmt(element, f) + } + Self::EmailAuthImplementationAddr(element) => { + ::core::fmt::Display::fmt(element, f) + } + Self::ExtractRecoveredAccountFromAcceptanceCommand(element) => { ::core::fmt::Display::fmt(element, f) } - Self::ExtractRecoveredAccountFromRecoverySubject(element) => { + Self::ExtractRecoveredAccountFromRecoveryCommand(element) => { ::core::fmt::Display::fmt(element, f) } Self::HandleAcceptance(element) => ::core::fmt::Display::fmt(element, f), Self::HandleRecovery(element) => ::core::fmt::Display::fmt(element, f), Self::IsActivated(element) => ::core::fmt::Display::fmt(element, f), Self::ProxyBytecodeHash(element) => ::core::fmt::Display::fmt(element, f), - Self::RecoverySubjectTemplates(element) => ::core::fmt::Display::fmt(element, f), + Self::RecoveryCommandTemplates(element) => { + ::core::fmt::Display::fmt(element, f) + } Self::Verifier(element) => ::core::fmt::Display::fmt(element, f), Self::VerifierAddr(element) => ::core::fmt::Display::fmt(element, f), } } } - impl ::core::convert::From for EmailAccountRecoveryCalls { - fn from(value: AcceptanceSubjectTemplatesCall) -> Self { - Self::AcceptanceSubjectTemplates(value) + impl ::core::convert::From + for EmailAccountRecoveryCalls { + fn from(value: AcceptanceCommandTemplatesCall) -> Self { + Self::AcceptanceCommandTemplates(value) } } impl ::core::convert::From for EmailAccountRecoveryCalls { @@ -1157,17 +1339,20 @@ pub mod email_account_recovery { Self::CompleteRecovery(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { + impl ::core::convert::From + for EmailAccountRecoveryCalls { fn from(value: ComputeAcceptanceTemplateIdCall) -> Self { Self::ComputeAcceptanceTemplateId(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { + impl ::core::convert::From + for EmailAccountRecoveryCalls { fn from(value: ComputeEmailAuthAddressCall) -> Self { Self::ComputeEmailAuthAddress(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { + impl ::core::convert::From + for EmailAccountRecoveryCalls { fn from(value: ComputeRecoveryTemplateIdCall) -> Self { Self::ComputeRecoveryTemplateId(value) } @@ -1182,28 +1367,28 @@ pub mod email_account_recovery { Self::DkimAddr(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { + impl ::core::convert::From + for EmailAccountRecoveryCalls { fn from(value: EmailAuthImplementationCall) -> Self { Self::EmailAuthImplementation(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { + impl ::core::convert::From + for EmailAccountRecoveryCalls { fn from(value: EmailAuthImplementationAddrCall) -> Self { Self::EmailAuthImplementationAddr(value) } } - impl ::core::convert::From - for EmailAccountRecoveryCalls - { - fn from(value: ExtractRecoveredAccountFromAcceptanceSubjectCall) -> Self { - Self::ExtractRecoveredAccountFromAcceptanceSubject(value) + impl ::core::convert::From + for EmailAccountRecoveryCalls { + fn from(value: ExtractRecoveredAccountFromAcceptanceCommandCall) -> Self { + Self::ExtractRecoveredAccountFromAcceptanceCommand(value) } } - impl ::core::convert::From - for EmailAccountRecoveryCalls - { - fn from(value: ExtractRecoveredAccountFromRecoverySubjectCall) -> Self { - Self::ExtractRecoveredAccountFromRecoverySubject(value) + impl ::core::convert::From + for EmailAccountRecoveryCalls { + fn from(value: ExtractRecoveredAccountFromRecoveryCommandCall) -> Self { + Self::ExtractRecoveredAccountFromRecoveryCommand(value) } } impl ::core::convert::From for EmailAccountRecoveryCalls { @@ -1226,9 +1411,10 @@ pub mod email_account_recovery { Self::ProxyBytecodeHash(value) } } - impl ::core::convert::From for EmailAccountRecoveryCalls { - fn from(value: RecoverySubjectTemplatesCall) -> Self { - Self::RecoverySubjectTemplates(value) + impl ::core::convert::From + for EmailAccountRecoveryCalls { + fn from(value: RecoveryCommandTemplatesCall) -> Self { + Self::RecoveryCommandTemplates(value) } } impl ::core::convert::From for EmailAccountRecoveryCalls { @@ -1241,7 +1427,7 @@ pub mod email_account_recovery { Self::VerifierAddr(value) } } - ///Container type for all return fields from the `acceptanceSubjectTemplates` function with signature `acceptanceSubjectTemplates()` and selector `0x5bafadda` + ///Container type for all return fields from the `acceptanceCommandTemplates` function with signature `acceptanceCommandTemplates()` and selector `0x222f6cb5` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -1250,9 +1436,9 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - pub struct AcceptanceSubjectTemplatesReturn( + pub struct AcceptanceCommandTemplatesReturn( pub ::std::vec::Vec<::std::vec::Vec<::std::string::String>>, ); ///Container type for all return fields from the `computeAcceptanceTemplateId` function with signature `computeAcceptanceTemplateId(uint256)` and selector `0x32ccc2f2` @@ -1264,7 +1450,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct ComputeAcceptanceTemplateIdReturn(pub ::ethers::core::types::U256); ///Container type for all return fields from the `computeEmailAuthAddress` function with signature `computeEmailAuthAddress(address,bytes32)` and selector `0x3a8eab14` @@ -1276,7 +1462,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct ComputeEmailAuthAddressReturn(pub ::ethers::core::types::Address); ///Container type for all return fields from the `computeRecoveryTemplateId` function with signature `computeRecoveryTemplateId(uint256)` and selector `0x6da99515` @@ -1288,7 +1474,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct ComputeRecoveryTemplateIdReturn(pub ::ethers::core::types::U256); ///Container type for all return fields from the `dkim` function with signature `dkim()` and selector `0x400ad5ce` @@ -1300,7 +1486,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct DkimReturn(pub ::ethers::core::types::Address); ///Container type for all return fields from the `dkimAddr` function with signature `dkimAddr()` and selector `0x73357f85` @@ -1312,7 +1498,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct DkimAddrReturn(pub ::ethers::core::types::Address); ///Container type for all return fields from the `emailAuthImplementation` function with signature `emailAuthImplementation()` and selector `0xb6201692` @@ -1324,7 +1510,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct EmailAuthImplementationReturn(pub ::ethers::core::types::Address); ///Container type for all return fields from the `emailAuthImplementationAddr` function with signature `emailAuthImplementationAddr()` and selector `0x1098e02e` @@ -1336,10 +1522,10 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct EmailAuthImplementationAddrReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `extractRecoveredAccountFromAcceptanceSubject` function with signature `extractRecoveredAccountFromAcceptanceSubject(bytes[],uint256)` and selector `0xe81dcaf2` + ///Container type for all return fields from the `extractRecoveredAccountFromAcceptanceCommand` function with signature `extractRecoveredAccountFromAcceptanceCommand(bytes[],uint256)` and selector `0x2c4ce129` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -1348,12 +1534,12 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - pub struct ExtractRecoveredAccountFromAcceptanceSubjectReturn( + pub struct ExtractRecoveredAccountFromAcceptanceCommandReturn( pub ::ethers::core::types::Address, ); - ///Container type for all return fields from the `extractRecoveredAccountFromRecoverySubject` function with signature `extractRecoveredAccountFromRecoverySubject(bytes[],uint256)` and selector `0x30e6a5ab` + ///Container type for all return fields from the `extractRecoveredAccountFromRecoveryCommand` function with signature `extractRecoveredAccountFromRecoveryCommand(bytes[],uint256)` and selector `0xa5e3ee70` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -1362,9 +1548,11 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - pub struct ExtractRecoveredAccountFromRecoverySubjectReturn(pub ::ethers::core::types::Address); + pub struct ExtractRecoveredAccountFromRecoveryCommandReturn( + pub ::ethers::core::types::Address, + ); ///Container type for all return fields from the `isActivated` function with signature `isActivated(address)` and selector `0xc9faa7c5` #[derive( Clone, @@ -1374,7 +1562,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct IsActivatedReturn(pub bool); ///Container type for all return fields from the `proxyBytecodeHash` function with signature `proxyBytecodeHash()` and selector `0x85f60f7e` @@ -1386,10 +1574,10 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct ProxyBytecodeHashReturn(pub [u8; 32]); - ///Container type for all return fields from the `recoverySubjectTemplates` function with signature `recoverySubjectTemplates()` and selector `0x3e91cdcd` + ///Container type for all return fields from the `recoveryCommandTemplates` function with signature `recoveryCommandTemplates()` and selector `0x3ef01b8f` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -1398,9 +1586,9 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] - pub struct RecoverySubjectTemplatesReturn( + pub struct RecoveryCommandTemplatesReturn( pub ::std::vec::Vec<::std::vec::Vec<::std::string::String>>, ); ///Container type for all return fields from the `verifier` function with signature `verifier()` and selector `0x2b7ac3f3` @@ -1412,7 +1600,7 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct VerifierReturn(pub ::ethers::core::types::Address); ///Container type for all return fields from the `verifierAddr` function with signature `verifierAddr()` and selector `0x663ea2e2` @@ -1424,10 +1612,10 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct VerifierAddrReturn(pub ::ethers::core::types::Address); - ///`EmailAuthMsg(uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes))` + ///`EmailAuthMsg(uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes))` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -1436,12 +1624,11 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct EmailAuthMsg { pub template_id: ::ethers::core::types::U256, - pub subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, - pub skiped_subject_prefix: ::ethers::core::types::U256, + pub command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, pub proof: EmailProof, } ///`EmailProof(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)` @@ -1453,13 +1640,13 @@ pub mod email_account_recovery { Debug, PartialEq, Eq, - Hash, + Hash )] pub struct EmailProof { pub domain_name: ::std::string::String, pub public_key_hash: [u8; 32], pub timestamp: ::ethers::core::types::U256, - pub masked_subject: ::std::string::String, + pub masked_command: ::std::string::String, pub email_nullifier: [u8; 32], pub account_salt: [u8; 32], pub is_code_exist: bool, diff --git a/packages/relayer/src/abis/email_auth.rs b/packages/relayer/src/abis/email_auth.rs index 10d27c61..7db65267 100644 --- a/packages/relayer/src/abis/email_auth.rs +++ b/packages/relayer/src/abis/email_auth.rs @@ -77,7 +77,6 @@ pub mod email_auth { ::ethers::core::abi::ethabi::ParamType::Bytes, ), ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), ::ethers::core::abi::ethabi::ParamType::Tuple( ::std::vec![ ::ethers::core::abi::ethabi::ParamType::String, @@ -103,6 +102,45 @@ pub mod email_auth { }, ], ), + ( + ::std::borrow::ToOwned::to_owned("commandTemplates"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("commandTemplates"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), ( ::std::borrow::ToOwned::to_owned("controller"), ::std::vec![ @@ -124,11 +162,11 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("deleteSubjectTemplate"), + ::std::borrow::ToOwned::to_owned("deleteCommandTemplate"), ::std::vec![ ::ethers::core::abi::ethabi::Function { name: ::std::borrow::ToOwned::to_owned( - "deleteSubjectTemplate", + "deleteCommandTemplate", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::Param { @@ -168,10 +206,10 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("getSubjectTemplate"), + ::std::borrow::ToOwned::to_owned("getCommandTemplate"), ::std::vec![ ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getSubjectTemplate"), + name: ::std::borrow::ToOwned::to_owned("getCommandTemplate"), inputs: ::std::vec![ ::ethers::core::abi::ethabi::Param { name: ::std::borrow::ToOwned::to_owned("_templateId"), @@ -278,11 +316,11 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("insertSubjectTemplate"), + ::std::borrow::ToOwned::to_owned("insertCommandTemplate"), ::std::vec![ ::ethers::core::abi::ethabi::Function { name: ::std::borrow::ToOwned::to_owned( - "insertSubjectTemplate", + "insertCommandTemplate", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::Param { @@ -295,7 +333,7 @@ pub mod email_auth { ), }, ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_subjectTemplate"), + name: ::std::borrow::ToOwned::to_owned("_commandTemplate"), kind: ::ethers::core::abi::ethabi::ParamType::Array( ::std::boxed::Box::new( ::ethers::core::abi::ethabi::ParamType::String, @@ -410,45 +448,6 @@ pub mod email_auth { }, ], ), - ( - ::std::borrow::ToOwned::to_owned("subjectTemplates"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("subjectTemplates"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), ( ::std::borrow::ToOwned::to_owned("timestampCheckEnabled"), ::std::vec![ @@ -492,31 +491,11 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("updateDKIMRegistry"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("updateDKIMRegistry"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_dkimRegistryAddr"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("updateSubjectTemplate"), + ::std::borrow::ToOwned::to_owned("updateCommandTemplate"), ::std::vec![ ::ethers::core::abi::ethabi::Function { name: ::std::borrow::ToOwned::to_owned( - "updateSubjectTemplate", + "updateCommandTemplate", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::Param { @@ -529,7 +508,7 @@ pub mod email_auth { ), }, ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_subjectTemplate"), + name: ::std::borrow::ToOwned::to_owned("_commandTemplate"), kind: ::ethers::core::abi::ethabi::ParamType::Array( ::std::boxed::Box::new( ::ethers::core::abi::ethabi::ParamType::String, @@ -546,6 +525,26 @@ pub mod email_auth { }, ], ), + ( + ::std::borrow::ToOwned::to_owned("updateDKIMRegistry"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("updateDKIMRegistry"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_dkimRegistryAddr"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), ( ::std::borrow::ToOwned::to_owned("updateVerifier"), ::std::vec![ @@ -646,16 +645,18 @@ pub mod email_auth { ]), events: ::core::convert::From::from([ ( - ::std::borrow::ToOwned::to_owned("DKIMRegistryUpdated"), + ::std::borrow::ToOwned::to_owned("CommandTemplateDeleted"), ::std::vec![ ::ethers::core::abi::ethabi::Event { name: ::std::borrow::ToOwned::to_owned( - "DKIMRegistryUpdated", + "CommandTemplateDeleted", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("dkimRegistry"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, + name: ::std::borrow::ToOwned::to_owned("templateId"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), indexed: true, }, ], @@ -664,36 +665,19 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("EmailAuthed"), + ::std::borrow::ToOwned::to_owned("CommandTemplateInserted"), ::std::vec![ ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("EmailAuthed"), + name: ::std::borrow::ToOwned::to_owned( + "CommandTemplateInserted", + ), inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("emailNullifier"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("accountSalt"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("isCodeExist"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, ::ethers::core::abi::ethabi::EventParam { name: ::std::borrow::ToOwned::to_owned("templateId"), kind: ::ethers::core::abi::ethabi::ParamType::Uint( 256usize, ), - indexed: false, + indexed: true, }, ], anonymous: false, @@ -701,15 +685,19 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("Initialized"), + ::std::borrow::ToOwned::to_owned("CommandTemplateUpdated"), ::std::vec![ ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Initialized"), + name: ::std::borrow::ToOwned::to_owned( + "CommandTemplateUpdated", + ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("version"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - indexed: false, + name: ::std::borrow::ToOwned::to_owned("templateId"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: true, }, ], anonymous: false, @@ -717,20 +705,15 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("OwnershipTransferred"), + ::std::borrow::ToOwned::to_owned("DKIMRegistryUpdated"), ::std::vec![ ::ethers::core::abi::ethabi::Event { name: ::std::borrow::ToOwned::to_owned( - "OwnershipTransferred", + "DKIMRegistryUpdated", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("previousOwner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("newOwner"), + name: ::std::borrow::ToOwned::to_owned("dkimRegistry"), kind: ::ethers::core::abi::ethabi::ParamType::Address, indexed: true, }, @@ -740,19 +723,36 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("SubjectTemplateDeleted"), + ::std::borrow::ToOwned::to_owned("EmailAuthed"), ::std::vec![ ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "SubjectTemplateDeleted", - ), + name: ::std::borrow::ToOwned::to_owned("EmailAuthed"), inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("emailNullifier"), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( + 32usize, + ), + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("accountSalt"), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( + 32usize, + ), + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("isCodeExist"), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + indexed: false, + }, ::ethers::core::abi::ethabi::EventParam { name: ::std::borrow::ToOwned::to_owned("templateId"), kind: ::ethers::core::abi::ethabi::ParamType::Uint( 256usize, ), - indexed: true, + indexed: false, }, ], anonymous: false, @@ -760,19 +760,15 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("SubjectTemplateInserted"), + ::std::borrow::ToOwned::to_owned("Initialized"), ::std::vec![ ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "SubjectTemplateInserted", - ), + name: ::std::borrow::ToOwned::to_owned("Initialized"), inputs: ::std::vec![ ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("templateId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, + name: ::std::borrow::ToOwned::to_owned("version"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + indexed: false, }, ], anonymous: false, @@ -780,18 +776,21 @@ pub mod email_auth { ], ), ( - ::std::borrow::ToOwned::to_owned("SubjectTemplateUpdated"), + ::std::borrow::ToOwned::to_owned("OwnershipTransferred"), ::std::vec![ ::ethers::core::abi::ethabi::Event { name: ::std::borrow::ToOwned::to_owned( - "SubjectTemplateUpdated", + "OwnershipTransferred", ), inputs: ::std::vec![ ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("templateId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), + name: ::std::borrow::ToOwned::to_owned("previousOwner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("newOwner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, indexed: true, }, ], @@ -1057,13 +1056,23 @@ pub mod email_auth { .method_hash([108, 116, 146, 30], ()) .expect("method not found (this should never happen)") } - ///Calls the contract's `authEmail` (0xad3f5f9b) function + ///Calls the contract's `authEmail` (0xce207018) function pub fn auth_email( &self, email_auth_msg: EmailAuthMsg, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([173, 63, 95, 155], (email_auth_msg,)) + .method_hash([206, 32, 112, 24], (email_auth_msg,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `commandTemplates` (0x091c1650) function + pub fn command_templates( + &self, + p0: ::ethers::core::types::U256, + p1: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([9, 28, 22, 80], (p0, p1)) .expect("method not found (this should never happen)") } ///Calls the contract's `controller` (0xf77c4791) function @@ -1077,13 +1086,13 @@ pub mod email_auth { .method_hash([247, 124, 71, 145], ()) .expect("method not found (this should never happen)") } - ///Calls the contract's `deleteSubjectTemplate` (0x519e50d1) function - pub fn delete_subject_template( + ///Calls the contract's `deleteCommandTemplate` (0x640e8b69) function + pub fn delete_command_template( &self, template_id: ::ethers::core::types::U256, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([81, 158, 80, 209], template_id) + .method_hash([100, 14, 139, 105], template_id) .expect("method not found (this should never happen)") } ///Calls the contract's `dkimRegistryAddr` (0x1bc01b83) function @@ -1097,8 +1106,8 @@ pub mod email_auth { .method_hash([27, 192, 27, 131], ()) .expect("method not found (this should never happen)") } - ///Calls the contract's `getSubjectTemplate` (0x1e05a028) function - pub fn get_subject_template( + ///Calls the contract's `getCommandTemplate` (0x95e33c08) function + pub fn get_command_template( &self, template_id: ::ethers::core::types::U256, ) -> ::ethers::contract::builders::ContractCall< @@ -1106,7 +1115,7 @@ pub mod email_auth { ::std::vec::Vec<::std::string::String>, > { self.0 - .method_hash([30, 5, 160, 40], template_id) + .method_hash([149, 227, 60, 8], template_id) .expect("method not found (this should never happen)") } ///Calls the contract's `initDKIMRegistry` (0x557cf5ef) function @@ -1141,14 +1150,14 @@ pub mod email_auth { ) .expect("method not found (this should never happen)") } - ///Calls the contract's `insertSubjectTemplate` (0xc4b84df4) function - pub fn insert_subject_template( + ///Calls the contract's `insertCommandTemplate` (0x8ff3730f) function + pub fn insert_command_template( &self, template_id: ::ethers::core::types::U256, - subject_template: ::std::vec::Vec<::std::string::String>, + command_template: ::std::vec::Vec<::std::string::String>, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([196, 184, 77, 244], (template_id, subject_template)) + .method_hash([143, 243, 115, 15], (template_id, command_template)) .expect("method not found (this should never happen)") } ///Calls the contract's `lastTimestamp` (0x19d8ac61) function @@ -1195,16 +1204,6 @@ pub mod email_auth { .method_hash([228, 83, 192, 243], enabled) .expect("method not found (this should never happen)") } - ///Calls the contract's `subjectTemplates` (0x4bd07760) function - pub fn subject_templates( - &self, - p0: ::ethers::core::types::U256, - p1: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([75, 208, 119, 96], (p0, p1)) - .expect("method not found (this should never happen)") - } ///Calls the contract's `timestampCheckEnabled` (0x3e56f529) function pub fn timestamp_check_enabled( &self, @@ -1222,23 +1221,23 @@ pub mod email_auth { .method_hash([242, 253, 227, 139], new_owner) .expect("method not found (this should never happen)") } - ///Calls the contract's `updateDKIMRegistry` (0xa500125c) function - pub fn update_dkim_registry( + ///Calls the contract's `updateCommandTemplate` (0x24e33f11) function + pub fn update_command_template( &self, - dkim_registry_addr: ::ethers::core::types::Address, + template_id: ::ethers::core::types::U256, + command_template: ::std::vec::Vec<::std::string::String>, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([165, 0, 18, 92], dkim_registry_addr) + .method_hash([36, 227, 63, 17], (template_id, command_template)) .expect("method not found (this should never happen)") } - ///Calls the contract's `updateSubjectTemplate` (0x4dbb82f1) function - pub fn update_subject_template( + ///Calls the contract's `updateDKIMRegistry` (0xa500125c) function + pub fn update_dkim_registry( &self, - template_id: ::ethers::core::types::U256, - subject_template: ::std::vec::Vec<::std::string::String>, + dkim_registry_addr: ::ethers::core::types::Address, ) -> ::ethers::contract::builders::ContractCall { self.0 - .method_hash([77, 187, 130, 241], (template_id, subject_template)) + .method_hash([165, 0, 18, 92], dkim_registry_addr) .expect("method not found (this should never happen)") } ///Calls the contract's `updateVerifier` (0x97fc007c) function @@ -1280,73 +1279,73 @@ pub mod email_auth { .method_hash([102, 62, 162, 226], ()) .expect("method not found (this should never happen)") } - ///Gets the contract's `DKIMRegistryUpdated` event - pub fn dkim_registry_updated_filter( + ///Gets the contract's `CommandTemplateDeleted` event + pub fn command_template_deleted_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - DkimregistryUpdatedFilter, + CommandTemplateDeletedFilter, > { self.0.event() } - ///Gets the contract's `EmailAuthed` event - pub fn email_authed_filter( + ///Gets the contract's `CommandTemplateInserted` event + pub fn command_template_inserted_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - EmailAuthedFilter, + CommandTemplateInsertedFilter, > { self.0.event() } - ///Gets the contract's `Initialized` event - pub fn initialized_filter( + ///Gets the contract's `CommandTemplateUpdated` event + pub fn command_template_updated_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - InitializedFilter, + CommandTemplateUpdatedFilter, > { self.0.event() } - ///Gets the contract's `OwnershipTransferred` event - pub fn ownership_transferred_filter( + ///Gets the contract's `DKIMRegistryUpdated` event + pub fn dkim_registry_updated_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - OwnershipTransferredFilter, + DkimregistryUpdatedFilter, > { self.0.event() } - ///Gets the contract's `SubjectTemplateDeleted` event - pub fn subject_template_deleted_filter( + ///Gets the contract's `EmailAuthed` event + pub fn email_authed_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - SubjectTemplateDeletedFilter, + EmailAuthedFilter, > { self.0.event() } - ///Gets the contract's `SubjectTemplateInserted` event - pub fn subject_template_inserted_filter( + ///Gets the contract's `Initialized` event + pub fn initialized_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - SubjectTemplateInsertedFilter, + InitializedFilter, > { self.0.event() } - ///Gets the contract's `SubjectTemplateUpdated` event - pub fn subject_template_updated_filter( + ///Gets the contract's `OwnershipTransferred` event + pub fn ownership_transferred_filter( &self, ) -> ::ethers::contract::builders::Event< ::std::sync::Arc, M, - SubjectTemplateUpdatedFilter, + OwnershipTransferredFilter, > { self.0.event() } @@ -1808,10 +1807,10 @@ pub mod email_auth { Eq, Hash )] - #[ethevent(name = "DKIMRegistryUpdated", abi = "DKIMRegistryUpdated(address)")] - pub struct DkimregistryUpdatedFilter { + #[ethevent(name = "CommandTemplateDeleted", abi = "CommandTemplateDeleted(uint256)")] + pub struct CommandTemplateDeletedFilter { #[ethevent(indexed)] - pub dkim_registry: ::ethers::core::types::Address, + pub template_id: ::ethers::core::types::U256, } #[derive( Clone, @@ -1823,13 +1822,12 @@ pub mod email_auth { Eq, Hash )] - #[ethevent(name = "EmailAuthed", abi = "EmailAuthed(bytes32,bytes32,bool,uint256)")] - pub struct EmailAuthedFilter { - #[ethevent(indexed)] - pub email_nullifier: [u8; 32], + #[ethevent( + name = "CommandTemplateInserted", + abi = "CommandTemplateInserted(uint256)" + )] + pub struct CommandTemplateInsertedFilter { #[ethevent(indexed)] - pub account_salt: [u8; 32], - pub is_code_exist: bool, pub template_id: ::ethers::core::types::U256, } #[derive( @@ -1842,9 +1840,10 @@ pub mod email_auth { Eq, Hash )] - #[ethevent(name = "Initialized", abi = "Initialized(uint64)")] - pub struct InitializedFilter { - pub version: u64, + #[ethevent(name = "CommandTemplateUpdated", abi = "CommandTemplateUpdated(uint256)")] + pub struct CommandTemplateUpdatedFilter { + #[ethevent(indexed)] + pub template_id: ::ethers::core::types::U256, } #[derive( Clone, @@ -1856,15 +1855,10 @@ pub mod email_auth { Eq, Hash )] - #[ethevent( - name = "OwnershipTransferred", - abi = "OwnershipTransferred(address,address)" - )] - pub struct OwnershipTransferredFilter { - #[ethevent(indexed)] - pub previous_owner: ::ethers::core::types::Address, + #[ethevent(name = "DKIMRegistryUpdated", abi = "DKIMRegistryUpdated(address)")] + pub struct DkimregistryUpdatedFilter { #[ethevent(indexed)] - pub new_owner: ::ethers::core::types::Address, + pub dkim_registry: ::ethers::core::types::Address, } #[derive( Clone, @@ -1876,9 +1870,13 @@ pub mod email_auth { Eq, Hash )] - #[ethevent(name = "SubjectTemplateDeleted", abi = "SubjectTemplateDeleted(uint256)")] - pub struct SubjectTemplateDeletedFilter { + #[ethevent(name = "EmailAuthed", abi = "EmailAuthed(bytes32,bytes32,bool,uint256)")] + pub struct EmailAuthedFilter { + #[ethevent(indexed)] + pub email_nullifier: [u8; 32], #[ethevent(indexed)] + pub account_salt: [u8; 32], + pub is_code_exist: bool, pub template_id: ::ethers::core::types::U256, } #[derive( @@ -1891,13 +1889,9 @@ pub mod email_auth { Eq, Hash )] - #[ethevent( - name = "SubjectTemplateInserted", - abi = "SubjectTemplateInserted(uint256)" - )] - pub struct SubjectTemplateInsertedFilter { - #[ethevent(indexed)] - pub template_id: ::ethers::core::types::U256, + #[ethevent(name = "Initialized", abi = "Initialized(uint64)")] + pub struct InitializedFilter { + pub version: u64, } #[derive( Clone, @@ -1909,10 +1903,15 @@ pub mod email_auth { Eq, Hash )] - #[ethevent(name = "SubjectTemplateUpdated", abi = "SubjectTemplateUpdated(uint256)")] - pub struct SubjectTemplateUpdatedFilter { + #[ethevent( + name = "OwnershipTransferred", + abi = "OwnershipTransferred(address,address)" + )] + pub struct OwnershipTransferredFilter { #[ethevent(indexed)] - pub template_id: ::ethers::core::types::U256, + pub previous_owner: ::ethers::core::types::Address, + #[ethevent(indexed)] + pub new_owner: ::ethers::core::types::Address, } #[derive( Clone, @@ -1961,13 +1960,13 @@ pub mod email_auth { ///Container type for all of the contract's events #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] pub enum EmailAuthEvents { + CommandTemplateDeletedFilter(CommandTemplateDeletedFilter), + CommandTemplateInsertedFilter(CommandTemplateInsertedFilter), + CommandTemplateUpdatedFilter(CommandTemplateUpdatedFilter), DkimregistryUpdatedFilter(DkimregistryUpdatedFilter), EmailAuthedFilter(EmailAuthedFilter), InitializedFilter(InitializedFilter), OwnershipTransferredFilter(OwnershipTransferredFilter), - SubjectTemplateDeletedFilter(SubjectTemplateDeletedFilter), - SubjectTemplateInsertedFilter(SubjectTemplateInsertedFilter), - SubjectTemplateUpdatedFilter(SubjectTemplateUpdatedFilter), TimestampCheckEnabledFilter(TimestampCheckEnabledFilter), UpgradedFilter(UpgradedFilter), VerifierUpdatedFilter(VerifierUpdatedFilter), @@ -1976,6 +1975,15 @@ pub mod email_auth { fn decode_log( log: &::ethers::core::abi::RawLog, ) -> ::core::result::Result { + if let Ok(decoded) = CommandTemplateDeletedFilter::decode_log(log) { + return Ok(EmailAuthEvents::CommandTemplateDeletedFilter(decoded)); + } + if let Ok(decoded) = CommandTemplateInsertedFilter::decode_log(log) { + return Ok(EmailAuthEvents::CommandTemplateInsertedFilter(decoded)); + } + if let Ok(decoded) = CommandTemplateUpdatedFilter::decode_log(log) { + return Ok(EmailAuthEvents::CommandTemplateUpdatedFilter(decoded)); + } if let Ok(decoded) = DkimregistryUpdatedFilter::decode_log(log) { return Ok(EmailAuthEvents::DkimregistryUpdatedFilter(decoded)); } @@ -1988,15 +1996,6 @@ pub mod email_auth { if let Ok(decoded) = OwnershipTransferredFilter::decode_log(log) { return Ok(EmailAuthEvents::OwnershipTransferredFilter(decoded)); } - if let Ok(decoded) = SubjectTemplateDeletedFilter::decode_log(log) { - return Ok(EmailAuthEvents::SubjectTemplateDeletedFilter(decoded)); - } - if let Ok(decoded) = SubjectTemplateInsertedFilter::decode_log(log) { - return Ok(EmailAuthEvents::SubjectTemplateInsertedFilter(decoded)); - } - if let Ok(decoded) = SubjectTemplateUpdatedFilter::decode_log(log) { - return Ok(EmailAuthEvents::SubjectTemplateUpdatedFilter(decoded)); - } if let Ok(decoded) = TimestampCheckEnabledFilter::decode_log(log) { return Ok(EmailAuthEvents::TimestampCheckEnabledFilter(decoded)); } @@ -2012,21 +2011,21 @@ pub mod email_auth { impl ::core::fmt::Display for EmailAuthEvents { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Self::DkimregistryUpdatedFilter(element) => { + Self::CommandTemplateDeletedFilter(element) => { ::core::fmt::Display::fmt(element, f) } - Self::EmailAuthedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::InitializedFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnershipTransferredFilter(element) => { + Self::CommandTemplateInsertedFilter(element) => { ::core::fmt::Display::fmt(element, f) } - Self::SubjectTemplateDeletedFilter(element) => { + Self::CommandTemplateUpdatedFilter(element) => { ::core::fmt::Display::fmt(element, f) } - Self::SubjectTemplateInsertedFilter(element) => { + Self::DkimregistryUpdatedFilter(element) => { ::core::fmt::Display::fmt(element, f) } - Self::SubjectTemplateUpdatedFilter(element) => { + Self::EmailAuthedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::InitializedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::OwnershipTransferredFilter(element) => { ::core::fmt::Display::fmt(element, f) } Self::TimestampCheckEnabledFilter(element) => { @@ -2039,6 +2038,21 @@ pub mod email_auth { } } } + impl ::core::convert::From for EmailAuthEvents { + fn from(value: CommandTemplateDeletedFilter) -> Self { + Self::CommandTemplateDeletedFilter(value) + } + } + impl ::core::convert::From for EmailAuthEvents { + fn from(value: CommandTemplateInsertedFilter) -> Self { + Self::CommandTemplateInsertedFilter(value) + } + } + impl ::core::convert::From for EmailAuthEvents { + fn from(value: CommandTemplateUpdatedFilter) -> Self { + Self::CommandTemplateUpdatedFilter(value) + } + } impl ::core::convert::From for EmailAuthEvents { fn from(value: DkimregistryUpdatedFilter) -> Self { Self::DkimregistryUpdatedFilter(value) @@ -2059,21 +2073,6 @@ pub mod email_auth { Self::OwnershipTransferredFilter(value) } } - impl ::core::convert::From for EmailAuthEvents { - fn from(value: SubjectTemplateDeletedFilter) -> Self { - Self::SubjectTemplateDeletedFilter(value) - } - } - impl ::core::convert::From for EmailAuthEvents { - fn from(value: SubjectTemplateInsertedFilter) -> Self { - Self::SubjectTemplateInsertedFilter(value) - } - } - impl ::core::convert::From for EmailAuthEvents { - fn from(value: SubjectTemplateUpdatedFilter) -> Self { - Self::SubjectTemplateUpdatedFilter(value) - } - } impl ::core::convert::From for EmailAuthEvents { fn from(value: TimestampCheckEnabledFilter) -> Self { Self::TimestampCheckEnabledFilter(value) @@ -2115,7 +2114,7 @@ pub mod email_auth { )] #[ethcall(name = "accountSalt", abi = "accountSalt()")] pub struct AccountSaltCall; - ///Container type for all input parameters for the `authEmail` function with signature `authEmail((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)))` and selector `0xad3f5f9b` + ///Container type for all input parameters for the `authEmail` function with signature `authEmail((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)))` and selector `0xce207018` #[derive( Clone, ::ethers::contract::EthCall, @@ -2128,11 +2127,27 @@ pub mod email_auth { )] #[ethcall( name = "authEmail", - abi = "authEmail((uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)))" + abi = "authEmail((uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)))" )] pub struct AuthEmailCall { pub email_auth_msg: EmailAuthMsg, } + ///Container type for all input parameters for the `commandTemplates` function with signature `commandTemplates(uint256,uint256)` and selector `0x091c1650` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash + )] + #[ethcall(name = "commandTemplates", abi = "commandTemplates(uint256,uint256)")] + pub struct CommandTemplatesCall( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); ///Container type for all input parameters for the `controller` function with signature `controller()` and selector `0xf77c4791` #[derive( Clone, @@ -2146,7 +2161,7 @@ pub mod email_auth { )] #[ethcall(name = "controller", abi = "controller()")] pub struct ControllerCall; - ///Container type for all input parameters for the `deleteSubjectTemplate` function with signature `deleteSubjectTemplate(uint256)` and selector `0x519e50d1` + ///Container type for all input parameters for the `deleteCommandTemplate` function with signature `deleteCommandTemplate(uint256)` and selector `0x640e8b69` #[derive( Clone, ::ethers::contract::EthCall, @@ -2157,8 +2172,8 @@ pub mod email_auth { Eq, Hash )] - #[ethcall(name = "deleteSubjectTemplate", abi = "deleteSubjectTemplate(uint256)")] - pub struct DeleteSubjectTemplateCall { + #[ethcall(name = "deleteCommandTemplate", abi = "deleteCommandTemplate(uint256)")] + pub struct DeleteCommandTemplateCall { pub template_id: ::ethers::core::types::U256, } ///Container type for all input parameters for the `dkimRegistryAddr` function with signature `dkimRegistryAddr()` and selector `0x1bc01b83` @@ -2174,7 +2189,7 @@ pub mod email_auth { )] #[ethcall(name = "dkimRegistryAddr", abi = "dkimRegistryAddr()")] pub struct DkimRegistryAddrCall; - ///Container type for all input parameters for the `getSubjectTemplate` function with signature `getSubjectTemplate(uint256)` and selector `0x1e05a028` + ///Container type for all input parameters for the `getCommandTemplate` function with signature `getCommandTemplate(uint256)` and selector `0x95e33c08` #[derive( Clone, ::ethers::contract::EthCall, @@ -2185,8 +2200,8 @@ pub mod email_auth { Eq, Hash )] - #[ethcall(name = "getSubjectTemplate", abi = "getSubjectTemplate(uint256)")] - pub struct GetSubjectTemplateCall { + #[ethcall(name = "getCommandTemplate", abi = "getCommandTemplate(uint256)")] + pub struct GetCommandTemplateCall { pub template_id: ::ethers::core::types::U256, } ///Container type for all input parameters for the `initDKIMRegistry` function with signature `initDKIMRegistry(address)` and selector `0x557cf5ef` @@ -2236,7 +2251,7 @@ pub mod email_auth { pub account_salt: [u8; 32], pub controller: ::ethers::core::types::Address, } - ///Container type for all input parameters for the `insertSubjectTemplate` function with signature `insertSubjectTemplate(uint256,string[])` and selector `0xc4b84df4` + ///Container type for all input parameters for the `insertCommandTemplate` function with signature `insertCommandTemplate(uint256,string[])` and selector `0x8ff3730f` #[derive( Clone, ::ethers::contract::EthCall, @@ -2248,12 +2263,12 @@ pub mod email_auth { Hash )] #[ethcall( - name = "insertSubjectTemplate", - abi = "insertSubjectTemplate(uint256,string[])" + name = "insertCommandTemplate", + abi = "insertCommandTemplate(uint256,string[])" )] - pub struct InsertSubjectTemplateCall { + pub struct InsertCommandTemplateCall { pub template_id: ::ethers::core::types::U256, - pub subject_template: ::std::vec::Vec<::std::string::String>, + pub command_template: ::std::vec::Vec<::std::string::String>, } ///Container type for all input parameters for the `lastTimestamp` function with signature `lastTimestamp()` and selector `0x19d8ac61` #[derive( @@ -2322,22 +2337,6 @@ pub mod email_auth { pub struct SetTimestampCheckEnabledCall { pub enabled: bool, } - ///Container type for all input parameters for the `subjectTemplates` function with signature `subjectTemplates(uint256,uint256)` and selector `0x4bd07760` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "subjectTemplates", abi = "subjectTemplates(uint256,uint256)")] - pub struct SubjectTemplatesCall( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); ///Container type for all input parameters for the `timestampCheckEnabled` function with signature `timestampCheckEnabled()` and selector `0x3e56f529` #[derive( Clone, @@ -2366,7 +2365,7 @@ pub mod email_auth { pub struct TransferOwnershipCall { pub new_owner: ::ethers::core::types::Address, } - ///Container type for all input parameters for the `updateDKIMRegistry` function with signature `updateDKIMRegistry(address)` and selector `0xa500125c` + ///Container type for all input parameters for the `updateCommandTemplate` function with signature `updateCommandTemplate(uint256,string[])` and selector `0x24e33f11` #[derive( Clone, ::ethers::contract::EthCall, @@ -2377,11 +2376,15 @@ pub mod email_auth { Eq, Hash )] - #[ethcall(name = "updateDKIMRegistry", abi = "updateDKIMRegistry(address)")] - pub struct UpdateDKIMRegistryCall { - pub dkim_registry_addr: ::ethers::core::types::Address, + #[ethcall( + name = "updateCommandTemplate", + abi = "updateCommandTemplate(uint256,string[])" + )] + pub struct UpdateCommandTemplateCall { + pub template_id: ::ethers::core::types::U256, + pub command_template: ::std::vec::Vec<::std::string::String>, } - ///Container type for all input parameters for the `updateSubjectTemplate` function with signature `updateSubjectTemplate(uint256,string[])` and selector `0x4dbb82f1` + ///Container type for all input parameters for the `updateDKIMRegistry` function with signature `updateDKIMRegistry(address)` and selector `0xa500125c` #[derive( Clone, ::ethers::contract::EthCall, @@ -2392,13 +2395,9 @@ pub mod email_auth { Eq, Hash )] - #[ethcall( - name = "updateSubjectTemplate", - abi = "updateSubjectTemplate(uint256,string[])" - )] - pub struct UpdateSubjectTemplateCall { - pub template_id: ::ethers::core::types::U256, - pub subject_template: ::std::vec::Vec<::std::string::String>, + #[ethcall(name = "updateDKIMRegistry", abi = "updateDKIMRegistry(address)")] + pub struct UpdateDKIMRegistryCall { + pub dkim_registry_addr: ::ethers::core::types::Address, } ///Container type for all input parameters for the `updateVerifier` function with signature `updateVerifier(address)` and selector `0x97fc007c` #[derive( @@ -2463,24 +2462,24 @@ pub mod email_auth { UpgradeInterfaceVersion(UpgradeInterfaceVersionCall), AccountSalt(AccountSaltCall), AuthEmail(AuthEmailCall), + CommandTemplates(CommandTemplatesCall), Controller(ControllerCall), - DeleteSubjectTemplate(DeleteSubjectTemplateCall), + DeleteCommandTemplate(DeleteCommandTemplateCall), DkimRegistryAddr(DkimRegistryAddrCall), - GetSubjectTemplate(GetSubjectTemplateCall), + GetCommandTemplate(GetCommandTemplateCall), InitDKIMRegistry(InitDKIMRegistryCall), InitVerifier(InitVerifierCall), Initialize(InitializeCall), - InsertSubjectTemplate(InsertSubjectTemplateCall), + InsertCommandTemplate(InsertCommandTemplateCall), LastTimestamp(LastTimestampCall), Owner(OwnerCall), ProxiableUUID(ProxiableUUIDCall), RenounceOwnership(RenounceOwnershipCall), SetTimestampCheckEnabled(SetTimestampCheckEnabledCall), - SubjectTemplates(SubjectTemplatesCall), TimestampCheckEnabled(TimestampCheckEnabledCall), TransferOwnership(TransferOwnershipCall), + UpdateCommandTemplate(UpdateCommandTemplateCall), UpdateDKIMRegistry(UpdateDKIMRegistryCall), - UpdateSubjectTemplate(UpdateSubjectTemplateCall), UpdateVerifier(UpdateVerifierCall), UpgradeToAndCall(UpgradeToAndCallCall), UsedNullifiers(UsedNullifiersCall), @@ -2506,25 +2505,30 @@ pub mod email_auth { ) { return Ok(Self::AuthEmail(decoded)); } + if let Ok(decoded) = ::decode( + data, + ) { + return Ok(Self::CommandTemplates(decoded)); + } if let Ok(decoded) = ::decode( data, ) { return Ok(Self::Controller(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::DeleteSubjectTemplate(decoded)); + return Ok(Self::DeleteCommandTemplate(decoded)); } if let Ok(decoded) = ::decode( data, ) { return Ok(Self::DkimRegistryAddr(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::GetSubjectTemplate(decoded)); + return Ok(Self::GetCommandTemplate(decoded)); } if let Ok(decoded) = ::decode( data, @@ -2541,10 +2545,10 @@ pub mod email_auth { ) { return Ok(Self::Initialize(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::InsertSubjectTemplate(decoded)); + return Ok(Self::InsertCommandTemplate(decoded)); } if let Ok(decoded) = ::decode( data, @@ -2571,11 +2575,6 @@ pub mod email_auth { ) { return Ok(Self::SetTimestampCheckEnabled(decoded)); } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SubjectTemplates(decoded)); - } if let Ok(decoded) = ::decode( data, ) { @@ -2586,15 +2585,15 @@ pub mod email_auth { ) { return Ok(Self::TransferOwnership(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::UpdateDKIMRegistry(decoded)); + return Ok(Self::UpdateCommandTemplate(decoded)); } - if let Ok(decoded) = ::decode( + if let Ok(decoded) = ::decode( data, ) { - return Ok(Self::UpdateSubjectTemplate(decoded)); + return Ok(Self::UpdateDKIMRegistry(decoded)); } if let Ok(decoded) = ::decode( data, @@ -2631,16 +2630,19 @@ pub mod email_auth { Self::AuthEmail(element) => { ::ethers::core::abi::AbiEncode::encode(element) } + Self::CommandTemplates(element) => { + ::ethers::core::abi::AbiEncode::encode(element) + } Self::Controller(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::DeleteSubjectTemplate(element) => { + Self::DeleteCommandTemplate(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::DkimRegistryAddr(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::GetSubjectTemplate(element) => { + Self::GetCommandTemplate(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::InitDKIMRegistry(element) => { @@ -2652,7 +2654,7 @@ pub mod email_auth { Self::Initialize(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::InsertSubjectTemplate(element) => { + Self::InsertCommandTemplate(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::LastTimestamp(element) => { @@ -2668,19 +2670,16 @@ pub mod email_auth { Self::SetTimestampCheckEnabled(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::SubjectTemplates(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } Self::TimestampCheckEnabled(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::TransferOwnership(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::UpdateDKIMRegistry(element) => { + Self::UpdateCommandTemplate(element) => { ::ethers::core::abi::AbiEncode::encode(element) } - Self::UpdateSubjectTemplate(element) => { + Self::UpdateDKIMRegistry(element) => { ::ethers::core::abi::AbiEncode::encode(element) } Self::UpdateVerifier(element) => { @@ -2706,18 +2705,19 @@ pub mod email_auth { } Self::AccountSalt(element) => ::core::fmt::Display::fmt(element, f), Self::AuthEmail(element) => ::core::fmt::Display::fmt(element, f), + Self::CommandTemplates(element) => ::core::fmt::Display::fmt(element, f), Self::Controller(element) => ::core::fmt::Display::fmt(element, f), - Self::DeleteSubjectTemplate(element) => { + Self::DeleteCommandTemplate(element) => { ::core::fmt::Display::fmt(element, f) } Self::DkimRegistryAddr(element) => ::core::fmt::Display::fmt(element, f), - Self::GetSubjectTemplate(element) => { + Self::GetCommandTemplate(element) => { ::core::fmt::Display::fmt(element, f) } Self::InitDKIMRegistry(element) => ::core::fmt::Display::fmt(element, f), Self::InitVerifier(element) => ::core::fmt::Display::fmt(element, f), Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::InsertSubjectTemplate(element) => { + Self::InsertCommandTemplate(element) => { ::core::fmt::Display::fmt(element, f) } Self::LastTimestamp(element) => ::core::fmt::Display::fmt(element, f), @@ -2727,15 +2727,14 @@ pub mod email_auth { Self::SetTimestampCheckEnabled(element) => { ::core::fmt::Display::fmt(element, f) } - Self::SubjectTemplates(element) => ::core::fmt::Display::fmt(element, f), Self::TimestampCheckEnabled(element) => { ::core::fmt::Display::fmt(element, f) } Self::TransferOwnership(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateDKIMRegistry(element) => { + Self::UpdateCommandTemplate(element) => { ::core::fmt::Display::fmt(element, f) } - Self::UpdateSubjectTemplate(element) => { + Self::UpdateDKIMRegistry(element) => { ::core::fmt::Display::fmt(element, f) } Self::UpdateVerifier(element) => ::core::fmt::Display::fmt(element, f), @@ -2760,14 +2759,19 @@ pub mod email_auth { Self::AuthEmail(value) } } + impl ::core::convert::From for EmailAuthCalls { + fn from(value: CommandTemplatesCall) -> Self { + Self::CommandTemplates(value) + } + } impl ::core::convert::From for EmailAuthCalls { fn from(value: ControllerCall) -> Self { Self::Controller(value) } } - impl ::core::convert::From for EmailAuthCalls { - fn from(value: DeleteSubjectTemplateCall) -> Self { - Self::DeleteSubjectTemplate(value) + impl ::core::convert::From for EmailAuthCalls { + fn from(value: DeleteCommandTemplateCall) -> Self { + Self::DeleteCommandTemplate(value) } } impl ::core::convert::From for EmailAuthCalls { @@ -2775,9 +2779,9 @@ pub mod email_auth { Self::DkimRegistryAddr(value) } } - impl ::core::convert::From for EmailAuthCalls { - fn from(value: GetSubjectTemplateCall) -> Self { - Self::GetSubjectTemplate(value) + impl ::core::convert::From for EmailAuthCalls { + fn from(value: GetCommandTemplateCall) -> Self { + Self::GetCommandTemplate(value) } } impl ::core::convert::From for EmailAuthCalls { @@ -2795,9 +2799,9 @@ pub mod email_auth { Self::Initialize(value) } } - impl ::core::convert::From for EmailAuthCalls { - fn from(value: InsertSubjectTemplateCall) -> Self { - Self::InsertSubjectTemplate(value) + impl ::core::convert::From for EmailAuthCalls { + fn from(value: InsertCommandTemplateCall) -> Self { + Self::InsertCommandTemplate(value) } } impl ::core::convert::From for EmailAuthCalls { @@ -2825,11 +2829,6 @@ pub mod email_auth { Self::SetTimestampCheckEnabled(value) } } - impl ::core::convert::From for EmailAuthCalls { - fn from(value: SubjectTemplatesCall) -> Self { - Self::SubjectTemplates(value) - } - } impl ::core::convert::From for EmailAuthCalls { fn from(value: TimestampCheckEnabledCall) -> Self { Self::TimestampCheckEnabled(value) @@ -2840,16 +2839,16 @@ pub mod email_auth { Self::TransferOwnership(value) } } + impl ::core::convert::From for EmailAuthCalls { + fn from(value: UpdateCommandTemplateCall) -> Self { + Self::UpdateCommandTemplate(value) + } + } impl ::core::convert::From for EmailAuthCalls { fn from(value: UpdateDKIMRegistryCall) -> Self { Self::UpdateDKIMRegistry(value) } } - impl ::core::convert::From for EmailAuthCalls { - fn from(value: UpdateSubjectTemplateCall) -> Self { - Self::UpdateSubjectTemplate(value) - } - } impl ::core::convert::From for EmailAuthCalls { fn from(value: UpdateVerifierCall) -> Self { Self::UpdateVerifier(value) @@ -2894,7 +2893,7 @@ pub mod email_auth { Hash )] pub struct AccountSaltReturn(pub [u8; 32]); - ///Container type for all return fields from the `controller` function with signature `controller()` and selector `0xf77c4791` + ///Container type for all return fields from the `commandTemplates` function with signature `commandTemplates(uint256,uint256)` and selector `0x091c1650` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2905,8 +2904,8 @@ pub mod email_auth { Eq, Hash )] - pub struct ControllerReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `dkimRegistryAddr` function with signature `dkimRegistryAddr()` and selector `0x1bc01b83` + pub struct CommandTemplatesReturn(pub ::std::string::String); + ///Container type for all return fields from the `controller` function with signature `controller()` and selector `0xf77c4791` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2917,8 +2916,8 @@ pub mod email_auth { Eq, Hash )] - pub struct DkimRegistryAddrReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `getSubjectTemplate` function with signature `getSubjectTemplate(uint256)` and selector `0x1e05a028` + pub struct ControllerReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `dkimRegistryAddr` function with signature `dkimRegistryAddr()` and selector `0x1bc01b83` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2929,8 +2928,8 @@ pub mod email_auth { Eq, Hash )] - pub struct GetSubjectTemplateReturn(pub ::std::vec::Vec<::std::string::String>); - ///Container type for all return fields from the `lastTimestamp` function with signature `lastTimestamp()` and selector `0x19d8ac61` + pub struct DkimRegistryAddrReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `getCommandTemplate` function with signature `getCommandTemplate(uint256)` and selector `0x95e33c08` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2941,8 +2940,8 @@ pub mod email_auth { Eq, Hash )] - pub struct LastTimestampReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b` + pub struct GetCommandTemplateReturn(pub ::std::vec::Vec<::std::string::String>); + ///Container type for all return fields from the `lastTimestamp` function with signature `lastTimestamp()` and selector `0x19d8ac61` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2953,8 +2952,8 @@ pub mod email_auth { Eq, Hash )] - pub struct OwnerReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` + pub struct LastTimestampReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2965,8 +2964,8 @@ pub mod email_auth { Eq, Hash )] - pub struct ProxiableUUIDReturn(pub [u8; 32]); - ///Container type for all return fields from the `subjectTemplates` function with signature `subjectTemplates(uint256,uint256)` and selector `0x4bd07760` + pub struct OwnerReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `proxiableUUID` function with signature `proxiableUUID()` and selector `0x52d1902d` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -2977,7 +2976,7 @@ pub mod email_auth { Eq, Hash )] - pub struct SubjectTemplatesReturn(pub ::std::string::String); + pub struct ProxiableUUIDReturn(pub [u8; 32]); ///Container type for all return fields from the `timestampCheckEnabled` function with signature `timestampCheckEnabled()` and selector `0x3e56f529` #[derive( Clone, @@ -3014,7 +3013,7 @@ pub mod email_auth { Hash )] pub struct VerifierAddrReturn(pub ::ethers::core::types::Address); - ///`EmailAuthMsg(uint256,bytes[],uint256,(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes))` + ///`EmailAuthMsg(uint256,bytes[],(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes))` #[derive( Clone, ::ethers::contract::EthAbiType, @@ -3027,8 +3026,7 @@ pub mod email_auth { )] pub struct EmailAuthMsg { pub template_id: ::ethers::core::types::U256, - pub subject_params: ::std::vec::Vec<::ethers::core::types::Bytes>, - pub skiped_subject_prefix: ::ethers::core::types::U256, + pub command_params: ::std::vec::Vec<::ethers::core::types::Bytes>, pub proof: EmailProof, } ///`EmailProof(string,bytes32,uint256,string,bytes32,bytes32,bool,bytes)` @@ -3046,7 +3044,7 @@ pub mod email_auth { pub domain_name: ::std::string::String, pub public_key_hash: [u8; 32], pub timestamp: ::ethers::core::types::U256, - pub masked_subject: ::std::string::String, + pub masked_command: ::std::string::String, pub email_nullifier: [u8; 32], pub account_salt: [u8; 32], pub is_code_exist: bool, diff --git a/packages/relayer/src/abis/mod.rs b/packages/relayer/src/abis/mod.rs index c9a06ccb..5fb44ddb 100644 --- a/packages/relayer/src/abis/mod.rs +++ b/packages/relayer/src/abis/mod.rs @@ -2,6 +2,6 @@ pub mod ecdsa_owned_dkim_registry; pub mod email_account_recovery; pub mod email_auth; -pub use ecdsa_owned_dkim_registry::*; -pub use email_account_recovery::*; +pub use ecdsa_owned_dkim_registry::ECDSAOwnedDKIMRegistry; +pub use email_account_recovery::EmailAccountRecovery; pub use email_auth::*; diff --git a/packages/relayer/src/chain.rs b/packages/relayer/src/chain.rs index 21f2ff70..080cf388 100644 --- a/packages/relayer/src/chain.rs +++ b/packages/relayer/src/chain.rs @@ -120,7 +120,7 @@ impl ChainClient { } } - pub async fn get_acceptance_subject_templates( + pub async fn get_acceptance_command_templates( &self, controller_eth_addr: &String, template_idx: u64, @@ -128,14 +128,14 @@ impl ChainClient { let controller_eth_addr: H160 = controller_eth_addr.parse()?; let contract = EmailAccountRecovery::new(controller_eth_addr, self.client.clone()); let templates = contract - .acceptance_subject_templates() + .acceptance_command_templates() .call() .await .map_err(|e| anyhow::Error::from(e))?; Ok(templates[template_idx as usize].clone()) } - pub async fn get_recovery_subject_templates( + pub async fn get_recovery_command_templates( &self, controller_eth_addr: &String, template_idx: u64, @@ -143,7 +143,7 @@ impl ChainClient { let controller_eth_addr: H160 = controller_eth_addr.parse()?; let contract = EmailAccountRecovery::new(controller_eth_addr, self.client.clone()); let templates = contract - .recovery_subject_templates() + .recovery_command_templates() .call() .await .map_err(|e| anyhow::Error::from(e))?; @@ -240,15 +240,15 @@ impl ChainClient { .await?) } - pub async fn get_recovered_account_from_acceptance_subject( + pub async fn get_recovered_account_from_acceptance_command( &self, controller_eth_addr: &String, - subject_params: Vec, + command_params: Vec, template_idx: u64, ) -> Result { let controller_eth_addr: H160 = controller_eth_addr.parse()?; let contract = EmailAccountRecovery::new(controller_eth_addr, self.client.clone()); - let subject_params_bytes = subject_params + let command_params_bytes = command_params .iter() // Change here: use iter() instead of map() directly on Vec .map(|s| { s.abi_encode(None) // Assuming decimal_size is not needed or can be None @@ -256,8 +256,8 @@ impl ChainClient { }) // Error handling .collect::>(); let recovered_account = contract - .extract_recovered_account_from_acceptance_subject( - subject_params_bytes, + .extract_recovered_account_from_acceptance_command( + command_params_bytes, template_idx.into(), ) .call() @@ -265,15 +265,15 @@ impl ChainClient { Ok(recovered_account) } - pub async fn get_recovered_account_from_recovery_subject( + pub async fn get_recovered_account_from_recovery_command( &self, controller_eth_addr: &String, - subject_params: Vec, + command_params: Vec, template_idx: u64, ) -> Result { let controller_eth_addr: H160 = controller_eth_addr.parse()?; let contract = EmailAccountRecovery::new(controller_eth_addr, self.client.clone()); - let subject_params_bytes = subject_params + let command_params_bytes = command_params .iter() // Change here: use iter() instead of map() directly on Vec .map(|s| { s.abi_encode(None) // Assuming decimal_size is not needed or can be None @@ -281,8 +281,8 @@ impl ChainClient { }) // Error handling .collect::>(); let recovered_account = contract - .extract_recovered_account_from_recovery_subject( - subject_params_bytes, + .extract_recovered_account_from_recovery_command( + command_params_bytes, template_idx.into(), ) .call() diff --git a/packages/relayer/src/core.rs b/packages/relayer/src/core.rs index 00e1c195..f2e440a1 100644 --- a/packages/relayer/src/core.rs +++ b/packages/relayer/src/core.rs @@ -8,28 +8,27 @@ use ethers::{ abi::{encode, Token}, utils::keccak256, }; -use relayer_utils::{extract_substr_idxes, generate_email_auth_input, LOG}; +use relayer_utils::{extract_substr_idxes, generate_email_circuit_input, EmailCircuitParams, LOG}; const DOMAIN_FIELDS: usize = 9; -const SUBJECT_FIELDS: usize = 20; +const COMMAND_FIELDS: usize = 20; const EMAIL_ADDR_FIELDS: usize = 9; -#[named] pub async fn handle_email(email: String) -> Result { let parsed_email = ParsedEmail::new_from_raw_email(&email).await?; - trace!(LOG, "email: {}", email; "func" => function_name!()); + trace!(LOG, "email: {}", email); let guardian_email_addr = parsed_email.get_from_addr()?; let padded_from_addr = PaddedEmailAddr::from_email_addr(&guardian_email_addr); - trace!(LOG, "From address: {}", guardian_email_addr; "func" => function_name!()); - let subject = parsed_email.get_subject_all()?; + trace!(LOG, "From address: {}", guardian_email_addr); + let email_body = parsed_email.get_cleaned_body()?; let request_decomposed_def = serde_json::from_str(include_str!("./regex_json/request_def.json"))?; let request_idxes = extract_substr_idxes(&email, &request_decomposed_def)?; if request_idxes.is_empty() { - bail!(WRONG_SUBJECT_FORMAT); + bail!(WRONG_COMMAND_FORMAT); } - info!(LOG, "Request idxes: {:?}", request_idxes; "func" => function_name!()); + info!(LOG, "Request idxes: {:?}", request_idxes); let request_id = &email[request_idxes[0].0..request_idxes[0].1]; let request_id_u32 = request_id .parse::() @@ -66,39 +65,37 @@ pub async fn handle_email(email: String) -> Result { ) .await?; - if let Ok(invitation_code) = parsed_email.get_invitation_code() { - trace!(LOG, "Email with account code"; "func" => function_name!()); - - if account_code_str != invitation_code { - return Err(anyhow!( - "Stored account code is not equal to one in the email. Stored: {}, Email: {}", - account_code_str, - invitation_code - )); - } - + if let Ok(invitation_code) = parsed_email.get_invitation_code(false) { if !request.is_for_recovery { - let subject_template = CLIENT - .get_acceptance_subject_templates( + trace!(LOG, "Email with account code"); + + if account_code_str != invitation_code { + return Err(anyhow!( + "Stored account code is not equal to one in the email. Stored: {}, Email: {}", + account_code_str, + invitation_code + )); + } + + let command_template = CLIENT + .get_acceptance_command_templates( &request.controller_eth_addr, request.template_idx, ) .await?; - let result = extract_template_vals_and_skipped_subject_idx(&subject, subject_template); - let (subject_params, skipped_subject_prefix) = match result { - Ok((subject_params, skipped_subject_prefix)) => { - (subject_params, skipped_subject_prefix) - } - Err(e) => { - return Ok(EmailAuthEvent::Error { - email_addr: guardian_email_addr, - error: format!("Invalid Subject, {}", e), - }); - } - }; - - let subject_params_encoded: Vec = subject_params + let command_params = + match extract_template_vals_from_command_template(&email_body, command_template) { + Ok(command_params) => command_params, + Err(e) => { + return Ok(EmailAuthEvent::Error { + email_addr: guardian_email_addr, + error: format!("Invalid Command, {}", e), + }); + } + }; + + let command_params_encoded: Vec = command_params .iter() .map(|param| param.abi_encode(None).unwrap()) .collect(); @@ -111,25 +108,33 @@ pub async fn handle_email(email: String) -> Result { let template_id = keccak256(encode(&tokens)); - let circuit_input = generate_email_auth_input( + let circuit_input = generate_email_circuit_input( &email, - &AccountCode::from(hex2field(&format!("0x{}", &account_code_str))?), + &AccountCode::from(hex_to_field(&format!("0x{}", &account_code_str))?), + Some(EmailCircuitParams { + max_header_length: Some(1024), + max_body_length: Some(1024), + sha_precompute_selector: Some(SHA_PRECOMPUTE_SELECTOR.to_string()), + ignore_body_hash_check: Some(false), + }), ) .await?; let (proof, public_signals) = generate_proof(&circuit_input, "email_auth", PROVER_ADDRESS.get().unwrap()).await?; - let account_salt = u256_to_bytes32(&public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 3]); - let is_code_exist = public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 4] == 1u8.into(); - let masked_subject = get_masked_subject(public_signals.clone(), DOMAIN_FIELDS + 3)?; + info!(LOG, "Public signals: {:?}", public_signals); + + let account_salt = u256_to_bytes32(&public_signals[COMMAND_FIELDS + DOMAIN_FIELDS + 3]); + let is_code_exist = public_signals[COMMAND_FIELDS + DOMAIN_FIELDS + 4] == 1u8.into(); + let masked_command = get_masked_command(public_signals.clone(), DOMAIN_FIELDS + 3)?; let email_proof = EmailProof { proof: proof, domain_name: parsed_email.get_email_domain()?, public_key_hash: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 0]), timestamp: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 2]).into(), - masked_subject, + masked_command, email_nullifier: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 1]), account_salt, is_code_exist, @@ -137,13 +142,12 @@ pub async fn handle_email(email: String) -> Result { let email_auth_msg = EmailAuthMsg { template_id: template_id.into(), - subject_params: subject_params_encoded, - skiped_subject_prefix: skipped_subject_prefix.into(), + command_params: command_params_encoded, proof: email_proof.clone(), }; - info!(LOG, "Email Auth Msg: {:?}", email_auth_msg; "func" => function_name!()); - info!(LOG, "Request: {:?}", request; "func" => function_name!()); + info!(LOG, "Email Auth Msg: {:?}", email_auth_msg); + info!(LOG, "Request: {:?}", request); match CLIENT .handle_acceptance( @@ -172,7 +176,7 @@ pub async fn handle_email(email: String) -> Result { is_processed: true, request_id: request.request_id, is_success: Some(true), - email_nullifier: Some(field2hex( + email_nullifier: Some(field_to_hex( &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), )), account_salt: Some(bytes32_to_hex(&account_salt)), @@ -196,7 +200,7 @@ pub async fn handle_email(email: String) -> Result { is_processed: true, request_id: request.request_id, is_success: Some(false), - email_nullifier: Some(field2hex( + email_nullifier: Some(field_to_hex( &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), )), account_salt: Some(bytes32_to_hex(&account_salt)), @@ -212,148 +216,29 @@ pub async fn handle_email(email: String) -> Result { Err(e) => Err(anyhow!("Failed to handle acceptance: {}", e)), } } else { - let subject_template = CLIENT - .get_recovery_subject_templates(&request.controller_eth_addr, request.template_idx) - .await?; - - let result = extract_template_vals_and_skipped_subject_idx(&subject, subject_template); - let (subject_params, skipped_subject_prefix) = match result { - Ok((subject_params, skipped_subject_prefix)) => { - (subject_params, skipped_subject_prefix) - } - Err(e) => { - return Ok(EmailAuthEvent::Error { - email_addr: guardian_email_addr, - error: format!("Invalid Subject, {}", e), - }); - } - }; - - let subject_params_encoded: Vec = subject_params - .iter() - .map(|param| param.abi_encode(None).unwrap()) - .collect(); - - let tokens = vec![ - Token::Uint((*EMAIL_ACCOUNT_RECOVERY_VERSION_ID.get().unwrap()).into()), - Token::String("RECOVERY".to_string()), - Token::Uint(request.template_idx.into()), - ]; - - let template_id = keccak256(encode(&tokens)); - - let circuit_input = generate_email_auth_input( - &email, - &AccountCode::from(hex2field(&format!("0x{}", &account_code_str))?), - ) - .await?; - - let (proof, public_signals) = - generate_proof(&circuit_input, "email_auth", PROVER_ADDRESS.get().unwrap()).await?; - - let account_salt = u256_to_bytes32(&public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 3]); - let is_code_exist = public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 4] == 1u8.into(); - let masked_subject = get_masked_subject(public_signals.clone(), DOMAIN_FIELDS + 3)?; - - let email_proof = EmailProof { - proof: proof, - domain_name: parsed_email.get_email_domain()?, - public_key_hash: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 0]), - timestamp: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 2]).into(), - masked_subject, - email_nullifier: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 1]), - account_salt, - is_code_exist, - }; - - let email_auth_msg = EmailAuthMsg { - template_id: template_id.into(), - subject_params: subject_params_encoded, - skiped_subject_prefix: skipped_subject_prefix.into(), - proof: email_proof.clone(), - }; - - info!(LOG, "Email Auth Msg: {:?}", email_auth_msg; "func" => function_name!()); - info!(LOG, "Request: {:?}", request; "func" => function_name!()); - - match CLIENT - .handle_recovery( - &request.controller_eth_addr, - email_auth_msg, - request.template_idx, - ) - .await - { - Ok(true) => { - let updated_request = Request { - account_eth_addr: request.account_eth_addr.clone(), - controller_eth_addr: request.controller_eth_addr.clone(), - guardian_email_addr: guardian_email_addr.clone(), - template_idx: request.template_idx, - is_for_recovery: request.is_for_recovery, - is_processed: true, - request_id: request.request_id, - is_success: Some(true), - email_nullifier: Some(field2hex( - &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), - )), - account_salt: Some(bytes32_to_hex(&account_salt)), - }; - - DB.update_request(&updated_request).await?; - - Ok(EmailAuthEvent::RecoverySuccess { - account_eth_addr: request.account_eth_addr, - guardian_email_addr, - request_id: request_id_u32, - }) - } - Ok(false) => { - let updated_request = Request { - account_eth_addr: request.account_eth_addr.clone(), - controller_eth_addr: request.controller_eth_addr.clone(), - guardian_email_addr: guardian_email_addr.clone(), - template_idx: request.template_idx, - is_for_recovery: request.is_for_recovery, - is_processed: true, - request_id: request.request_id, - is_success: Some(false), - email_nullifier: Some(field2hex( - &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), - )), - account_salt: Some(bytes32_to_hex(&account_salt)), - }; - - DB.update_request(&updated_request).await?; - - Ok(EmailAuthEvent::Error { - email_addr: guardian_email_addr, - error: "Failed to handle recovery".to_string(), - }) - } - Err(e) => Err(anyhow!("Failed to handle recovery: {}", e)), - } + return Ok(EmailAuthEvent::Error { + email_addr: guardian_email_addr, + error: "Account code found and for recovery".to_string(), + }); } } else { if request.is_for_recovery { - let subject_template = CLIENT - .get_recovery_subject_templates(&request.controller_eth_addr, request.template_idx) + let command_template = CLIENT + .get_recovery_command_templates(&request.controller_eth_addr, request.template_idx) .await?; - let result = extract_template_vals_and_skipped_subject_idx(&subject, subject_template); - let (subject_params, skipped_subject_prefix) = match result { - Ok((subject_params, skipped_subject_prefix)) => { - (subject_params, skipped_subject_prefix) - } - Err(e) => { - return Ok(EmailAuthEvent::Error { - email_addr: guardian_email_addr, - error: format!("Invalid Subject, {}", e), - }); - } - }; - - let subject_params_encoded: Vec = subject_params + let command_params = + match extract_template_vals_from_command_template(&email_body, command_template) { + Ok(command_params) => command_params, + Err(e) => { + return Ok(EmailAuthEvent::Error { + email_addr: guardian_email_addr, + error: format!("Invalid Command, {}", e), + }); + } + }; + + let command_params_encoded: Vec = command_params .iter() .map(|param| param.abi_encode(None).unwrap()) .collect(); @@ -366,25 +251,31 @@ pub async fn handle_email(email: String) -> Result { let template_id = keccak256(encode(&tokens)); - let circuit_input = generate_email_auth_input( + let circuit_input = generate_email_circuit_input( &email, - &AccountCode::from(hex2field(&format!("0x{}", &account_code_str))?), + &AccountCode::from(hex_to_field(&format!("0x{}", &account_code_str))?), + Some(EmailCircuitParams { + max_header_length: Some(1024), + max_body_length: Some(1024), + sha_precompute_selector: Some(SHA_PRECOMPUTE_SELECTOR.to_string()), + ignore_body_hash_check: Some(false), + }), ) .await?; let (proof, public_signals) = generate_proof(&circuit_input, "email_auth", PROVER_ADDRESS.get().unwrap()).await?; - let account_salt = u256_to_bytes32(&public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 3]); - let is_code_exist = public_signals[SUBJECT_FIELDS + DOMAIN_FIELDS + 4] == 1u8.into(); - let masked_subject = get_masked_subject(public_signals.clone(), DOMAIN_FIELDS + 3)?; + let account_salt = u256_to_bytes32(&public_signals[COMMAND_FIELDS + DOMAIN_FIELDS + 3]); + let is_code_exist = public_signals[COMMAND_FIELDS + DOMAIN_FIELDS + 4] == 1u8.into(); + let masked_command = get_masked_command(public_signals.clone(), DOMAIN_FIELDS + 3)?; let email_proof = EmailProof { proof: proof, domain_name: parsed_email.get_email_domain()?, public_key_hash: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 0]), timestamp: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 2]).into(), - masked_subject, + masked_command, email_nullifier: u256_to_bytes32(&public_signals[DOMAIN_FIELDS + 1]), account_salt, is_code_exist, @@ -392,14 +283,10 @@ pub async fn handle_email(email: String) -> Result { let email_auth_msg = EmailAuthMsg { template_id: template_id.into(), - subject_params: subject_params_encoded, - skiped_subject_prefix: skipped_subject_prefix.into(), + command_params: command_params_encoded, proof: email_proof.clone(), }; - info!(LOG, "Email Auth Msg: {:?}", email_auth_msg; "func" => function_name!()); - info!(LOG, "Request: {:?}", request; "func" => function_name!()); - match CLIENT .handle_recovery( &request.controller_eth_addr, @@ -418,7 +305,7 @@ pub async fn handle_email(email: String) -> Result { is_processed: true, request_id: request.request_id, is_success: Some(true), - email_nullifier: Some(field2hex( + email_nullifier: Some(field_to_hex( &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), )), account_salt: Some(bytes32_to_hex(&account_salt)), @@ -442,7 +329,7 @@ pub async fn handle_email(email: String) -> Result { is_processed: true, request_id: request.request_id, is_success: Some(false), - email_nullifier: Some(field2hex( + email_nullifier: Some(field_to_hex( &bytes32_to_fr(&email_proof.email_nullifier).unwrap(), )), account_salt: Some(bytes32_to_hex(&account_salt)), @@ -460,27 +347,27 @@ pub async fn handle_email(email: String) -> Result { } else { return Ok(EmailAuthEvent::Error { email_addr: guardian_email_addr, - error: "No account code found".to_string(), + error: "No account code found and not for recovery".to_string(), }); } } } -pub fn get_masked_subject(public_signals: Vec, start_idx: usize) -> Result { - // Gather signals from start_idx to start_idx + SUBJECT_FIELDS - let mut subject_bytes = Vec::new(); - for i in start_idx..start_idx + SUBJECT_FIELDS { +pub fn get_masked_command(public_signals: Vec, start_idx: usize) -> Result { + // Gather signals from start_idx to start_idx + COMMAND_FIELDS + let mut command_bytes = Vec::new(); + for i in start_idx..start_idx + COMMAND_FIELDS { let signal = public_signals[i as usize]; if signal == U256::zero() { break; } let bytes = u256_to_bytes32_little(&signal); - subject_bytes.extend_from_slice(&bytes); + command_bytes.extend_from_slice(&bytes); } // Bytes to string, removing null bytes - let subject = String::from_utf8(subject_bytes.into_iter().filter(|&b| b != 0u8).collect()) + let command = String::from_utf8(command_bytes.into_iter().filter(|&b| b != 0u8).collect()) .map_err(|e| anyhow!("Failed to convert bytes to string: {}", e))?; - Ok(subject) + Ok(command) } diff --git a/packages/relayer/src/database.rs b/packages/relayer/src/database.rs index 51f13499..acd74822 100644 --- a/packages/relayer/src/database.rs +++ b/packages/relayer/src/database.rs @@ -73,7 +73,6 @@ impl Database { Ok(()) } - #[named] pub(crate) async fn get_credentials(&self, account_code: &str) -> Result> { let row = sqlx::query("SELECT * FROM credentials WHERE account_code = $1") .bind(account_code) @@ -92,7 +91,7 @@ impl Database { guardian_email_addr, is_set, }; - info!(LOG, "row {:?}", codes_row; "func" => function_name!()); + info!(LOG, "row {:?}", codes_row); Ok(Some(codes_row)) } None => Ok(None), @@ -159,9 +158,8 @@ impl Database { Ok(()) } - #[named] pub(crate) async fn insert_credentials(&self, row: &Credentials) -> Result<()> { - info!(LOG, "insert row {:?}", row; "func" => function_name!()); + info!(LOG, "insert row {:?}", row); let row = sqlx::query( "INSERT INTO credentials (account_code, account_eth_addr, guardian_email_addr, is_set) VALUES ($1, $2, $3, $4) RETURNING *", ) @@ -171,11 +169,7 @@ impl Database { .bind(row.is_set) .fetch_one(&self.db) .await?; - info!( - LOG, - "{} row inserted", - row.len(); "func" => function_name!() - ); + info!(LOG, "{} row inserted", row.len()); Ok(()) } @@ -193,7 +187,6 @@ impl Database { } } - #[named] pub(crate) async fn get_request(&self, request_id: u32) -> Result> { let row = sqlx::query("SELECT * FROM requests WHERE request_id = $1") .bind(request_id as i64) @@ -224,7 +217,7 @@ impl Database { email_nullifier, account_salt, }; - info!(LOG, "row {:?}", requests_row; "func" => function_name!()); + info!(LOG, "row {:?}", requests_row); Ok(Some(requests_row)) } None => Ok(None), @@ -270,7 +263,6 @@ impl Database { } } - #[named] pub(crate) async fn get_credentials_from_wallet_and_email( &self, account_eth_addr: &str, @@ -296,16 +288,15 @@ impl Database { guardian_email_addr, is_set, }; - info!(LOG, "row {:?}", codes_row; "func" => function_name!()); + info!(LOG, "row {:?}", codes_row); Ok(Some(codes_row)) } None => Ok(None), } } - #[named] pub(crate) async fn insert_request(&self, row: &Request) -> Result<()> { - info!(LOG, "insert row {:?}", row; "func" => function_name!()); + info!(LOG, "insert row {:?}", row); let row = sqlx::query( "INSERT INTO requests (request_id, account_eth_addr, controller_eth_addr, guardian_email_addr, is_for_recovery, template_idx, is_processed, is_success, email_nullifier, account_salt) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING *", ) @@ -321,11 +312,7 @@ impl Database { .bind(&row.account_salt) .fetch_one(&self.db) .await?; - info!( - LOG, - "{} row inserted", - row.len(); "func" => function_name!() - ); + info!(LOG, "{} row inserted", row.len()); Ok(()) } } diff --git a/packages/relayer/src/lib.rs b/packages/relayer/src/lib.rs index 8245264d..5f31b8f9 100644 --- a/packages/relayer/src/lib.rs +++ b/packages/relayer/src/lib.rs @@ -19,7 +19,6 @@ pub use modules::*; use relayer_utils::LOG; pub use utils::*; -use ::function_name::named; use tokio::sync::Mutex; use anyhow::{anyhow, bail, Result}; @@ -69,9 +68,8 @@ lazy_static! { pub static ref SHARED_MUTEX: Arc> = Arc::new(Mutex::new(0)); } -#[named] pub async fn run(config: RelayerConfig) -> Result<()> { - info!(LOG, "Starting relayer"; "func" => function_name!()); + info!(LOG, "Starting relayer"); CIRCUITS_DIR_PATH.set(config.circuits_dir_path).unwrap(); WEB_SERVER_ADDRESS.set(config.web_server_address).unwrap(); @@ -93,11 +91,11 @@ pub async fn run(config: RelayerConfig) -> Result<()> { loop { match run_server().await { Ok(_) => { - info!(LOG, "run_server exited normally"; "func" => function_name!()); + info!(LOG, "run_server exited normally"); break; // Exit loop if run_server exits normally } Err(err) => { - error!(LOG, "Error api server: {}", err; "func" => function_name!()); + error!(LOG, "Error api server: {}", err); // Optionally, add a delay before restarting tokio::time::sleep(Duration::from_secs(5)).await; } diff --git a/packages/relayer/src/modules/dkim.rs b/packages/relayer/src/modules/dkim.rs index 1be188ef..82e9f912 100644 --- a/packages/relayer/src/modules/dkim.rs +++ b/packages/relayer/src/modules/dkim.rs @@ -65,7 +65,6 @@ impl<'a> DkimOracleClient<'a> { } } -#[named] pub async fn check_and_update_dkim( email: &str, parsed_email: &ParsedEmail, @@ -76,11 +75,11 @@ pub async fn check_and_update_dkim( let mut public_key_n = parsed_email.public_key.clone(); public_key_n.reverse(); let public_key_hash = public_key_hash(&public_key_n)?; - info!(LOG, "public_key_hash {:?}", public_key_hash; "func" => function_name!()); + info!(LOG, "public_key_hash {:?}", public_key_hash); let domain = parsed_email.get_email_domain()?; - info!(LOG, "domain {:?}", domain; "func" => function_name!()); + info!(LOG, "domain {:?}", domain); if CLIENT.get_bytecode(&wallet_addr.to_string()).await? == Bytes::from(vec![0u8; 20]) { - info!(LOG, "wallet not deployed"; "func" => function_name!()); + info!(LOG, "wallet not deployed"); return Ok(()); } let email_auth_addr = CLIENT @@ -97,7 +96,7 @@ pub async fn check_and_update_dkim( if CLIENT.get_bytecode(&email_auth_addr).await? != Bytes::from(vec![]) { dkim = CLIENT.get_dkim_from_email_auth(&email_auth_addr).await?; } - info!(LOG, "dkim {:?}", dkim; "func" => function_name!()); + info!(LOG, "dkim {:?}", dkim); if CLIENT .check_if_dkim_public_key_hash_valid( domain.clone(), @@ -106,7 +105,7 @@ pub async fn check_and_update_dkim( ) .await? { - info!(LOG, "public key registered"; "func" => function_name!()); + info!(LOG, "public key registered"); return Ok(()); } let selector_decomposed_def = @@ -117,18 +116,18 @@ pub async fn check_and_update_dkim( let str = parsed_email.canonicalized_header[idxes.0..idxes.1].to_string(); str }; - info!(LOG, "selector {}", selector; "func" => function_name!()); + info!(LOG, "selector {}", selector); let ic_agent = DkimOracleClient::gen_agent( &env::var(PEM_PATH_KEY).unwrap(), &env::var(IC_REPLICA_URL_KEY).unwrap(), )?; let oracle_client = DkimOracleClient::new(&env::var(CANISTER_ID_KEY).unwrap(), &ic_agent)?; let oracle_result = oracle_client.request_signature(&selector, &domain).await?; - info!(LOG, "DKIM oracle result {:?}", oracle_result; "func" => function_name!()); + info!(LOG, "DKIM oracle result {:?}", oracle_result); let public_key_hash = hex::decode(&oracle_result.public_key_hash[2..])?; - info!(LOG, "public_key_hash from oracle {:?}", public_key_hash; "func" => function_name!()); + info!(LOG, "public_key_hash from oracle {:?}", public_key_hash); let signature = Bytes::from_hex(&oracle_result.signature[2..])?; - info!(LOG, "signature {:?}", signature; "func" => function_name!()); + info!(LOG, "signature {:?}", signature); let tx_hash = CLIENT .set_dkim_public_key_hash( selector, @@ -138,6 +137,6 @@ pub async fn check_and_update_dkim( dkim, ) .await?; - info!(LOG, "DKIM registry updated {:?}", tx_hash; "func" => function_name!()); + info!(LOG, "DKIM registry updated {:?}", tx_hash); Ok(()) } diff --git a/packages/relayer/src/modules/mail.rs b/packages/relayer/src/modules/mail.rs index de7b27ce..d75f8cc8 100644 --- a/packages/relayer/src/modules/mail.rs +++ b/packages/relayer/src/modules/mail.rs @@ -10,7 +10,7 @@ pub enum EmailAuthEvent { account_eth_addr: String, guardian_email_addr: String, request_id: u32, - subject: String, + command: String, account_code: String, }, GuardianAlreadyExists { @@ -25,7 +25,7 @@ pub enum EmailAuthEvent { account_eth_addr: String, guardian_email_addr: String, request_id: u32, - subject: String, + command: String, }, AcceptanceSuccess { account_eth_addr: String, @@ -44,12 +44,12 @@ pub enum EmailAuthEvent { GuardianNotRegistered { account_eth_addr: String, guardian_email_addr: String, - subject: String, + command: String, request_id: u32, }, Ack { email_addr: String, - subject: String, + command: String, original_message_id: Option, }, NoOp, @@ -79,22 +79,26 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { account_eth_addr, guardian_email_addr, request_id, - subject, + command, account_code, } => { - let subject = format!("{} Code {}", subject, account_code); + let command = format!("{} Code {}", command, account_code); let body_plain = format!( "You have received an guardian request from the wallet address {}. \ + {} Code {}. \ Reply \"Confirm\" to this email to accept the request. \ Your request ID is #{}. \ If you did not initiate this request, please contact us immediately.", - account_eth_addr, request_id + account_eth_addr, command, account_code, request_id ); + let subject = format!("Email Recovery: Acceptance Request"); + let render_data = serde_json::json!({ "userEmailAddr": guardian_email_addr, "walletAddress": account_eth_addr, + "command": command, "requestId": request_id, }); let body_html = render_html("acceptance_request.html", render_data).await?; @@ -170,7 +174,7 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { account_eth_addr, guardian_email_addr, request_id, - subject, + command, } => { let body_plain = format!( "You have received a recovery request from the wallet address {}. \ @@ -180,9 +184,12 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { account_eth_addr, request_id ); + let subject = format!("Email Recovery: Recovery Request"); + let render_data = serde_json::json!({ "userEmailAddr": guardian_email_addr, "walletAddress": account_eth_addr, + "command": command, "requestId": request_id, }); let body_html = render_html("recovery_request.html", render_data).await?; @@ -289,14 +296,14 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { EmailAuthEvent::GuardianNotRegistered { account_eth_addr, guardian_email_addr, - subject, + command, request_id, } => { - let subject = format!("{} Code ", subject); + let command = format!("{} Code ", command); let body_plain = format!( "You have received an guardian request from the wallet address {}. \ - Add the guardian's account code in the subject and reply to this email. \ + Reply to this email. \ Your request ID is #{}. \ If you did not initiate this request, please contact us immediately.", account_eth_addr, request_id @@ -306,7 +313,10 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { "userEmailAddr": guardian_email_addr, "walletAddress": account_eth_addr, "requestId": request_id, + "command": command, }); + + let subject = "Guardian Not Registered".to_string(); let body_html = render_html("credential_not_present.html", render_data).await?; let email = EmailMessage { @@ -323,16 +333,16 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> { } EmailAuthEvent::Ack { email_addr, - subject, + command, original_message_id, } => { let body_plain = format!( - "Hi {}!\nYour email with the subject {} is received.", - email_addr, subject + "Hi {}!\nYour email with the command {} is received.", + email_addr, command ); - let render_data = serde_json::json!({"userEmailAddr": email_addr, "request": subject}); + let render_data = serde_json::json!({"userEmailAddr": email_addr, "request": command}); let body_html = render_html("acknowledgement.html", render_data).await?; - let subject = format!("Email Wallet Notification. Acknowledgement."); + let subject = format!("Acknowledgement"); let email = EmailMessage { to: email_addr, subject, diff --git a/packages/relayer/src/modules/web_server/rest_api.rs b/packages/relayer/src/modules/web_server/rest_api.rs index f9668bc7..aef07158 100644 --- a/packages/relayer/src/modules/web_server/rest_api.rs +++ b/packages/relayer/src/modules/web_server/rest_api.rs @@ -6,7 +6,6 @@ use rand::Rng; use relayer_utils::LOG; use reqwest::StatusCode; use serde::{Deserialize, Serialize}; -use slog::log; use std::str; #[derive(Serialize, Deserialize)] @@ -36,13 +35,13 @@ pub struct AcceptanceRequest { pub guardian_email_addr: String, pub account_code: String, pub template_idx: u64, - pub subject: String, + pub command: String, } #[derive(Serialize, Deserialize)] pub struct AcceptanceResponse { pub request_id: u32, - pub subject_params: Vec, + pub command_params: Vec, } #[derive(Serialize, Deserialize)] @@ -50,13 +49,13 @@ pub struct RecoveryRequest { pub controller_eth_addr: String, pub guardian_email_addr: String, pub template_idx: u64, - pub subject: String, + pub command: String, } #[derive(Serialize, Deserialize)] pub struct RecoveryResponse { pub request_id: u32, - pub subject_params: Vec, + pub command_params: Vec, } #[derive(Serialize, Deserialize)] @@ -111,26 +110,26 @@ pub async fn request_status_api(payload: RequestStatusRequest) -> Result Response { - let subject_template = CLIENT - .get_acceptance_subject_templates(&payload.controller_eth_addr, payload.template_idx) + let command_template = CLIENT + .get_acceptance_command_templates(&payload.controller_eth_addr, payload.template_idx) .await .unwrap(); - let subject_params = extract_template_vals(&payload.subject, subject_template); + let command_params = extract_template_vals(&payload.command, command_template); - if subject_params.is_err() { + if command_params.is_err() { return Response::builder() .status(StatusCode::BAD_REQUEST) - .body(Body::from("Invalid subject")) + .body(Body::from("Invalid command")) .unwrap(); } - let subject_params = subject_params.unwrap(); + let command_params = command_params.unwrap(); let account_eth_addr = CLIENT - .get_recovered_account_from_acceptance_subject( + .get_recovered_account_from_acceptance_command( &payload.controller_eth_addr, - subject_params.clone(), + command_params.clone(), payload.template_idx, ) .await @@ -268,7 +267,7 @@ pub async fn handle_acceptance_request(payload: AcceptanceRequest) -> Response Response Response Response Response { - let subject_template = CLIENT - .get_recovery_subject_templates(&payload.controller_eth_addr, payload.template_idx) + let command_template = CLIENT + .get_recovery_command_templates(&payload.controller_eth_addr, payload.template_idx) .await .unwrap(); - let subject_params = extract_template_vals(&payload.subject, subject_template); + let command_params = extract_template_vals(&payload.command, command_template); - if subject_params.is_err() { + if command_params.is_err() { return Response::builder() .status(StatusCode::BAD_REQUEST) - .body(Body::from("Invalid subject")) + .body(Body::from("Invalid command")) .unwrap(); } - let subject_params = subject_params.unwrap(); + let command_params = command_params.unwrap(); let account_eth_addr = CLIENT - .get_recovered_account_from_recovery_subject( + .get_recovered_account_from_recovery_command( &payload.controller_eth_addr, - subject_params.clone(), + command_params.clone(), payload.template_idx, ) .await @@ -446,7 +445,7 @@ pub async fn handle_recovery_request(payload: RecoveryRequest) -> Response handle_email_event(EmailAuthEvent::GuardianNotRegistered { account_eth_addr, guardian_email_addr: payload.guardian_email_addr.clone(), - subject: payload.subject.clone(), + command: payload.command.clone(), request_id, }) .await @@ -457,7 +456,7 @@ pub async fn handle_recovery_request(payload: RecoveryRequest) -> Response .body(Body::from( serde_json::to_string(&RecoveryResponse { request_id, - subject_params, + command_params, }) .unwrap(), )) @@ -487,7 +486,7 @@ pub async fn handle_recovery_request(payload: RecoveryRequest) -> Response account_eth_addr, guardian_email_addr: payload.guardian_email_addr.clone(), request_id, - subject: payload.subject.clone(), + command: payload.command.clone(), }) .await .expect("Failed to send Recovery event"); @@ -510,8 +509,6 @@ pub async fn handle_recovery_request(payload: RecoveryRequest) -> Response handle_email_event(EmailAuthEvent::GuardianNotSet { account_eth_addr, guardian_email_addr: payload.guardian_email_addr.clone(), - // request_id, - // subject: payload.subject.clone(), }) .await .expect("Failed to send Recovery event"); @@ -522,7 +519,7 @@ pub async fn handle_recovery_request(payload: RecoveryRequest) -> Response .body(Body::from( serde_json::to_string(&RecoveryResponse { request_id, - subject_params, + command_params, }) .unwrap(), )) @@ -638,7 +635,7 @@ pub async fn receive_email_api_fn(email: String) -> Result<()> { tokio::spawn(async move { match handle_email_event(EmailAuthEvent::Ack { email_addr: from_addr.clone(), - subject: parsed_email.get_subject_all().unwrap_or_default(), + command: parsed_email.get_command(false).unwrap_or_default(), original_message_id: parsed_email.get_message_id().ok(), }) .await diff --git a/packages/relayer/src/modules/web_server/server.rs b/packages/relayer/src/modules/web_server/server.rs index da6c5a59..195d651c 100644 --- a/packages/relayer/src/modules/web_server/server.rs +++ b/packages/relayer/src/modules/web_server/server.rs @@ -3,7 +3,6 @@ use axum::Router; use relayer_utils::LOG; use tower_http::cors::{AllowHeaders, AllowMethods, Any, CorsLayer}; -#[named] pub async fn run_server() -> Result<()> { let addr = WEB_SERVER_ADDRESS.get().unwrap(); @@ -186,7 +185,7 @@ pub async fn run_server() -> Result<()> { .allow_origin(Any), ); - trace!(LOG, "Listening API at {}", addr; "func" => function_name!()); + trace!(LOG, "Listening API at {}", addr); axum::Server::bind(&addr.parse()?) .serve(app.into_make_service()) .await?; diff --git a/packages/relayer/src/utils/subject_templates.rs b/packages/relayer/src/utils/command_templates.rs similarity index 96% rename from packages/relayer/src/utils/subject_templates.rs rename to packages/relayer/src/utils/command_templates.rs index 621bb408..71360c2f 100644 --- a/packages/relayer/src/utils/subject_templates.rs +++ b/packages/relayer/src/utils/command_templates.rs @@ -49,10 +49,10 @@ impl TemplateValue { } } -pub fn extract_template_vals_and_skipped_subject_idx( +pub fn extract_template_vals_from_command_template( input: &str, templates: Vec, -) -> Result<(Vec, usize), anyhow::Error> { +) -> Result, anyhow::Error> { // Convert the template to a regex pattern, escaping necessary characters and replacing placeholders let pattern = templates .iter() @@ -77,7 +77,7 @@ pub fn extract_template_vals_and_skipped_subject_idx( // Extract the values based on the matched pattern let current_input = &input[skipped_bytes..]; match extract_template_vals(current_input, templates) { - Ok(vals) => Ok((vals, skipped_bytes)), + Ok(vals) => Ok(vals), Err(e) => Err(e), } } else { @@ -151,9 +151,7 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result().unwrap(); @@ -168,7 +166,6 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result String { // Convert amount to string in wei format (no decimals) let uint_str = uint.to_string(); diff --git a/packages/relayer/src/utils/mod.rs b/packages/relayer/src/utils/mod.rs index 361a451a..11b1e85f 100644 --- a/packages/relayer/src/utils/mod.rs +++ b/packages/relayer/src/utils/mod.rs @@ -1,7 +1,7 @@ +pub mod command_templates; pub mod strings; -pub mod subject_templates; pub mod utils; +pub use command_templates::*; pub use strings::*; -pub use subject_templates::*; pub use utils::*; diff --git a/packages/relayer/src/utils/strings.rs b/packages/relayer/src/utils/strings.rs index b92bbc97..c33a1e7f 100644 --- a/packages/relayer/src/utils/strings.rs +++ b/packages/relayer/src/utils/strings.rs @@ -21,7 +21,7 @@ pub const IMAP_RECONNECT_ERROR: &str = "Failed to reconnect"; pub const SMTP_RECONNECT_ERROR: &str = "Failed to reconnect"; pub const CANNOT_GET_EMAIL_FROM_QUEUE: &str = "Cannot get email from mpsc in handle email task"; pub const NOT_MY_SENDER: &str = "NOT_MY_SENDER"; -pub const WRONG_SUBJECT_FORMAT: &str = "Wrong subject format"; +pub const WRONG_COMMAND_FORMAT: &str = "Wrong command format"; // Core REGEX'es and Commands pub const STRING_REGEX: &str = r"\S+"; @@ -29,6 +29,7 @@ pub const UINT_REGEX: &str = r"\d+"; pub const INT_REGEX: &str = r"-?\d+"; pub const ETH_ADDR_REGEX: &str = r"0x[a-fA-F0-9]{40}"; pub const DECIMALS_REGEX: &str = r"\d+\.\d+"; +pub const SHA_PRECOMPUTE_SELECTOR: &str = r#"(<(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)? (=\r\n)?i(=\r\n)?d(=\r\n)?=3D(=\r\n)?\"(=\r\n)?[^\"]*(=\r\n)?z(=\r\n)?k(=\r\n)?e(=\r\n)?m(=\r\n)?a(=\r\n)?i(=\r\n)?l(=\r\n)?[^\"]*(=\r\n)?\"(=\r\n)?[^>]*(=\r\n)?>(=\r\n)?)(=\r\n)?([^<>\/]+)(<(=\r\n)?\/(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)?>(=\r\n)?)"#; // DKIM ORACLE ARGS pub const CANISTER_ID_KEY: &str = "CANISTER_ID"; diff --git a/packages/relayer/src/utils/utils.rs b/packages/relayer/src/utils/utils.rs index f2dffca8..948c83fe 100644 --- a/packages/relayer/src/utils/utils.rs +++ b/packages/relayer/src/utils/utils.rs @@ -11,10 +11,6 @@ use relayer_utils::*; use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; -const DOMAIN_FIELDS: usize = 9; -const SUBJECT_FIELDS: usize = 17; -const EMAIL_ADDR_FIELDS: usize = 9; - #[derive(Debug, Clone, Deserialize)] pub struct ProverRes { proof: ProofJson, @@ -52,14 +48,13 @@ impl ProofJson { } } -#[named] pub async fn generate_proof( input: &str, request: &str, address: &str, ) -> Result<(Bytes, Vec)> { let client = reqwest::Client::new(); - info!(LOG, "prover input {}", input; "func" => function_name!()); + info!(LOG, "prover input {}", input); let res = client .post(format!("{}/prove/{}", address, request)) .json(&serde_json::json!({ "input": input })) @@ -67,7 +62,7 @@ pub async fn generate_proof( .await? .error_for_status()?; let res_json = res.json::().await?; - info!(LOG, "prover response {:?}", res_json; "func" => function_name!()); + info!(LOG, "prover response {:?}", res_json); let proof = res_json.proof.to_eth_bytes()?; let pub_signals = res_json .pub_signals @@ -88,12 +83,12 @@ pub fn calculate_default_hash(input: &str) -> String { pub fn calculate_account_salt(email_addr: &str, account_code: &str) -> String { let padded_email_addr = PaddedEmailAddr::from_email_addr(&email_addr); let account_code = if account_code.starts_with("0x") { - hex2field(&account_code).unwrap() + hex_to_field(&account_code).unwrap() } else { - hex2field(&format!("0x{}", account_code)).unwrap() + hex_to_field(&format!("0x{}", account_code)).unwrap() }; let account_code = AccountCode::from(account_code); let account_salt = AccountSalt::new(&padded_email_addr, account_code).unwrap(); - field2hex(&account_salt.0) + field_to_hex(&account_salt.0) } diff --git a/rust-toolchain b/rust-toolchain index 837f16a7..4fa580ba 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.73.0 \ No newline at end of file +1.80.1 \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index bbe4d5e1..dd845b0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,38 +18,38 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.2", "@babel/compat-data@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.22.5", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6", "@babel/generator@^7.7.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.25.6" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -69,42 +69,40 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.24.7", "@babel/helper-compilation-targets@^7.24.8", "@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - browserslist "^4.22.2" + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz#2eaed36b3a1c11c53bdf80d53838b293c52f5b3b" - integrity sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg== +"@babel/helper-create-class-features-plugin@^7.24.7", "@babel/helper-create-class-features-plugin@^7.25.0", "@babel/helper-create-class-features-plugin@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz#57eaf1af38be4224a9d9dd01ddde05b741f50e14" + integrity sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.8" "@babel/helper-optimise-call-expression" "^7.24.7" - "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-replace-supers" "^7.25.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/traverse" "^7.25.4" semver "^6.3.1" -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz#be4f435a80dc2b053c76eeb4b7d16dd22cfc89da" - integrity sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA== +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7", "@babel/helper-create-regexp-features-plugin@^7.25.0", "@babel/helper-create-regexp-features-plugin@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz#24c75974ed74183797ffd5f134169316cd1808d9" + integrity sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" regexpu-core "^5.3.1" semver "^6.3.1" -"@babel/helper-define-polyfill-provider@^0.6.1", "@babel/helper-define-polyfill-provider@^0.6.2": +"@babel/helper-define-polyfill-provider@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== @@ -115,35 +113,13 @@ lodash.debounce "^4.0.8" resolve "^1.14.2" -"@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== +"@babel/helper-member-expression-to-functions@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz#6155e079c913357d24a4c20480db7c712a5c3fb6" + integrity sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA== dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-member-expression-to-functions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz#67613d068615a70e4ed5101099affc7a41c5225f" - integrity sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.8" "@babel/helper-module-imports@^7.24.7": version "7.24.7" @@ -153,16 +129,15 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== +"@babel/helper-module-transforms@^7.24.7", "@babel/helper-module-transforms@^7.24.8", "@babel/helper-module-transforms@^7.25.0", "@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" "@babel/helper-optimise-call-expression@^7.24.7": version "7.24.7" @@ -171,28 +146,28 @@ dependencies: "@babel/types" "^7.24.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" - integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== -"@babel/helper-remap-async-to-generator@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz#b3f0f203628522713849d49403f1a414468be4c7" - integrity sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA== +"@babel/helper-remap-async-to-generator@^7.24.7", "@babel/helper-remap-async-to-generator@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz#d2f0fbba059a42d68e5e378feaf181ef6055365e" + integrity sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-wrap-function" "^7.24.7" + "@babel/helper-wrap-function" "^7.25.0" + "@babel/traverse" "^7.25.0" -"@babel/helper-replace-supers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" - integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== +"@babel/helper-replace-supers@^7.24.7", "@babel/helper-replace-supers@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz#ff44deac1c9f619523fe2ca1fd650773792000a9" + integrity sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.8" "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/traverse" "^7.25.0" "@babel/helper-simple-access@^7.24.7": version "7.24.7" @@ -210,45 +185,37 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== +"@babel/helper-validator-option@^7.24.7", "@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== -"@babel/helper-wrap-function@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz#52d893af7e42edca7c6d2c6764549826336aae1f" - integrity sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw== +"@babel/helper-wrap-function@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz#dab12f0f593d6ca48c0062c28bcfb14ebe812f81" + integrity sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ== dependencies: - "@babel/helper-function-name" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.0" + "@babel/types" "^7.25.0" -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== +"@babel/helpers@^7.25.0": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.24.7": version "7.24.7" @@ -260,25 +227,34 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz#fd059fd27b184ea2b4c7e646868a9a381bbc3055" - integrity sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ== +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz#dca427b45a6c0f5c095a1c639dfe2476a3daba7f" + integrity sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.3" -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz#468096ca44bbcbe8fcc570574e12eb1950e18107" - integrity sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg== +"@babel/plugin-bugfix-safari-class-field-initializer-scope@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.0.tgz#cd0c583e01369ef51676bdb3d7b603e17d2b3f73" + integrity sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz#749bde80356b295390954643de7635e0dffabe73" + integrity sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.24.7": version "7.24.7" @@ -289,13 +265,13 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-transform-optional-chaining" "^7.24.7" -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz#71b21bb0286d5810e63a1538aa901c58e87375ec" - integrity sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.0.tgz#3a82a70e7cb7294ad2559465ebcb871dfbf078fb" + integrity sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.0" "@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": version "7.21.0-placeholder-for-preset-env.2" @@ -316,7 +292,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -345,20 +321,20 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-import-assertions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz#2a0b406b5871a20a841240586b1300ce2088a778" - integrity sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.6.tgz#bb918905c58711b86f9710d74a3744b6c56573b5" + integrity sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" - integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz#6d4c78f042db0e82fd6436cd65fec5dc78ad2bde" + integrity sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -379,7 +355,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -393,7 +369,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -428,7 +404,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== @@ -436,11 +412,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.24.7", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" - integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz#04db9ce5a9043d9c635e75ae7969a2cd50ca97ff" + integrity sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" @@ -457,15 +433,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-async-generator-functions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz#7330a5c50e05181ca52351b8fd01642000c96cfd" - integrity sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g== +"@babel/plugin-transform-async-generator-functions@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz#2afd4e639e2d055776c9f091b6c0c180ed8cf083" + integrity sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-remap-async-to-generator" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-remap-async-to-generator" "^7.25.0" "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/traverse" "^7.25.4" "@babel/plugin-transform-async-to-generator@^7.24.7": version "7.24.7" @@ -483,20 +459,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-block-scoping@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz#42063e4deb850c7bd7c55e626bf4e7ab48e6ce02" - integrity sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ== +"@babel/plugin-transform-block-scoping@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz#23a6ed92e6b006d26b1869b1c91d1b917c2ea2ac" + integrity sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-class-properties@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz#256879467b57b0b68c7ddfc5b76584f398cd6834" - integrity sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w== +"@babel/plugin-transform-class-properties@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz#bae7dbfcdcc2e8667355cd1fb5eda298f05189fd" + integrity sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-class-static-block@^7.24.7": version "7.24.7" @@ -507,18 +483,16 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz#4ae6ef43a12492134138c1e45913f7c46c41b4bf" - integrity sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw== +"@babel/plugin-transform-classes@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz#d29dbb6a72d79f359952ad0b66d88518d65ef89a" + integrity sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-replace-supers" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-replace-supers" "^7.25.0" + "@babel/traverse" "^7.25.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.24.7": @@ -529,12 +503,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/template" "^7.24.7" -"@babel/plugin-transform-destructuring@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz#a097f25292defb6e6cc16d6333a4cfc1e3c72d9e" - integrity sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw== +"@babel/plugin-transform-destructuring@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz#c828e814dbe42a2718a838c2a2e16a408e055550" + integrity sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-dotall-regex@^7.24.7": version "7.24.7" @@ -551,6 +525,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.0.tgz#809af7e3339466b49c034c683964ee8afb3e2604" + integrity sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/plugin-transform-dynamic-import@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz#4d8b95e3bae2b037673091aa09cd33fecd6419f4" @@ -583,14 +565,14 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" -"@babel/plugin-transform-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz#6d8601fbffe665c894440ab4470bc721dd9131d6" - integrity sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w== +"@babel/plugin-transform-function-name@^7.25.1": + version "7.25.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.1.tgz#b85e773097526c1a4fc4ba27322748643f26fc37" + integrity sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA== dependencies: - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.1" "@babel/plugin-transform-json-strings@^7.24.7": version "7.24.7" @@ -600,12 +582,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-transform-literals@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz#36b505c1e655151a9d7607799a9988fc5467d06c" - integrity sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ== +"@babel/plugin-transform-literals@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz#deb1ad14fc5490b9a65ed830e025bca849d8b5f3" + integrity sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-logical-assignment-operators@^7.24.7": version "7.24.7" @@ -630,24 +612,24 @@ "@babel/helper-module-transforms" "^7.24.7" "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz#9fd5f7fdadee9085886b183f1ad13d1ab260f4ab" - integrity sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ== +"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.24.7", "@babel/plugin-transform-modules-commonjs@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz#ab6421e564b717cb475d6fff70ae7f103536ea3c" + integrity sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA== dependencies: - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-simple-access" "^7.24.7" -"@babel/plugin-transform-modules-systemjs@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz#f8012316c5098f6e8dee6ecd58e2bc6f003d0ce7" - integrity sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw== +"@babel/plugin-transform-modules-systemjs@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz#8f46cdc5f9e5af74f3bd019485a6cbe59685ea33" + integrity sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw== dependencies: - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-module-transforms" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.0" "@babel/plugin-transform-modules-umd@^7.24.7": version "7.24.7" @@ -714,12 +696,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz#b8f6848a80cf2da98a8a204429bec04756c6d454" - integrity sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ== +"@babel/plugin-transform-optional-chaining@^7.24.7", "@babel/plugin-transform-optional-chaining@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz#bb02a67b60ff0406085c13d104c99a835cdf365d" + integrity sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-optional-chaining" "^7.8.3" @@ -730,13 +712,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-private-methods@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" - integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== +"@babel/plugin-transform-private-methods@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz#9bbefbe3649f470d681997e0b64a4b254d877242" + integrity sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-private-property-in-object@^7.24.7": version "7.24.7" @@ -770,15 +752,15 @@ "@babel/plugin-transform-react-jsx" "^7.24.7" "@babel/plugin-transform-react-jsx@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.24.7.tgz#17cd06b75a9f0e2bd076503400e7c4b99beedac4" - integrity sha512-+Dj06GDZEFRYvclU6k4bme55GKBEWUmByM/eoKuqg4zTNQHiApWRhQph5fxQB2wAEFvRzL1tOEj1RJ19wJrhoA== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.2.tgz#e37e8ebfa77e9f0b16ba07fadcb6adb47412227a" + integrity sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-jsx" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.25.2" "@babel/plugin-transform-react-pure-annotations@^7.24.7": version "7.24.7" @@ -832,21 +814,22 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-typeof-symbol@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz#f074be466580d47d6e6b27473a840c9f9ca08fb0" - integrity sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg== +"@babel/plugin-transform-typeof-symbol@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz#383dab37fb073f5bfe6e60c654caac309f92ba1c" + integrity sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-typescript@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz#b006b3e0094bf0813d505e0c5485679eeaf4a881" - integrity sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz#237c5d10de6d493be31637c6b9fa30b6c5461add" + integrity sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-typescript" "^7.24.7" "@babel/plugin-transform-unicode-escapes@^7.24.7": @@ -872,27 +855,28 @@ "@babel/helper-create-regexp-features-plugin" "^7.24.7" "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-unicode-sets-regex@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz#d40705d67523803a576e29c63cef6e516b858ed9" - integrity sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg== +"@babel/plugin-transform-unicode-sets-regex@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz#be664c2a0697ffacd3423595d5edef6049e8946c" + integrity sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-regexp-features-plugin" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/preset-env@^7.22.2", "@babel/preset-env@^7.22.20": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.7.tgz#ff067b4e30ba4a72f225f12f123173e77b987f37" - integrity sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ== - dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.24.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.24.7" + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.25.4.tgz#be23043d43a34a2721cd0f676c7ba6f1481f6af6" + integrity sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw== + dependencies: + "@babel/compat-data" "^7.25.4" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.25.3" + "@babel/plugin-bugfix-safari-class-field-initializer-scope" "^7.25.0" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.25.0" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.24.7" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.24.7" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.25.0" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -913,29 +897,30 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.24.7" - "@babel/plugin-transform-async-generator-functions" "^7.24.7" + "@babel/plugin-transform-async-generator-functions" "^7.25.4" "@babel/plugin-transform-async-to-generator" "^7.24.7" "@babel/plugin-transform-block-scoped-functions" "^7.24.7" - "@babel/plugin-transform-block-scoping" "^7.24.7" - "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-block-scoping" "^7.25.0" + "@babel/plugin-transform-class-properties" "^7.25.4" "@babel/plugin-transform-class-static-block" "^7.24.7" - "@babel/plugin-transform-classes" "^7.24.7" + "@babel/plugin-transform-classes" "^7.25.4" "@babel/plugin-transform-computed-properties" "^7.24.7" - "@babel/plugin-transform-destructuring" "^7.24.7" + "@babel/plugin-transform-destructuring" "^7.24.8" "@babel/plugin-transform-dotall-regex" "^7.24.7" "@babel/plugin-transform-duplicate-keys" "^7.24.7" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex" "^7.25.0" "@babel/plugin-transform-dynamic-import" "^7.24.7" "@babel/plugin-transform-exponentiation-operator" "^7.24.7" "@babel/plugin-transform-export-namespace-from" "^7.24.7" "@babel/plugin-transform-for-of" "^7.24.7" - "@babel/plugin-transform-function-name" "^7.24.7" + "@babel/plugin-transform-function-name" "^7.25.1" "@babel/plugin-transform-json-strings" "^7.24.7" - "@babel/plugin-transform-literals" "^7.24.7" + "@babel/plugin-transform-literals" "^7.25.2" "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" "@babel/plugin-transform-member-expression-literals" "^7.24.7" "@babel/plugin-transform-modules-amd" "^7.24.7" - "@babel/plugin-transform-modules-commonjs" "^7.24.7" - "@babel/plugin-transform-modules-systemjs" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.8" + "@babel/plugin-transform-modules-systemjs" "^7.25.0" "@babel/plugin-transform-modules-umd" "^7.24.7" "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" "@babel/plugin-transform-new-target" "^7.24.7" @@ -944,9 +929,9 @@ "@babel/plugin-transform-object-rest-spread" "^7.24.7" "@babel/plugin-transform-object-super" "^7.24.7" "@babel/plugin-transform-optional-catch-binding" "^7.24.7" - "@babel/plugin-transform-optional-chaining" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.8" "@babel/plugin-transform-parameters" "^7.24.7" - "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.25.4" "@babel/plugin-transform-private-property-in-object" "^7.24.7" "@babel/plugin-transform-property-literals" "^7.24.7" "@babel/plugin-transform-regenerator" "^7.24.7" @@ -955,16 +940,16 @@ "@babel/plugin-transform-spread" "^7.24.7" "@babel/plugin-transform-sticky-regex" "^7.24.7" "@babel/plugin-transform-template-literals" "^7.24.7" - "@babel/plugin-transform-typeof-symbol" "^7.24.7" + "@babel/plugin-transform-typeof-symbol" "^7.24.8" "@babel/plugin-transform-unicode-escapes" "^7.24.7" "@babel/plugin-transform-unicode-property-regex" "^7.24.7" "@babel/plugin-transform-unicode-regex" "^7.24.7" - "@babel/plugin-transform-unicode-sets-regex" "^7.24.7" + "@babel/plugin-transform-unicode-sets-regex" "^7.25.4" "@babel/preset-modules" "0.1.6-no-external-plugins" babel-plugin-polyfill-corejs2 "^0.4.10" - babel-plugin-polyfill-corejs3 "^0.10.4" + babel-plugin-polyfill-corejs3 "^0.10.6" babel-plugin-polyfill-regenerator "^0.6.1" - core-js-compat "^3.31.0" + core-js-compat "^3.37.1" semver "^6.3.1" "@babel/preset-modules@0.1.6-no-external-plugins": @@ -1005,43 +990,40 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime@^7.8.4": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" - integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.24.7", "@babel/template@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== +"@babel/template@^7.24.7", "@babel/template@^7.25.0", "@babel/template@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== dependencies: - "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" @@ -1641,9 +1623,9 @@ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" @@ -1724,10 +1706,10 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.17.0": - version "0.17.0" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" - integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== +"@solidity-parser/parser@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" + integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== "@types/babel__core@^7.1.14": version "7.20.5" @@ -1797,11 +1779,11 @@ pretty-format "^29.0.0" "@types/node@*": - version "20.14.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.6.tgz#f3c19ffc98c2220e18de259bb172dd4d892a6075" - integrity sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw== + version "22.5.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" + integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/stack-utils@^2.0.0": version "2.0.3" @@ -1814,50 +1796,41 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.32" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" - integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== dependencies: "@types/yargs-parser" "*" -"@zk-email/circuits@^6.1.1": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.1.2.tgz#bde32294e11723bf5880219c274fb720c95aeb3f" - integrity sha512-pmZsGo2Kz/CC5T4/VUA/ngJpzP2g05WvXj4X4j4/y30mjdz9oocGYLqsMZEl2Fx3rmH4mZXkGhm0sA0C7hAReg== +"@zk-email/circuits@^6.1.5": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.1.5.tgz#53462456638edf97bbc206ead01c302ba11e7850" + integrity sha512-Hx+R7ARIZ1JLJ6Ba3qqkWdGweOS63P2VyldVgZ5z0KZ5PvgAsM1ka8AUWzq1RFZCmgbluY8yiHLzWREbQm9bOQ== dependencies: "@zk-email/zk-regex-circom" "^2.1.0" circomlib "^2.0.5" "@zk-email/contracts@^6.1.2": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@zk-email/contracts/-/contracts-6.1.2.tgz#ce5b21c62103da72cad404724f2eb9649c773d86" - integrity sha512-cakbMmr+ox6nyhNXiJI8ZM0ZuKn3A60KIeiZsr3a1dYn4Rk03PL2MfHMv9ec8ivNnJNy+jDbOAkcTV5PYHoTIQ== + version "6.1.5" + resolved "https://registry.yarnpkg.com/@zk-email/contracts/-/contracts-6.1.5.tgz#979c2aaa30cdcdb7433ff37d74c396df0cb60107" + integrity sha512-1RW3dpYGBQXjmIlcTGMtYsux7FQoR1MezA0D0pssrNEaCO2CuQd6oAxJLpbCxFQWPbujLKn8PiEVcjP+eiGvVw== dependencies: "@openzeppelin/contracts" "^5.0.0" dotenv "^16.3.1" -"@zk-email/relayer-utils@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@zk-email/relayer-utils/-/relayer-utils-0.2.4.tgz#5f452bb2867e1efe8700a19351dbb7796f9a081f" - integrity sha512-T1N4hBL2NI7omerONdgS2HIYydNP0cRSKpyKEMRzWxelgam7HP3TgG7jYbehQn9BlCyL7o4ifNnyH9sQPaC0zA== - dependencies: - "@mapbox/node-pre-gyp" "^1.0" - "@zk-email/relayer-utils" "github:zkemail/relayer-utils" - cargo-cp-artifact "^0.1" - node-pre-gyp-github "https://github.com/ultamatt/node-pre-gyp-github.git" - -"@zk-email/relayer-utils@github:zkemail/relayer-utils": - version "0.2.4" - resolved "https://codeload.github.com/zkemail/relayer-utils/tar.gz/58e72b7d100eb8243a10df72bfe242f13ddcfdb8" +"@zk-email/relayer-utils@^0.3.6": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@zk-email/relayer-utils/-/relayer-utils-0.3.6.tgz#55d0109b57b7f19e2441c90a55ed8096dfdaefe4" + integrity sha512-j3xjcKmG2rMdwvg462s6QQ+CRr29mOT6uYq57rotg64c4UbvPWvhcuuJ7C7qc2wUl4bhShuBz1NoE8e2jkwHOw== dependencies: "@mapbox/node-pre-gyp" "^1.0" cargo-cp-artifact "^0.1" node-pre-gyp-github "https://github.com/ultamatt/node-pre-gyp-github.git" "@zk-email/zk-regex-circom@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.1.0.tgz#cc2f1d93fb130a9f8ac88114d3559a296df97538" - integrity sha512-Ayq0Hk4m7w1UHPPx2c5bUWLdKUPnuK62AZFOyiIvA7x4NgRyvjxe+S4D5KFH5FIz4PgEnXVxgscSSbe5p/GCvQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.1.1.tgz#e4f41fd873905d27dd05a9f07613717be4b2e5d1" + integrity sha512-tuU2Kb08fwYkAPDemL8RRvLTEKNGyUt2odYr5awkVKGCZGCV1hxIy/wke6+2fIOR8Lu82MnXVtdBk+G3gRZLbg== dependencies: commander "^11.0.0" snarkjs "^0.7.0" @@ -1897,19 +1870,19 @@ ajv@^6.12.6: uri-js "^4.2.2" ajv@^8.0.1: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" - integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.2.1: version "4.3.2" @@ -1943,9 +1916,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== antlr4@^4.11.0: - version "4.13.1" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d" - integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA== + version "4.13.2" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.2.tgz#0d084ad0e32620482a9c3a0e2470c02e72e4006d" + integrity sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg== antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" @@ -2001,9 +1974,9 @@ astral-regex@^2.0.0: integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async@^3.2.3: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== available-typed-arrays@^1.0.7: version "1.0.7" @@ -2060,13 +2033,13 @@ babel-plugin-polyfill-corejs2@^0.4.10: "@babel/helper-define-polyfill-provider" "^0.6.2" semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz#789ac82405ad664c20476d0233b485281deb9c77" - integrity sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg== +babel-plugin-polyfill-corejs3@^0.10.6: + version "0.10.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz#2deda57caef50f59c525aeb4964d3b2f867710c7" + integrity sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA== dependencies: - "@babel/helper-define-polyfill-provider" "^0.6.1" - core-js-compat "^3.36.1" + "@babel/helper-define-polyfill-provider" "^0.6.2" + core-js-compat "^3.38.0" babel-plugin-polyfill-regenerator@^0.6.1: version "0.6.2" @@ -2076,22 +2049,25 @@ babel-plugin-polyfill-regenerator@^0.6.1: "@babel/helper-define-polyfill-provider" "^0.6.2" babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" + integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" babel-preset-jest@^29.5.0, babel-preset-jest@^29.6.3: version "29.6.3" @@ -2199,22 +2175,22 @@ brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.22.2, browserslist@^4.23.0: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== +browserslist@^4.23.1, browserslist@^4.23.3: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" - node-releases "^2.0.14" - update-browserslist-db "^1.0.16" + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" -bs-logger@0.x: +bs-logger@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== @@ -2264,10 +2240,10 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001629: - version "1.0.30001636" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz#b15f52d2bdb95fad32c2f53c0b68032b85188a78" - integrity sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg== +caniuse-lite@^1.0.30001646: + version "1.0.30001658" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001658.tgz#b5f7be8ac748a049ab06aa1cf7a1408d83f074ec" + integrity sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw== cargo-cp-artifact@^0.1: version "0.1.9" @@ -2275,9 +2251,9 @@ cargo-cp-artifact@^0.1: integrity sha512-6F+UYzTaGB+awsTXg0uSJA1/b/B3DDJzpKVRu0UmyI7DmNeaAl2RFHuTGIN6fEgpadRxoXGb7gbC1xo4C3IdyA== chai@^4.3.6, chai@^4.3.7: - version "4.4.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" - integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== + version "4.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" check-error "^1.0.3" @@ -2285,7 +2261,7 @@ chai@^4.3.6, chai@^4.3.7: get-func-name "^2.0.2" loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.8" + type-detect "^4.1.0" chalk@^2.4.2: version "2.4.2" @@ -2326,10 +2302,10 @@ child_process@^1.0.2: resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" integrity sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g== -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -2395,9 +2371,9 @@ circomlibjs@^0.1.2: ffjavascript "^0.2.45" cjs-module-lexer@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" - integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== + version "1.4.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" + integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== cliui@^7.0.2: version "7.0.4" @@ -2486,12 +2462,12 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -core-js-compat@^3.31.0, core-js-compat@^3.36.1: - version "3.37.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.37.1.tgz#c844310c7852f4bdf49b8d339730b97e17ff09ee" - integrity sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg== +core-js-compat@^3.37.1, core-js-compat@^3.38.0: + version "3.38.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09" + integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw== dependencies: - browserslist "^4.23.0" + browserslist "^4.23.3" cosmiconfig@^8.0.0: version "8.3.6" @@ -2543,19 +2519,12 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.5: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" - -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" + ms "^2.1.3" debug@^3.1.0: version "3.2.7" @@ -2620,10 +2589,10 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== dotenv@^16.3.1: version "16.4.5" @@ -2634,17 +2603,17 @@ dotenv@^16.3.1: version "1.0.0" resolved "https://github.com/dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0" -ejs@^3.1.6: +ejs@^3.1.10, ejs@^3.1.6: version "3.1.10" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.796: - version "1.4.807" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz#4d6c5ea1516f0164ac5bfd487ccd4ee9507c8f01" - integrity sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A== +electron-to-chromium@^1.5.4: + version "1.5.16" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.16.tgz#125b6777774dbd4287aa86ab181cc880f4a5fb47" + integrity sha512-2gQpi2WYobXmz2q23FrOBYTLcI1O/P4heW3eqX+ldmPVDQELRqhiebV380EhlGG12NtnX1qbK/FHpN0ba+7bLA== elliptic@6.5.4: version "6.5.4" @@ -2708,14 +2677,9 @@ es6-promisify@^5.0.0: es6-promise "^4.0.3" escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -2727,6 +2691,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -2859,6 +2828,11 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + fastfile@0.0.20: version "0.0.20" resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.20.tgz#794a143d58cfda2e24c298e5ef619c748c8a1879" @@ -2912,14 +2886,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2928,6 +2894,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -2946,8 +2920,8 @@ for-each@^0.3.3: is-callable "^1.1.3" "forge-std@https://github.com/foundry-rs/forge-std": - version "1.8.2" - resolved "https://github.com/foundry-rs/forge-std#19891e6a0b5474b9ea6827ddb90bb9388f7acfc0" + version "1.9.2" + resolved "https://github.com/foundry-rs/forge-std#1ce7535a517406b9aec7ea1ea27c1b41376f712c" fs-minipass@^2.0.0: version "2.1.0" @@ -3036,17 +3010,6 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@8.1.0, glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -3059,6 +3022,17 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.3, glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3123,14 +3097,14 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" -he@1.2.0: +he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -3184,9 +3158,9 @@ human-signals@^2.1.0: integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.3.0: version "3.3.0" @@ -3197,9 +3171,9 @@ import-fresh@^3.3.0: resolve-from "^4.0.0" import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -3248,11 +3222,11 @@ is-callable@^1.1.3: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-extglob@^2.1.1: version "2.1.1" @@ -3337,9 +3311,9 @@ istanbul-lib-instrument@^5.0.4: semver "^6.3.0" istanbul-lib-instrument@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" - integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" "@babel/parser" "^7.23.9" @@ -3374,9 +3348,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jake@^10.8.5: - version "10.9.1" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.1.tgz#8dc96b7fcc41cb19aa502af506da4e1d56f5e62b" - integrity sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w== + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== dependencies: async "^3.2.3" chalk "^4.0.2" @@ -3751,13 +3725,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -3766,6 +3733,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3847,7 +3821,7 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.memoize@4.x: +lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== @@ -3862,7 +3836,7 @@ lodash@^4.17.21, lodash@^4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -3908,7 +3882,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x: +make-error@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -3926,9 +3900,9 @@ merge-stream@^2.0.0: integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== micromatch@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -3960,13 +3934,6 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3974,7 +3941,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -4007,42 +3974,37 @@ mkdirp@^1.0.3: integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== mocha@^10.2.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" - integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -4075,27 +4037,27 @@ node-fetch@^2.1.1, node-fetch@^2.6.7: whatwg-url "^5.0.0" node-gyp-build@^4.2.2: - version "4.8.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" - integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== + version "4.8.2" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.2.tgz#4f802b71c1ab2ca16af830e6c1ea7dd1ad9496fa" + integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -"node-pre-gyp-github@https://github.com/ultamatt/node-pre-gyp-github.git": +"node-pre-gyp-github@git+https://github.com/ultamatt/node-pre-gyp-github.git": version "1.4.3" - resolved "https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f" + resolved "git+https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f" dependencies: "@octokit/rest" "^15.9.5" commander "^2.17.0" mime-types "^2.1.19" -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== nopt@^5.0.0: version "5.0.0" @@ -4263,9 +4225,9 @@ pathval@^1.1.1: integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -4300,13 +4262,12 @@ prelude-ls@~1.1.2: integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prettier-plugin-solidity@^1.1.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" - integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== + version "1.4.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz#8060baf18853a9e34d2e09e47e87b4f19e15afe9" + integrity sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg== dependencies: - "@solidity-parser/parser" "^0.17.0" + "@solidity-parser/parser" "^0.18.0" semver "^7.5.4" - solidity-comments-extractor "^0.0.8" prettier@^2.8.3: version "2.8.8" @@ -4314,9 +4275,9 @@ prettier@^2.8.3: integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== prettier@^3.0.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" - integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -4512,15 +4473,15 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.3.5, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -4651,11 +4612,6 @@ solhint@^3.6.1: optionalDependencies: prettier "^2.8.3" -solidity-comments-extractor@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" - integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== - source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -4734,18 +4690,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@3.1.1, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -4760,6 +4709,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0, supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -4842,18 +4798,19 @@ tryer@^1.0.1: integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== ts-jest@^29.1.1: - version "29.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.5.tgz#d6c0471cc78bffa2cb4664a0a6741ef36cfe8f69" - integrity sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg== + version "29.2.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.5.tgz#591a3c108e1f5ebd013d3152142cb5472b399d63" + integrity sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA== dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" + bs-logger "^0.2.6" + ejs "^3.1.10" + fast-json-stable-stringify "^2.1.0" jest-util "^29.0.0" json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "^7.5.3" - yargs-parser "^21.0.1" + lodash.memoize "^4.1.2" + make-error "^1.3.6" + semver "^7.6.3" + yargs-parser "^21.1.1" type-check@~0.3.2: version "0.3.2" @@ -4862,11 +4819,16 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.8: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -4882,10 +4844,10 @@ underscore@1.12.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" @@ -4917,15 +4879,15 @@ universal-user-agent@^2.0.0: dependencies: os-name "^3.0.0" -update-browserslist-db@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== dependencies: escalade "^3.1.2" picocolors "^1.0.1" -uri-js@^4.2.2, uri-js@^4.4.1: +uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== @@ -4954,9 +4916,9 @@ util@^0.12.4: which-typed-array "^1.1.2" v8-to-istanbul@^9.0.1: - version "9.2.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -5055,10 +5017,10 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^7.0.0: version "7.0.0" @@ -5102,22 +5064,17 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^21.0.1, yargs-parser@^21.1.1: +yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-unparser@2.0.0: +yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -5127,7 +5084,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==